From: Jim Evins Date: Sun, 27 Sep 2009 02:46:39 +0000 (-0400) Subject: Organized master branch to be top-level directory for glabels, instead of X-Git-Tag: glabels-2_3_0~182 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39f4c44e000d410b4f63ab1fcdc4b04273ff0a83;p=glabels Organized master branch to be top-level directory for glabels, instead of having a glabels2 sub-directory. --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..f4415539 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,181 @@ +gLabels Author +============== + +Jim Evins + +Acknowledgments +=============== + +- The GNU Barcode Library provides a large chunk of the barcode functionality +and is distributed with glabels. See ./barcode-0.98/README for more +information. The author: + + Alessandro Rubini + +- The iec16022 library provides encoding for 2D barcodes. See +iec16022-0.2.1/README for more information. + +- The qrencode library provides encoding for 2D barcodes. See +qrencode-3.1.0/README for more information. + +- Glabels includes a modified version of the gimpchainbutton widget from the +gimp, as well as several stock icons from the gimp's default theme. +These are copyright: + + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball + * Copyright (C) 1999-2000 Sven Neumann + +Glabels includes contributions from: + Frederic Ruaudel + Emmanuel Pacaud + Wayne Schuller + Austin Henry -- EDS and vcard backends + nestor di -- excellent splash screen + that first appeared in + 0.4.3 + Darren Warner + Javier Donaire Segarra + Alessandro Zummo + José Dapena Paz + Akkana + Dag Wieers + Mário Meyer + Peter Cherriman + Daniel Mueller + +Translations: + + Olivier Berger -- French (original) + Florent Morel -- French (2.0.2) + Claude Paroz -- French (2.1.4) + Marcus Bauer -- German (original) + Christian Neumair -- German (1.89.1) + Mario Blättermann -- German (2.2.5) + Takeshi AIHANA -- Japanese + Paulo Rogério Ormenese -- Brazilian Portuguese + Víctor Moral -- Spanish + sergio rivadero -- Spanish (2.0.3) + Vitaly Lipatov -- Russian + Shell, Hin-lik Hung -- Chinese (TW) + Arkadiusz Lipiec -- Polish + David Makovský (Yakeen) -- Czech + Zbynek Mrkvicka -- Czech (2.0.3) + Mancio -- Italian + Daniele Medri -- Italian (2.0.3) + Antonio C. Codazzi "la Filozofo" -- Esperanto + David Planella -- Catalan + Careon -- Chinese (CN) + +The following people have submitted label templates or information about +particular products (I apologize if I have missed anybody): + + Hap + Olivier Berger + Marcus Bauer + Jochen Hein + Jonathan Buzzard + Jeff Davis + Ludger Solbach + Darren Ross + George Mitchell + Douglas Bollinger + Tim Jackson + John Stoffel + Dany De Bontridder + Andy Longton + Bostjan Muller + John Helms + no-exit + Mozilla from marela + Holger + Bill Tihen + Dan Gray + Keith Hudson + Tamas Bondar + George Mitchell + Erich Pfennig + Gwen Patton + Miek Gieben + Joerg Schmitz-Linneweber + David Makovský + Oliver Schwank + Akkana + Ted Poe + hans-helmut.belter + Uli Wachowitz + Stephan Hegel + Holger Reinmann + Michael Wojciechowski + Jim Mueller + Mark Fullalove + Zamiel Al'Shaitan + Philip Paeps + Bryan Fields + Martin Klaffenboeck + Lauri Ampuja + Allan Wind + Mark S Burgunder + Christian Holländer + Marvin P. Dickens + Julien BLACHE + James D Strandboge + Linas Jakucionis + Henrik Brix Andersen + Nigel Titley + Sean 'Shaleh' Perry + Anthony Brockman + Thorsten Hirsch + John Ross + Mike Machado + Rob Elshire + Niels + Ernst W. Winter + regis rampnoux + Sven Salzwedel + Dick Middleton + Ian Peake + Wayne Schuller + Thomas Vill + Fred Bacon + JBadger + Frank Altpeter + Matthew J. Lockner + Larry Harriman + Juan Carlos Valero + Nick Hill + Ali Akcaagac + Dan Clark + Peter L. Berghold + Vitaly Lipatov + Steve Saxon + Roman Kreisel + Steve Reppucci + Lionel CONS + Richard Lance + Anand Kumria + Alexandre Sauvé + Ironblade + Matthias Mailänder + Bernhard Walle + Stephen Hilliard + Alessandro Zummo + Herbert Straub + Dennis Böckmann + Anon + D. Leitner + Georg Ostertag + Manuel Siggen + David Huber + Harald Welte + Richard Rothwell + Gernot Hassenpflug + Pau Ruŀlan Ferragut + Richard Hurt + Phil Endecott + Koen Wybo + Mark Moeller + Bertus W. + Oliver Friedrich + + +And many others for their many helpful suggestions and bug reports -- thanks. diff --git a/COPYING b/COPYING new file mode 100644 index 00000000..94a9ed02 --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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 Lesser General +Public License instead of this License. But first, please read +. diff --git a/COPYING-DOCS b/COPYING-DOCS new file mode 100644 index 00000000..b42936be --- /dev/null +++ b/COPYING-DOCS @@ -0,0 +1,355 @@ + GNU Free Documentation License + Version 1.1, March 2000 + + Copyright (C) 2000 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. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML produced by some word processors for output +purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document 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. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation 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. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/COPYING-LIBGLABELS b/COPYING-LIBGLABELS new file mode 100644 index 00000000..cca7fc27 --- /dev/null +++ b/COPYING-LIBGLABELS @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser 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 +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/COPYING-TEMPLATES b/COPYING-TEMPLATES new file mode 100644 index 00000000..c25b8263 --- /dev/null +++ b/COPYING-TEMPLATES @@ -0,0 +1,25 @@ +This license applies to the glabels template database, located +in the "templates" subdirectory of the glabels distribution. + +Copyright (c) 2001-2009 Jim Evins + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/COPYING.README_FIRST b/COPYING.README_FIRST new file mode 100644 index 00000000..a864012e --- /dev/null +++ b/COPYING.README_FIRST @@ -0,0 +1,50 @@ +The gLabels official distribution is an aggregate of several components. +Each component is licensed as follows + + +GLABELS: + + The gLabels application core, and other portions of the official gLabels + distribution not explicitly licensed otherwise, are licensed under + the GNU GENERAL PUBLIC LICENSE (GPL); either version 3 of the License, or + (at your option) any later version -- see the 'COPYING' file in this + directory for details. + + +LIBGLABELS: + + The libglabels library, located in the "libglabels/" subdirectory, is + licensed under the GNU LESSER GENERAL PUBLIC LICENSE (LGPL); either + version 3 of the License, or (at your option) any later version -- see + the 'COPYING-LIBGLABELS' in this directory for details. + + +DOCUMENTATION: + + The gLabels and libglabels documentation, located in the "docs/" and "help/" + subdirectories, is licensed under the GNU FREE DOCUMENTATION LICENSE (GFDL) + with no Invariant Sections; either version 1.1 or (at your option) any + later version -- see 'COPYING-DOCS' in this directory for details. + + +TEMPLATE DATABASE: + + The XML files in the "templates/" subdirectory constitute the glabels + label database. No copyright is claimed on the facts contained within + the database. However, to clear up any ambiguity, the files themselves + are licensed using the MIT/X license -- see 'COPYING-TEMPLATES' in this + directory for details. + + +3RD PARTY COMPONENTS: + + The "barcode-0.98/" and "iec16022-0.2.1/" subdirectories contain 3rd party + libraries, each licensed under the GNU GENERAL PUBLIC LICENSE (GPL); either + version 2 of the License, or (at your option) any later version -- see the + 'LICENSE' or 'COPYING' file in each of these directories for details. + + The "qrencode-3.1.0/" subdirectory contains a 3rd party library, it is + licensed under the GNU LESSER GENERAL PUBLIC LICENSE (LGPL); either + version 2.1 of the License, or (at your option) any later version -- see the + 'COPYING' file in this subdirectory for details. + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..694c9692 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,5263 @@ +2009-09-22 Jim Evins + + * po/POTFILES.in: + * src/Makefile.am: + * src/builder-util.c: + * src/builder-util.h: + * src/combo-util.c: + * src/combo-util.h: + * src/file-util.c: + * src/file-util.h: + * src/str-util.c: + * src/str-util.h: + Split "catch all" util module into separate modules for different + domains of utilities. + * src/file.c: (gl_file_open_real), (save_as_response): + * src/glabels-batch.c: (main): + * src/label.c: (gl_label_get_short_name): + * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init), + (gl_merge_properties_dialog_construct): + * src/new-label-dialog.c: + * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page), + (gl_object_editor_set_bc_style), (gl_object_editor_set_bc_color): + * src/object-editor-data-page.c: + (gl_object_editor_prepare_data_page), (gl_object_editor_set_data): + * src/object-editor-edit-page.c: + (gl_object_editor_prepare_edit_page): + * src/object-editor-fill-page.c: + (gl_object_editor_prepare_fill_page), + (gl_object_editor_set_fill_color): + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page), + (gl_object_editor_set_image): + * src/object-editor-line-page.c: + (gl_object_editor_prepare_line_page), + (gl_object_editor_set_line_color): + * src/object-editor-lsize-page.c: + (gl_object_editor_prepare_lsize_page): + * src/object-editor-position-page.c: + (gl_object_editor_prepare_position_page): + * src/object-editor-shadow-page.c: + (gl_object_editor_prepare_shadow_page), + (gl_object_editor_set_shadow_color): + * src/object-editor-size-page.c: + (gl_object_editor_prepare_size_page): + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page), + (gl_object_editor_set_text_color): + * src/object-editor.c: (gl_object_editor_init), + (gl_object_editor_set_key_names): + * src/prefs-dialog.c: (gl_prefs_dialog_construct), + (construct_locale_page), (construct_object_page): + * src/prefs-model.c: (gl_prefs_model_save_settings), + (gl_prefs_model_load_settings): + * src/print-op-dialog.c: (create_custom_widget_cb): + * src/template-designer.c: (construct_start_page), + (construct_name_page), (construct_pg_size_page), + (construct_shape_page), (construct_rect_size_page), + (construct_round_size_page), (construct_cd_size_page), + (construct_nlayouts_page), (construct_layout_page), + (construct_finish_page): + * src/ui-property-bar.c: (gl_ui_property_bar_construct): + * src/wdgt-media-select.c: (gl_wdgt_media_select_construct), + (gl_wdgt_media_select_set_filter_parameters), + (get_label_size_desc): + * src/window.c: (gl_window_new_from_file): + * src/xml-label-04.c: (xml04_parse_text_props): + * src/xml-label.c: (xml_parse_object_text), + (xml_parse_toplevel_span), (xml_create_object_text), + (xml_create_toplevel_span): + Reconciled all references to old utils module with new domain + specific utilities modules. + +2009-09-22 Jim Evins + + * po/POTFILES.in: + Include all (src/*.[ch]) source files. + * data/builder/merge-properties-dialog.builder: + * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init), + (gl_merge_properties_dialog_construct), (type_changed_cb): + - OK button now has default focus. + - Some formatting cleanup. + +2009-09-21 Jim Evins + + * po/POTFILES.in: + * data/builder/Makefile.am: + * data/builder/new-label-dialog.builder: + Removed trivial builder file for new label dialog. + * data/builder/wdgt-media-select.builder: + Changed focus behavior of widgets. + * src/new-label-dialog.c: (gl_new_label_dialog_init), + (gl_new_label_dialog_construct): + - Removed use of trivial builder file -- populate explicitely. + - Moved population code to init. + - OK button now has default focus. + - Some formatting cleanup. + +2009-09-19 Jim Evins + + * COPYING: + Updated to GPL3 text. + * COPYING-LIBGLABELS: + Updated to LGPL3 text. + * COPYING-TEMPLATES: + New MIT/X license file for templates subdirectory. + * COPYING.README_FIRST: + Updated licensing information. + * templates/Makefile.am: + * templates/avery-iso-templates.xml: + * templates/avery-other-templates.xml: + * templates/avery-us-templates.xml: + * templates/brother-other-templates.xml: + * templates/categories.xml: + * templates/dymo-other-templates.xml: + * templates/glabels-2.2.dtd: + * templates/misc-iso-templates.xml: + * templates/misc-other-templates.xml: + * templates/misc-us-templates.xml: + * templates/paper-sizes.xml: + * templates/zweckform-iso-templates.xml: + - Added MIT/X license notice to database files. + - Moved from data subdirectory. + * configure.in: + * po/POTFILES.in: + * Makefile.am: + * data/Makefile.am: + Updated to reflect above move. + +2009-09-19 Jim Evins + + * libglabels/category.c: + * libglabels/category.h: + * libglabels/db.c: + * libglabels/db.h: + * libglabels/enums.h: + * libglabels/libglabels-private.h: + * libglabels/libglabels.h: + * libglabels/paper.c: + * libglabels/paper.h: + * libglabels/str.c: + * libglabels/str.h: + * libglabels/template.c: + * libglabels/template.h: + * libglabels/xml-category.c: + * libglabels/xml-category.h: + * libglabels/xml-paper.c: + * libglabels/xml-paper.h: + * libglabels/xml-template.c: + * libglabels/xml-template.h: + * libglabels/xml.c: + * libglabels/xml.h: + - Cleaned up GTK/GLIB includes. + - Updated license notification to LGPL3+. + +2009-09-18 Jim Evins + + * po/POTFILES.in: + Added missing file. + * src/mini-preview.h: + * src/mini-preview.c: (gl_mini_preview_class_init), + (gl_mini_preview_finalize), (gl_mini_preview_set_by_name), + (gl_mini_preview_highlight_range), (gl_mini_preview_set_label), + (gl_mini_preview_set_page), (gl_mini_preview_set_n_sheets), + (gl_mini_preview_set_n_copies), (gl_mini_preview_set_first), + (gl_mini_preview_set_last), (gl_mini_preview_set_collate_flag), + (gl_mini_preview_set_outline_flag), + (gl_mini_preview_set_reverse_flag), + (gl_mini_preview_set_crop_marks_flag), (button_release_event_cb), + (expose_event_cb), (redraw), (draw), (draw_labels), + (draw_rich_preview): + Added rich preview capability to mini preview. + * src/print-op-dialog.c: (create_custom_widget_cb), + (simple_sheets_radio_cb), (simple_first_spin_cb), + (simple_last_spin_cb), (preview_pressed_cb), (preview_released_cb), + (merge_spin_cb), (merge_collate_check_cb), (preview_clicked_cb), + (option_toggled_cb): + Use new rich preview capability of mini preview in print dialog. + +2009-09-17 Jim Evins + + * src/stock.c: (add_icons), (add_button_icon): + Use proper free function for GtkIconSource (gtk_icon_source_free() not g_free()). + Patch provided by Christian Persch . + +2009-09-17 Jim Evins + + * libglabels/category.h: + * libglabels/db.h: + * libglabels/paper.h: + * libglabels/template.h: + * libglabels/xml-category.h: + * libglabels/xml-paper.h: + * libglabels/xml.h: + Cleaned up GTK/GLIB includes. + * src/bc-gnubarcode.c: + * src/bc-gnubarcode.h: + * src/bc-iec16022.c: + * src/bc-iec16022.h: + * src/bc-iec18004.c: + * src/bc-iec18004.h: + * src/bc-postnet.c: + * src/bc-postnet.h: + * src/bc.c: + * src/bc.h: + * src/cairo-ellipse-path.c: + * src/cairo-ellipse-path.h: + * src/cairo-label-path.c: + * src/cairo-label-path.h: + * src/cairo-markup-path.c: + * src/cairo-markup-path.h: + * src/color-combo-button.c: + * src/color-combo-button.h: + * src/color-combo-color-menu-item.c: + * src/color-combo-color-menu-item.h: + * src/color-combo-history.c: + * src/color-combo-menu.c: + * src/color-combo-menu.h: + * src/color-combo.c: + * src/color-combo.h: + * src/color-swatch.c: + * src/color-swatch.h: + * src/color.c: + * src/color.h: + * src/critical-error-handler.c: + * src/critical-error-handler.h: + * src/debug.c: + * src/debug.h: + * src/file.c: + * src/file.h: + * src/font-combo-menu-item.c: + * src/font-combo-menu-item.h: + * src/font-combo-menu.c: + * src/font-combo-menu.h: + * src/font-combo.c: + * src/font-combo.h: + * src/font-sample.h: + * src/font-util.c: + * src/font-util.h: + * src/glabels-batch.c: + * src/glabels.c: + * src/hig.h: + * src/label-barcode.c: + * src/label-barcode.h: + * src/label-box.c: + * src/label-box.h: + * src/label-ellipse.c: + * src/label-ellipse.h: + * src/label-image.c: + * src/label-image.h: + * src/label-line.c: + * src/label-line.h: + * src/label-object.c: + * src/label-object.h: + * src/label-text.c: + * src/label-text.h: + * src/label.c: + * src/label.h: + * src/merge-evolution.c: + * src/merge-evolution.h: + * src/merge-init.c: + * src/merge-init.h: + * src/merge-properties-dialog.c: + * src/merge-properties-dialog.h: + * src/merge-text.c: + * src/merge-text.h: + * src/merge-vcard.c: + * src/merge-vcard.h: + * src/merge.c: + * src/merge.h: + * src/mini-label-preview.c: + * src/mini-label-preview.h: + * src/mini-preview-pixbuf-cache.c: + * src/mini-preview-pixbuf-cache.h: + * src/mini-preview-pixbuf.c: + * src/mini-preview-pixbuf.h: + * src/mini-preview.c: + * src/new-label-dialog.c: + * src/new-label-dialog.h: + * src/object-editor-bc-page.c: + * src/object-editor-data-page.c: + * src/object-editor-fill-page.c: + * src/object-editor-image-page.c: + * src/object-editor-line-page.c: + * src/object-editor-lsize-page.c: + * src/object-editor-position-page.c: + * src/object-editor-private.h: + * src/object-editor-shadow-page.c: + * src/object-editor-size-page.c: + * src/object-editor-text-page.c: + * src/object-editor.c: + * src/object-editor.h: + * src/pixbuf-cache.c: + * src/pixbuf-cache.h: + * src/prefs-dialog.c: + * src/prefs-dialog.h: + * src/prefs-model.c: + * src/prefs-model.h: + * src/prefs.c: + * src/prefs.h: + * src/print-op-dialog.c: + * src/print-op.c: + * src/print-op.h: + * src/print.c: + * src/print.h: + * src/recent.c: + * src/recent.h: + * src/rotate-label-button.c: + * src/rotate-label-button.h: + * src/stock.c: + * src/stock.h: + * src/template-designer.c: + * src/template-designer.h: + * src/text-node.c: + * src/text-node.h: + * src/ui-commands.c: + * src/ui-commands.h: + * src/ui-property-bar.c: + * src/ui-property-bar.h: + * src/ui-sidebar.c: + * src/ui-sidebar.h: + * src/ui-util.c: + * src/ui-util.h: + * src/ui.c: + * src/ui.h: + * src/util.c: + * src/util.h: + * src/view-barcode.c: + * src/view-barcode.h: + * src/view-box.c: + * src/view-box.h: + * src/view-ellipse.c: + * src/view-ellipse.h: + * src/view-image.c: + * src/view-image.h: + * src/view-line.c: + * src/view-line.h: + * src/view-object.c: + * src/view-object.h: + * src/view-text.c: + * src/view-text.h: + * src/view.c: + * src/view.h: + * src/warning-handler.c: + * src/warning-handler.h: + * src/wdgt-chain-button.c: + * src/wdgt-chain-button.h: + * src/wdgt-media-select.c: + * src/wdgt-media-select.h: + * src/wdgt-merge-menu.c: + * src/wdgt-merge-menu.h: + * src/window.c: + * src/window.h: + * src/xml-label-04.c: + * src/xml-label-04.h: + * src/xml-label.c: + * src/xml-label.h: + Cleaned up GTK/GLIB includes. + Updated remainder of notices to GPL3+. + Simple formatting cleanup. + +2009-09-13 Jim Evins + + Refactored print operation subsystem. + + * src/print-op.c: + * src/print-op.h: + Basic GtkPrintOperation based class. Does not instantiate + custom widgets, so it can be used by glabels-batch without + the additional overhead. + * src/print-op-dialog.c: + * src/print-op-dialog.h: + New object derived from glPrintOp. This one is intended + to be used as a dialog and installs custom widgets. + glWdgtPrintCopies and glWdgtPrintMerge have been merged + into this object. + * src/wdgt-print-copies.c: + * src/wdgt-print-copies.h: + * src/wdgt-print-merge.c: + * src/wdgt-print-merge.h: + Deleted. + * src/Makefile.am: + Modified to reflect above additions and deletions. + * src/mini-preview.c: (gl_mini_preview_construct), + (gl_mini_preview_set_template), (set_transform_and_get_scale), + (button_press_event_cb), (motion_notify_event_cb), (draw): + Now scales with allocation. + * src/glabels-batch.c: (main): + * src/template-designer.c: (print_test_cb): + * src/ui-commands.c: (gl_ui_cmd_file_print): + Use above modifications. + * data/builder/print-op-dialog-custom-widget.builder: + New builder file for glPrintOpDialog custom widgets. + * data/builder/print-custom-widget.builder: + Deleted. + * data/builder/Makefile.am: + Modified to reflect above addition and deletion. + +2009-09-10 Jim Evins + + * src/Makefile.am: + * src/mini-label-preview.c: + * src/mini-label-preview.h: + Created new glMiniLabelPreview widget to support glRotateLabelButton. + * src/rotate-label-button.c: + * src/rotate-label-button.h: + Renamed glWdgtRotateLabel to glRotateLabelButton. + * src/new-label-dialog.c: (gl_new_label_dialog_construct), + (template_changed_cb), (gl_new_label_dialog_get_rotate_state), + (gl_new_label_dialog_set_rotate_state): + Propogated above renaming. + * src/mini-preview.c: (gl_mini_preview_set_template), (draw), + (draw_shadow), (draw_paper), (draw_labels): + Use GtkStyle for colors instead of hardcoded ones. + +2009-09-09 Jim Evins + + * configure.in: + * Makefile.am: + * src/Makefile.am: + * src/stock-pixmaps/Makefile.am: + * qrencode-3.1.0/Makefile.am + * data/desktop/glabels.desktop.in: + * docs/libglabels/libglabels-decl-list.txt: + Various build system fixes and cleanup. + +2009-09-08 Jim Evins + + * src/font-util.c: (gl_font_util_validate_family): + * src/font-util.h: + Added gl_font_util_validate_family(). + * src/font-combo.c: (gl_font_combo_class_init), + (gl_font_combo_new), (gl_font_combo_set_family): + Use gl_font_util_validate_family() when setting family. + * src/label-text.c: (set_font_family): + * src/prefs-dialog.c: (construct_object_page), + (update_object_page_from_prefs): + * src/ui-property-bar.c: (gl_ui_property_bar_construct), + (reset_to_default_properties): + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page), + (gl_object_editor_set_font_family): + Removed code obsoleted by the addition of gl_font_util_validate_family(). + * src/color-swatch.c: (gl_color_swatch_class_init), (style_set_cb), + (draw_swatch): + * src/font-sample.c: (gl_font_sample_class_init), (style_set_cb), + (draw_sample): + Added handler for style_set event. + * src/color-combo-button.c: (gl_color_combo_button_class_init): + * src/color-combo-color-menu-item.c: + (gl_color_combo_color_menu_item_class_init): + * src/color-combo-history.c: (gl_color_combo_history_class_init): + * src/color-combo-menu.c: (map_event_cb): + * src/color-combo.c: (gl_color_combo_class_init), + (gl_color_combo_new): + * src/font-combo-menu-item.c: (gl_font_combo_menu_item_class_init): + * src/font-combo-menu.c: (gl_font_combo_menu_class_init): + * src/wdgt-rotate-label.c: (create_pixbuf): + Various cleanups -- mostly removing unused variables. + +2009-09-07 Jim Evins + + Created new glFontCombo widget family subsystem + minor refinements to glColorCombo + widget family. + + * src/color-combo-button.c: + * src/color-combo-button.h: + Renamed ColorButton to ColorComboButton. + * src/color.h: + Added GL_COLOR_WHITE macro. + * src/color-combo.c: (gl_color_combo_init): + Minor cleanup. + * src/Makefile.am: + * src/font-combo.c: + * src/font-combo.h: + * src/font-combo-menu.c: + * src/font-combo-menu.h: + * src/font-combo-menu-item.c: + * src/font-combo-menu-item.h: + * src/font-sample.c: + * src/font-sample.h: + * src/font-util.c: + * src/font-util.h: + New FontCombo subsystem. + * src/util.c: + * src/util.h: + Moved font functions to font-util.[ch]. + * data/builder/object-editor.builder: + * data/builder/prefs-dialog.builder: + * data/builder/property-bar.builder: + * src/label-text.c: (set_font_family): + * src/object-editor-private.h: + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page), + (gl_object_editor_set_font_family), + (gl_object_editor_get_font_family): + * src/prefs-dialog.c: (construct_object_page), + (update_object_page_from_prefs), (update_prefs_from_object_page): + * src/ui-property-bar.c: (gl_ui_property_bar_construct), + (reset_to_default_properties), (update_text_properties), + (update_fill_color), (update_line_color), (font_family_changed_cb), + (text_color_changed_cb), (fill_color_changed_cb), + (line_color_changed_cb): + Incorporated new FontCombo subsystem. + * po/POTFILES.in: + Reconciled with above changes/additions. + +2009-09-06 Jim Evins + + * src/color-button.c: (gl_color_button_finalize): + Unreference menu in finalize. + +2009-09-06 Jim Evins + + Some major refinements to the glColorCombo family of widgets. + + * src/Makefile.am: + * src/color-button.c: + * src/color-button.h: + New widget: glColorButton. This widget is a button that applies + the currently selected color with a ColorCombo type dropdown button + to change that selected color. This is basically the old + glColorCombo widget. + * src/color-combo.c: (gl_color_combo_init), + (gl_color_combo_finalize), (gl_color_combo_new), + (button_press_event_cb), (menu_color_changed_cb), + (menu_selection_done_cb): + * src/color-combo.h: + The glColorCombo widget has been modified to be a single button + that is only used to change the selected color. + * src/color-swatch.c: (gl_color_swatch_init), (expose_event_cb): + Draw on parent containers window to allow an effective + transparency. + * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page): + * src/object-editor-fill-page.c: + (gl_object_editor_prepare_fill_page): + * src/object-editor-line-page.c: + (gl_object_editor_prepare_line_page): + * src/object-editor-shadow-page.c: + (gl_object_editor_prepare_shadow_page): + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page): + * src/prefs-dialog.c: (construct_object_page): + Change how ColorCombos are packed so that they don't + expand to fill hbox. + * src/ui-property-bar.c: (gl_ui_property_bar_construct), + (reset_to_default_properties), (update_text_properties), + (update_fill_color), (update_line_color), (text_color_changed_cb), + (fill_color_changed_cb), (line_color_changed_cb), + (set_doc_items_sensitive), (set_text_items_sensitive), + (set_fill_items_sensitive), (set_line_color_items_sensitive): + The property bar now uses the new glColorButton instead of + glColorCombo. + +2009-09-02 Jim Evins + + * src/Makefile.am: + * src/wdgt-mini-preview.c: + * src/wdgt-mini-preview.h: + * src/mini-preview.h: + * src/mini-preview.c: + - Renamed WdgtMiniPreview to MiniPreview. + - Style cleanup. + - Modified to draw to parent window to be effectively transparent. + - Updated license notification to gpl3+. + * src/template-designer.c: (construct_layout_page), + (layout_page_prepare_cb), (layout_page_changed_cb): + * src/wdgt-print-copies.c: (gl_wdgt_print_copies_construct), + (sheets_radio_cb), (first_spin_cb), (last_spin_cb), + (preview_pressed): + * src/wdgt-print-merge.c: (gl_wdgt_print_merge_construct), + (spin_cb), (preview_clicked), (gl_wdgt_print_merge_set_copies): + - Reconciled with rename above. + +2009-09-01 Jim Evins + + * data/builder/object-editor.builder: + Fixed errant expansion of tab. + * src/bc-gnubarcode.c: (gl_barcode_gnubarcode_new): + * src/bc-postnet.c: (gl_barcode_postnet_new): + * src/bc.c: (id_to_index), (name_to_index): + * src/label-barcode.c: (gl_label_barcode_set_props): + * src/label-text.c: (set_font_family): + * src/merge-properties-dialog.c: + (gl_merge_properties_dialog_construct): + * src/merge.c: (gl_merge_description_to_name): + * src/new-label-dialog.c: + * src/object-editor-edit-page.c: + * src/object-editor-image-page.c: (update_preview_cb): + * src/object-editor-lsize-page.c: + * src/object-editor-position-page.c: + * src/object-editor-size-page.c: + * src/object-editor.c: (gl_object_editor_new): + * src/prefs-dialog.c: (update_locale_page_from_prefs): + * src/prefs-model.c: (string_to_units): + * src/print-op.c: (create_custom_widget_cb): + * src/template-designer.c: (gl_template_designer_init), + (pg_size_page_changed_cb), (build_template): + * src/ui-commands.c: (gl_ui_cmd_help_about): + * src/xml-label.c: (xml_parse_pixdata): + Fixed various deprecations as of Gtk-2.16. + +2009-08-31 Jim Evins + + * po/fr.po: + Updated french translation (Claude Paroz) + +2009-08-31 Jim Evins + + * data/builder/property-bar.builder: + Make sure event box does not obscure tool bar background. + * src/Makefile.am: + * src/color-swatch.c: + * src/color-swatch.h: + New color swatch widget. + * src/color-combo-color-menu-item.c: + (gl_color_combo_color_menu_item_init), + (gl_color_combo_color_menu_item_new), + (gl_color_combo_color_menu_item_set_color): + * src/color-combo.c: (gl_color_combo_init), + (gl_color_combo_finalize), (gl_color_combo_new), + (gl_color_combo_set_color), (menu_color_changed_cb): + Updated to use new color swatch widget. + +2009-08-26 Jim Evins + + * po/POTFILES.in: + Explicitely mark file types. Removed unneeded file from + libbarcode. + +2009-08-23 Jim Evins + + * data/builder/Makefile.am: + * data/builder/merge-properties-dialog.builder: + * data/builder/merge-properties-dialog.glade: + * data/builder/new-label-dialog.builder: + * data/builder/new-label-dialog.glade: + * data/builder/object-editor.builder: + * data/builder/object-editor.glade: + * data/builder/prefs-dialog.builder: + * data/builder/prefs-dialog.glade: + * data/builder/print-custom-widget.builder: + * data/builder/print-custom-widget.glade: + * data/builder/property-bar.builder: + * data/builder/property-bar.glade: + * data/builder/template-designer.builder: + * data/builder/template-designer.glade: + * data/builder/wdgt-media-select.builder: + * data/builder/wdgt-media-select.glade: + * po/POTFILES.in: + * src/merge-properties-dialog.c: + (gl_merge_properties_dialog_finalize), + (gl_merge_properties_dialog_construct): + * src/new-label-dialog.c: (gl_new_label_dialog_finalize), + (gl_new_label_dialog_construct): + * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page): + * src/object-editor-data-page.c: + (gl_object_editor_prepare_data_page): + * src/object-editor-edit-page.c: + (gl_object_editor_prepare_edit_page): + * src/object-editor-fill-page.c: + (gl_object_editor_prepare_fill_page): + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page): + * src/object-editor-line-page.c: + (gl_object_editor_prepare_line_page): + * src/object-editor-lsize-page.c: + (gl_object_editor_prepare_lsize_page): + * src/object-editor-position-page.c: + (gl_object_editor_prepare_position_page): + * src/object-editor-private.h: + * src/object-editor-shadow-page.c: + (gl_object_editor_prepare_shadow_page): + * src/object-editor-size-page.c: + (gl_object_editor_prepare_size_page): + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page): + * src/object-editor.c: (gl_object_editor_init), + (gl_object_editor_finalize): + * src/prefs-dialog.c: (gl_prefs_dialog_init), + (gl_prefs_dialog_finalize), (gl_prefs_dialog_construct), + (construct_locale_page), (construct_object_page): + * src/print-op.c: (gl_print_op_finalize), + (gl_print_op_set_settings), (create_custom_widget_cb): + * src/template-designer.c: (gl_template_designer_init), + (gl_template_designer_finalize), (construct_start_page), + (construct_name_page), (construct_pg_size_page), + (construct_shape_page), (construct_rect_size_page), + (construct_round_size_page), (construct_cd_size_page), + (construct_nlayouts_page), (construct_layout_page), + (construct_finish_page): + * src/ui-property-bar.c: (gl_ui_property_bar_finalize), + (gl_ui_property_bar_construct): + * src/wdgt-media-select.c: (gl_wdgt_media_select_finalize), + (gl_wdgt_media_select_construct): + Builder files no longer built from glade files. Also did some + cleanup on formatting and update license notifications to GPL3+. + +2009-08-13 Jim Evins + + * src/color-combo-color-menu-item.c: + (gl_color_combo_color_menu_item_init), + (gl_color_combo_color_menu_item_new), + (gl_color_combo_color_menu_item_set_color): + Explicitly request size of menu item and enlarge color swatch. + +2009-08-12 Jim Evins + + * src/label-text.c: (buffer_changed_cb), (draw_object), + (draw_shadow), (draw_text_real): + * src/label-text.h: + Moved common code from draw_object() and draw_shadow() to + draw_text_real(). Also cleaned up formatting and updated + license notification to GPL3+. + +2009-07-29 Alexandre Prokoudine + + * po/ru.po: Updated and fixed Russian translation + +2009-07-26 Jim Evins + + * AUTHORS: + * COPYING.README_FIRST: + * Makefile.am: + * configure.in: + * qrencode-3.1.0/* + Added 3rd party qrencode library. + * src/Makefile.am: + * src/bc-iec18004.c: (gl_barcode_iec18004_new), (render_iec18004): + * src/bc-iec18004.h: + * src/bc.c: + Added IEC18004 (QRCode) 2 dimensional barcode backend. + Patch provided by Daniel Mueller . + +2009-07-25 Jim Evins + + * src/xml-label.c: (gl_xml_label_open): + Relax limits when parsing file. Allows large embedded image + files. + +2009-05-19 Jim Evins + + * configure.in: + * po/LINGUAS: + Moved translation list from configure.in to po/LINGUAS. + +2009-05-19 Jim Evins + + * configure.in: + * po/zh_CN.po: + New Chinese translation (Careon ). + * AUTHORS: + Added above translation to acknowledgements. + +2009-05-18 Jim Evins + + * src/prefs-model.c: (gl_prefs_model_load_settings): + Make an educated guess at locale settings when run for the + first time. + +2009-05-17 Jim Evins + + * help/de/de.po: + * help/glabels.omf.in: + Adding missing files from last checkin. + +2009-05-17 Jim Evins + + * Makefile.am: + * configure.in: + * help/C/glabels-C.omf: + * help/C/glabels.xml: + * help/Makefile.am: + * po/de.po: + Updated german translation, gnome-doc-utils support and + german translation of glabels manual (Mario Blättermann). + +2009-05-01 Jim Evins + + * AUTHORS: + * configure.in: + * po/ca.po: + Added catalan translation (David Planella). + +2009-04-29 Jim Evins + + * data/templates/avery-iso-templates.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/misc-us-templates.xml: + Caught up on user submitted templates. + * AUTHORS: + Acknowledgements for above templates. + +2009-04-29 Jim Evins + + * po/POTFILES.in: + * po/de.po: + Updated german translation (Mario Blättermann). + +2009-03-23 Jim Evins + + * src/glabels-batch.c: (main): + * src/glabels.c: (main): + Tidy up help option output. + +2009-02-28 Jim Evins + + * src/Makefile.am: + * src/base64.c: + * src/base64.h: + Deleted base64 module. + * src/xml-label.c: (xml_parse_pixdata), (xml_create_pixdata): + Use base64 encode/decode from glib. + +2009-02-22 Jim Evins + + * src/merge-properties-dialog.h: + * src/new-label-dialog.h: + * src/object-editor.h: + * src/prefs-dialog.h: + * src/print-op.h: + * src/template-designer.h: + Corrected cut&paste errors. + +2009-02-21 JimEvins + + * src/prefs-model.c: (gl_prefs_model_save_settings), + (gl_prefs_model_load_settings): + * src/prefs-model.h: + * src/ui-commands.c: + * src/ui-property-bar.c: + * src/ui.c: (view_ui_item_toggled_cb), + (set_app_main_toolbar_style), (set_app_drawing_toolbar_style): + Removed tooltip toggling capability, which wasn't working + anyway. + +2009-02-21 JimEvins + + * README: + * configure.in: + * data/builder/object-editor.glade: + * data/builder/prefs-dialog.glade: + * data/builder/property-bar.glade: + * data/builder/template-designer.glade: + * gtk-doc.make: + * src/color-combo-color-menu-item.c: + * src/color-combo-color-menu-item.h: + * src/color-combo-menu.h: + * src/glabels-batch.c: (main): + * src/glabels.c: (main): + * src/merge-properties-dialog.h: + * src/new-label-dialog.h: + * src/object-editor-lsize-page.c: + (gl_object_editor_prepare_lsize_page), (lsize_prefs_changed_cb): + * src/object-editor.h: + * src/prefs-dialog.h: + * src/print-op.h: + * src/template-designer.h: + * src/ui-commands.c: (gl_ui_cmd_view_property_bar_tips_toggle), + (gl_ui_cmd_help_contents), (gl_ui_cmd_help_about): + * src/ui-property-bar.c: + * src/ui-property-bar.h: + * src/ui-sidebar.c: (gl_ui_sidebar_construct), + (selection_changed_cb): + * src/ui-sidebar.h: + * src/view.h: + * src/wdgt-media-select.h: + * src/wdgt-merge-menu.h: + * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_class_init): + * src/wdgt-mini-preview.h: + * src/wdgt-print-copies.c: (gl_wdgt_print_copies_construct): + * src/wdgt-print-copies.h: + * src/wdgt-print-merge.c: (gl_wdgt_print_merge_construct): + * src/wdgt-print-merge.h: + * src/wdgt-rotate-label.h: + * src/window.h: + Removed final dependencies on libgnome and libgnomeui. + Removed all currently deprecated symbols as of GTK 2.14. + +2009-01-07 Jim Evins + + * src/critical-error-handler.c: (critical_error_handler): + * src/ui-commands.c: (gl_ui_cmd_help_contents): + * src/warning-handler.c: (warning_handler): + * src/view.c: (selection_received_cb): + Compile without warning with additional CFLAGS of + -O1 -Wall -Wformat=2. + +2009-01-02 Jim Evins + + * COPYING.README_FIRST: + Fixed typo. + +2008-12-27 Jim Evins + + * data/templates/avery-iso-templates.xml: + * data/templates/avery-other-templates.xml: + * data/templates/avery-us-templates.xml: + * data/templates/brother-other-templates.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/misc-other-templates.xml: + * data/templates/zweckform-iso-templates.xml: + Make sure all descriptions are marked as translatable. + +2008-12-27 Jim Evins + + * de.po: + Updated german translation (Mario Blättermann) + * AUTHORS: + Updated credits to reflect above translation. + * data/builder/object-editor.glade: + * data/builder/prefs-dialog.glade: + * data/builder/template-designer.glade: + Removed "translatable" attribute from whitespace strings, + which are used only to help layout. + +2008-12-21 Jim Evins + + * data/templates/avery-us-templates.xml: + * data/templates/misc-iso-templates.xml: + A couple of recent template submissions. + * AUTHORS: + Acknowledgements for above templates. + +2008-12-21 Jim Evins + + * src/view.c: (motion_notify_event_cb), (button_press_event_cb): + Don't check for handles on aggregate selections. + +2008-12-20 Jim Evins + + * configure.in: + Updated prerequisite library versions required. + +2008-12-18 Jim Evins + + * src/view.c: (selection_received_cb): + Fixed paste bug that caused a duplicate phantom view_object to be created for + each new label_object. This is because the view now (as of r673) the view + monitiors the label for new objects and creates view_objects automatically. + +2008-12-14 Jim Evins + + * src/ui.c: (gl_ui_new): + Bug #2395628. Fixed i18n for application shell. + * po/POTFILES.in: + Bug #2395628. Reconciled POTFILES.in with current files. + +2008-12-14 Jim Evins + + * configure.in: + Bug #2316013. Added PKG_PROG_PKG_CONFIG. + +2008-11-15 Jim Evins + + * libglabels/db.c: (lgl_db_register_template): + * libglabels/xml-template.c: + (lgl_xml_template_parse_template_node): + * src/glabels-batch.c: + * src/view-text.c: (gl_view_text_create_button_press_event): + Fixed several issues such as possible use of uninitialized variables found with "-O1 -Wall". + +2008-11-09 Jim Evins + + * data/templates/misc-iso-templates.xml: + Another user submitted template. + +2008-10-27 Jim Evins + + * data/templates/avery-us-templates.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/zweckform-iso-templates.xml: + Caught up on user submitted templates. + * AUTHORS: + Acknowledgements for above templates. + +2008-10-23 Jim Evins + + * src/label-text.c: (set_font_family): + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page), + (gl_object_editor_set_font_family): + * src/prefs-dialog.c: (construct_object_page), + (update_object_page_from_prefs): + * src/ui-property-bar.c: (gl_ui_property_bar_construct), + (reset_to_default_properties): + * src/util.c: (gl_util_get_font_family_list): + * src/util.h: + Bug #1902275 and Bug #2186214. Cache font list so that it is not re-created + everytime the list is requested. + * src/object-editor-text-page.c: + (gl_object_editor_set_font_family): + Don't change font-family if it hasn't actually changed. + +2008-10-19 Jim Evins + + * data/builder/object-editor.glade: + Some tweaking of builder/glade widgets. + +2008-10-18 Jim Evins + + Migrated all use of libglade to GtkBuilder. + + * data/glade/Makefile.am: + * data/glade/merge-properties-dialog.glade: + * data/glade/new-label-dialog.glade: + * data/glade/object-editor.glade: + * data/glade/prefs-dialog.glade: + * data/glade/print-custom-widget.glade: + * data/glade/property-bar.glade: + * data/glade/template-designer.glade: + * data/glade/wdgt-media-select.glade: + Removed data/glade directory. + * data/builder/Makefile.am: + * data/builder/merge-properties-dialog.glade: + * data/builder/new-label-dialog.glade: + * data/builder/object-editor.glade: + * data/builder/prefs-dialog.glade: + * data/builder/print-custom-widget.glade: + * data/builder/property-bar.glade: + * data/builder/template-designer.glade: + * data/builder/wdgt-media-select.glade: + Added data/builder directory. + * configure.in: + * data/Makefile.am: + * src/Makefile.am: + Change glade to builder. + * src/merge-properties-dialog.c: + (gl_merge_properties_dialog_finalize), + (gl_merge_properties_dialog_construct): + * src/new-label-dialog.c: (gl_new_label_dialog_finalize), + (gl_new_label_dialog_construct): + * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page): + * src/object-editor-data-page.c: + (gl_object_editor_prepare_data_page): + * src/object-editor-edit-page.c: + (gl_object_editor_prepare_edit_page): + * src/object-editor-fill-page.c: + (gl_object_editor_prepare_fill_page): + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page): + * src/object-editor-line-page.c: + (gl_object_editor_prepare_line_page): + * src/object-editor-lsize-page.c: + (gl_object_editor_prepare_lsize_page): + * src/object-editor-position-page.c: + (gl_object_editor_prepare_position_page): + * src/object-editor-private.h: + * src/object-editor-shadow-page.c: + (gl_object_editor_prepare_shadow_page): + * src/object-editor-size-page.c: + (gl_object_editor_prepare_size_page): + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page): + * src/object-editor.c: (gl_object_editor_init): + * src/prefs-dialog.c: (gl_prefs_dialog_init), + (gl_prefs_dialog_construct), (construct_locale_page), + (construct_object_page): + * src/print-op.c: (gl_print_op_finalize), + (create_custom_widget_cb): + * src/template-designer.c: (gl_template_designer_class_init), + (gl_template_designer_finalize), (gl_template_designer_construct), + (construct_start_page), (construct_name_page), + (construct_pg_size_page), (construct_shape_page), + (construct_rect_size_page), (construct_round_size_page), + (construct_cd_size_page), (construct_nlayouts_page), + (construct_layout_page), (construct_finish_page): + * src/template-designer.h: + * src/ui-property-bar.c: (gl_ui_property_bar_init), + (gl_ui_property_bar_finalize), (gl_ui_property_bar_new), + (gl_ui_property_bar_construct), (reset_to_default_properties), + (gl_ui_property_bar_set_view), (gl_ui_property_bar_set_tooltips), + (update_text_properties), (update_fill_color), (update_line_color), + (update_line_width), (selection_changed_cb), + (font_family_changed_cb), (font_size_changed_cb), + (text_color_changed_cb), (fill_color_changed_cb), + (line_color_changed_cb), (line_width_changed_cb), + (font_bold_toggled_cb), (font_italic_toggled_cb), + (text_align_toggled_cb), (set_doc_items_sensitive), + (set_text_items_sensitive), (set_fill_items_sensitive), + (set_line_color_items_sensitive), (set_line_width_items_sensitive): + * src/ui-property-bar.h: + * src/util.c: (gl_util_get_builder_widgets): + * src/util.h: + * src/wdgt-media-select.c: (gl_wdgt_media_select_finalize), + (gl_wdgt_media_select_construct): + Migration of glade to builder. + * src/color.h: + New macros for color combo initialization. + * TODO: + Added idea for internal merge database. + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/paper.sgml: + * gtk-doc.make: + Automagic. + +2008-10-12 Jim Evins + + * src/mygal/Makefile.am: + * src/mygal/color-group.c: + * src/mygal/color-group.h: + * src/mygal/color-palette.c: + * src/mygal/color-palette.h: + * src/mygal/e-colors.c: + * src/mygal/e-colors.h: + * src/mygal/e-marshal.list: + * src/mygal/e-util.h: + * src/mygal/mygal-combo-box.c: + * src/mygal/mygal-combo-box.h: + * src/mygal/widget-color-combo.c: + * src/mygal/widget-color-combo.h: + * AUTHORS: + * configure.in: + Deleted mygal. + * src/color-combo.c: + * src/color-combo.h: + * src/color-combo-color-menu-item.c: + * src/color-combo-color-menu-item.h: + * src/color-combo-history.c: + * src/color-combo-history.h: + * src/color-combo-menu.c: + * src/color-combo-menu.h: + * src/marshal.list: + * src/util.c: + * src/util.h: + * src/Makefile.am: + Created new glColorCombo widget. + * src/object-editor-bc-page.c: + * src/object-editor-edit-page.c: + * src/object-editor-fill-page.c: + * src/object-editor-line-page.c: + * src/object-editor-shadow-page.c: + * src/object-editor-text-page.c: + * src/object-editor.c: + * src/prefs-dialog.c: + * src/ui-property-bar.c: + Replaced use of mygal color combo with new glColorCombo widget. + +2008-08-29 Jim Evins + + * src/file.c: (gl_file_open), (gl_file_save_as): + Bug #2069668. Corrected button order in Open and "Save as" + dialogs. + +2008-08-17 Jim Evins + + * data/dtd/glabels-2.2.dtd: + * data/templates/paper-sizes.xml: + * libglabels/db.c: (lgl_db_init): + * libglabels/paper.c: (lgl_paper_new), (lgl_paper_dup), (lgl_paper_free): + * libglabels/paper.h: + * libglabels/xml-paper.c: (lgl_xml_paper_parse_paper_node): + * src/print-op.c: (set_page_size): + Bug #2049431. Always explicitely set page size. Added pwg_size field (PWG 5101.1-2002 + size specification) to the libglabels paper database to allow the page size to be + communicated to GtkPrintOp un-ambiguously. + +2008-07-25 Jim Evins + + * src/object-editor-size-page.c: (size_reset_cb), + (gl_object_editor_set_max_size): + Bug #1993550. Set size limits based on longest side of label. + +2008-07-19 Jim Evins + + * configure.in: + * src/mygal/Makefile.am: + Make sure libtool handles library dependencies for mygal + properly. + +2008-05-21 Jim Evins + + * src/glabels-batch.c: (main): + Bug #1968653. Initialize prefs subsystem. + +2008-05-09 Jim Evins + + * data/glade/object-editor.glade: + Bug #1959135. A couple of radio buttons somehow became + ungrouped. + +2008-04-07 Jim Evins + + * src/wdgt-rotate-label.h: + * src/wdgt-rotate-label.c: (gl_wdgt_rotate_label_init), + (gl_wdgt_rotate_label_new), (toggled_cb), (create_pixbuf), + (gl_wdgt_rotate_label_get_state), (gl_wdgt_rotate_label_set_state), + (gl_wdgt_rotate_label_set_template_name): + Modified wdgt-rotate-label to better indicate the rotation choices. + * data/glade/Makefile.am: + * data/glade/wdgt-rotate-label.glade: + Deleted wdgt-rotate-label.glade. + +2008-04-04 Jim Evins + + * data/templates/brother-other-templates.xml: + Added categories to existing templates. + * data/templates/misc-other-templates.xml: + Moved dymo templates to their own file. + * data/templates/Makefile.am: + * data/templates/dymo-other-templates.xml: + Additional dymo templates provided by Harald Welte . + * AUTHORS: + Acknowledgement for above templates. + +2008-03-24 Jim Evins + + * src/xml-label.c: (xml_doc_to_label): + Bug #1872584. Don't refuse to parse label file if namespace is + unrecognized -- it may be from a newer version of glabels. + +2008-03-15 Jim Evins + + * data/templates/Makefile.am: + * data/templates/brother-other-templates.xml: + Added brother templates. + * src/cairo-markup-path.c: (gl_cairo_markup_margin_rect_path), + (gl_cairo_markup_margin_cd_path): + * src/view.c: (draw_markup_layer): + Fixed markup drawing errors when label is rotated. + +2008-03-03 Jim Evins + + * configure.in: + * ko.po: + Added korean translation provided by xein@naver.com. + +2008-02-21 Jim Evins + + * src/ui.c: + Fixed typo that prevented "Save" from being deactivated when + document is not modified. + +2008-02-18 Jim Evins + + * src/prefs-model.c: (gl_prefs_model_save_settings), + (gl_prefs_model_load_settings): + Set default units for file output. + +2008-02-18 Jim Evins + + * help/C/glabels.xml: + Fixed example template. + +2008-02-16 Jim Evins + + * AUTHORS: + * data/templates/avery-iso-templates.xml: + * data/templates/avery-us-templates.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/misc-us-templates.xml: + Caught up on user submitted templates. + +2008-02-04 Jim Evins + + * src/view-image.c: (update_object_from_editor_cb): + Bug #1886438. Don't update the image size unless it is actually + triggered by a change in image source. The result of this bug + was that any attempt to edit the size spinboxes, immediately + reset the size. + +2008-02-03 Jim Evins + + * src/label-image.c: (gl_label_image_class_init), (set_size): + Enforce minimum size for images. + +2008-02-03 Jim Evins + + * src/object-editor-edit-page.c: (field_selected_cb): + * src/object-editor-lsize-page.c: (gl_object_editor_set_max_lsize): + * src/object-editor-private.h: + * src/object-editor-shadow-page.c: + (gl_object_editor_set_max_shadow_offset): + * src/object-editor-size-page.c: (gl_object_editor_set_max_size): + * src/object-editor.c: (gl_object_editor_finalize), + (gl_object_editor_new), (gl_object_notebook_construct_valist), + (label_changed_cb): + * src/object-editor.h: + * src/ui-sidebar.c: (gl_ui_sidebar_construct): + * src/view-barcode.c: (construct_properties_editor): + * src/view-box.c: (construct_properties_editor): + * src/view-ellipse.c: (construct_properties_editor): + * src/view-image.c: (construct_properties_editor): + * src/view-line.c: (construct_properties_editor): + * src/view-object.c: (gl_view_object_finalize): + * src/view-text.c: (construct_properties_editor), + Move update_editor_from_label callback from individual view objects + to the object editor, so that signals can be disconnected when + object editor is finalized. + * src/view-text.c: (gl_view_text_create_button_press_event): + Fixed bug that caused multiple view objects to be created for a + single text object. This bug would manifest itself as a crash + when deleting multi-object selections which included text objects. + +2008-02-02 Jim Evins + + * src/Makefile.am: + * src/wdgt-merge-menu.c: + * src/wdgt-merge-menu.h: + * src/debug.c: (gl_debug_init): + * src/debug.h: + * src/marshal.list: + New merge menu widget. + * data/glade/object-editor.glade: + * src/object-editor-private.h: + * src/object-editor.c: (gl_object_editor_set_key_names): + * src/object-editor-edit-page.c: + (gl_object_editor_prepare_edit_page), (field_selected_cb), + (insert_button_cb): + Simplified UI for inserting fields into text objects by launching + a merge menu and directly inserting fields from the menu. No more + selecting field in combobox, then pressing insert button. + +2008-01-31 Jim Evins + + * src/label-barcode.c: (draw_object): + Fixed rendering problem when "Invalid data" is displayed when text + object is lower in stacking order. + +2008-01-30 Jim Evins + + * src/label-text.c: (get_size), (draw_object), (draw_shadow): + Don't turn off cairo_hint_metrics. This causes serious issues with + bitmap fonts. + +2008-01-29 Jim Evins + + * src/print-op.c: (gl_print_op_construct), + (gl_print_op_construct_batch), (set_page_size): + Explicitly set page size for "other" page sizes. + +2008-01-25 Jim Evins + + * src/bc.c: + Fixed Code128C backend parameters. + * src/label-barcode.c: (get_size): + Bug #1766425. If barcode is not renderable with either + input data or default data, use a default size. Also + fixed small leak. + +2008-01-16 Jim Evins + + * src/print.c: (print_label): + Bug #1872568. Don't apply special transforms (rotate and + mirror) to clipping region or outline. + +2008-01-01 Jim Evins + + * src/util.c: + Sort font lists alphabetically. + +2008-01-01 Jim Evins + + * src/merge-evolution.c: + Do a case-insensitive sort. + +2008-01-01 Jim Evins + + * src/merge-evolution.c: + Sort evolution by "file_under" field. Original patch provided + by Peter Cherriman in + Patch #1860423. + * AUTHORS: + Added acknowledgement for above patch. + +2008-01-01 Jim Evins + + * NEWS: + * configure.in: + * glabels.spec.in: + Reconcile with 2.2 branch. + + +2007-12-21 Jim Evins + + * COPYING.LIBGLABELS: + * COPYING.README_FIRST: + * README: + Updating license information to make more complete and understandable. + +2007-12-16 Jim Evins + + * configure.in: + Updated version to 2.pre2. + * help/C/glabels.xml: + Updated documentation. + * src/ui-commands.c: (gl_ui_cmd_help_about): + Updated copyright string. + +2007-12-15 Jim Evins + + * data/glade/object-editor.glade: + Removed any GtkTable that contained a GtkComboBox because the size of + the combo box was not constrained properly. This sacrifices the nice + orderly labels for combo boxes that don't extend beyond the edge of the + window. + +2007-12-15 Jim Evins + + * libglabels/db.c: (lgl_db_lookup_template_from_name): + * src/object-editor.c: (gl_object_editor_finalize): + * src/wdgt-media-select.c: (gl_wdgt_media_select_finalize): + Fixed several small memory leaks. + +2007-12-14 Jim Evins + + * libglabels/db.c: + Optimize template search by name by using a GHashTable. + * src/mini-preview-pixbuf-cache.c: + * src/mini-preview-pixbuf-cache.h: + Store one pixbuf per template, but use a key for each alias. + * src/wdgt-media-select.c: + Optimize loading of tree data, thus optimizing the "new label" dialog. + +2007-12-12 Jim Evins + + * data/templates/avery-us-templates.xml: + More templates and aliases. + +2007-12-08 Jim Evins + + * TODO: + More prep for 2.1.5/2.2.0. + +2007-12-08 Jim Evins + + * NEWS: + * README: + * TODO: + * configure.in: + Preparation for 2.1.5. + +2007-12-08 Jim Evins + + * docs/libglabels/libglabels-decl-list.txt: + * docs/libglabels/libglabels-docs.sgml: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/db.sgml: + * docs/libglabels/tmpl/str.sgml: + * libglabels/str.c: + Documentation cleanup for libglabels. + +2007-11-29 Jim Evins + + * libglabels/db.h: + * libglabels/db.c: + Added lgl_db_does_template_name_exist(). + In lgl_db_lookup_template_from_name() substitute brand/part of new template from + requested alias. + * src/prefs-model.c: + Proof read recent templates -- make sure they still exist. + * src/wdgt-media-select.c: + Default to "search all templates" tab if no recent templates found. + +2007-11-28 Jim Evins + + * data/glade/wdgt-media-select.glade: + * src/wdgt-media-select.c: + Added tabbed notebook to allow selection of recent template versus searching the + entire database. + + +2007-11-26 Jim Evins + + * libglabels/Makefile.am: + * libglabels/libglabels.h: + Make str.h public. + * src/label.c: + * src/prefs-dialog.c: + * src/prefs-model.c: + * src/prefs-model.h: + * src/prefs.c: + * src/prefs.h: + Added tracking of recently used templates. + +2007-11-20 Jim Evins + + * data/glade/template-designer.glade: + * src/template-designer.c: + Added warning icon when match brand and part match an existing template. + +2007-11-18 Jim Evins + + * libglabels/Makefile.am: + * libglabels/str.h: + * libglabels/str.c: + Added lgl_str_utf8_casecmp(). + * libglabels/libglabels-private.h: + Use lgl_str_utf8_casecmp() for UTF8_EQUAL macro -- do case insensitive comparisons. + * libglabels/db.c: (lgl_db_get_brand_list): + Use lgl_str_utf8_casecmp() to determine if we have seen brand before when building + brand list. + +2007-11-18 Jim Evins + + * data/glade/template-designer.glade: + * src/template-designer.c: + Don't advance past name page, if brand and part match an existing template. + +2007-11-18 Jim Evins + + * libglabels/db.c: (lgl_db_register_template), (read_templates): + When registering a new template, don't add to "User defined" category before + writing to file. Add to "User defined" category when reading from "~/.glabels" + directory instead. This will allow legacy templates (and manually created + templates) to be automatically added to the "user defined" category. + * libglabels/xml-template.c: + (lgl_xml_template_create_template_node): + Fixed typo/bug causing brand to be wrong. + +2007-11-16 Jim Evins + + * libglabels/db.c: + * libglabels/db.h: + Added return codes to lgl_db_register_template(). Added lgl_db_does_template_exist() + function. Automatically create "User defined" category and add to all user + registered templates. + * libglabels/xml-template.c: + * libglabels/xml-template.h: + Return number of bytes written from lgl_xml_template_write_templates_to_file() and + lgl_xml_template_write_template_to_file(). + * docs/libglabels/libglabels-decl-list.txt: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/db.sgml: + * docs/libglabels/tmpl/xml-template.sgml: + Update documentation to reflect above changes. + +2007-10-28 Jim Evins + + * libglabels/xml-template.c: + Remove any leading white space from part #s when parsing old names. + * src/mini-preview-pixbuf-cache.c: + If name isn't in cache add it. + +2007-10-26 Jim Evins + + * libglabels/Makefile.am: + * libglabels/category.c: + * libglabels/category.h: + * libglabels/db.c: + * libglabels/db.h: + * libglabels/libglabels-private.h: + * libglabels/libglabels.h: + * libglabels/paper.c: + * libglabels/paper.h: + * libglabels/template.c: + * libglabels/template.h: + * libglabels/xml-template.c: + Another pass at screwing with the libglabels API. Moved all + database related stuff to db.[ch]. + * docs/libglabels/libglabels-decl-list.txt: + * docs/libglabels/libglabels-docs.sgml: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/category.sgml: + * docs/libglabels/tmpl/db.sgml: + * docs/libglabels/tmpl/init.sgml: + * docs/libglabels/tmpl/libglabels-unused.sgml: + * docs/libglabels/tmpl/paper.sgml: + * docs/libglabels/tmpl/template-construction.sgml: + * docs/libglabels/tmpl/template-db.sgml: + * docs/libglabels/tmpl/template-misc.sgml: + * docs/libglabels/tmpl/template-struct.sgml: + * docs/libglabels/tmpl/template.sgml: + Updated documentation to reflect above changes to libglabels API. + * src/file.c: + * src/glabels-batch.c: + * src/glabels.c: + * src/mini-preview-pixbuf-cache.c: + * src/prefs-model.c: + * src/print.c: + * src/template-designer.c: + * src/wdgt-media-select.c: + * src/wdgt-mini-preview.c: + * src/wdgt-rotate-label.c: + * src/xml-label-04.c: + * src/xml-label.c: + Reconciled usage with above libglabels API changes. + +2007-10-21 Jim Evins + + * data/glade/wdgt-media-select.glade: + * src/wdgt-media-select.c: + Added brand to filter settings. + +2007-10-21 Jim Evins + + * data/dtd/glabels-2.2.dtd: + Forgot to replace Alias name attribute with brand and part attributes. + * data/templates/avery-iso-templates.xml: + * data/templates/avery-other-templates.xml: + * data/templates/avery-us-templates.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/misc-other-templates.xml: + * data/templates/misc-us-templates.xml: + * data/templates/zweckform-iso-templates.xml: + Replaced all name attributes with brand/part attribute pairs. + +2007-10-20 Jim Evins + + * src/stock-pixmaps/*.png + Updated icons to use Tango color palette. + +2007-10-20 Jim Evins + + * data/dtd/Makefile.am: + * data/dtd/glabels-2.0.dtd: + * data/dtd/glabels-2.2.dtd: + Rename glabels-2.0.dtd to glabels-2.2.dtd. Added brand and part attributes to + template node. + * libglabels/template.c: + * libglabels/template.h: + * libglabels/xml-template.c: + * libglabels/xml.h: + Added brand and part attributes to template and alias structures and nodes. + * src/file.c: + * src/label.c: + * src/mini-preview-pixbuf-cache.c: + * src/template-designer.c: + * src/wdgt-media-select.c: + Use modified libglabels API. + * docs/libglabels/libglabels-decl-list.txt: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/template-construction.sgml: + * docs/libglabels/tmpl/template-db.sgml: + * docs/libglabels/tmpl/template-struct.sgml: + Update libglabels documentation to reflect above modifications. + +2007-10-14 Jim Evins + + * docs/libglabels/libglabels-decl-list.txt: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/category.sgml: + * libglabels/category.c: + * libglabels/category.h: + Added lgl_category_get_id_list() and lgl_category_free_id_list() to have + parity with paper functions. + +2007-10-12 Jim Evins + + * docs/libglabels/libglabels-decl-list.txt: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/category.sgml: + * docs/libglabels/tmpl/enums.sgml: + * docs/libglabels/tmpl/libglabels-unused.sgml: + * docs/libglabels/tmpl/paper.sgml: + * docs/libglabels/tmpl/template-struct.sgml: + * libglabels/init.c: + * libglabels/template.c: + * libglabels/template.h: + Another pass at fleshing out the libglabels documentation. + * src/cairo-label-path.c: + * src/cairo-markup-path.c: + * src/label.c: + * src/mini-preview-pixbuf.c: + * src/print-op.c: + * src/print.c: + * src/view.c: + * src/wdgt-media-select.c: + * src/wdgt-mini-preview.c: + * src/wdgt-print-copies.c: + * src/wdgt-print-merge.c: + * src/wdgt-rotate-label.c: + Removed lgl_template_get_first_frame() from libglabels API and all references. + +2007-10-11 Jim Evins + * configure.in: + Extended checks for deprecated symbols. + * libglabels/template.c: + Removed g_strcasecmp references, which are deprecated. + +2007-10-09 Jim Evins + + * src/merge-evolution.c: + Create address book if it does not exist. Also, be more robust about handling + error conditions -- don't just assume GError has been set. + +2007-10-08 Jim Evins + + * libglabels/template.c: + * libglabels/xml-template.c: + * src/template-designer.c: + Missed some symbols with libglabels API work. + +2007-10-01 Jim Evins + + * docs/libglabels/libglabels-decl-list.txt: + * docs/libglabels/libglabels-docs.sgml: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/category.sgml: + * docs/libglabels/tmpl/enums.sgml: + * docs/libglabels/tmpl/init.sgml: + * docs/libglabels/tmpl/libglabels-unused.sgml: + * docs/libglabels/tmpl/paper.sgml: + * docs/libglabels/tmpl/template-construction.sgml: + * docs/libglabels/tmpl/template-db.sgml: + * docs/libglabels/tmpl/template-misc.sgml: + * docs/libglabels/tmpl/template-struct.sgml: + * docs/libglabels/tmpl/template.sgml: + * docs/libglabels/tmpl/xml-category.sgml: + * docs/libglabels/tmpl/xml-template.sgml: + * libglabels/category.h: + * libglabels/init.c: + * libglabels/libglabels-private.h: + * libglabels/paper.h: + * libglabels/template.c: + * libglabels/template.h: + * libglabels/xml-template.h: + Basic documentation framework for libglabels updated. This still needs some + fleshing out. + +2007-09-27 Jim Evins + + * docs/libglabels/libglabels-decl-list.txt: + * docs/libglabels/libglabels-docs.sgml: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/enums.sgml: + * docs/libglabels/tmpl/init.sgml: + * docs/libglabels/tmpl/libglabels-unused.sgml: + * docs/libglabels/tmpl/paper.sgml: + * docs/libglabels/tmpl/template.sgml: + * docs/libglabels/tmpl/xml-paper.sgml: + * docs/libglabels/tmpl/xml-template.sgml: + * docs/libglabels/tmpl/xml.sgml: + * libglabels/Makefile.am: + * libglabels/category.c: + * libglabels/category.h: + * libglabels/enums.h: + * libglabels/init.c: + * libglabels/init.h: + * libglabels/libglabels-private.h: + * libglabels/libglabels.h: + * libglabels/paper.c: + * libglabels/paper.h: + * libglabels/template.c: + * libglabels/template.h: + * libglabels/xml-category.c: + * libglabels/xml-category.h: + * libglabels/xml-paper.c: + * libglabels/xml-paper.h: + * libglabels/xml-template.c: + * libglabels/xml-template.h: + * libglabels/xml.c: + * libglabels/xml.h: + * src/cairo-label-path.c: + * src/cairo-label-path.h: + * src/cairo-markup-path.c: + * src/cairo-markup-path.h: + * src/file.c: + * src/glabels-batch.c: + * src/glabels.c: + * src/label-object.c: + * src/label.c: + * src/label.h: + * src/mini-preview-pixbuf-cache.c: + * src/mini-preview-pixbuf.c: + * src/mini-preview-pixbuf.h: + * src/prefs-dialog.c: + * src/prefs-model.c: + * src/prefs-model.h: + * src/prefs.c: + * src/prefs.h: + * src/print-op.c: + * src/print.c: + * src/template-designer.c: + * src/view-barcode.c: + * src/view-box.c: + * src/view-ellipse.c: + * src/view-image.c: + * src/view-line.c: + * src/view.c: + * src/wdgt-media-select.c: + * src/wdgt-mini-preview.c: + * src/wdgt-mini-preview.h: + * src/wdgt-print-copies.c: + * src/wdgt-print-merge.c: + * src/wdgt-rotate-label.c: + * src/xml-label-04.c: + * src/xml-label.c: + Major cleanup of libglabels API -- this breaks API compatibility with older + development and stable versions -- as far as I know, there are currently + no external users of this library yet. + +2007-09-14 Jim Evins + + * src/marshal.list: + * src/label.c: + * src/label.h: + * src/label-object.c: + * src/label-object.h: + * src/label-barcode.c: + * src/label-ellipse.c: + * src/view.c: + * src/view-object.c: + * src/view-barcode.c: + * src/view-box.c: + * src/view-ellipse.c: + * src/view-image.c: + * src/view-line.c: + * src/view-text.c: + Better separation of model from view. + +2007-08-21 Jim Evins + + * src/print-op.c: (create_custom_widget_cb): + Fix problem with force_outline_flag -- don't override with default. + +2007-08-21 Jim Evins + + * data/dtd/glabels-2.0.dtd: + * libglabels/template.c: + * libglabels/template.h: + * libglabels/xml-template.c: + * src/cairo-markup-path.c: + Added "Markup-rect" element to template format. + +2007-08-21 Jim Evins + + * configure.in: + Changed version to 2.1.pre5svn. + * src/view.c: (draw_markup_layer): + Do a stroke for each markup path, otherwise multiple markups + get connected. + +2007-08-17 Jim Evins + + * configure.in: + Bump libglabels revision numbers for 2.1.4 release. + +2007-08-16 Jim Evins + + * Makefile.am: + Include subdir iec16022-0.2.1. + * NEWS: + * configure.in: + * glabels.spec.in: + Preparation for 2.1.4. + + +2007-08-11 Jim Evins + + * po/POTFILES.in: + Updated file list. + * configure.in: + * po/eo.po: + Added Esperanto translation. Provided by Antonio C. + Codazzi "la Filozofo" . + * po/fr.po: + Updated French translation. Provided by Claude Paroz + . + * AUTHORS: + Updated to reflect above translations. + +2007-08-11 Jim Evins + + * AUTHORS: + * data/templates/avery-iso-templates.xml: + * data/templates/avery-us-templates.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/misc-other-templates.xml: + * data/templates/misc-us-templates.xml: + * data/templates/zweckform-iso-templates.xml: + Caught up with backlog of template submissions. + +2007-08-10 Jim Evins + + * src/bc-postnet.c: (gl_barcode_postnet_new): + * src/bc.c: + Added support for Brazilian CEPNet barcodes. This is simply an + instance of the US POSTNET format with 8 digits. Patch supplied + by Mário Meyer in bug # 1768792. + * AUTHORS: + Updated acknowledgments to reflect above patch and recent shuffling + of underlying technology. + +2007-05-13 Jim Evins + + * src/merge-text.c: (parse_line), (parse_field): + Remove leading and trailing spaces from CSV fields, unless quoted. + +2007-05-09 Jim Evins + + * src/object-editor-bc-page.c: + * src/object-editor-data-page.c: + * src/object-editor-fill-page.c: + * src/object-editor-image-page.c: + * src/object-editor-line-page.c: + * src/object-editor-lsize-page.c: + * src/object-editor-position-page.c: + * src/object-editor-private.h: + * src/object-editor-shadow-page.c: + * src/object-editor-size-page.c: + * src/object-editor-text-page.c: + * src/object-editor.c: + * src/prefs-dialog.c: + * src/template-designer.c: + * src/ui-property-bar.c: + * src/wdgt-media-select.c: + Replaced signal block/unblock pairs with simple flags. This reduces + some code clutter, hopefully making it easier to read. + +2007-05-05 Jim Evins + + * src/template-designer.c: (apply_cb): + Add new template to mini-preview pixbuf cache. + +2007-05-03 Jim Evins + + * src/label-image.c: (gl_label_image_init), (draw_object): + Scale default pixbuf up, to prevent bluring. Use cairo_fill to + render image. + +2007-05-02 Jim Evins + + * src/view.c: (draw_select_region_layer), (motion_notify_event_cb), + (button_release_event_cb): + Removed attempt at rendering optimization by clipping the updates + to areas affected -- this actually seemed to hurt update performance. + +2007-04-30 Jim Evins + + * src/color.h: + * src/color.c: (gl_color_shadow), (gl_color_node_new_default), + (gl_color_node_equal), (gl_color_node_expand): + * src/label-barcode.c: (draw_object): + * src/label-box.c: (draw_object), (draw_shadow): + * src/label-ellipse.c: (draw_object), (draw_shadow): + * src/label-line.c: (draw_object), (draw_shadow): + * src/label-text.c: (draw_object), (draw_shadow): + * src/wdgt-mini-preview.c: (draw_shadow), (draw_labels): + * src/wdgt-rotate-label.c: (drawingarea_update): + Some cleanup to color related code. + +2007-04-30 Jim Evins + + * src/label.h: + Added glLabelRegion structure type. + * src/label-object.c: (gl_label_object_get_extent): + * src/label-object.h: + Modified gl_label_object_get_extent() to fill in a glLabelRegion struct. + * src/view.h: + * src/view.c: (gl_view_update_region), (draw_select_region_layer), + (gl_view_select_region), (gl_view_align_selection_left), + (gl_view_align_selection_right), (gl_view_align_selection_hcenter), + (gl_view_align_selection_top), (gl_view_align_selection_bottom), + (gl_view_align_selection_vcenter), + (gl_view_center_selection_horiz), (gl_view_center_selection_vert), + (gl_view_move_selection), (gl_view_can_selection_text), + (motion_notify_event_cb), (button_press_event_cb), + (button_release_event_cb): + - Reconcile with new gl_label_object_get_extent() API. + - Use glLabelRegion for view->select_region. + - Added gl_view_update_region() to clip updates to region. + - Use gl_view_update_region() during manipulation of view->select_region. + +2007-04-26 Jim Evins + + * src/mini-preview-pixbuf.c: (draw_paper), (draw_label_outlines), + (draw_label_outline): + * src/print.c: (print_crop_marks), (draw_outline): + * src/view-object.c: (gl_view_object_draw_handles): + * src/view.c: (draw_bg_layer), (draw_grid_layer), + (draw_markup_layer), (draw_fg_layer), (draw_select_region_layer): + * src/wdgt-mini-preview.c: (draw_paper), (draw_labels): + * src/wdgt-rotate-label.c: (drawingarea_update): + Added defines for various magic numbers. + +2007-04-25 Jim Evins + + * src/label-text.c: (get_size), (draw_object), (draw_shadow): + Scale text down. Cairo seems to render text too large. + +2007-04-25 Jim Evins + + * src/view.h: + * src/view.c: (gl_view_update), (expose_cb), + (motion_notify_event_cb), (button_press_event_cb), + (button_release_event_cb): + - Try not to let updates get backed up. + - Grab pointer when doing any drag operations. + +2007-04-11 Jim Evins + + * src/cairo-label-path.c: (gl_cairo_label_path), + (gl_cairo_rect_label_path), (gl_cairo_round_label_path), + (gl_cairo_cd_label_path): + * src/cairo-label-path.h: + * src/mini-preview-pixbuf.c: (draw_paper), (draw_label_outlines), + (draw_label_outline): + * src/print.c: (draw_outline), (clip_to_outline): + * src/view.c: (draw_bg_layer), (draw_fg_layer): + * src/wdgt-mini-preview.c: (draw_labels): + * src/wdgt-rotate-label.c: (drawingarea_update): + Modified to universally use gl_cairo_label_path() to create paths + for labels. Added shadow to mini preview in rotate widget. + +2007-04-10 Jim Evins + + * libglabels/template.h: + * libglabels/template.c: (gl_template_get_name_list_unique), + (gl_template_get_name_list_all), (gl_template_from_name): + Modified libglabels to allow you to get a list of all template names + including all aliases or just a list of primary names of each unique + template. + * src/Makefile.am: + * src/file.c: (gl_file_properties): + * src/glabels.c: (main): + * src/mini-preview-pixbuf-cache.h: + * src/mini-preview-pixbuf-cache.c: + * src/wdgt-media-select.c: (gl_wdgt_media_select_construct), + (filter_changed_cb), (load_list): + Added mini-preview pixbuf cache, so that only one mini-preview is + needed for a unique template and gets reused for all aliases. These + pixbufs will also live for the life of the program so they are not + rebuilt everytime a new label dialog is invoked. + * src/mini-preview-pixbuf.c: (draw_paper), + (draw_rect_label_outline), (draw_round_label_outline), + (draw_cd_label_outline): + Removed some comment artifacts. + +2007-04-04 Jim Evins + + * src/mini-preview-pixbuf.c: (gl_mini_preview_pixbuf_new), + (draw_paper), (draw_label_outlines), (draw_rect_label_outline), + (draw_round_label_outline), (draw_cd_label_outline): + * src/wdgt-media-select.c: (load_list): + * src/wdgt-rotate-label.c: (draw_cd_label_outline): + Cosmetic enhancments to mini previews. + +2007-04-04 Jim Evins + + * src/ui-property-bar.c: (gl_ui_property_bar_finalize), + (gl_ui_property_bar_construct): + Save copy of GladeXML tree so that we don't lose tooltips. + +2007-04-02 Jim Evins + + * src/merge-properties-dialog.c: + * src/new-label-dialog.c: + * src/object-editor.c: + * src/prefs-dialog.c: + * src/print-op.c: + * src/template-designer.c: + * src/ui-property-bar.c: + * src/wdgt-media-select.c: + * src/wdgt-rotate-label.c: + Fixed several memory leaks. + +2007-04-01 Jim Evins + + * src/label-text.c: (gl_label_text_init), (copy), + (gl_label_text_set_lines), (buffer_changed_cb), (get_size), + (set_font_family), (set_font_size), (set_font_weight), + (set_font_italic_flag), (set_text_alignment), + (set_text_line_spacing): + Cache object size, so that expensive extent calculations are only done + when needed. + +2007-03-30 Jim Evins + + * src/prefs-model.c: (gl_prefs_model_load_settings): + Default to an unlimited list of recent documents, since this parameter + seems to be pre-filter anyway. + +2007-03-30 Jim Evins + + * src/label-box.c: (draw_shadow): + * src/label-ellipse.c: (draw_shadow): + Added missing shadow fill. + +2007-03-28 Jim Evins + + * src/ui-commands.c: (gl_ui_cmd_file_print): + Unreferencing the print operation sometimes crashes. Just don't do it + right now. + +2007-03-28 Jim Evins + + * src/print-op.c: (gl_print_op_construct), + (gl_print_op_get_settings), (gl_print_op_set_settings), + (gl_print_op_free_settings), (create_custom_widget_cb): + * src/print-op.h: + * src/ui-commands.c: (gl_ui_cmd_file_print): + * src/window.c: (gl_window_init): + * src/window.h: + Save print settings and custom settings between print operations + on the same window. + +2007-03-24 Jim Evins + + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page), + (gl_object_editor_set_image), (img_selection_changed_cb): + Workaround for GtkFileChooserButton bug # 327243. This the root + cause for gLabels bug # 1192884. I have actually observed 3 delayed + "selection-changed" signals -- the first 2 return NULL -- this is + what caused the image to reset to the default followed by setting + it back to the original image, trying to fit it into a new bounding + box. This sequence of events is much more evident with the new + cairo rendering. + +2007-03-23 Jim Evins + + Merged all changes from experimental cairo branch to trunk. + Trunk no longer depends on libgnomecanvas or libgnomeprint[ui]. + +2007-03-23 Jim Evins + + * src/label-object.h: + * src/label-object.c: (gl_label_object_class_init), + (gl_label_object_get_raw_size), (gl_label_object_get_size): + Created "get_raw_size" method. + * src/label-barcode.c: (get_size): + * src/xml-label.c: (xml_create_object_text), + (xml_create_object_barcode): + Use new "get_raw_size" method on label-objects when apropos. + * src/label-text.h: + * src/label-text.c: (get_size), (draw_object), (draw_shadow), + (auto_shrink_font_size): + Added "auto shrink" functionality back. + +2007-03-19 Jim Evins + + * src/label-text.c: (draw_object), (draw_shadow): + Don't use negative scales in workaround from previous commit. + + +2007-03-18 Jim Evins + + * src/xml-label.c: + Forgot to remove include of xml-lable-191 in previous commit. + * src/label-text.c: (get_size), (draw_object), (draw_shadow): + Workaround for pango Bug #341481. Render text at device scale, + and scale font size accordingly. Also, don't do any hinting. + +2007-03-18 Jim Evins + + * src/cairo-ellipse-path.c: + * src/cairo-ellipse-path.h: + Forgot to add these new files during last mass commit. + +2007-03-18 Jim Evins + + * src/Makefile.am: + * src/xml-label-191.c: + * src/xml-label-191.h: + Removed -- Very buggy. Version 1.91 is a very old "unstable" version, + so there is no need to keep compatability. + * src/base64.c: + * src/bc-iec16022.c: + * src/cairo-label-path.c: + * src/cairo-label-path.h: + * src/cairo-markup-path.c: + * src/color.c: + * src/debug.c: + * src/file.c: + * src/glabels-batch.c: + * src/glabels.c: + * src/label-barcode.c: + * src/label-box.c: + * src/label-ellipse.c: + * src/label-image.c: + * src/label-line.c: + * src/label-object.c: + * src/label-object.h: + * src/label-text.c: + * src/label.c: + * src/label.h: + * src/merge-properties-dialog.c: + * src/merge.c: + * src/new-label-dialog.c: + * src/object-editor-bc-page.c: + * src/object-editor-data-page.c: + * src/object-editor-edit-page.c: + * src/object-editor-fill-page.c: + * src/object-editor-image-page.c: + * src/object-editor-line-page.c: + * src/object-editor-private.h: + * src/object-editor-shadow-page.c: + * src/object-editor-text-page.c: + * src/object-editor.c: + * src/pixbuf-cache.c: + * src/print-op.c: + * src/print.c: + * src/recent.c: + * src/stock.c: + * src/template-designer.c: + * src/text-node.c: + * src/ui-property-bar.c: + * src/ui.c: + * src/view-barcode.c: + * src/view-box.c: + * src/view-ellipse.c: + * src/view-image.c: + * src/view-line.c: + * src/view-object.c: + * src/view-object.h: + * src/view-text.c: + * src/view.c: + * src/wdgt-media-select.c: + * src/wdgt-print-copies.c: + * src/wdgt-print-merge.c: + * src/window.c: + * src/xml-label-04.c: + * src/xml-label.c: + Many changes, including: + - Move draw methods from view-*() to label-*(). + - Use same drawing code for on screen view and printing. + - Fix all issues exposed with '-Wall -Werror'. + +2007-03-14 Jim Evins + + * src/Makefile.am: + * src/cairo-handle-path.c: + * src/cairo-handle-path.h: + * src/cairo-object-path.c: + * src/cairo-object-path.h: + Removed cairo-handle-path.[ch] and cairo-object-path.[ch]. + * src/view-barcode.c: (gl_view_barcode_class_init), (draw_object), + (object_at): + * src/view-box.c: (gl_view_box_class_init), (draw_object), + (draw_shadow), (object_at): + * src/view-ellipse.c: (gl_view_ellipse_class_init), + (create_ellipse_path), (draw_object), (draw_shadow), (object_at): + * src/view-image.c: (gl_view_image_class_init), (draw_object), + (object_at): + * src/view-line.c: (gl_view_line_class_init), (draw_object), + (draw_shadow), (object_at): + * src/view-object.c: (gl_view_object_draw), (gl_view_object_at), + (create_handle_path), (gl_view_object_draw_handles), + (gl_view_object_handle_at): + * src/view-object.h: + * src/view-text.c: (gl_view_text_class_init), (draw_object), + (draw_shadow), (object_at): + * src/view.c: (motion_notify_event_cb), (button_press_event_cb): + Some restructuring of new code. + +2007-03-12 Jim Evins + + * src/Makefile.am: + * src/cairo-object-path.c: + * src/view-barcode.c: + * src/view-barcode.h: + * src/view.c: + Added barcode object support to view. + +2007-03-12 Jim Evins + + * src/Makefile.am: + * src/view-text.h: + * src/view-text.c: + * src/view.c: + * src/cairo-object-path.c: + * src/cairo-object-path.h: + * src/view-box.c: + * src/view-ellipse.c: + * src/view-image.c: + * src/view-line.c: + * src/view-object.c: + * src/view-object.h: + Added text object support to view. Added object_at method to all + view_objects. + +2007-03-11 Jim Evins + + * src/Makefile.am: + * src/cairo-object-path.c: (gl_cairo_object_path), + (gl_cairo_image_object_path): + * src/view-image.c: (gl_view_image_class_init), + (gl_view_image_finalize), (gl_view_image_new), + (update_editor_from_label_cb), (draw), + (gl_view_image_get_create_cursor), + (gl_view_image_create_button_press_event), + (gl_view_image_create_motion_event), + (gl_view_image_create_button_release_event): + * src/view-image.h: + * src/view.c: (gl_view_construct), (gl_view_object_create_mode), + (selection_received_cb), (motion_notify_event_cb), + (button_press_event_cb), (button_release_event_cb): + Added image object support to view. + +2007-03-11 Jim Evins + + * src/Makefile.am: + * src/cairo-object-path.c: (gl_cairo_object_path), + (gl_cairo_line_object_path): + * src/view-line.c: (gl_view_line_class_init), (gl_view_line_new), + (update_object_from_editor_cb), (update_editor_from_object_cb), + (update_editor_from_label_cb), (draw), + (gl_view_line_get_create_cursor), + (gl_view_line_create_button_press_event), + (gl_view_line_create_motion_event), + (gl_view_line_create_button_release_event): + * src/view-line.h: + * src/view-object.c: (gl_view_object_resize_event): + * src/view.c: (gl_view_construct), (gl_view_object_create_mode), + (selection_received_cb), (motion_notify_event_cb), + (button_press_event_cb), (button_release_event_cb): + Added line object support to view. + * src/cairo-handle-path.c: + Made handles slightly larger. + + +2007-03-11 Jim Evins + + * src/Makefile.am: + * src/cairo-handle-path.c: + * src/cairo-label-path.c: (gl_cairo_rect_label_path), + (gl_cairo_round_label_path), (gl_cairo_cd_label_path): + * src/cairo-markup-path.c: (gl_cairo_markup_margin_rect_path), + (gl_cairo_markup_margin_round_path), + (gl_cairo_markup_margin_cd_path), (gl_cairo_markup_circle_path): + * src/cairo-object-path.c: (gl_cairo_object_path), + (gl_cairo_ellipse_object_path): + * src/label-object.c: (gl_label_object_rotate): + * src/view-box.c: + * src/view-box.h: + * src/view-ellipse.c: (gl_view_ellipse_class_init), + (gl_view_ellipse_new), (update_object_from_editor_cb), + (update_editor_from_object_cb), (update_editor_from_label_cb), + (draw), (gl_view_ellipse_get_create_cursor), + (gl_view_ellipse_create_button_press_event), + (gl_view_ellipse_create_motion_event), + (gl_view_ellipse_create_button_release_event): + * src/view-ellipse.h: + * src/view-object.c: + * src/view-object.h: + * src/view.c: (gl_view_construct), (gl_view_object_create_mode), + (select_object_real), (selection_received_cb), + (motion_notify_event_cb), (button_press_event_cb), + (button_release_event_cb): + * src/view.h: + Added ellipse object support to view. Plus other cleanup. + +2007-03-11 Jim Evins + + * src/view-box.h: + * src/view-box.c: (gl_view_box_get_create_cursor), + (gl_view_box_create_button_press_event), + (gl_view_box_create_motion_event), + (gl_view_box_create_button_release_event): + * src/view-object.c: (gl_view_object_set_view), + (gl_view_object_handle_at): + * src/view.h: + * src/view.c: (gl_view_arrow_mode), (gl_view_object_create_mode), + (motion_notify_event_cb), (button_press_event_cb), + (button_release_event_cb), (key_press_event_cb): + Added creation code for box object. + +2007-03-09 Jim Evins + + * src/view-object.c: (gl_view_object_resize_event): + * src/view-object.h: + * src/view.c: (motion_notify_event_cb): + Fix bugs with resizing transformed objects. + * src/cairo-handle-path.c: (gl_cairo_handle_path): + * src/cairo-object-path.c: (gl_cairo_object_path): + * src/cairo-object-path.h: + * src/label-object.c: (gl_label_object_init), + (gl_label_object_dup), (gl_label_object_get_extent), + (gl_label_object_flip_horiz), (gl_label_object_flip_vert), + (gl_label_object_rotate), (gl_label_object_set_matrix), + (gl_label_object_get_matrix): + * src/label-object.h: + * src/print.c: (draw_object): + * src/view-box.c: + * src/view-highlight.c: + * src/view-highlight.h: + * src/xml-label-191.c: (xml191_parse_object): + * src/xml-label.c: (xml_parse_affine_attrs), + (xml_create_affine_attrs): + Replace libart affine matrices with cairo matrices. + +2007-03-08 Jim Evins + + * src/view-object.h: + * src/view.c: (gl_view_update), (motion_notify_event_cb): + * src/view-object.c: (gl_view_object_handle_at), + (gl_view_object_resize_event): + Added resize code -- still a bit buggy. + +2007-03-07 Jim Evins + + * src/Makefile.am: + * src/cairo-handle-path.c: + * src/cairo-handle-path.h: + * src/view-box.c: (gl_view_box_new): + * src/view-object.c: (gl_view_object_set_object), + (gl_view_object_draw_handles), (gl_view_object_handle_at): + * src/view-object.h: + * src/view.c: (draw_highlight_layer), (select_object_real), + (unselect_object_real), (view_handle_at), (motion_notify_event_cb), + (button_press_event_cb), (button_release_event_cb), + (key_press_event_cb): + * src/view.h: + Added beginnings of object resize handles. + +2007-03-07 Jim Evins + + * src/view.h: + * src/view.c: (gl_view_init), (gl_view_arrow_mode), + (gl_view_object_create_mode), (motion_notify_event_cb), + (button_press_event_cb), (button_release_event_cb), + (key_press_event_cb): + Added move selection support. + +2007-03-05 Jim Evins + + * src/cairo-object-path.c: (gl_cairo_object_path): + * src/view-object.c: (gl_view_object_draw), + (gl_view_object_draw_highlight): + * src/view.c: (view_object_at), (motion_notify_event_cb), + (button_press_event_cb), (button_release_event_cb): + Additional refinements to select logic. + +2007-03-05 Jim Evins + + * src/view.h: + * src/view.c: (gl_view_init), (gl_view_construct), + (label_changed_cb), (draw_layers), (draw_select_region_layer), + (gl_view_select_region), (object_at), (motion_notify_event_cb), + (button_press_event_cb), (button_release_event_cb): + Added initial select region support and context menu. + +2007-03-04 Jim Evins + + * configure.in: + * src/Makefile.am: + * src/debug.c: + * src/debug.h: + * src/file.c: + * src/label.c: + * src/label.h: + * src/print-op.c: + * src/print.c: + * src/ui-commands.c: + * src/view-box.c: + * src/view-box.h: + * src/view-object.c: + * src/view-object.h: + * src/view.c: + * src/view.h: + * src/wdgt-print-copies.c: + * src/wdgt-print-merge.c: + * src/xml-label.c: + Initial port to a raw Cairo canvas. This removes all remaining + dependencies on libgnomecanvas and libgnomeprint[ui]. Basically + the view is becoming a canvas widget in its own right. Still needs + a lot of work. + * src/cairo-label-path.c: + * src/cairo-label-path.h: + * src/cairo-markup-path.c: + * src/cairo-markup-path.h: + * src/cairo-object-path.c: + * src/cairo-object-path.h: + New files to support cairo canvas. + * src/canvas-hacktext.c: + * src/canvas-hacktext.h: + Removed. + +2007-02-18 Jim Evins + + * src/bc.h: + GNOME_FONT_BOOK changed to PANGO_WEIGHT_NORMAL. + +2007-02-14 Jim Evins + + * src/base64.c: + * src/base64.h: + * src/bc-gnubarcode.c: + * src/bc-gnubarcode.h: + * src/bc-postnet.c: + * src/bc-postnet.h: + * src/bc.c: + * src/bc.h: + * src/canvas-hacktext.c: + * src/canvas-hacktext.h: + * src/debug.c: + * src/debug.h: + * src/file.c: + * src/file.h: + * src/glabels.c: + * src/hig.h: + * src/label-barcode.c: + * src/label-barcode.h: + * src/label-box.c: + * src/label-box.h: + * src/label-ellipse.c: + * src/label-ellipse.h: + * src/label-image.c: + * src/label-image.h: + * src/label-line.c: + * src/label-line.h: + * src/label-object.c: + * src/label-object.h: + * src/label-text.c: + * src/label-text.h: + * src/label.c: + * src/label.h: + * src/merge-evolution.c: + * src/merge-evolution.h: + * src/merge-init.c: + * src/merge-init.h: + * src/merge-properties-dialog.c: + * src/merge-properties-dialog.h: + * src/merge-text.c: + * src/merge-text.h: + * src/merge-vcard.c: + * src/merge-vcard.h: + * src/merge.c: + * src/merge.h: + * src/mini-preview-pixbuf.h: + * src/new-label-dialog.c: + * src/new-label-dialog.h: + * src/object-editor-bc-page.c: + * src/object-editor-data-page.c: + * src/object-editor-edit-page.c: + * src/object-editor-fill-page.c: + * src/object-editor-image-page.c: + * src/object-editor-line-page.c: + * src/object-editor-lsize-page.c: + * src/object-editor-position-page.c: + * src/object-editor-private.h: + * src/object-editor-size-page.c: + * src/object-editor-text-page.c: + * src/object-editor.c: + * src/object-editor.h: + * src/pixbuf-cache.c: + * src/pixbuf-cache.h: + * src/prefs-dialog.c: + * src/prefs-dialog.h: + * src/prefs-model.c: + * src/prefs-model.h: + * src/prefs.c: + * src/prefs.h: + * src/print-op.c: + * src/stock.c: + * src/stock.h: + * src/template-designer.c: + * src/text-node.c: + * src/text-node.h: + * src/ui-commands.c: + * src/ui-commands.h: + * src/ui-property-bar.c: + * src/ui-property-bar.h: + * src/ui-sidebar.c: + * src/ui-sidebar.h: + * src/ui-util.c: + * src/ui-util.h: + * src/ui.c: + * src/ui.h: + * src/util.c: + * src/util.h: + * src/view-barcode.c: + * src/view-barcode.h: + * src/view-box.c: + * src/view-box.h: + * src/view-ellipse.c: + * src/view-ellipse.h: + * src/view-highlight.c: + * src/view-highlight.h: + * src/view-image.c: + * src/view-image.h: + * src/view-line.c: + * src/view-line.h: + * src/view-object.c: + * src/view-object.h: + * src/view-text.c: + * src/view-text.h: + * src/view.c: + * src/view.h: + * src/wdgt-chain-button.c: + * src/wdgt-chain-button.h: + * src/wdgt-media-select.c: + * src/wdgt-mini-preview.c: + * src/wdgt-print-copies.c: + * src/wdgt-print-copies.h: + * src/wdgt-print-merge.c: + * src/wdgt-print-merge.h: + * src/wdgt-rotate-label.c: + * src/window.h: + * src/xml-label-04.c: + * src/xml-label-04.h: + * src/xml-label-191.c: + * src/xml-label-191.h: + * src/xml-label.c: + * src/xml-label.h: + + Assorted superficial cleanup. Including: + - Use G_DEFINE_TYPE for all objects. + - Reconcile style of all class initializer functions + - Reconcile style of all finalize functions + - Add emacs mode line to all source files + +2007-02-06 Jim Evins + +Assorted cleanup and removal of deprecated items. + + * src/splash.c: + * src/splash.h: + * src/Makefile.am: + Removed annoying splash screen. + * src/glabels-batch.c: (main): + * src/glabels.c: (main): + Converted from popt to GOption. + * src/object-editor-shadow-page.c: + (gl_object_editor_set_shadow_state): + Removed deprecated method on GtkToggleButton. + * src/ui-commands.c: (gl_ui_cmd_help_about): + Removed dependency on libgnomui/qnome-url.h. + * src/template-designer.c: + Removed dependency on libgnome/gnome-program.h. + + +2007-02-04 Jim Evins + + * src/color.c: + * src/color.h: + * src/prefs-model.c: + * src/print.c: (draw_text_object): + * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_construct): + Removed GnomeCanvas artifacts from color.[ch] and related modules. + +2007-02-04 Jim Evins + + * src/wdgt-mini-preview.c: + * src/wdgt-mini-preview.h: + Ported widget from GnomeCanvas to Cairo. + +2007-02-03 Jim Evins + + * data/glade/template-designer.glade: + * src/template-designer.c: + * src/template-designer.h: + Ported GnomeDruid to GtkAssistant. Since libglade does not + yet support the GtkAssistant and we derive directly from + the Assistant, the pages are layed out in a GtkNotebook in + the glade description -- we then append each page to the + assistant. + +2007-01-25 Jim Evins + + * data/glade/object-editor.glade: + Added dummy page to notebook, to prevent shadow page from + becoming the default current page at creation. + * src/view-box.c: (construct_properties_editor): + * src/view-ellipse.c: (construct_properties_editor): + * src/view-line.c: (construct_properties_editor): + * src/view-text.c: (construct_properties_editor): + Reconciled order of params. + +2007-01-19 Jim Evins + + * src/label-barcode.h: + * src/label-object.c: (gl_label_object_set_font_weight), + (gl_label_object_set_text_alignment), + (gl_label_object_get_font_weight), + (gl_label_object_get_text_alignment): + * src/label-object.h: + * src/label-text.c: (gl_label_text_instance_init), (copy), + (get_size), (set_font_family), (set_font_weight), + (set_text_alignment), (get_font_weight), (get_text_alignment): + * src/label-text.h: + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page), + (gl_object_editor_set_font_family), + (gl_object_editor_set_font_weight), + (gl_object_editor_get_font_weight), + (gl_object_editor_set_text_alignment), + (gl_object_editor_get_text_alignment), + (gl_object_editor_set_text_color): + * src/object-editor.h: + * src/prefs-dialog.c: (construct_object_page), + (update_object_page_from_prefs), (update_prefs_from_object_page): + * src/prefs-model.c: (gl_prefs_model_save_settings), + (gl_prefs_model_load_settings): + * src/prefs-model.h: + * src/print.c: (draw_text_object): + * src/ui-property-bar.c: (gl_ui_property_bar_construct), + (reset_to_default_properties), (update_text_properties), + (font_bold_toggled_cb), (text_align_toggled_cb): + * src/ui-sidebar.c: + * src/util.c: (gl_util_align_to_string), (gl_util_string_to_align), + (gl_util_weight_to_string), (gl_util_string_to_weight), + (gl_util_get_font_family_list), (gl_util_font_family_list_free): + * src/util.h: + * src/view-text.c: (update_object_from_editor_cb), + (update_editor_from_object_cb), (draw_hacktext), (draw_cursor): + * src/view.c: (gl_view_set_selection_text_alignment), + (gl_view_set_default_text_alignment), + (gl_view_get_default_text_alignment): + * src/view.h: + * src/xml-label-04.c: (xml04_parse_text_props): + * src/xml-label-191.c: (xml191_parse_text_props): + * src/xml-label.c: (xml_parse_object_text), + (xml_parse_toplevel_span), (xml_create_object_text), + (xml_create_toplevel_span): + Converted all model internals to Pango. GnomeFont remains in + view until GnomeCanvas can be replaced with a cairo-based canvas. + +2007-01-17 Jim Evins + + * src/Makefile.am: + * src/hig.c: + Deleted hig.c. + * src/hig.h: + * src/wdgt-print-copies.c: (gl_wdgt_print_copies_get_type), + (gl_wdgt_print_copies_construct): + * src/wdgt-print-copies.h: + * src/wdgt-print-merge.c: (gl_wdgt_print_merge_get_type), + (gl_wdgt_print_merge_construct): + * src/wdgt-print-merge.h: + Removed all remaining HIG wrapper widgets. + +2007-01-16 Jim Evins + + * src/Makefile.am: + * src/print-dialog.c: + * src/print-dialog.h: + * src/print-op.c: + * src/print-op.h: + * src/template-designer.c: (print_test_cb): + * src/ui-commands.c: (gl_ui_cmd_file_print): + * src/print.c: + Renamed PrintDialog to PrintOp. Added constructor for batch + printing. + * src/glabels-batch.c: (main): + Converted to use new PrintOp object for printing. + +2007-01-15 Jim Evins + + * data/glade/Makefile.am: + * data/glade/print-custom-widget.glade: + * src/print-dialog.c: + * src/print-dialog.h: + * src/print.c: + * src/print.h: + * src/template-designer.c: (print_test_cb): + * src/ui-commands.c: (gl_ui_cmd_file_print): + * src/wdgt-print-merge.c: (gl_wdgt_print_merge_get_copies): + * src/wdgt-print-merge.h: + * src/window.c: (gl_window_init): + * src/window.h: + Initial conversion to GtkPrintOperation. + Still to do: + - Remove font and other libgnomeprint[ui] from elsewhere + - Add batch initialization of print operation + +2007-01-08 Jim Evins + * configure.in: + Updated dependencies. Set version to 2.1.pre4cvs. + +2007-01-03 Jim Evins + + * src/recent-files/* + Removed EggRecent stuff. + * configure.in: + * src/Makefile.am: + * src/file.c: + * src/recent.c: + * src/recent.h: + * src/ui-commands.c: + * src/ui-commands.h: + * src/ui.c: + Ported from EggRecent to GtkRecentManager. + + +2007-01-02 Jim Evins + + * configure.in: + * iec16022-0.2.1/BUGS: + * iec16022-0.2.1/CHANGELOG: + * iec16022-0.2.1/CREDITS: + * iec16022-0.2.1/INSTALL: + * iec16022-0.2.1/LICENSE: + * iec16022-0.2.1/Makefile.am: + * iec16022-0.2.1/Makefile.dist: + * iec16022-0.2.1/README: + * iec16022-0.2.1/README.glabels: + * iec16022-0.2.1/TODO: + * iec16022-0.2.1/iec16022.1: + * iec16022-0.2.1/iec16022.c: + * iec16022-0.2.1/iec16022ecc200.c: + * iec16022-0.2.1/iec16022ecc200.h: + * iec16022-0.2.1/image.c: + * iec16022-0.2.1/image.h: + * iec16022-0.2.1/reedsol.c: + * iec16022-0.2.1/reedsol.h: + * iec16022-0.2.1/test/testsuite-example.bin: + * iec16022-0.2.1/test/testsuite-example.eps: + * iec16022-0.2.1/test/testsuite-example.hex: + * iec16022-0.2.1/test/testsuite-example.png: + * iec16022-0.2.1/test/testsuite-example.text: + * iec16022-0.2.1/test/testsuite.sh: + Include modified copy of iec16022-0.2.1 to provide encoding + support for datamatrix 2D barcodes. + * src/Makefile.am: + * src/bc-iec16022.c: + * src/bc-iec16022.h: + * src/bc.c: + Added initial datamatrix 2D barcode backend to barcode code. + * INSTALL: + * gtk-doc.make: + Automatic updates to later versions of these files. + +2006-11-28 Jim Evins + + * data/templates/avery-iso-templates.xml: + * data/templates/avery-us-templates.xml: + * data/templates/categories.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/misc-us-templates.xml: + * data/templates/zweckform-iso-templates.xml: + More categorization. + +2006-09-12 Jim Evins + + * data/dtd/glabels-2.0.dtd: + * data/templates/Makefile.am: + * data/templates/avery-iso-templates.xml: + * data/templates/avery-other-templates.xml: + * data/templates/avery-us-templates.xml: + * data/templates/categories.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/misc-other-templates.xml: + * data/templates/zweckform-iso-templates.xml: + * data/glade/Makefile.am: + * data/glade/new-label-dialog.glade: + * data/glade/wdgt-media-select.glade: + * data/glade/wdgt-rotate-label.glade: + * libglabels/Makefile.am: + * libglabels/category.c: + * libglabels/category.h: + * libglabels/libglabels.h: + * libglabels/paper.c: + * libglabels/template.c: + * libglabels/template.h: + * libglabels/xml-category.c: + * libglabels/xml-category.h: + * libglabels/xml-template.c: + Added support for category meta data. + * src/Makefile.am: + * src/file.c: + * src/mini-preview-pixbuf.c: + * src/mini-preview-pixbuf.h: + * src/new-label-dialog.c: + * src/new-label-dialog.h: + * src/wdgt-media-select.c: + * src/wdgt-media-select.h: + * src/wdgt-rotate-label.c: + * src/wdgt-rotate-label.h: + New "new label" dialog. + +2006-05-27 Jim Evins + + * NEWS: + * autogen.sh: + * configure.in: + Preparation for 2.1.3. + * acinclude.m4: + * omf.make: + * xmldocs.make: + Removed. + +2006-05-22 Jim Evins + + * src/print.c: (draw_barcode_object): + Don't print "Invalid barcode data" if data field is empty. Patch provided + by Darren Warner . Fixes Bug #1479839. + * AUTHORS: + Added acknowledgment for above patch. + * src/bc-gnubarcode.c: (gl_barcode_gnubarcode_new): + * src/bc-postnet.c: (postnet_code): + Removed "Invalid barcode data" warnings from stderr. + * src/view-barcode.c: (draw_barcode): + Draw box around barcode extent if data empty or invalid. Center a + message whether the data is empty or invalid in box. + +2006-05-22 Jim Evins + + * src/print.c: (draw_text_object): + Check shadow state when printing text. + +2006-05-20 Jim Evins + + * src/ui-commands.c: (gl_ui_cmd_view_grid_toggle), + (gl_ui_cmd_view_markup_toggle): + Fixed crash when grid or markup have been toggled off during + a previous session. Bug #1434324. + +2006-04-05 Jim Evins + + * src/object-editor.c: (gl_object_editor_set_key_names): + Fixed potential crash when freeing empty key list. + +2006-03-11 Jim Evins + + * src/print.c: (draw_text_object): + * src/view-text.c: (gl_view_text_new), + (construct_properties_editor), (update_object_from_editor_cb), + (update_editor_from_object_cb), (update_editor_from_label_cb), + (draw_hacktext): + Added shadow support to text object. + +2006-02-18 Jim Evins + + * src/print.c: (draw_line_object): + * src/view-line.c: (gl_view_line_new), + (construct_properties_editor), (update_canvas_item_from_object_cb), + (update_object_from_editor_cb), (update_editor_from_object_cb), + (update_editor_from_label_cb): + Added shadow support to line object. + +2006-02-16 Jim Evins + + * src/view-box.c: + Comment changes. + * src/print.c: (draw_ellipse_object): + * src/view-ellipse.c: (gl_view_ellipse_new), + (construct_properties_editor), (update_canvas_item_from_object_cb), + (update_object_from_editor_cb), (update_editor_from_object_cb), + (update_editor_from_label_cb): + Added shadow support to ellipse object. + +2006-02-15 Jim Evins + + * src/label-object.c: + Changed default shadow offsets. + * src/view-box.c: (gl_view_box_new): + Simplified gl_view_box_new() so that is does not duplicate code + in update_canvas_item_from_object_cb(). + +2006-02-07 Jim Evins + + * data/glade/object-editor.glade: + Fixed color groups of color combos. + * src/color.h: + Added default shadow color. + * src/object-editor.c: (gl_object_editor_construct_color_combo): + Added shadow color group. + +2006-02-06 Jim Evins + + * src/object-editor-shadow-page.c: + Forgot to add this file. + * src/view-box.c: (gl_view_box_new), + (update_canvas_item_from_object_cb), (update_editor_from_label_cb): + Update limits on shadow offset spinbuttons. + +2006-01-19 Jim Evins + + * src/merge-evolution.c: (gl_merge_evolution_get_key_list): + Initialize key_list to NULL. + * data/glade/object-editor.glade: + * src/Makefile.am: + * src/color.c: + * src/color.h: + * src/label-object.c: + * src/label-object.h: + * src/object-editor-fill-page.c: + * src/object-editor-private.h: + * src/object-editor.c: + * src/object-editor.h: + * src/xml-label.c: + Created infrastructure for shadow support. + * src/view-box.c: + * src/print.c: + Initial shadow support in box object only. + +2006-01-05 Jim Evins + + * src/merge-properties-dialog.c: (src_changed_cb): + Be extra paranoid before calling strcmp(). + * src/merge.c: (gl_merge_set_src): + Don't make (merge == NULL) a critical error. + +2005-12-22 Jim Evins + + * src/glabels-batch.c: (main): + Compile warning free with gcc 4.0. + +2005-12-21 Jim Evins + + * glabels.spec.in: + Updated example RPM spec file. + +2005-12-21 Jim Evins + + * NEWS: + * configure.in: + Preparation for 2.1.2. + +2005-12-20 Jim Evins + + * src/Makefile.am: + Define unique G_LOG_DOMAIN for glabels. + * src/critical-error-handler.c: (gl_critical_error_handler_init): + * src/warning-handler.c: (gl_warning_handler_init), + (warning_handler): + Register for G_LOG_DOMAIN instead of NULL. + +2005-12-10 Jim Evins + + * src/merge-evolution.c: + * src/merge-vcard.c: + Fixed indentation. + +2005-12-08 Jim Evins + + * libglabels/paper.c: (read_paper_files_from_dir): + * libglabels/template.c: (gl_template_register), + (read_template_files_from_dir): + * libglabels/xml-paper.c: (gl_xml_paper_read_papers_from_file), + (gl_xml_paper_parse_papers_doc): + * libglabels/xml-template.c: + (gl_xml_template_read_templates_from_file), + (gl_xml_template_parse_templates_doc), + (gl_xml_template_parse_template_node), + (xml_parse_label_rectangle_node), (xml_parse_label_round_node), + (xml_parse_label_cd_node), (xml_parse_layout_node), + (xml_parse_markup_margin_node), (xml_parse_markup_line_node), + (xml_parse_markup_circle_node), + (gl_xml_template_write_templates_to_file), (xml_create_label_node): + * libglabels/xml.c: (gl_xml_get_prop_length): + Re-classified g_warnings to g_messages. + * src/Makefile.am: + * src/glabels.c: (main): + * src/warning-handler.c: (gl_warning_handler_init), + (warning_handler): + * src/warning-handler.h: + Added warning message handler to make sure the user is + presented with appropriate non-fatal errors. + * src/critical-error-handler.c: (critical_error_handler): + Changed exit to abort. + * src/bc-gnubarcode.c: (gl_barcode_gnubarcode_new), (render_pass1): + * src/bc-postnet.c: (postnet_code): + * src/bc.c: (id_to_index), (name_to_index): + * src/merge.c: (gl_merge_register_backend), (gl_merge_new): + * src/object-editor.c: (gl_object_notebook_construct_valist): + * src/prefs-dialog.c: (update_locale_page_from_prefs): + * src/prefs.c: (gl_prefs_get_units_per_point), + (gl_prefs_get_units_precision), (gl_prefs_get_units_step_size), + (gl_prefs_get_units_string): + * src/print.c: (draw_outline), (clip_to_outline), (clip_punchouts): + * src/splash.c: (gl_splash): + * src/ui-commands.c: (gl_ui_cmd_help_contents): + * src/view-highlight.c: (gl_view_highlight_new), + (highlight_resizable_box_construct), (object_changed_cb), + (view_scale_changed_cb): + * src/view.c: (draw_label_layer), (draw_bg_fg_layers), + (draw_markup_layer), (draw_markup_margin), + (gl_view_object_create_mode), (canvas_event), + (selection_received_cb): + * src/wdgt-mini-preview.c: (mini_outline_list_new): + * src/wdgt-rotate-label.c: (mini_preview_canvas_update): + * src/xml-label-04.c: (gl_xml_label_04_parse), + (xml04_parse_media_description), (xml04_parse_text_props), + (xml04_parse_barcode_props): + * src/xml-label-191.c: (gl_xml_label_191_parse), + (xml191_parse_objects), (xml191_parse_object), + (xml191_parse_text_props), (xml191_parse_image_props), + (xml191_parse_barcode_props), (xml191_parse_data), + (xml191_parse_sheet), (xml191_parse_label), (xml191_parse_layout), + (xml191_parse_markup): + * src/xml-label.c: (gl_xml_label_open), (gl_xml_label_open_buffer), + (xml_doc_to_label), (xml_parse_label), (xml_parse_objects), + (xml_parse_object_text), (xml_parse_object_image), + (xml_parse_object_barcode), (xml_parse_data), + (xml_parse_toplevel_span), (gl_xml_label_save), + (xml_create_objects): + Re-classified g_warnings to g_messages. + * src/merge-evolution.c: (gl_merge_evolution_open), + (gl_merge_evolution_close), (gl_merge_evolution_get_record): + Use g_warning to output errors encountered while + communicating with the evolution data server + instead of embedding them in the data. + +2005-12-08 Jim Evins + + * libglabels/libglabels-private.h: + Set G_LOG_DOMAIN + * libglabels/paper.c: (read_papers): + * libglabels/template.c: (read_templates): + Made appropriate warnings critical. + * src/Makefile.am: + * src/critical-error-handler.h: + * src/critical-error-handler.c: (gl_critical_error_handler_init), + (critical_error_handler): + Created critical error handler. + * src/glabels.c: (main): + Register critical error handler. + * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init): + * src/object-editor.c: (gl_object_editor_init): + * src/prefs-dialog.c: (gl_prefs_dialog_init): + * src/template-designer.c: (gl_template_designer_init): + * src/ui-property-bar.c: (gl_ui_property_bar_instance_init): + Made appropriate warnings critical. + +2005-11-27 Jim Evins + + * src/merge-evolution.c: (gl_merge_evolution_get_key_list), + (gl_merge_evolution_get_primary_key), + (gl_merge_evolution_get_record): + Don't create "record_key" pseudo-key. Don't populate + fields with null data. + +2005-11-25 Jim Evins + + * src/merge-evolution.c: (gl_merge_evolution_finalize), + (gl_merge_evolution_get_key_list), (gl_merge_evolution_open), + (gl_merge_evolution_get_record), (gl_merge_evolution_copy), + (free_field_list): + Query EDS for all supported fields. Patch provided by + Austin Henry . + +2005-10-29 Jim Evins + + * src/glabels.c: (main): + * src/label-barcode.c: (gl_label_barcode_finalize): + * src/label-text.c: (gl_label_text_finalize), (set_font_family): + * src/label.c: (gl_label_instance_init), (gl_label_finalize): + * src/object-editor.c: (gl_object_editor_finalize): + Another pass at valgrinding -- plugged several memory leaks. + * src/view-text.c: (gl_view_text_new), + (update_canvas_item_from_object_cb), (draw_hacktext): + Commented out artifacts of edit-in-place code. + +2005-10-28 Jim Evins + + * src/canvas-hacktext.c: (gl_canvas_hacktext_set_arg): + Fixed use of uninitialized variable. Caught by + d binderman . + +2005-10-27 Jim Evins + + * src/merge-evolution.c: (gl_merge_evolution_get_record): + * src/merge-vcard.c: (gl_merge_vcard_get_record), + (parse_next_vcard): + Additional cleanup of EDS and vcard backends. Provided by + Austin Henry . + +2005-10-24 Jim Evins + + * AUTHORS: + * src/Makefile.am: + * src/merge-evolution.c: + * src/merge-evolution.h: + * src/merge-init.c: (gl_merge_init): + * src/merge-properties-dialog.c: (type_changed_cb): + * src/merge-vcard.c: + * src/merge-vcard.h: + * src/ui-commands.c: (gl_ui_cmd_help_about): + Added Evolution Data Server and VCard merge backends. Original patch + provided by Austin Henry . + * configure.in: + Only support EDS and VCard backends if libebook is installed. Allow + user to disable support, even if installed. + +2005-10-24 Jim Evins + + * AUTHORS: + * data/templates/avery-iso-templates.xml: + * data/templates/avery-us-templates.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/zweckform-iso-templates.xml: + Collected all template changes and submissions since last + release. + +2005-10-23 Jim Evins + + * configure.in: + * data/mime/Makefile.am: + Added configure options to disable update-mime-database and + update-desktop-database as part of the install. Patch + provided by Leonardo Boshell (qhoracio@sourceforge.net). + +2005-10-23 Jim Evins + + * libglabels/xml.h: + * libglabels/xml.c: (gl_xml_get_prop_string), + (gl_xml_get_prop_i18n_string), (gl_xml_set_prop_string), + (gl_xml_is_node), (gl_xml_get_node_content): + Added new XML utility functions. + * libglabels/xml-paper.c: + * libglabels/xml-template.c: + * src/xml-label.c: + Cleanup by using new xml utilities created above. + * libglabels/paper.c: (gl_paper_free): + * src/file.c: (new_response): + * src/object-editor-image-page.c: (add_image_filters_to_chooser): + * src/pixbuf-cache.c: (gl_pixbuf_cache_add_pixbuf), + (gl_pixbuf_cache_get_pixbuf): + * src/ui-property-bar.c: + (gl_ui_property_bar_construct_color_combo): + * src/view-highlight.c: (gl_view_highlight_finalize): + * src/view-image.c: (update_object_from_editor_cb): + * src/view.c: (gl_view_finalize), (draw_bg_fg_layers), + (draw_bg_fg_rounded_rect), (draw_bg_fg_round), (draw_bg_fg_cd), + (draw_bg_fg_cd_bc), (draw_markup_layer), (draw_markup_margin), + (draw_markup_margin_rect), (draw_markup_margin_rounded_rect), + (draw_markup_margin_round), (draw_markup_margin_cd), + (draw_markup_margin_cd_bc): + * src/wdgt-mini-preview.c: (mini_outline_list_new): + * src/wdgt-rotate-label.c: (gl_wdgt_rotate_label_finalize): + Plugged various memory leaks located with valgrind. + * src/view-image.c: (update_canvas_item_from_object_cb): + Don't allow a width or height of zero when drawing pixbuf. + +2005-10-22 Jim Evins + + * libglabels/xml-paper.c: + * libglabels/xml-template.c: + * libglabels/xml.c: + * src/base64.c: + * src/bc-gnubarcode.c: + * src/canvas-hacktext.c: + * src/label-text.c: + * src/object-editor-data-page.c: + * src/print-dialog.c: + * src/print.c: + * src/recent.c: + * src/template-designer.c: + * src/text-node.c: + * src/ui-property-bar.c: + * src/ui.c: + * src/view-barcode.c: + * src/view-box.c: + * src/view-ellipse.c: + * src/view-image.c: + * src/view-line.c: + * src/view-text.c: + * src/view.c: + * src/wdgt-media-select.c: + * src/xml-label-04.c: + * src/xml-label-191.c: + * src/xml-label.c: + Modified to compile warning free with gcc-4.0. Mostly + casting to change signedness of characters. Did not + attack gnu-barcode library yet. + +2005-10-22 Jim Evins + + * src/glabels.c: (main): + * src/splash.c: (gl_splash): + Removed some small memory leaks. + * gtk-doc.make: + Added. + +2005-09-19 Jim Evins + + * data/glade/property-bar.glade: + Remove items from font_family_combo. This prevents the + double entry after adding text model and list of fonts. + * src/ui-property-bar.c: (reset_to_default_properties): + Free font_family_list. + +2005-07-01 Jim Evins + + * po/it.po: + Updated italian translation (Daniele Medri) + +2005-06-26 Jim Evins + + * docs/libglabels/libglabels-decl-list.txt: + Somehow never got checked in before. + * docs/libglabels/libglabels.types: + Removed -- don't need it afterall. + +2005-06-20 Jim Evins + + * NEWS: + Final prep for 2.1.1 release. + +2005-06-20 Jim Evins + + * configure.in: + Final preps for 2.1.1 release. + * docs/libglabels/libglabels.types: + Somehow never got checked in before. + * po/POTFILES.in: + Bring up-to-date with recent reorg of ui code. + + +2005-06-19 Jim Evins + + * src/template-designer.c: (construct_layout_page): + Removed attempt to match background color of mini preview widget to + background. + +2005-06-17 Jim Evins + + * help/C/figures/merge-ex2-4.png: + * help/C/glabels.xml: + Fixed spelling error. + +2005-06-13 Jim Evins + + * help/C/figures/merge-ex1-1.png: + * help/C/figures/merge-ex1-2.png: + * help/C/figures/merge-ex1-3.png: + * help/C/figures/merge-ex1-4.png: + * help/C/figures/merge-ex2-1.png: + * help/C/figures/merge-ex2-2.png: + * help/C/figures/merge-ex2-3.png: + * help/C/figures/merge-ex2-4.png: + Added figures for document merge tutorial. + * help/C/glabels.xml: + Added document merge tutorial. + +2005-05-19 Jim Evins + + * data/glade/merge-properties-dialog.glade: + Fixed irregular spacing. + * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init), + (gl_merge_properties_dialog_construct): + Set outer padding and remove separator. + +2005-05-18 Jim Evins + + * src/hig.h: + * src/hig.c: + Removed glHigDialog class. + * src/file.c: (gl_file_new), (create_new_dialog_widgets), + (gl_file_properties), (create_properties_dialog_widgets): + * src/prefs-dialog.h: + * src/prefs-dialog.c: (gl_prefs_dialog_get_type), + (gl_prefs_dialog_init), (gl_prefs_dialog_construct): + * src/print-dialog.h: + * src/prefs-dialog.h: + * src/print-dialog.c: (gl_print_dialog_get_type), + (gl_print_dialog_init), (gl_print_dialog_construct): + Replaced all instances of glHigDialog with GtkDialog. + +2005-05-17 Jim Evins + + * src/hig.h: + * src/hig.c: + Removed HigAlert class since it is obsoleted by the GtkMessageDialog class. + * src/file.c: (open_response), (gl_file_open_real), (gl_file_save), + (save_as_response), (gl_file_close): + Replaced all instances of HigAlert widgets with GtkMessageDialog widgets. + +2005-05-15 Jim Evins + + * src/ui-commands.h: + * src/ui-util.c: + * src/ui-util.h: + * src/ui.c: + * src/ui.h: + * src/view.c: + * src/window.c: + * src/window.h: + A little code reformatting -- no functional changes. + +2005-05-14 Jim Evins + + * src/Makefile.am: + Removed obsolete macros. + * src/marshal.list: + Added marshalling template to support new view signal: "context_menu_activate." + * src/view.h: + * src/view.c: (gl_view_class_init), (gl_view_construct), + (canvas_event_arrow_mode): + - Removed hardcoded context menus and added new signal "context_menu_activate" + to push this up to the uimanager. + - Removed merge properties and print dialogs so that they can be managed with + the window by the uimanager. + * src/merge-properties-dialog.h: + * src/merge-properties-dialog.c: (gl_merge_properties_dialog_new), + (gl_merge_properties_dialog_construct): + Changed calling convention of gl_merge_properties_dialog_new() to use + glLabel and GtkWindow instead of view to make more consistent with other + dialogs. + * src/print-dialog.h: + * src/print-dialog.c: (gl_print_dialog_new), + (gl_print_dialog_construct): + Removed last artifact of libbonoboui. + * src/ui-commands.c: (gl_ui_cmd_file_print), + (gl_ui_cmd_objects_merge_properties), (gl_ui_cmd_help_about): + Reconciled style for launching dialogs. + * src/ui.c: (gl_ui_new): + Added context menus to ui manager. + * src/view-object.c: (item_event_arrow_mode): + No longer try to select objects with right-click. + * src/window.h: + * src/window.c: (gl_window_init), (gl_window_set_label), + (context_menu_activate_cb): + Context menus and all dialogs are now managed in a consistent way in window + by the ui manager. + +2005-05-11 Jim Evins + + * src/window.h: + * src/window.c: (gl_window_init), (gl_window_destroy): + * src/ui.c: (gl_ui_new), (gl_ui_unref), (recent_tooltip_func): + * src/ui-commands.c: (gl_ui_cmd_file_open_recent): + Moved management of recent_view back from window.c to ui.c -- it just feels + better there. + +2005-05-10 Jim Evins + + * src/window.h: + * src/window.c: (gl_window_init): + * src/ui.h: + * src/ui.c: (gl_ui_new), (connect_proxy_cb), (disconnect_proxy_cb), + (menu_item_select_cb), (menu_item_deselect_cb): + Added GtkStatusbar which displays menu tooltips. + +2005-05-09 Jim Evins + + Replaced libbonoboui with GtkUIManager for creation of basic user interface menus + and toolbars. + + * configure.in: + * glabels.spec.in: + Removed dependencies on libbonoboui. + * data/Makefile.am: + * data/ui/Makefile.am: + * data/ui/glabels-ui.xml: + Removed data/ui directory. + * data/glade/Makefile.am: + * data/property-bar.glade: + Added glade description of property-bar for new libglade implementation + of glUIPropertyBar. + * src/Makefile.am: + * src/commands.h: + * src/commands.c: + * src/tools.h: + * src/tools.c: + * src/ui-commands.h: + * src/ui-commands.c: + Replaced commands.[ch] and tools.[ch] with the single ui-commands.[ch] module + since the distinction between "commands" and "tools" is no longer that clear. + * src/file.h: + * src/file.c: + Modified to expect glWindow instead of GtkWindow. gl_file_open_recent() + no longer has knowledge of eggRecent*. + * src/glabels.c: (main): + Removed libbonobo initialization and replaced bonobo_main loop with gtk_main + loop. + * src/object-editor.c: (gl_object_editor_init): + Make sure notebook does not respond to a "show_all" on the parent. + * src/recent-files/Makefile.am: + * src/recent-files/*.[ch] + Updated from latest version of libegg which now has a view based on + GtkUIManager. Removed unused bonobo and gtk views. + * src/ui-property-bar.h: + * src/ui-property-bar.c: + New implementation based on libglade. + * src/ui-sidebar.h: + * src/ui-sidebar.c: + Sidebar is now simply a GtkWidget and does not expect to be a part of + a libbonoboui interface. + * src/ui-util.h: + * src/ui-util.c: + * src/ui.h: + * src/ui.c: + Converted for use with GtkUIManager. + * src/window.h: + * src/window.c: + Now derived from GtkWindow instead of BonoboWindow and uses GtkUIManager + to create menus and toolbars. + +2005-04-25 Jim Evins + + * data/templates/misc-iso-templates.xml: + Added Fellows 04715 template provided by Steve Saxon. + * AUTHORS: + Updated acknowledgement for above. + +2005-04-23 Jim Evins + + * src/util.c: (gl_util_combo_box_set_strings): + Make sure to clear model before loading a new list of strings. + * src/wdgt-media-select.h: + * src/wdgt-media-select.c: (gl_wdgt_media_select_instance_init), + (gl_wdgt_media_select_construct), (page_size_combo_changed_cb), + (template_combo_changed_cb), (prefs_changed_cb), + (gl_wdgt_media_select_get_name), (gl_wdgt_media_select_set_name), + (gl_wdgt_media_select_get_page_size), + (gl_wdgt_media_select_set_page_size): + Replaced the deprecated GtkCombo widget with the new + GtkComboBox. + +2005-04-21 Jim Evins + + * data/glade/template-designer.glade: + * src/template-designer.c: (construct_pg_size_page), + (pg_size_page_changed_cb), (build_template): + Replaced the deprecated GtkCombo widget with the new + GtkComboBox. + +2005-04-20 Jim Evins + + * data/glade/prefs-dialog.glade: + * src/prefs-dialog.c: (construct_object_page), + (update_object_page_from_prefs), (update_prefs_from_object_page): + Replaced the deprecated GtkCombo widget with the new + GtkComboBox. + +2005-04-19 Jim Evins + + * data/glade/object-editor.glade: + * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page), + (style_changed_cb), (gl_object_editor_set_bc_style), + (gl_object_editor_get_bc_style), (gl_object_editor_set_bc_color), + (gl_object_editor_get_bc_color): + * src/object-editor-data-page.c: + (gl_object_editor_prepare_data_page), (gl_object_editor_set_data), + (gl_object_editor_get_data): + * src/object-editor-edit-page.c: + (gl_object_editor_prepare_edit_page), (insert_button_cb): + * src/object-editor-fill-page.c: + (gl_object_editor_prepare_fill_page), + (gl_object_editor_set_fill_color), + (gl_object_editor_get_fill_color): + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page), + (gl_object_editor_set_image), (gl_object_editor_get_image): + * src/object-editor-line-page.c: + (gl_object_editor_prepare_line_page), + (gl_object_editor_set_line_color), + (gl_object_editor_get_line_color): + * src/object-editor-private.h: + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page), + (gl_object_editor_set_font_family), + (gl_object_editor_get_font_family), + (gl_object_editor_set_text_color), + (gl_object_editor_get_text_color): + * src/object-editor.c: (gl_object_editor_set_key_names): + * src/ui-sidebar.c: + In the object editor: replaced all instances of the deprecated + GtkCombo widget with the new GtkComboBox. + +2005-04-18 Jim Evins + + * src/stock.c: + Neglected to save this one in previous checkin to support + header cleanup. + +2005-04-17 Jim Evins + + * libglabels/libglabels-private.h: + * libglabels/paper.c: + * libglabels/paper.h: + * libglabels/template.c: + * libglabels/template.h: + * libglabels/xml-paper.c: + * libglabels/xml-paper.h: + * libglabels/xml-template.c: + * libglabels/xml.c: + * libglabels/xml.h: + * src/base64.c: + * src/base64.h: + * src/bc-gnubarcode.c: + * src/bc-postnet.c: + * src/bc.c: + * src/bc.h: + * src/commands.c: + * src/debug.c: + * src/debug.h: + * src/file.c: + * src/file.h: + * src/hig.c: + * src/hig.h: + * src/label-barcode.c: + * src/label-box.c: + * src/label-ellipse.c: + * src/label-image.c: + * src/label-image.h: + * src/label-line.c: + * src/label-object.c: + * src/label-text.c: + * src/label-text.h: + * src/label.c: + * src/merge-properties-dialog.c: + * src/object-editor-bc-page.c: + * src/object-editor-data-page.c: + * src/object-editor-edit-page.c: + * src/object-editor-fill-page.c: + * src/object-editor-image-page.c: + * src/object-editor-line-page.c: + * src/object-editor-lsize-page.c: + * src/object-editor-position-page.c: + * src/object-editor-private.h: + * src/object-editor-size-page.c: + * src/object-editor-text-page.c: + * src/object-editor.c: + * src/object-editor.h: + * src/pixbuf-cache.h: + * src/prefs-dialog.c: + * src/prefs-dialog.h: + * src/prefs-model.c: + * src/prefs-model.h: + * src/prefs.c: + * src/print-dialog.c: + * src/print-dialog.h: + * src/print.c: + * src/print.h: + * src/recent.c: + * src/recent.h: + * src/splash.c: + * src/splash.h: + * src/stock.h: + * src/template-designer.c: + * src/template-designer.h: + * src/text-node.h: + * src/tools.c: + * src/ui-property-bar.c: (gl_ui_property_bar_construct): + * src/ui-sidebar.c: + * src/ui-util.c: + * src/ui.c: + * src/util.c: + * src/util.h: + * src/view-barcode.c: + * src/view-box.c: + * src/view-ellipse.c: + * src/view-highlight.c: + * src/view-highlight.h: + * src/view-image.c: + * src/view-line.c: + * src/view-object.c: + * src/view-object.h: + * src/view-text.c: + * src/view.c: + * src/view.h: + * src/wdgt-chain-button.c: + * src/wdgt-media-select.c: + * src/wdgt-media-select.h: + * src/wdgt-mini-preview.c: + * src/wdgt-mini-preview.h: + * src/wdgt-print-copies.c: + * src/wdgt-print-copies.h: + * src/wdgt-print-merge.c: + * src/wdgt-print-merge.h: + * src/wdgt-rotate-label.c: + * src/wdgt-rotate-label.h: + * src/window.c: + * src/window.h: + * src/xml-label-04.c: + * src/xml-label-191.c: + * src/xml-label.c: + Cleanup of header files: + - all header files are now stand-alone, verified by including + first in corresponding "c" files + - replaced blanket includes of gnome, gtk, and glib with + targetted includes + +2005-04-16 Jim Evins + + * data/glade/Makefile.am: + * data/glade/merge-properties-dialog.glade: + Added merge properties dialog glade description file. + * src/merge-properties-dialog.h: + * src/merge-properties-dialog.c: + (gl_merge_properties_dialog_get_type), + (gl_merge_properties_dialog_init), + (gl_merge_properties_dialog_finalize), + (gl_merge_properties_dialog_new), + (gl_merge_properties_dialog_construct), (type_changed_cb), + (src_changed_cb), (response_cb), (load_tree), + (record_select_toggled_cb), (select_all_button_clicked_cb), + (unselect_all_button_clicked_cb): + Modified merge properties dialog to use libglade. Added + "select all" and "unselect all" buttons. + * src/merge-text.c: (parse_line): + Handle empty lines better. + * src/merge.c: (gl_merge_eval_key): + Evaluate the key whether the record is selected or not. + * src/util.h: + * src/util.c: (gl_util_combo_box_add_text_model): + Since libglade does not use the gtk_combo_box_new_text() + constructor for GtkComboBoxes, a utility function was created + to add an appropriate text model to a GtkComboBox. + * src/view.c: (gl_view_edit_merge_props): + Removed unnecessary "show all's". + +2005-04-15 Jim Evins + + * po/ru.po: + Updated russian translation (Vitaly Lipatov) + * data/templates/misc-iso-templates.xml: + Added templates for russian business cards provided by Vitaly Lipatov. + * AUTHORS: + Updated acknowledgements for above. + +2005-04-15 Jim Evins + + * data/templates/avery-us-templates.xml: + Added Avery 5388 and 5389 templates provided by Peter L. Berghold. + * data/templates/misc-iso-templates.xml: + Added Ryman standard CD/DVD template, provided by Dan Clark. + * AUTHORS: + Added acknowledgements for above. + +2005-04-10 Jim Evins + + * libglabels/xml-paper.c: (gl_xml_paper_parse_paper_node): + * libglabels/xml-template.c: (gl_xml_template_parse_template_node), + (xml_parse_label_rectangle_node), (xml_parse_label_round_node), + (xml_parse_label_cd_node), (xml_parse_alias_node): + * libglabels/xml.c: (gl_xml_get_prop_double), + (gl_xml_get_prop_boolean), (gl_xml_get_prop_int), + (gl_xml_get_prop_uint), (gl_xml_get_prop_length): + * src/xml-label-04.c: (xml04_parse_media_description), + (xml04_parse_text_props), (xml04_parse_barcode_props), + (xml04_parse_merge_properties): + * src/xml-label-191.c: (xml191_parse_object), + (xml191_parse_text_props), (xml191_parse_barcode_props), + (xml191_parse_merge_fields), (xml191_parse_pixdata), + (xml191_parse_sheet), (xml191_parse_label), (xml191_parse_markup), + (xml191_parse_alias): + * src/xml-label.c: (xml_parse_object_text), + (xml_parse_object_barcode), (xml_parse_merge_fields), + (xml_parse_pixdata), (xml_parse_toplevel_span): + Make sure to use xmlFree for anything obtained from libxml + in case libxml and glib use different memory management + space. + +2005-04-08 Jim Evins + + * src/util.h: + * src/util.c: (gl_util_combo_box_set_strings), (search_text_func), + (gl_util_combo_box_set_active_text): + Added utility functions to simplify working with GtkComboBox + widgets in GTK-2.6. + * src/ui-property-bar.h: + * src/ui-property-bar.c: (gl_ui_property_bar_construct), + (reset_to_default_properties), (update_text_properties), + (font_family_changed_cb): + Replaced deprecated GtkCombo with GtkComboBox. + + +2005-04-03 Jim Evins + + * src/Makefile.am: + * src/wdgt-image-select.h: + * src/wdgt-image-select.c: + Removed obsolete wdgt-image-select.[ch] files. + * libglabels/paper.c: (gl_paper_dup): + Fixed rename of parameter introduced during documentation + updates. + * data/glade/object-editor.glade: + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page), (img_radio_toggled_cb), + (gl_object_editor_set_image), (gl_object_editor_get_image), + (update_preview_cb), (add_image_filters_to_chooser): + * src/object-editor-private.h: + Replaced deprecated GnomePixmapEntry with + GtkFileChooserButton. + +2005-04-02 Jim Evins + + * src/mygal/mygal-combo-box.c: (deactivate_arrow), + (mygal_combo_box_popup_hide_unconditional), + (mygal_combo_box_popup_hide), (mygal_combo_box_popup_display), + (mygal_combo_toggle_pressed), (mygal_combo_box_init), + (mygal_combo_popup_tear_off), (mygal_combo_set_tearoff_state), + (mygal_combo_tearoff_bg_copy), (mygal_combo_popup_reparent), + (cb_tearable_button_release), (mygal_combo_box_set_tearable): + Renamed all internal gtk_combo functions to mygal_combo + to prevent namespace confusion. + +2005-04-02 Jim Evins + + * src/mygal/color-palette.c: (color_palette_change_custom_color), + (cust_color_set), (color_palette_setup): + * src/mygal/color-palette.h: + Replaced deprecated GnomeColorPicker with GtkColorButton. + +2005-04-02 Jim Evins + + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/enums.sgml: + * docs/libglabels/tmpl/paper.sgml: + * docs/libglabels/tmpl/xml-paper.sgml: + * docs/libglabels/tmpl/xml-template.sgml: + * libglabels/enums.h: + * libglabels/paper.c: (gl_paper_dup): + * libglabels/paper.h: + * libglabels/xml-paper.c: + * libglabels/xml-template.c: + More documentation updates for libglabels. + +2005-03-23 Jim Evins + + * INSTALL: + Automatically updated. + * Makefile.am: + * autogen.sh: + * configure.in: + * docs/Makefile.am: + * docs/libglabels/Makefile.am: + * docs/libglabels/libglabels-docs.sgml: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/enums.sgml: + * docs/libglabels/tmpl/libglabels-unused.sgml: + * docs/libglabels/tmpl/libglabels.sgml: + * docs/libglabels/tmpl/paper.sgml: + * docs/libglabels/tmpl/template.sgml: + * docs/libglabels/tmpl/xml-paper.sgml: + * docs/libglabels/tmpl/xml-template.sgml: + * docs/libglabels/tmpl/xml.sgml: + Added basic gtk-doc stuff to support documenting libglabels + API. + * libglabels/xml.c: + Updated function comments with gtk-doc markup. + * missing: + Removed. + +2005-03-22 Jim Evins + + Since the development version now requires gtk-2.6/gnome-2.10, I + have made a first pass at removing deprecations. + + * configure.in: + * libglabels/Makefile.am: + * src/Makefile.am: + Added configure option to turn on X_DISABLE_DEPRECATED flags. + Also removed all remnants of HAVE_FILECHOOSER. + * src/file.c: (gl_file_open_real): + Removed code for old GtkFileSelection. + * libglabels/libglabels-private.h: + * libglabels/paper.c: + * libglabels/template.c: + * libglabels/xml-paper.c: + * libglabels/xml-template.c: + * libglabels/xml.c: + * src/bc.c: + * src/file.c: + * src/glabels-batch.c: + * src/glabels.c: + * src/label.c: + * src/merge-init.c: + * src/merge-properties-dialog.c: + * src/merge.c: + * src/object-editor.c: + * src/prefs-dialog.c: + * src/prefs.c: + * src/print-dialog.c: + * src/print.c: + * src/stock.c: + * src/template-designer.c: + * src/ui-property-bar.c: + * src/ui-sidebar.c: + * src/view-barcode.c: + * src/view-box.c: + * src/view-ellipse.c: + * src/view-image.c: + * src/view-line.c: + * src/view-text.c: + * src/view.c: + * src/wdgt-image-select.c: + * src/wdgt-media-select.c: + * src/wdgt-print-copies.c: + * src/wdgt-print-merge.c: + * src/wdgt-rotate-label.c: + * src/window.c: + * src/xml-label-04.c: + * src/xml-label-191.c: + * src/xml-label.c: + Added '#include " where needed. + Removed any unused '#include "s. + +2005-03-22 Jim Evins + + * src/commands.c: (activate_url), (gl_cmd_help_about): + Replaced GnomeAbout with GtkAboutDialog. Therefore the + development version of glabels now depends on GTK 2.6 and + GNOME 2.10. + * configure.in: + Updated library dependencies. + +2005-02-28 Jim Evins + + * AUTHORS: + * data/templates/misc-iso-templates.xml: + Added 'Ednet 45021' template provided by Ali Akcaagac + . + +2005-02-14 Jim Evins + + * data/templates/avery-us-templates.xml: + Updated templates to use inches instead of points. + * src/print-dialog.c: (printer_page_new): + Changed packing style when adding printer selector widget. This fixes + debian Bug#295274. + +2005-02-13 Jim Evins + + * AUTHORS: + * po/es.po: + Updated spanish translations. (sergio rivadero) + +2005-02-05 Jim Evins + + Some cleanup to libglabels. + + * configure.in: + Updated version to 2.1.1cvs. Added generation of libglabels.pc. + * libglabels/libglabels.pc.in + Created. + * libglabels/enums.h + Created. Currently only contains glUnitsType which provides enumerations + for all possible units of distance. + * libglabels/Makefile.am: + Incorporated new files enums.h and libglabels.pc[.in]. + * libglabels/libglabels.h: + Include enums.h. + * libglabels/template.h: + * libglabels/template.c: (gl_template_layout_new): + Changed parameters nx and ny to gint from gdouble. + * libglabels/xml.h: + * libglabels/xml.c: (gl_xml_get_prop_length), + (gl_xml_set_prop_length), (gl_xml_set_default_units): + Added support for different output units. + * src/prefs-dialog.c: (update_locale_page_from_prefs), + (update_prefs_from_locale_page): + * src/prefs-model.c: (string_to_units), (units_to_string): + * src/prefs-model.h: + * src/prefs.c: (gl_prefs_get_units_per_point), + (gl_prefs_get_units_precision), (gl_prefs_get_units_step_size), + (gl_prefs_get_units_string): + * src/prefs.h: + * src/wdgt-media-select.c: (details_update), (get_label_size_desc): + Reconciled all length enumerations with the new enumerations provided + in libglabels/enums.h. + +2005-02-03 Jim Evins + + * po/cs.po: + Updated Czech translations. (David Makovský and Zbynek Mrkvick) + * po/it.po: + Updated Italian translations. (Daniele Medri) + * AUTHORS: + Updated credits to reflect above translations. + + +2005-01-22 Jim Evins + + * MESSAGE-OF-DOOM: + Added. + * Makefile.am: + Added MESSAGE-OF-DOOM to EXTRA_DIST. + * NEWS: + Final prep for 2.1.0. + * configure.in: + Set version to 2.1.0. Output MESSAGE-OF-DOOM. + * glabels.spec.in: + Added '--remove-original' flag to desktop-file-install, so that there is + only one menu entry. + +2005-01-20 Jim Evins + + * data/glade/object-editor.glade: + - Font family entry should not be editable. + - img_key_entry should have sensitivity=YES, so that it follows the + sensitivity of img_key_combo. + +2005-01-19 Jim Evins + + * AUTHORS: + Give credit to Frederic Ruaudel for the color merge patches. + +2005-01-18 Frederic Ruaudel + + Add support to merge color for all other color attribute (Feature + Requests item #1008635. If the data is invalid, the color used is transparent + (GL_COLOR_NONE). The format for color in merge data file are those accepted + by gdk_color_parse() these include name for a color from rgb.txt, such as + DarkSlateGray, or a hex specification such as #305050. File format has been + changed but backward compatibility is preserved for all format. For + box/ellipse/line, keep attribute "line_color" for static color or replace by + "line_color_field" for merge data. For text/barcode objects, keep attribute + "color" for static color or replace by "color_field" for merge data. In the + edit canvas window, merged color are represented by half-transparent black + line/area. + + * data/dtd/glabels-2.0.dtd: + Added line_color_field to line_attrs. Added color_field to + Object-barcode and Span. + * data/glade/object-editor.glade: + Modify the layout of the editor to add merge possibility to color options + * src/color.c: + Fix a copy/paste error in a comment + * src/color.h: + Add default color for merge color representation in the editor canvas. + * src/label-barcode.c: + * src/object-editor-bc-page.c: + * src/view-barcode.c: + Add merge color support for barcode color. + * src/label-box.c: + * src/view-box.c: + Add merge color support for box border color. + * src/label-ellipse.c: + * src/view-ellipse.c: + Add merge color support for ellipse border color. + * src/label-line.c: + * src/view-line.c: + Add merge color support for line color. + * src/label-object.c: + * src/label-object.h: + * src/object-editor.c: + * src/object-editor.h: + * src/ui-property-bar.c: + * src/view.c: + * src/view.h: + * src/xml-label-04.c: + * src/xml-label-191.c: + Add support for merging to other color attribute. + * src/label-text.c: + * src/object-editor-text-page.c: + * src/view-text.c: + Add merge color support for text color. + * src/object-editor-fill-page.c: + Change a blocked handler that didn't match the good widget. Fix the type + of some debug message. + * src/object-editor-line-page.c: + Add merging support to line color option. + * src/object-editor-private.h: + Add variables for new widget. + * src/print.c: + Modify the draw functions to get merge data if needed. + * src/window.c: + Change the default size of the window in order to see all widget in the + "text style tab" of the editor. + * src/xml-label.c: + Modify the parser to record/retreive the field value for objects that need + "color" attribute. For box/ellipse/line, keep attribute "line_color" for + static color or replace by "line_color_field" for merge data. For + text/barcode objects, keep attribute "color" for static color or replace + by "color_field" for merge data. + +2005-01-17 Jim Evins + + * src/view.c: (screen_changed_cb): + Don't do anything if we don't have a screen. + +2005-01-06 Jim Evins + + * src/view.c: (get_home_scale): + Fixed bad call to gtk_widget_has_screen() -- huh?. + +2005-01-06 Jim Evins + + * data/dtd/glabels-2.0.dtd: + Added fill_color_field to fill_attrs. Also added xmlns attribute to all + top-level elements. + +2005-01-06 Jim Evins + + * data/glade/object-editor.glade: + Set entries for fill and data field key dropdowns to NOT editable. + * src/view-box.c: (construct_properties_editor): + * src/view-ellipse.c: (construct_properties_editor): + Update object editor when label's merge property has changed. + * src/xml-label.c: (xml_parse_object_ellipse): + Completed the merge color support for the ellipse item. + +2005-01-06 Frederic Ruaudel + + Add support to merge color for object that have a "Fill color" attribute (Feature + Requests item #1008635. If the data is invalid, the color used is transparent + (GL_COLOR_NONE). The format for color in merge data file are those accepted + by gdk_color_parse() these include name for a color from rgb.txt, such as + DarkSlateGray, or a hex specification such as #305050. File format has been + changed but backward compatibility is preserved for all format. For box/ellipse, + keep attribute "fill_color" for static color or replace by "fill_color_field" + for merge data. + + * data/glade/object-editor.glade: + Modify "Fill" tab to add the merge key combo and convert the labels into + radio button. + * src/color.h: + * src/color.c: + Add "glColorNode" structure and associated functions to manage it. This + structure is equivalent for color than the "glTextNode". It holds the color + and the key field. + * src/label-object.h: + * src/label-object.c: + * src/label-box.c: + * src/label-ellipse.c: + * src/ui-property-bar.c: + * src/view.h: + * src/view.c: + * src/view-box.c: + * src/view-ellipse.c: + * src/xml-label-04.c: + * src/xml-label-191.c: + Change functions of objects that have a "fill color" attribute to use the + new "glColorNode" structure. Use barcode code as example. + * src/Makefile.am: + Add the color.[ch] file to glabels_batch binary that now need support for + "glColorNode". + * src/object-editor.h: + * src/object-editor.c: + * src/object-editor-fill-page.c: + Manage the new widget of the editor's "Fill" tab : key combo and radio button + to choose between static color or merge key. Use barcode code as example. + * src/object-editor-private.h: + Add new widget in the "_glObjectEditorPrivate" structure. + * src/print.c: + Modify the draw functions to get merge data if needed. + * src/xml-label.c: + Modify the parser to record/retreive the field value for objects that need + "Fill color" attribute. For box/ellipse, put attribute "fill_color" for static + color or "fill_color_field" for merge data. + +2005-01-04 Jim Evins + + * AUTHORS: + * data/templates/avery-iso-templates.xml: + * data/templates/misc-iso-templates.xml: + * data/templates/misc-us-templates.xml: + Added templates, submitted by Larry Harriman, Juan Carlos Valero, and + Nick Hill. + +2004-11-26 Jim Evins + + * AUTHORS: + * po/fr.po: + Updated french translations provided by Florent Morel . + * src/view-barcode.c: + * src/view-box.c: + * src/view-ellipse.c: + * src/view-image.c: + * src/view-line.c: + * src/view-text.c: + Added '#include ' -- HAVE_*GETTEXT macros were not defined and + thus _() strings were not being translated. + +2004-11-14 Jim Evins + + * src/debug.h: + * src/debug.c: (gl_debug_init), (gl_debug): + Borrowed from gedit: use environmental variables to select debug + sections. + * src/splash.c: + Removed unused include of debug.h. + * src/glabels.c: (main): + Added call to gl_debug_init(), and removed debug clutter from command line + options. + * src/glabels-batch.c: (main): + Added call to gl_debug_init(). + +2004-11-13 Jim Evins + + Drawing and property toolbars were being initialized with the "icons and text" + look in Fedora Core 3. Even though none of the buttons had any text attached to + them, the buttons were being sized as if they were. This led to less real estate + for the property editor, leading to Bug #1064630. The + + * data/ui/glabels-ui.xml: + Added explicit "look" property to both drawing and property toolbars. + * src/prefs-model.c: (gl_prefs_model_save_settings), + (gl_prefs_model_load_settings): + * src/prefs-model.h: + Removed drawing_toolbar_button_style configuration parameter. + * src/ui.c: (view_menu_item_toggled_cb), + (set_app_drawing_toolbar_style): + Do not attempt to adjust look property of the drawing toolbar. + +2004-10-28 Jim Evins + + * data/pixmaps/glabels-about-logo.png: + Updated about logo. + +2004-10-28 Jim Evins + + * data/man/glabels.1: + * src/glabels-batch.c: (main): + * src/print.h: + * src/print.c: (gl_print_batch): + + Added option to glabels-batch to select the first label to begin + printing on. + +2004-09-26 Jim Evins + + * data/desktop/glabels.desktop.in: + Point to app icon, "glabels.png" + * data/mime/glabels.keys.in: + Point at mime icon, "glabels-application-x-glabels.png" + * data/pixmaps/Makefile.am: + Added glabels_app_icondir. Renamed icons. + * data/pixmaps/glabels.png: + New cleaned up app icon. Deleted glabels-icon.png. + * data/pixmaps/glabels-application-x-glabels.png: + New mime icon. + * data/pixmaps/glabels-splash.png: + Renamed glabels-logo to glabels-splash to be more correct about role. + * src/glabels.c: + * src/template-designer.c: + Point at app icon, "glabels.png" + * src/splash.c: + Point at renamed splash image, "glabels-splash.png" + +2004-08-22 Jim Evins + + * AUTHORS: + * src/glabels-batch.c: (main): + Applied patch with minor mods to allow selecting merge source and + crop-marks on glabels-batch's command line. Original patch provided by + José Dapena Paz . + +2004-08-15 Jim Evins + + * data/desktop/glabels.desktop.in: + - Added encoding line + - Removed period from comment + - Fixed Terminal line, changed "0" to "false" + - Added semicolen to Categories line + * po/ja.po: + - Made sure desktop.in comment string above still translated properly + +2004-08-14 Jim Evins + + * libglabels/xml-paper.c: (gl_xml_paper_parse_paper_node): + * libglabels/xml-template.c: (gl_xml_template_parse_template_node): + * src/xml-label-191.c: (xml191_parse_sheet): + Fixed improper freeing of gettext strings. Merged from 2.0.1. + * configure.in: + Reconciled libglabels versioning with 2.0.1. + + +2004-08-14 Jim Evins + + * configure.in: + Updated version to 2.1cvs. + +2004-08-14 Jim Evins + + * po/ja.po: + Updated 2.0.x translation by Takeshi AIHANA . + +2004-08-14 Jim Evins + + Fixes for Bug #1008181. + + * src/bc.c: (gl_barcode_default_digits): + Make a format of zero digits, harmless. + * src/xml-label.c: (xml_parse_object_barcode): + Set default value of the format property of barcode objects to 10, not + zero. This will prevent crashes when reading pre 2.0.x files. + +2004-08-09 Jim Evins + + * NEWS: + * TODO: + * help/C/glabels-C.omf: + * help/C/glabels.xml: + Brought documentation up-to-date for 2.0.0 release. + +2004-08-09 Jim Evins + + These are hopefully the final preparations for 2.0.0. + + * data/mime/Makefile.am: + Include glabels.xml in EXTRA_DIST. + * configure.in: + - Updated comment style. + - Added LIBGLABELS_VERSION_INFO macro, updated Current. + - Added package and version info to configuration printout + - Update version to 2.0.0 + * libglabels/Makefile.am: + Use the new LIBGLABELS_VERSION_INFO macro. + +2004-08-09 Jim Evins + + * configure.in: + * glabels.spec.in: + Cleanup of required library macros. + +2004-08-08 Jim Evins + + * glabels.spec.in: + - Updated URL + - More specific of what to install in /usr/bin and /usr/lib + - Remove built mime registration files from staging directory + +2004-08-08 Jim Evins + + * data/mime/Makefile.am: + Fixed typo: key_files should have been keys_files. + +2004-08-08 Jim Evins + + Reorganization of runtime data files. Also added registration of mimetype with + new freedesktop.org mime database if available. + + * data/* + Moved files to appropriate subdirectories, creating local Makefile.am + in each subdirectory. + - Moved paper-sizes.xml and *-templates.xml to templates subdirectory. + These are now installed at $datadir/glabels/templates. + - Moved glabels.1 to man subdirectory. + - Moved glabels-2.0.dtd to dtd subdirectory. + - Moved glabels.desktop.in to desktop subdirectory. + - Moved glabels.keys.in and glabels.mime to mime subdirectory. + * data/pixmaps/* + Moved "./pixmaps" to "./data/pixmaps" + * data/ui/* + Moved src/glabels-ui.xml to data/ui directory. Created Makefile.am. + * data/glade/* + Moved libglade files from src to data/glade. Created Makefile.am. + * Makefile.am: + Removed pixmaps from SUBDIRS. + * configure.in: + - Removed pixmaps from makefiles. + - Added makefiles for new subdirs of data. + - Added tests for freedesktop.org mime database. + * glabels.spec.in: + - Added tests for freedesktop.org mime database for post install and + post un-install actions. + * libglabels/Makefile.am: + Moved system template files to $(datadir)/glabels/templates. + * libglabels/libglabels-private.h: + Moved system template files to $(datadir)/glabels/templates. + * po/POTFILES.in: + - Accounted for movement of ui and libglade files. + - Added missing .in files. + - Reorganized by directory. + * src/Makefile.am: + Accounted for movement of ui and libglade files. + * data/mime/glabels.xml.in: + New file for registering with freedesktop.org mime database. + +2004-08-07 Jim Evins + + * src/recent-files/*: + Re-synced to latest libegg/recent-files. + +2004-08-07 Jim Evins + + * Makefile.am: + * configure.in: + * help/* + Renamed "./doc" directory to "./help" which contains user documentation, + to be more consistent with other GNOME applications. + + +2004-07-26 Jim Evins + + * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init): + Corrected button order of merge properties dialog. + +2004-07-18 Jim Evins + + * data/glabels-2.0.dtd: + * src/bc.c: (gl_barcode_default_digits), (gl_barcode_can_freeform), + (gl_barcode_get_prefered_n): + * src/bc.h: + * src/label-barcode.c: (copy), (gl_label_barcode_set_props), + (gl_label_barcode_get_props), (get_size): + * src/label-barcode.h: + * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page), + (style_changed_cb), (gl_object_editor_set_bc_style), + (gl_object_editor_get_bc_style): + * src/object-editor-data-page.c: (data_radio_toggled_cb), + (gl_object_editor_set_data), (gl_object_editor_get_data): + * src/object-editor-private.h: + * src/object-editor.c: (gl_object_editor_set_key_names): + * src/object-editor.glade: + * src/object-editor.h: + * src/print.c: (draw_barcode_object): + * src/view-barcode.c: (update_object_from_editor_cb), + (update_editor_from_object_cb), + (gl_view_barcode_create_event_handler), (draw_barcode): + * src/xml-label-04.c: (xml04_parse_barcode_props): + * src/xml-label-191.c: (xml191_parse_barcode_props): + * src/xml-label.c: (xml_parse_object_barcode), + (xml_create_object_barcode): + Added "format" attribute to barcode objects. This attribute is used + to properly format freeform barcodes barcodes prior to merge data is + applied, so that barcodes can be accurately layed out. This addresses + remaining issues of feature request #824787. Also added an example of + the format in the object editor. + +2004-07-12 Jim Evins + + Various code cleanups. + + * src/label-barcode.c: + Removed unneeded include of gnome-glyphlist.h. + + * src/label-text.c: (get_size): + Fixed memory leak: unref glyphlists when done with them. + + * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page): + * src/object-editor-data-page.c: + (gl_object_editor_prepare_data_page): + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page): + * src/object-editor-line-page.c: + (gl_object_editor_prepare_line_page): + * src/object-editor-lsize-page.c: + (gl_object_editor_prepare_lsize_page): + * src/object-editor-position-page.c: + (gl_object_editor_prepare_position_page): + * src/object-editor-size-page.c: + (gl_object_editor_prepare_size_page): + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page): + Removed unneeded size groups, originally intended to keep widgets aligned. + Now use tables to lay these out in object-editor.glade. + + * src/print.c: (draw_text_object): + Fixed memory leak: unref glyphlists when done with them. + + * src/view-barcode.c: (draw_barcode): + Fixed memory leak: unref glyphlists when done with them. + + * src/view-text.c: (update_object_from_editor_cb), (draw_hacktext): + - Removed unneeded cast of gl_object_editor_get_text_line_spacing()s + return value. + - Fixed memory leak: unref glyphlists when done with them. + +2004-07-11 Jim Evins + + * data/glabels-2.0.dtd: + * src/label-text.c: (gl_label_text_instance_init), (copy), + (gl_label_text_set_auto_shrink), (gl_label_text_get_auto_shrink): + * src/label-text.h: + * src/object-editor-private.h: + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page), + (gl_object_editor_set_text_auto_shrink), + (gl_object_editor_get_text_auto_shrink): + * src/object-editor.c: (gl_object_editor_set_key_names): + * src/object-editor.glade: + * src/object-editor.h: + * src/print.c: (draw_text_object): + * src/view-text.c: (update_object_from_editor_cb), + (update_editor_from_object_cb): + * src/xml-label.c: (xml_parse_object_text), + (xml_create_object_text): + Added option to allow document merge to auto shrink text size to fit + within the text box. The code in print.c that actually shrinks the + text is loosely based on a patch submitted by Mark Harrison + . This addresses feature request + #661421. + +2004-07-11 Jim Evins + + * data/glabels-2.0.dtd: + * libglabels/template.c: (gl_template_rect_label_type_new), + (gl_template_round_label_type_new), + (gl_template_cd_label_type_new), (gl_template_label_type_dup), + (template_full_page): + * libglabels/template.h: + * libglabels/xml-template.c: (xml_parse_label_rectangle_node), + (xml_create_label_node): + * pixmaps/ex-rect-size.png: + * src/print.c: (clip_to_outline), (clip_punchouts): + * src/template-designer.c: (construct_rect_size_page), + (rect_size_page_prepare_cb), (layout_page_prepare_cb), + (build_template): + * src/template-designer.glade: + * src/xml-label-191.c: (xml191_parse_label): + Modifications to allow separate horizontal (x_waste) and vertical (y_waste) + properties for rectangular labels. Templates remain backwards compatible, + but this breaks the libglabels API (I don't know of anyone outside of + glabels using libglabels at this time -- what can I say, the program is + is still "unstable"). This addresses the suggestion in Feature Request + #976313. + +2004-07-05 Jim Evins + * src/print.c: (print_crop_marks), (draw_outline): + Changed crop marks and label outlines to black, instead of 25% gray. + This addresses debian Bug #257460. + +2004-07-05 Jim Evins + + * src/object-editor-fill-page.c: (gl_object_editor_set_fill_color): + * src/object-editor-line-page.c: (gl_object_editor_set_line_color): + Preserve "is_default" of fill and line color_combos when creating from + existing objects. + +2004-07-02 Jim Evins + + * data/glabels.1: + Created man page. Based on page submitted by Matthew J. Lockner, however + it has been severely edited. + + * data/avery-other-templates.xml + * data/misc-other-templates.xml: + Started new files for predefined templates with non-standard sheet sizes. + These have been initially populated with the Avery 06141 and + OfficeMax #86112, both provided by Matthew J. Lockner. + + * data/Makefile.am: + Install above manpage and template files. + + * glabels.spec.in: + Make sure we install man pages. + + * src/glabels-batch.c: + Changed short form of help option to '-?' to be consistent with glabels. + + * AUTHORS: + Added acknowledgement for above labels. + +2004-07-02 Jim Evins + + * src/glabels.c: (main), (save_session_cb): + - Now include libbonoboui.h, recent.h, and file.h to provide missing + prototypes. + - save_session_cb() now returns gboolean. + - Minor formatting changes. + + * src/window.h: + * src/window.c: + - Now include file.h to provide missing prototype. + - gl_window_get_type() now returns GType, not guint. I believe this may + ultimately be cause of the segfault reported in Bug #982287, since + GType is actually a gulong, which may not be compatible on other + architectures (64bit) -- I cannot personally test this at this time. + I was sloppy in several other xxx_get_type() functions which also + returned guint -- see next group of files: + + * src/window.c: (gl_window_get_type): + * src/canvas-hacktext.c: (gl_canvas_hacktext_get_type): + * src/canvas-hacktext.h: + * src/hig.c: (gl_hig_alert_get_type), (gl_hig_dialog_get_type), + (gl_hig_category_get_type), (gl_hig_vbox_get_type), + (gl_hig_hbox_get_type): + * src/hig.h: + * src/label-barcode.c: (gl_label_barcode_get_type): + * src/label-barcode.h: + * src/label-box.c: (gl_label_box_get_type): + * src/label-box.h: + * src/label-ellipse.c: (gl_label_ellipse_get_type): + * src/label-ellipse.h: + * src/label-image.c: (gl_label_image_get_type): + * src/label-image.h: + * src/label-line.c: (gl_label_line_get_type): + * src/label-line.h: + * src/label-object.c: (gl_label_object_get_type): + * src/label-object.h: + * src/label-text.c: (gl_label_text_get_type): + * src/label-text.h: + * src/label.c: (gl_label_get_type): + * src/label.h: + * src/merge-properties-dialog.c: + (gl_merge_properties_dialog_get_type): + * src/merge-properties-dialog.h: + * src/merge-text.c: (gl_merge_text_get_type): + * src/merge-text.h: + * src/merge.c: (gl_merge_get_type): + * src/merge.h: + * src/object-editor.c: (gl_object_editor_get_type): + * src/prefs-dialog.c: (gl_prefs_dialog_get_type): + * src/prefs-dialog.h: + * src/prefs-model.c: (gl_prefs_model_get_type): + * src/prefs-model.h: + * src/print-dialog.c: (gl_print_dialog_get_type): + * src/print-dialog.h: + * src/template-designer.c: (gl_template_designer_get_type): + * src/template-designer.h: + * src/ui-property-bar.c: (gl_ui_property_bar_get_type): + * src/ui-property-bar.h: + * src/ui-sidebar.c: (gl_ui_sidebar_get_type): + * src/ui-sidebar.h: + * src/view-barcode.c: (gl_view_barcode_get_type): + * src/view-barcode.h: + * src/view-box.c: (gl_view_box_get_type): + * src/view-box.h: + * src/view-ellipse.c: (gl_view_ellipse_get_type): + * src/view-ellipse.h: + * src/view-highlight.c: (gl_view_highlight_get_type): + * src/view-highlight.h: + * src/view-image.c: (gl_view_image_get_type): + * src/view-image.h: + * src/view-line.c: (gl_view_line_get_type): + * src/view-line.h: + * src/view-object.c: (gl_view_object_get_type): + * src/view-object.h: + * src/view-text.c: (gl_view_text_get_type): + * src/view-text.h: + * src/view.c: (gl_view_get_type): + * src/view.h: + * src/wdgt-chain-button.c: (gl_wdgt_chain_button_get_type): + * src/wdgt-image-select.c: (gl_wdgt_image_select_get_type): + * src/wdgt-image-select.h: + * src/wdgt-media-select.c: (gl_wdgt_media_select_get_type): + * src/wdgt-media-select.h: + * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_get_type): + * src/wdgt-mini-preview.h: + * src/wdgt-print-copies.c: (gl_wdgt_print_copies_get_type): + * src/wdgt-print-copies.h: + * src/wdgt-print-merge.c: (gl_wdgt_print_merge_get_type): + * src/wdgt-print-merge.h: + * src/wdgt-rotate-label.c: (gl_wdgt_rotate_label_get_type): + * src/wdgt-rotate-label.h: + - Made sure all xxx_get_type functions returned GType, not guint. This + was the case in hig.[ch], window.[ch], ui-property-bar.[ch], + ui-sidebar.[ch], view.[ch], wdgt-image-select.[ch], + wdgt-media-select.[ch], wdgt-mini-preview.[ch], wdgt-print-copies.[ch], + wdt-print-merge.[ch], and wdgt-rotate-label.[ch]. See separate + window.[ch] details above for more info. + - Reconciled various coding style differences in all xxx_get_type() + functions: + * All prototypes include G_GNUC_CONST. + * All prototypes specify the return value as GType, not GtkType + or guint. + * Info structures are all declared as "static const." + * Generalized the names of type and info variables. + * Miscelaneous formatting. + +2004-06-08 Jim Evins + + * src/label.c: + * src/label.h: + * src/xml-label.c: + * AUTHORS: + Don't touch compression of original file -- still defaults to 9 for + new files. Original patch provided by Javier Donaire Segarra + (#912252 in patch tracker). + +2004-05-05 Jim Evins + + * data/glabels-2.0.dtd: + Broke DTD previously when adding new barcode types that contain a + plus sign (+). Simply changed the BC_STYLE_TYPE entity to "CDATA" + to avoid the problem. + * data/avery-iso-templates.xml: + * data/zweckform-iso-templates.xml: + * AUTHORS: + Added templates for Avery 7165, Zweckform 3688, 4732, and 6021. Templates + provided by Frank Altpeter. + * libglabels/xml-template.c: (xml_create_label_node): + Reordered markup and layout sub-nodes so that resulting templates will + validate against DTD. + +2004-03-13 Jim Evins + + * src/object-editor-size-page.c: (gl_object_editor_prepare_size_page): + Changed spin callback signals from "value-changed" back to "changed." + This was accidentally introduced in a previous revision, and can cause + size changes just by selecting the size tab. + +2004-03-06 Jim Evins + + * src/view.c: (draw_grid_layer): + For round labels (round and cd) adjust grid so that it lines up with + center of label. Also, no longer draw box around label in the grid layer, + it is hidden by he fg layer anyway. Feature suggested by + nemolivier@free.fr. Although the grid is aligned with the center of the + label, the coordinate system is still relative to the upper left corner + of the rectangle containing the label. + +2004-02-25 Jim Evins + + * configure.in: + Changed version to 2.0pre1cvs + + * libglabels/xml-template.c: (gl_xml_template_parse_templates_doc): + Removed extra xmlFreeDoc() calls upon error. Also print the doc->URL + instead of doc->name fields when errors encountered. + +2004-02-21 Jim Evins + + * data/avery-iso-templates.xml: + Added aliases for Avery 8651. Patch provided by Wayne Schuller. + + * glabels.spec.in: + Added libglabels library and include file to installed files. + + * configure.in: + Final prep for 1.93.3. + +2004-02-20 Jim Evins + + * src/glabels-batch.c: (main): + Changed key for setting output filename to GNOME_PRINT_KEY_OUTPUT_FILENAME + as suggested by Javier Donaire Segarra. This addresses bug #901063. + +2004-02-16 Jim Evins + + * configure.in: + If gtk+ >= 2.3.2 then define HAVE_FILE_CHOOSER. + + * src/Makefile.am: + Added HAVE_FILE_CHOOSER to INCLUDES. + + * src/file.c: (gl_file_open), (open_response), (gl_file_open_real), + (gl_file_save_as), (save_as_response): + Ported to use GtkFileChooserDialog if HAVE_FILE_CHOOSER is defined. + +2004-02-16 Jim Evins + + * src/xml-label-04.c: (xml04_parse_image_props): + * src/xml-label-191.c: (xml191_parse_image_props): + * src/xml-label.c: (xml_parse_object_image): + Delay setting image size until after image has been applied to new + object. + +2004-02-15 Jim Evins + + * src/label-barcode.c: (gl_label_barcode_set_data), + (gl_label_barcode_set_props): + Don't emit "changed" signal, if no change actually made for these + methods. Reduces number of unnecessary redraws of barcodes. + + * src/label-object.h: + * src/label-object.c: (gl_label_object_set_position), + (gl_label_object_set_position_relative), (set_size), + (gl_label_object_set_size), + (gl_label_object_set_size_honor_aspect): + Don't emit "changed" signal, if no change actually made for these + methods. + +2004-02-15 Jim Evins + + * data/glabels-2.0.dtd: + Added specific subtypes for various barcode types. + + * src/bc.h: + * src/bc.c: (id_to_index), (name_to_index), (gl_barcode_new), + (gl_barcode_get_styles_list), (gl_barcode_default_digits), + (gl_barcode_can_text), (gl_barcode_text_optional), + (gl_barcode_can_csum), (gl_barcode_csum_optional), + (gl_barcode_id_to_name), (gl_barcode_name_to_id): + Changed API to use a string id, rather than a fixed enumeration. Id and + name are separate strings. Added entries to backend table for specific + subtypes for various barcode types. + + * src/bc-postnet.h: + * src/bc-postnet.c: (gl_barcode_postnet_new), (postnet_code), + (is_length_valid): + Modified to conform to above API. Now more stringent with data length + for various subtypes. + + * src/bc-gnubarcode.h: + * src/bc-gnubarcode.c: (gl_barcode_gnubarcode_new), + (is_length_valid), (is_length1_valid), (is_length2_valid): + Modified to conform to above API. Now more stringent with data length + for various subtypes. + + * src/label-barcode.h: + * src/label-barcode.c: (copy), (gl_label_barcode_set_props), + (gl_label_barcode_get_props), (get_size): + Modified to use above API for storing barcode type. + + * src/object-editor.h: + * src/object-editor-bc-page.c: (style_changed_cb), + (gl_object_editor_set_bc_style), (gl_object_editor_get_bc_style): + Modified to use above API for storing barcode type. + + * src/object-editor-size-page.c: + (gl_object_editor_prepare_size_page), (aspect_toggle_cb), + (w_spin_cb), (h_spin_cb), (size_reset_cb): + Added debug markers. + + * src/object-editor.glade: + Made barcode style combo's text entry non-editable. + + * src/print.c: (draw_barcode_object): + Modified to use above API for barcode type. + + * src/view-barcode.c: (update_object_from_editor_cb), + (update_editor_from_object_cb), + (gl_view_barcode_create_event_handler), (draw_barcode): + Modified to use above API for barcode type. + + * src/xml-label-04.c: (xml04_parse_barcode_props): + * src/xml-label-191.c: (xml191_parse_barcode_props): + * src/xml-label.c: (xml_parse_object_barcode), + (xml_create_object_barcode): + Modified to use above API for barcode type. + +2004-02-07 Jim Evins + + * src/stock-pixmaps/Makefile.am: + * src/stock-pixmaps/stock_hchain_24.png: + * src/stock-pixmaps/stock_hchain_broken_24.png: + * src/stock-pixmaps/stock_vchain_24.png: + * src/stock-pixmaps/stock_vchain_broken_24.png: + Added chain pixmaps borrowed from the gimp's default theme. + + * src/stock.h: + * src/stock.c: (gl_stock_init), (add_button_icon): + Added above pixmaps to stock icon sets. Created add_button_icon() to + add these pixmaps sized as GTK_ICON_SIZE_BUTTON. + + * src/wdgt-chain-button.h + * src/wdgt-chain-button.c + * src/Makefile.am: + * po/POTFILES.in: + Added this Modified version of gimpchainbutton widget, borrowed from + the gimp. + + * AUTHORS: + Added acknowledgements of the above borrowing from the gimp. + + * src/object-editor-size-page.c: (aspect_toggle_cb), (w_spin_cb), + (h_spin_cb): + * src/object-editor.c: (gl_object_editor_construct_chain_button): + * src/object-editor.glade: + Replaced the keep aspect ratio check box with the above chain-button + widget. + + * src/text-node.c: (gl_text_node_equal): + * src/text-node.h: + Added function gl_text_node_equal() to compare text_nodes. + + * src/label-image.c: (gl_label_image_set_filename): + Replaced incomplete text_node comparison code with invocation of + gl_text_node_equal. This fixed the problem of not being able to + resize an image using the object_editor if the aspect ratio is not + locked. + +2004-02-04 Jim Evins + + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page): + Track "changed" signal of pixmap entry's GtkEntry rather than its + "activate" signal -- this catches all changes to the entry rather than + just changes resulting from a browse, so one can easily pull previous + entries from the history. (This change is marked below on 2004-02-03, + but somehow never got checked in.) + + * src/view-highlight.c: (sl_resize_event_handler), + (sr_resize_event_handler), (st_resize_event_handler), + (sb_resize_event_handler): + Side resize handles will now confirm the actual resize that the object + accepted before adjusting position parameters. Previously some interesting + things happened when resizing a barcode to its minimum size. + +2004-02-03 Jim Evins + + * src/object-editor-image-page.c: + (gl_object_editor_prepare_image_page): + Track "changed" signal of pixmap entry's GtkEntry rather than its + "activate" signal -- this catches all changes to the entry rather than + just changes resulting from a browse, so one can easily pull previous + entries from the history. + + * src/view-highlight.c: (tl_resize_event_handler), + (tr_resize_event_handler), (bl_resize_event_handler), + (br_resize_event_handler): + Allow control key to be dropped while dragging a corner resize handle + without losing the aspect ratio lock. + +2004-02-02 Jim Evins + + * src/label-image.c: (gl_label_image_set_filename): + When setting a new filename adjust size such that the aspect ratio of + the image is preserved using the current size as a bounding box. + + * src/view-image.c: (update_object_from_editor_cb): + When updating object from editor, feed back possible size changes to + editor as a result of a possible change in image. + + * src/object-editor-size-page.c: (size_reset_cb): + Fixed typo when blocking spin handlers. If the base size is larger than + the max size, treat max size as a bounding box while keeping aspect + ratio. + + +2004-02-02 Jim Evins + + * src/label-object.h: + * src/label-object.c: (gl_label_object_set_size), + (gl_label_object_set_size_honor_aspect): + Added gl_label_object_set_size_honor_aspect() which will maintain the + current aspect ratio by modifying the supplied w or h apropriately. + + * src/view-highlight.c: (tl_resize_event_handler), + (tr_resize_event_handler), (bl_resize_event_handler), + (br_resize_event_handler): + Corner handles will now maintain the current aspect ratio if the + control key is pressed while resizing. This addresses feature + request #816603. + + +2004-01-31 Jim Evins + + * AUTHORS: + * data/avery-us-templates.xml: + Added entries for "LSK-3," "LSK-5," and "LSK-8." Submitted by JBadger. + + * libglabels/template.c: (read_template_files_from_dir): + Corrected problem with testing for extensions. + + * src/object-editor.glade: + Corrected grouping of radio buttons in barcode data page. + + * src/print.c: (draw_barcode_object): + * src/view-barcode.c: (draw_barcode): + Corrected problem with calculation of y_offset for locating characters. + +2004-01-24 Jim Evins + + * AUTHORS: + * data/avery-us-templates.xml: + Added Avery 5824, submitted by Fred Bacon. + +2004-01-20 Jim Evins + + Catching up on a couple of backlogged user template submissions. + + * data/avery-iso-templates.xml: + Added "DECAdry OLW-4731" and "DECAdry DLW-1731" aliases for Avery 7160. + Suggested by Linas Jakucionis. + + * data/zweckform-iso-templates.xml: + Added Zweckform 4760, submitted by Thomas Vill. + + * AUTHORS: + Updated to reflect above submissions. + +2004-01-06 Jim Evins + + Split-out template.[ch], paper.[ch], xml-template.[ch], xml-paper.[ch], and + xml.[ch] into a separate library called libglabels, to facilitate third + party use of glabels template files. This was suggested by Wayne Schuller. + Once split-out, some modifications to the structures and functions to + make a cleaner more useful API, hopefully. Rather extensive changes have + propogated to other modules. + + * src/paper.h: + * src/paper.c: + * src/template.h: + * src/template.c: + * src/xml-paper.h: + * src/xml-paper.c: + * src/xml-template.h: + * src/xml-template.c: + * src/xml.h: + * src/xml.c: + These files have been moved to libglabels/. API cleanup performed. + + * libglabels/libglabels.h: + * libglabels/libglabels-private.h: + * libglabels/Makefile.am: + These files have been added to finish out libglabels. + + * Makefile.am: + * configure.in: + * glabels.spec.in: + * po/POTFILES.in: + * src/Makefile.am: + Modified to reflect new sets of files in src/ and libglabels/. + + * COPYING.LIBGLABELS: + * COPYING-DOCS: + Added copy of the LGPL for libglabels, and a copy the GFDL for + documentation. + + * src/glabels-batch.c: + * src/glabels.c: + * src/label.c: (gl_label_finalize), (gl_label_set_template), + (gl_label_get_size): + * src/label.h: + * src/prefs-model.c: (gl_prefs_model_load_settings): + * src/print-dialog.c: + * src/print.c: (gl_print_simple), (gl_print_merge_collated), + (gl_print_merge_uncollated), (gl_print_batch), (print_info_free), + (print_crop_marks), (print_label), (draw_outline), + (clip_to_outline), (clip_punchouts): + * src/template-designer.c: (construct_pg_size_page), + (pg_size_page_changed_cb), (layout_page_changed_cb), + (print_test_cb), (build_template): + * src/util.c: (gl_util_fraction): + * src/util.h: + * src/view.c: (draw_bg_fg_layers), (draw_bg_fg_rect), + (draw_bg_fg_rounded_rect), (draw_bg_fg_round), (draw_bg_fg_cd), + (draw_bg_fg_cd_bc), (draw_markup_layer), (draw_markup_margin), + (draw_markup_margin_rect), (draw_markup_margin_rounded_rect), + (draw_markup_margin_round), (draw_markup_margin_cd), + (draw_markup_margin_cd_bc), (draw_markup_line), + (draw_markup_circle), (gl_view_copy): + * src/wdgt-media-select.c: (gl_wdgt_media_select_construct), + (page_size_entry_changed_cb), (details_update), (get_layout_desc), + (get_label_size_desc): + * src/wdgt-mini-preview.c: + (gl_wdgt_mini_preview_set_label_by_name), (mini_outline_list_new), + (cdbc_item): + * src/wdgt-print-copies.c: (gl_wdgt_print_copies_construct): + * src/wdgt-print-merge.c: (gl_wdgt_print_merge_construct): + * src/wdgt-rotate-label.c: (mini_preview_canvas_update), + (gl_wdgt_rotate_label_set_template_name), (cdbc_item): + * src/wdgt-rotate-label.h: + * src/xml-label-04.c: (xml04_parse_media_description): + * src/xml-label-191.c: (gl_xml_label_191_parse), + (xml191_parse_sheet), (xml191_parse_label), (xml191_parse_layout), + (xml191_parse_markup), (xml191_parse_alias): + * src/xml-label.c: (xml_doc_to_label), (xml_parse_label), + (xml_label_to_doc): + Various changes to accomodate new libglabels API. + +2004-01-03 Jim Evins + + * configure.in: + Release 1.93.2. + +2004-01-03 Jim Evins + + * AUTHORS: + Added acknowledgement of contributions by Wayne Schuller. + + * src/commands.c: (gl_cmd_file_print): + Create extra reference to print dialog, so that it can be properly re-used. + + * src/mygal/mygal-combo-box.h: + * src/mygal/mygal-combo-box.c: + (mygal_combo_box_popup_hide_unconditional), + (mygal_combo_box_popup_display), (mygal_combo_box_set_display), + (gtk_combo_set_tearoff_state), (mygal_combo_box_construct), + (mygal_combo_box_set_arrow_relief), (mygal_combo_box_set_title), + (mygal_combo_box_set_tearable): + Changed all occurances of GTK_IS_COMBO_BOX to MYGAL_IS_COMBO_BOX, to + complete the rename of this widget to prevent namespace collisions + with Gtk+-2.3. + + * src/prefs-dialog.glade: + Fixed alignment of Fill/Color widgets. + +2004-01-03 Jim Evins + + * data/avery-iso-templates.xml: + Added user submitted templates. + Avery 8435A & 8435B, submitted by Ludger Solbach. + + * doc/C/glabels.xml: + Added minimal documentation, noting the new template designer. + +2004-01-03 Jim Evins + + * pixmaps/ex-rect-size.png: + * pixmaps/ex-round-size.png: + * pixmaps/ex-cd-size.png: + * pixmaps/Makefile.am: + Added ex-rect-size.png, ex-round-size.png, and ex-cd-size.png image + files to be used as illustrations/examples in the template-designer. + + * src/template-designer.c: (construct_rect_size_page), + (construct_round_size_page), (construct_cd_size_page), + (construct_nlayouts_page), (rect_size_page_prepare_cb), + (round_size_page_prepare_cb), (cd_size_page_prepare_cb), + (layout_page_prepare_cb), (build_template): + * src/template-designer.glade: + Added illustrations for rectangle, round, and cd label size pages. + Added margin spinboxes to these pages, and now add a margin markup + to the constructed template. Added realistic default values for + some of the size spinboxes. Cleaned up the code for setting spinbox + ranges on the layouts page. + +2004-01-02 Jim Evins + + * src/object-editor-size-page.c: (h_spin_cb): + Fixed cut-n-paste error in h_spin_cb that loaded h from + the wrong spinbutton. + + * src/object-editor.h: + * src/object-editor.c: (gl_object_editor_class_init), + (gl_object_editor_changed_cb), (gl_object_editor_size_changed_cb): + * src/object-editor-private.h: + * src/object-editor-size-page.c: (w_spin_cb), (h_spin_cb), + (size_reset_cb): + Added "size_changed" signal. + + * src/view-text.c: (construct_properties_editor), + (update_object_from_editor_cb), + (update_object_from_editor_size_cb): + Track size changes from object editor separately from other + properties. This is so the default size (0,0) of a text + object is not modified unintentionally. + +2003-12-30 Wayne Schuller + + Added feature: line spacing - allows you to comfortably space a text box to + fit a label perfectly. + + * data/glabels-2.0.dtd: + * src/label-object.c: (gl_label_object_set_text_line_spacing), + (gl_label_object_get_text_alignment), + (gl_label_object_get_text_line_spacing): + * src/label-object.h: + * src/label-text.c: (gl_label_text_class_init), + (gl_label_text_instance_init), (copy), (get_size), + (set_text_line_spacing), (get_text_alignment), + (get_text_line_spacing): + * src/object-editor-private.h: + * src/object-editor-text-page.c: + (gl_object_editor_prepare_text_page), + (gl_object_editor_set_text_line_spacing), + (gl_object_editor_get_text_line_spacing): + * src/object-editor.glade: + * src/object-editor.h: + * src/prefs-dialog.c: (construct_object_page), + (update_object_page_from_prefs), (update_prefs_from_object_page): + * src/prefs-dialog.glade: + * src/prefs-model.c: (gl_prefs_model_save_settings), + (gl_prefs_model_load_settings), (get_float): + * src/prefs-model.h: + * src/print.c: (draw_text_object): + * src/ui-sidebar.c: + * src/view-text.c: (update_object_from_editor_cb), + (update_editor_from_object_cb), + (gl_view_text_create_event_handler), (draw_hacktext): + * src/view.c: (gl_view_construct), + (gl_view_set_selection_text_line_spacing), + (gl_view_set_default_text_line_spacing), + (gl_view_get_default_text_line_spacing): + * src/view.h: + * src/xml-label.c: (xml_parse_toplevel_span), + (xml_create_toplevel_span): + +2003-12-30 Jim Evins + + * src/template-designer.c: + * src/template-designer.h: + * src/template-designer.glade: + New template designer assistant. + + * po/POTFILES.in: + * src/Makefile.am: + Added entries for src/template-designer.* files. + + * pixmaps/ex-1layout.png + * pixmaps/ex-2layouts.png + * pixmaps/Makefile.am: + Added the new image files ex-*.png used as illustrations in the + template designer assistant. + + * src/print-dialog.h: + * src/print-dialog.c: (gl_print_dialog_finalize), + (gl_print_dialog_new), (gl_print_dialog_construct), + (gl_print_dialog_force_outline_flag): + Changed first argument of gl_print_dialog_new() from glView to glLabel, + to support printing from the template designer assistant which does not + have a full-fledged view. Nothing else from the view object was being + used by the dialog anyway. + + Added the gl_print_dialog_force_outline_flag() method, for better + integration with the template designer assistant. + + + * src/commands.h: + * src/commands.c: (gl_cmd_file_template_designer), + (gl_cmd_file_print): + Modified print command to provide label instead of view to dialog. + Added the gl_cmd_file_template_designer() command to invoke the + template designer assistant. + + * src/ui.c: + * src/glabels-ui.xml: + Added support for template designer assistant. + + * src/wdgt-mini-preview.h: + * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_set_template), + (gl_wdgt_mini_preview_set_bg_color): + Preview is now centered in canvas. Added + gl_wdgt_mini_preview_set_bg_color() to allow the template designer + assistant to match the background color with its own. + + * src/print.c: (clip_to_outline): + Fixed really stupid bug when adding waste to clip region of rectangular + labels/cards. Each side of the clip region needs to be extended by + twice the waste margin, as well as negatively offset by the waste + margin. + +2003-12-28 Jim Evins + + * src/prefs-dialog.c: (update_object_page_from_prefs): + Block intermediary function align_toggle_cb() instead of + update_prefs_from_object_page() for the three alignment + widgets. + +2003-12-28 Wayne Schuller + + * src/file.c: (gl_file_new), (gl_file_properties): + Swap button order and set default for higificatory pleasure. + +2003-12-27 Jim Evins + + * barcode-0.98/Makefile.am: + One last time: removed doc/Makefile and po/Makefile.in.in from + EXTRA_DIST files. + +2003-12-27 Jim Evins + + * barcode-0.98/Makefile.am: + Removed config.stat entry from EXTRA_DIST files. + + * barcode-0.98/Makefile.in: + Removed. + +2003-12-27 Jim Evins + + * configure.in: + Updated to work with latest gnome-common package from CVS. + Removed recursive configuration of barcode-0.98. + + * acconfig.h: + * macros/*: + Removed. + + * Makefile.am: + Added barcode-0.98/ as a SUBDIR, and removed dist-hook. + + * barcode-0.98/Makefile.in: + * barcode-0.98/configure.in: + * barcode-0.98/Makefile.am: + * barcode-0.98/README.glabels: + Modified to ignore the barcode package's build system, and build + as a part of glabels. + Renamed Makefile.in to Makefile.in.dist. + Renamed configure.in to configure.in.dist. + Added barcode-0.98/Makefile.am and barcode-0.98/README.glabels. + + * src/Makefile.am: + * src/mygal/Makefile.am: + * src/recent-files/Makefile.am: + In order to build against the GNOME 2.5 platform, + all use of *_DISABLE_DEPRECATED compile-time flags has been removed. + + * src/mygal/Makefile.am: + * src/mygal/mygal-combo-box.c: + * src/mygal/mygal-combo-box.h: + * src/mygal/widget-color-combo.c: + * src/mygal/widget-color-combo.h: + * po/POTFILES.in: + In order to build against the GNOME 2.5 platform, + Renamed gtk_combo_box widget to mygal_combo_box, to prevent namespace + collisions with the real gtk_combo_box widget, now a part of gtk. + +2003-12-26 Jim Evins + + * src/paper.c: + * src/template.c: + * src/util.c: + * src/util.h: + Moved local versions of get_home_data_dir() in paper.c and + template.c to util package. Cleaned up formatting in + util.[ch]. + + * src/template.c: + In gl_template_register() save a copy of the template in + ~/.glabels if the template is not known. Still need to + handle duplicate filename case and duplicate name but + different template case. + + * src/xml-label.c: + * src/xml.h: + Moved local definition of NAME_SPACE macro from xml-label.c + to xml.h. + + * src/xml-template.c: + * src/xml-template.h: + Added function gl_xml_template_write_template_to_file(), used + in gl_template_register(). diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..23e5f25d --- /dev/null +++ b/INSTALL @@ -0,0 +1,236 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +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, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + 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 you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' 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. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +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 support 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' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' 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' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + 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 machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +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. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--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. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/MESSAGE-OF-DOOM b/MESSAGE-OF-DOOM new file mode 100644 index 00000000..9ddbfaa7 --- /dev/null +++ b/MESSAGE-OF-DOOM @@ -0,0 +1,15 @@ + *** IMPORTANT *** + +This is an unstable (development) version of glabels. +It is for testing purposes only. + +Please, DO NOT use it in a production environment. +It will probably crash and you will lose your data. + +If you are looking for a stable release of glabels, it can be downloaded from: + + http://glabels.sourceforge.net/download + + *** END OF WARNING *** + + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..ade9f9c2 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,43 @@ +## Process this file with automake to produce Makefile.in + +LIB_BARCODE_DIR = barcode-0.98 +LIB_IEC16022_DIR = iec16022-0.2.1 +LIB_QRENCODE_DIR = qrencode-3.1.0 + +#distuninstallcheck_listfiles = find . -type f -print | grep -v scrollkeeper + +SUBDIRS = \ + po \ + $(LIB_BARCODE_DIR) \ + $(LIB_IEC16022_DIR) \ + $(LIB_QRENCODE_DIR) \ + libglabels \ + src \ + data \ + templates \ + help \ + docs + +EXTRA_DIST = \ + README \ + COPYING \ + COPYING-DOCS \ + COPYING-LIBGLABELS \ + COPYING-TEMPLATES \ + AUTHORS \ + ChangeLog \ + INSTALL \ + NEWS \ + TODO \ + intltool-extract.in \ + intltool-merge.in \ + intltool-update.in \ + gnome-doc-utils.make \ + glabels.spec.in \ + glabels.spec \ + MESSAGE-OF-DOOM + +DISTCLEANFILES = gnome-doc-utils.make + +DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper + diff --git a/NEWS b/NEWS new file mode 100644 index 00000000..95254c58 --- /dev/null +++ b/NEWS @@ -0,0 +1,118 @@ +* gLabels 2.2.0 (stable) release. Release date 2007-12-26 + +- Migrated from EggRecent to GtkRecentManager +- Migrated from libgnomeprint to GtkPrintOperation and Cairo. +- Migrated from libgnomeprint to Pango for text layout. +- Migrated GnomeDruid to GtkAssistant for template designer. +- Migrated from GnomeCanvas to Cairo. +- Removed all deprecated widgets as of Gnome-2.16/Gtk-2.10. +- Added categorization of templates and an updated New Label dialog. +- New label dialog now allows selection of recently used templates +- Removed splash screen. +- Added initial support for datamatrix 2D barcodes. +- Added support for Brazilian CEPNet barcodes. +- Added shadow attribute to label objects. +- New merge backend for evolution data server (Austin Henry) +- Various bug fixes. +- New templates. + + +* gLabels 2.1.5 (unstable) release. Release date 2007-12-09. + +- New label dialog now allows selection of recently used templates +- Store brand and part number as separate fields in templates +- Major cleanup of libglabels API and documentation +- Minor bug fixes (and probably some new bugs). + + +* gLabels 2.1.4 (unstable) release. Release date 2007-08-17. + +- Added categorization of templates and an updated New Label dialog. +- Added initial support for datamatrix 2D barcodes. +- Migrated from EggRecent to GtkRecentManager. +- Migrated from libgnomeprint to GtkPrintOperation and Cairo. +- Migrated from libgnomeprint to Pango for text layout. +- Migrated GnomeDruid to GtkAssistant for template designer. +- Migrated from GnomeCanvas to Cairo. +- Removed splash screen. +- Added support for Brazilian CEPNet barcodes. +- Updated French translation (Claude Paroz) +- New Esperanto translation (Antonio C. Codazzi) +- Minor bug fixes (and probably some new bugs). +- New templates. + + +* gLabels 2.1.3 (unstable) release. Release date 2006-05-27. + +- Don't print "Invalid barcode data" if data field is empty. (Bug #1479839) (Darren Warner) +- Fixed hangup when grid or markup have been toggled during a previous session. (Bug #1434324) +- Added shadow attribute to label objects. +- Fixed color groups in color combo widgets. +- Fixed several potential crashes. + + +* gLabels 2.1.2 (unstable) release. Release date 2005-12-21. + +- Updated Italian translation (Daniele Medri) +- Fixed double entry in property bar's font family combobox +- Don't allow zero width or height when drawing pixbufs +- Fixed various memory leaks +- New configure option to disable update-mime-database and update-desktop-database +- New merge backend for evolution data server (Austin Henry) +- New minimal merge backend for VCards using evolution data server API (Austin Henry) +- New templates and fixes + + +* gLabels 2.1.1 (unstable) release. Release date 2005-06-21. + +- Added document merge tutorial to help documentation +- Replaced deprecated widgets (now requires Gnome 2.10 and GTK+ 2.6) +- Replaced libbonoboui with GtkUIManager (now requires Gnome 2.10 and GTK+ 2.6) +- Updated Russian translation (Vitaly Lipatov) +- Updated Spanish translation (Sergio Rivadero) +- Updated Czech translation (David Makovský and Zbynek Mrkvick) +- Updated Italian translation (Daniele Medri) +- Added documentation for libglabels +- Minor bug fixes and cleanup +- New templates + + +* gLabels 2.1.0 (unstable) release. Release date 2005-01-22. + +- Added ability to select color from merge source (Frederic Ruaudel) +- See 2.0.2 + + +* gLabels 2.0.2 release. Release date 2005-01-22. + +- Desktop file reconciled with desktop-entry-spec +- New cleaned-up icon +- Added option to glabels-batch to allow selection of first label. +- Added options to glabels-batch to allow selection of merge source and crop marks. + (José Dapena Paz) +- Updated french translation (Florent Morel) +- Fixed translation problem with object editor labels +- Minor bug fixes and cleanup +- New templates + +* gLabels 2.0.1 release. Release date 2004-08-15. + +- Fixed crash when reading some labels created with 1.93.x. +- Updated japanese translations (Takeshi AIHANA) +- Fixed crash from improperly freeing translation strings. + + +* gLabels 2.0.0 release. Release date 2004-08-09. + +- Fixed crash when encountering old template files +- Align grid to label center for DVD/CD and round labels +- Don't touch compression of original file +- 64-bit fixes +- Added man page +- Fixed missing outline problem experienced with some printers +- Added separate horizontal and vertical waste properties for rectangular templates +- Added option to auto-shrink text during document merge +- Fixed memory leaks +- Added format attibute to barcode objects, to allow correct layout of merged labels +- Fixed mime type registration for GNOME 2.6 + diff --git a/README b/README new file mode 100644 index 00000000..abbd9c92 --- /dev/null +++ b/README @@ -0,0 +1,43 @@ +Copyright +========= + + Copyright (C) 2001-2007 Jim Evins + + gLabels contains components copyrighted by others -- see th 'AUTHORS' file in + this directory. + + For license information see the 'COPYING.README_FIRST' file in this directory. + + + +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 +=================== + +GLIB+-2.18.x +GTK+-2.14.x +LIBXML-2.7.x + +All of these libraries are available as part of Gnome 2.16 + + + +Author and Acknowledgments: +=========================== + +See the AUTHORS file. + + + +Website +======= + +http://glabels.sourceforge.net/ + diff --git a/TODO b/TODO new file mode 100644 index 00000000..e5d4bfeb --- /dev/null +++ b/TODO @@ -0,0 +1,47 @@ + +Development plan +---------------- +This development plan sets a specific set of milestones for future versions of glabels. + + +Goals for 2.2.x: + + - Bugfixes + + - Translations + + +Possible Goals for 2.3.x (current development branch): + + - Undo, Redo capability + + - Make text items rich. I.e. allow multiple characteristics + to exist within a single object. + + - Text effects. (follow contour, non-rectangular text boxes, + ...) + + - Ability to select/unselect individual records during a merge-print. + + - Add additional "merge" backends. Candidates include: + gnome-db + internal database stored in glabels file + generic XML + freedb (CDDB) for CD labels + ADIF for generating QSL-cards + + - Printer calibration tool: a facility for tweaking output origin and + scale. This should really be part of the underlying print system but + currently is not, so I may want to add the hack. + + - Adjustable grid spacing. Spacing of visible grid should be user + adjustable. This grid spacing should be an integral multiple of + a finer invisible grid. There should be a "snap to grid" toggle, + that causes all posistioning and sizing performed on the canvas + to snap to the closest grid. The possible grid spacing should be + appropriate for the current units selected (e.g. .1 points, .01 mm, + 1/64 inch, 0.001 inch). + + - Allow for management of custom templates + (i.e. delete, rename, edit). + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 00000000..66bb0fd8 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +REQUIRED_AUTOMAKE_VERSION=1.8 + +PKG_NAME="glabels" + +(test -f $srcdir/configure.in \ + && test -f $srcdir/README \ + && test -d $srcdir/src) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level $PKG_NAME directory" + exit 1 +} + +which gnome-autogen.sh || { + echo "You need to install gnome-common from the GNOME CVS" + exit 1 +} +USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh + diff --git a/barcode-0.98/COPYING b/barcode-0.98/COPYING new file mode 100644 index 00000000..a43ea212 --- /dev/null +++ b/barcode-0.98/COPYING @@ -0,0 +1,339 @@ + 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. + + + Copyright (C) 19yy + + 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. + + , 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/barcode-0.98/ChangeLog b/barcode-0.98/ChangeLog new file mode 100644 index 00000000..024706de --- /dev/null +++ b/barcode-0.98/ChangeLog @@ -0,0 +1,460 @@ +2002-03-01 Alessandro Rubini + + * 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 + + * barcode.spec: new file + +2002-02-27 Alessandro Rubini + + * bookland/bookland.py: updated to version 0.92 by Judah Milgram + +2001-11-13 Alessandro Rubini + + * README: Added a pointer to the Windows port. + +2001-11-09 Cloyce D. Spradling + + * 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 + + * pcl.c (Barcode_pcl_print): bugfix: bars were misplaced + +2001-10-16 Nathan D. Holmes + + ====> 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * sample.c (main): added upc-e and ean-8 samples + +2001-08-11 Boszormenyi Zoltan + + * ps.c (Barcode_ps_print): don't output "showpage" in EPS mode + +2001-08-11 Alessandro Rubini + + * README: Changed host names, added barcode-commit list. + +2000-11-29 Alessandro Rubini + + * doc/doc.barcode (The Field List): 1pt == 0.352mm, not 0.0352 + (thanks to Stephen Irven for reporting) + +2000-11-09 Alessandro Rubini + + ====> 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 + + * 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 + + * 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 + + * 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 + + * contrib/barcodeps-0.1.tgz: new file, sent to Alessandro on Oct 7 + +2000-10-10 Alessandro Rubini + + * 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 + + * ps.c (Barcode_ps_print): add a backslash in front of '(' too. + Suggested by H Y . + (Barcode_ps_print): use ps arrays to get compact (and prettier) + PostScript output. Suggested by Hans Schou . + + * main.c (get_geometry): accept "+offset+offset" to keep default size. + Suggested by Godmar Back . + +2000-09-16 Alessandro Rubini + + * ps.c (Barcode_ps_print): use "half text height" instead of + "two text heights" as minimum bar height. Suggested by + Oliver Vecernik . + +2000-09-14 Alessandro Rubini + + * barcode.h: added the standard ``extern "C"'' stuff for C++ + (bug reported by Dany Pardo ) + +2000-09-08 Andrea Ferraris + + * 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 + + * i25.c (Barcode_i25_encode): fixed checksum calculation + (thanks to Hans Schou for reporting) + +2000-05-19 Alessandro Rubini + + ====> 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 + + * 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 + + * doc/Makefile: modified to build with both gmake and pmake + + * Makefile: modified to build with both gmake and pmake + +2000-04-20 Alessandro Rubini + + * 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 + + * 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 + +====> Version 0.95 released to ftp.prosa.it and ftp.gnu.org + +2000-01-26 Alessandro Rubini + + * code128.c (Barcode_128_encode): new encoding: full-featured code128 + + * README: added reference to original ftp site + +2000-01-05 Alessandro Rubini + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * main.c (main): print tables: y used xmargin (Tim Withers,Jon Bakken) + +1999-09-06 Alessandro Rubini + + * 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 + + * 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 + + * main.c (strerror): replacement strerror selected by autoconf + +1999-08-06 Alessandro Rubini + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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/barcode-0.98/INSTALL b/barcode-0.98/INSTALL new file mode 100644 index 00000000..5a6cb878 --- /dev/null +++ b/barcode-0.98/INSTALL @@ -0,0 +1,31 @@ + +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/barcode-0.98/Makefile.am b/barcode-0.98/Makefile.am new file mode 100644 index 00000000..84e97c92 --- /dev/null +++ b/barcode-0.98/Makefile.am @@ -0,0 +1,73 @@ +INCLUDES = \ + $(GLABELS_CFLAGS) + + +BC_FILES = \ + library.c \ + ean.c \ + code128.c \ + code39.c \ + code93.c \ + i25.c \ + msi.c \ + plessey.c \ + codabar.c \ + ps.c \ + pcl.c \ + barcode.h + +noinst_LTLIBRARIES = libbarcode.la + +libbarcode_la_SOURCES = $(BC_FILES) + +EXTRA_DIST = \ + barcode.spec \ + ChangeLog \ + cmdline.c \ + cmdline.h \ + configure \ + configure.in.dist \ + COPYING \ + INSTALL \ + install-sh \ + main.c \ + Makefile.in.dist \ + missing \ + mkinstalldirs \ + README \ + README.glabels \ + sample.c \ + TODO \ + bookland/bookland.py \ + compat/getopt.c \ + compat/getopt.h \ + contrib/barcode-for-delphi.tar.gz \ + contrib/barcode-SVG.tar.gz.README \ + contrib/barcode-for-delphi.tar.gz.README \ + contrib/barcodeps-0.1.tgz \ + contrib/grab-0.0.4.tar.gz \ + contrib/barcodeps-0.1.tgz.README \ + contrib/grab-0.0.4.tar.gz.README \ + contrib/barcode-SVG.tar.gz \ + debian/changelog \ + debian/control \ + debian/copyright \ + debian/dirs \ + debian/info \ + debian/README.debian \ + debian/rules \ + doc/barcodedoc.txt \ + doc/barcode.ps \ + doc/infofilter \ + doc/manpager \ + doc/texi2html \ + doc/barcode.info \ + doc/mktxt \ + doc/barcode.pdf \ + doc/doc.barcode \ + doc/Makefile.in \ + doc/README + + + + diff --git a/barcode-0.98/Makefile.in.dist b/barcode-0.98/Makefile.in.dist new file mode 100644 index 00000000..848aa265 --- /dev/null +++ b/barcode-0.98/Makefile.in.dist @@ -0,0 +1,141 @@ +# +# 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/barcode-0.98/README b/barcode-0.98/README new file mode 100644 index 00000000..d3ae2a7f --- /dev/null +++ b/barcode-0.98/README @@ -0,0 +1,93 @@ + +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/barcode-0.98/README.glabels b/barcode-0.98/README.glabels new file mode 100644 index 00000000..b0dc9592 --- /dev/null +++ b/barcode-0.98/README.glabels @@ -0,0 +1,7 @@ +The following changes have been made to the stock barcode-0.98 distribution +to facilitate compilation with glabels: + + Makefile.in renamed to Makefile.in.dist + configure.in renamed to configure.in.dist + added Makefile.am, which is configured from ../configure.in + diff --git a/barcode-0.98/TODO b/barcode-0.98/TODO new file mode 100644 index 00000000..c91c79cf --- /dev/null +++ b/barcode-0.98/TODO @@ -0,0 +1,23 @@ + + 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/barcode-0.98/barcode.h b/barcode-0.98/barcode.h new file mode 100644 index 00000000..6b9bdf4e --- /dev/null +++ b/barcode-0.98/barcode.h @@ -0,0 +1,119 @@ +/* + * 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 + +#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/barcode-0.98/barcode.spec b/barcode-0.98/barcode.spec new file mode 100644 index 00000000..eccb6026 --- /dev/null +++ b/barcode-0.98/barcode.spec @@ -0,0 +1,84 @@ +%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/barcode-0.98/bookland/bookland.py b/barcode-0.98/bookland/bookland.py new file mode 100644 index 00000000..373587cb --- /dev/null +++ b/barcode-0.98/bookland/bookland.py @@ -0,0 +1,884 @@ +#!/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=] [-s|--height=] [-r|--reduction=] [-o|outfile=] [-z|--quietzone] [| ]" + 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/barcode-0.98/cmdline.c b/barcode-0.98/cmdline.c new file mode 100644 index 00000000..a69a825b --- /dev/null +++ b/barcode-0.98/cmdline.c @@ -0,0 +1,177 @@ +/* + * 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 +#include +#include + +#ifdef NO_GETOPT + /* use replacement */ + #include "compat/getopt.h" +#else + #include +#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 ? "" : " ", 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/barcode-0.98/cmdline.h b/barcode-0.98/cmdline.h new file mode 100644 index 00000000..69319915 --- /dev/null +++ b/barcode-0.98/cmdline.h @@ -0,0 +1,58 @@ +/* + * 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/barcode-0.98/codabar.c b/barcode-0.98/codabar.c new file mode 100644 index 00000000..7065b9ea --- /dev/null +++ b/barcode-0.98/codabar.c @@ -0,0 +1,182 @@ +/* + * 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 +#include +#include +#include +#include + +#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; ierror = 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/barcode-0.98/code128.c b/barcode-0.98/code128.c new file mode 100644 index 00000000..cebba54c --- /dev/null +++ b/barcode-0.98/code128.c @@ -0,0 +1,607 @@ +/* + * 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 +#include +#include +#include +#include + +#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; ierror = 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 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 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 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/barcode-0.98/code39.c b/barcode-0.98/code39.c new file mode 100644 index 00000000..3308c950 --- /dev/null +++ b/barcode-0.98/code39.c @@ -0,0 +1,173 @@ +/* + * 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 +#include +#include +#include +#include + +#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/barcode-0.98/code93.c b/barcode-0.98/code93.c new file mode 100644 index 00000000..73f8cee3 --- /dev/null +++ b/barcode-0.98/code93.c @@ -0,0 +1,213 @@ +/* + * 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 +#include +#include +#include +#include + +#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; iflags & 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/barcode-0.98/compat/getopt.c b/barcode-0.98/compat/getopt.c new file mode 100644 index 00000000..91f00b55 --- /dev/null +++ b/barcode-0.98/compat/getopt.c @@ -0,0 +1,831 @@ +/* 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 . + Ditto for AIX 3.2 and . */ +#ifndef _NO_PROTO +#define _NO_PROTO +#endif + +#ifdef HAVE_CONFIG_H +#include +#endif + +#if !defined (__STDC__) || !__STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +#ifndef const +#define const +#endif +#endif + +#include + +/* 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 +#if defined (_LIBC) || defined (HAVE_UNISTD_H) +#include +#endif +#endif /* GNU C library. */ + +#ifdef VMS +#include +#if HAVE_STRING_H - 0 +#include +#endif +#endif + +#ifdef WIN32 +/* It's not Unix, really. See? Capital letters. */ +#include +#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 +# 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 +#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/barcode-0.98/compat/getopt.h b/barcode-0.98/compat/getopt.h new file mode 100644 index 00000000..952f4830 --- /dev/null +++ b/barcode-0.98/compat/getopt.h @@ -0,0 +1,129 @@ +/* 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/barcode-0.98/configure b/barcode-0.98/configure new file mode 100755 index 00000000..f0e5d457 --- /dev/null +++ b/barcode-0.98/configure @@ -0,0 +1,5197 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.57. +# +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="barcode.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP GETOPT_O NO_GETOPT NO_LIBPAPER LIBPAPER NO_STRERROR GMAKEDEPEND0 GMAKEDEPEND1 GMAKEDEPEND2 LIBOBJS LTLIBOBJS MAKEINFO REMOVEHTMLTAGS INFOTOHTML' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +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' + +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 + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # 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_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$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 ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) 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 | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$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 | -n) + 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_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + 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 "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# 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_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + 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 "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # 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 <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# 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 + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# 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 "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +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 $# != 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 + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# 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 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +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 + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $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 +# AmigaOS /C/install, which installs bootblocks on floppy discs +# 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 "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /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 + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +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 "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&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}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +if test x$GCC = xyes; then + CFLAGS="$CFLAGS -Wall" +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test "${ac_cv_header_getopt_h+set}" = set; then + echo "$as_me:$LINENO: checking for getopt.h" >&5 +echo $ECHO_N "checking for getopt.h... $ECHO_C" >&6 +if test "${ac_cv_header_getopt_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_getopt_h" >&5 +echo "${ECHO_T}$ac_cv_header_getopt_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking getopt.h usability" >&5 +echo $ECHO_N "checking getopt.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking getopt.h presence" >&5 +echo $ECHO_N "checking getopt.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: getopt.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: getopt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: getopt.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: getopt.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: getopt.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: getopt.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: getopt.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: getopt.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: getopt.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: getopt.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for getopt.h" >&5 +echo $ECHO_N "checking for getopt.h... $ECHO_C" >&6 +if test "${ac_cv_header_getopt_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_getopt_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_getopt_h" >&5 +echo "${ECHO_T}$ac_cv_header_getopt_h" >&6 + +fi +if test $ac_cv_header_getopt_h = yes; then + : +else + NO_GETOPT=-DNO_GETOPT;GETOPT_O=compat/getopt.o +fi + + +if test "${ac_cv_header_paper_h+set}" = set; then + echo "$as_me:$LINENO: checking for paper.h" >&5 +echo $ECHO_N "checking for paper.h... $ECHO_C" >&6 +if test "${ac_cv_header_paper_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_paper_h" >&5 +echo "${ECHO_T}$ac_cv_header_paper_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking paper.h usability" >&5 +echo $ECHO_N "checking paper.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking paper.h presence" >&5 +echo $ECHO_N "checking paper.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: paper.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: paper.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: paper.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: paper.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: paper.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: paper.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: paper.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: paper.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: paper.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: paper.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for paper.h" >&5 +echo $ECHO_N "checking for paper.h... $ECHO_C" >&6 +if test "${ac_cv_header_paper_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_paper_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_paper_h" >&5 +echo "${ECHO_T}$ac_cv_header_paper_h" >&6 + +fi +if test $ac_cv_header_paper_h = yes; then + LIBPAPER=-lpaper +else + NO_LIBPAPER=-DNO_LIBPAPER +fi + + + +for ac_header in unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +echo "$as_me:$LINENO: checking for strerror" >&5 +echo $ECHO_N "checking for strerror... $ECHO_C" >&6 +if test "${ac_cv_func_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strerror (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +/* 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 +char (*f) () = strerror; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != strerror; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strerror=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_strerror=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 +echo "${ECHO_T}$ac_cv_func_strerror" >&6 +if test $ac_cv_func_strerror = yes; then + : +else + NO_STRERROR=-DNO_STRERROR +fi + + +for ac_func in strcasecmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* 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 (); +/* 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 +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +echo "$as_me:$LINENO: checking \"for gmake\"" >&5 +echo $ECHO_N "checking \"for gmake\"... $ECHO_C" >&6 +GMAKE=no +${MAKE=make} --version 2> /dev/null | grep GNU > /dev/null && GMAKE=yes +echo "$as_me:$LINENO: result: $GMAKE" >&5 +echo "${ECHO_T}$GMAKE" >&6 +if test "$GMAKE" = "yes"; then + GMAKEDEPEND0='ifeq (.depend,$(wildcard .depend))' + GMAKEDEPEND1='include .depend' + GMAKEDEPEND2='endif' +fi + +echo "$as_me:$LINENO: checking \"if makeinfo can output html\"" >&5 +echo $ECHO_N "checking \"if makeinfo can output html\"... $ECHO_C" >&6 +MAKEINFOHTML=no +${MAKEINFO=makeinfo} --help | grep .--html > /dev/null && MAKEINFOHTML=yes +echo "$as_me:$LINENO: result: $MAKEINFOHTML" >&5 +echo "${ECHO_T}$MAKEINFOHTML" >&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 + + + + + + + + + + + + ac_config_files="$ac_config_files Makefile" +cat >confcache <<\_ACEOF +# 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, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# 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 \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@GETOPT_O@,$GETOPT_O,;t t +s,@NO_GETOPT@,$NO_GETOPT,;t t +s,@NO_LIBPAPER@,$NO_LIBPAPER,;t t +s,@LIBPAPER@,$LIBPAPER,;t t +s,@NO_STRERROR@,$NO_STRERROR,;t t +s,@GMAKEDEPEND0@,$GMAKEDEPEND0,;t t +s,@GMAKEDEPEND1@,$GMAKEDEPEND1,;t t +s,@GMAKEDEPEND2@,$GMAKEDEPEND2,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # 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_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + + + + + + ac_config_files="$ac_config_files doc/Makefile" +cat >confcache <<\_ACEOF +# 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, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# 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 \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@GETOPT_O@,$GETOPT_O,;t t +s,@NO_GETOPT@,$NO_GETOPT,;t t +s,@NO_LIBPAPER@,$NO_LIBPAPER,;t t +s,@LIBPAPER@,$LIBPAPER,;t t +s,@NO_STRERROR@,$NO_STRERROR,;t t +s,@GMAKEDEPEND0@,$GMAKEDEPEND0,;t t +s,@GMAKEDEPEND1@,$GMAKEDEPEND1,;t t +s,@GMAKEDEPEND2@,$GMAKEDEPEND2,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@REMOVEHTMLTAGS@,$REMOVEHTMLTAGS,;t t +s,@INFOTOHTML@,$INFOTOHTML,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # 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_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + diff --git a/barcode-0.98/configure.in.dist b/barcode-0.98/configure.in.dist new file mode 100644 index 00000000..07120b48 --- /dev/null +++ b/barcode-0.98/configure.in.dist @@ -0,0 +1,65 @@ +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/barcode-0.98/contrib/barcode-SVG.tar.gz b/barcode-0.98/contrib/barcode-SVG.tar.gz new file mode 100644 index 00000000..69df9562 Binary files /dev/null and b/barcode-0.98/contrib/barcode-SVG.tar.gz differ diff --git a/barcode-0.98/contrib/barcode-SVG.tar.gz.README b/barcode-0.98/contrib/barcode-SVG.tar.gz.README new file mode 100644 index 00000000..1608ebaf --- /dev/null +++ b/barcode-0.98/contrib/barcode-SVG.tar.gz.README @@ -0,0 +1,24 @@ + +[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/barcode-0.98/contrib/barcode-for-delphi.tar.gz b/barcode-0.98/contrib/barcode-for-delphi.tar.gz new file mode 100644 index 00000000..cbc8e676 Binary files /dev/null and b/barcode-0.98/contrib/barcode-for-delphi.tar.gz differ diff --git a/barcode-0.98/contrib/barcode-for-delphi.tar.gz.README b/barcode-0.98/contrib/barcode-for-delphi.tar.gz.README new file mode 100644 index 00000000..36d216d7 --- /dev/null +++ b/barcode-0.98/contrib/barcode-for-delphi.tar.gz.README @@ -0,0 +1,10 @@ + +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 . diff --git a/barcode-0.98/contrib/barcodeps-0.1.tgz b/barcode-0.98/contrib/barcodeps-0.1.tgz new file mode 100644 index 00000000..1dadb1c6 Binary files /dev/null and b/barcode-0.98/contrib/barcodeps-0.1.tgz differ diff --git a/barcode-0.98/contrib/barcodeps-0.1.tgz.README b/barcode-0.98/contrib/barcodeps-0.1.tgz.README new file mode 100644 index 00000000..b0364f6e --- /dev/null +++ b/barcode-0.98/contrib/barcodeps-0.1.tgz.README @@ -0,0 +1,25 @@ + + ***** 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/barcode-0.98/contrib/grab-0.0.4.tar.gz b/barcode-0.98/contrib/grab-0.0.4.tar.gz new file mode 100644 index 00000000..91fa9e6a Binary files /dev/null and b/barcode-0.98/contrib/grab-0.0.4.tar.gz differ diff --git a/barcode-0.98/contrib/grab-0.0.4.tar.gz.README b/barcode-0.98/contrib/grab-0.0.4.tar.gz.README new file mode 100644 index 00000000..4a048075 --- /dev/null +++ b/barcode-0.98/contrib/grab-0.0.4.tar.gz.README @@ -0,0 +1,13 @@ + +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/barcode-0.98/debian/README.debian b/barcode-0.98/debian/README.debian new file mode 100644 index 00000000..7223023a --- /dev/null +++ b/barcode-0.98/debian/README.debian @@ -0,0 +1,9 @@ +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/barcode-0.98/debian/changelog b/barcode-0.98/debian/changelog new file mode 100644 index 00000000..b43e686f --- /dev/null +++ b/barcode-0.98/debian/changelog @@ -0,0 +1,27 @@ +barcode (0.98) unstable; urgency=low + + * New upstream release + + -- Alessandro Rubini Fri, 1 Mar 2002 23:04:14 +0100 + +barcode (0.96) unstable; urgency=low + + * New upstream release + + -- Alessandro Rubini Wed, 8 Nov 2000 18:29:18 +0200 + +barcode (0.95) unstable; urgency=low + + * New upstream release + + -- Alessandro Rubini Thu, 3 Feb 2000 21:16:59 +0200 + +barcode (0.94) unstable; urgency=low + + * Initial Release. + + -- Alessandro Rubini Sun, 24 Oct 1999 01:10:23 +0200 + +Local variables: +mode: debian-changelog +End: diff --git a/barcode-0.98/debian/control b/barcode-0.98/debian/control new file mode 100644 index 00000000..aacbfd49 --- /dev/null +++ b/barcode-0.98/debian/control @@ -0,0 +1,14 @@ +Source: barcode +Section: misc +Priority: optional +Maintainer: Alessandro Rubini +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/barcode-0.98/debian/copyright b/barcode-0.98/debian/copyright new file mode 100644 index 00000000..c193af2c --- /dev/null +++ b/barcode-0.98/debian/copyright @@ -0,0 +1,8 @@ +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/barcode-0.98/debian/dirs b/barcode-0.98/debian/dirs new file mode 100644 index 00000000..6822e402 --- /dev/null +++ b/barcode-0.98/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/include +usr/info diff --git a/barcode-0.98/debian/info b/barcode-0.98/debian/info new file mode 100644 index 00000000..18336bfb --- /dev/null +++ b/barcode-0.98/debian/info @@ -0,0 +1,15 @@ +# 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/barcode-0.98/debian/rules b/barcode-0.98/debian/rules new file mode 100755 index 00000000..c48c5a1c --- /dev/null +++ b/barcode-0.98/debian/rules @@ -0,0 +1,50 @@ +#!/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/barcode-0.98/doc/Makefile.in b/barcode-0.98/doc/Makefile.in new file mode 100644 index 00000000..dae8f6b6 --- /dev/null +++ b/barcode-0.98/doc/Makefile.in @@ -0,0 +1,135 @@ +# +# 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/barcode-0.98/doc/README b/barcode-0.98/doc/README new file mode 100644 index 00000000..5af5490f --- /dev/null +++ b/barcode-0.98/doc/README @@ -0,0 +1,5 @@ + +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/barcode-0.98/doc/barcode.info b/barcode-0.98/doc/barcode.info new file mode 100644 index 00000000..66b59d06 --- /dev/null +++ b/barcode-0.98/doc/barcode.info @@ -0,0 +1,747 @@ +This is barcode.info, produced by makeinfo version 4.0b 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 "[ x ] [+ + + ]" (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 + " x [+ + [- + [- ]]]" (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 "," 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: Top154 +Node: Overview526 +Node: The Barcode Object1404 +Node: The Field List2821 +Node: The Intermediate Representation6586 +Node: Supported Flags8359 +Node: The API11343 +Node: The barcode Executable14029 +Node: The Command Line14458 +Node: Supported Encodings19557 +Node: PCL Output28997 +Node: Bugs and Pending Issues31316 + +End Tag Table diff --git a/barcode-0.98/doc/barcode.pdf b/barcode-0.98/doc/barcode.pdf new file mode 100644 index 00000000..b2268f4d Binary files /dev/null and b/barcode-0.98/doc/barcode.pdf differ diff --git a/barcode-0.98/doc/barcode.ps b/barcode-0.98/doc/barcode.ps new file mode 100644 index 00000000..cc6cc2c4 --- /dev/null +++ b/barcode-0.98/doc/barcode.ps @@ -0,0 +1,2378 @@ +%!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.08.21:2135 +%%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 D97 DI<923807FF80037F13F00203B512FC02 +0F80023F8091B500031380499038F8007F010701E0EBFFC049EB800149495A49485B495A +49485B5A485BA248491580180048496D5A486F5A93C8FC485BA35A91CAFCA3B5FC5BA45B +A65B17036C6CED0780170FEF3FC0003F167F6DEC01FF001F4B13806C6C021F13006C6DEB +7FFC6C9039F00FFFF86C90B612E06C5E013F4AC7FC010F14F0010049C8FC323773B540> +II<923807FF8092B512E0020714F8021F80027F80903A01FFFE03FF49D9F000 +13804901C0EB7FC0495B013F90C7123F495A495A5C5A485B4849147F18804816FF4A4913 +00485DEE0FFE4849EB7FFC923807FFF891B612E0485E94C7FC16F04BC8FCB5CAFC5BA45B +A7007F1603EF0780170F003FEE3FC0177F6C6CEC01FF4C13806C6C021F13006C01C0EB7F +FC6C9039F00FFFF86C90B612E06C6C5D6D4AC7FC010714F09026007FFEC8FC323773B540 +>I<923807FFC0037F13FC0203B6FC020F15C0023F8191B5000313F8499039F8007FFC01 +0701E0133F4901806D7E4990C76C7E49481680495A4948804818C0485BA2485BA248494A +13E05AA2485BA24D13C05A91C8FCA25FB517805BA25F19005B6017FF605E60495E5E6C6C +4A5B604C5B003F4B90C7FC6D4A5A001F4B5A6C6C4A5A6CD980035B6CD9F01F13C06C90B6 +5A6C4BC8FC013F14F0010F14C0010001F8C9FC3B3773B547>111 +D114 +D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fb cmsy10 10.95 1 +/Fb 1 16 df15 +D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fc cmb10 10.95 10 +/Fc 10 115 df97 D<13FFB5FCA512077EAFEC03FE91381FFF +C0027F13F091B57E9138FE0FFE9138F003FF4A7E02C014804A6C13C017E0A3EE7FF0A317 +F8AC17F0A3EEFFE0A217C05D02C014806E4813006E485A9138FC1FFC01FCB55A496C13E0 +D9F01F1380C7D807FCC7FC2D407EBE33>III<49B47E010F13F0013F7F90B512FE48EBC3FF480100 +13804848EB7FC04848133F001F15E05B003FEC1FF0A2485A150F16F8A212FFA290B6FCA4 +01F0C8FCA5127FA37F003F15F8A26C6C1301000F15F06D13036C6CEB07E06C9038800FC0 +6C9038F07F806C6CB512006D5B010F13F8010013C0252B7EA92A>I103 +D105 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 df97 +DII<963803FFC0061FB512E06060A47214C0F000 +1F61A21B80A261A21B00A296B5FCA262A260A262A260A262A260A262A260A2DCFFE05C03 +0F13FC037FEBFF1F4AB6129F020792B55A4AEBE07F023FEB000F4A487F4948486D5C4913 +F04981495B49496D91C7FC495B5B92C8FC90B55E485B5F485B4860A248495CA248605C5F +5A4A5EA2485EA24A5EA2B55DA24A5EA25FA291C85CA24DEC3F801A7F19005B94B513FFA2 +4E1400A24C5C007F614C13FC4C1403003F4B5D6D4A14076C4B5D6C6D49140F4BB55C6CD9 +C007013F495A6C9026F03FFEEBFE3FC690B5D8F81FB55A6DDAF0075C011FDAC00349C7FC +010749C75B9026007FF0EC1FF04B6571E355>II<93381FFF804BB512F8031F14 +FF037F15C04AB77E0207D9FC0313F8021FD9E0007F4A0180EB3FFEDAFFFEC76C7E494916 +8049496E13C0495B49496E13E0495B494916F05B90B5C87E1AF8485B485F5C5A5C5AA248 +5B605A5CA2485FA24A17F0A2B55EA24A17E0A2601AC091C9FC95B51280A21A005F615F49 +5F4D5B127F6D4B5B616C4C5B4D5B6C6D4A90C7FC4D5A6C6D495B6C4B5B6C6D010F13E06C +01F8013F5B6CD9FE01B5C8FC013FB612FC6D15F0010715C0010002FCC9FC020F13C04542 +71C055>111 D114 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fe cmbxti10 13.15 11 +/Fe 11 120 df97 D99 D<943801FF800403B512C05E1980A282EE000F1900A25FA260A2173FA260 +A2177FA260A217FFA260A25EEDFFC1020701F15B023F13FD91B7FC4913E00107D9003F5B +49487F49487F495A49486D5B495A485D5C4894C7FC5A4A5B5A91C75B5A163FA248485DA2 +167F127F495DA216FF12FF495DA25D181E49EDE03FA24B5C187E17C0A2007F5F5D4B1380 +003F4AEB81F85D6C6C49EB83F06C6C48B55B2707FE0FFC13CF6CB539F07FFFC06C4A6C5B +6C6CD9800F90C7FC903A0FFC0003FC3A4D75CB41>III104 D<15F8EC03FC4A7E4A7EA25CA35DA2 +5D6E5AEC03E091C8FCAEEB07F8EB1FFEEB7FFF90B57E3901FC7FC0D803F07FEA07E0D80F +C07FA2381F80FFA2485A5B007E5CA25B00FE5C485A007C5C12005B92C7FCA25B5C133F5C +A2137F5CA213FFECF00F48EC1F8014E0153F48150014C05D48147E14805D14816CEB01F8 +4A5A4A5A6CEB1FC06CEBFF806D90C7FC6D5AEB07F0214E78CC27>I108 D<913801FFC0021F13F8027F13FE91B6FC4901001380D903FC +EB3FC0D907F0130F010FEC3FE04948137F4A13FF133FA2017F4913C0A26F138017006E13 +7E02FC90C7FCECFFC015FE6F7E16E06D80826D807F6D80010180EB003F1403EC003FD803 +C0130FD80FE01303EA3FF0486C7FA200FF5DA34B5A5B49495A495C49130F6CC7485AD83F +C0EB7FC03A1FF803FF806CB548C7FC6C14F8000114E026001FFEC8FC2B3377B135>115 +DI119 +D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Ff cmbx12 13.14 13 +/Ff 13 117 df<923803FFE092B512FC020714FF021F81027F9038007FC0DAFFF0EB0FE0 +010301C0804990C7EA3FF84948147F4A81494814FF495AA2137F5CA2715A715A715AEF07 +8094C8FCA8EF07FCB9FCA526007FF0C7123F171FB3B3003FB5D8E00FB512F8A53D4D7ECC +44>12 D46 D85 D97 D100 DII< +EB7FC0B5FCA512037EB3A2923801FFC0030F13F8033F13FE4B7F9126C1FE077F9126C3F0 +037F9138C7C001DACF8080150002DE7F02FC81A25CA25CA35CB3A9B6D8C07FEBFFE0A53B +4C7BCB44>104 D108 +D<903A7FC001FFC0B5010F13F8033F13FE4B7F9126C1FE077F9126C3F0037F00039038C7 +C0016CD9CF8080150002DE7F02FC81A25CA25CA35CB3A9B6D8C07FEBFFE0A53B317BB044 +>110 D<913807FF80027F13F80103B6FC010F15C090261FFE017F903A7FF0003FF8D9FF +C0EB0FFC48496D7E4890C76C7E4817804980000F17C048486E13E0A2003F17F049157FA2 +007F17F8A400FF17FCAB007F17F8A36C6CEDFFF0A3001F17E06D5C000F17C06C6C4A1380 +6C17006C6D495A6C01E0EB1FFC6D6C495A903A3FFE01FFF0010FB612C0010392C7FCD900 +7F13F80207138036337DB13D>I<90390FFF8070017FEBF1F048B6FC1207380FFC01391F +E0003F4848130F491307127F90C712035A1501A27FA213E06D90C7FC13FE387FFFF0ECFF +C015F06C14FC6C14FF6C15806C15C06C15E0C615F0013F14F8010714FCEB007F14019138 +003FFE150F0078140700F81403A26C1401A37E16FC6C14036D14F87F6DEB07F001F8EB1F +E001FFEBFFC091B51280D8FC7F1400D8F81F13FCD8E00313C027337CB130>115 +D<14F8A61301A41303A21307A2130FA2131F133F137F13FF1203000F90B512F0B7FCA426 +007FF8C7FCB3A6167CAA013F14F880A290391FFE01F0010F1303903907FF87E06DEBFFC0 +6D14806D6C1300EC0FFC26467EC430>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fg cmti10 10.95 35 +/Fg 35 122 df<933807FF80043F13E09338FE00F8DB01F0133EDB07E0130E4B48131F4C +137F031F14FF4BC7FCA218FE157E1878180015FE5DA31401A25DA414030103B712F0A218 +E0903A0003F000070207140F4B14C0A3171F020F15805DA2173F1800141F5D5F177EA214 +3F92C712FE5FA34A1301027EECF81CA3160302FEECF03C4A1538A21878187013014A0101 +13F018E0933800F1C0EF7F804948EC1F0094C7FCA35C1307A2001E5B127F130F00FF5BA2 +49CAFC12FEEAF81EEA703CEA7878EA1FF0EA07C0385383BF33>12 +DI40 +D<14031580A2EC01C0EC00E0A21570A215781538153CA3151EA4151FA2150FA7151FA915 +3FA2153EA3157EA2157CA215FCA215F8A21401A215F0A2140315E0A2140715C0A2EC0F80 +A2141F15005C143EA25CA25CA2495A5C1303495A5C130F49C7FC131E5B137C5B5B485A48 +5A485A48C8FC121E5A12705A5A205A7FC325>I<387FFFFCA3B5FCA21605799521>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<92391FE00380ED7FFC913A01FFFE0700913907F01F8F91390FC007DF4AC6 +6CB4FC023E6D5A4A130014FC495A4948147CA2495AA2010F15785CA3011F1570A46E91C7 +FCA2808014FE90380FFFE015FC6DEBFF8016E06D806D806D6C7F141F02037FEC003FED07 +FF1501A281A282A212075A167E120EA2001E15FE5EA25E003E14015E003F14034B5A486C +5C150F6D495A6D49C8FCD8F9F0137C39F8FE01F839F03FFFF0D8E00F13C026C001FEC9FC +314279BF33>83 D<277FFFFE01B500FC90B512E0B5FCA20003902680000790C7380FFC00 +6C90C701FCEC07F049725A04035EA26350C7FCA20407150EA2040F5D1A3C041F15386216 +3B6216734F5A6D14E303014B5A6C15C303034BC8FC1683DB0703140E191E030E151C6103 +1C7F61ED380161157003F04A5A15E002014B5A15C0DA03804AC9FC60DA0700140E60140E +605C029C5D14B8D97FF85D5C715A5C4A5DA24A92CAFC5F91C7FC705A137E5F137C5F1378 +01705D53406EBD5B>87 D<147E49B47E903907C1C38090391F80EFC090383F00FF017E13 +7F4914804848133F485AA248481400120F5B001F5C157E485AA215FE007F5C90C7FCA214 +01485C5AA21403EDF0385AA21407EDE078020F1370127C021F13F0007E013F13E0003E13 +7FECF3E1261F01E313C03A0F8781E3803A03FF00FF00D800FC133E252977A72E>97 +DIIII<167C4BB4FC923807C78092380F83C0ED1F87161FED3F3FA2157EA21780EE0E004B +C7FCA414015DA414035DA30103B512F8A390260007E0C7FCA3140F5DA5141F5DA4143F92 +C8FCA45C147EA414FE5CA413015CA4495AA4495AA4495A121E127F5C12FF49C9FCA2EAFE +1EEAF83C1270EA7878EA3FE0EA0F802A5383BF1C>III<1478EB01FCA21303A314F8EB00E01400AD137C48 +B4FC38038F80EA0707000E13C0121E121CEA3C0F1238A2EA781F00701380A2EAF03F1400 +12005B137E13FE5BA212015BA212035B1438120713E0000F1378EBC070A214F0EB80E0A2 +EB81C01383148038078700EA03FEEA00F8163E79BC1C>I108 +DIII<903903E001F890390FF807FE903A1E7C1E0F80903A1C3E3C07C001 +3C137801389038E003E0EB783F017001C013F0ED80019038F07F0001E015F8147E160300 +0113FEA2C75AA20101140717F05CA20103140F17E05CA20107EC1FC0A24A1480163F010F +15005E167E5E131F4B5A6E485A4B5A90393FB80F80DA9C1FC7FCEC0FFCEC03E049C9FCA2 +137EA213FEA25BA21201A25BA21203A2387FFFE0B5FCA22D3A80A72E>I114 DII<137C48B4141C26038F80137EEA0707000E7F001E15FE +121CD83C0F5C12381501EA781F007001805BA2D8F03F1303140000005D5B017E1307A201 +FE5C5B150F1201495CA2151F0003EDC1C0491481A2153F1683EE0380A2ED7F07000102FF +13005C01F8EBDF0F00009038079F0E90397C0F0F1C90391FFC07F8903907F001F02A2979 +A731>I<017CEB01C048B4EB07F038038F80EA0707000E01C013F8121E001C1403EA3C0F +0038EC01F0A2D8781F130000705BA2EAF03F91C712E012005B017E130116C013FE5B1503 +000115805BA2ED07001203495B150EA25DA25D1578000114706D5B0000495A6D485AD97E +0FC7FCEB1FFEEB03F0252979A72A>I<017C167048B491387001FC3A038F8001F8EA0707 +000E01C015FE001E1403001CEDF000EA3C0F0038177C1507D8781F4A133C00701380A2D8 +F03F130F020049133812005B017E011F14784C137013FE5B033F14F0000192C712E05BA2 +170100034A14C049137E17031880A2EF070015FE170E00010101141E01F86D131C0000D9 +039F5BD9FC076D5A903A3E0F07C1E0903A1FFC03FFC0902703F0007FC7FC372979A73C> +I<903903F001F890390FFC07FE90393C1E0E0F9026780F1C138001F0EBB83FD801E013F8 +9039C007F07FEA0380000714E0D9000F140048151C000E4AC7FCA2001E131FA2C75BA214 +3F92C8FCA35C147EA314FE4A131CA30101143C001E1538003F491378D87F811470018314 +F000FF5D9039077801C039FE0F7C033A7C0E3C078027783C1E1EC7FC391FF80FFC3907E0 +03F029297CA72A>I<137C48B4143826038F8013FCEA0707000E7F001E1401001C15F8EA +3C0F12381503D8781F14F000701380A2D8F03F1307020013E012005B017E130F16C013FE +5B151F1201491480A2153F000315005BA25D157EA315FE5D00011301EBF8030000130790 +387C1FF8EB3FF9EB07E1EB00035DA21407000E5CEA3F80007F495AA24A5AD8FF0090C7FC +143E007C137E00705B387801F0383803E0381E0FC06CB4C8FCEA03F8263B79A72C>I +E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fh cmsl10 10.95 33 +/Fh 33 122 df<007FB5FCA2B512FEA418067C961E>45 D<157015F014011407143F9038 +03FFE0137FEBFFCFEBF80F1300141F15C0A5143F1580A5147F1500A55C5CA513015CA513 +035CA513075CA5130F5CA3131F497EB612F8A31D3D78BC2D>49 DII<01061403D90780131F90390FF801FE91B512FC16F816F016E0168049EB +FE0015F890381C7FC091C8FCA3133C1338A513781370A2EC1FE0ECFFF8903873E03E9038 +FF001F01FCEB0F804914C049EB07E04914F049130390C7FC16F8A61507A21206EA3F8048 +7EA2150F00FF15F0A24914E090C7121F00FC15C000F0143F00701580ED7F0012786C14FE +4A5A6C495A390F800FE03907E03FC06CB5C7FCC613FCEB1FE0283F7ABC2D>53 +D56 DI<17E016011603831607A2160FA2161F83163FA2167F167716F7EEE7FCED +01E316C3150316831507EE03FEED0F01150E151E151C153C03387FED7800157015F05D4A +4880177F4A5AA24AC7FCA2020E81173F5C021FB6FC5CA20270C7EA3FE0171F5CA2495AA2 +494881170F49C8FCA2130EA24982013C1507A2137CD801FE4B7E2607FF80EC3FFEB500F0 +0107B512FC19F85E3E417DC044>65 D<013FB7FC18E018FC903B007FE00007FE6E489038 +01FF809438007FC05DF03FE0F01FF0A3027F16F892C8FCA54A16F04A153F19E0187F19C0 +F0FF8001014B13004A4A5A4D5AEF1FF04D5ADC03FFC7FC49B612F8EFFF8002F8C7EA3FE0 +EF0FF0EF07FC717E010715014A81711380A319C0130F5CA5011F4B13805C19005F601707 +013F4B5A4A4A5A4D5A4D5A017F913801FF8001FF020F90C7FCB812FC17F094C8FC3D3E7D +BD40>II<013FB812F8A39026007F +F0C7127F6E48140F18034B14011800A31978147F4B1570A502FF147092C7FCA3190017F0 +495D4A1301A21607161F91B6FC495DA29138FC003F160F1607160301075D5CA219E01801 +19C0010FEC07004A90C712031980A218071900011F5E5C181EA2183E183C013F167C4A15 +FC4D5A1707017F151F01FF4AB45AB9FCA2603D3E7DBD3E>69 D<011FB512FC5BA2903900 +3FF8006E5AA25DA5143F5DA5147F5DA514FF92C7FCA55B5CA513035CA513075CA5130F5C +A5131F5CA3133F497E007FB512F0A2B6FC263E7EBD21>73 D<90263FFFF093381FFFF850 +13F0629026007FF8EFF000023F4D5AA2023B933801DFC0A2DA39FCED039FA2F1073F1479 +0271040E5BEC70FE191C19381A7F02F01670DAE07F94C7FC19E0A2F001C06201016D6C49 +5A02C05FF00700A2180E6F6C14010103161C028003385BA218706F7EF0E00313070200DA +01C05BA2923907F00380A294380700075B010E902603F80E5C5FA25F190F011E6D6C5A01 +1C605FA2EEFDC0DB00FF141F013C5D013860013C92C7FC017C5C01FE027E143F2607FF80 +017C4A7EB500FC037FB512E004785E4A1338553E7CBD53>77 D<90263FFFE0023FB5FC6F +16FEA29026003FF8020313C0021F030013004A6C157C023B163C6F153814398102381678 +02787FDA707F157082153F82031F15F002F07FDAE00F5D8215078203031401010180DAC0 +015D82811780047F1303010315C04A013F5C17E0161F17F0040F1307010715F891C70007 +91C7FC17FC160317FE04015B4915FF010E6E130E188E177F18CEEF3FDE011E16FE011C6F +5AA2170FA21707133C01386F5A133C017C150113FE2607FF801400B512FC18705C483E7D +BD44>I<013FB612FEEFFFE018F8903B007FF0000FFC6E48EB01FF7113804BEC7FC0183F +19E0F01FF0A2147F5D19F8A402FFED3FF092C8FCA219E0A2F07FC05B4AEDFF8019004D5A +4D5AEF0FF80103ED3FE04A903801FF8091B648C7FC17F002FCCAFCA213075CA5130F5CA5 +131F5CA5133F5CA3137F497EB612E0A25D3D3E7DBD3E>80 D<9238FF80070207EBE00F02 +1FEBF81E91387F00FE02FCEB1F3ED903F0EB0FFE49481307494813034AEB01FC49C7FC49 +1400133E137E177C491578A57F1770A26D1500808080EB7FFEECFFE06D13FEEDFFC06D14 +F06D14FC010380010080143F02031480DA003F13C015031500EE7FE0163F161FA2160F12 +1CA31607160F003C16C0A31780003E151F1700007E5D007F153E6D5C16FC01E0495AD87D +F0495AD8FCFCEB0FC03AF87F803F8027F01FFFFEC7FCD8E00713F839C0007FC030427BBF +33>83 D85 D97 DIIIII<1478EB01FE130314FFA25B14FE130314FCEB00F0 +1400ACEB03F8EA01FF14F0A2EA001F130FA314E0A5131F14C0A5133F1480A5137F1400A5 +5B5BA4EA03FF007F13F0A2B5FC183E7DBD1A>105 D<143FEB1FFF5BA213017FA214FEA5 +130114FCA5130314F8A5130714F0A5130F14E0A5131F14C0A5133F1480A5137F1400A55B +5BA4EA03FF007F13F8A2B5FC183F7DBE1A>108 D<903907F007F8D803FFEB1FFF9139E0 +781FC09138E1E00F3B001FE38007E090380FE70002EE14F014FC14D814F85CA24A130F13 +1F4A14E0A4161F133F4A14C0A4163F137F91C71380A4167F5B491500A300015D486C4913 +80B5D8F87F13FCA32E287DA733>110 DI<903907F01F80D803 +FFEB7FE09138E1E1F09138E387F839001FE707EB0FE614EE02FC13F002D813E09138F801 +804AC7FCA25C131FA25CA4133F5CA5137F91C8FCA55B5BA31201487EB512FEA325287EA7 +24>114 D<9138FF81C0010713E390381F807F90397C003F8049131F4848130F5B000314 +07A248481400A27FA27F6D90C7FCEBFF8014FC6C13FF6C14C015F06C6C7F011F7F130790 +38007FFE1403140100381300157EA2123C153E157E007C147CA2007E147815F8007F495A +4A5A486C485A26F9E01FC7FC38E0FFFC38C01FE0222A7DA824>II118 +DI<90B539E007 +FFF05E18E0902707FE000313006D48EB01FC705A5F01014A5A5F16036E5C0100140794C7 +FC160E805E805E1678ED8070023F13F05EED81C015C191381FC38015C793C8FC15EF15EE +EC0FFCA25DA26E5AA25DA26E5A5DA24AC9FC5C140E141E141C5C121C003F5B5A485B495A +130300FE5B4848CAFCEA701EEA783CEA3FF0EA0FC0343A80A630>121 +D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fi cmbx12 17.28 43 +/Fi 43 122 df46 D<16F04B7E1507151F153FEC01FF1407 +147F010FB5FCB7FCA41487EBF007C7FCB3B3B3B3007FB91280A6395E74DD51>49 +D<913801FFF8021FEBFFC091B612F8010315FF010F16C0013F8290267FFC0114F89027FF +E0003F7F4890C7000F7F48486E7FD807F86E148048486E14C048486E14E048486F13F001 +FC17F8486C816D17FC6E80B56C16FE8380A219FFA283A36C5BA26C5B6C90C8FCD807FC5D +EA01F0CA14FEA34D13FCA219F85F19F04D13E0A294B512C019804C14004C5B604C5B4C5B +604C13804C90C7FC4C5A4C5A4B13F05F4B13804B90C8FC4B5AED1FF84B5A4B5A4B48143F +4A5B4A48C8FC4A5A4A48157E4A5A4A5AEC7F8092C9FC02FE16FE495A495A4948ED01FCD9 +0FC0150749B8FC5B5B90B9FC5A4818F85A5A5A5A5ABAFCA219F0A4405E78DD51>I<92B5 +FC020F14F8023F14FF49B712C04916F0010FD9C01F13FC90271FFC00077FD93FE001017F +49486D8049C86C7F484883486C6F7F14C0486D826E806E82487FA4805CA36C5E4A5E6C5B +6C5B6C495E011FC85A90C95CA294B55A614C91C7FC604C5B4C5B4C5B4C5B047F13809226 +0FFFFEC8FC020FB512F817E094C9FC17F817FF91C7003F13E0040713F8040113FE707F71 +7F7113E085717FA2717F85A285831A80A31AC0EA03FCEA0FFF487F487F487FA2B57EA31A +80A34D14005C7E4A5E5F6C495E49C8485BD81FF85F000F5ED807FE92B55A6C6C6C491480 +6C01F0010791C7FC6C9026FF803F5B6D90B65A011F16F0010716C001014BC8FCD9001F14 +F0020149C9FC426079DD51>II<01C0EE01C0D801F8160F01FF167F02F0EC07FFDAFF8090B5FC92B712 +8019006060606060606095C7FC17FC5F17E0178004FCC8FC16E09026FC3FFCC9FC91CBFC +ADED3FFE0203B512F0020F14FE023F6E7E91B712E001FDD9E00F7F9027FFFE00037F02F8 +01007F02E06EB4FC02806E138091C8FC496F13C04917E07113F0EA00F090C914F8A219FC +83A219FEA419FFA3EA03F0EA0FFC487E487E487FA2B57EA319FEA35C4D13FC6C90C8FC5B +4917F8EA3FF001804B13F06D17E0001F5E6C6C17C06D4B1380D807FC92B512006C6C4A5B +6C6C6C01075B6C01E0011F5BD97FFE90B55A6DB712C0010F93C7FC6D15FC010115F0D900 +3F1480020301F0C8FC406078DD51>III<92383FFF800203B512FC021FECFF80027F +15E049B712F849D9F0077F010F90C76C7ED91FFCEC1FFFD93FF06E7F494802037F494882 +717F484980854890C9127FA24884183FA25A80A380806E157F6E5E14FE6E7E6F4A5A6C14 +F003FC495B03FF495B6C1580DCE0075B6CDBF80F90C7FC9338FE1FFE6C9238FF7FF84D5A +6D16C06D5E6D4BC8FC6D6F7E6D16E00101826D16FC023F814A8149B87E01078349839026 +3FFE3F8190267FFC0F819026FFF003814849C6FC48496D804849131F4890C70007801601 +48486E1580003F163F49150F007F7014C0491501717E8400FF835B8484A384A21A80A27F +007F1900607F003F606D160F001F606D4C5A6C6D153F6C6D4B5A6C01F04B5A6C01FC0203 +5B6C01FF021F5B6D9027F001FFFEC7FC6D90B65A010F16F001035E010093C8FC020F14F8 +DA007F90C9FC426079DD51>I66 D<4DB5ED03C0057F02F01407 +0407B600FE140F047FDBFFC0131F4BB800F0133F030F05FC137F033F9127F8007FFE13FF +92B6C73807FF814A02F0020113C3020702C09138007FE74A91C9001FB5FC023F01FC1607 +4A01F08291B54882490280824991CB7E49498449498449498449865D49498490B5FC484A +84A2484A84A24891CD127FA25A4A1A3F5AA348491A1FA44899C7FCA25CA3B5FCB07EA380 +A27EA2F50FC0A26C7FA37E6E1A1F6C1D80A26C801D3F6C6E1A00A26C6E616D1BFE6D7F6F +4E5A7F6D6D4E5A6D6D4E5A6D6D4E5A6D6E171F6D02E04D5A6E6DEFFF806E01FC4C90C7FC +020F01FFEE07FE6E02C0ED1FF8020102F8ED7FF06E02FF913803FFE0033F02F8013F1380 +030F91B648C8FC030117F86F6C16E004071680DC007F02F8C9FC050191CAFC626677E375 +>IIII73 D76 D<94381FFFE00407B67E043F15F04BB712FE030F +EEFFC0033FD9FC0014F092B500C0010F13FC020349C7000113FF4A01F86E6C7F021F496F +13E04A01C0030F7F4A496F7F91B5C96C7F0103497013FF494970804B834949717F498749 +49717F49874B8390B586484A717FA24891CB6C7FA2481D804A84481DC0A348497214E0A3 +481DF0A34A85481DF8A5B51CFCB06C1DF8A36E96B5FCA36C1DF0A46C6D4E14E0A36C1DC0 +6E606C1D80A26C6E4D1400A26C6E4D5BA26C6E4D5BA26D6D4D5B6D636D6D4D5B6F94B5FC +6D636D6D4C5C6D6D4C91C7FC6D6E4B5B6D02E0031F5B023F6D4B13F06E01FC92B55A6E01 +FF02035C020302C0010F91C8FC020002FC90B512FC033F90B712F0030F17C0030394C9FC +DB007F15F804071580DC001F01E0CAFC666677E379>79 DI83 D<001FBEFCA64849C79126E0000F +148002E0180091C8171F498601F81A0349864986A2491B7FA2491B3F007F1DC090C9181F +A4007E1C0FA600FE1DE0481C07A5CA95C7FCB3B3B3A3021FBAFCA663617AE070>II<913803FFFE027FEBFF +F00103B612FE010F6F7E4916E090273FFE001F7FD97FE001077FD9FFF801017F486D6D7F +717E486D6E7F85717FA2717FA36C496E7FA26C5B6D5AEB1FC090C9FCA74BB6FC157F0207 +B7FC147F49B61207010F14C0013FEBFE004913F048B512C04891C7FC485B4813F85A5C48 +5B5A5CA2B55AA45FA25F806C5E806C047D7F6EEB01F96C6DD903F1EBFF806C01FED90FE1 +14FF6C9027FFC07FC01580000191B5487E6C6C4B7E011F02FC130F010302F001011400D9 +001F90CBFC49437CC14E>97 D<903807FF80B6FCA6C6FC7F7FB3A8EFFFF8040FEBFF8004 +7F14F00381B612FC038715FF038F010014C0DBBFF0011F7FDBFFC001077F93C76C7F4B02 +007F03F8824B6F7E4B6F13804B17C0851BE0A27313F0A21BF8A37313FCA41BFEAE1BFCA4 +4F13F8A31BF0A24F13E0A24F13C06F17804F1300816F4B5A6F4A5B4AB402075B4A6C6C49 +5B9126F83FE0013F13C09127F00FFC03B55A4A6CB648C7FCDAC00115F84A6C15E091C700 +1F91C8FC90C8000313E04F657BE35A>I<92380FFFF04AB67E020F15F0023F15FC91B77E +01039039FE001FFF4901F8010113804901E0010713C04901804913E0017F90C7FC49484A +13F0A2485B485B5A5C5A7113E0485B7113C048701380943800FE0095C7FC485BA4B5FCAE +7EA280A27EA2806C18FCA26C6D150119F87E6C6D15036EED07F06C18E06C6D150F6D6DEC +1FC06D01E0EC7F806D6DECFF00010701FCEB03FE6D9039FFC03FFC010091B512F0023F5D +020F1580020102FCC7FCDA000F13C03E437BC148>II<92380FFFC04AB512FC020FECFF8002 +3F15E091B712F80103D9FE037F499039F0007FFF011F01C0011F7F49496D7F4990C76C7F +49486E7F48498048844A804884485B727E5A5C48717EA35A5C721380A2B5FCA391B9FCA4 +1A0002C0CBFCA67EA380A27EA27E6E160FF11F806C183F6C7FF17F006C7F6C6D16FE6C17 +016D6C4B5A6D6D4A5A6D01E04A5A6D6DEC3FE0010301FC49B45A6D9026FFC01F90C7FC6D +6C90B55A021F15F8020715E0020092C8FC030713F041437CC14A>III<903807FF80B6FCA6C6FC7F7FB3A8EF1FFF94B512F0040714FC041F14FF4C8193267F +E07F7F922781FE001F7FDB83F86D7FDB87F07FDB8FC0814C7F039FC78015BE03BC8003FC +825DA25DA25DA45DB3B2B7D8F007B71280A651647BE35A>II<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>I114 +D<913A3FFF8007800107B5EAF81F011FECFE7F017F91B5FC48B8FC48EBE0014890C7121F +D80FFC1407D81FF0801600485A007F167F49153FA212FF171FA27F7F7F6D92C7FC13FF14 +E014FF6C14F8EDFFC06C15FC16FF6C16C06C16F06C826C826C826C82013F1680010F16C0 +1303D9007F15E0020315F0EC001F1500041F13F81607007C150100FC81177F6C163FA217 +1F7EA26D16F0A27F173F6D16E06D157F6D16C001FEEDFF806D0203130002C0EB0FFE02FC +EB7FFC01DFB65A010F5DD8FE0315C026F8007F49C7FC48010F13E035437BC140>II<902607FFC0ED3F +FEB60207B5FCA6C6EE00076D826D82B3B3A260A360A2607F60183E6D6D147E4E7F6D6D49 +48806D6DD907F0ECFF806D01FFEB3FE06D91B55A6E1500021F5C020314F8DA003F018002 +F0C7FC51427BC05A>III<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 D37 D<141E147F14FF5BEB03FEEB07FCEB0FF0EB1FE0EB3FC0 +EB7F80EBFF00485A5B12035B485A120F5BA2485AA2123F5BA2127F90C7FCA412FEAD127F +A47F123FA27F121FA26C7EA27F12076C7E7F12017F6C7EEB7F80EB3FC0EB1FE0EB0FF0EB +07FCEB03FEEB01FF7F147F141E184771BE30>40 D<127812FE7E7F6C7E6C7EEA0FF06C7E +6C7E6C7E6C7EEB7F80133F14C0131FEB0FE014F01307A2EB03F8A214FC1301A214FE1300 +A4147FAD14FEA4130114FCA2130314F8A2EB07F0A2130F14E0EB1FC0133F1480137FEBFF +00485A485A485A485AEA3FE0485A485A90C7FC5A1278184778BE30>I<14E0497E497EA6 +0038EC0380007EEC0FC0D8FF83EB3FE001C3137F9038F3F9FF267FFBFB13C06CB6128000 +0FECFE00000314F86C5C6C6C13C0011F90C7FC017F13C048B512F04880000F14FE003FEC +FF80267FFBFB13C026FFF3F913E09038C3F87F0183133FD87E03EB0FC00038EC03800000 +91C7FCA66D5A6D5A23277AAE30>I<143EA2147FAF007FB7FCA2B81280A36C1600A2C76C +C8FCAF143EA229297DAF30>II<007FB612F0A2B712F8A36C15F0A225077B9E30>I<120FEA3FC0EA7FE0A2EAFFF0A4EA +7FE0A2EA3FC0EA0F000C0C6E8B30>I<16F01501ED03F8A21507A2ED0FF0A2ED1FE0A2ED +3FC0A2ED7F80A2EDFF00A24A5AA25D1403A24A5AA24A5AA24A5AA24A5AA24A5AA24AC7FC +A2495AA25C1303A2495AA2495AA2495AA2495AA2495AA249C8FCA2485AA25B1203A2485A +A2485AA2485AA2485AA2485AA248C9FCA25AA2127CA225477BBE30>I<14FE903807FFC0 +497F013F13F8497F90B57E48EB83FF4848C6138049137F4848EB3FC04848EB1FE049130F +001F15F0491307A24848EB03F8A290C712014815FCA400FEEC00FEAD6C14016C15FCA36D +1303003F15F8A26D1307001F15F0A26D130F6C6CEB1FE0A26C6CEB3FC06C6CEB7F806D13 +FF2601FF8313006CEBFFFE6D5B6D5B010F13E06D5BD900FEC7FC273A7CB830>IIIII<000FB612804815C05AA316800180C8FCAEEB +83FF019F13C090B512F015FC8181D9FE0313809039F0007FC049133F0180EB1FE06CC712 +0F000E15F0C81207A216F81503A31218127EA2B4FC150716F048140F6C15E06C141F6DEB +3FC06D137F3A3FE001FF80261FFC0F13006CB55A6C5C6C5C6C14E06C6C1380D90FFCC7FC +25397BB730>II<127CB712FC16FEA416FC48C7EA0FF816F0ED1FE0007CEC3FC0 +C8EA7F80EDFF00A24A5A4A5A5D14075D140F5D4A5AA24A5AA24AC7FCA25C5C13015CA213 +035CA213075CA4495AA6131F5CA96D5A6DC8FC273A7CB830>I<49B4FC011F13F0017F13 +FC90B57E0003ECFF804815C048010113E03A1FF8003FF049131FD83FC0EB07F8A24848EB +03FC90C71201A56D1303003F15F86D13076C6CEB0FF06C6CEB1FE0D807FCEB7FC03A03FF +83FF806C90B512006C6C13FC011F13F0497F90B512FE48802607FE0013C0D80FF8EB3FE0 +D81FE0EB0FF04848EB07F8491303007F15FC90C712014815FE481400A66C14016C15FC6D +1303003F15F86D1307D81FF0EB1FF06D133F3A0FFF01FFE06C90B512C06C1580C6ECFE00 +6D5B011F13F0010190C7FC273A7CB830>I<49B4FC010F13E0013F13F890B57E48804880 +48010113803A0FFC007FC0D81FF0EB3FE04848131F49EB0FF048481307A290C7EA03F85A +4815FC1501A416FEA37E7E6D1303A26C6C13076C6C130F6D133FD80FFC13FF6CB6FC7E6C +14FE6C14F9013FEBE1FC010F138190380060011400ED03F8A2150716F0150F000F15E048 +6C131F486CEB3FC0157FEDFF804A1300EC07FE391FF01FFC90B55A6C5C6C5C6C1480C649 +C7FCEB3FF0273A7CB830>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F00C7 +FCAF120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F000C276EA630>II<16F01503ED07F8151F157FEDFFF014034A13C0021F138091383F +FE00ECFFF8495B010713C0495BD93FFEC7FC495A3801FFF0485B000F13804890C8FCEA7F +FC5BEAFFE05B7FEA7FF87FEA1FFF6C7F000313E06C7F38007FFC6D7E90380FFF806D7F01 +0113F06D7FEC3FFE91381FFF80020713C06E13F01400ED7FF8151F1507ED03F01500252F +7BB230>I<1278127EB4FC13C07FEA7FF813FEEA1FFF6C13C000037F6C13F86C6C7EEB1F +FF6D7F010313E06D7F9038007FFC6E7E91380FFF806E13C0020113F080ED3FF8151F153F +EDFFF05C020713C04A138091383FFE004A5A903801FFF0495B010F13804990C7FCEB7FFC +48485A4813E0000F5B4890C8FCEA7FFE13F8EAFFE05B90C9FC127E1278252F7BB230>62 +D64 +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>I75 +D<383FFFF8487FB57EA26C5B6C5BD801FCC9FCB3B0EE0F80EE1FC0A9003FB7FC5AB8FCA2 +7E6C16802A387EB730>III<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>III<3A3FFF01FFF84801837F02C77FA202835B6C01015B3A01FC007F806D91C7FC00 +005C6D5BEB7F01EC81FCEB3F8314C3011F5B14E7010F5B14FF6D5BA26D5BA26D5BA26D90 +C8FCA4497FA2497FA2815B81EB0FE781EB1FC381EB3F8181EB7F0081497F49800001143F +49800003141F49800007140FD87FFEEB7FFFB590B5128080A25C6C486D130029387DB730 +>II<007FB612F0A2B712F8A36C15F0A225077B7D30>95 D97 DII<913801FFE04A +7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A481303380FFC00D81FF013 +3F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F003F141F6D133F6C7E6D +137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C713E0011F010313C0D9 +07FCC8FC2C397DB730>I<49B4FC010713E0011F13F8017F7F90B57E488048018113803A +07FC007FC04848133FD81FE0EB1FE0150F484814F0491307127F90C7FCED03F85A5AB7FC +A516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D1307D807FEEB1FF03A03FFC0 +7FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0252A7CA830>IIII<14E0EB03F8A2497EA36D5AA2EB00E091C8FCA9381FFFF8487F5AA27E7EEA0001B3A9 +003FB612C04815E0B7FCA27E6C15C023397AB830>I107 +D<387FFFF8B57EA47EEA0001B3B3A8007FB612F0B712F8A46C15F025387BB730>I<02FC +137E3B7FC3FF01FF80D8FFEF01877F90B500CF7F15DF92B57E6C010F13872607FE07EB03 +F801FC13FE9039F803FC01A201F013F8A301E013F0B3A23C7FFE0FFF07FF80B548018F13 +C0A46C486C01071380322881A730>II<49B4FC010F +13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC04848EB3FE0D81FE0EB0FF0A2 +4848EB07F8491303007F15FC90C71201A300FEEC00FEA86C14016C15FCA26D1303003F15 +F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01FFC06C90B512806C15006C6C +13FC6D5B010F13E0010190C7FC272A7CA830>II<49B413F8010FEBC1FC013F13F14913FD48B6FC5A481381390FFC00 +7F49131F4848130F491307485A491303127F90C7FC15015A5AA77E7E15037FA26C6C1307 +150F6C6C131F6C6C133F01FC137F3907FF01FF6C90B5FC6C14FD6C14F9013F13F1010F13 +C1903803FE0190C7FCAD92B512F84A14FCA46E14F82E3C7DA730>II<9038 +1FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC4880A46C143E007F91C7FC +13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F9038000FFF02001380007C +147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC03FF0090B6FC5D5D00FC14 +F0D8F83F13C026780FFEC7FC222A79A830>III<3B3FFFC07FFF80 +486DB512C0B515E0A26C16C06C496C13803B01F80003F000A26D130700005DA26D130F01 +7E5CA2017F131F6D5CA2EC803F011F91C7FCA26E5A010F137EA2ECE0FE01075BA214F101 +035BA3903801FBF0A314FF6D5BA36E5A6E5A2B277EA630>I<3B3FFFC01FFFE0486D4813 +F0B515F8A26C16F06C496C13E0D807E0C7EA3F00A26D5C0003157EA56D14FE00015DEC0F +80EC1FC0EC3FE0A33A00FC7FF1F8A2147DA2ECFDF9017C5C14F8A3017E13FBA290393FF0 +7FE0A3ECE03FA2011F5C90390F800F802D277FA630>I<3A3FFF81FFFC4801C37FB580A2 +6C5D6C01815BC648C66CC7FC137FEC80FE90383F81FC90381FC3F8EB0FE3ECE7F06DB45A +6D5B7F6D5B92C8FC147E147F5C497F81903803F7E0EB07E790380FE3F0ECC1F890381F81 +FC90383F80FE90387F007E017E137F01FE6D7E48486D7E267FFF80B5FCB500C1148014E3 +A214C16C0180140029277DA630>I<3B3FFFC07FFF80486DB512C0B515E0A26C16C06C49 +6C13803B01FC0003F000A2000014076D5C137E150F017F5C7F151FD91F805BA214C0010F +49C7FCA214E00107137EA2EB03F0157C15FCEB01F85DA2EB00F9ECFDF0147D147FA26E5A +A36E5AA35DA2143F92C8FCA25C147EA2000F13FE486C5AEA3FC1EBC3F81387EB8FF0EBFF +E06C5B5C6C90C9FC6C5AEA01F02B3C7EA630>I<001FB612FC4815FE5AA316FC90C7EA0F +F8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A5A4A5A4A5A4A5A4990C7 +FC495A495A495A495A495A495A4948133E4890C7127F485A485A485A485A485A48B7FCB8 +FCA46C15FE28277DA630>II125 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>I46 +D<913803FFC0023F13FC91B6FC010315C0010F018113F0903A1FFC003FF849486D7E4948 +6D7E49486D7E48496D138048496D13C0A24817E04890C813F0A34817F8A24817FC49157F +A3007F17FEA600FF17FFB3A5007F17FEA6003F17FCA26D15FFA26C17F8A36C17F0A26C6D +4913E0A26C6D4913C06C17806E5B6C6D4913006D6C495AD91FFCEB3FF8903A0FFF81FFF0 +6D90B55A01011580D9003F01FCC7FC020313C0384F7BCD43>48 D<157815FC1403140714 +1F14FF130F0007B5FCB6FCA2147F13F0EAF800C7FCB3B3B3A6007FB712FEA52F4E76CD43 +>II<91380FFFC091B512FC0107ECFF80011F15E090 +263FF8077F9026FF800113FC4848C76C7ED803F86E7E491680D807FC8048B416C080486D +15E0A4805CA36C17C06C5B6C90C75AD801FC1680C9FC4C13005FA24C5A4B5B4B5B4B13C0 +4B5BDBFFFEC7FC91B512F816E016FCEEFF80DA000713E0030113F89238007FFE707E7013 +807013C018E07013F0A218F8A27013FCA218FEA2EA03E0EA0FF8487E487E487EB57EA318 +FCA25E18F891C7FC6C17F0495C6C4816E001F04A13C06C484A1380D80FF84A13006CB44A +5A6CD9F0075BC690B612F06D5D011F1580010302FCC7FCD9001F1380374F7ACD43>I<17 +7C17FEA2160116031607160FA2161F163F167FA216FF5D5DA25D5DED1FBFED3F3F153E15 +7C15FCEC01F815F0EC03E01407EC0FC01580EC1F005C147E147C5C1301495A495A5C495A +131F49C7FC133E5B13FC485A5B485A1207485A485A90C8FC123E127E5ABA12C0A5C96C48 +C7FCAF020FB712C0A53A4F7CCE43>III<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 DI<932601FFFCEC01C0047FD9FFC013030307B600F81307033F03FE131F +92B8EA803F0203DAE003EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5FC +494848C9FC4901F8824949824949824949824949824990CA7E494883A2484983485B1B7F +485B481A3FA24849181FA3485B1B0FA25AA298C7FC5CA2B5FCAE7EA280A2F307C07EA36C +7FA21B0F6C6D1980A26C1A1F6C7F1C006C6D606C6D187EA26D6C606D6D4C5A6D6D16036D +6D4C5A6D6D4C5A6D01FC4C5A6D6DEE7F806D6C6C6C4BC7FC6E01E0EC07FE020F01FEEC1F +F80203903AFFE001FFF0020091B612C0033F93C8FC030715FCDB007F14E0040101FCC9FC +525479D261>I +III73 D76 +D<93380FFFC00303B6FC031F15E092B712FC0203D9FC0013FF020F01C0010F13C0023F90 +C7000313F0DA7FFC02007F494848ED7FFE4901E0ED1FFF49496F7F49496F7F4990C96C7F +49854948707F4948707FA24849717E48864A83481B804A83481BC0A2481BE04A83A2481B +F0A348497113F8A5B51AFCAF6C1BF86E5FA46C1BF0A26E5F6C1BE0A36C6D4D13C0A26C6D +4D1380A26C1B006C6D4D5A6E5E6C626D6C4C5B6D6D4B5B6D6D4B5B6D6D4B5B6D6D4B5B6D +6D4B90C7FC6D6D4B5A6D01FF02035B023F01E0011F13F0020F01FC90B512C0020390B7C8 +FC020016FC031F15E0030392C9FCDB001F13E0565479D265>79 DI82 D<91260FFF80130791B500F85B010702FF5B011FEDC0 +3F49EDF07F9026FFFC006D5A4801E0EB0FFD4801800101B5FC4848C87E48488149150F00 +1F824981123F4981007F82A28412FF84A27FA26D82A27F7F6D93C7FC14C06C13F014FF15 +F86CECFF8016FC6CEDFFC017F06C16FC6C16FF6C17C06C836C836D826D82010F82130301 +0082021F16801400030F15C0ED007F040714E01600173F050F13F08383A200788200F882 +A3187FA27EA219E07EA26CEFFFC0A27F6D4B13806D17006D5D01FC4B5A01FF4B5A02C04A +5A02F8EC7FF0903B1FFFC003FFE0486C90B65AD8FC0393C7FC48C66C14FC48010F14F048 +D9007F90C8FC3C5479D24B>I<003FBC1280A59126C0003F9038C0007F49C71607D87FF8 +060113C001E08449197F49193F90C8171FA2007E1A0FA3007C1A07A500FC1BE0481A03A6 +C994C7FCB3B3AC91B912F0A553517BD05E>II97 DI<913801FFF8021FEB +FF8091B612F0010315FC010F9038C00FFE903A1FFE0001FFD97FFC491380D9FFF05B4817 +C048495B5C5A485BA2486F138091C7FC486F1300705A4892C8FC5BA312FFAD127F7FA27E +A2EF03E06C7F17076C6D15C07E6E140F6CEE1F806C6DEC3F006C6D147ED97FFE5C6D6CEB +03F8010F9038E01FF0010390B55A01001580023F49C7FC020113E033387CB63C>I<4DB4 +7E0407B5FCA5EE001F1707B3A4913801FFE0021F13FC91B6FC010315C7010F9038E03FE7 +4990380007F7D97FFC0101B5FC49487F4849143F484980485B83485B5A91C8FC5AA3485A +A412FFAC127FA36C7EA37EA26C7F5F6C6D5C7E6C6D5C6C6D49B5FC6D6C4914E0D93FFED9 +0FEFEBFF80903A0FFFC07FCF6D90B5128F0101ECFE0FD9003F13F8020301C049C7FC4154 +7CD24B>I<913803FFC0023F13FC49B6FC010715C04901817F903A3FFC007FF849486D7E +49486D7E4849130F48496D7E48178048497F18C0488191C7FC4817E0A248815B18F0A212 +FFA490B8FCA318E049CAFCA6127FA27F7EA218E06CEE01F06E14037E6C6DEC07E0A26C6D +EC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFEEB03FE903A0FFFC03FF8010390B55A01 +0015C0021F49C7FC020113F034387CB63D>IIII<137F497E000313E0487FA2487FA76C5BA2 +6C5BC613806DC7FC90C8FCADEB3FF0B5FCA512017EB3B3A6B612E0A51B547BD325>I108 DII<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>IIII<007FB500 +F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07F86D6D5C6D6D495A6D4B5A6F495A6D6D +91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C485A6EEB8FE06EEBCFC06EEBFF806E91C9 +FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5FCDA01FD7F03F87F4A486C7E4A486C7E +020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A6D7F495A49486D7F01076F7E49486E7E +49486E7FEBFFF0B500FE49B612C0A542357EB447>II +E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fl cmr10 10.95 83 +/Fl 83 124 df<4AB4EB0FE0021F9038E03FFC913A7F00F8FC1ED901FC90383FF03FD907 +F090397FE07F80494801FF13FF4948485BD93F805C137F0200ED7F00EF003E01FE6D91C7 +FC82ADB97EA3C648C76CC8FCB3AE486C4A7E007FD9FC3FEBFF80A339407FBF35>11 +DII<001E130F397F803FC000FF137F01C013E0A201E013F0A3007F13 +3F391E600F3000001300A401E01370491360A3000114E04913C000031301010013804813 +03000EEB070048130E0018130C0038131C003013181C1C7DBE2D>34 +D<14E0A4EB07FC90383FFF8090B512E03901F8E3F03903E0E0FCD807C0133CD80F807FD8 +1F007F003E80003C1580007C140316C00078141F00F8143F157FA47EED3F806CEC0E0092 +C7FC127F138013C0EA3FF013FEEA1FFF6C13FC6C13FF6C14C06C806C6C13F8011F7F1303 +01007FECE7FF14E102E01380157F153FED1FC0A2003E140F127FD8FF801307A5130000FC +158000F0140F1270007815005D6C141E153E6C5C6C5C3907C0E1F03903F8EFE0C6B51280 +D93FFEC7FCEB0FF8EB00E0A422497BC32D>36 D<013F1603D9FFC04B7E2601E0E0150F26 +07C070151F48486C4BC7FC023E157E48486C15FE48D90FC0EB03FC003ED90EF0EB0FF8DA +0F3F13FD007E903A070FFFF1F0007C0200EB03E0160000FC6D6C495A170F604DC8FC5F17 +3E5F17FC5F4C5A1603007CD907005B4C5A007E150F003E495C020E49C9FC003F5D6C4913 +3E260F803C5B023813FC6C6C485B3A01E0E001F03800FFC090273F0003E0133F90C70007 +ECFFC09339C001E0E0923A0F8007C070031F49487E0400143C033E90381F001C037E497F +037C133E4B150F0201027E7F4B137C4A5A020702FCEB03805D4A5A141F92C7FC143E147E +147C5CA2495A0103037CEB07005C4948147E010F033E5B4A160E49C8123F496F5B013E92 +380F803C49173801FC6F6C5A49923801E0E0496FB45A0160043FC7FC41497BC34C>II<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A3 +12011380120313005A120E5A1218123812300B1C79BE19>I<1430147014E0EB01C0EB03 +801307EB0F00131E133E133C5B13F85B12015B1203A2485AA2120F5BA2121F90C7FCA25A +A3123E127EA6127C12FCB2127C127EA6123E123FA37EA27F120FA27F1207A26C7EA21201 +7F12007F13787F133E131E7FEB07801303EB01C0EB00E014701430145A77C323>I<12C0 +7E12707E7E121E7E6C7E7F12036C7E7F12007F1378137CA27FA2133F7FA21480130FA214 +C0A3130714E0A6130314F0B214E01307A614C0130FA31480A2131F1400A25B133EA25BA2 +137813F85B12015B485A12075B48C7FC121E121C5A5A5A5A145A7BC323>II<121EEA7F80 +12FF13C0A213E0A3127FEA1E601200A413E013C0A312011380120313005A120E5A121812 +3812300B1C798919>44 DI<121EEA7F80A2EAFFC0A4EA7F80A2 +EA1E000A0A798919>IIIIII<150E151E153EA2157EA215FE +1401A21403EC077E1406140E141CA214381470A214E0EB01C0A2EB0380EB0700A2130E5B +A25B5BA25B5B1201485A90C7FC5A120E120C121C5AA25A5AB8FCA3C8EAFE00AC4A7E49B6 +FCA3283E7EBD2D>I<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FCEB +3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C71380 +0006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015C0 +12780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F90 +C7FCEB07F8243F7CBC2D>II<1238 +123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D48141E15 +1C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A213015C13 +03A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3121EEA7F80A2EAFFC0A4EA +7F80A2EA1E000A2779A619>I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3121E12 +7FEAFF80A213C0A4127F121E1200A412011380A3120313005A1206120E120C121C5A1230 +A20A3979A619>I63 D<15074B7EA34B7EA34B7EA34B7EA34B7E15E7A2913801C7FC +15C3A291380381FEA34AC67EA3020E6D7EA34A6D7EA34A6D7EA34A6D7EA34A6D7EA34948 +6D7E91B6FCA249819138800001A249C87EA24982010E157FA2011E82011C153FA2013C82 +0138151FA2017882170F13FC00034C7ED80FFF4B7EB500F0010FB512F8A33D417DC044> +65 DIIIII +III<011FB512FCA3D9000713006E5A1401B3B3A6123F +EA7F80EAFFC0A44A5A1380D87F005B007C130700385C003C495A6C495A6C495A2603E07E +C7FC3800FFF8EB3FC026407CBD2F>IIIIIII82 DI<003FB91280A3903AF0007FE001018090393FC0003F48C7ED1FC0007E17 +07127C00781703A300701701A548EF00E0A5C81600B3B14B7E4B7E0107B612FEA33B3D7D +BC42>IIII89 +D<003FB712F8A391C7EA1FF013F801E0EC3FE00180EC7FC090C8FC003EEDFF80A2003C4A +1300007C4A5A12784B5A4B5AA200704A5AA24B5A4B5AA2C8485A4A90C7FCA24A5A4A5AA2 +4A5AA24A5A4A5AA24A5A4A5AA24990C8FCA2495A4948141CA2495A495AA2495A495A173C +495AA24890C8FC485A1778485A484815F8A24848140116034848140F4848143FED01FFB8 +FCA32E3E7BBD38>II<486C13C000 +03130101001380481303000EEB070048130E0018130C0038131C00301318007013380060 +1330A300E01370481360A400CFEB678039FFC07FE001E013F0A3007F133FA2003F131F01 +C013E0390F0007801C1C73BE2D>I +I96 D +II<49B4FC010F13E090383F00F8017C131E4848131F +4848137F0007ECFF80485A5B121FA24848EB7F00151C007F91C7FCA290C9FC5AAB6C7EA3 +003FEC01C07F001F140316806C6C13076C6C14000003140E6C6C131E6C6C137890383F01 +F090380FFFC0D901FEC7FC222A7DA828>II +II<167C903903F801 +FF903A1FFF078F8090397E0FDE1F9038F803F83803F001A23B07E000FC0600000F6EC7FC +49137E001F147FA8000F147E6D13FE00075C6C6C485AA23901F803E03903FE0FC026071F +FFC8FCEB03F80006CAFC120EA3120FA27F7F6CB512E015FE6C6E7E6C15E06C810003813A +0FC0001FFC48C7EA01FE003E140048157E825A82A46C5D007C153E007E157E6C5D6C6C49 +5A6C6C495AD803F0EB0FC0D800FE017FC7FC90383FFFFC010313C0293D7EA82D>III<1478EB01FEA2EB03FFA4EB01FEA2EB00781400AC147FEB7FFFA313 +017F147FB3B3A5123E127F38FF807E14FEA214FCEB81F8EA7F01387C03F0381E07C0380F +FF803801FC00185185BD1C>II +I<2701F801FE14FF00FF902707FFC00313E0913B1E07E00F03F0913B7803F03C01F80007 +903BE001F87000FC2603F9C06D487F000101805C01FBD900FF147F91C75B13FF4992C7FC +A2495CB3A6486C496CECFF80B5D8F87FD9FC3F13FEA347287DA74C>I<3901F801FE00FF +903807FFC091381E07E091387803F000079038E001F82603F9C07F0001138001FB6D7E91 +C7FC13FF5BA25BB3A6486C497EB5D8F87F13FCA32E287DA733>I<14FF010713E090381F +81F890387E007E01F8131F4848EB0F804848EB07C04848EB03E0000F15F04848EB01F8A2 +003F15FCA248C812FEA44815FFA96C15FEA36C6CEB01FCA3001F15F86C6CEB03F0A26C6C +EB07E06C6CEB0FC06C6CEB1F80D8007EEB7E0090383F81FC90380FFFF0010090C7FC282A +7EA82D>I<3901FC03FC00FF90381FFF8091387C0FE09039FDE003F03A07FFC001FC6C49 +6C7E6C90C7127F49EC3F805BEE1FC017E0A2EE0FF0A3EE07F8AAEE0FF0A4EE1FE0A2EE3F +C06D1580EE7F007F6E13FE9138C001F89039FDE007F09039FC780FC0DA3FFFC7FCEC07F8 +91C9FCAD487EB512F8A32D3A7EA733>I<02FF131C0107EBC03C90381F80F090397F0038 +7C01FC131CD803F8130E4848EB0FFC150748481303121F485A1501485AA448C7FCAA6C7E +A36C7EA2001F14036C7E15076C6C130F6C7E6C6C133DD8007E137990383F81F190380FFF +C1903801FE0190C7FCAD4B7E92B512F8A32D3A7DA730>I<3901F807E000FFEB1FF8EC78 +7CECE1FE3807F9C100031381EA01FB1401EC00FC01FF1330491300A35BB3A5487EB512FE +A31F287EA724>I<90383FC0603901FFF8E03807C03F381F000F003E1307003C1303127C +0078130112F81400A27E7E7E6D1300EA7FF8EBFFC06C13F86C13FE6C7F6C1480000114C0 +D8003F13E0010313F0EB001FEC0FF800E01303A214017E1400A27E15F07E14016C14E06C +EB03C0903880078039F3E01F0038E0FFFC38C01FE01D2A7DA824>I<131CA6133CA4137C +A213FCA2120112031207001FB512C0B6FCA2D801FCC7FCB3A215E0A912009038FE01C0A2 +EB7F03013F138090381F8700EB07FEEB01F81B397EB723>IIIIII<001FB61280A2EBE0000180140049485A001E495A121C4A5A003C +495A141F00385C4A5A147F5D4AC7FCC6485AA2495A495A130F5C495A90393FC00380A2EB +7F80EBFF005A5B484813071207491400485A48485BA248485B4848137F00FF495A90B6FC +A221277EA628>II E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fm cmbx12 20.736 11 +/Fm 11 115 df<137F3801FFC0000713F0487F487F487F487FA2B61280A96C1400A26C5B +6C5B6C5B6C5B000113C06C6CC7FC1919729836>46 D48 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/barcode-0.98/doc/barcodedoc.txt b/barcode-0.98/doc/barcodedoc.txt new file mode 100644 index 00000000..2d242f99 --- /dev/null +++ b/barcode-0.98/doc/barcodedoc.txt @@ -0,0 +1,734 @@ + + +This is barcode.info, produced by makeinfo version 4.0b 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 "[ x ] [+ + + ]" (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 + " x [+ + [- + [- ]]]" (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 "," 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: Top154 + Node: Overview526 + Node: The Barcode Object1404 +Node: The Field List2821 +Node: The Intermediate Representation6586 +Node: Supported Flags8359 +Node: The API11343 +Node: The barcode Executable14029 +Node: The Command Line14458 +Node: Supported Encodings19557 +Node: PCL Output28997 +Node: Bugs and Pending Issues31316 + + + +End Tag Table \ No newline at end of file diff --git a/barcode-0.98/doc/doc.barcode b/barcode-0.98/doc/doc.barcode new file mode 100644 index 00000000..7b460558 --- /dev/null +++ b/barcode-0.98/doc/doc.barcode @@ -0,0 +1,939 @@ +\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 +%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{} @t{x} + @i{}] [@t{+} @i{} @t{+} @i{}]'' (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{} @t{x} @i{} [@t{+} @i{} + @t{+} @i{} [@t{-} @i{} [@t{-} + @i{}]]]'' (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{}@t{,}@i{}'' 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 (maintainer) +%M .PP +%M Leonid A. Broukhis (several encodings) +%M .PP +%M Andrea Scopece (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/barcode-0.98/doc/infofilter b/barcode-0.98/doc/infofilter new file mode 100755 index 00000000..92bc8b7d --- /dev/null +++ b/barcode-0.98/doc/infofilter @@ -0,0 +1,16 @@ +#! /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/barcode-0.98/doc/manpager b/barcode-0.98/doc/manpager new file mode 100755 index 00000000..46de5be2 --- /dev/null +++ b/barcode-0.98/doc/manpager @@ -0,0 +1,120 @@ +#! /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/barcode-0.98/doc/mktxt b/barcode-0.98/doc/mktxt new file mode 100755 index 00000000..bd3f88ba --- /dev/null +++ b/barcode-0.98/doc/mktxt @@ -0,0 +1,38 @@ +#! /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/barcode-0.98/doc/texi2html b/barcode-0.98/doc/texi2html new file mode 100755 index 00000000..2c61aa93 --- /dev/null +++ b/barcode-0.98/doc/texi2html @@ -0,0 +1,2021 @@ +#!/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 = "\n"; # tag to know where to split +$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections +$html2_doctype = ''; + +# +# 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 + "*", "
", # HTML+ + " ", " ", + "\n", "\n", + "|", "", + # spacing commands + ":", "", + "!", "!", + "?", "?", + ".", ".", + ); + +# +# texinfo "things" (@foo{}) to HTML ones +# +%things_map = ( + 'TeX', 'TeX', + 'br', '

', # 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 = <= 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 = '' 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("

\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("

\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("

", __LINE__); + } else { + $_ = &debug("
\n
", __LINE__); + } + if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') { + $_ .= "$type $name"; + $_ .= " @args" if @args; + } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr' + || $tag eq 'defcv' || $tag eq 'defop') { + $ftype = $name; + $name = shift(@args); + $name =~ s/^\{(.*)\}$/$1/; + $_ .= "$type $ftype $name"; + $_ .= " @args" if @args; + } else { + warn "$ERROR Unknown definition type: $tag\n"; + $_ .= "$type $name"; + $_ .= " @args" if @args; + } + $_ .= &debug("\n
", __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("\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, "
\n"); + &html_pop_if('DD'); + &html_pop_if(); + } elsif (defined($def_map{$end_tag})) { + push(@lines, &debug("
\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

$name

\n\n", __LINE__); + } else { + $_ = &debug("$name\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, "
    \n"); + } + while ($level < $curlevel) { + $curlevel--; + push(@toc_lines, "
\n"); + } + $_ = "
  • " . &anchor($tocid, "$docu_doc#$docid", $name, 1); + push(@toc_lines, &substitute_style($_)); + # update DOC + push(@lines, &html_debug("\n", __LINE__)); + &html_reset; + $_ = "".&anchor($docid, "$docu_toc#$tocid", $name)."\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(<\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("
    $things_map{$in_table}\n", __LINE__)); + } else { + push(@lines, &debug("
    \@$in_table\{$what\}\n", __LINE__)); + } + push(@lines, "
    "); + &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("
  • $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("

    \n", __LINE__); + &html_pop; + } + } elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE') { + push(@lines, "

    \n"); + &html_push('P'); + $_ = &debug($_, __LINE__); + } + # otherwise + push(@lines, $_); +} + +# finish TOC +$level = 0; +while ($level < $curlevel) { + $curlevel--; + push(@toc_lines, "\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("

      \n", __LINE__)), next if /^\@menu\b/; + $in_menu = 0, push(@lines2, &debug("
    \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, "\n") if defined($last_letter); + push(@lines2, "

    " . &protect_html($letter) . "

    \n"); + push(@lines2, "\n"); + $last_letter = $letter; + } + @refs = (); + foreach (split(/$;/, $ary{$key})) { + push(@refs, &anchor('', $_, $key, 0)); + } + push(@lines2, "
  • " . join(", ", @refs) . "\n"); + } + push(@lines2, "
  • \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 (/^/) { + $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

    + +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, "

    " . &anchor($footid, "$d#$docid", $foot) . "

    \n"); + $text = "

    $text" unless $text =~ /^\s*

    /; + push(@foot_lines, "$text\n"); + $_ = $before . &anchor($docid, "$docu_foot#$footid", $foot) . $after; + } + } + # + # remove unnecessary

    + # + if (/^\s*

    \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 + +$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 = "

    " . join("

    \n

    ", split(/\n/, $_)) . "

    \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 "

    Table of Contents

    \n"; + &print(*toc_lines, FILE); + } + &print_ruler; + &print(*doc_lines, FILE); + if ($monolithic && @foot_lines) { + &print_ruler; + print FILE "

    Footnotes

    \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("$what") + if $debug & $DEBUG_HTML; + return($what); +} + +# to debug the output... +sub debug { + local($what, $line) = @_; + return("$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, "
  • " . &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"; + } 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 = "

    \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 < + +$header +$_ + + +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 "

    $_

    \n"; + } + } + if ($value{'_author'}) { + $value{'_author'} =~ s/\n+$//; + foreach (split(/\n/, $value{'_author'})) { + $_ = &substitute_style($_); + &unprotect_texi; + s/[\w.-]+\@[\w.-]+/
    $&<\/A>/g; + print FILE "
    $_
    \n"; + } + } + print FILE "

    \n"; +} + +sub print_footer { + print FILE < + +EOT +} + +sub print_toplevel_footer { + &print_ruler; + print FILE <texi2html +translator version 1.51.

    +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/\/\&\#62;/g; + # but recognize some HTML things + $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # + $what =~ s/\&\#60;A ([^\&]+)\&\#62;//g; # + $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;//g; # + 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; + 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/barcode-0.98/ean.c b/barcode-0.98/ean.c new file mode 100644 index 00000000..0801a0ef --- /dev/null +++ b/barcode-0.98/ean.c @@ -0,0 +1,774 @@ +/* + * ean.c -- encoding for ean, upc and isbn + * + * Copyright (c) 1999 Alessandro Rubini + * Copyright (c) 1999 Prosa Srl. + * Copyright (c) 2001 Boszormenyi Zoltan + * + * 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 +#include +#include +#include +#include + +#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= '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; iascii) { + 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; ipartial = 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/barcode-0.98/i25.c b/barcode-0.98/i25.c new file mode 100644 index 00000000..72bd0358 --- /dev/null +++ b/barcode-0.98/i25.c @@ -0,0 +1,164 @@ +/* + * 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 +#include +#include +#include +#include + +#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; ierror = 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/barcode-0.98/install-sh b/barcode-0.98/install-sh new file mode 100644 index 00000000..ab74c882 --- /dev/null +++ b/barcode-0.98/install-sh @@ -0,0 +1,238 @@ +#!/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/barcode-0.98/library.c b/barcode-0.98/library.c new file mode 100644 index 00000000..a8787020 --- /dev/null +++ b/barcode-0.98/library.c @@ -0,0 +1,244 @@ +/* + * 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 +#include +#include +#include +#ifdef HAVE_UNISTD_H /* sometimes (windows, for instance) it's missing */ +# include +#endif +#include + +#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/barcode-0.98/main.c b/barcode-0.98/main.c new file mode 100644 index 00000000..e07e4d3c --- /dev/null +++ b/barcode-0.98/main.c @@ -0,0 +1,604 @@ +/* + * 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 +#include +#include +#include + +#include "cmdline.h" +#include "barcode.h" + +#ifndef NO_LIBPAPER +#include +#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: [x][++]"}, + {'t', CMDLINE_S, NULL, get_table, "BARCODE_TABLE", NULL, + "table geometry: x[++]"}, + {'m', CMDLINE_S, NULL, get_margin, "BARCODE_MARGIN", "10", + "internal margin for each item in a table: [,]"}, + {'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 ) + */ +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/barcode-0.98/missing b/barcode-0.98/missing new file mode 100755 index 00000000..d46f79f6 --- /dev/null +++ b/barcode-0.98/missing @@ -0,0 +1,198 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. +# Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. +# Franc,ois Pinard , 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 + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.in; then + configure_ac=configure.ac +else + configure_ac=configure.in +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_ac'. 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_ac'. 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_ac'. 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_ac` + 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_ac'. + 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/barcode-0.98/mkinstalldirs b/barcode-0.98/mkinstalldirs new file mode 100755 index 00000000..6b3b5fc5 --- /dev/null +++ b/barcode-0.98/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# 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/barcode-0.98/msi.c b/barcode-0.98/msi.c new file mode 100644 index 00000000..77a373b2 --- /dev/null +++ b/barcode-0.98/msi.c @@ -0,0 +1,155 @@ +/* + * 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 +#include +#include +#include +#include + +#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; ipartial = partial; + bc->textinfo = textinfo; + + return 0; +} diff --git a/barcode-0.98/pcl.c b/barcode-0.98/pcl.c new file mode 100644 index 00000000..d5ec097a --- /dev/null +++ b/barcode-0.98/pcl.c @@ -0,0 +1,200 @@ +/* + * 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 +#include +#include +#include +#include + +#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/barcode-0.98/plessey.c b/barcode-0.98/plessey.c new file mode 100644 index 00000000..ec471005 --- /dev/null +++ b/barcode-0.98/plessey.c @@ -0,0 +1,164 @@ +/* + * 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 +#include +#include +#include +#include + +#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; ierror = 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/barcode-0.98/ps.c b/barcode-0.98/ps.c new file mode 100644 index 00000000..35917517 --- /dev/null +++ b/barcode-0.98/ps.c @@ -0,0 +1,272 @@ +/* + * 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 +#include +#include +#include +#include + +#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 : "", 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; ipartial); 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 : ""); + + 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/barcode-0.98/sample.c b/barcode-0.98/sample.c new file mode 100644 index 00000000..46e62058 --- /dev/null +++ b/barcode-0.98/sample.c @@ -0,0 +1,98 @@ +#include +#include + +#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/configure.in b/configure.in new file mode 100644 index 00000000..f6a13409 --- /dev/null +++ b/configure.in @@ -0,0 +1,216 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.52) + +AC_INIT(glabels, 2.3.pre0svn, http://sourceforge.net/tracker/?func=add&group_id=46122&atid=445116) +AC_CONFIG_SRCDIR(src/glabels.c) + +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) + +AM_MAINTAINER_MODE +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) + +AC_CONFIG_HEADERS(config.h) + +IT_PROG_INTLTOOL([0.21]) + +PKG_PROG_PKG_CONFIG + +AC_PROG_LIBTOOL + +GNOME_DOC_INIT +GTK_DOC_CHECK(1.0) + +AC_ISC_POSIX +AC_PROG_CC +AC_PROG_INSTALL + +GNOME_COMPILE_WARNINGS + +AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) +AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource) + + +dnl --------------------------------------------------------------------------- +dnl - LIBGLABELS API versioning +dnl --------------------------------------------------------------------------- +dnl From the libtool manual: +dnl 1. Start with version information of `0:0:0' for each libtool library. +dnl 2. Update the version information only immediately before a public release. +dnl More frequent updates are unnecessary, and only guarantee that the current +dnl interface number gets larger faster. +dnl 3. If the library source code has changed at all since the last update, then increment +dnl revision (`c:r:a' becomes `c:r+1:a'). +dnl 4. If any interfaces have been added, removed, or changed since the last update, +dnl increment current, and set revision to 0. +dnl 5. If any interfaces have been added since the last public release, then increment age. +dnl 6. If any interfaces have been removed since the last public release, then set age +dnl to 0. +LIBGLABELS_C=5 +LIBGLABELS_R=1 +LIBGLABELS_A=0 + +LIBGLABELS_VERSION_INFO=${LIBGLABELS_C}:${LIBGLABELS_R}:${LIBGLABELS_A} +AC_SUBST(LIBGLABELS_VERSION_INFO) + + +dnl --------------------------------------------------------------------------- +dnl - Library dependencies +dnl --------------------------------------------------------------------------- +GLIB_REQUIRED=2.20.0 +GTK_REQUIRED=2.16.0 +LIBXML_REQUIRED=2.7.0 +LIBEBOOK_REQUIRED=2.26.0 + +dnl Make above strings available for packaging files (e.g. rpm spec files) +AC_SUBST(GLIB_REQUIRED) +AC_SUBST(GTK_REQUIRED) +AC_SUBST(LIBXML_REQUIRED) +AC_SUBST(LIBEBOOK_REQUIRED) + + +dnl --------------------------------------------------------------------------- +dnl - Check for evolution data server +dnl --------------------------------------------------------------------------- +AC_ARG_WITH(libebook, + [AC_HELP_STRING([--without-libebook], + [build without Evolution Data Server support])]) +have_libebook=no +if test "x$with_libebook" != xno; then + PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2 >= $LIBEBOOK_REQUIRED, + [have_libebook=yes], [have_libebook=no]) +fi + +if test "x$have_libebook" = "xyes"; then + AC_DEFINE(HAVE_LIBEBOOK,1,[Define to 1 for EDS support]) + OPTIONAL_MODULES="$OPTIONAL_MODULES libebook-1.2 >= $LIBEBOOK_REQUIRED" +fi + + +dnl --------------------------------------------------------------------------- +dnl - GLABELS prerequisites +dnl --------------------------------------------------------------------------- +PKG_CHECK_MODULES(GLABELS, \ +glib-2.0 >= $GLIB_REQUIRED \ +gtk+-2.0 >= $GTK_REQUIRED \ +libxml-2.0 >= $LIBXML_REQUIRED \ +$OPTIONAL_MODULES \ +) + +AC_SUBST(GLABELS_CFLAGS) +AC_SUBST(GLABELS_LIBS) + + +dnl --------------------------------------------------------------------------- +dnl - LIBGLABELS more modest prerequisites +dnl --------------------------------------------------------------------------- +PKG_CHECK_MODULES(LIBGLABELS, \ +glib-2.0 >= $GLIB_REQUIRED \ +libxml-2.0 >= $LIBXML_REQUIRED \ +) + +AC_SUBST(LIBGLABELS_CFLAGS) +AC_SUBST(LIBGLABELS_LIBS) + + +dnl --------------------------------------------------------------------------- +dnl - Enable deprecation testing +dnl --------------------------------------------------------------------------- +AC_ARG_ENABLE(deprecations, + [AC_HELP_STRING([--enable-deprecations], + [warn about deprecated usages [default=no]])],, + [enable_deprecations=no]) + +if test "x$enable_deprecations" = "xyes"; then + DISABLE_DEPRECATED_CFLAGS="\ +-DG_DISABLE_DEPRECATED \ +-DGDK_DISABLE_DEPRECATED \ +-DGTK_DISABLE_DEPRECATED \ +-DGDK_PIXBUF_DISABLE_DEPRECATED \ +" + AC_SUBST(DISABLE_DEPRECATED_CFLAGS) +fi + + +dnl --------------------------------------------------------------------------- +dnl - Is freedesktop mime dbase available? +dnl --------------------------------------------------------------------------- +AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no) +AM_CONDITIONAL(HAVE_NEW_MIME, test x$UPDATE_MIME_DATABASE != xno) + +AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no) +AM_CONDITIONAL(HAVE_NEWER_MIME, test x$UPDATE_DESKTOP_DATABASE != xno) + +AC_ARG_ENABLE(update-mimedb, AC_HELP_STRING([--disable-update-mimedb], + [disable the update-mime-database after install [default=no]]),, + enable_update_mimedb=yes) +AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes) + +AC_ARG_ENABLE(update-desktopdb, AC_HELP_STRING([--disable-update-desktopdb], + [disable the update-desktop-database after install [default=no]]),, + enable_update_desktopdb=yes) +AM_CONDITIONAL(ENABLE_UPDATE_DESKTOPDB, test x$enable_update_desktopdb = xyes) + + +dnl --------------------------------------------------------------------------- +dnl - Supported languages +dnl --------------------------------------------------------------------------- +GETTEXT_PACKAGE=glabels +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package]) + +AM_GLIB_GNU_GETTEXT + + +dnl --------------------------------------------------------------------------- +dnl - Misc. +dnl --------------------------------------------------------------------------- + +dnl Setup for libqrencode compilation +AC_DEFINE(__STATIC, static, [Static attribute, needed to compile libqrencode]) + + +dnl --------------------------------------------------------------------------- +dnl - Makefiles, etc. +dnl --------------------------------------------------------------------------- +AC_OUTPUT([ +Makefile +barcode-0.98/Makefile +iec16022-0.2.1/Makefile +qrencode-3.1.0/Makefile +libglabels/Makefile +libglabels/libglabels.pc +src/Makefile +src/pixmaps/Makefile +src/stock-pixmaps/Makefile +data/Makefile +data/pixmaps/Makefile +data/mime/Makefile +data/builder/Makefile +data/desktop/Makefile +data/man/Makefile +templates/Makefile +po/Makefile.in +help/Makefile +docs/Makefile +docs/libglabels/Makefile +glabels.spec +]) + + +dnl --------------------------------------------------------------------------- +dnl - Print configuration information +dnl --------------------------------------------------------------------------- +echo " +Configuration: + + Package: ${PACKAGE}-${VERSION}: + Installation prefix ${prefix} + Source code location: ${srcdir} + Compiler: ${CC} + Evolution Data Server support: ${have_libebook} + +" + +cat ${srcdir}/MESSAGE-OF-DOOM + diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 00000000..c285ea28 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,5 @@ +## Process this file with automake to produce Makefile.in + +SUBDIRS = desktop builder man mime pixmaps + + diff --git a/data/builder/Makefile.am b/data/builder/Makefile.am new file mode 100644 index 00000000..9279a65b --- /dev/null +++ b/data/builder/Makefile.am @@ -0,0 +1,14 @@ +## Process this file with automake to produce Makefile.in + +builderdir = $(datadir)/glabels/builder/ + +builder_DATA = \ + property-bar.builder \ + print-op-dialog-custom-widget.builder \ + wdgt-media-select.builder \ + merge-properties-dialog.builder \ + template-designer.builder \ + prefs-dialog.builder \ + object-editor.builder + +EXTRA_DIST = $(builder_DATA) diff --git a/data/builder/merge-properties-dialog.builder b/data/builder/merge-properties-dialog.builder new file mode 100644 index 00000000..18ae33dd --- /dev/null +++ b/data/builder/merge-properties-dialog.builder @@ -0,0 +1,191 @@ + + + + + + + + True + vertical + 6 + + + True + 0 + none + + + True + 12 + + + True + 12 + 2 + 2 + 6 + 6 + + + True + 0 + Format: + + + GTK_FILL + + + + + + True + False + + + 1 + 2 + GTK_FILL + + + + + True + vertical + + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 0 + Location: + + + 1 + 2 + GTK_FILL + + + + + + + + + + True + <b>Source</b> + True + + + + + False + 0 + + + + + True + 0 + none + + + True + 12 + + + True + vertical + 6 + + + 500 + 350 + True + False + 6 + automatic + automatic + in + + + True + + + + + 0 + + + + + True + 6 + 12 + + + Select all + True + False + False + True + False + + + False + False + 0 + + + + + Unselect all + True + False + False + True + False + + + False + False + 1 + + + + + False + 1 + + + + + + + + + True + <b>Record selection/preview</b> + True + + + + + 1 + + + + + + diff --git a/data/builder/object-editor.builder b/data/builder/object-editor.builder new file mode 100644 index 00000000..5cfb9002 --- /dev/null +++ b/data/builder/object-editor.builder @@ -0,0 +1,2247 @@ + + + + + + True + 6 + dialog1 + dialog + + + True + + + True + 6 + 12 + + + True + 12 + + + True + + + False + 0 + + + + + True + <span weight="bold" size="larger">Xxx object properties</span> + True + + + False + False + 1 + + + + + False + False + 0 + + + + + True + True + True + + + True + 12 + 6 + + + True + + + True + True + + + 232 + True + True + + + + + 0 + + + + + 0 + + + + + True + 12 + + + Insert merge field + True + True + False + True + + + False + 0 + + + + + False + False + 1 + + + + + False + + + + + True + Text + + + False + + + + + True + 12 + 12 + + + True + 12 + + + True + 0 + Family: + + + False + False + 0 + + + + + True + + + + + + 1 + + + + + False + False + 0 + + + + + True + 12 + + + True + 0 + Size: + + + False + False + 0 + + + + + True + 12 + + + True + True + adjustment1 + 0.0099999997764800008 + True + + + False + False + 0 + + + + + 1 + + + + + False + False + 1 + + + + + True + 12 + + + True + 0 + Style: + + + False + False + 0 + + + + + True + 12 + + + True + True + False + + + True + gtk-bold + 4 + + + + + False + False + 0 + + + + + True + True + False + + + True + gtk-italic + 4 + + + + + False + False + 1 + + + + + 1 + + + + + False + False + 2 + + + + + True + 12 + + + True + 0 + 0.14000000059604645 + Color: + + + False + False + 0 + + + + + True + 6 + + + True + 6 + + + True + True + False + True + False + True + + + False + False + 0 + + + + + True + 12 + + + + + + 1 + + + + + 0 + + + + + True + 6 + + + Key: + True + True + False + True + False + True + text_color_radio + + + False + False + 0 + + + + + True + 12 + + + True + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + False + False + 3 + + + + + True + 12 + + + True + 0 + Alignment: + + + False + False + 0 + + + + + True + 12 + + + True + True + False + + + True + gtk-justify-left + 4 + + + + + False + False + 0 + + + + + True + True + False + + + True + gtk-justify-center + 4 + + + + + False + False + 1 + + + + + True + True + False + + + True + gtk-justify-right + 4 + + + + + False + False + 2 + + + + + 1 + + + + + False + False + 4 + + + + + True + 12 + + + True + 0 + Line Spacing: + + + False + False + 0 + + + + + True + 12 + + + True + True + adjustment2 + 0.0099999997764800008 + 2 + + + False + False + 0 + + + + + 1 + + + + + False + False + 5 + + + + + Allow merge to automatically shrink text + True + True + False + True + True + + + False + False + 6 + + + + + 1 + False + + + + + True + Style + + + 1 + False + + + + + True + 12 + 12 + + + True + 12 + + + True + 0 + Width: + + + False + False + 0 + + + + + True + 12 + + + True + True + adjustment3 + 0.0099999997764800008 + 2 + True + + + False + False + 0 + + + + + True + points + + + False + False + 1 + + + + + 1 + + + + + False + False + 0 + + + + + True + 12 + + + True + 0 + 0.14000000059604645 + Color: + + + False + False + 0 + + + + + True + 6 + + + True + 6 + + + True + False + False + True + False + True + + + False + False + 0 + + + + + True + 12 + + + + + + 1 + + + + + 0 + + + + + True + 6 + + + Key: + True + False + False + True + False + True + line_color_radio + + + False + False + 0 + + + + + True + 12 + + + True + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + False + False + 1 + + + + + 2 + + + + + True + Line + + + 2 + False + + + + + True + 12 + + + True + 12 + + + True + 0 + 0.14000000059604645 + Color: + + + False + False + 0 + + + + + True + 6 + + + True + 6 + + + True + False + False + True + False + True + True + + + False + False + 0 + + + + + True + 12 + + + + + + 1 + + + + + 0 + + + + + True + 6 + + + Key: + True + False + False + True + False + True + fill_color_radio + + + False + False + 0 + + + + + True + 12 + + + True + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + False + False + 0 + + + + + 3 + + + + + True + Fill + + + 3 + False + + + + + True + 12 + 12 + + + True + 12 + + + File: + True + True + False + True + False + True + + + False + False + 0 + + + + + True + True + + + 1 + + + + + False + False + 0 + + + + + True + 12 + + + Key: + True + False + True + False + True + False + True + img_file_radio + + + False + False + 0 + + + + + True + + + 1 + + + + + False + False + 1 + + + + + 4 + + + + + True + Image + + + 4 + False + + + + + True + 12 + 12 + + + True + 12 + + + Literal: + True + True + False + True + True + + + False + False + 0 + + + + + True + True + + + 1 + + + + + False + False + 0 + + + + + True + 12 + + + Key: + True + True + False + True + True + data_literal_radio + + + False + False + 0 + + + + + True + + + 1 + + + + + False + False + 1 + + + + + True + 12 + + + True + + + + False + False + 0 + + + + + True + 2 + 2 + 6 + 6 + + + True + 0 + format: + + + GTK_FILL + + + + + + True + 0 + 00000000000 00000 + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + digits: + + + 1 + 2 + GTK_FILL + + + + + + True + + + True + True + adjustment13 + 1 + True + + + False + False + 0 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + 1 + + + + + False + False + 2 + + + + + 5 + + + + + True + Data + + + 5 + False + + + + + True + 12 + 12 + + + True + 12 + + + True + 0 + Style: + + + False + False + 0 + + + + + True + + + 1 + + + + + False + False + 0 + + + + + Text + True + True + False + True + True + + + False + False + 1 + + + + + Checksum + True + True + False + True + True + + + False + False + 2 + + + + + True + 12 + + + True + 0 + 0.14000000059604645 + Color: + + + False + False + 0 + + + + + True + 6 + + + True + 6 + + + True + True + False + True + False + True + + + False + False + 0 + + + + + True + 12 + + + + + + 1 + + + + + 0 + + + + + True + 6 + + + Key: + True + True + False + True + False + True + bc_color_radio + + + False + False + 0 + + + + + True + 12 + + + True + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + False + False + 3 + + + + + 6 + + + + + True + Style + + + 6 + False + + + + + True + 12 + 12 + + + True + 3 + 3 + 12 + 12 + + + True + 0 + Width: + + + GTK_FILL + + + + + + True + 0 + Height: + + + 1 + 2 + GTK_FILL + + + + + + True + 12 + + + True + True + adjustment5 + 0.0099999997764800008 + 2 + True + True + + + False + 0 + + + + + True + inches + + + False + False + 1 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 12 + + + Reset image size + True + True + False + True + + + False + False + 0 + + + + + 2 + 2 + 3 + GTK_FILL + + + + + + True + 12 + + + True + True + adjustment4 + 0.0099999997764800008 + 2 + True + True + + + False + 0 + + + + + True + inches + + + False + False + 1 + + + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + + + + + + 2 + 3 + 2 + GTK_FILL + + + + + + + + + 0 + + + + + 7 + + + + + True + Size + + + 7 + False + + + + + True + 12 + 12 + + + True + 2 + 2 + 12 + 12 + + + True + 0 + Length: + + + GTK_FILL + + + + + + True + 0 + Angle: + + + 1 + 2 + GTK_FILL + + + + + + True + 12 + + + True + True + adjustment6 + 0.0099999997764800008 + 2 + True + True + + + False + 0 + + + + + True + inches + + + False + False + 1 + + + + + 1 + 2 + GTK_FILL + + + + + True + 12 + + + True + True + adjustment7 + 0.0099999997764800008 + 1 + True + True + + + False + 0 + + + + + True + degrees + + + False + False + 1 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + 0 + + + + + 8 + + + + + True + Size + + + 8 + False + + + + + True + 12 + 12 + + + True + 2 + 3 + 12 + 12 + + + 50 + True + 0 + X: + + + GTK_FILL + + + + + + True + 0 + Y: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + True + True + adjustment8 + 0.0099999997764800008 + 2 + True + True + + + 1 + 2 + + + + + + + True + True + adjustment9 + 0.0099999997764800008 + 2 + True + True + + + 1 + 2 + 1 + 2 + + + + + + + 0 + + + + + 9 + + + + + True + Position + + + 9 + False + + + + + True + 12 + 12 + + + Enable shadow + True + True + False + True + True + + + False + False + 0 + + + + + True + 12 + + + True + 12 + + + True + 0 + X Offset: + + + False + False + 0 + + + + + True + 12 + + + True + True + adjustment10 + 0.0099999997764800008 + 2 + True + True + + + False + 0 + + + + + True + inches + + + False + False + 1 + + + + + 1 + + + + + 0 + + + + + True + 12 + + + True + 0 + Y Offset: + + + False + False + 0 + + + + + True + 12 + + + True + True + adjustment11 + 0.0099999997764800008 + 2 + True + True + + + False + 0 + + + + + True + inches + + + False + False + 1 + + + + + 1 + + + + + 1 + + + + + True + 12 + + + True + 0 + 0.14000000059604645 + Color: + + + False + False + 0 + + + + + True + 6 + + + True + 6 + + + True + True + False + True + False + True + + + False + False + 0 + + + + + True + 12 + + + + + + False + False + 1 + + + + + 0 + + + + + True + 6 + + + Key: + True + True + False + True + False + True + shadow_color_radio + + + False + False + 0 + + + + + True + 12 + + + True + + + 0 + + + + + 1 + + + + + 1 + + + + + 1 + + + + + 2 + + + + + True + 12 + + + True + 0 + Opacity: + + + False + False + 0 + + + + + True + 12 + + + True + True + adjustment12 + 1 + + + False + 0 + + + + + True + % + + + False + False + 1 + + + + + 1 + + + + + 3 + + + + + False + False + 1 + + + + + 10 + + + + + True + Shadow + + + 10 + False + + + + + True + + + + + + 11 + + + + + True + label48 + + + 11 + False + + + + + 1 + + + + + 2 + + + + + True + end + + + gtk-close + True + True + True + False + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + closebutton1 + + + + 1 + 1 + 100 + 1 + 10 + + + 1 + 5 + 0.01 + 0.10000000000000001 + + + 1 + 0.25 + 4 + 0.25 + 1 + + + 1 + 100 + 0.01 + 0.10000000000000001 + + + 1 + 100 + 0.01 + 0.10000000000000001 + + + 1 + 100 + 0.01 + 0.10000000000000001 + + + -180 + 180 + 0.10000000000000001 + 5 + + + 100 + 0.01 + 1 + + + 100 + 0.01 + 1 + + + 100 + 0.01 + 1 + + + 100 + 0.01 + 1 + + + 1 + 100 + 1 + 10 + + + 1 + 1 + 100 + 1 + 10 + + diff --git a/data/builder/prefs-dialog.builder b/data/builder/prefs-dialog.builder new file mode 100644 index 00000000..65d23688 --- /dev/null +++ b/data/builder/prefs-dialog.builder @@ -0,0 +1,789 @@ + + + + + + True + gLabels Preferences + dialog + + + True + + + True + True + + + True + 12 + 12 + + + True + 0 + Select locale specific behavior. + + + False + False + 0 + + + + + True + 0 + none + + + True + + + True + + + + False + False + 0 + + + + + True + 6 + 6 + + + Points + True + True + False + True + True + + + False + False + 0 + + + + + Inches + True + True + False + True + True + units_points_radio + + + False + False + 1 + + + + + Millimeters + True + True + False + True + True + units_points_radio + + + False + False + 2 + + + + + 1 + + + + + + + True + 0 + <span weight="bold">Units</span> + True + + + + + False + False + 1 + + + + + True + 0 + none + + + True + + + True + + + + False + False + 0 + + + + + True + 6 + 6 + + + US Letter + True + True + False + True + True + + + False + False + 0 + + + + + ISO A4 + True + True + False + True + True + page_size_us_letter_radio + + + False + False + 1 + + + + + 1 + + + + + + + True + 0 + <span weight="bold">Default page size</span> + True + + + + + False + False + 2 + + + + + + + True + Locale + + + False + + + + + True + 12 + 12 + + + True + 0 + Select default properties for new objects. + + + False + False + 0 + + + + + True + 0 + none + + + True + + + True + + + + False + False + 0 + + + + + True + 4 + 2 + 12 + 12 + + + True + 0 + Font: + + + GTK_FILL + + + + + + True + 0 + Color: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Alignment: + + + 2 + 3 + GTK_FILL + + + + + + 90 + True + 0 + Line Spacing: + + + 3 + 4 + GTK_FILL + + + + + + True + 12 + + + True + + + + + + 0 + + + + + True + True + adjustment1 + 1 + True + + + False + False + 1 + + + + + True + True + False + + + True + gtk-bold + 4 + + + + + False + False + 2 + + + + + True + True + False + + + True + gtk-italic + 4 + + + + + False + False + 3 + + + + + 1 + 2 + GTK_FILL + + + + + True + 12 + + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 12 + + + True + True + False + + + True + gtk-justify-left + 4 + + + + + False + False + 0 + + + + + True + True + False + + + True + gtk-justify-center + 4 + + + + + False + False + 1 + + + + + True + True + False + + + True + gtk-justify-right + 4 + + + + + False + False + 2 + + + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + 40 + + + True + True + adjustment2 + 0.0099999997764800008 + 2 + + + False + False + 0 + + + + + 1 + 2 + 3 + 4 + GTK_FILL + GTK_FILL + + + + + 1 + + + + + + + True + <span weight="bold">Text</span> + True + + + + + False + False + 1 + + + + + True + 0 + none + + + True + + + True + + + + False + False + 0 + + + + + True + 2 + 2 + 12 + 12 + + + 90 + True + 0 + Width: + + + GTK_FILL + + + + + + True + 0 + Color: + + + 1 + 2 + GTK_FILL + + + + + + True + 12 + + + True + True + adjustment3 + 0.0099999997764800008 + 2 + True + + + False + False + 0 + + + + + True + points + + + False + False + 1 + + + + + 1 + 2 + GTK_FILL + + + + + True + 12 + + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + 1 + + + + + + + True + <span weight="bold">Line</span> + True + + + + + False + False + 2 + + + + + True + 0 + none + + + True + + + True + + + + False + False + 0 + + + + + True + 2 + 12 + 12 + + + 90 + True + 0 + Color: + + + GTK_FILL + + + + + + True + 12 + + + + + + 1 + 2 + GTK_FILL + + + + + 1 + + + + + + + True + <span weight="bold">Fill</span> + True + + + + + False + False + 3 + + + + + 1 + + + + + True + Object defaults + + + 1 + False + + + + + 2 + + + + + True + end + + + gtk-close + True + True + True + False + True + + + False + False + 0 + + + + + False + end + 0 + + + + + + closebutton1 + + + + 1 + 1 + 100 + 1 + 10 + + + 1 + 5 + 0.01 + 0.10000000000000001 + + + 1 + 0.25 + 4 + 0.25 + 1 + + diff --git a/data/builder/print-op-dialog-custom-widget.builder b/data/builder/print-op-dialog-custom-widget.builder new file mode 100644 index 00000000..59afddbb --- /dev/null +++ b/data/builder/print-op-dialog-custom-widget.builder @@ -0,0 +1,467 @@ + + + + + + True + window1 + + + True + 12 + 3 + + + + + + True + vertical + 12 + + + True + vertical + 12 + + + True + 0 + none + + + True + 12 + + + True + vertical + 6 + + + True + 6 + + + Sheets: + True + True + False + True + True + + + False + False + 0 + + + + + True + True + + adjustment1 + + + False + False + 1 + + + + + 0 + + + + + True + 6 + + + Labels + True + True + False + True + True + simple_sheets_radio + + + False + False + 0 + + + + + True + 3 + + + True + from: + + + False + False + 0 + + + + + True + True + + adjustment2 + + + False + False + 1 + + + + + False + False + 3 + 1 + + + + + True + 3 + + + True + to: + + + False + False + 0 + + + + + True + True + + adjustment3 + + + False + False + 1 + + + + + False + False + 3 + 2 + + + + + 1 + + + + + + + + + True + <b>Copies</b> + True + + + + + False + False + 0 + + + + + True + 0 + none + + + True + 12 + + + True + vertical + 6 + + + True + 6 + + + True + Start on label + + + False + False + 0 + + + + + True + True + + adjustment4 + + + False + False + 1 + + + + + True + on 1st sheet + + + False + False + 2 + + + + + False + False + 0 + + + + + True + 6 + + + True + Copies: + + + False + False + 0 + + + + + True + True + + adjustment5 + + + False + False + 1 + + + + + True + 12 + + + Collate + True + True + False + True + + + False + False + 0 + + + + + True + gtk-missing-image + + + 1 + + + + + False + False + 12 + 2 + + + + + 1 + + + + + + + + + True + <b>Merge Control</b> + True + + + + + False + False + 1 + + + + + False + False + 0 + + + + + True + 0 + none + + + True + 12 + + + True + vertical + + + print outlines (to test printer alignment) + True + True + False + True + True + + + False + False + 0 + + + + + print in reverse (i.e. a mirror image) + True + True + False + True + True + + + False + False + 1 + + + + + print crop marks + True + True + False + True + True + + + False + False + 2 + + + + + + + + + True + <b>Options</b> + True + + + + + False + False + 1 + + + + + False + False + end + 0 + + + + + + + 1 + 1 + 100 + 1 + 10 + + + 1 + 1 + 100 + 1 + 10 + + + 1 + 1 + 100 + 1 + 10 + + + 1 + 1 + 100 + 1 + 10 + + + 1 + 1 + 100 + 1 + 10 + + diff --git a/data/builder/property-bar.builder b/data/builder/property-bar.builder new file mode 100644 index 00000000..a98e892b --- /dev/null +++ b/data/builder/property-bar.builder @@ -0,0 +1,237 @@ + + + + + + True + window1 + + + True + icons + False + + + True + + + True + Font family + False + + + + + + + + False + + + + + True + + + True + 6 + + + True + True + Font size + adjustment1 + 1 + + + + + + + False + + + + + True + + + False + + + + + True + Bold + True + gtk-bold + + + False + True + + + + + True + Italic + True + gtk-italic + + + False + True + + + + + True + + + False + + + + + True + Left align + True + gtk-justify-left + + + False + True + + + + + True + Center align + True + gtk-justify-center + text_align_left_radio + + + False + True + + + + + True + Right align + True + gtk-justify-right + text_align_left_radio + + + False + True + + + + + True + + + False + + + + + True + + + True + Text color + False + + + + + + + + False + + + + + True + + + True + Fill color + False + + + + + + + + False + + + + + True + + + True + Line color + False + + + + + + + + False + + + + + True + + + False + + + + + True + + + True + True + Line width + adjustment2 + 1 + 2 + + + + + False + + + + + + + 1 + 1 + 250 + 1 + 10 + + + 1 + 0.25 + 4 + 0.25 + 1 + + diff --git a/data/builder/template-designer.builder b/data/builder/template-designer.builder new file mode 100644 index 00000000..d61f0ec6 --- /dev/null +++ b/data/builder/template-designer.builder @@ -0,0 +1,2152 @@ + + + + + + True + window1 + + + True + True + 6 + + + True + Welcome to the gLabels Template Designer. + +This dialog will assist you in the creation of a custom gLabels template. + + + + + True + start_page + + + False + + + + + True + 18 + 24 + + + True + 0 + Please enter the following identifying information about the template stationery. + + + False + False + 0 + + + + + True + 6 + 2 + 12 + 12 + + + True + 0 + Brand/Manufacturer: + + + GTK_FILL + + + + + + True + 0 + Part #: + + + 1 + 2 + GTK_FILL + + + + + + True + 12 + + + True + True + + + False + False + 0 + + + + + True + 0 + (e.g., 8163A) + + + False + False + 1 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 12 + + + True + True + + + False + False + 0 + + + + + True + 0 + (e.g., Avery, Acme, ...) + + + False + False + 1 + + + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 0 + 0 + Description: + + + 4 + 5 + GTK_FILL + + + + + + True + True + + + 1 + 2 + 4 + 5 + + + + + + True + 0 + 0 + (e.g., "Mailing Labels," "Business Cards," ...) + + + 1 + 2 + 5 + 6 + GTK_FILL + + + + + + True + 6 + + + True + + + False + False + 0 + + + + + True + 0 + True + + + False + 1 + + + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + + + + + + + + + + + + + 1 + + + + + 1 + + + + + True + name_page + + + 1 + False + + + + + True + 18 + 24 + + + True + 0 + Please select the page size of the template stationery. + + + False + False + 0 + + + + + True + 3 + 2 + 12 + 12 + + + True + 0 + Page size: + + + GTK_FILL + + + + + + True + 0 + Width: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Height: + + + 2 + 3 + GTK_FILL + + + + + + True + + + True + + + False + False + 0 + + + + + + + + 1 + 2 + GTK_FILL + + + + + True + 12 + + + True + True + adjustment1 + 0.0099999997764800008 + + + False + False + 0 + + + + + True + 0 + inches + + + False + False + 1 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 12 + + + True + True + adjustment2 + 0.0099999997764800008 + + + False + False + 0 + + + + + True + 0 + inches + + + False + False + 1 + + + + + 1 + 2 + 2 + 3 + GTK_FILL + GTK_FILL + + + + + False + False + 1 + + + + + 2 + + + + + True + pg_size_page + + + 2 + False + + + + + True + 18 + 24 + + + True + 0 + Please select the basic shape of the labels or cards. + + + False + False + 0 + + + + + True + 6 + + + Rectangular or square (can have rounded corners) + True + True + False + True + True + + + False + False + 0 + + + + + Round + True + True + False + True + True + shape_rect_radio + + + False + False + 1 + + + + + CD/DVD (including credit card CDs) + True + True + False + True + True + shape_rect_radio + + + False + False + 2 + + + + + 1 + + + + + 3 + + + + + True + shape_page + + + 3 + False + + + + + True + 18 + 24 + + + True + 0 + Please enter the following size parameters of a single label or card in your template. + + + False + False + 0 + + + + + True + 12 + + + True + 6 + 3 + 12 + 12 + + + True + 0 + 1. Width: + + + GTK_FILL + + + + + + True + 0 + 2. Height: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + 3. Round (radius of corner): + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + 4. Horiz. waste (overprint allowed): + + + 3 + 4 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 3 + 4 + GTK_FILL + + + + + + True + True + adjustment3 + 0.0099999997764800008 + + + 1 + 2 + + + + + + True + True + adjustment4 + 0.0099999997764800008 + + + 1 + 2 + 1 + 2 + + + + + + True + True + adjustment5 + 0.0099999997764800008 + + + 1 + 2 + 2 + 3 + + + + + + True + True + adjustment6 + 0.0099999997764800008 + + + 1 + 2 + 3 + 4 + + + + + + True + 0 + 6. Margin + + + 5 + 6 + GTK_FILL + + + + + + True + True + adjustment8 + 0.0099999997764800008 + + + 1 + 2 + 5 + 6 + + + + + + True + 0 + inches + + + 2 + 3 + 5 + 6 + GTK_FILL + + + + + + True + True + adjustment7 + 0.0099999997764800008 + + + 1 + 2 + 4 + 5 + + + + + + True + 0 + inches + + + 2 + 3 + 4 + 5 + GTK_FILL + + + + + + True + 0 + 5. Vert. waste (overprint allowed): + + + 4 + 5 + GTK_FILL + + + + + + False + False + 0 + + + + + True + 1 + 0 + + + 1 + + + + + False + False + 1 + + + + + 4 + + + + + True + rect_size_page + + + 4 + False + + + + + True + 18 + 24 + + + True + 0 + Please enter the following size parameters of a single label in your template. + + + False + False + 0 + + + + + True + 12 + + + True + 3 + 3 + 12 + 12 + + + True + 0 + 1. Radius: + + + GTK_FILL + + + + + + True + 0 + 2. Waste (overprint allowed): + + + 1 + 2 + GTK_FILL + + + + + + True + True + adjustment9 + 0.0099999997764800008 + + + 1 + 2 + + + + + + True + True + adjustment10 + 0.0099999997764800008 + + + 1 + 2 + 1 + 2 + + + + + + True + 0 + inches + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + True + 0 + 3. Margin + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + + True + True + adjustment11 + 0.0099999997764800008 + + + 1 + 2 + 2 + 3 + + + + + + False + False + 0 + + + + + True + 1 + 0 + + + 1 + + + + + False + False + 1 + + + + + 5 + + + + + True + round_size_page + + + 5 + False + + + + + True + 18 + 24 + + + True + 0 + Please enter the following size parameters of a single label in your template. + + + False + False + 0 + + + + + True + 12 + + + True + 6 + 3 + 12 + 12 + + + True + 0 + 1. Outer radius: + + + GTK_FILL + + + + + + True + 0 + 2. Inner radius: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + 3. Clipping width: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + 4. Clipping height: + + + 3 + 4 + GTK_FILL + + + + + + True + 0 + 5. Waste (overprint allowed): + + + 4 + 5 + GTK_FILL + + + + + + True + True + adjustment12 + 0.0099999997764800008 + + + 1 + 2 + + + + + + True + True + adjustment13 + 0.0099999997764800008 + + + 1 + 2 + 1 + 2 + + + + + + True + True + adjustment14 + 0.0099999997764800008 + + + 1 + 2 + 2 + 3 + + + + + + True + True + adjustment15 + 0.0099999997764800008 + + + 1 + 2 + 3 + 4 + + + + + + True + True + adjustment16 + 0.0099999997764800008 + + + 1 + 2 + 4 + 5 + + + + + + True + 0 + inches + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 3 + 4 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 4 + 5 + GTK_FILL + + + + + + True + 0 + 6. Margin + + + 5 + 6 + GTK_FILL + + + + + + True + 0 + inches + + + 2 + 3 + 5 + 6 + GTK_FILL + + + + + + True + True + adjustment17 + 0.0099999997764800008 + + + 1 + 2 + 5 + 6 + + + + + + False + False + 0 + + + + + True + 1 + 0 + + + 1 + + + + + False + False + 1 + + + + + 6 + + + + + True + cd_size_page + + + 6 + False + + + + + True + 18 + 24 + + + True + 0 + How many layouts will your template contain? + +A layout is a set of labels or cards that can be arranged in a simple grid. +Most templates only need one layout, as in the first example. +The second example illustrates when two layouts are needed. + + + False + False + 0 + + + + + True + 12 + + + True + + + True + + + 0 + + + + + True + Templates needing only +one layout. + center + + + False + False + 1 + + + + + 0 + + + + + True + + + True + + + 0 + + + + + True + Templates needing +two layouts. + center + + + False + False + 1 + + + + + 1 + + + + + False + False + 1 + + + + + True + 12 + + + True + 0 + Number of layouts: + + + False + False + 0 + + + + + True + True + 1 + adjustment18 + 1 + True + + + False + False + 1 + + + + + False + False + 2 + + + + + 7 + + + + + True + nlayouts_page + + + 7 + False + + + + + True + 18 + 12 + + + True + 0 + Please enter the following layout information. + + + False + False + 0 + + + + + True + 18 + + + True + 7 + 4 + 12 + 6 + + + True + 0 + Layout #1 + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Layout #2 + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Number across (nx): + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Number down (ny): + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Distance from left edge (x0): + + + 3 + 4 + GTK_FILL + + + + + + True + 0 + Distance from top edge (y0): + + + 4 + 5 + GTK_FILL + + + + + + True + 0 + Horizontal pitch (dx): + + + 5 + 6 + GTK_FILL + + + + + + True + 0 + Vertical pitch (dy): + + + 6 + 7 + GTK_FILL + + + + + + True + 0 + inches + + + 3 + 4 + 3 + 4 + GTK_FILL + + + + + + True + 0 + inches + + + 3 + 4 + 4 + 5 + GTK_FILL + + + + + + True + 0 + inches + + + 3 + 4 + 5 + 6 + GTK_FILL + + + + + + True + 0 + inches + + + 3 + 4 + 6 + 7 + GTK_FILL + + + + + + True + True + adjustment19 + 0.0099999997764800008 + + + 1 + 2 + 1 + 2 + + + + + + True + True + adjustment21 + 0.0099999997764800008 + + + 1 + 2 + 2 + 3 + + + + + + True + True + adjustment20 + 0.0099999997764800008 + + + 2 + 3 + 1 + 2 + + + + + + True + True + adjustment22 + 0.0099999997764800008 + + + 2 + 3 + 2 + 3 + + + + + + True + True + adjustment23 + 0.0099999997764800008 + + + 1 + 2 + 3 + 4 + + + + + + True + True + adjustment24 + 0.0099999997764800008 + + + 2 + 3 + 3 + 4 + + + + + + True + True + adjustment25 + 0.0099999997764800008 + + + 1 + 2 + 4 + 5 + + + + + + True + True + adjustment26 + 0.0099999997764800008 + + + 2 + 3 + 4 + 5 + + + + + + True + True + adjustment27 + 0.0099999997764800008 + + + 1 + 2 + 5 + 6 + + + + + + True + True + adjustment28 + 0.0099999997764800008 + + + 2 + 3 + 5 + 6 + + + + + + True + True + adjustment29 + 0.0099999997764800008 + + + 1 + 2 + 6 + 7 + + + + + + True + True + adjustment30 + 0.0099999997764800008 + + + 2 + 3 + 6 + 7 + + + + + + + + + + + + + + + + + + False + False + 0 + + + + + True + + + True + + + + 0 + + + + + True + 6 + + + True + + + + + + 0 + + + + + Print test sheet + True + True + False + 6 + True + + + False + False + 1 + + + + + False + False + 1 + + + + + 1 + + + + + False + False + 1 + + + + + 8 + + + + + True + layout_page + + + 8 + False + + + + + True + Congratulations! + +You have completed the gLabels Template Designer. +If you wish to accept and save your design, click "Apply." + +Otherwise, you may click "Cancel" to abandon your design +or "Back" to continue editing this design. + + + 9 + + + + + True + finish_page + + + 9 + False + + + + + + + 1 + 100 + 1 + 10 + + + 1 + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 1 + 1 + 2 + 1 + 1 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + + 100 + 1 + 10 + + diff --git a/data/builder/wdgt-media-select.builder b/data/builder/wdgt-media-select.builder new file mode 100644 index 00000000..80ab2f1f --- /dev/null +++ b/data/builder/wdgt-media-select.builder @@ -0,0 +1,202 @@ + + + + + + True + window1 + + + True + + + True + 12 + + + True + + + 480 + 320 + True + True + 12 + automatic + automatic + in + + + True + False + + + + + 0 + + + + + + + True + Recent templates + + + False + + + + + True + + + True + 12 + 12 + + + True + 6 + + + True + Brand: + + + False + False + 0 + + + + + True + False + + + False + 1 + + + + + False + False + 0 + + + + + True + 6 + + + True + Page size: + + + False + False + 0 + + + + + True + False + + + False + 1 + + + + + False + 1 + + + + + True + 6 + + + True + Category: + + + False + False + 0 + + + + + True + False + + + False + 1 + + + + + False + 2 + + + + + False + 0 + + + + + 480 + 320 + True + True + 12 + automatic + automatic + in + + + True + False + + + + + 1 + + + + + 1 + + + + + True + Search all templates + + + 1 + False + + + + + 0 + + + + + + diff --git a/data/desktop/Makefile.am b/data/desktop/Makefile.am new file mode 100644 index 00000000..ce2a21fc --- /dev/null +++ b/data/desktop/Makefile.am @@ -0,0 +1,13 @@ +## Process this file with automake to produce Makefile.in + +@INTLTOOL_DESKTOP_RULE@ + +DESKTOP_IN_FILES = glabels.desktop.in +DESKTOP_FILES =$(DESKTOP_IN_FILES:.desktop.in=.desktop) + +desktopdir = $(datadir)/applications +desktop_DATA = $(DESKTOP_FILES) + +EXTRA_DIST = $(DESKTOP_IN_FILES) + +CLEANFILES = $(DESKTOP_FILES) diff --git a/data/desktop/glabels.desktop.in b/data/desktop/glabels.desktop.in new file mode 100644 index 00000000..6f0956cf --- /dev/null +++ b/data/desktop/glabels.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +_Name=gLabels Label Designer +_Comment=Create labels, business cards and media covers +Exec=glabels %F +Icon=glabels.png +Terminal=false +Type=Application +Categories=GTK;Office; +StartupNotify=true +MimeType=application/x-glabels; diff --git a/data/man/Makefile.am b/data/man/Makefile.am new file mode 100644 index 00000000..34051904 --- /dev/null +++ b/data/man/Makefile.am @@ -0,0 +1,6 @@ +## Process this file with automake to produce Makefile.in + +man_MANS = glabels.1 + +EXTRA_DIST = $(man_MANS) + diff --git a/data/man/glabels.1 b/data/man/glabels.1 new file mode 100644 index 00000000..489b2a42 --- /dev/null +++ b/data/man/glabels.1 @@ -0,0 +1,67 @@ +.TH glabels 1 "Jun 28, 2004" +.SH NAME +glabels \- Label and business card creation program for GNOME +.SH SYNOPSIS +.B glabels +.RI [OPTIONS] +.RI [label-filename...] +.sp +.B glabels-batch +.RI [OPTIONS] +.RI [label-filename...] +.SH DESCRIPTION +.B 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. +.B glabels +is pre-configured with templates for many of these products. +It also provides an interactive template designer for creating new +templates according to user specifications. +.PP +For full documentation see the \fBgLabels\fR online help. + +.PP +.B glabels-batch +is a command line utility to print labels previously prepared with +.B glabels. +.SH OPTIONS +.TP +\fB\-?\fR, \fB\-\-help\fR +Display a summary of available command-line options. +.TP +\fB\-\-usage\fR +Display a short usage summary. +.TP +\fB\-v\fR, \fB\-\-version\fR +Print program version information. +.PP +.B Options specific to glabels-batch +.TP +\fB\-o\fR \fIfilename\fR, \fB\-\-output\fR=\fIfilename\fR +Set output filename to \fIfilename\fR. (default="output.ps") +.TP +\fB\-s\fR \fIn\fR, \fB\-\-sheets\fR=\fIn\fR +Set number of sheets to \fIn\fR. (default=1) +.TP +\fB\-c\fR \fIn\fR, \fB\-\-copies\fR=\fIn\fR +Set number of copies to \fIn\fR. (default=1) +.TP +\fB\-f\fR \fIn\fR, \fB\-\-first\fR=\fIn\fR +Set label on first sheet to start printing from to \fIn\fR. (default=1) +.TP +\fB\-l\fR, \fB\-\-outline\fR +Print outlines around labels. This is useful for testing printer alignment +or printing proof sheets. +.TP +\fB\-r\fR, \fB\-\-reverse\fR +Print mirror image of labels. This is useful for clear labels intended to be +seen from the back through glass. + +.SH FILES +The $HOME/.glabels directory contains all user-defined templates. +.SH SEE ALSO +The gLabels homepage at . +.SH AUTHOR +Jim Evins diff --git a/data/mime/Makefile.am b/data/mime/Makefile.am new file mode 100644 index 00000000..027c1022 --- /dev/null +++ b/data/mime/Makefile.am @@ -0,0 +1,53 @@ +## Process this file with automake to produce Makefile.in + +keys_in_files=glabels.keys.in +keys_files = $(keys_in_files:.keys.in=.keys) +@INTLTOOL_KEYS_RULE@ + +xml_in_files=glabels.xml.in +xml_files = $(xml_in_files:.xml.in=.xml) +@INTLTOOL_XML_RULE@ + +mimedir = $(datadir)/mime-info +mime_DATA = $(keys_files) glabels.mime + +appdir = $(datadir)/application-registry +app_DATA = glabels.applications + +newmimedir = $(datadir)/mime/packages +newmime_DATA = $(xml_files) + +EXTRA_DIST = \ + $(keys_in_files) \ + $(mime_DATA) \ + $(app_DATA) \ + $(xml_in_files) \ + $(newmime_DATA) + +CLEANFILES = $(keys_files) $(xml_files) + + +install-data-hook: +if ENABLE_UPDATE_MIMEDB +if HAVE_NEW_MIME + $(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime" +endif +endif +if ENABLE_UPDATE_DESKTOPDB +if HAVE_NEWER_MIME + $(UPDATE_DESKTOP_DATABASE) +endif +endif + +uninstall-hook: +if ENABLE_UPDATE_MIMEDB +if HAVE_NEW_MIME + $(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime" +endif +endif +if ENABLE_UPDATE_DESKTOPDB +if HAVE_NEWER_MIME + $(UPDATE_DESKTOP_DATABASE) +endif +endif + diff --git a/data/mime/glabels.applications b/data/mime/glabels.applications new file mode 100644 index 00000000..1391018e --- /dev/null +++ b/data/mime/glabels.applications @@ -0,0 +1,9 @@ +glabels + command=glabels + name=gLabels + can_open_multiple_files=true + expects_uris=false + requires_terminal=false + mime_types=application/x-glabels + uses_gnomevfs=false + diff --git a/data/mime/glabels.keys.in b/data/mime/glabels.keys.in new file mode 100644 index 00000000..596c96c7 --- /dev/null +++ b/data/mime/glabels.keys.in @@ -0,0 +1,9 @@ +application/x-glabels: + open=glabels %f + _description=gLabels Project File + icon_filename=glabels-application-x-glabels.png + default_action_type=application + category=Documents + short_list_application_ids_for_novice_user_level=glabels + short_list_application_ids_for_intermediate_user_level=glabels + short_list_application_ids_for_advanced_user_level=glabels diff --git a/data/mime/glabels.mime b/data/mime/glabels.mime new file mode 100644 index 00000000..ab2f8cd3 --- /dev/null +++ b/data/mime/glabels.mime @@ -0,0 +1,2 @@ +application/x-glabels + ext: glabels diff --git a/data/mime/glabels.xml.in b/data/mime/glabels.xml.in new file mode 100644 index 00000000..70f0e2f3 --- /dev/null +++ b/data/mime/glabels.xml.in @@ -0,0 +1,8 @@ + + + + <_comment>gLabels Project File + + + + diff --git a/data/pixmaps/Makefile.am b/data/pixmaps/Makefile.am new file mode 100644 index 00000000..4cebb802 --- /dev/null +++ b/data/pixmaps/Makefile.am @@ -0,0 +1,26 @@ +## Process this file with automake to produce Makefile.in + +glabels_pixmapsdir = $(datadir)/pixmaps/glabels + +glabels_pixmaps_DATA = \ + glabels-splash.png \ + glabels-about-logo.png \ + ex-rect-size.png \ + ex-round-size.png \ + ex-cd-size.png \ + ex-1layout.png \ + ex-2layouts.png + +glabels_app_icondir = $(datadir)/pixmaps + +glabels_app_icon_DATA = \ + glabels.png + +glabels_mime_icondir = $(datadir)/pixmaps + +glabels_mime_icon_DATA = \ + glabels-application-x-glabels.png + +EXTRA_DIST = $(glabels_pixmaps_DATA) \ + $(glabels_app_icon_DATA) \ + $(glabels_mime_icon_DATA) diff --git a/data/pixmaps/ex-1layout.png b/data/pixmaps/ex-1layout.png new file mode 100644 index 00000000..3045c5f2 Binary files /dev/null and b/data/pixmaps/ex-1layout.png differ diff --git a/data/pixmaps/ex-2layouts.png b/data/pixmaps/ex-2layouts.png new file mode 100644 index 00000000..1bb5931a Binary files /dev/null and b/data/pixmaps/ex-2layouts.png differ diff --git a/data/pixmaps/ex-cd-size.png b/data/pixmaps/ex-cd-size.png new file mode 100644 index 00000000..68261f03 Binary files /dev/null and b/data/pixmaps/ex-cd-size.png differ diff --git a/data/pixmaps/ex-rect-size.png b/data/pixmaps/ex-rect-size.png new file mode 100644 index 00000000..2710472f Binary files /dev/null and b/data/pixmaps/ex-rect-size.png differ diff --git a/data/pixmaps/ex-round-size.png b/data/pixmaps/ex-round-size.png new file mode 100644 index 00000000..c45d6c3b Binary files /dev/null and b/data/pixmaps/ex-round-size.png differ diff --git a/data/pixmaps/glabels-about-logo.png b/data/pixmaps/glabels-about-logo.png new file mode 100644 index 00000000..9997c67e Binary files /dev/null and b/data/pixmaps/glabels-about-logo.png differ diff --git a/data/pixmaps/glabels-application-x-glabels.png b/data/pixmaps/glabels-application-x-glabels.png new file mode 100644 index 00000000..59c749f3 Binary files /dev/null and b/data/pixmaps/glabels-application-x-glabels.png differ diff --git a/data/pixmaps/glabels-splash.png b/data/pixmaps/glabels-splash.png new file mode 100644 index 00000000..713cb8a2 Binary files /dev/null and b/data/pixmaps/glabels-splash.png differ diff --git a/data/pixmaps/glabels.png b/data/pixmaps/glabels.png new file mode 100644 index 00000000..afb7ecfb Binary files /dev/null and b/data/pixmaps/glabels.png differ diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 00000000..0cb49459 --- /dev/null +++ b/docs/Makefile.am @@ -0,0 +1,3 @@ +## Process this file with automake to produce Makefile.in. + +SUBDIRS = libglabels diff --git a/docs/libglabels/Makefile.am b/docs/libglabels/Makefile.am new file mode 100644 index 00000000..28e56fdb --- /dev/null +++ b/docs/libglabels/Makefile.am @@ -0,0 +1,69 @@ +## Process this file with automake to produce Makefile.in + +# We require automake 1.6 at least. +AUTOMAKE_OPTIONS = 1.6 + +# This is a blank Makefile.am for using gtk-doc. +# Copy this to your project's API docs directory and modify the variables to +# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples +# of using the various options. + +# The name of the module, e.g. 'glib'. +DOC_MODULE=libglabels + +# The top-level SGML file. You can change this if you want to. +DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml + +# The directory containing the source code. Relative to $(srcdir). +# gtk-doc will search all .c & .h files beneath here for inline comments +# documenting the functions and macros. +# e.g. DOC_SOURCE_DIR=../../../gtk +DOC_SOURCE_DIR=../../libglabels + +# Extra options to pass to gtkdoc-scangobj. Not normally needed. +SCANGOBJ_OPTIONS= + +# Extra options to supply to gtkdoc-scan. +# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" +SCAN_OPTIONS= + +# Extra options to supply to gtkdoc-mkdb. +# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml +MKDB_OPTIONS=--sgml-mode --output-format=xml + +# Extra options to supply to gtkdoc-fixref. Not normally needed. +# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html +FIXXREF_OPTIONS= + +# Used for dependencies. The docs will be rebuilt if any of these change. +# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h +# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c +HFILE_GLOB= +CFILE_GLOB= + +# Header files to ignore when scanning. +# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h +IGNORE_HFILES=libglabels-private.h + +# Images to copy into HTML directory. +# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png +HTML_IMAGES= + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). +# e.g. content_files=running.sgml building.sgml changes-2.0.sgml +content_files= + +# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. +# Only needed if you are using gtkdoc-scangobj to dynamically query widget +# signals and properties. +# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) +INCLUDES= +GTKDOC_LIBS= + +# This includes the standard gtk-doc make rules, copied by gtkdocize. +include $(top_srcdir)/gtk-doc.make + +# Other files to distribute +# e.g. EXTRA_DIST += version.xml.in +EXTRA_DIST += diff --git a/docs/libglabels/libglabels-decl-list.txt b/docs/libglabels/libglabels-decl-list.txt new file mode 100644 index 00000000..d3e6343c --- /dev/null +++ b/docs/libglabels/libglabels-decl-list.txt @@ -0,0 +1,166 @@ +
    +xml-paper +lgl_xml_paper_read_papers_from_file +lgl_xml_paper_parse_papers_doc +lgl_xml_paper_parse_paper_node +
    + +
    +enums +lglUnitsType +
    + +
    +xml-category +lgl_xml_category_read_categories_from_file +lgl_xml_category_parse_categories_doc +lgl_xml_category_parse_category_node +
    + +
    +libglabels +
    + +
    +db +lglDbRegStatus +lgl_db_init +lgl_db_get_paper_id_list +lgl_db_free_paper_id_list +lgl_db_get_paper_name_list +lgl_db_free_paper_name_list +lgl_db_lookup_paper_from_name +lgl_db_lookup_paper_from_id +lgl_db_lookup_paper_id_from_name +lgl_db_lookup_paper_name_from_id +lgl_db_is_paper_id_known +lgl_db_is_paper_id_other +lgl_db_get_category_id_list +lgl_db_free_category_id_list +lgl_db_get_category_name_list +lgl_db_free_category_name_list +lgl_db_lookup_category_from_name +lgl_db_lookup_category_from_id +lgl_db_lookup_category_id_from_name +lgl_db_lookup_category_name_from_id +lgl_db_is_category_id_known +lgl_db_get_brand_list +lgl_db_free_brand_list +lgl_db_register_template +lgl_db_does_template_exist +lgl_db_does_template_name_exist +lgl_db_get_template_name_list_unique +lgl_db_get_template_name_list_all +lgl_db_free_template_name_list +lgl_db_lookup_template_from_name +lgl_db_print_known_papers +lgl_db_print_known_categories +lgl_db_print_known_templates +lgl_db_print_aliases +
    + +
    +str +lgl_str_utf8_casecmp +
    + +
    +template +lglTemplate +lglTemplateAlias +lglTemplateFrameAll +lglTemplateFrameRect +lglTemplateFrameRound +lglTemplateFrameCD +lglTemplateLayout +lglTemplateMarkupMargin +lglTemplateMarkupLine +lglTemplateMarkupCircle +lglTemplateMarkupRect +lglTemplateOrigin +lglTemplateFrameShape +lglTemplateFrame +lglTemplateMarkupType +lglTemplateMarkup +lgl_template_get_name +lgl_template_do_templates_match +lgl_template_does_brand_match +lgl_template_does_page_size_match +lgl_template_does_category_match +lgl_template_frame_get_size +lgl_template_frame_get_n_labels +lgl_template_frame_get_origins +lgl_template_new +lgl_template_add_alias +lgl_template_add_category +lgl_template_add_frame +lgl_template_frame_rect_new +lgl_template_alias_new +lgl_template_frame_round_new +lgl_template_frame_cd_new +lgl_template_frame_add_layout +lgl_template_frame_add_markup +lgl_template_layout_new +lgl_template_markup_margin_new +lgl_template_markup_line_new +lgl_template_markup_circle_new +lgl_template_markup_rect_new +lgl_template_dup +lgl_template_free +lgl_template_alias_dup +lgl_template_alias_free +lgl_template_frame_dup +lgl_template_frame_free +lgl_template_layout_dup +lgl_template_layout_free +lgl_template_markup_dup +lgl_template_markup_free +
    + +
    +category +lglCategory +lgl_category_new +lgl_category_dup +lgl_category_free +
    + +
    +xml +LGL_XML_NAME_SPACE +lgl_xml_get_prop_string +lgl_xml_get_prop_i18n_string +lgl_xml_get_prop_double +lgl_xml_get_prop_boolean +lgl_xml_get_prop_int +lgl_xml_get_prop_uint +lgl_xml_get_prop_length +lgl_xml_set_prop_string +lgl_xml_set_prop_double +lgl_xml_set_prop_boolean +lgl_xml_set_prop_int +lgl_xml_set_prop_uint_hex +lgl_xml_set_prop_length +lgl_xml_is_node +lgl_xml_get_node_content +lgl_xml_set_default_units +
    + +
    +xml-template +lgl_xml_template_read_templates_from_file +lgl_xml_template_parse_templates_doc +lgl_xml_template_parse_template_node +lgl_xml_template_write_templates_to_file +lgl_xml_template_write_template_to_file +lgl_xml_template_create_template_node +
    + +
    +paper +lglPaper +lgl_paper_new +lgl_paper_dup +lgl_paper_free +
    + diff --git a/docs/libglabels/libglabels-docs.sgml b/docs/libglabels/libglabels-docs.sgml new file mode 100644 index 00000000..a4b5b381 --- /dev/null +++ b/docs/libglabels/libglabels-docs.sgml @@ -0,0 +1,33 @@ + + + + + + + LibGlabels Reference Manual + + + + Basic LibGlabels Usage + + + + + + + + Working Directly With LibGlabels XML + + + + + + + + Miscellaneous + + + + + diff --git a/docs/libglabels/libglabels-overrides.txt b/docs/libglabels/libglabels-overrides.txt new file mode 100644 index 00000000..e69de29b diff --git a/docs/libglabels/libglabels-sections.txt b/docs/libglabels/libglabels-sections.txt new file mode 100644 index 00000000..658d109c --- /dev/null +++ b/docs/libglabels/libglabels-sections.txt @@ -0,0 +1,194 @@ +
    +db +libglabels/db.h +lglDbRegStatus + +lgl_db_init + +lgl_db_get_paper_id_list +lgl_db_free_paper_id_list +lgl_db_get_paper_name_list +lgl_db_free_paper_name_list +lgl_db_lookup_paper_from_id +lgl_db_lookup_paper_from_name +lgl_db_lookup_paper_id_from_name +lgl_db_lookup_paper_name_from_id +lgl_db_is_paper_id_known +lgl_db_is_paper_id_other + +lgl_db_get_category_id_list +lgl_db_free_category_id_list +lgl_db_get_category_name_list +lgl_db_free_category_name_list +lgl_db_lookup_category_from_id +lgl_db_lookup_category_from_name +lgl_db_lookup_category_id_from_name +lgl_db_lookup_category_name_from_id +lgl_db_is_category_id_known + +lgl_db_get_brand_list +lgl_db_free_brand_list + +lgl_db_register_template +lgl_db_does_template_exist +lgl_db_does_template_name_exist +lgl_db_get_template_name_list_unique +lgl_db_get_template_name_list_all +lgl_db_free_template_name_list +lgl_db_lookup_template_from_name + +lgl_db_print_known_papers +lgl_db_print_known_categories +lgl_db_print_known_templates +lgl_db_print_aliases +
    + +
    +template +libglabels/template.h +lglTemplate + +lglTemplateAlias + +lglTemplateFrameShape +lglTemplateFrame +lglTemplateFrameAll +lglTemplateFrameRect +lglTemplateFrameRound +lglTemplateFrameCD + +lglTemplateLayout + +lglTemplateMarkupType +lglTemplateMarkup +lglTemplateMarkupMargin +lglTemplateMarkupLine +lglTemplateMarkupCircle +lglTemplateMarkupRect + +lglTemplateOrigin + +lgl_template_new +lgl_template_dup +lgl_template_free +lgl_template_add_category +lgl_template_add_frame +lgl_template_add_alias + +lgl_template_get_name +lgl_template_do_templates_match +lgl_template_does_brand_match +lgl_template_does_page_size_match +lgl_template_does_category_match + +lgl_template_alias_new +lgl_template_alias_dup +lgl_template_alias_free + +lgl_template_frame_rect_new +lgl_template_frame_round_new +lgl_template_frame_cd_new +lgl_template_frame_dup +lgl_template_frame_free +lgl_template_frame_add_layout +lgl_template_frame_add_markup + +lgl_template_frame_get_size +lgl_template_frame_get_n_labels +lgl_template_frame_get_origins + +lgl_template_layout_new +lgl_template_layout_dup +lgl_template_layout_free + +lgl_template_markup_margin_new +lgl_template_markup_line_new +lgl_template_markup_circle_new +lgl_template_markup_rect_new +lgl_template_markup_dup +lgl_template_markup_free +
    + +
    +paper +libglabels/paper.h +lglPaper +lgl_paper_new +lgl_paper_dup +lgl_paper_free +
    + +
    +category +libglabels/category.h +lglCategory +lgl_category_new +lgl_category_dup +lgl_category_free +
    + +
    +xml-paper +libglabels/xml-paper.h +lgl_xml_paper_read_papers_from_file +lgl_xml_paper_parse_papers_doc +lgl_xml_paper_parse_paper_node +
    + +
    +xml-category +libglabels/xml-category.h +lgl_xml_category_read_categories_from_file +lgl_xml_category_parse_categories_doc +lgl_xml_category_parse_category_node +
    + +
    +xml-template +libglabels/xml-templates.h +lgl_xml_template_read_templates_from_file +lgl_xml_template_parse_templates_doc +lgl_xml_template_parse_template_node +lgl_xml_template_write_templates_to_file +lgl_xml_template_write_template_to_file +lgl_xml_template_create_template_node +
    + +
    +xml +libglabels/xml.h +LGL_XML_NAME_SPACE + +lgl_xml_get_prop_string +lgl_xml_get_prop_i18n_string +lgl_xml_get_prop_double +lgl_xml_get_prop_boolean +lgl_xml_get_prop_int +lgl_xml_get_prop_uint +lgl_xml_get_prop_length + +lgl_xml_set_prop_string +lgl_xml_set_prop_double +lgl_xml_set_prop_boolean +lgl_xml_set_prop_int +lgl_xml_set_prop_uint_hex +lgl_xml_set_prop_length + +lgl_xml_is_node +lgl_xml_get_node_content + +lgl_xml_set_default_units +
    + +
    +enums +libglabels/enums.h +lglUnitsType +
    + +
    +str +libglabels/str.h +lgl_str_utf8_casecmp +
    + diff --git a/docs/libglabels/libglabels-undocumented.txt b/docs/libglabels/libglabels-undocumented.txt new file mode 100644 index 00000000..0c4f3ab3 --- /dev/null +++ b/docs/libglabels/libglabels-undocumented.txt @@ -0,0 +1,10 @@ +99% symbol docs coverage. +141 symbols documented. +1 symbols incomplete. +1 not documented. + + +LGL_XML_NAME_SPACE +lglPaper (pwg_size) + + diff --git a/docs/libglabels/libglabels.types b/docs/libglabels/libglabels.types new file mode 100644 index 00000000..e69de29b diff --git a/docs/libglabels/tmpl/category.sgml b/docs/libglabels/tmpl/category.sgml new file mode 100644 index 00000000..2143fd19 --- /dev/null +++ b/docs/libglabels/tmpl/category.sgml @@ -0,0 +1,55 @@ + +The lglCategory Structure + + +Template category definitions + + + +This section describes a structure for representing a category of stationary and related +functions. + + + + + + + + + + + + +This structure defines a category. + + +@id: Category ID. +@name: Localized category name. + + + + + + +@id: +@name: +@Returns: + + + + + + + +@orig: +@Returns: + + + + + + + +@category: + + diff --git a/docs/libglabels/tmpl/db.sgml b/docs/libglabels/tmpl/db.sgml new file mode 100644 index 00000000..3d5d2de3 --- /dev/null +++ b/docs/libglabels/tmpl/db.sgml @@ -0,0 +1,314 @@ + +Database + + +Database of pre-defined templates + + + +This section describes a set of functions to locate and add templates and related information in +the LibGlabels template database. + + + + + + + + + + + + +This enumeration defines a set of possible return values for lgl_db_register_template(). + + +@LGL_DB_REG_OK: Registration successful. +@LGL_DB_REG_BAD_PAPER_ID: Registration failed because paper id is unknown. +@LGL_DB_REG_BRAND_PART_EXISTS: Registration failed because template with same brand and part name/number already exists. +@LGL_DB_REG_FILE_WRITE_ERROR: Registration failed because an error while writing to disk. + + + + + + + + + + + + + +@Returns: + + + + + + + +@ids: + + + + + + + +@Returns: + + + + + + + +@names: + + + + + + + +@id: +@Returns: + + + + + + + +@name: +@Returns: + + + + + + + +@name: +@Returns: + + + + + + + +@id: +@Returns: + + + + + + + +@id: +@Returns: + + + + + + + +@id: +@Returns: + + + + + + + +@Returns: + + + + + + + +@ids: + + + + + + + +@Returns: + + + + + + + +@names: + + + + + + + +@id: +@Returns: + + + + + + + +@name: +@Returns: + + + + + + + +@name: +@Returns: + + + + + + + +@id: +@Returns: + + + + + + + +@id: +@Returns: + + + + + + + +@paper_id: +@category_id: +@Returns: + + + + + + + +@brands: + + + + + + + +@template: +@Returns: + + + + + + + +@brand: +@part: +@Returns: + + + + + + + +@name: +@Returns: + + + + + + + +@brand: +@paper_id: +@category_id: +@Returns: + + + + + + + +@brand: +@paper_id: +@category_id: +@Returns: + + + + + + + +@names: + + + + + + + +@name: +@Returns: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@template: + + diff --git a/docs/libglabels/tmpl/enums.sgml b/docs/libglabels/tmpl/enums.sgml new file mode 100644 index 00000000..b74f00d1 --- /dev/null +++ b/docs/libglabels/tmpl/enums.sgml @@ -0,0 +1,33 @@ + +Enumerations + + +Common enumerations used by libglabels + + + +This section defines enumerations used to interact with libglabels. + + + + + + + + + + + + +This enumeration defines a set of units of distance supported by the libglabels XML distance +attributes. + + +@LGL_UNITS_POINT: Points. Encoded as "pt" in XML distance attributes. +@LGL_UNITS_INCH: Inches. Encoded as "in" in XML distance attributes. +@LGL_UNITS_MM: Millmeters. Encoded as "mm" in XML distance attributes. +@LGL_UNITS_CM: Centimeters. Encoded as "cm" in XML distance attributes. +@LGL_UNITS_PICA: Picas. Encoded as "pc" in XML distance attributes. +@LGL_UNITS_FIRST: First enumeration. Used for generic iteration through supported units.. +@LGL_UNITS_LAST: Last enumeration. Used for generic iteration through supported units. + diff --git a/docs/libglabels/tmpl/libglabels-unused.sgml b/docs/libglabels/tmpl/libglabels-unused.sgml new file mode 100644 index 00000000..dc089b42 --- /dev/null +++ b/docs/libglabels/tmpl/libglabels-unused.sgml @@ -0,0 +1,1519 @@ + + + + + + + + + + + + + + + + + + + + + +init + + + + + + + + + + + + + + + + + + + + + + + +libglabels + + + + +This section describes a set of functions for constructing new template structures. + + + + + + + + + + +Functions to help create new templates + + + + + + + +Construction Functions + + + + +This section describes a set of functions to locate pre-defined templates and add templates +to the LibGlabels template database. + + + + + + + + + + +Database of pre-defined templates + + + + + + + +Database + + + + +This section describes miscellaneous template functions. + + + + + + + + + + +Miscellaneous template functions + + + + + + + +Miscellaneous Functions + + + + + + + + + + + + + + + + + + + + + + + +template2 + + + + + + + + + + + + + + + + + + + + + + + +template3 + + + + + + + + + + + + + +@id: +@name: + + + + + + +@id: +@name: +@width: +@height: + + + + + + +@name: +@description: +@page_size: +@page_width: +@page_height: +@categories: +@frames: +@aliases: + + + + + + + + + + + + +@shape: +@id: +@layouts: +@markups: + + + + + + +@shape: +@id: +@layouts: +@markups: +@r1: +@r2: +@w: +@h: +@waste: + + + + + + +@shape: +@id: +@layouts: +@markups: +@w: +@h: +@r: +@x_waste: +@y_waste: + + + + + + +@shape: +@id: +@layouts: +@markups: +@r: +@waste: + + + + + + +@GL_TEMPLATE_FRAME_SHAPE_RECT: +@GL_TEMPLATE_FRAME_SHAPE_ROUND: +@GL_TEMPLATE_FRAME_SHAPE_CD: + + + + + + +@GL_TEMPLATE_SHAPE_RECT: +@GL_TEMPLATE_SHAPE_ROUND: +@GL_TEMPLATE_SHAPE_CD: + + + + + + +@id: +@layouts: +@markups: +@shape: + + + + + + +@nx: +@ny: +@x0: +@y0: +@dx: +@dy: + + + + + + + + + + + + +@type: +@x0: +@y0: +@r: + + + + + + +@type: +@x1: +@y1: +@x2: +@y2: + + + + + + +@type: +@size: + + + + + + +@type: +@x1: +@y1: +@w: +@h: +@r: + + + + + + +@GL_TEMPLATE_MARKUP_MARGIN: +@GL_TEMPLATE_MARKUP_LINE: +@GL_TEMPLATE_MARKUP_CIRCLE: +@GL_TEMPLATE_MARKUP_RECT: + + + + + + +@x: +@y: + + + +Enumerations for the units of length supported by libglabels. Internally +all lengths are in points. Externally libglabels supports points ("pt"), +inches ("in"), millimeters ("mm"), centimeters ("cm"), and picas ("pc"). +These units are identical to the absolute length units supported in +the CSS2 Specification (Section 4.3.2). + + +@GL_UNITS_POINT: +@GL_UNITS_INCH: +@GL_UNITS_MM: +@GL_UNITS_CM: +@GL_UNITS_PICA: +@GL_UNITS_FIRST: +@GL_UNITS_LAST: + + + + + + +@orig: +@Returns: + + + + + + +@category: + + + + + + +@names: + + + + + + +@id: +@Returns: + + + + + + +@name: +@Returns: + + + + + + +@Returns: + + + + + + + + + + + + +@name: +@Returns: + + + + + + +@id: +@Returns: + + + + + + +@id: +@name: +@Returns: + + + + + + +@orig: +@Returns: + + + + + + +@paper: + + + + + + +@ids: + + + + + + +@names: + + + + + + +@id: +@Returns: + + + + + + +@name: +@Returns: + + + + + + +@Returns: + + + + + + +@Returns: + + + + + + + + + + + + +@id: +@Returns: + + + + + + +@id: +@Returns: + + + + + + +@name: +@Returns: + + + + + + +@id: +@Returns: + + + + + + +@id: +@name: +@width: +@height: +@Returns: + + + + + + + + + + + + +@template: +@alias: + + + + + + +@template: +@category: + + + + + + +@template: +@frame: + + + + + + +@template: +@label_type: + + + + + + +@frame: +@layout: + + + + + + +@frame: +@markup: + + + + + + +@id: +@r1: +@r2: +@w: +@h: +@waste: +@Returns: + + + + + + +@template: +@category: +@Returns: + + + + + + +@template: +@page_size: +@Returns: + + + + + + +@orig: +@Returns: + + + + + + +@id: +@r1: +@r2: +@w: +@h: +@waste: +@Returns: + + + + + + +@orig_frame: +@Returns: + + + + + + +@frame: + + + + + + +@frame: +@Returns: + + + + + + +@frame: +@Returns: + + + + + + +@frame: +@w: +@h: + + + + + + +@id: +@w: +@h: +@r: +@x_waste: +@y_waste: +@Returns: + + + + + + +@id: +@r: +@waste: +@Returns: + + + + + + +@template: + + + + + + +@names: + + + + + + +@name: +@Returns: + + + + + + +@template: +@Returns: + + + + + + +@template: +@Returns: + + + + + + +@label_type: +@w: +@h: + + + + + + +@label_type: +@Returns: + + + + + + +@page_size: +@Returns: + + + + + + +@page_size: +@category: +@Returns: + + + + + + +@page_size: +@category: +@Returns: + + + + + + +@template: +@Returns: + + + + + + +@label_type: +@Returns: + + + + + + + + + + + + +@orig_ltype: +@Returns: + + + + + + +@ltype: + + + + + + +@orig_layout: +@Returns: + + + + + + +@layout: + + + + + + +@nx: +@ny: +@x0: +@y0: +@dx: +@dy: +@Returns: + + + + + + +@x0: +@y0: +@r: +@Returns: + + + + + + +@orig_markup: +@Returns: + + + + + + +@markup: + + + + + + +@x1: +@y1: +@x2: +@y2: +@Returns: + + + + + + +@size: +@Returns: + + + + + + +@x1: +@y1: +@w: +@h: +@r: +@Returns: + + + + + + +@name: +@description: +@page_size: +@page_width: +@page_height: +@Returns: + + + + + + +@template: + + + + + + + + + + + + +@id: +@w: +@h: +@r: +@x_waste: +@y_waste: +@Returns: + + + + + + +@template: + + + + + + +@id: +@r: +@waste: +@Returns: + + + + + + +@categories_doc: +@Returns: + + + + + + +@category_node: +@Returns: + + + + + + +@utf8_filename: +@Returns: + + + + + + +@node: +@Returns: + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + +@node: +@name: +@Returns: + + + + + + +@paper_node: +@Returns: + + + + + + +@papers_doc: +@Returns: + + + + + + +@utf8_filename: +@Returns: + + + + + + +@units: + + + + + + +@node: +@property: +@val: + + + + + + +@node: +@property: +@val: + + + + + + +@node: +@property: +@val: + + + + + + +@node: +@property: +@val: + + + + + + +@node: +@property: +@val: + + + + + + +@node: +@property: +@val: + + + + + + +@template: +@root: +@ns: + + + + + + +@templates: +@Returns: + + + + + + +@template_node: +@Returns: + + + + + + +@templates_doc: +@Returns: + + + + + + +@utf8_filename: +@Returns: + + + + + + +@template: +@utf8_filename: + + + + + + +@templates: +@utf8_filename: + + + + + + +@ids: + + + + + + +@names: + + + + + + +@id: +@Returns: + + + + + + +@name: +@Returns: + + + + + + +@Returns: + + + + + + +@Returns: + + + + + + + + + + + + +@name: +@Returns: + + + + + + +@id: +@Returns: + + + + + + + + + + + + +@ids: + + + + + + +@names: + + + + + + +@id: +@Returns: + + + + + + +@name: +@Returns: + + + + + + +@Returns: + + + + + + +@Returns: + + + + + + + + + + + + +@id: +@Returns: + + + + + + +@id: +@Returns: + + + + + + +@name: +@Returns: + + + + + + +@id: +@Returns: + + + + + + + + + + + + +@frame: +@layout: + + + + + + +@frame: +@markup: + + + + + + +@brands: + + + + + + +@names: + + + + + + +@name: +@Returns: + + + + + + +@page_size: +@category: +@Returns: + + + + + + +@template: +@Returns: + + + + + + +@brand: +@page_size: +@category: +@Returns: + + + + + + +@brand: +@page_size: +@category: +@Returns: + + + + + + + + + + + + +@template: + + + + + + + + + + + + +@template: + + + + + + +@templates: +@Returns: + diff --git a/docs/libglabels/tmpl/libglabels.sgml b/docs/libglabels/tmpl/libglabels.sgml new file mode 100644 index 00000000..0552a20b --- /dev/null +++ b/docs/libglabels/tmpl/libglabels.sgml @@ -0,0 +1,19 @@ + +libglabels + + + + + + + + + + + + + + + + + diff --git a/docs/libglabels/tmpl/paper.sgml b/docs/libglabels/tmpl/paper.sgml new file mode 100644 index 00000000..fab9ee67 --- /dev/null +++ b/docs/libglabels/tmpl/paper.sgml @@ -0,0 +1,61 @@ + +The lglPaper Structure + + +Paper size definitions + + + +This section describes a structure for representing a paper size definition +and related functions. + + + + + + + + + + + + +This structure defines a paper (page) size. + + +@id: Paper size ID. +@name: Localized paper size name. +@width: Width of paper in points. +@height: Height of paper in points. +@pwg_size: + + + + + + +@id: +@name: +@width: +@height: +@pwg_size: +@Returns: + + + + + + + +@orig: +@Returns: + + + + + + + +@paper: + + diff --git a/docs/libglabels/tmpl/str.sgml b/docs/libglabels/tmpl/str.sgml new file mode 100644 index 00000000..53cbd3b9 --- /dev/null +++ b/docs/libglabels/tmpl/str.sgml @@ -0,0 +1,30 @@ + +String Utility Functions + + +String utility functions provided by libglabels + + + +This section defines string utility functions used by libglabels and of +possible use to a user of libglabels. + + + + + + + + + + + + + + + +@s1: +@s2: +@Returns: + + diff --git a/docs/libglabels/tmpl/template.sgml b/docs/libglabels/tmpl/template.sgml new file mode 100644 index 00000000..e7a58879 --- /dev/null +++ b/docs/libglabels/tmpl/template.sgml @@ -0,0 +1,532 @@ + +The lglTemplate Structure + + +How templates are represented in memory + + + +This section describes a set of structures that represent a template in memory. It also +describes functions to help create and interpret these structures. + + + + + + + + + + + + +This is the main structure of a libglabels template. A template represents a single sheet +of peel-off labels or cards. + + +@brand: Brand name of label or card. E.g. "Avery." +@part: Part name or number of label or card. E.g. "8160." +@description: A description of the template. E.g. "Mailing labels." +@paper_id: A paper ID. E.g. "A4" or "US-Letter." +@page_width: Page width in points. Used only if paper_id is "Other." +@page_height: Page height in points. Used only if paper_id is "Other." +@aliases: A list of alternate names for this template. Often a single template can be used for +multiple products. +@category_ids: A list of category IDs that this template belongs to. +@frames: A list of (#lglTemplateFrame *) structures. GLabels currently only supports one frame +per template -- future versions may support multiple frames per template. + + + +This structure defines an alias for the parent template structure. An alias is used for +different products that can use the same template. + + +@brand: Brand name of label or card. E.g. "Avery." +@part: Part name or number of label or card. E.g. "8160." + + + +This enumeration defines frame types that are supported by libglabels + + +@LGL_TEMPLATE_FRAME_SHAPE_RECT: A rectangular frame. (May have rounded corners.) +@LGL_TEMPLATE_FRAME_SHAPE_ROUND: A round frame. +@LGL_TEMPLATE_FRAME_SHAPE_CD: A CD or DVD frame. (Includes credit-card style CDs.) + + + +A union of all possible frame structures. The type of structure is indicated by the shape +member, which overlays the first field of all other member structures. + + + + + +This structure is composed of a set of fields common to all frame structures. All frame types +can be cast to this structure. + + +@shape: The shape of the frame. +@id: Reserved for future use. Should always be zero. +@layouts: A list of (#lglTemplateLayout *) structures. Typically a frame will have a single +layout, representing a simple grid of labels or cards. If the layout of labels or cards is +more complex, multiple (#lglTemplateLayout *) structures may be needed. +@markups: A list of (#lglTemplateMarkup *) structures, which represent non-printing markup lines. + + + +This structure defines the frame for a rectangular label or card. + + +@shape: Common field. Always #LGL_TEMPLATE_FRAME_SHAPE_RECT for #lglTemplateFrameRect. +@id: Common field. See #lglTemplateFrameAll. +@layouts: Common field. See #lglTemplateFrameAll. +@markups: Common field. See #lglTemplateFrameAll. +@w: Width of label or card in points. +@h: Height of label or card in points. +@r: Radius of corners in points. +@x_waste: Amount of horizontal over-print to allow in points. +@y_waste: Amount of vertical over-print to allow in points. + + + +This structure defines the frame for a round label or card. + + +@shape: Common field. Always #LGL_TEMPLATE_FRAME_SHAPE_ROUND for #lglTemplateFrameRound. +@id: Common field. See #lglTemplateFrameAll. +@layouts: Common field. See #lglTemplateFrameAll. +@markups: Common field. See #lglTemplateFrameAll. +@r: Radius of label or card in points. +@waste: Amount of over-print to allow in points. + + + +This structure defines the frame for a CD or DVD label. This structure also supports +credit-card CD labels. + + +@shape: Common field. Always #LGL_TEMPLATE_FRAME_SHAPE_CD for #lglTemplateFrameCD. +@id: Common field. See #lglTemplateFrameAll. +@layouts: Common field. See #lglTemplateFrameAll. +@markups: Common field. See #lglTemplateFrameAll. +@r1: Outer radius of label in points. +@r2: Radius of center hole in points. +@w: Clip width in points. Used for credit-card CD labels. This field is ignored if zero. +@h: Clip height in points. Used for credit-card CD labels. This field is ignored if zero. +@waste: Amount of over-print to allow in points. + + + +This structure defines a simple grid layout of labels or cards. + + +@nx: Number of labels or cards across in the grid (horizontal). +@ny: Number of labels or cards down in the grid (vertical). +@x0: Distance (in points) from the left edge of page to the left edge of the left column of +cards or labels in the layout. +@y0: Distance (in points) from the top edge of page to the top edge of the top row of +cards or labels in the layout. +@dx: Horizontal pitch of grid in points. This is the distance from left edge to left edge +(not the gap between labels or cards). +@dy: Vertical pitch of grid in points. This is the distance from top edge to top edge +(not the gap between labels or cards). + + + +This enumeration defines markup types that are supported by libglabels + + +@LGL_TEMPLATE_MARKUP_MARGIN: A margin line around perimeter of label or card. +@LGL_TEMPLATE_MARKUP_LINE: A simple line segment. +@LGL_TEMPLATE_MARKUP_CIRCLE: A circle. +@LGL_TEMPLATE_MARKUP_RECT: A rectangle. Possibly with rounded corners. + + + +A union of all possible markup structures. The type of structure is indicated by the type +member, which overlays the first field of all other member structures. + + + + + +This structure defines a simple margin markup around the perimeter of a label or card. + + +@type: Common field. Always #LGL_TEMPLATE_MARKUP_MARGIN for #lglTemplateMarkupMargin. +@size: Distance of margin from edge of label or card. + + + +This structure defines a simple line segment markup. + + +@type: Common field. Always #LGL_TEMPLATE_MARKUP_LINE for #lglTemplateMarkupLine. +@x1: Distance (in points) of first endpoint from left edge of label or card. +@y1: Distance (in points) of first endpoint from top edge of label or card. +@x2: Distance (in points) of second endpoint from left edge of label or card. +@y2: Distance (in points) of second endpoint from top edge of label or card. + + + +This structure defines a simple circle markup. + + +@type: Common field. Always #LGL_TEMPLATE_MARKUP_CIRCLE for #lglTemplateMarkupCircle. +@x0: Distance (in points) of vertex from left edge of label or card. +@y0: Distance (in points) of vertex from top edge of label or card. +@r: Radius of circle in points. + + + +This structure defines a simple rectangle markup. The rectangle can have rounded corners. + + +@type: Common field. Always #LGL_TEMPLATE_MARKUP_RECT for #lglTemplateMarkupRect. +@x1: Distance (in points) of left edge of markup from left edge of label or card. +@y1: Distance (in points) of top edge of markup from top edge of label or card. +@w: Width of rectangle in points. +@h: Height of rectangle in points. +@r: Radius of corners in points. Should be zero for sharp corners. + + + +This structure represents the cartesian coordinates of the origin of a label or card on the page. +The orign is the upper left corner of the extent of the label or card. These coordinates are +relative to the upper left corner of the page. + + +@x: Distance in points from top edge of page. +@y: Distance in points from left edge of page. + + + + + + +@brand: +@part: +@description: +@paper_id: +@page_width: +@page_height: +@Returns: + + + + + + + +@orig_template: +@Returns: + + + + + + + +@template: + + + + + + + +@template: +@category_id: + + + + + + + +@template: +@frame: + + + + + + + +@template: +@alias: + + + + + + + +@template: +@Returns: + + + + + + + +@template1: +@template2: +@Returns: + + + + + + + +@template: +@brand: +@Returns: + + + + + + + +@template: +@paper_id: +@Returns: + + + + + + + +@template: +@category_id: +@Returns: + + + + + + + +@brand: +@part: +@Returns: + + + + + + + +@orig_alias: +@Returns: + + + + + + + +@alias: + + + + + + + +@id: +@w: +@h: +@r: +@x_waste: +@y_waste: +@Returns: + + + + + + + +@id: +@r: +@waste: +@Returns: + + + + + + + +@id: +@r1: +@r2: +@w: +@h: +@waste: +@Returns: + + + + + + + +@orig_frame: +@Returns: + + + + + + + +@frame: + + + + + + + +@frame: +@layout: + + + + + + + +@frame: +@markup: + + + + + + + +@frame: +@w: +@h: + + + + + + + +@frame: +@Returns: + + + + + + + +@frame: +@Returns: + + + + + + + +@nx: +@ny: +@x0: +@y0: +@dx: +@dy: +@Returns: + + + + + + + +@orig_layout: +@Returns: + + + + + + + +@layout: + + + + + + + +@size: +@Returns: + + + + + + + +@x1: +@y1: +@x2: +@y2: +@Returns: + + + + + + + +@x0: +@y0: +@r: +@Returns: + + + + + + + +@x1: +@y1: +@w: +@h: +@r: +@Returns: + + + + + + + +@orig_markup: +@Returns: + + + + + + + +@markup: + + diff --git a/docs/libglabels/tmpl/xml-category.sgml b/docs/libglabels/tmpl/xml-category.sgml new file mode 100644 index 00000000..f22b59ed --- /dev/null +++ b/docs/libglabels/tmpl/xml-category.sgml @@ -0,0 +1,47 @@ + +XML Category Functions + + +Functions to parse glabels XML category definition files + + + +This section describes a number of functions for parsing glabels +XML category definition files. + + + + + + + + + + + + + + + +@utf8_filename: +@Returns: + + + + + + + +@categories_doc: +@Returns: + + + + + + + +@category_node: +@Returns: + + diff --git a/docs/libglabels/tmpl/xml-paper.sgml b/docs/libglabels/tmpl/xml-paper.sgml new file mode 100644 index 00000000..0909d2cf --- /dev/null +++ b/docs/libglabels/tmpl/xml-paper.sgml @@ -0,0 +1,47 @@ + +XML Paper Functions + + +Functions to parse glabels XML paper definition files + + + +This section describes a number of functions for parsing glabels +XML paper definition files. + + + + + + + + + + + + + + + +@utf8_filename: +@Returns: + + + + + + + +@papers_doc: +@Returns: + + + + + + + +@paper_node: +@Returns: + + diff --git a/docs/libglabels/tmpl/xml-template.sgml b/docs/libglabels/tmpl/xml-template.sgml new file mode 100644 index 00000000..071a08ab --- /dev/null +++ b/docs/libglabels/tmpl/xml-template.sgml @@ -0,0 +1,78 @@ + +XML Template Functions + + +Functions to create and parse glabels XML template nodes and files + + + +This section describes a number of functions for creating and parsing +glabels XML template nodes and files. Template nodes are used in both +template files and document files. + + + + + + + + + + + + + + + +@utf8_filename: +@Returns: + + + + + + + +@templates_doc: +@Returns: + + + + + + + +@template_node: +@Returns: + + + + + + + +@templates: +@utf8_filename: +@Returns: + + + + + + + +@template: +@utf8_filename: +@Returns: + + + + + + + +@template: +@root: +@ns: + + diff --git a/docs/libglabels/tmpl/xml.sgml b/docs/libglabels/tmpl/xml.sgml new file mode 100644 index 00000000..e0803379 --- /dev/null +++ b/docs/libglabels/tmpl/xml.sgml @@ -0,0 +1,194 @@ + +XML Helper Functions + + +Functions to help format and parse glabels XML properties + + + +This section describes a number of "helper" functions for formatting and +parsing various types of properties for tags in glabels XML file formats. + + +These functions are basically wrappers to functions from libxml2. + + + + + + + + + + + + + + + + + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + + +@node: +@property: +@default_val: +@Returns: + + + + + + + +@node: +@property: +@val: + + + + + + + +@node: +@property: +@val: + + + + + + + +@node: +@property: +@val: + + + + + + + +@node: +@property: +@val: + + + + + + + +@node: +@property: +@val: + + + + + + + +@node: +@property: +@val: + + + + + + + +@node: +@name: +@Returns: + + + + + + + +@node: +@Returns: + + + + + + + +@units: + + diff --git a/glabels.spec.in b/glabels.spec.in new file mode 100644 index 00000000..6050b0d6 --- /dev/null +++ b/glabels.spec.in @@ -0,0 +1,106 @@ +Summary: glabels is a GNOME program to create labels and business cards +Name: glabels +Version: @VERSION@ +Release: 1 +License: GPL +Group: Applications/Publishing +URL: http://glabels.sourceforge.net/ + +Source: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/root-%{name}-%{version} +Prefix: %{_prefix} + +BuildRequires: gtk2-devel >= @GTK_REQUIRED@ +BuildRequires: libxml2-devel >= @LIBXML_REQUIRED@ +BuildRequires: libgnomeui-devel >= @LIBGNOMEUI_REQUIRED@ +BuildRequires: libglade2-devel >= @LIBGLADE_REQUIRED@ + +Requires: gtk2 >= @GTK_REQUIRED@ +Requires: libxml2 >= @LIBXML_REQUIRED@ +Requires: libgnomeui >= @LIBGNOMEUI_REQUIRED@ +Requires: libglade2 >= @LIBGLADE_REQUIRED@ + +%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 +%configure +%{__make} %{?_smp_mflags} + +%install +%{__rm} -rf %{buildroot} +%makeinstall +%find_lang %{name} + +desktop-file-install --vendor gnome --delete-original \ + --add-category X-Red-Hat-Base \ + --dir %{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/%{name}.desktop + +%{__rm} -rf %{buildroot}/var/scrollkeeper +%{__rm} -f %{buildroot}%{_datadir}/mime/XMLnamespaces +%{__rm} -f %{buildroot}%{_datadir}/mime/globs +%{__rm} -f %{buildroot}%{_datadir}/mime/magic +%{__rm} -f %{buildroot}%{_datadir}/mime/mime.cache +%{__rm} -rf %{buildroot}%{_datadir}/mime/application +%{__rm} -rf %{buildroot}%{_datadir}/mime/aliases +%{__rm} -rf %{buildroot}%{_datadir}/mime/subclasses + + +%clean +%{__rm} -rf %{buildroot} + +%post +scrollkeeper-update +if (update-mime-database -v &> /dev/null); then + update-mime-database "%{_datadir}/mime" > /dev/null +fi + +%postun +scrollkeeper-update +if (update-mime-database -v &> /dev/null); then + update-mime-database "%{_datadir}/mime" > /dev/null +fi + +%files -f %{name}.lang +%defattr(-, root, root) +%doc README COPYING.README_FIRST COPYING COPYING-DOCS COPYING-LIBGLABELS ChangeLog NEWS AUTHORS INSTALL +%doc %{_datadir}/gnome/help/glabels/ +%{_bindir}/glabels +%{_bindir}/glabels-batch +%{_libdir}/libglabels.* +%{_libdir}/pkgconfig/libglabels.pc +%{_includedir}/libglabels/* +%{_datadir}/glabels/ +%{_datadir}/pixmaps/* +%{_datadir}/omf/ +%{_datadir}/applications/*.desktop +%{_datadir}/application-registry/* +%{_datadir}/mime-info/* +%{_datadir}/mime/packages/* +%{_datadir}/man/* +%{_datadir}/gtk-doc/html/libglabels/* + +%changelog +* Sun Aug 8 2004 Jim Evins +- Added support for freedesktop.org mime database registration + +* Sat Feb 21 2004 Jim Evins +- Added libglabels related files + +* Tue Dec 23 2003 Jim Evins +- Added support for scrollkeeper + +* Sat Oct 18 2003 Jim Evins +- Updated, based largely on Dag Wieers glabels.spec + +* Sat May 19 2001 Jim Evins +- Created + diff --git a/glabels1/ABOUT-NLS b/glabels1/ABOUT-NLS deleted file mode 100644 index 022965c6..00000000 --- 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 30c7f15f..00000000 --- a/glabels1/AUTHORS +++ /dev/null @@ -1,69 +0,0 @@ -gLabels Author -============== - -Jim Evins - -Acknowledgments -=============== - -nestor di -- Contributed the excellent splash -screen new in 0.4.3. - -Alessandro Rubini -- 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 -- French translations -Marcus Bauer -- German translations -Takeshi AIHANA -- Japanese translations -Paulo Rogério Ormenese -- Brazilian Portuguese trans. -Víctor Moral -- Spanish translations -Vitaly Lipatov -- Russian translations -Shell, Hin-lik Hung -- Chinese Translations -Arkadiusz Lipiec -- Polish Translations - -The following people have submitted label templates or information about -particular products in the data/predefined-labels.template file: - - Hap - Olivier Berger - Marcus Bauer - Jochen Hein - Jonathan Buzzard - Jeff Davis - Ludger Solbach - Darren Ross - George Mitchell - Douglas Bollinger - Tim Jackson - John Stoffel - Dany De Bontridder - Andy Longton - Bostjan Muller - John Helms - no-exit - Mozilla from marela - Holger - Bill Tihen - Dan Gray - Keith Hudson - Tamas Bondar - George Mitchell - Erich Pfennig - Gwen Patton - Miek Gieben - Joerg Schmitz-Linneweber - David Makovský - Oliver Schwank - Akkana - Ted Poe - hans-helmut.belter - Uli Wachowitz - Stephan Hegel - Holger Reinmann - Michael Wojciechowski - Jim Mueller - -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 d60c31a9..00000000 --- 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. - - - Copyright (C) - - 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. - - , 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 3fbdc21a..00000000 --- a/glabels1/ChangeLog +++ /dev/null @@ -1,8 +0,0 @@ -2002-08-24 gettextize - - * 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 b42a17ac..00000000 --- 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 56db8cff..00000000 --- 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 e69de29b..00000000 diff --git a/glabels1/README b/glabels1/README deleted file mode 100644 index cc3c6a92..00000000 --- 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 abfa27bf..00000000 --- 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 c6f3e036..00000000 --- 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 d10efeef..00000000 --- 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>>, <<[^ ]>>, <<>>), <<>>, -<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, -<>; 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 -#include -#include -#include -/* 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 -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 -#include -#include - -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 -#include -], [ 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 , 1995. -# -# Modified to never use included libintl. -# Owen Taylor , 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 ], [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 in the installed 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 " - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header . 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 , 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 , 1995. - -# Check whether LC_MESSAGES is available in . - -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 ], [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 file defines LC_MESSAGES.]) - fi - fi]) - diff --git a/glabels1/autogen.sh b/glabels1/autogen.sh deleted file mode 100755 index 36a7320f..00000000 --- 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 a43ea212..00000000 --- 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. - - - Copyright (C) 19yy - - 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. - - , 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 024706de..00000000 --- a/glabels1/barcode-0.98/ChangeLog +++ /dev/null @@ -1,460 +0,0 @@ -2002-03-01 Alessandro Rubini - - * 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 - - * barcode.spec: new file - -2002-02-27 Alessandro Rubini - - * bookland/bookland.py: updated to version 0.92 by Judah Milgram - -2001-11-13 Alessandro Rubini - - * README: Added a pointer to the Windows port. - -2001-11-09 Cloyce D. Spradling - - * 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 - - * pcl.c (Barcode_pcl_print): bugfix: bars were misplaced - -2001-10-16 Nathan D. Holmes - - ====> 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * sample.c (main): added upc-e and ean-8 samples - -2001-08-11 Boszormenyi Zoltan - - * ps.c (Barcode_ps_print): don't output "showpage" in EPS mode - -2001-08-11 Alessandro Rubini - - * README: Changed host names, added barcode-commit list. - -2000-11-29 Alessandro Rubini - - * doc/doc.barcode (The Field List): 1pt == 0.352mm, not 0.0352 - (thanks to Stephen Irven for reporting) - -2000-11-09 Alessandro Rubini - - ====> 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 - - * 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 - - * 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 - - * 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 - - * contrib/barcodeps-0.1.tgz: new file, sent to Alessandro on Oct 7 - -2000-10-10 Alessandro Rubini - - * 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 - - * ps.c (Barcode_ps_print): add a backslash in front of '(' too. - Suggested by H Y . - (Barcode_ps_print): use ps arrays to get compact (and prettier) - PostScript output. Suggested by Hans Schou . - - * main.c (get_geometry): accept "+offset+offset" to keep default size. - Suggested by Godmar Back . - -2000-09-16 Alessandro Rubini - - * ps.c (Barcode_ps_print): use "half text height" instead of - "two text heights" as minimum bar height. Suggested by - Oliver Vecernik . - -2000-09-14 Alessandro Rubini - - * barcode.h: added the standard ``extern "C"'' stuff for C++ - (bug reported by Dany Pardo ) - -2000-09-08 Andrea Ferraris - - * 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 - - * i25.c (Barcode_i25_encode): fixed checksum calculation - (thanks to Hans Schou for reporting) - -2000-05-19 Alessandro Rubini - - ====> 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 - - * 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 - - * doc/Makefile: modified to build with both gmake and pmake - - * Makefile: modified to build with both gmake and pmake - -2000-04-20 Alessandro Rubini - - * 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 - - * 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 - -====> Version 0.95 released to ftp.prosa.it and ftp.gnu.org - -2000-01-26 Alessandro Rubini - - * code128.c (Barcode_128_encode): new encoding: full-featured code128 - - * README: added reference to original ftp site - -2000-01-05 Alessandro Rubini - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * main.c (main): print tables: y used xmargin (Tim Withers,Jon Bakken) - -1999-09-06 Alessandro Rubini - - * 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 - - * 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 - - * main.c (strerror): replacement strerror selected by autoconf - -1999-08-06 Alessandro Rubini - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 5a6cb878..00000000 --- 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 848aa265..00000000 --- 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 d3ae2a7f..00000000 --- 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 c91c79cf..00000000 --- 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 6b9bdf4e..00000000 --- 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 - -#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 eccb6026..00000000 --- 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 373587cb..00000000 --- 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=] [-s|--height=] [-r|--reduction=] [-o|outfile=] [-z|--quietzone] [| ]" - 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 a69a825b..00000000 --- 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 -#include -#include - -#ifdef NO_GETOPT - /* use replacement */ - #include "compat/getopt.h" -#else - #include -#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 ? "" : " ", 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 69319915..00000000 --- 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 7065b9ea..00000000 --- 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 -#include -#include -#include -#include - -#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; ierror = 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 cebba54c..00000000 --- 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 -#include -#include -#include -#include - -#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; ierror = 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 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 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 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 3308c950..00000000 --- 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 -#include -#include -#include -#include - -#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 73f8cee3..00000000 --- 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 -#include -#include -#include -#include - -#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; iflags & 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 91f00b55..00000000 --- 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 . - Ditto for AIX 3.2 and . */ -#ifndef _NO_PROTO -#define _NO_PROTO -#endif - -#ifdef HAVE_CONFIG_H -#include -#endif - -#if !defined (__STDC__) || !__STDC__ -/* This is a separate conditional since some stdc systems - reject `defined (const)'. */ -#ifndef const -#define const -#endif -#endif - -#include - -/* 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 -#if defined (_LIBC) || defined (HAVE_UNISTD_H) -#include -#endif -#endif /* GNU C library. */ - -#ifdef VMS -#include -#if HAVE_STRING_H - 0 -#include -#endif -#endif - -#ifdef WIN32 -/* It's not Unix, really. See? Capital letters. */ -#include -#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 -# 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 -#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 952f4830..00000000 --- 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 81f79e08..00000000 --- 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 <&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 < -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 < -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 < -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 -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 -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 -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 <&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 < -/* 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 < -/* 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 <&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 </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 < 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 <> $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 <> $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 </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 < 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 <> $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 <> $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 07120b48..00000000 --- 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 deleted file mode 100644 index 69df9562..00000000 Binary files a/glabels1/barcode-0.98/contrib/barcode-SVG.tar.gz and /dev/null differ 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 1608ebaf..00000000 --- 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 deleted file mode 100644 index cbc8e676..00000000 Binary files a/glabels1/barcode-0.98/contrib/barcode-for-delphi.tar.gz and /dev/null differ 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 36d216d7..00000000 --- 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 . diff --git a/glabels1/barcode-0.98/contrib/barcodeps-0.1.tgz b/glabels1/barcode-0.98/contrib/barcodeps-0.1.tgz deleted file mode 100644 index 1dadb1c6..00000000 Binary files a/glabels1/barcode-0.98/contrib/barcodeps-0.1.tgz and /dev/null differ 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 b0364f6e..00000000 --- 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 deleted file mode 100644 index 91fa9e6a..00000000 Binary files a/glabels1/barcode-0.98/contrib/grab-0.0.4.tar.gz and /dev/null differ 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 4a048075..00000000 --- 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 7223023a..00000000 --- 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 b43e686f..00000000 --- a/glabels1/barcode-0.98/debian/changelog +++ /dev/null @@ -1,27 +0,0 @@ -barcode (0.98) unstable; urgency=low - - * New upstream release - - -- Alessandro Rubini Fri, 1 Mar 2002 23:04:14 +0100 - -barcode (0.96) unstable; urgency=low - - * New upstream release - - -- Alessandro Rubini Wed, 8 Nov 2000 18:29:18 +0200 - -barcode (0.95) unstable; urgency=low - - * New upstream release - - -- Alessandro Rubini Thu, 3 Feb 2000 21:16:59 +0200 - -barcode (0.94) unstable; urgency=low - - * Initial Release. - - -- Alessandro Rubini 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 aacbfd49..00000000 --- a/glabels1/barcode-0.98/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: barcode -Section: misc -Priority: optional -Maintainer: Alessandro Rubini -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 c193af2c..00000000 --- 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 6822e402..00000000 --- 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 18336bfb..00000000 --- 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 c48c5a1c..00000000 --- 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 dae8f6b6..00000000 --- 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 5af5490f..00000000 --- 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 693ca798..00000000 --- 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 "[ x ] [+ - + ]" (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 - " x [+ + [- - [- ]]]" (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 "," 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 deleted file mode 100644 index d7f66cbb..00000000 Binary files a/glabels1/barcode-0.98/doc/barcode.pdf and /dev/null differ diff --git a/glabels1/barcode-0.98/doc/barcode.ps b/glabels1/barcode-0.98/doc/barcode.ps deleted file mode 100644 index 6e2db98c..00000000 --- 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 D97 DI<923807FF80037F13F00203B512FC02 -0F80023F8091B500031380499038F8007F010701E0EBFFC049EB800149495A49485B495A -49485B5A485BA248491580180048496D5A486F5A93C8FC485BA35A91CAFCA3B5FC5BA45B -A65B17036C6CED0780170FEF3FC0003F167F6DEC01FF001F4B13806C6C021F13006C6DEB -7FFC6C9039F00FFFF86C90B612E06C5E013F4AC7FC010F14F0010049C8FC323773B540> -II<923807FF8092B512E0020714F8021F80027F80903A01FFFE03FF49D9F000 -13804901C0EB7FC0495B013F90C7123F495A495A5C5A485B4849147F18804816FF4A4913 -00485DEE0FFE4849EB7FFC923807FFF891B612E0485E94C7FC16F04BC8FCB5CAFC5BA45B -A7007F1603EF0780170F003FEE3FC0177F6C6CEC01FF4C13806C6C021F13006C01C0EB7F -FC6C9039F00FFFF86C90B612E06C6C5D6D4AC7FC010714F09026007FFEC8FC323773B540 ->I<923807FFC0037F13FC0203B6FC020F15C0023F8191B5000313F8499039F8007FFC01 -0701E0133F4901806D7E4990C76C7E49481680495A4948804818C0485BA2485BA248494A -13E05AA2485BA24D13C05A91C8FCA25FB517805BA25F19005B6017FF605E60495E5E6C6C -4A5B604C5B003F4B90C7FC6D4A5A001F4B5A6C6C4A5A6CD980035B6CD9F01F13C06C90B6 -5A6C4BC8FC013F14F0010F14C0010001F8C9FC3B3773B547>111 -D114 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fb cmsy10 10.95 1 -/Fb 1 16 df15 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fc cmb10 10.95 10 -/Fc 10 115 df97 D<13FFB5FCA512077EAF4AB4FC020F13E0 -023F13F891B57E9138FE07FFDAF8011380DAE00013C05C4AEB7FE017F0A3EE3FF8A317FC -AC17F8A3EE7FF0A217E06E13FF17C06E481380DAF80313009138FE0FFE9039FC7FFFFC49 -6C13F0496C13C0C7D803FEC7FC2E407FBE33>II<16FF92B5FCA5150781AFEB01FF011F -13E3017F13FB90B7FC4813C148EB003F48487F48487F001F805B123FA2485AA312FFAC12 -7FA36C7EA3001F5C6C6C5B00074A13806D4913FC2603FF83B5FCC690B6FC6D13F7011F13 -C7903A03FE07FC002E407DBE33>I<49B47E010F13F0013F7F90B512FE48EBC3FF480100 -13804848EB7FC04848133F001F15E05B003FEC1FF0A2485A150F16F8A212FFA290B6FCA4 -01F0C8FCA5127FA37F003F15F8A26C6C1301000F15F06D13036C6CEB07E06C9038800FC0 -6C9038F07F806C6CB512006D5B010F13F8010013C0252B7EA92A>I103 -D105 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 df97 -DII<963803FFC0061FB512E06060A47214C0F000 -1F61A21B80A261A21B00A296B5FCA262A260A262A260A262A260A262A260A2DCFFE05C03 -0F13FC037FEBFF1F4AB6129F020792B55A4AEBE07F023FEB000F4A487F4948486D5C4913 -F04981495B49496D91C7FC495B5B92C8FC90B55E485B5F485B4860A248495CA248605C5F -5A4A5EA2485EA24A5EA2B55DA24A5EA25FA291C85CA24DEC3F801A7F19005B94B513FFA2 -4E1400A24C5C007F614C13FC4C1403003F4B5D6D4A14076C4B5D6C6D49140F4BB55C6CD9 -C007013F495A6C9026F03FFEEBFE3FC690B5D8F81FB55A6DDAF0075C011FDAC00349C7FC -010749C75B9026007FF0EC1FF04B6571E355>II<93381FFF804BB512F8031F14FF -037F15C04AB77E0207D9FC0313F8021FD9E0007F4A0180EB3FFEDAFFFEC76C7E49491680 -49496E13C0495B49496E13E0495B494916F05B90B5C87E1AF8485B485F5C5A5C5AA2485B -605A5CA2485FA24A17F0A2B55EA24A17E0A2601AC091C9FC95B51280A21A005F615F495F -4D5B127F6D4B5B616C4C5B4D5B6C6D4A90C7FC4D5A6C6D495B6C4B5B6C6D010F13E06C01 -F8013F5B6CD9FE01B5C8FC013FB612FC6D15F0010715C0010002FCC9FC020F13C0454271 -C055>111 D114 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fe cmbxti10 13.15 11 -/Fe 11 120 df97 D99 D<943801FF800403B512C05E1980A282EE000F1900A25FA260A2173FA260 -A2177FA260A217FFA260A25EEDFFC1020701F15B023F13FD91B7FC4913E00107D9003F5B -49487F49487F495A49486D5B495A485D5C4894C7FC5A4A5B5A91C75B5A163FA248485DA2 -167F127F495DA216FF12FF495DA25D181E49EDE03FA24B5C187E17C0A2007F5F5D4B1380 -003F4AEB81F85D6C6C49EB83F06C6C48B55B2707FE0FFC13CF6CB539F07FFFC06C4A6C5B -6C6CD9800F90C7FC903A0FFC0003FC3A4D75CB41>III104 D<15F8EC03FC4A7E4A7EA25CA35DA25D6E -5AEC03E091C8FCAEEB07F8EB1FFEEB7FFF90B57E3901FC7FC0D803F07FEA07E0D80FC07F -A2381F80FFA2485A5B007E5CA25B00FE5C485A007C5C12005B92C7FCA25B5C133F5CA213 -7F5CA213FFECF00F48EC1F8014E0153F48150014C05D48147E14805D14816CEB01F84A5A -4A5A6CEB1FC06CEBFF806D90C7FC6D5AEB07F0214E78CC27>I108 D<913801FFC0021F13F8027F13FE91B6FC4901001380D903FCEB3F -C0D907F0130F010FEC3FE04948137F4A13FF133FA2017F4913C0A26F138017006E137E02 -FC90C7FCECFFC015FE6F7E16E06D80826D807F6D80010180EB003F1403EC003FD803C013 -0FD80FE01303EA3FF0486C7FA200FF5DA34B5A5B49495A495C49130F6CC7485AD83FC0EB -7FC03A1FF803FF806CB548C7FC6C14F8000114E026001FFEC8FC2B3377B135>115 -DI119 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Ff cmbx12 13.14 13 -/Ff 13 117 df<923807FFE092B512FC020714FF021F81027F9038007FC0902601FFF0EB -0FE04901C0497E4990C7487ED90FFC147F011F824A14FF495AA2137F5CA2715A715A715A -EF078094C8FCA7EF07FCB9FCA526007FF0C7123F171FB3B3A2003FB5D8E00FB512F8A53D -4D7ECC44>12 D46 D85 D97 -D100 -DII104 D108 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 -DI40 -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 DIIII<167C4BB4FC923807C78092380F83C0ED1F87161FED3F3FA2157EA21780EE0E004BC7 -FCA414015DA414035DA30103B512F8A390260007E0C7FCA3140F5DA5141F5DA4143F92C8 -FCA45C147EA414FE5CA413015CA4495AA4495AA4495A121E127F5C12FF49C9FCA2EAFE1E -EAF83C1270EA7878EA3FE0EA0F802A5383BF1C>III<1478EB01FCA21303A314F8EB00E01400AD137C48B4 -FC38038F80EA0707000E13C0121E121CEA3C0F1238A2EA781F00701380A2EAF03F140012 -005B137E13FE5BA212015BA212035B1438120713E0000F1378EBC070A214F0EB80E0A2EB -81C01383148038078700EA03FEEA00F8163E79BC1C>I108 DIII<90 -3903E001F890390FF807FE903A1E7C1E0F80903A1C3E3C07C0013C137801389038E003E0 -EB783F017001C013F0ED80019038F07F0001E015F8147E1603000113FEA2C75AA2010114 -0717F05CA20103140F17E05CA20107EC1FC0A24A1480163F010F15005E167E5E131F4B5A -6E485A4B5A90393FB80F80DA9C1FC7FCEC0FFCEC03E049C9FCA2137EA213FEA25BA21201 -A25BA21203A2387FFFE0B5FCA22D3A80A72E>I114 DI< -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 DII<01061403D90780131F90390FF801FE91B512FC16F816F016E0168049EB -FE0015F890381C7FC091C8FCA3133C1338A513781370A2EC1FE0ECFFF8903873E03E9038 -FF001F01FCEB0F804914C049EB07E04914F049130390C7FC16F8A61507A21206EA3F8048 -7EA2150F00FF15F0A24914E090C7121F00FC15C000F0143F00701580ED7F0012786C14FE -4A5A6C495A390F800FE03907E03FC06CB5C7FCC613FCEB1FE0283F7ABC2D>53 -D56 DI<17E016011603831607A2160FA2161F83163FA2167F167716F7EEE7FCED -01E316C3150316831507EE03FEED0F01150E151E151C153C03387FED7800157015F05D4A -4880177F4A5AA24AC7FCA2020E81173F5C021FB6FC5CA20270C7EA3FE0171F5CA2495AA2 -494881170F49C8FCA2130EA24982013C1507A2137CD801FE4B7E2607FF80EC3FFEB500F0 -0107B512FC19F85E3E417DC044>65 D<013FB7FC18E018FC903B007FE00007FE6E489038 -01FF809438007FC05DF03FE0F01FF0A3027F16F892C8FCA54A16F04A153F19E0187F19C0 -F0FF8001014B13004A4A5A4D5AEF1FF04D5ADC03FFC7FC49B612F8EFFF8002F8C7EA3FE0 -EF0FF0EF07FC717E010715014A81711380A319C0130F5CA5011F4B13805C19005F601707 -013F4B5A4A4A5A4D5A4D5A017F913801FF8001FF020F90C7FCB812FC17F094C8FC3D3E7D -BD40>II<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 D85 D97 DIIIII<1478EB01FE130314FF -A25B14FE130314FCEB00F01400ACEB03F8EA01FF14F0A2EA001F130FA314E0A5131F14C0 -A5133F1480A5137F1400A55B5BA4EA03FF007F13F0A2B5FC183E7DBD1A>105 -D<143FEB1FFF5BA213017FA214FEA5130114FCA5130314F8A5130714F0A5130F14E0A513 -1F14C0A5133F1480A5137F1400A55B5BA4EA03FF007F13F8A2B5FC183F7DBE1A>108 -D<903907F007F8D803FFEB1FFF9139E0781FC09138E1E00F3B001FE38007E090380FE700 -02EE14F014FC14D814F85CA24A130F131F4A14E0A4161F133F4A14C0A4163F137F91C713 -80A4167F5B491500A300015D486C491380B5D8F87F13FCA32E287DA733>110 -DI<903907F01F80D803FFEB7FE09138E1E1F09138E387F83900 -1FE707EB0FE614EE02FC13F002D813E09138F801804AC7FCA25C131FA25CA4133F5CA513 -7F91C8FCA55B5BA31201487EB512FEA325287EA724>114 D<9138FF81C0010713E39038 -1F807F90397C003F8049131F4848130F5B00031407A248481400A27FA27F6D90C7FCEBFF -8014FC6C13FF6C14C015F06C6C7F011F7F13079038007FFE1403140100381300157EA212 -3C153E157E007C147CA2007E147815F8007F495A4A5A486C485A26F9E01FC7FC38E0FFFC -38C01FE0222A7DA824>II118 DI<90B539E007FFF05E18E0902707FE000313006D48EB01 -FC705A5F01014A5A5F16036E5C0100140794C7FC160E805E805E1678ED8070023F13F05E -ED81C015C191381FC38015C793C8FC15EF15EEEC0FFCA25DA26E5AA25DA26E5A5DA24AC9 -FC5C140E141E141C5C121C003F5B5A485B495A130300FE5B4848CAFCEA701EEA783CEA3F -F0EA0FC0343A80A630>121 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fi cmbx12 17.28 43 -/Fi 43 122 df46 D<16F04B7E1507151F153FEC01FF1407 -147F010FB5FCB7FCA41487EBF007C7FCB3B3B3B3007FB91280A6395E74DD51>49 -D<913801FFF8021FEBFFC091B612F8010315FF010F16C0013F8290267FFC0114F89027FF -E0003F7F4890C7000F7F48486E7FD807F86E148048486E14C048486E14E048486F13F001 -FC17F8486C816D17FC6E80B56C16FE8380A219FFA283A36C5BA26C5B6C90C8FCD807FC5D -EA01F0CA14FEA34D13FCA219F85F19F04D13E0A294B512C019804C14004C5B604C5B4C5B -604C13804C90C7FC4C5A4C5A4B13F05F4B13804B90C8FC4B5AED1FF84B5A4B5A4B48143F -4A5B4A48C8FC4A5A4A48157E4A5A4A5AEC7F8092C9FC02FE16FE495A495A4948ED01FCD9 -0FC0150749B8FC5B5B90B9FC5A4818F85A5A5A5A5ABAFCA219F0A4405E78DD51>I<92B5 -FC020F14F8023F14FF49B712C04916F0010FD9C01F13FC90271FFC00077FD93FE001017F -49486D8049C86C7F484883486C6F7F14C0486D826E806E82487FA4805CA36C5E4A5E6C5B -6C5B6C495E011FC85A90C95CA294B55A614C91C7FC604C5B4C5B4C5B4C5B047F13809226 -0FFFFEC8FC020FB512F817E094C9FC17F817FF91C7003F13E0040713F8040113FE707F71 -7F7113E085717FA2717F85A285831A80A31AC0EA03FCEA0FFF487F487F487FA2B57EA31A -80A34D14005C7E4A5E5F6C495E49C8485BD81FF85F000F5ED807FE92B55A6C6C6C491480 -6C01F0010791C7FC6C9026FF803F5B6D90B65A011F16F0010716C001014BC8FCD9001F14 -F0020149C9FC426079DD51>II<01C0EE01C0D801F8160F01FF167F02F0EC07FFDAFF8090B5FC92B712 -8019006060606060606095C7FC17FC5F17E0178004FCC8FC16E09026FC3FFCC9FC91CBFC -ADED3FFE0203B512F0020F14FE023F6E7E91B712E001FDD9E00F7F9027FFFE00037F02F8 -01007F02E06EB4FC02806E138091C8FC496F13C04917E07113F0EA00F090C914F8A219FC -83A219FEA419FFA3EA03F0EA0FFC487E487E487FA2B57EA319FEA35C4D13FC6C90C8FC5B -4917F8EA3FF001804B13F06D17E0001F5E6C6C17C06D4B1380D807FC92B512006C6C4A5B -6C6C6C01075B6C01E0011F5BD97FFE90B55A6DB712C0010F93C7FC6D15FC010115F0D900 -3F1480020301F0C8FC406078DD51>III<92383FFF800203B512FC021FECFF80027F -15E049B712F849D9F0077F010F90C76C7ED91FFCEC1FFFD93FF06E7F494802037F494882 -717F484980854890C9127FA24884183FA25A80A380806E157F6E5E14FE6E7E6F4A5A6C14 -F003FC495B03FF495B6C1580DCE0075B6CDBF80F90C7FC9338FE1FFE6C9238FF7FF84D5A -6D16C06D5E6D4BC8FC6D6F7E6D16E00101826D16FC023F814A8149B87E01078349839026 -3FFE3F8190267FFC0F819026FFF003814849C6FC48496D804849131F4890C70007801601 -48486E1580003F163F49150F007F7014C0491501717E8400FF835B8484A384A21A80A27F -007F1900607F003F606D160F001F606D4C5A6C6D153F6C6D4B5A6C01F04B5A6C01FC0203 -5B6C01FF021F5B6D9027F001FFFEC7FC6D90B65A010F16F001035E010093C8FC020F14F8 -DA007F90C9FC426079DD51>I66 D<4DB5ED03C0057F02F01407 -0407B600FE140F047FDBFFC0131F4BB800F0133F030F05FC137F033F9127F8007FFE13FF -92B6C73807FF814A02F0020113C3020702C09138007FE74A91C9001FB5FC023F01FC1607 -4A01F08291B54882490280824991CB7E49498449498449498449865D49498490B5FC484A -84A2484A84A24891CD127FA25A4A1A3F5AA348491A1FA44899C7FCA25CA3B5FCB07EA380 -A27EA2F50FC0A26C7FA37E6E1A1F6C1D80A26C801D3F6C6E1A00A26C6E616D1BFE6D7F6F -4E5A7F6D6D4E5A6D6D4E5A6D6D4E5A6D6E171F6D02E04D5A6E6DEFFF806E01FC4C90C7FC -020F01FFEE07FE6E02C0ED1FF8020102F8ED7FF06E02FF913803FFE0033F02F8013F1380 -030F91B648C8FC030117F86F6C16E004071680DC007F02F8C9FC050191CAFC626677E375 ->IIII73 D76 D<94381FFFE00407B67E043F15F04BB712FE030F -EEFFC0033FD9FC0014F092B500C0010F13FC020349C7000113FF4A01F86E6C7F021F496F -13E04A01C0030F7F4A496F7F91B5C96C7F0103497013FF494970804B834949717F498749 -49717F49874B8390B586484A717FA24891CB6C7FA2481D804A84481DC0A348497214E0A3 -481DF0A34A85481DF8A5B51CFCB06C1DF8A36E96B5FCA36C1DF0A46C6D4E14E0A36C1DC0 -6E606C1D80A26C6E4D1400A26C6E4D5BA26C6E4D5BA26D6D4D5B6D636D6D4D5B6F94B5FC -6D636D6D4C5C6D6D4C91C7FC6D6E4B5B6D02E0031F5B023F6D4B13F06E01FC92B55A6E01 -FF02035C020302C0010F91C8FC020002FC90B512FC033F90B712F0030F17C0030394C9FC -DB007F15F804071580DC001F01E0CAFC666677E379>79 DI83 D<001FBEFCA64849C79126E0000F -148002E0180091C8171F498601F81A0349864986A2491B7FA2491B3F007F1DC090C9181F -A4007E1C0FA600FE1DE0481C07A5CA95C7FCB3B3B3A3021FBAFCA663617AE070>II<913803FFFE027FEBFF -F00103B612FE010F6F7E4916E090273FFE001F7FD97FE001077FD9FFF801017F486D6D7F -717E486D6E7F85717FA2717FA36C496E7FA26C5B6D5AEB1FC090C9FCA74BB6FC157F0207 -B7FC147F49B61207010F14C0013FEBFE004913F048B512C04891C7FC485B4813F85A5C48 -5B5A5CA2B55AA45FA25F806C5E806C047D7F6EEB01F96C6DD903F1EBFF806C01FED90FE1 -14FF6C9027FFC07FC01580000191B5487E6C6C4B7E011F02FC130F010302F001011400D9 -001F90CBFC49437CC14E>97 D<903807FF80B6FCA6C6FC7F7FB3A8EFFFF8040FEBFF8004 -7F14F00381B612FC038715FF038F010014C0DBBFF0011F7FDBFFC001077F93C76C7F4B02 -007F03F8824B6F7E4B6F13804B17C0851BE0A27313F0A21BF8A37313FCA41BFEAE1BFCA4 -4F13F8A31BF0A24F13E0A24F13C06F17804F1300816F4B5A6F4A5B4AB402075B4A6C6C49 -5B9126F83FE0013F13C09127F00FFC03B55A4A6CB648C7FCDAC00115F84A6C15E091C700 -1F91C8FC90C8000313E04F657BE35A>I<92380FFFF04AB67E020F15F0023F15FC91B77E -01039039FE001FFF4901F8010113804901E0010713C04901804913E0017F90C7FC49484A -13F0A2485B485B5A5C5A7113E0485B7113C048701380943800FE0095C7FC485BA4B5FCAE -7EA280A27EA2806C18FCA26C6D150119F87E6C6D15036EED07F06C18E06C6D150F6D6DEC -1FC06D01E0EC7F806D6DECFF00010701FCEB03FE6D9039FFC03FFC010091B512F0023F5D -020F1580020102FCC7FCDA000F13C03E437BC148>II<92380FFFC04AB512FC020FECFF8002 -3F15E091B712F80103D9FE037F499039F0007FFF011F01C0011F7F49496D7F4990C76C7F -49486E7F48498048844A804884485B727E5A5C48717EA35A5C721380A2B5FCA391B9FCA4 -1A0002C0CBFCA67EA380A27EA27E6E160FF11F806C183F6C7FF17F006C7F6C6D16FE6C17 -016D6C4B5A6D6D4A5A6D01E04A5A6D6DEC3FE0010301FC49B45A6D9026FFC01F90C7FC6D -6C90B55A021F15F8020715E0020092C8FC030713F041437CC14A>III<903807FF80B6FCA6C6FC7F7FB3A8EF1FFF94B512F0040714FC041F14FF4C8193267F -E07F7F922781FE001F7FDB83F86D7FDB87F07FDB8FC0814C7F039FC78015BE03BC8003FC -825DA25DA25DA45DB3B2B7D8F007B71280A651647BE35A>II<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>I114 -D<913A3FFF8007800107B5EAF81F011FECFE7F017F91B5FC48B8FC48EBE0014890C7121F -D80FFC1407D81FF0801600485A007F167F49153FA212FF171FA27F7F7F6D92C7FC13FF14 -E014FF6C14F8EDFFC06C15FC16FF6C16C06C16F06C826C826C826C82013F1680010F16C0 -1303D9007F15E0020315F0EC001F1500041F13F81607007C150100FC81177F6C163FA217 -1F7EA26D16F0A27F173F6D16E06D157F6D16C001FEEDFF806D0203130002C0EB0FFE02FC -EB7FFC01DFB65A010F5DD8FE0315C026F8007F49C7FC48010F13E035437BC140>II<902607FFC0ED3F -FEB60207B5FCA6C6EE00076D826D82B3B3A260A360A2607F60183E6D6D147E4E7F6D6D49 -48806D6DD907F0ECFF806D01FFEB3FE06D91B55A6E1500021F5C020314F8DA003F018002 -F0C7FC51427BC05A>III<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 D37 D<141E147F14FF5BEB03FEEB07FCEB0FF0EB1FE0EB3FC0 -EB7F80EBFF00485A5B12035B485A120F5BA2485AA2123F5BA2127F90C7FCA412FEAD127F -A47F123FA27F121FA26C7EA27F12076C7E7F12017F6C7EEB7F80EB3FC0EB1FE0EB0FF0EB -07FCEB03FEEB01FF7F147F141E184771BE30>40 D<127812FE7E7F6C7E6C7EEA0FF06C7E -6C7E6C7E6C7EEB7F80133F14C0131FEB0FE014F01307A2EB03F8A214FC1301A214FE1300 -A4147FAD14FEA4130114FCA2130314F8A2EB07F0A2130F14E0EB1FC0133F1480137FEBFF -00485A485A485A485AEA3FE0485A485A90C7FC5A1278184778BE30>I<14E0497E497EA6 -0038EC0380007EEC0FC0D8FF83EB3FE001C3137F9038F3F9FF267FFBFB13C06CB6128000 -0FECFE00000314F86C5C6C6C13C0011F90C7FC017F13C048B512F04880000F14FE003FEC -FF80267FFBFB13C026FFF3F913E09038C3F87F0183133FD87E03EB0FC00038EC03800000 -91C7FCA66D5A6D5A23277AAE30>I<143EA2147FAF007FB7FCA2B81280A36C1600A2C76C -C8FCAF143EA229297DAF30>II<007FB612F0A2B712F8A36C15F0A225077B9E30>I<120FEA3FC0EA7FE0A2EAFFF0A4EA -7FE0A2EA3FC0EA0F000C0C6E8B30>I<16F01501ED03F8A21507A2ED0FF0A2ED1FE0A2ED -3FC0A2ED7F80A2EDFF00A24A5AA25D1403A24A5AA24A5AA24A5AA24A5AA24A5AA24AC7FC -A2495AA25C1303A2495AA2495AA2495AA2495AA2495AA249C8FCA2485AA25B1203A2485A -A2485AA2485AA2485AA2485AA248C9FCA25AA2127CA225477BBE30>I<14FE903807FFC0 -497F013F13F8497F90B57E48EB83FF4848C6138049137F4848EB3FC04848EB1FE049130F -001F15F0491307A24848EB03F8A290C712014815FCA400FEEC00FEAD6C14016C15FCA36D -1303003F15F8A26D1307001F15F0A26D130F6C6CEB1FE0A26C6CEB3FC06C6CEB7F806D13 -FF2601FF8313006CEBFFFE6D5B6D5B010F13E06D5BD900FEC7FC273A7CB830>IIIII<000FB612804815C05AA316800180C8FCAEEB -83FF019F13C090B512F015FC8181D9FE0313809039F0007FC049133F0180EB1FE06CC712 -0F000E15F0C81207A216F81503A31218127EA2B4FC150716F048140F6C15E06C141F6DEB -3FC06D137F3A3FE001FF80261FFC0F13006CB55A6C5C6C5C6C14E06C6C1380D90FFCC7FC -25397BB730>II<127CB712FC16FEA416FC48C7EA0FF816F0ED1FE0007CEC3FC0 -C8EA7F80EDFF00A24A5A4A5A5D14075D140F5D4A5AA24A5AA24AC7FCA25C5C13015CA213 -035CA213075CA4495AA6131F5CA96D5A6DC8FC273A7CB830>I<49B4FC011F13F0017F13 -FC90B57E0003ECFF804815C048010113E03A1FF8003FF049131FD83FC0EB07F8A24848EB -03FC90C71201A56D1303003F15F86D13076C6CEB0FF06C6CEB1FE0D807FCEB7FC03A03FF -83FF806C90B512006C6C13FC011F13F0497F90B512FE48802607FE0013C0D80FF8EB3FE0 -D81FE0EB0FF04848EB07F8491303007F15FC90C712014815FE481400A66C14016C15FC6D -1303003F15F86D1307D81FF0EB1FF06D133F3A0FFF01FFE06C90B512C06C1580C6ECFE00 -6D5B011F13F0010190C7FC273A7CB830>I<49B4FC010F13E0013F13F890B57E48804880 -48010113803A0FFC007FC0D81FF0EB3FE04848131F49EB0FF048481307A290C7EA03F85A -4815FC1501A416FEA37E7E6D1303A26C6C13076C6C130F6D133FD80FFC13FF6CB6FC7E6C -14FE6C14F9013FEBE1FC010F138190380060011400ED03F8A2150716F0150F000F15E048 -6C131F486CEB3FC0157FEDFF804A1300EC07FE391FF01FFC90B55A6C5C6C5C6C1480C649 -C7FCEB3FF0273A7CB830>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F00C7 -FCAF120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F000C276EA630>II<16F01503ED07F8151F157FEDFFF014034A13C0021F138091383F -FE00ECFFF8495B010713C0495BD93FFEC7FC495A3801FFF0485B000F13804890C8FCEA7F -FC5BEAFFE05B7FEA7FF87FEA1FFF6C7F000313E06C7F38007FFC6D7E90380FFF806D7F01 -0113F06D7FEC3FFE91381FFF80020713C06E13F01400ED7FF8151F1507ED03F01500252F -7BB230>I<1278127EB4FC13C07FEA7FF813FEEA1FFF6C13C000037F6C13F86C6C7EEB1F -FF6D7F010313E06D7F9038007FFC6E7E91380FFF806E13C0020113F080ED3FF8151F153F -EDFFF05C020713C04A138091383FFE004A5A903801FFF0495B010F13804990C7FCEB7FFC -48485A4813E0000F5B4890C8FCEA7FFE13F8EAFFE05B90C9FC127E1278252F7BB230>62 -D64 -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>I75 -D<383FFFF8487FB57EA26C5B6C5BD801FCC9FCB3B0EE0F80EE1FC0A9003FB7FC5AB8FCA2 -7E6C16802A387EB730>III<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>III<3A3FFF01FFF84801837F02C77FA202835B6C01015B3A01FC007F806D91C7FC00 -005C6D5BEB7F01EC81FCEB3F8314C3011F5B14E7010F5B14FF6D5BA26D5BA26D5BA26D90 -C8FCA4497FA2497FA2815B81EB0FE781EB1FC381EB3F8181EB7F0081497F49800001143F -49800003141F49800007140FD87FFEEB7FFFB590B5128080A25C6C486D130029387DB730 ->II<007FB612F0A2B712F8A36C15F0A225077B7D30>95 D97 DII<913801FFE0 -4A7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A481303380FFC00D81FF0 -133F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F003F141F6D133F6C7E -6D137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C713E0011F010313C0 -D907FCC8FC2C397DB730>I<49B4FC010713E0011F13F8017F7F90B57E48804801811380 -3A07FC007FC04848133FD81FE0EB1FE0150F484814F0491307127F90C7FCED03F85A5AB7 -FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D1307D807FEEB1FF03A03FF -C07FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0252A7CA830>IIII<14E0EB03F8A2497EA36D5AA2EB00E091C8FCA9381FFFF8487F5AA27E7EEA0001B3 -A9003FB612C04815E0B7FCA27E6C15C023397AB830>I -107 D<387FFFF8B57EA47EEA0001B3B3A8007FB612F0B712F8A46C15F025387BB730>I< -02FC137E3B7FC3FF01FF80D8FFEF01877F90B500CF7F15DF92B57E6C010F13872607FE07 -EB03F801FC13FE9039F803FC01A201F013F8A301E013F0B3A23C7FFE0FFF07FF80B54801 -8F13C0A46C486C01071380322881A730>II<49B4FC -010F13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC04848EB3FE0D81FE0EB0F -F0A24848EB07F8491303007F15FC90C71201A300FEEC00FEA86C14016C15FCA26D130300 -3F15F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01FFC06C90B512806C1500 -6C6C13FC6D5B010F13E0010190C7FC272A7CA830>II<49B413F8010FEBC1FC013F13F14913FD48B6FC5A481381390F -FC007F49131F4848130F491307485A491303127F90C7FC15015A5AA77E7E15037FA26C6C -1307150F6C6C131F6C6C133F01FC137F3907FF01FF6C90B5FC6C14FD6C14F9013F13F101 -0F13C1903803FE0190C7FCAD92B512F84A14FCA46E14F82E3C7DA730>II< -90381FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC4880A46C143E007F91 -C7FC13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F9038000FFF02001380 -007C147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC03FF0090B6FC5D5D00 -FC14F0D8F83F13C026780FFEC7FC222A79A830>III<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>II125 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>I46 -D<913803FFC0023F13FC91B6FC010315C0010F018113F0903A1FFC003FF849486D7E4948 -6D7E49486D7E48496D138048496D13C0A24817E04890C813F0A34817F8A24817FC49157F -A3007F17FEA600FF17FFB3A5007F17FEA6003F17FCA26D15FFA26C17F8A36C17F0A26C6D -4913E0A26C6D4913C06C17806E5B6C6D4913006D6C495AD91FFCEB3FF8903A0FFF81FFF0 -6D90B55A01011580D9003F01FCC7FC020313C0384F7BCD43>48 D<157815FC1403140714 -1F14FF130F0007B5FCB6FCA2147F13F0EAF800C7FCB3B3B3A6007FB712FEA52F4E76CD43 ->II<91380FFFC091B512FC0107ECFF80011F15E090 -263FF8077F9026FF800113FC4848C76C7ED803F86E7E491680D807FC8048B416C080486D -15E0A4805CA36C17C06C5B6C90C75AD801FC1680C9FC4C13005FA24C5A4B5B4B5B4B13C0 -4B5BDBFFFEC7FC91B512F816E016FCEEFF80DA000713E0030113F89238007FFE707E7013 -807013C018E07013F0A218F8A27013FCA218FEA2EA03E0EA0FF8487E487E487EB57EA318 -FCA25E18F891C7FC6C17F0495C6C4816E001F04A13C06C484A1380D80FF84A13006CB44A -5A6CD9F0075BC690B612F06D5D011F1580010302FCC7FCD9001F1380374F7ACD43>I<17 -7C17FEA2160116031607160FA2161F163F167FA216FF5D5DA25D5DED1FBFED3F3F153E15 -7C15FCEC01F815F0EC03E01407EC0FC01580EC1F005C147E147C5C1301495A495A5C495A -131F49C7FC133E5B13FC485A5B485A1207485A485A90C8FC123E127E5ABA12C0A5C96C48 -C7FCAF020FB712C0A53A4F7CCE43>III<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 DI<932601FFFCEC01C0047FD9FFC013030307B600F81307033F03FE131F -92B8EA803F0203DAE003EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5FC -494848C9FC4901F8824949824949824949824949824990CA7E494883A2484983485B1B7F -485B481A3FA24849181FA3485B1B0FA25AA298C7FC5CA2B5FCAE7EA280A2F307C07EA36C -7FA21B0F6C6D1980A26C1A1F6C7F1C006C6D606C6D187EA26D6C606D6D4C5A6D6D16036D -6D4C5A6D6D4C5A6D01FC4C5A6D6DEE7F806D6C6C6C4BC7FC6E01E0EC07FE020F01FEEC1F -F80203903AFFE001FFF0020091B612C0033F93C8FC030715FCDB007F14E0040101FCC9FC -525479D261>I -III73 D76 -D<93380FFFC00303B6FC031F15E092B712FC0203D9FC0013FF020F01C0010F13C0023F90 -C7000313F0DA7FFC02007F494848ED7FFE4901E0ED1FFF49496F7F49496F7F4990C96C7F -49854948707F4948707FA24849717E48864A83481B804A83481BC0A2481BE04A83A2481B -F0A348497113F8A5B51AFCAF6C1BF86E5FA46C1BF0A26E5F6C1BE0A36C6D4D13C0A26C6D -4D1380A26C1B006C6D4D5A6E5E6C626D6C4C5B6D6D4B5B6D6D4B5B6D6D4B5B6D6D4B5B6D -6D4B90C7FC6D6D4B5A6D01FF02035B023F01E0011F13F0020F01FC90B512C0020390B7C8 -FC020016FC031F15E0030392C9FCDB001F13E0565479D265>79 DI82 D<91260FFF80130791B500F85B010702FF5B011FEDC0 -3F49EDF07F9026FFFC006D5A4801E0EB0FFD4801800101B5FC4848C87E48488149150F00 -1F824981123F4981007F82A28412FF84A27FA26D82A27F7F6D93C7FC14C06C13F014FF15 -F86CECFF8016FC6CEDFFC017F06C16FC6C16FF6C17C06C836C836D826D82010F82130301 -0082021F16801400030F15C0ED007F040714E01600173F050F13F08383A200788200F882 -A3187FA27EA219E07EA26CEFFFC0A27F6D4B13806D17006D5D01FC4B5A01FF4B5A02C04A -5A02F8EC7FF0903B1FFFC003FFE0486C90B65AD8FC0393C7FC48C66C14FC48010F14F048 -D9007F90C8FC3C5479D24B>I<003FBC1280A59126C0003F9038C0007F49C71607D87FF8 -060113C001E08449197F49193F90C8171FA2007E1A0FA3007C1A07A500FC1BE0481A03A6 -C994C7FCB3B3AC91B912F0A553517BD05E>II97 DI<913801FFF8021FEB -FF8091B612F0010315FC010F9038C00FFE903A1FFE0001FFD97FFC491380D9FFF05B4817 -C048495B5C5A485BA2486F138091C7FC486F1300705A4892C8FC5BA312FFAD127F7FA27E -A2EF03E06C7F17076C6D15C07E6E140F6CEE1F806C6DEC3F006C6D147ED97FFE5C6D6CEB -03F8010F9038E01FF0010390B55A01001580023F49C7FC020113E033387CB63C>I<4DB4 -7E0407B5FCA5EE001F1707B3A4913801FFE0021F13FC91B6FC010315C7010F9038E03FE7 -4990380007F7D97FFC0101B5FC49487F4849143F484980485B83485B5A91C8FC5AA3485A -A412FFAC127FA36C7EA37EA26C7F5F6C6D5C7E6C6D5C6C6D49B5FC6D6C4914E0D93FFED9 -0FEFEBFF80903A0FFFC07FCF6D90B5128F0101ECFE0FD9003F13F8020301C049C7FC4154 -7CD24B>I<913803FFC0023F13FC49B6FC010715C04901817F903A3FFC007FF849486D7E -49486D7E4849130F48496D7E48178048497F18C0488191C7FC4817E0A248815B18F0A212 -FFA490B8FCA318E049CAFCA6127FA27F7EA218E06CEE01F06E14037E6C6DEC07E0A26C6D -EC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFEEB03FE903A0FFFC03FF8010390B55A01 -0015C0021F49C7FC020113F034387CB63D>IIII<137F497E000313E0487FA2487FA76C5BA2 -6C5BC613806DC7FC90C8FCADEB3FF0B5FCA512017EB3B3A6B612E0A51B547BD325>I108 DII<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>IIII<007FB500 -F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07F86D6D5C6D6D495A6D4B5A6F495A6D6D -91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C485A6EEB8FE06EEBCFC06EEBFF806E91C9 -FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5FCDA01FD7F03F87F4A486C7E4A486C7E -020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A6D7F495A49486D7F01076F7E49486E7E -49486E7FEBFFF0B500FE49B612C0A542357EB447>II -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>II<121EEA7F8012FF13C0 -A213E0A3127FEA1E601200A413E013C0A312011380120313005A120E5A1218123812300B -1C79BE19>I<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B12015B -1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E12 -3FA37EA27F120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB01 -C0EB00E014701430145A77C323>I<12C07E12707E7E121E7E6C7E7F12036C7E7F12007F -1378137CA27FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A614C0 -130FA31480A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC121E12 -1C5A5A5A5A145A7BC323>II<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013 -C0A312011380120313005A120E5A1218123812300B1C798919>44 -DI<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A798919>IIIIII<150E151E153EA2157EA215FE1401A21403EC077E140614 -0E141CA214381470A214E0EB01C0A2EB0380EB0700A2130E5BA25B5BA25B5B1201485A90 -C7FC5A120E120C121C5AA25A5AB8FCA3C8EAFE00AC4A7E49B6FCA3283E7EBD2D>I<0006 -1403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FCEB3FE090C9FCACEB01FE9038 -0FFF8090383E03E090387001F8496C7E49137E497F90C713800006141FC813C0A216E015 -0FA316F0A3120C127F7F12FFA416E090C7121F12FC007015C012780038EC3F80123C6CEC -7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F90C7FCEB07F8243F7CBC2D> -II<1238123C123F90B612FCA316F8 -5A16F016E00078C712010070EC03C0ED078016005D48141E151C153C5DC8127015F04A5A -5D14034A5A92C7FC5C141EA25CA2147C147814F8A213015C1303A31307A3130F5CA2131F -A6133FAA6D5A0107C8FC26407BBD2D>III<121EEA7F80A2 -EAFFC0A4EA7F80A2EA1E00C7FCB3121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2779A619 ->I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3121E127FEAFF80A213C0A4127F12 -1E1200A412011380A3120313005A1206120E120C121C5A1230A20A3979A619>I63 -D<15074B7EA34B7EA34B7EA34B7EA34B7E15E7A2913801C7FC15C3A291380381FEA34AC6 -7EA3020E6D7EA34A6D7EA34A6D7EA34A6D7EA34A6D7EA349486D7E91B6FCA24981913880 -0001A249C87EA24982010E157FA2011E82011C153FA2013C820138151FA2017882170F13 -FC00034C7ED80FFF4B7EB500F0010FB512F8A33D417DC044>65 DIIIIIIII<011FB512FCA3D9000713006E5A1401B3B3A6123FEA7F80EAFFC0A44A5A1380 -D87F005B007C130700385C003C495A6C495A6C495A2603E07EC7FC3800FFF8EB3FC02640 -7CBD2F>IIIIIII82 DI<003FB91280A3903AF0007FE001018090393FC0003F48C7ED1FC0007E -1707127C00781703A300701701A548EF00E0A5C81600B3B14B7E4B7E0107B612FEA33B3D -7DBC42>IIII -89 D<003FB712F8A391C7EA1FF013F801E0EC3FE00180EC7FC090C8FC003EEDFF80A200 -3C4A1300007C4A5A12784B5A4B5AA200704A5AA24B5A4B5AA2C8485A4A90C7FCA24A5A4A -5AA24A5AA24A5A4A5AA24A5A4A5AA24990C8FCA2495A4948141CA2495A495AA2495A495A -173C495AA24890C8FC485A1778485A484815F8A24848140116034848140F4848143FED01 -FFB8FCA32E3E7BBD38>II<486C13 -C00003130101001380481303000EEB070048130E0018130C0038131C0030131800701338 -00601330A300E01370481360A400CFEB678039FFC07FE001E013F0A3007F133FA2003F13 -1F01C013E0390F0007801C1C73BE2D>II96 DII<49B4FC010F13E090383F00F8017C131E48 -48131F4848137F0007ECFF80485A5B121FA24848EB7F00151C007F91C7FCA290C9FC5AAB -6C7EA3003FEC01C07F001F140316806C6C13076C6C14000003140E6C6C131E6C6C137890 -383F01F090380FFFC0D901FEC7FC222A7DA828>IIII<167C9039 -03F801FF903A1FFF078F8090397E0FDE1F9038F803F83803F001A23B07E000FC0600000F -6EC7FC49137E001F147FA8000F147E6D13FE00075C6C6C485AA23901F803E03903FE0FC0 -26071FFFC8FCEB03F80006CAFC120EA3120FA27F7F6CB512E015FE6C6E7E6C15E06C8100 -03813A0FC0001FFC48C7EA01FE003E140048157E825A82A46C5D007C153E007E157E6C5D -6C6C495A6C6C495AD803F0EB0FC0D800FE017FC7FC90383FFFFC010313C0293D7EA82D> -III<1478EB01FEA2EB03FFA4EB01FEA2EB00781400AC147FEB7F -FFA313017F147FB3B3A5123E127F38FF807E14FEA214FCEB81F8EA7F01387C03F0381E07 -C0380FFF803801FC00185185BD1C>III<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>IIIIII<001FB61280A2EBE0000180140049485A001E495A121C -4A5A003C495A141F00385C4A5A147F5D4AC7FCC6485AA2495A495A130F5C495A90393FC0 -0380A2EB7F80EBFF005A5B484813071207491400485A48485BA248485B4848137F00FF49 -5A90B6FCA221277EA628>II E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fm cmbx12 20.736 11 -/Fm 11 115 df<137F3801FFC0000713F0487F487F487F487FA2B61280A96C1400A26C5B -6C5B6C5B6C5B000113C06C6CC7FC1919729836>46 D48 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 08eadeee..00000000 --- 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 "[ x ] [+ - + ]" (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 - " x [+ + [- - [- ]]]" (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 "," 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 7b460558..00000000 --- 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 -%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{} @t{x} - @i{}] [@t{+} @i{} @t{+} @i{}]'' (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{} @t{x} @i{} [@t{+} @i{} - @t{+} @i{} [@t{-} @i{} [@t{-} - @i{}]]]'' (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{}@t{,}@i{}'' 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 (maintainer) -%M .PP -%M Leonid A. Broukhis (several encodings) -%M .PP -%M Andrea Scopece (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 92bc8b7d..00000000 --- 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 46de5be2..00000000 --- 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 bd3f88ba..00000000 --- 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 2c61aa93..00000000 --- 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 = "\n"; # tag to know where to split -$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections -$html2_doctype = ''; - -# -# 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 - "*", "
    ", # HTML+ - " ", " ", - "\n", "\n", - "|", "", - # spacing commands - ":", "", - "!", "!", - "?", "?", - ".", ".", - ); - -# -# texinfo "things" (@foo{}) to HTML ones -# -%things_map = ( - 'TeX', 'TeX', - 'br', '

    ', # 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 = <= 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 = '' 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("

    \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("

    \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("

    ", __LINE__); - } else { - $_ = &debug("
    \n
    ", __LINE__); - } - if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') { - $_ .= "$type $name"; - $_ .= " @args" if @args; - } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr' - || $tag eq 'defcv' || $tag eq 'defop') { - $ftype = $name; - $name = shift(@args); - $name =~ s/^\{(.*)\}$/$1/; - $_ .= "$type $ftype $name"; - $_ .= " @args" if @args; - } else { - warn "$ERROR Unknown definition type: $tag\n"; - $_ .= "$type $name"; - $_ .= " @args" if @args; - } - $_ .= &debug("\n
    ", __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("\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, "
    \n"); - &html_pop_if('DD'); - &html_pop_if(); - } elsif (defined($def_map{$end_tag})) { - push(@lines, &debug("
    \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

    $name

    \n\n", __LINE__); - } else { - $_ = &debug("$name\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, "
      \n"); - } - while ($level < $curlevel) { - $curlevel--; - push(@toc_lines, "
    \n"); - } - $_ = "
  • " . &anchor($tocid, "$docu_doc#$docid", $name, 1); - push(@toc_lines, &substitute_style($_)); - # update DOC - push(@lines, &html_debug("\n", __LINE__)); - &html_reset; - $_ = "".&anchor($docid, "$docu_toc#$tocid", $name)."\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(<\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("
    $things_map{$in_table}\n", __LINE__)); - } else { - push(@lines, &debug("
    \@$in_table\{$what\}\n", __LINE__)); - } - push(@lines, "
    "); - &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("
  • $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("

    \n", __LINE__); - &html_pop; - } - } elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE') { - push(@lines, "

    \n"); - &html_push('P'); - $_ = &debug($_, __LINE__); - } - # otherwise - push(@lines, $_); -} - -# finish TOC -$level = 0; -while ($level < $curlevel) { - $curlevel--; - push(@toc_lines, "\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("

      \n", __LINE__)), next if /^\@menu\b/; - $in_menu = 0, push(@lines2, &debug("
    \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, "\n") if defined($last_letter); - push(@lines2, "

    " . &protect_html($letter) . "

    \n"); - push(@lines2, "\n"); - $last_letter = $letter; - } - @refs = (); - foreach (split(/$;/, $ary{$key})) { - push(@refs, &anchor('', $_, $key, 0)); - } - push(@lines2, "
  • " . join(", ", @refs) . "\n"); - } - push(@lines2, "
  • \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 (/^
    /) { - $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

    - -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, "

    " . &anchor($footid, "$d#$docid", $foot) . "

    \n"); - $text = "

    $text" unless $text =~ /^\s*

    /; - push(@foot_lines, "$text\n"); - $_ = $before . &anchor($docid, "$docu_foot#$footid", $foot) . $after; - } - } - # - # remove unnecessary

    - # - if (/^\s*

    \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 - -$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 = "

    " . join("

    \n

    ", split(/\n/, $_)) . "

    \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 "

    Table of Contents

    \n"; - &print(*toc_lines, FILE); - } - &print_ruler; - &print(*doc_lines, FILE); - if ($monolithic && @foot_lines) { - &print_ruler; - print FILE "

    Footnotes

    \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("$what") - if $debug & $DEBUG_HTML; - return($what); -} - -# to debug the output... -sub debug { - local($what, $line) = @_; - return("$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, "
  • " . &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"; - } 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 = "

    \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 < - -$header -$_ - - -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 "

    $_

    \n"; - } - } - if ($value{'_author'}) { - $value{'_author'} =~ s/\n+$//; - foreach (split(/\n/, $value{'_author'})) { - $_ = &substitute_style($_); - &unprotect_texi; - s/[\w.-]+\@[\w.-]+/
    $&<\/A>/g; - print FILE "
    $_
    \n"; - } - } - print FILE "

    \n"; -} - -sub print_footer { - print FILE < - -EOT -} - -sub print_toplevel_footer { - &print_ruler; - print FILE <texi2html -translator version 1.51.

    -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/\/\&\#62;/g; - # but recognize some HTML things - $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # - $what =~ s/\&\#60;A ([^\&]+)\&\#62;//g; # - $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;//g; # - 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; - 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 0801a0ef..00000000 --- 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 - * Copyright (c) 1999 Prosa Srl. - * Copyright (c) 2001 Boszormenyi Zoltan - * - * 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 -#include -#include -#include -#include - -#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= '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; iascii) { - 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; ipartial = 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 72bd0358..00000000 --- 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 -#include -#include -#include -#include - -#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; ierror = 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 ab74c882..00000000 --- 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 a8787020..00000000 --- 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 -#include -#include -#include -#ifdef HAVE_UNISTD_H /* sometimes (windows, for instance) it's missing */ -# include -#endif -#include - -#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 e07e4d3c..00000000 --- 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 -#include -#include -#include - -#include "cmdline.h" -#include "barcode.h" - -#ifndef NO_LIBPAPER -#include -#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: [x][++]"}, - {'t', CMDLINE_S, NULL, get_table, "BARCODE_TABLE", NULL, - "table geometry: x[++]"}, - {'m', CMDLINE_S, NULL, get_margin, "BARCODE_MARGIN", "10", - "internal margin for each item in a table: [,]"}, - {'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 ) - */ -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 77a373b2..00000000 --- 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 -#include -#include -#include -#include - -#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; ipartial = 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 d5ec097a..00000000 --- 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 -#include -#include -#include -#include - -#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 ec471005..00000000 --- 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 -#include -#include -#include -#include - -#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; ierror = 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 35917517..00000000 --- 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 -#include -#include -#include -#include - -#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 : "", 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; ipartial); 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 : ""); - - 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 46e62058..00000000 --- a/glabels1/barcode-0.98/sample.c +++ /dev/null @@ -1,98 +0,0 @@ -#include -#include - -#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 939f7192..00000000 --- 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 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 doesn't define. */ -#undef off_t - -/* Define to `unsigned' if 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 header file. */ -#undef HAVE_X11_SM_SMLIB_H - -/* Define if you have the header file. */ -#undef HAVE_ARGZ_H - -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define if you have the header file. */ -#undef HAVE_NL_TYPES_H - -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define if you have the header file. */ -#undef HAVE_STRING_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define if you have the 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 file defines LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - diff --git a/glabels1/configure.in b/glabels1/configure.in deleted file mode 100644 index 6d1207f6..00000000 --- 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 52c5e09d..00000000 --- a/glabels1/data/predefined-labels.template +++ /dev/null @@ -1,830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/glabels1/doc/C/Makefile.am b/glabels1/doc/C/Makefile.am deleted file mode 100644 index 51f464a5..00000000 --- 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 0a63d133..00000000 --- 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 2104f270..00000000 --- a/glabels1/doc/C/glabels.sgml +++ /dev/null @@ -1,73 +0,0 @@ -]> - - - - -
    - - - gLabels Manual - 2001Jim Evins - - - - - - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation - License, Version 1.1 or any later version published - by the Free Software Foundation with no Invariant Sections, no - Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy - of the GNU Free Documentation License from - the Free Software Foundation by visiting their Web site or by writing to: - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - - - 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. - - - - - - This is version &version; of the gLabels manual. - - - - - - - - - - - - Introduction - -See the README file. - - - - - - -
    - - - - - - - - - diff --git a/glabels1/doc/C/glabels/index.html b/glabels1/doc/C/glabels/index.html deleted file mode 100644 index 8f975ccd..00000000 --- a/glabels1/doc/C/glabels/index.html +++ /dev/null @@ -1,64 +0,0 @@ - -gLabels Manual

    gLabels Manual

    Copyright © 2001 by Jim Evins


    Table of Contents
    Introduction

    Introduction

    See the README file.
    \ 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 a0dd927f..00000000 --- a/glabels1/doc/C/glabels/ln7.html +++ /dev/null @@ -1,128 +0,0 @@ - -
    gLabels Manual

    Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation - License, Version 1.1 or any later version published - by the Free Software Foundation with no Invariant Sections, no - Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy - of the GNU Free Documentation License from - the Free Software Foundation by visiting their Web site or by writing to: - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. -

    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. -


     Home 
     Up 
    \ 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 368844b6..00000000 --- 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 a68e4e50..00000000 --- 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 255f675c..00000000 --- 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 0459cb15..00000000 --- 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 419fed2c..00000000 --- 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 -- Created - diff --git a/glabels1/install-sh b/glabels1/install-sh deleted file mode 100755 index e9de2384..00000000 --- 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 19895015..00000000 --- a/glabels1/intl/ChangeLog +++ /dev/null @@ -1,1086 +0,0 @@ -1998-04-29 Ulrich Drepper - - * 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 - - * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if - mmap is not supported. - - * hash-string.h: Don't include . - -1998-04-27 Ulrich Drepper - - * 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 - - * libgettext.h: Fix dummy textdomain and bindtextdomain macros. - They should return reasonable values. - Reported by Tom Tromey . - -1997-09-16 03:33 Ulrich Drepper - - * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined. - * intlh.inst.in: Likewise. - Reported by Jean-Marc Lasgouttes . - - * libintl.glibc: Update from current glibc version. - -1997-09-06 02:10 Ulrich Drepper - - * intlh.inst.in: Reformat copyright. - -1997-08-19 15:22 Ulrich Drepper - - * dcgettext.c (DCGETTEXT): Remove wrong comment. - -1997-08-16 00:13 Ulrich Drepper - - * Makefile.in (install-data): Don't change directory to install. - -1997-08-01 14:30 Ulrich Drepper - - * 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 . - - * 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 - - * dcgettext.c (guess_category_value): Don't depend on - HAVE_LC_MESSAGES. We don't need the macro here. - Patch by Bruno Haible . - - * 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 . - - * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois - Pinard. - -Mon Mar 10 06:51:17 1997 Ulrich Drepper - - * 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 - - * 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 - - * textdomain.c: Move definition of `memcpy` macro to right - position. - -Fri Nov 22 04:01:58 1996 Ulrich Drepper - - * 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 - - * Makefile.in (libdir): Change to use exec_prefix instead of - prefix. Reported by Knut-HåvardAksnes . - -Sat Aug 31 03:07:09 1996 Ulrich Drepper - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * l10nflist.c: Correct presence test macros of __argz_* functions. - - * l10nflist.c: Include based on test of it instead when - __argz_* functions are available. - Reported by Andreas Schwab. - -Thu Jun 13 15:17:44 1996 Ulrich Drepper - - * explodename.c, l10nflist.c: Define NULL for dumb systems. - -Tue Jun 11 17:05:13 1996 Ulrich Drepper - - * 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 - - * Makefile.in (install): Remove comment. - -Thu Jun 6 17:28:17 1996 Ulrich Drepper - - * 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 - - * 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 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 - - * intlh.inst.in: Don't depend including 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 - - * 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 - - * loadmsgcat.c (_nl_load_domain): Parameter is now comes from - find_l10nfile. - -Sat Jun 1 02:23:03 1996 Ulrich Drepper - - * 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 - - * Makefile.in (all-gettext): New goal. Same as all-yes. - -Thu Mar 28 23:01:22 1996 Karl Eichwalder - - * Makefile.in (gettextsrcdir): Define using @datadir@. - -Tue Mar 26 12:39:14 1996 Ulrich Drepper - - * finddomain.c: Include . Reported by Roland McGrath. - -Sat Mar 23 02:00:35 1996 Ulrich Drepper - - * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing - with external declaration. - -Sat Mar 2 00:47:09 1996 Ulrich Drepper - - * Makefile.in (all-no): Rename from all_no. - -Sat Feb 17 00:25:59 1996 Ulrich Drepper - - * 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 - - * 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 - - * localealias.c (alias_compare): Increment string pointers in loop - of strcasecmp replacement. - -Fri Dec 29 21:16:34 1995 Ulrich Drepper - - * Makefile.in (install-src): Who commented this goal out ? :-) - -Fri Dec 29 15:08:16 1995 Ulrich Drepper - - * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls - should not effect it because a missing catalog is no error. - Reported by Harald Knig . - -Tue Dec 19 22:09:13 1995 Ulrich Drepper - - * Makefile.in (Makefile): Explicitly use $(SHELL) for running - shell scripts. - -Fri Dec 15 17:34:59 1995 Andreas Schwab - - * 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 - - * 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 - - * 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 - - * Makefile.in (install-src): - Install libintl.inst instead of libintl.h.install. - -Sat Dec 2 22:51:38 1995 Marcus Daniels - - * 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 - - * cat-compat.c (bindtextdomain): Add missing { }. - -Sun Nov 26 18:21:41 1995 Ulrich Drepper - - * 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 - - * hash-string.h: Capitalize arguments of macros. - -Sat Nov 25 12:01:36 1995 Ulrich Drepper - - * 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 - - * dcgettext.c: Fix bug in preprocessor conditionals. - -Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe - - * libgettext.h: Solaris cc does not understand - #if !SYMBOL1 && !SYMBOL2. Sad but true. - -Thu Nov 23 16:22:14 1995 Ulrich Drepper - - * 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 - - * 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 - - * 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 - - * hash-string.h: Correct prototype for hash_string. - -Sun Nov 12 12:42:30 1995 Ulrich Drepper - - * hash-string.h (hash_string): Add prototype. - - * gettextP.h: Fix copyright. - (SWAP): Add prototype. - -Wed Nov 8 22:56:33 1995 Ulrich Drepper - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering. - -Sat Oct 28 23:20:47 1995 Ulrich Drepper - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * cat-compat.c: Include 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 - - * 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 - - * finddomain.c: Correct some bugs in handling of CEN standard - locale definitions. - -Thu Sep 7 01:49:28 1995 Ulrich Drepper - - * finddomain.c: Implement CEN syntax. - - * gettextP.h (loaded_domain): Extend number of successors to 31. - -Sat Aug 19 19:25:29 1995 Ulrich Drepper - - * 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 - - * Makefile.in (uninstall): Remove stuff installed by install-src. - -Tue Aug 15 13:13:53 1995 Ulrich Drepper - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * finddomain.c (unistd.h): - Include to get _PC_PATH_MAX defined on system having it. - -Fri Aug 4 22:42:00 1995 Ulrich Drepper - - * finddomain.c (stpcpy): Include prototype. - - * Makefile.in (dist): Remove `copying instead' message. - -Wed Aug 2 18:52:03 1995 Ulrich Drepper - - * Makefile.in (ID, TAGS): Do not use $^. - -Tue Aug 1 20:07:11 1995 Ulrich Drepper - - * 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 - - * 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 - - * 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 - - * intl-compat.c (textdomain): Correct typo. - -Wed Jul 19 01:51:35 1995 Ulrich Drepper - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * cat-compat.c: If !STDC_HEADERS try to include malloc.h. - -Thu Jul 13 20:55:02 1995 Ulrich Drepper - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * tupdate.perl.in: Complete rewrite for new .po file format. - -Sun Jul 2 02:06:50 1995 Ulrich Drepper - - * 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 4bdb186d..00000000 --- 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 ee66b061..00000000 --- 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 d9c3f349..00000000 --- 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 -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include -#else -# ifdef HAVE_MALLOC_H -# include -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# include -#else -# include -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif - -#ifdef _LIBC -# include -#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 867d901b..00000000 --- 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 -#endif - -#include - -#ifdef STDC_HEADERS -# include -# include -#else -char *getenv (); -# ifdef HAVE_MALLOC_H -# include -# endif -#endif - -#ifdef HAVE_NL_TYPES_H -# include -#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 c4c7a2c7..00000000 --- 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 -#endif - -#include - -#ifdef __GNUC__ -# define alloca __builtin_alloca -# define HAVE_ALLOCA 1 -#else -# if defined HAVE_ALLOCA_H || defined _LIBC -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca -char *alloca (); -# endif -# endif -# endif -#endif - -#include -#ifndef errno -extern int errno; -#endif -#ifndef __set_errno -# define __set_errno(val) errno = (val) -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include -#else -char *getenv (); -# ifdef HAVE_MALLOC_H -# include -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include -#else -# include -#endif -#if !HAVE_STRCHR && !defined _LIBC -# ifndef strchr -# define strchr index -# endif -#endif - -#if defined HAVE_UNISTD_H || defined _LIBC -# include -#endif - -#include "gettext.h" -#include "gettextP.h" -#ifdef _LIBC -# include -#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 -#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 -#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 0510c2b0..00000000 --- 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 -#endif - -#if defined HAVE_LOCALE_H || defined _LIBC -# include -#endif - -#ifdef _LIBC -# include -#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 8066dc29..00000000 --- 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 , 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 -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# include -#else -# include -#endif -#include - -#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 81ea29bf..00000000 --- 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 , 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 -#endif - -#include -#include -#include -#include - -#if defined STDC_HEADERS || defined _LIBC -# include -#else -# ifdef HAVE_MALLOC_H -# include -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# include -#else -# include -# 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 -#endif - -#include "gettext.h" -#include "gettextP.h" -#ifdef _LIBC -# include -#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 d929f98d..00000000 --- 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 -#endif - -#ifdef _LIBC -# define __need_NULL -# include -#else -# ifdef STDC_HEADERS -# include /* Just for NULL. */ -# else -# ifdef HAVE_STRING_H -# include -# else -# define NULL ((void *) 0) -# endif -# endif -#endif - -#ifdef _LIBC -# include -#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 3cd23d7d..00000000 --- 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 - -#if HAVE_LIMITS_H || _LIBC -# include -#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 ) 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 00c52031..00000000 --- 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 , 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 -# 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 cacb38e4..00000000 --- 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 503efa0f..00000000 --- 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 -#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 9c7dc183..00000000 --- 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 , 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 -#endif - - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include -#else -# include -# 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 -#endif -#include -#include - -#if defined STDC_HEADERS || defined _LIBC -# include -#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 3a92960a..00000000 --- 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 - -#if HAVE_LOCALE_H -# include -#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 5918e720..00000000 --- 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 , 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 - 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 f4ebf6d8..00000000 --- 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 , 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 515892df..00000000 --- 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 -#endif - -#include -#include -#include - -#if defined STDC_HEADERS || defined _LIBC -# include -#endif - -#if defined HAVE_UNISTD_H || defined _LIBC -# include -#endif - -#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC -# include -#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 bca555a6..00000000 --- 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 , 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 -#endif - -#include -#include -#include - -#ifdef __GNUC__ -# define alloca __builtin_alloca -# define HAVE_ALLOCA 1 -#else -# if defined HAVE_ALLOCA_H || defined _LIBC -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca -char *alloca (); -# endif -# endif -# endif -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include -#else -char *getenv (); -# ifdef HAVE_MALLOC_H -# include -# else -void free (); -# endif -#endif - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include -#else -# include -# 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 - -__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 b3bcca4d..00000000 --- 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 , 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 \ -#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 - 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 88557460..00000000 --- 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 , 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 -#endif - -#if defined STDC_HEADERS || defined _LIBC -# include -#endif - -#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC -# include -#else -# include -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif - -#ifdef _LIBC -# include -#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 b19c0bbd..00000000 --- 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 , 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 - 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 ` ' - 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 e03dbeed..00000000 --- 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 f1d35e35..00000000 --- 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 abf6533f..00000000 --- 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 70273913..00000000 --- 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 278d5099..00000000 --- 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 3dd4ffaa..00000000 --- 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 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 -dnl #else -dnl #include -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 -#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 < -#else -#include -#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 65e272cf..00000000 --- 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 -#include -#include -#include - -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 -#include -], [ 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 b7238297..00000000 --- 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 7c11a785..00000000 --- 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 -#include -#include ], -[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 ], -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 -#include -#include ], -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 -#include ], -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 ], -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 -#include ], -[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 -#include -#include -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 -#endif -#ifdef HAVE_SYS_MOUNT_H -#include -#endif -#ifdef HAVE_SYS_VFS_H -#include -#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 -#include -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 -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_MOUNT_H -#include -#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 -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_MOUNT_H -#include -#endif -#ifdef HAVE_SYS_FS_TYPES_H -#include -#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 ], -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 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 -#include ], -[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 1dac989c..00000000 --- a/glabels1/macros/gnome-gettext.m4 +++ /dev/null @@ -1,336 +0,0 @@ -# Macro to add for using GNU gettext. -# Ulrich Drepper , 1995. -# -# Modified to never use included libintl. -# Owen Taylor , 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 ], [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 in the installed 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 " - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header . 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 1fc85783..00000000 --- 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 dbac0a6c..00000000 --- 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 1086d30a..00000000 --- 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 - #include - ],[ - 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 81fbb601..00000000 --- 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 dc9691cf..00000000 --- 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 < -@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 54bf33aa..00000000 --- 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 7d98281d..00000000 --- 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 -#include -#include -#include - -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 -#include -], [ 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 a4eb3b48..00000000 --- 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 2c1d0498..00000000 --- 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 -#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 c8ea6f4b..00000000 --- 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 8ca361f2..00000000 --- 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 1e397ef8..00000000 --- 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 -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 1caad100..00000000 --- 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 a3a9ca74..00000000 --- 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 dfa7c8ae..00000000 --- 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 -#include - -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 d5b7bc66..00000000 --- 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 -#ifdef HAVE_STRING_H -#include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#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 7789652e..00000000 --- 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 , 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 6b3b5fc5..00000000 --- a/glabels1/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# 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 deleted file mode 100644 index 0f15c0cb..00000000 Binary files a/glabels1/pixmaps/glabels-about-logo.png and /dev/null differ diff --git a/glabels1/pixmaps/glabels-icon.png b/glabels1/pixmaps/glabels-icon.png deleted file mode 100644 index 298ea89e..00000000 Binary files a/glabels1/pixmaps/glabels-icon.png and /dev/null differ diff --git a/glabels1/pixmaps/glabels-logo.png b/glabels1/pixmaps/glabels-logo.png deleted file mode 100644 index 40189b9f..00000000 Binary files a/glabels1/pixmaps/glabels-logo.png and /dev/null differ diff --git a/glabels1/po/ChangeLog b/glabels1/po/ChangeLog deleted file mode 100644 index bd1b32e6..00000000 --- a/glabels1/po/ChangeLog +++ /dev/null @@ -1,23 +0,0 @@ -2002-08-24 gettextize - - * 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 - - * fr.po: updated translation for 0.4.4 - -2002-06-27 gettextize - - * 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 32b73765..00000000 --- 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 -# -# 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 71ca27f1..00000000 --- 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 e69de29b..00000000 diff --git a/glabels1/po/de.po b/glabels1/po/de.po deleted file mode 100644 index 60c51fe7..00000000 --- a/glabels1/po/de.po +++ /dev/null @@ -1,767 +0,0 @@ -# French translation of glabels. -# Copyright (C) 2001 Jim Evins -# Marcus Bauer , 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 \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 44f00ddb..00000000 --- a/glabels1/po/es.po +++ /dev/null @@ -1,704 +0,0 @@ -# LANGUAGE translation of glabels. -# Copyright (C) 2002 Free Software Foundation, Inc. -# victor , 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 \n" -"Language-Team: Spanish/Spain \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 bcceafa2..00000000 --- a/glabels1/po/fr.po +++ /dev/null @@ -1,1321 +0,0 @@ -# French translation of glabels. -# Copyright (C) 2001 Jim Evins -# Olivier Berger , 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 \n" -"Language-Team: French \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 18fa25df..00000000 --- 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 , 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 \n" -"Language-Team: LANGUAGE \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 f52d7c23..00000000 --- a/glabels1/po/ja.po +++ /dev/null @@ -1,711 +0,0 @@ -# glabels ja.po -# Copyright (C) 2001 Free Software Foundation, Inc. -# Takeshi Aihana , 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 \n" -"Language-Team: Japanese \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 bfa7d1b3..00000000 --- a/glabels1/po/pl.po +++ /dev/null @@ -1,712 +0,0 @@ -# Polish translation for gLabels -# Copyright (C) 2002 Free Software Foundation, Inc. -# Arkadiusz Lipiec , 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 \n" -"Language-Team: Polish \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 cdfe2072..00000000 --- a/glabels1/po/pt_BR.po +++ /dev/null @@ -1,715 +0,0 @@ -# Brazilian Portuguese translation of Glabels. -# Copyright (C) 2001 Jim Evins -# Paulo R. Ormenese , 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 \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 834ce31d..00000000 --- a/glabels1/po/ru.po +++ /dev/null @@ -1,714 +0,0 @@ -# Russian translation of glabels. -# Copyright (C) 2002 Free Software Foundation, Inc. -# Vitaly Lipatov , 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 \n" -"Language-Team: Russian \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 9788f702..00000000 --- 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 864f6187..00000000 --- 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 , 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 \n" -"Language-Team: zh-l10n \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 "´y­z:" - -#: 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 a7034c9e..00000000 --- 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 9969b784..00000000 --- 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 . - * - * 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 - -#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 22441f73..00000000 --- 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 . - * - * 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 - -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 31f71b07..00000000 --- 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 . - * - * 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 - -#include -#include - -#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 263b403a..00000000 --- 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 . - * - * 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 eaf3197d..00000000 --- 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 . - * - * 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 - -#include - -#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 e5035074..00000000 --- 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 . - * - * 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 - -glBarcode *gl_barcode_postnet (gchar * digits); - -#endif diff --git a/glabels1/src/debug.h b/glabels1/src/debug.h deleted file mode 100644 index 08e3fc99..00000000 --- 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 9440820d..00000000 --- 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 . - * - * 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 -#include - -#include -#include - -#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 704e8aa5..00000000 --- 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 . - * - * 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 -#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 88ceaefd..00000000 --- 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 . - * - * 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 - -#include - -#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 0a9854b3..00000000 --- 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 . - * - * 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 - -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 9d3243fd..00000000 --- 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 . - * - * 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 - -#include -#include - -#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 f5d035ea..00000000 --- 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 . - * - * 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 - -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 6e68fb9f..00000000 --- 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 . - * - * 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 - -#include -#include - -#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 480f2071..00000000 --- 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 . - * - * 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 - -#include -#include -#include -#include - -#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 f36ec1ae..00000000 --- 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 - * Raph Levien - */ - -#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 - -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 07ecf0a9..00000000 --- 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 . - * - * - * 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 - -#include -#include -#include - -#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 2f0b868d..00000000 --- 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 . - * - * 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 - -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 6acc3889..00000000 --- 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 . - * - * 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 - -#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 a0aaa0e0..00000000 --- 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 . - * - * 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 - -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 e72a354c..00000000 --- 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 . - * - * 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 - -#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 23b25f9a..00000000 --- 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 . - * - * 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 - -#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 e129f33b..00000000 --- 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 . - * - * 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 - -#include - -#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 -#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 d18d6ba2..00000000 --- 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 . - * - * 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 - -#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 80200947..00000000 --- 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 . - * - * 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 - -#include - -#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 789fce81..00000000 --- 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 . - * - * 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 - -#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 5a45b487..00000000 --- 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 . - * - * 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 - -#include - -#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 c4cf54e2..00000000 --- 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 . - * - * 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 - -#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 4eee6c65..00000000 --- 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 . - * - * 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 - -#include - -#include -#include - -#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 674a9c0f..00000000 --- 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 . - * - * 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 - -#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 9d14abe8..00000000 --- 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 . - * - * 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 - -#include -#include - -#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 3bb48fe8..00000000 --- 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 . - * - * 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 - -#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 0a0172af..00000000 --- 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 . - * - * 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 - -#include - -#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 -#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 091e0628..00000000 --- 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 . - * - * 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 - -#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 c33f97cb..00000000 --- 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 . - * - * 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 - -#include - -/* LibXML */ -#include -#include - -#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 e0ca5f9d..00000000 --- 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 . - * - * 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 -#include -#include - -#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 4a1b17af..00000000 --- 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 . - * - * 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 - -#include -#include -#include -#include -#include -#include - -#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 faeeedcf..00000000 --- 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 . - * - * 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 -#include - -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 6d829466..00000000 --- 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 . - * - * 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 - -#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 4d4af21c..00000000 --- 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 . - * - * 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 - -#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 283e2f59..00000000 --- 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 . - * - * 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 - -#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 ", - 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 01e119df..00000000 --- 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 . - * - * 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 - -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 603ae25b..00000000 --- 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 . - * - * 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 - -#include - -#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 ce870199..00000000 --- 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 . - * - * 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 - -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 a2fc1c2f..00000000 --- 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 . - * - * 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 - -#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 ba134394..00000000 --- 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 . - * - * 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 - -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 c39b05b7..00000000 --- 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 . - * - * 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 - -#include - -#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 b1dddef7..00000000 --- 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 . - * - * 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 - -#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 fb422545..00000000 --- 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 . - * - * 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 - -#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 e5a7e719..00000000 --- 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 . - * - * 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 - -#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 5e7954db..00000000 --- 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 . - * - * 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 - -#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 42006f2f..00000000 --- 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 . - * - * 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 - -#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 21e61fa4..00000000 --- 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 . - * - * 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 - -#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 5c08deae..00000000 --- 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 . - * - * 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 -#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 3d197100..00000000 --- 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 60e9e66b..00000000 --- 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 9ac15815..00000000 --- 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 b7440681..00000000 --- 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 33ab7b57..00000000 --- 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 a781151a..00000000 --- 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 6e8d1d62..00000000 --- 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 52ed3ba2..00000000 --- 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 48ae4ea2..00000000 --- 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 b41e0559..00000000 --- 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 946af9ac..00000000 --- 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 22fb5442..00000000 --- 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 32308360..00000000 --- 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 9c79e82e..00000000 --- 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 f5e2636e..00000000 --- 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 a9359d55..00000000 --- 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 4378c1a6..00000000 --- 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 543c2b7f..00000000 --- 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 beb1545e..00000000 --- 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 cada0165..00000000 --- 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 c8fac13c..00000000 --- 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 aadc97d9..00000000 --- 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 f186186f..00000000 --- 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 116c20d4..00000000 --- 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 37a24c9c..00000000 --- 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 6fd5f8f2..00000000 --- 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 a67cc13c..00000000 --- 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 499d7409..00000000 --- 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 956f4029..00000000 --- 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 88f8b4d5..00000000 --- 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 a1f8e862..00000000 --- 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 8e76eecb..00000000 --- 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 . - * - * 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 - -#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 a279d58b..00000000 --- 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 . - * - * 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 - -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 29e8aa70..00000000 --- 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 . - * - * 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 - -#include -#include -#include -#include -#include - -#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 25aec93c..00000000 --- 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 . - * - * 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 -#include -#include -#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 4d8d625f..00000000 --- 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 . - * - * 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 - -#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 124c5a22..00000000 --- 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 . - * - * 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 -#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 97aa0a3c..00000000 --- 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 . - * - * 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 - -#include -#include -#include -#include -#include -#include -#include -#include - -#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 a55b6e56..00000000 --- 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 . - * - * 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 -#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 3ef00338..00000000 --- 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 . - * - * 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 - -#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 a2a6ef89..00000000 --- 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 . - * - * 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 -#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 0b0e8175..00000000 --- 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 . - * - * 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 - -#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 f009b1fb..00000000 --- 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 . - * - * 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 -#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 7464bea4..00000000 --- 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 . - * - * 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 - -#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 0f59e3db..00000000 --- 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 . - * - * 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 - -#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 07432efa..00000000 --- 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 . - * - * 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 - -#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 13065e4e..00000000 --- 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 . - * - * 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 -#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 f9f5151c..00000000 --- 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 . - * - * 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 - -#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 0605e209..00000000 --- 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 . - * - * 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 -#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 a73811e9..00000000 --- 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 . - * - * 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 - -#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 1350fac0..00000000 --- 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 . - * - * 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 -#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 039afe62..00000000 --- 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 . - * - * 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 - -#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 c0637a59..00000000 --- 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 . - * - * 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 -#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 1f8d094d..00000000 --- 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 . - * - * 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 - -#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 550e93f2..00000000 --- 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 . - * - * 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 -#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 c7f6a2ad..00000000 --- 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 . - * - * 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 - -#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 8d3b02ae..00000000 --- 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 . - * - * 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 -#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 e82e6d1d..00000000 --- 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 . - * - * 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 - -#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 06c5deeb..00000000 --- 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 . - * - * 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 - -#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 303aefad..00000000 --- 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 . - * - * 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 - -#include "prop_vector.h" -#include "prefs.h" - -#include "debug.h" - -#include - -#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 e8197ad5..00000000 --- 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 . - * - * 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 -#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 b8fe2946..00000000 --- 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 - -#include "propertybox.h" -#include -#include -#include -#include -#include - -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 403ebf08..00000000 --- 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 -#include - -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 29e0a9ef..00000000 --- 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 . - * - * 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 - -#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 7204c83b..00000000 --- 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 . - * - * 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 -#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 92bb9aaa..00000000 --- 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 . - * - * 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 - -#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 25cd5b66..00000000 --- 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 . - * - * 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 f3523001..00000000 --- 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 . - * - * 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 -#include -#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 4b2b20c6..00000000 --- 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 . - * - * 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 aae0a896..00000000 --- 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 . - * - * 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 - -#include -#include -#include -#include -#include - - -#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 9e72c6bf..00000000 --- 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 . - * - * 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 - -/* LibXML */ -#include -#include - -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 c32ab723..00000000 --- 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 . - * - * 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 - -#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 97adbf0c..00000000 --- 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 . - * - * 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 -#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 ede7625e..00000000 --- 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 . - * - * 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 - -#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 814c4dd4..00000000 --- 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 . - * - * 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 - -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 9e751102..00000000 --- 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 . - * - * 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 - -#include -#include -#include - -#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 b3e188d5..00000000 --- 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 . - * - * 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 - -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 9788f702..00000000 --- a/glabels1/stamp-h.in +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/glabels2/AUTHORS b/glabels2/AUTHORS deleted file mode 100644 index f4415539..00000000 --- a/glabels2/AUTHORS +++ /dev/null @@ -1,181 +0,0 @@ -gLabels Author -============== - -Jim Evins - -Acknowledgments -=============== - -- The GNU Barcode Library provides a large chunk of the barcode functionality -and is distributed with glabels. See ./barcode-0.98/README for more -information. The author: - - Alessandro Rubini - -- The iec16022 library provides encoding for 2D barcodes. See -iec16022-0.2.1/README for more information. - -- The qrencode library provides encoding for 2D barcodes. See -qrencode-3.1.0/README for more information. - -- Glabels includes a modified version of the gimpchainbutton widget from the -gimp, as well as several stock icons from the gimp's default theme. -These are copyright: - - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * Copyright (C) 1999-2000 Sven Neumann - -Glabels includes contributions from: - Frederic Ruaudel - Emmanuel Pacaud - Wayne Schuller - Austin Henry -- EDS and vcard backends - nestor di -- excellent splash screen - that first appeared in - 0.4.3 - Darren Warner - Javier Donaire Segarra - Alessandro Zummo - José Dapena Paz - Akkana - Dag Wieers - Mário Meyer - Peter Cherriman - Daniel Mueller - -Translations: - - Olivier Berger -- French (original) - Florent Morel -- French (2.0.2) - Claude Paroz -- French (2.1.4) - Marcus Bauer -- German (original) - Christian Neumair -- German (1.89.1) - Mario Blättermann -- German (2.2.5) - Takeshi AIHANA -- Japanese - Paulo Rogério Ormenese -- Brazilian Portuguese - Víctor Moral -- Spanish - sergio rivadero -- Spanish (2.0.3) - Vitaly Lipatov -- Russian - Shell, Hin-lik Hung -- Chinese (TW) - Arkadiusz Lipiec -- Polish - David Makovský (Yakeen) -- Czech - Zbynek Mrkvicka -- Czech (2.0.3) - Mancio -- Italian - Daniele Medri -- Italian (2.0.3) - Antonio C. Codazzi "la Filozofo" -- Esperanto - David Planella -- Catalan - Careon -- Chinese (CN) - -The following people have submitted label templates or information about -particular products (I apologize if I have missed anybody): - - Hap - Olivier Berger - Marcus Bauer - Jochen Hein - Jonathan Buzzard - Jeff Davis - Ludger Solbach - Darren Ross - George Mitchell - Douglas Bollinger - Tim Jackson - John Stoffel - Dany De Bontridder - Andy Longton - Bostjan Muller - John Helms - no-exit - Mozilla from marela - Holger - Bill Tihen - Dan Gray - Keith Hudson - Tamas Bondar - George Mitchell - Erich Pfennig - Gwen Patton - Miek Gieben - Joerg Schmitz-Linneweber - David Makovský - Oliver Schwank - Akkana - Ted Poe - hans-helmut.belter - Uli Wachowitz - Stephan Hegel - Holger Reinmann - Michael Wojciechowski - Jim Mueller - Mark Fullalove - Zamiel Al'Shaitan - Philip Paeps - Bryan Fields - Martin Klaffenboeck - Lauri Ampuja - Allan Wind - Mark S Burgunder - Christian Holländer - Marvin P. Dickens - Julien BLACHE - James D Strandboge - Linas Jakucionis - Henrik Brix Andersen - Nigel Titley - Sean 'Shaleh' Perry - Anthony Brockman - Thorsten Hirsch - John Ross - Mike Machado - Rob Elshire - Niels - Ernst W. Winter - regis rampnoux - Sven Salzwedel - Dick Middleton - Ian Peake - Wayne Schuller - Thomas Vill - Fred Bacon - JBadger - Frank Altpeter - Matthew J. Lockner - Larry Harriman - Juan Carlos Valero - Nick Hill - Ali Akcaagac - Dan Clark - Peter L. Berghold - Vitaly Lipatov - Steve Saxon - Roman Kreisel - Steve Reppucci - Lionel CONS - Richard Lance - Anand Kumria - Alexandre Sauvé - Ironblade - Matthias Mailänder - Bernhard Walle - Stephen Hilliard - Alessandro Zummo - Herbert Straub - Dennis Böckmann - Anon - D. Leitner - Georg Ostertag - Manuel Siggen - David Huber - Harald Welte - Richard Rothwell - Gernot Hassenpflug - Pau Ruŀlan Ferragut - Richard Hurt - Phil Endecott - Koen Wybo - Mark Moeller - Bertus W. - Oliver Friedrich - - -And many others for their many helpful suggestions and bug reports -- thanks. diff --git a/glabels2/COPYING b/glabels2/COPYING deleted file mode 100644 index 94a9ed02..00000000 --- a/glabels2/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. 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 -them 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 prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. 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. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey 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; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If 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 convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - 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. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -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. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - 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 -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 3 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, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program 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, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU 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 Lesser General -Public License instead of this License. But first, please read -. diff --git a/glabels2/COPYING-DOCS b/glabels2/COPYING-DOCS deleted file mode 100644 index b42936be..00000000 --- a/glabels2/COPYING-DOCS +++ /dev/null @@ -1,355 +0,0 @@ - GNU Free Documentation License - Version 1.1, March 2000 - - Copyright (C) 2000 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. - - -0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other -written document "free" in the sense of freedom: to assure everyone -the effective freedom to copy and redistribute it, with or without -modifying it, either commercially or noncommercially. Secondarily, -this License preserves for the author and publisher a way to get -credit for their work, while not being considered responsible for -modifications made by others. - -This License is a kind of "copyleft", which means that derivative -works of the document must themselves be free in the same sense. It -complements the GNU General Public License, which is a copyleft -license designed for free software. - -We have designed this License in order to use it for manuals for free -software, because free software needs free documentation: a free -program should come with manuals providing the same freedoms that the -software does. But this License is not limited to software manuals; -it can be used for any textual work, regardless of subject matter or -whether it is published as a printed book. We recommend this License -principally for works whose purpose is instruction or reference. - - -1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work that contains a -notice placed by the copyright holder saying it can be distributed -under the terms of this License. The "Document", below, refers to any -such manual or work. Any member of the public is a licensee, and is -addressed as "you". - -A "Modified Version" of the Document means any work containing the -Document or a portion of it, either copied verbatim, or with -modifications and/or translated into another language. - -A "Secondary Section" is a named appendix or a front-matter section of -the Document that deals exclusively with the relationship of the -publishers or authors of the Document to the Document's overall subject -(or to related matters) and contains nothing that could fall directly -within that overall subject. (For example, if the Document is in part a -textbook of mathematics, a Secondary Section may not explain any -mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding -them. - -The "Invariant Sections" are certain Secondary Sections whose titles -are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. - -The "Cover Texts" are certain short passages of text that are listed, -as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. - -A "Transparent" copy of the Document means a machine-readable copy, -represented in a format whose specification is available to the -general public, whose contents can be viewed and edited directly and -straightforwardly with generic text editors or (for images composed of -pixels) generic paint programs or (for drawings) some widely available -drawing editor, and that is suitable for input to text formatters or -for automatic translation to a variety of formats suitable for input -to text formatters. A copy made in an otherwise Transparent file -format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is -not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain -ASCII without markup, Texinfo input format, LaTeX input format, SGML -or XML using a publicly available DTD, and standard-conforming simple -HTML designed for human modification. Opaque formats include -PostScript, PDF, proprietary formats that can be read and edited only -by proprietary word processors, SGML or XML for which the DTD and/or -processing tools are not generally available, and the -machine-generated HTML produced by some word processors for output -purposes only. - -The "Title Page" means, for a printed book, the title page itself, -plus such following pages as are needed to hold, legibly, the material -this License requires to appear in the title page. For works in -formats which do not have any title page as such, "Title Page" means -the text near the most prominent appearance of the work's title, -preceding the beginning of the body of the text. - - -2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either -commercially or noncommercially, provided that this License, the -copyright notices, and the license notice saying this License applies -to the Document are reproduced in all copies, and that you add no other -conditions whatsoever to those of this License. You may not use -technical measures to obstruct or control the reading or further -copying of the copies you make or distribute. However, you may accept -compensation in exchange for copies. If you distribute a large enough -number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and -you may publicly display copies. - - -3. COPYING IN QUANTITY - -If you publish printed copies of the Document numbering more than 100, -and the Document's license notice requires Cover Texts, you must enclose -the copies in covers that carry, clearly and legibly, all these Cover -Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on -the back cover. Both covers must also clearly and legibly identify -you as the publisher of these copies. The front cover must present -the full title with all words of the title equally prominent and -visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve -the title of the Document and satisfy these conditions, can be treated -as verbatim copying in other respects. - -If the required texts for either cover are too voluminous to fit -legibly, you should put the first ones listed (as many as fit -reasonably) on the actual cover, and continue the rest onto adjacent -pages. - -If you publish or distribute Opaque copies of the Document numbering -more than 100, you must either include a machine-readable Transparent -copy along with each Opaque copy, or state in or with each Opaque copy -a publicly-accessible computer-network location containing a complete -Transparent copy of the Document, free of added material, which the -general network-using public has access to download anonymously at no -charge using public-standard network protocols. If you use the latter -option, you must take reasonably prudent steps, when you begin -distribution of Opaque copies in quantity, to ensure that this -Transparent copy will remain thus accessible at the stated location -until at least one year after the last time you distribute an Opaque -copy (directly or through your agents or retailers) of that edition to -the public. - -It is requested, but not required, that you contact the authors of the -Document well before redistributing any large number of copies, to give -them a chance to provide you with an updated version of the Document. - - -4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under -the conditions of sections 2 and 3 above, provided that you release -the Modified Version under precisely this License, with the Modified -Version filling the role of the Document, thus licensing distribution -and modification of the Modified Version to whoever possesses a copy -of it. In addition, you must do these things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct - from that of the Document, and from those of previous versions - (which should, if there were any, be listed in the History section - of the Document). You may use the same title as a previous version - if the original publisher of that version gives permission. -B. List on the Title Page, as authors, one or more persons or entities - responsible for authorship of the modifications in the Modified - Version, together with at least five of the principal authors of the - Document (all of its principal authors, if it has less than five). -C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. -D. Preserve all the copyright notices of the Document. -E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. -F. Include, immediately after the copyright notices, a license notice - giving the public permission to use the Modified Version under the - terms of this License, in the form shown in the Addendum below. -G. Preserve in that license notice the full lists of Invariant Sections - and required Cover Texts given in the Document's license notice. -H. Include an unaltered copy of this License. -I. Preserve the section entitled "History", and its title, and add to - it an item stating at least the title, year, new authors, and - publisher of the Modified Version as given on the Title Page. If - there is no section entitled "History" in the Document, create one - stating the title, year, authors, and publisher of the Document as - given on its Title Page, then add an item describing the Modified - Version as stated in the previous sentence. -J. Preserve the network location, if any, given in the Document for - public access to a Transparent copy of the Document, and likewise - the network locations given in the Document for previous versions - it was based on. These may be placed in the "History" section. - You may omit a network location for a work that was published at - least four years before the Document itself, or if the original - publisher of the version it refers to gives permission. -K. In any section entitled "Acknowledgements" or "Dedications", - preserve the section's title, and preserve in the section all the - substance and tone of each of the contributor acknowledgements - and/or dedications given therein. -L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section titles. -M. Delete any section entitled "Endorsements". Such a section - may not be included in the Modified Version. -N. Do not retitle any existing section as "Endorsements" - or to conflict in title with any Invariant Section. - -If the Modified Version includes new front-matter sections or -appendices that qualify as Secondary Sections and contain no material -copied from the Document, you may at your option designate some or all -of these sections as invariant. To do this, add their titles to the -list of Invariant Sections in the Modified Version's license notice. -These titles must be distinct from any other section titles. - -You may add a section entitled "Endorsements", provided it contains -nothing but endorsements of your Modified Version by various -parties--for example, statements of peer review or that the text has -been approved by an organization as the authoritative definition of a -standard. - -You may add a passage of up to five words as a Front-Cover Text, and a -passage of up to 25 words as a Back-Cover Text, to the end of the list -of Cover Texts in the Modified Version. Only one passage of -Front-Cover Text and one of Back-Cover Text may be added by (or -through arrangements made by) any one entity. If the Document already -includes a cover text for the same cover, previously added by you or -by arrangement made by the same entity you are acting on behalf of, -you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License -give permission to use their names for publicity for or to assert or -imply endorsement of any Modified Version. - - -5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this -License, under the terms defined in section 4 above for modified -versions, provided that you include in the combination all of the -Invariant Sections of all of the original documents, unmodified, and -list them all as Invariant Sections of your combined work in its -license notice. - -The combined work need only contain one copy of this License, and -multiple identical Invariant Sections may be replaced with a single -copy. If there are multiple Invariant Sections with the same name but -different contents, make the title of each such section unique by -adding at the end of it, in parentheses, the name of the original -author or publisher of that section if known, or else a unique number. -Make the same adjustment to the section titles in the list of -Invariant Sections in the license notice of the combined work. - -In the combination, you must combine any sections entitled "History" -in the various original documents, forming one section entitled -"History"; likewise combine any sections entitled "Acknowledgements", -and any sections entitled "Dedications". You must delete all sections -entitled "Endorsements." - - -6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents -released under this License, and replace the individual copies of this -License in the various documents with a single copy that is included in -the collection, provided that you follow the rules of this License for -verbatim copying of each of the documents in all other respects. - -You may extract a single document from such a collection, and distribute -it individually under this License, provided you insert a copy of this -License into the extracted document, and follow this License in all -other respects regarding verbatim copying of that document. - - -7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate -and independent documents or works, in or on a volume of a storage or -distribution medium, does not as a whole count as a Modified Version -of the Document, provided no compilation copyright is claimed for the -compilation. Such a compilation is called an "aggregate", and this -License does not apply to the other self-contained works thus compiled -with the Document, on account of their being thus compiled, if they -are not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one quarter -of the entire aggregate, the Document's Cover Texts may be placed on -covers that surround only the Document within the aggregate. -Otherwise they must appear on covers around the whole aggregate. - - -8. TRANSLATION - -Translation is considered a kind of modification, so you may -distribute translations of the Document under the terms of section 4. -Replacing Invariant Sections with translations requires special -permission from their copyright holders, but you may include -translations of some or all Invariant Sections in addition to the -original versions of these Invariant Sections. You may include a -translation of this License provided that you also include the -original English version of this License. In case of a disagreement -between the translation and the original English version of this -License, the original English version will prevail. - - -9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except -as expressly provided for under this License. Any other attempt to -copy, modify, sublicense or distribute the Document 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. - - -10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions -of the GNU Free Documentation 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. See -http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. -If the Document specifies that a particular numbered version of this -License "or any later version" applies to it, you have the option of -following the terms and conditions either of that specified version or -of any later version that has been published (not as a draft) by the -Free Software Foundation. If the Document does not specify a version -number of this License, you may choose any version ever published (not -as a draft) by the Free Software Foundation. - - -ADDENDUM: How to use this License for your documents - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and -license notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 - or any later version published by the Free Software Foundation; - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - A copy of the license is included in the section entitled "GNU - Free Documentation License". - -If you have no Invariant Sections, write "with no Invariant Sections" -instead of saying which ones are invariant. If you have no -Front-Cover Texts, write "no Front-Cover Texts" instead of -"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. - -If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, -to permit their use in free software. diff --git a/glabels2/COPYING-LIBGLABELS b/glabels2/COPYING-LIBGLABELS deleted file mode 100644 index cca7fc27..00000000 --- a/glabels2/COPYING-LIBGLABELS +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser 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 -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/glabels2/COPYING-TEMPLATES b/glabels2/COPYING-TEMPLATES deleted file mode 100644 index c25b8263..00000000 --- a/glabels2/COPYING-TEMPLATES +++ /dev/null @@ -1,25 +0,0 @@ -This license applies to the glabels template database, located -in the "templates" subdirectory of the glabels distribution. - -Copyright (c) 2001-2009 Jim Evins - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/glabels2/COPYING.README_FIRST b/glabels2/COPYING.README_FIRST deleted file mode 100644 index a864012e..00000000 --- a/glabels2/COPYING.README_FIRST +++ /dev/null @@ -1,50 +0,0 @@ -The gLabels official distribution is an aggregate of several components. -Each component is licensed as follows - - -GLABELS: - - The gLabels application core, and other portions of the official gLabels - distribution not explicitly licensed otherwise, are licensed under - the GNU GENERAL PUBLIC LICENSE (GPL); either version 3 of the License, or - (at your option) any later version -- see the 'COPYING' file in this - directory for details. - - -LIBGLABELS: - - The libglabels library, located in the "libglabels/" subdirectory, is - licensed under the GNU LESSER GENERAL PUBLIC LICENSE (LGPL); either - version 3 of the License, or (at your option) any later version -- see - the 'COPYING-LIBGLABELS' in this directory for details. - - -DOCUMENTATION: - - The gLabels and libglabels documentation, located in the "docs/" and "help/" - subdirectories, is licensed under the GNU FREE DOCUMENTATION LICENSE (GFDL) - with no Invariant Sections; either version 1.1 or (at your option) any - later version -- see 'COPYING-DOCS' in this directory for details. - - -TEMPLATE DATABASE: - - The XML files in the "templates/" subdirectory constitute the glabels - label database. No copyright is claimed on the facts contained within - the database. However, to clear up any ambiguity, the files themselves - are licensed using the MIT/X license -- see 'COPYING-TEMPLATES' in this - directory for details. - - -3RD PARTY COMPONENTS: - - The "barcode-0.98/" and "iec16022-0.2.1/" subdirectories contain 3rd party - libraries, each licensed under the GNU GENERAL PUBLIC LICENSE (GPL); either - version 2 of the License, or (at your option) any later version -- see the - 'LICENSE' or 'COPYING' file in each of these directories for details. - - The "qrencode-3.1.0/" subdirectory contains a 3rd party library, it is - licensed under the GNU LESSER GENERAL PUBLIC LICENSE (LGPL); either - version 2.1 of the License, or (at your option) any later version -- see the - 'COPYING' file in this subdirectory for details. - diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog deleted file mode 100644 index 694c9692..00000000 --- a/glabels2/ChangeLog +++ /dev/null @@ -1,5263 +0,0 @@ -2009-09-22 Jim Evins - - * po/POTFILES.in: - * src/Makefile.am: - * src/builder-util.c: - * src/builder-util.h: - * src/combo-util.c: - * src/combo-util.h: - * src/file-util.c: - * src/file-util.h: - * src/str-util.c: - * src/str-util.h: - Split "catch all" util module into separate modules for different - domains of utilities. - * src/file.c: (gl_file_open_real), (save_as_response): - * src/glabels-batch.c: (main): - * src/label.c: (gl_label_get_short_name): - * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init), - (gl_merge_properties_dialog_construct): - * src/new-label-dialog.c: - * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page), - (gl_object_editor_set_bc_style), (gl_object_editor_set_bc_color): - * src/object-editor-data-page.c: - (gl_object_editor_prepare_data_page), (gl_object_editor_set_data): - * src/object-editor-edit-page.c: - (gl_object_editor_prepare_edit_page): - * src/object-editor-fill-page.c: - (gl_object_editor_prepare_fill_page), - (gl_object_editor_set_fill_color): - * src/object-editor-image-page.c: - (gl_object_editor_prepare_image_page), - (gl_object_editor_set_image): - * src/object-editor-line-page.c: - (gl_object_editor_prepare_line_page), - (gl_object_editor_set_line_color): - * src/object-editor-lsize-page.c: - (gl_object_editor_prepare_lsize_page): - * src/object-editor-position-page.c: - (gl_object_editor_prepare_position_page): - * src/object-editor-shadow-page.c: - (gl_object_editor_prepare_shadow_page), - (gl_object_editor_set_shadow_color): - * src/object-editor-size-page.c: - (gl_object_editor_prepare_size_page): - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page), - (gl_object_editor_set_text_color): - * src/object-editor.c: (gl_object_editor_init), - (gl_object_editor_set_key_names): - * src/prefs-dialog.c: (gl_prefs_dialog_construct), - (construct_locale_page), (construct_object_page): - * src/prefs-model.c: (gl_prefs_model_save_settings), - (gl_prefs_model_load_settings): - * src/print-op-dialog.c: (create_custom_widget_cb): - * src/template-designer.c: (construct_start_page), - (construct_name_page), (construct_pg_size_page), - (construct_shape_page), (construct_rect_size_page), - (construct_round_size_page), (construct_cd_size_page), - (construct_nlayouts_page), (construct_layout_page), - (construct_finish_page): - * src/ui-property-bar.c: (gl_ui_property_bar_construct): - * src/wdgt-media-select.c: (gl_wdgt_media_select_construct), - (gl_wdgt_media_select_set_filter_parameters), - (get_label_size_desc): - * src/window.c: (gl_window_new_from_file): - * src/xml-label-04.c: (xml04_parse_text_props): - * src/xml-label.c: (xml_parse_object_text), - (xml_parse_toplevel_span), (xml_create_object_text), - (xml_create_toplevel_span): - Reconciled all references to old utils module with new domain - specific utilities modules. - -2009-09-22 Jim Evins - - * po/POTFILES.in: - Include all (src/*.[ch]) source files. - * data/builder/merge-properties-dialog.builder: - * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init), - (gl_merge_properties_dialog_construct), (type_changed_cb): - - OK button now has default focus. - - Some formatting cleanup. - -2009-09-21 Jim Evins - - * po/POTFILES.in: - * data/builder/Makefile.am: - * data/builder/new-label-dialog.builder: - Removed trivial builder file for new label dialog. - * data/builder/wdgt-media-select.builder: - Changed focus behavior of widgets. - * src/new-label-dialog.c: (gl_new_label_dialog_init), - (gl_new_label_dialog_construct): - - Removed use of trivial builder file -- populate explicitely. - - Moved population code to init. - - OK button now has default focus. - - Some formatting cleanup. - -2009-09-19 Jim Evins - - * COPYING: - Updated to GPL3 text. - * COPYING-LIBGLABELS: - Updated to LGPL3 text. - * COPYING-TEMPLATES: - New MIT/X license file for templates subdirectory. - * COPYING.README_FIRST: - Updated licensing information. - * templates/Makefile.am: - * templates/avery-iso-templates.xml: - * templates/avery-other-templates.xml: - * templates/avery-us-templates.xml: - * templates/brother-other-templates.xml: - * templates/categories.xml: - * templates/dymo-other-templates.xml: - * templates/glabels-2.2.dtd: - * templates/misc-iso-templates.xml: - * templates/misc-other-templates.xml: - * templates/misc-us-templates.xml: - * templates/paper-sizes.xml: - * templates/zweckform-iso-templates.xml: - - Added MIT/X license notice to database files. - - Moved from data subdirectory. - * configure.in: - * po/POTFILES.in: - * Makefile.am: - * data/Makefile.am: - Updated to reflect above move. - -2009-09-19 Jim Evins - - * libglabels/category.c: - * libglabels/category.h: - * libglabels/db.c: - * libglabels/db.h: - * libglabels/enums.h: - * libglabels/libglabels-private.h: - * libglabels/libglabels.h: - * libglabels/paper.c: - * libglabels/paper.h: - * libglabels/str.c: - * libglabels/str.h: - * libglabels/template.c: - * libglabels/template.h: - * libglabels/xml-category.c: - * libglabels/xml-category.h: - * libglabels/xml-paper.c: - * libglabels/xml-paper.h: - * libglabels/xml-template.c: - * libglabels/xml-template.h: - * libglabels/xml.c: - * libglabels/xml.h: - - Cleaned up GTK/GLIB includes. - - Updated license notification to LGPL3+. - -2009-09-18 Jim Evins - - * po/POTFILES.in: - Added missing file. - * src/mini-preview.h: - * src/mini-preview.c: (gl_mini_preview_class_init), - (gl_mini_preview_finalize), (gl_mini_preview_set_by_name), - (gl_mini_preview_highlight_range), (gl_mini_preview_set_label), - (gl_mini_preview_set_page), (gl_mini_preview_set_n_sheets), - (gl_mini_preview_set_n_copies), (gl_mini_preview_set_first), - (gl_mini_preview_set_last), (gl_mini_preview_set_collate_flag), - (gl_mini_preview_set_outline_flag), - (gl_mini_preview_set_reverse_flag), - (gl_mini_preview_set_crop_marks_flag), (button_release_event_cb), - (expose_event_cb), (redraw), (draw), (draw_labels), - (draw_rich_preview): - Added rich preview capability to mini preview. - * src/print-op-dialog.c: (create_custom_widget_cb), - (simple_sheets_radio_cb), (simple_first_spin_cb), - (simple_last_spin_cb), (preview_pressed_cb), (preview_released_cb), - (merge_spin_cb), (merge_collate_check_cb), (preview_clicked_cb), - (option_toggled_cb): - Use new rich preview capability of mini preview in print dialog. - -2009-09-17 Jim Evins - - * src/stock.c: (add_icons), (add_button_icon): - Use proper free function for GtkIconSource (gtk_icon_source_free() not g_free()). - Patch provided by Christian Persch . - -2009-09-17 Jim Evins - - * libglabels/category.h: - * libglabels/db.h: - * libglabels/paper.h: - * libglabels/template.h: - * libglabels/xml-category.h: - * libglabels/xml-paper.h: - * libglabels/xml.h: - Cleaned up GTK/GLIB includes. - * src/bc-gnubarcode.c: - * src/bc-gnubarcode.h: - * src/bc-iec16022.c: - * src/bc-iec16022.h: - * src/bc-iec18004.c: - * src/bc-iec18004.h: - * src/bc-postnet.c: - * src/bc-postnet.h: - * src/bc.c: - * src/bc.h: - * src/cairo-ellipse-path.c: - * src/cairo-ellipse-path.h: - * src/cairo-label-path.c: - * src/cairo-label-path.h: - * src/cairo-markup-path.c: - * src/cairo-markup-path.h: - * src/color-combo-button.c: - * src/color-combo-button.h: - * src/color-combo-color-menu-item.c: - * src/color-combo-color-menu-item.h: - * src/color-combo-history.c: - * src/color-combo-menu.c: - * src/color-combo-menu.h: - * src/color-combo.c: - * src/color-combo.h: - * src/color-swatch.c: - * src/color-swatch.h: - * src/color.c: - * src/color.h: - * src/critical-error-handler.c: - * src/critical-error-handler.h: - * src/debug.c: - * src/debug.h: - * src/file.c: - * src/file.h: - * src/font-combo-menu-item.c: - * src/font-combo-menu-item.h: - * src/font-combo-menu.c: - * src/font-combo-menu.h: - * src/font-combo.c: - * src/font-combo.h: - * src/font-sample.h: - * src/font-util.c: - * src/font-util.h: - * src/glabels-batch.c: - * src/glabels.c: - * src/hig.h: - * src/label-barcode.c: - * src/label-barcode.h: - * src/label-box.c: - * src/label-box.h: - * src/label-ellipse.c: - * src/label-ellipse.h: - * src/label-image.c: - * src/label-image.h: - * src/label-line.c: - * src/label-line.h: - * src/label-object.c: - * src/label-object.h: - * src/label-text.c: - * src/label-text.h: - * src/label.c: - * src/label.h: - * src/merge-evolution.c: - * src/merge-evolution.h: - * src/merge-init.c: - * src/merge-init.h: - * src/merge-properties-dialog.c: - * src/merge-properties-dialog.h: - * src/merge-text.c: - * src/merge-text.h: - * src/merge-vcard.c: - * src/merge-vcard.h: - * src/merge.c: - * src/merge.h: - * src/mini-label-preview.c: - * src/mini-label-preview.h: - * src/mini-preview-pixbuf-cache.c: - * src/mini-preview-pixbuf-cache.h: - * src/mini-preview-pixbuf.c: - * src/mini-preview-pixbuf.h: - * src/mini-preview.c: - * src/new-label-dialog.c: - * src/new-label-dialog.h: - * src/object-editor-bc-page.c: - * src/object-editor-data-page.c: - * src/object-editor-fill-page.c: - * src/object-editor-image-page.c: - * src/object-editor-line-page.c: - * src/object-editor-lsize-page.c: - * src/object-editor-position-page.c: - * src/object-editor-private.h: - * src/object-editor-shadow-page.c: - * src/object-editor-size-page.c: - * src/object-editor-text-page.c: - * src/object-editor.c: - * src/object-editor.h: - * src/pixbuf-cache.c: - * src/pixbuf-cache.h: - * src/prefs-dialog.c: - * src/prefs-dialog.h: - * src/prefs-model.c: - * src/prefs-model.h: - * src/prefs.c: - * src/prefs.h: - * src/print-op-dialog.c: - * src/print-op.c: - * src/print-op.h: - * src/print.c: - * src/print.h: - * src/recent.c: - * src/recent.h: - * src/rotate-label-button.c: - * src/rotate-label-button.h: - * src/stock.c: - * src/stock.h: - * src/template-designer.c: - * src/template-designer.h: - * src/text-node.c: - * src/text-node.h: - * src/ui-commands.c: - * src/ui-commands.h: - * src/ui-property-bar.c: - * src/ui-property-bar.h: - * src/ui-sidebar.c: - * src/ui-sidebar.h: - * src/ui-util.c: - * src/ui-util.h: - * src/ui.c: - * src/ui.h: - * src/util.c: - * src/util.h: - * src/view-barcode.c: - * src/view-barcode.h: - * src/view-box.c: - * src/view-box.h: - * src/view-ellipse.c: - * src/view-ellipse.h: - * src/view-image.c: - * src/view-image.h: - * src/view-line.c: - * src/view-line.h: - * src/view-object.c: - * src/view-object.h: - * src/view-text.c: - * src/view-text.h: - * src/view.c: - * src/view.h: - * src/warning-handler.c: - * src/warning-handler.h: - * src/wdgt-chain-button.c: - * src/wdgt-chain-button.h: - * src/wdgt-media-select.c: - * src/wdgt-media-select.h: - * src/wdgt-merge-menu.c: - * src/wdgt-merge-menu.h: - * src/window.c: - * src/window.h: - * src/xml-label-04.c: - * src/xml-label-04.h: - * src/xml-label.c: - * src/xml-label.h: - Cleaned up GTK/GLIB includes. - Updated remainder of notices to GPL3+. - Simple formatting cleanup. - -2009-09-13 Jim Evins - - Refactored print operation subsystem. - - * src/print-op.c: - * src/print-op.h: - Basic GtkPrintOperation based class. Does not instantiate - custom widgets, so it can be used by glabels-batch without - the additional overhead. - * src/print-op-dialog.c: - * src/print-op-dialog.h: - New object derived from glPrintOp. This one is intended - to be used as a dialog and installs custom widgets. - glWdgtPrintCopies and glWdgtPrintMerge have been merged - into this object. - * src/wdgt-print-copies.c: - * src/wdgt-print-copies.h: - * src/wdgt-print-merge.c: - * src/wdgt-print-merge.h: - Deleted. - * src/Makefile.am: - Modified to reflect above additions and deletions. - * src/mini-preview.c: (gl_mini_preview_construct), - (gl_mini_preview_set_template), (set_transform_and_get_scale), - (button_press_event_cb), (motion_notify_event_cb), (draw): - Now scales with allocation. - * src/glabels-batch.c: (main): - * src/template-designer.c: (print_test_cb): - * src/ui-commands.c: (gl_ui_cmd_file_print): - Use above modifications. - * data/builder/print-op-dialog-custom-widget.builder: - New builder file for glPrintOpDialog custom widgets. - * data/builder/print-custom-widget.builder: - Deleted. - * data/builder/Makefile.am: - Modified to reflect above addition and deletion. - -2009-09-10 Jim Evins - - * src/Makefile.am: - * src/mini-label-preview.c: - * src/mini-label-preview.h: - Created new glMiniLabelPreview widget to support glRotateLabelButton. - * src/rotate-label-button.c: - * src/rotate-label-button.h: - Renamed glWdgtRotateLabel to glRotateLabelButton. - * src/new-label-dialog.c: (gl_new_label_dialog_construct), - (template_changed_cb), (gl_new_label_dialog_get_rotate_state), - (gl_new_label_dialog_set_rotate_state): - Propogated above renaming. - * src/mini-preview.c: (gl_mini_preview_set_template), (draw), - (draw_shadow), (draw_paper), (draw_labels): - Use GtkStyle for colors instead of hardcoded ones. - -2009-09-09 Jim Evins - - * configure.in: - * Makefile.am: - * src/Makefile.am: - * src/stock-pixmaps/Makefile.am: - * qrencode-3.1.0/Makefile.am - * data/desktop/glabels.desktop.in: - * docs/libglabels/libglabels-decl-list.txt: - Various build system fixes and cleanup. - -2009-09-08 Jim Evins - - * src/font-util.c: (gl_font_util_validate_family): - * src/font-util.h: - Added gl_font_util_validate_family(). - * src/font-combo.c: (gl_font_combo_class_init), - (gl_font_combo_new), (gl_font_combo_set_family): - Use gl_font_util_validate_family() when setting family. - * src/label-text.c: (set_font_family): - * src/prefs-dialog.c: (construct_object_page), - (update_object_page_from_prefs): - * src/ui-property-bar.c: (gl_ui_property_bar_construct), - (reset_to_default_properties): - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page), - (gl_object_editor_set_font_family): - Removed code obsoleted by the addition of gl_font_util_validate_family(). - * src/color-swatch.c: (gl_color_swatch_class_init), (style_set_cb), - (draw_swatch): - * src/font-sample.c: (gl_font_sample_class_init), (style_set_cb), - (draw_sample): - Added handler for style_set event. - * src/color-combo-button.c: (gl_color_combo_button_class_init): - * src/color-combo-color-menu-item.c: - (gl_color_combo_color_menu_item_class_init): - * src/color-combo-history.c: (gl_color_combo_history_class_init): - * src/color-combo-menu.c: (map_event_cb): - * src/color-combo.c: (gl_color_combo_class_init), - (gl_color_combo_new): - * src/font-combo-menu-item.c: (gl_font_combo_menu_item_class_init): - * src/font-combo-menu.c: (gl_font_combo_menu_class_init): - * src/wdgt-rotate-label.c: (create_pixbuf): - Various cleanups -- mostly removing unused variables. - -2009-09-07 Jim Evins - - Created new glFontCombo widget family subsystem + minor refinements to glColorCombo - widget family. - - * src/color-combo-button.c: - * src/color-combo-button.h: - Renamed ColorButton to ColorComboButton. - * src/color.h: - Added GL_COLOR_WHITE macro. - * src/color-combo.c: (gl_color_combo_init): - Minor cleanup. - * src/Makefile.am: - * src/font-combo.c: - * src/font-combo.h: - * src/font-combo-menu.c: - * src/font-combo-menu.h: - * src/font-combo-menu-item.c: - * src/font-combo-menu-item.h: - * src/font-sample.c: - * src/font-sample.h: - * src/font-util.c: - * src/font-util.h: - New FontCombo subsystem. - * src/util.c: - * src/util.h: - Moved font functions to font-util.[ch]. - * data/builder/object-editor.builder: - * data/builder/prefs-dialog.builder: - * data/builder/property-bar.builder: - * src/label-text.c: (set_font_family): - * src/object-editor-private.h: - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page), - (gl_object_editor_set_font_family), - (gl_object_editor_get_font_family): - * src/prefs-dialog.c: (construct_object_page), - (update_object_page_from_prefs), (update_prefs_from_object_page): - * src/ui-property-bar.c: (gl_ui_property_bar_construct), - (reset_to_default_properties), (update_text_properties), - (update_fill_color), (update_line_color), (font_family_changed_cb), - (text_color_changed_cb), (fill_color_changed_cb), - (line_color_changed_cb): - Incorporated new FontCombo subsystem. - * po/POTFILES.in: - Reconciled with above changes/additions. - -2009-09-06 Jim Evins - - * src/color-button.c: (gl_color_button_finalize): - Unreference menu in finalize. - -2009-09-06 Jim Evins - - Some major refinements to the glColorCombo family of widgets. - - * src/Makefile.am: - * src/color-button.c: - * src/color-button.h: - New widget: glColorButton. This widget is a button that applies - the currently selected color with a ColorCombo type dropdown button - to change that selected color. This is basically the old - glColorCombo widget. - * src/color-combo.c: (gl_color_combo_init), - (gl_color_combo_finalize), (gl_color_combo_new), - (button_press_event_cb), (menu_color_changed_cb), - (menu_selection_done_cb): - * src/color-combo.h: - The glColorCombo widget has been modified to be a single button - that is only used to change the selected color. - * src/color-swatch.c: (gl_color_swatch_init), (expose_event_cb): - Draw on parent containers window to allow an effective - transparency. - * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page): - * src/object-editor-fill-page.c: - (gl_object_editor_prepare_fill_page): - * src/object-editor-line-page.c: - (gl_object_editor_prepare_line_page): - * src/object-editor-shadow-page.c: - (gl_object_editor_prepare_shadow_page): - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page): - * src/prefs-dialog.c: (construct_object_page): - Change how ColorCombos are packed so that they don't - expand to fill hbox. - * src/ui-property-bar.c: (gl_ui_property_bar_construct), - (reset_to_default_properties), (update_text_properties), - (update_fill_color), (update_line_color), (text_color_changed_cb), - (fill_color_changed_cb), (line_color_changed_cb), - (set_doc_items_sensitive), (set_text_items_sensitive), - (set_fill_items_sensitive), (set_line_color_items_sensitive): - The property bar now uses the new glColorButton instead of - glColorCombo. - -2009-09-02 Jim Evins - - * src/Makefile.am: - * src/wdgt-mini-preview.c: - * src/wdgt-mini-preview.h: - * src/mini-preview.h: - * src/mini-preview.c: - - Renamed WdgtMiniPreview to MiniPreview. - - Style cleanup. - - Modified to draw to parent window to be effectively transparent. - - Updated license notification to gpl3+. - * src/template-designer.c: (construct_layout_page), - (layout_page_prepare_cb), (layout_page_changed_cb): - * src/wdgt-print-copies.c: (gl_wdgt_print_copies_construct), - (sheets_radio_cb), (first_spin_cb), (last_spin_cb), - (preview_pressed): - * src/wdgt-print-merge.c: (gl_wdgt_print_merge_construct), - (spin_cb), (preview_clicked), (gl_wdgt_print_merge_set_copies): - - Reconciled with rename above. - -2009-09-01 Jim Evins - - * data/builder/object-editor.builder: - Fixed errant expansion of tab. - * src/bc-gnubarcode.c: (gl_barcode_gnubarcode_new): - * src/bc-postnet.c: (gl_barcode_postnet_new): - * src/bc.c: (id_to_index), (name_to_index): - * src/label-barcode.c: (gl_label_barcode_set_props): - * src/label-text.c: (set_font_family): - * src/merge-properties-dialog.c: - (gl_merge_properties_dialog_construct): - * src/merge.c: (gl_merge_description_to_name): - * src/new-label-dialog.c: - * src/object-editor-edit-page.c: - * src/object-editor-image-page.c: (update_preview_cb): - * src/object-editor-lsize-page.c: - * src/object-editor-position-page.c: - * src/object-editor-size-page.c: - * src/object-editor.c: (gl_object_editor_new): - * src/prefs-dialog.c: (update_locale_page_from_prefs): - * src/prefs-model.c: (string_to_units): - * src/print-op.c: (create_custom_widget_cb): - * src/template-designer.c: (gl_template_designer_init), - (pg_size_page_changed_cb), (build_template): - * src/ui-commands.c: (gl_ui_cmd_help_about): - * src/xml-label.c: (xml_parse_pixdata): - Fixed various deprecations as of Gtk-2.16. - -2009-08-31 Jim Evins - - * po/fr.po: - Updated french translation (Claude Paroz) - -2009-08-31 Jim Evins - - * data/builder/property-bar.builder: - Make sure event box does not obscure tool bar background. - * src/Makefile.am: - * src/color-swatch.c: - * src/color-swatch.h: - New color swatch widget. - * src/color-combo-color-menu-item.c: - (gl_color_combo_color_menu_item_init), - (gl_color_combo_color_menu_item_new), - (gl_color_combo_color_menu_item_set_color): - * src/color-combo.c: (gl_color_combo_init), - (gl_color_combo_finalize), (gl_color_combo_new), - (gl_color_combo_set_color), (menu_color_changed_cb): - Updated to use new color swatch widget. - -2009-08-26 Jim Evins - - * po/POTFILES.in: - Explicitely mark file types. Removed unneeded file from - libbarcode. - -2009-08-23 Jim Evins - - * data/builder/Makefile.am: - * data/builder/merge-properties-dialog.builder: - * data/builder/merge-properties-dialog.glade: - * data/builder/new-label-dialog.builder: - * data/builder/new-label-dialog.glade: - * data/builder/object-editor.builder: - * data/builder/object-editor.glade: - * data/builder/prefs-dialog.builder: - * data/builder/prefs-dialog.glade: - * data/builder/print-custom-widget.builder: - * data/builder/print-custom-widget.glade: - * data/builder/property-bar.builder: - * data/builder/property-bar.glade: - * data/builder/template-designer.builder: - * data/builder/template-designer.glade: - * data/builder/wdgt-media-select.builder: - * data/builder/wdgt-media-select.glade: - * po/POTFILES.in: - * src/merge-properties-dialog.c: - (gl_merge_properties_dialog_finalize), - (gl_merge_properties_dialog_construct): - * src/new-label-dialog.c: (gl_new_label_dialog_finalize), - (gl_new_label_dialog_construct): - * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page): - * src/object-editor-data-page.c: - (gl_object_editor_prepare_data_page): - * src/object-editor-edit-page.c: - (gl_object_editor_prepare_edit_page): - * src/object-editor-fill-page.c: - (gl_object_editor_prepare_fill_page): - * src/object-editor-image-page.c: - (gl_object_editor_prepare_image_page): - * src/object-editor-line-page.c: - (gl_object_editor_prepare_line_page): - * src/object-editor-lsize-page.c: - (gl_object_editor_prepare_lsize_page): - * src/object-editor-position-page.c: - (gl_object_editor_prepare_position_page): - * src/object-editor-private.h: - * src/object-editor-shadow-page.c: - (gl_object_editor_prepare_shadow_page): - * src/object-editor-size-page.c: - (gl_object_editor_prepare_size_page): - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page): - * src/object-editor.c: (gl_object_editor_init), - (gl_object_editor_finalize): - * src/prefs-dialog.c: (gl_prefs_dialog_init), - (gl_prefs_dialog_finalize), (gl_prefs_dialog_construct), - (construct_locale_page), (construct_object_page): - * src/print-op.c: (gl_print_op_finalize), - (gl_print_op_set_settings), (create_custom_widget_cb): - * src/template-designer.c: (gl_template_designer_init), - (gl_template_designer_finalize), (construct_start_page), - (construct_name_page), (construct_pg_size_page), - (construct_shape_page), (construct_rect_size_page), - (construct_round_size_page), (construct_cd_size_page), - (construct_nlayouts_page), (construct_layout_page), - (construct_finish_page): - * src/ui-property-bar.c: (gl_ui_property_bar_finalize), - (gl_ui_property_bar_construct): - * src/wdgt-media-select.c: (gl_wdgt_media_select_finalize), - (gl_wdgt_media_select_construct): - Builder files no longer built from glade files. Also did some - cleanup on formatting and update license notifications to GPL3+. - -2009-08-13 Jim Evins - - * src/color-combo-color-menu-item.c: - (gl_color_combo_color_menu_item_init), - (gl_color_combo_color_menu_item_new), - (gl_color_combo_color_menu_item_set_color): - Explicitly request size of menu item and enlarge color swatch. - -2009-08-12 Jim Evins - - * src/label-text.c: (buffer_changed_cb), (draw_object), - (draw_shadow), (draw_text_real): - * src/label-text.h: - Moved common code from draw_object() and draw_shadow() to - draw_text_real(). Also cleaned up formatting and updated - license notification to GPL3+. - -2009-07-29 Alexandre Prokoudine - - * po/ru.po: Updated and fixed Russian translation - -2009-07-26 Jim Evins - - * AUTHORS: - * COPYING.README_FIRST: - * Makefile.am: - * configure.in: - * qrencode-3.1.0/* - Added 3rd party qrencode library. - * src/Makefile.am: - * src/bc-iec18004.c: (gl_barcode_iec18004_new), (render_iec18004): - * src/bc-iec18004.h: - * src/bc.c: - Added IEC18004 (QRCode) 2 dimensional barcode backend. - Patch provided by Daniel Mueller . - -2009-07-25 Jim Evins - - * src/xml-label.c: (gl_xml_label_open): - Relax limits when parsing file. Allows large embedded image - files. - -2009-05-19 Jim Evins - - * configure.in: - * po/LINGUAS: - Moved translation list from configure.in to po/LINGUAS. - -2009-05-19 Jim Evins - - * configure.in: - * po/zh_CN.po: - New Chinese translation (Careon ). - * AUTHORS: - Added above translation to acknowledgements. - -2009-05-18 Jim Evins - - * src/prefs-model.c: (gl_prefs_model_load_settings): - Make an educated guess at locale settings when run for the - first time. - -2009-05-17 Jim Evins - - * help/de/de.po: - * help/glabels.omf.in: - Adding missing files from last checkin. - -2009-05-17 Jim Evins - - * Makefile.am: - * configure.in: - * help/C/glabels-C.omf: - * help/C/glabels.xml: - * help/Makefile.am: - * po/de.po: - Updated german translation, gnome-doc-utils support and - german translation of glabels manual (Mario Blättermann). - -2009-05-01 Jim Evins - - * AUTHORS: - * configure.in: - * po/ca.po: - Added catalan translation (David Planella). - -2009-04-29 Jim Evins - - * data/templates/avery-iso-templates.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/misc-us-templates.xml: - Caught up on user submitted templates. - * AUTHORS: - Acknowledgements for above templates. - -2009-04-29 Jim Evins - - * po/POTFILES.in: - * po/de.po: - Updated german translation (Mario Blättermann). - -2009-03-23 Jim Evins - - * src/glabels-batch.c: (main): - * src/glabels.c: (main): - Tidy up help option output. - -2009-02-28 Jim Evins - - * src/Makefile.am: - * src/base64.c: - * src/base64.h: - Deleted base64 module. - * src/xml-label.c: (xml_parse_pixdata), (xml_create_pixdata): - Use base64 encode/decode from glib. - -2009-02-22 Jim Evins - - * src/merge-properties-dialog.h: - * src/new-label-dialog.h: - * src/object-editor.h: - * src/prefs-dialog.h: - * src/print-op.h: - * src/template-designer.h: - Corrected cut&paste errors. - -2009-02-21 JimEvins - - * src/prefs-model.c: (gl_prefs_model_save_settings), - (gl_prefs_model_load_settings): - * src/prefs-model.h: - * src/ui-commands.c: - * src/ui-property-bar.c: - * src/ui.c: (view_ui_item_toggled_cb), - (set_app_main_toolbar_style), (set_app_drawing_toolbar_style): - Removed tooltip toggling capability, which wasn't working - anyway. - -2009-02-21 JimEvins - - * README: - * configure.in: - * data/builder/object-editor.glade: - * data/builder/prefs-dialog.glade: - * data/builder/property-bar.glade: - * data/builder/template-designer.glade: - * gtk-doc.make: - * src/color-combo-color-menu-item.c: - * src/color-combo-color-menu-item.h: - * src/color-combo-menu.h: - * src/glabels-batch.c: (main): - * src/glabels.c: (main): - * src/merge-properties-dialog.h: - * src/new-label-dialog.h: - * src/object-editor-lsize-page.c: - (gl_object_editor_prepare_lsize_page), (lsize_prefs_changed_cb): - * src/object-editor.h: - * src/prefs-dialog.h: - * src/print-op.h: - * src/template-designer.h: - * src/ui-commands.c: (gl_ui_cmd_view_property_bar_tips_toggle), - (gl_ui_cmd_help_contents), (gl_ui_cmd_help_about): - * src/ui-property-bar.c: - * src/ui-property-bar.h: - * src/ui-sidebar.c: (gl_ui_sidebar_construct), - (selection_changed_cb): - * src/ui-sidebar.h: - * src/view.h: - * src/wdgt-media-select.h: - * src/wdgt-merge-menu.h: - * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_class_init): - * src/wdgt-mini-preview.h: - * src/wdgt-print-copies.c: (gl_wdgt_print_copies_construct): - * src/wdgt-print-copies.h: - * src/wdgt-print-merge.c: (gl_wdgt_print_merge_construct): - * src/wdgt-print-merge.h: - * src/wdgt-rotate-label.h: - * src/window.h: - Removed final dependencies on libgnome and libgnomeui. - Removed all currently deprecated symbols as of GTK 2.14. - -2009-01-07 Jim Evins - - * src/critical-error-handler.c: (critical_error_handler): - * src/ui-commands.c: (gl_ui_cmd_help_contents): - * src/warning-handler.c: (warning_handler): - * src/view.c: (selection_received_cb): - Compile without warning with additional CFLAGS of - -O1 -Wall -Wformat=2. - -2009-01-02 Jim Evins - - * COPYING.README_FIRST: - Fixed typo. - -2008-12-27 Jim Evins - - * data/templates/avery-iso-templates.xml: - * data/templates/avery-other-templates.xml: - * data/templates/avery-us-templates.xml: - * data/templates/brother-other-templates.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/misc-other-templates.xml: - * data/templates/zweckform-iso-templates.xml: - Make sure all descriptions are marked as translatable. - -2008-12-27 Jim Evins - - * de.po: - Updated german translation (Mario Blättermann) - * AUTHORS: - Updated credits to reflect above translation. - * data/builder/object-editor.glade: - * data/builder/prefs-dialog.glade: - * data/builder/template-designer.glade: - Removed "translatable" attribute from whitespace strings, - which are used only to help layout. - -2008-12-21 Jim Evins - - * data/templates/avery-us-templates.xml: - * data/templates/misc-iso-templates.xml: - A couple of recent template submissions. - * AUTHORS: - Acknowledgements for above templates. - -2008-12-21 Jim Evins - - * src/view.c: (motion_notify_event_cb), (button_press_event_cb): - Don't check for handles on aggregate selections. - -2008-12-20 Jim Evins - - * configure.in: - Updated prerequisite library versions required. - -2008-12-18 Jim Evins - - * src/view.c: (selection_received_cb): - Fixed paste bug that caused a duplicate phantom view_object to be created for - each new label_object. This is because the view now (as of r673) the view - monitiors the label for new objects and creates view_objects automatically. - -2008-12-14 Jim Evins - - * src/ui.c: (gl_ui_new): - Bug #2395628. Fixed i18n for application shell. - * po/POTFILES.in: - Bug #2395628. Reconciled POTFILES.in with current files. - -2008-12-14 Jim Evins - - * configure.in: - Bug #2316013. Added PKG_PROG_PKG_CONFIG. - -2008-11-15 Jim Evins - - * libglabels/db.c: (lgl_db_register_template): - * libglabels/xml-template.c: - (lgl_xml_template_parse_template_node): - * src/glabels-batch.c: - * src/view-text.c: (gl_view_text_create_button_press_event): - Fixed several issues such as possible use of uninitialized variables found with "-O1 -Wall". - -2008-11-09 Jim Evins - - * data/templates/misc-iso-templates.xml: - Another user submitted template. - -2008-10-27 Jim Evins - - * data/templates/avery-us-templates.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/zweckform-iso-templates.xml: - Caught up on user submitted templates. - * AUTHORS: - Acknowledgements for above templates. - -2008-10-23 Jim Evins - - * src/label-text.c: (set_font_family): - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page), - (gl_object_editor_set_font_family): - * src/prefs-dialog.c: (construct_object_page), - (update_object_page_from_prefs): - * src/ui-property-bar.c: (gl_ui_property_bar_construct), - (reset_to_default_properties): - * src/util.c: (gl_util_get_font_family_list): - * src/util.h: - Bug #1902275 and Bug #2186214. Cache font list so that it is not re-created - everytime the list is requested. - * src/object-editor-text-page.c: - (gl_object_editor_set_font_family): - Don't change font-family if it hasn't actually changed. - -2008-10-19 Jim Evins - - * data/builder/object-editor.glade: - Some tweaking of builder/glade widgets. - -2008-10-18 Jim Evins - - Migrated all use of libglade to GtkBuilder. - - * data/glade/Makefile.am: - * data/glade/merge-properties-dialog.glade: - * data/glade/new-label-dialog.glade: - * data/glade/object-editor.glade: - * data/glade/prefs-dialog.glade: - * data/glade/print-custom-widget.glade: - * data/glade/property-bar.glade: - * data/glade/template-designer.glade: - * data/glade/wdgt-media-select.glade: - Removed data/glade directory. - * data/builder/Makefile.am: - * data/builder/merge-properties-dialog.glade: - * data/builder/new-label-dialog.glade: - * data/builder/object-editor.glade: - * data/builder/prefs-dialog.glade: - * data/builder/print-custom-widget.glade: - * data/builder/property-bar.glade: - * data/builder/template-designer.glade: - * data/builder/wdgt-media-select.glade: - Added data/builder directory. - * configure.in: - * data/Makefile.am: - * src/Makefile.am: - Change glade to builder. - * src/merge-properties-dialog.c: - (gl_merge_properties_dialog_finalize), - (gl_merge_properties_dialog_construct): - * src/new-label-dialog.c: (gl_new_label_dialog_finalize), - (gl_new_label_dialog_construct): - * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page): - * src/object-editor-data-page.c: - (gl_object_editor_prepare_data_page): - * src/object-editor-edit-page.c: - (gl_object_editor_prepare_edit_page): - * src/object-editor-fill-page.c: - (gl_object_editor_prepare_fill_page): - * src/object-editor-image-page.c: - (gl_object_editor_prepare_image_page): - * src/object-editor-line-page.c: - (gl_object_editor_prepare_line_page): - * src/object-editor-lsize-page.c: - (gl_object_editor_prepare_lsize_page): - * src/object-editor-position-page.c: - (gl_object_editor_prepare_position_page): - * src/object-editor-private.h: - * src/object-editor-shadow-page.c: - (gl_object_editor_prepare_shadow_page): - * src/object-editor-size-page.c: - (gl_object_editor_prepare_size_page): - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page): - * src/object-editor.c: (gl_object_editor_init): - * src/prefs-dialog.c: (gl_prefs_dialog_init), - (gl_prefs_dialog_construct), (construct_locale_page), - (construct_object_page): - * src/print-op.c: (gl_print_op_finalize), - (create_custom_widget_cb): - * src/template-designer.c: (gl_template_designer_class_init), - (gl_template_designer_finalize), (gl_template_designer_construct), - (construct_start_page), (construct_name_page), - (construct_pg_size_page), (construct_shape_page), - (construct_rect_size_page), (construct_round_size_page), - (construct_cd_size_page), (construct_nlayouts_page), - (construct_layout_page), (construct_finish_page): - * src/template-designer.h: - * src/ui-property-bar.c: (gl_ui_property_bar_init), - (gl_ui_property_bar_finalize), (gl_ui_property_bar_new), - (gl_ui_property_bar_construct), (reset_to_default_properties), - (gl_ui_property_bar_set_view), (gl_ui_property_bar_set_tooltips), - (update_text_properties), (update_fill_color), (update_line_color), - (update_line_width), (selection_changed_cb), - (font_family_changed_cb), (font_size_changed_cb), - (text_color_changed_cb), (fill_color_changed_cb), - (line_color_changed_cb), (line_width_changed_cb), - (font_bold_toggled_cb), (font_italic_toggled_cb), - (text_align_toggled_cb), (set_doc_items_sensitive), - (set_text_items_sensitive), (set_fill_items_sensitive), - (set_line_color_items_sensitive), (set_line_width_items_sensitive): - * src/ui-property-bar.h: - * src/util.c: (gl_util_get_builder_widgets): - * src/util.h: - * src/wdgt-media-select.c: (gl_wdgt_media_select_finalize), - (gl_wdgt_media_select_construct): - Migration of glade to builder. - * src/color.h: - New macros for color combo initialization. - * TODO: - Added idea for internal merge database. - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/paper.sgml: - * gtk-doc.make: - Automagic. - -2008-10-12 Jim Evins - - * src/mygal/Makefile.am: - * src/mygal/color-group.c: - * src/mygal/color-group.h: - * src/mygal/color-palette.c: - * src/mygal/color-palette.h: - * src/mygal/e-colors.c: - * src/mygal/e-colors.h: - * src/mygal/e-marshal.list: - * src/mygal/e-util.h: - * src/mygal/mygal-combo-box.c: - * src/mygal/mygal-combo-box.h: - * src/mygal/widget-color-combo.c: - * src/mygal/widget-color-combo.h: - * AUTHORS: - * configure.in: - Deleted mygal. - * src/color-combo.c: - * src/color-combo.h: - * src/color-combo-color-menu-item.c: - * src/color-combo-color-menu-item.h: - * src/color-combo-history.c: - * src/color-combo-history.h: - * src/color-combo-menu.c: - * src/color-combo-menu.h: - * src/marshal.list: - * src/util.c: - * src/util.h: - * src/Makefile.am: - Created new glColorCombo widget. - * src/object-editor-bc-page.c: - * src/object-editor-edit-page.c: - * src/object-editor-fill-page.c: - * src/object-editor-line-page.c: - * src/object-editor-shadow-page.c: - * src/object-editor-text-page.c: - * src/object-editor.c: - * src/prefs-dialog.c: - * src/ui-property-bar.c: - Replaced use of mygal color combo with new glColorCombo widget. - -2008-08-29 Jim Evins - - * src/file.c: (gl_file_open), (gl_file_save_as): - Bug #2069668. Corrected button order in Open and "Save as" - dialogs. - -2008-08-17 Jim Evins - - * data/dtd/glabels-2.2.dtd: - * data/templates/paper-sizes.xml: - * libglabels/db.c: (lgl_db_init): - * libglabels/paper.c: (lgl_paper_new), (lgl_paper_dup), (lgl_paper_free): - * libglabels/paper.h: - * libglabels/xml-paper.c: (lgl_xml_paper_parse_paper_node): - * src/print-op.c: (set_page_size): - Bug #2049431. Always explicitely set page size. Added pwg_size field (PWG 5101.1-2002 - size specification) to the libglabels paper database to allow the page size to be - communicated to GtkPrintOp un-ambiguously. - -2008-07-25 Jim Evins - - * src/object-editor-size-page.c: (size_reset_cb), - (gl_object_editor_set_max_size): - Bug #1993550. Set size limits based on longest side of label. - -2008-07-19 Jim Evins - - * configure.in: - * src/mygal/Makefile.am: - Make sure libtool handles library dependencies for mygal - properly. - -2008-05-21 Jim Evins - - * src/glabels-batch.c: (main): - Bug #1968653. Initialize prefs subsystem. - -2008-05-09 Jim Evins - - * data/glade/object-editor.glade: - Bug #1959135. A couple of radio buttons somehow became - ungrouped. - -2008-04-07 Jim Evins - - * src/wdgt-rotate-label.h: - * src/wdgt-rotate-label.c: (gl_wdgt_rotate_label_init), - (gl_wdgt_rotate_label_new), (toggled_cb), (create_pixbuf), - (gl_wdgt_rotate_label_get_state), (gl_wdgt_rotate_label_set_state), - (gl_wdgt_rotate_label_set_template_name): - Modified wdgt-rotate-label to better indicate the rotation choices. - * data/glade/Makefile.am: - * data/glade/wdgt-rotate-label.glade: - Deleted wdgt-rotate-label.glade. - -2008-04-04 Jim Evins - - * data/templates/brother-other-templates.xml: - Added categories to existing templates. - * data/templates/misc-other-templates.xml: - Moved dymo templates to their own file. - * data/templates/Makefile.am: - * data/templates/dymo-other-templates.xml: - Additional dymo templates provided by Harald Welte . - * AUTHORS: - Acknowledgement for above templates. - -2008-03-24 Jim Evins - - * src/xml-label.c: (xml_doc_to_label): - Bug #1872584. Don't refuse to parse label file if namespace is - unrecognized -- it may be from a newer version of glabels. - -2008-03-15 Jim Evins - - * data/templates/Makefile.am: - * data/templates/brother-other-templates.xml: - Added brother templates. - * src/cairo-markup-path.c: (gl_cairo_markup_margin_rect_path), - (gl_cairo_markup_margin_cd_path): - * src/view.c: (draw_markup_layer): - Fixed markup drawing errors when label is rotated. - -2008-03-03 Jim Evins - - * configure.in: - * ko.po: - Added korean translation provided by xein@naver.com. - -2008-02-21 Jim Evins - - * src/ui.c: - Fixed typo that prevented "Save" from being deactivated when - document is not modified. - -2008-02-18 Jim Evins - - * src/prefs-model.c: (gl_prefs_model_save_settings), - (gl_prefs_model_load_settings): - Set default units for file output. - -2008-02-18 Jim Evins - - * help/C/glabels.xml: - Fixed example template. - -2008-02-16 Jim Evins - - * AUTHORS: - * data/templates/avery-iso-templates.xml: - * data/templates/avery-us-templates.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/misc-us-templates.xml: - Caught up on user submitted templates. - -2008-02-04 Jim Evins - - * src/view-image.c: (update_object_from_editor_cb): - Bug #1886438. Don't update the image size unless it is actually - triggered by a change in image source. The result of this bug - was that any attempt to edit the size spinboxes, immediately - reset the size. - -2008-02-03 Jim Evins - - * src/label-image.c: (gl_label_image_class_init), (set_size): - Enforce minimum size for images. - -2008-02-03 Jim Evins - - * src/object-editor-edit-page.c: (field_selected_cb): - * src/object-editor-lsize-page.c: (gl_object_editor_set_max_lsize): - * src/object-editor-private.h: - * src/object-editor-shadow-page.c: - (gl_object_editor_set_max_shadow_offset): - * src/object-editor-size-page.c: (gl_object_editor_set_max_size): - * src/object-editor.c: (gl_object_editor_finalize), - (gl_object_editor_new), (gl_object_notebook_construct_valist), - (label_changed_cb): - * src/object-editor.h: - * src/ui-sidebar.c: (gl_ui_sidebar_construct): - * src/view-barcode.c: (construct_properties_editor): - * src/view-box.c: (construct_properties_editor): - * src/view-ellipse.c: (construct_properties_editor): - * src/view-image.c: (construct_properties_editor): - * src/view-line.c: (construct_properties_editor): - * src/view-object.c: (gl_view_object_finalize): - * src/view-text.c: (construct_properties_editor), - Move update_editor_from_label callback from individual view objects - to the object editor, so that signals can be disconnected when - object editor is finalized. - * src/view-text.c: (gl_view_text_create_button_press_event): - Fixed bug that caused multiple view objects to be created for a - single text object. This bug would manifest itself as a crash - when deleting multi-object selections which included text objects. - -2008-02-02 Jim Evins - - * src/Makefile.am: - * src/wdgt-merge-menu.c: - * src/wdgt-merge-menu.h: - * src/debug.c: (gl_debug_init): - * src/debug.h: - * src/marshal.list: - New merge menu widget. - * data/glade/object-editor.glade: - * src/object-editor-private.h: - * src/object-editor.c: (gl_object_editor_set_key_names): - * src/object-editor-edit-page.c: - (gl_object_editor_prepare_edit_page), (field_selected_cb), - (insert_button_cb): - Simplified UI for inserting fields into text objects by launching - a merge menu and directly inserting fields from the menu. No more - selecting field in combobox, then pressing insert button. - -2008-01-31 Jim Evins - - * src/label-barcode.c: (draw_object): - Fixed rendering problem when "Invalid data" is displayed when text - object is lower in stacking order. - -2008-01-30 Jim Evins - - * src/label-text.c: (get_size), (draw_object), (draw_shadow): - Don't turn off cairo_hint_metrics. This causes serious issues with - bitmap fonts. - -2008-01-29 Jim Evins - - * src/print-op.c: (gl_print_op_construct), - (gl_print_op_construct_batch), (set_page_size): - Explicitly set page size for "other" page sizes. - -2008-01-25 Jim Evins - - * src/bc.c: - Fixed Code128C backend parameters. - * src/label-barcode.c: (get_size): - Bug #1766425. If barcode is not renderable with either - input data or default data, use a default size. Also - fixed small leak. - -2008-01-16 Jim Evins - - * src/print.c: (print_label): - Bug #1872568. Don't apply special transforms (rotate and - mirror) to clipping region or outline. - -2008-01-01 Jim Evins - - * src/util.c: - Sort font lists alphabetically. - -2008-01-01 Jim Evins - - * src/merge-evolution.c: - Do a case-insensitive sort. - -2008-01-01 Jim Evins - - * src/merge-evolution.c: - Sort evolution by "file_under" field. Original patch provided - by Peter Cherriman in - Patch #1860423. - * AUTHORS: - Added acknowledgement for above patch. - -2008-01-01 Jim Evins - - * NEWS: - * configure.in: - * glabels.spec.in: - Reconcile with 2.2 branch. - - -2007-12-21 Jim Evins - - * COPYING.LIBGLABELS: - * COPYING.README_FIRST: - * README: - Updating license information to make more complete and understandable. - -2007-12-16 Jim Evins - - * configure.in: - Updated version to 2.pre2. - * help/C/glabels.xml: - Updated documentation. - * src/ui-commands.c: (gl_ui_cmd_help_about): - Updated copyright string. - -2007-12-15 Jim Evins - - * data/glade/object-editor.glade: - Removed any GtkTable that contained a GtkComboBox because the size of - the combo box was not constrained properly. This sacrifices the nice - orderly labels for combo boxes that don't extend beyond the edge of the - window. - -2007-12-15 Jim Evins - - * libglabels/db.c: (lgl_db_lookup_template_from_name): - * src/object-editor.c: (gl_object_editor_finalize): - * src/wdgt-media-select.c: (gl_wdgt_media_select_finalize): - Fixed several small memory leaks. - -2007-12-14 Jim Evins - - * libglabels/db.c: - Optimize template search by name by using a GHashTable. - * src/mini-preview-pixbuf-cache.c: - * src/mini-preview-pixbuf-cache.h: - Store one pixbuf per template, but use a key for each alias. - * src/wdgt-media-select.c: - Optimize loading of tree data, thus optimizing the "new label" dialog. - -2007-12-12 Jim Evins - - * data/templates/avery-us-templates.xml: - More templates and aliases. - -2007-12-08 Jim Evins - - * TODO: - More prep for 2.1.5/2.2.0. - -2007-12-08 Jim Evins - - * NEWS: - * README: - * TODO: - * configure.in: - Preparation for 2.1.5. - -2007-12-08 Jim Evins - - * docs/libglabels/libglabels-decl-list.txt: - * docs/libglabels/libglabels-docs.sgml: - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/db.sgml: - * docs/libglabels/tmpl/str.sgml: - * libglabels/str.c: - Documentation cleanup for libglabels. - -2007-11-29 Jim Evins - - * libglabels/db.h: - * libglabels/db.c: - Added lgl_db_does_template_name_exist(). - In lgl_db_lookup_template_from_name() substitute brand/part of new template from - requested alias. - * src/prefs-model.c: - Proof read recent templates -- make sure they still exist. - * src/wdgt-media-select.c: - Default to "search all templates" tab if no recent templates found. - -2007-11-28 Jim Evins - - * data/glade/wdgt-media-select.glade: - * src/wdgt-media-select.c: - Added tabbed notebook to allow selection of recent template versus searching the - entire database. - - -2007-11-26 Jim Evins - - * libglabels/Makefile.am: - * libglabels/libglabels.h: - Make str.h public. - * src/label.c: - * src/prefs-dialog.c: - * src/prefs-model.c: - * src/prefs-model.h: - * src/prefs.c: - * src/prefs.h: - Added tracking of recently used templates. - -2007-11-20 Jim Evins - - * data/glade/template-designer.glade: - * src/template-designer.c: - Added warning icon when match brand and part match an existing template. - -2007-11-18 Jim Evins - - * libglabels/Makefile.am: - * libglabels/str.h: - * libglabels/str.c: - Added lgl_str_utf8_casecmp(). - * libglabels/libglabels-private.h: - Use lgl_str_utf8_casecmp() for UTF8_EQUAL macro -- do case insensitive comparisons. - * libglabels/db.c: (lgl_db_get_brand_list): - Use lgl_str_utf8_casecmp() to determine if we have seen brand before when building - brand list. - -2007-11-18 Jim Evins - - * data/glade/template-designer.glade: - * src/template-designer.c: - Don't advance past name page, if brand and part match an existing template. - -2007-11-18 Jim Evins - - * libglabels/db.c: (lgl_db_register_template), (read_templates): - When registering a new template, don't add to "User defined" category before - writing to file. Add to "User defined" category when reading from "~/.glabels" - directory instead. This will allow legacy templates (and manually created - templates) to be automatically added to the "user defined" category. - * libglabels/xml-template.c: - (lgl_xml_template_create_template_node): - Fixed typo/bug causing brand to be wrong. - -2007-11-16 Jim Evins - - * libglabels/db.c: - * libglabels/db.h: - Added return codes to lgl_db_register_template(). Added lgl_db_does_template_exist() - function. Automatically create "User defined" category and add to all user - registered templates. - * libglabels/xml-template.c: - * libglabels/xml-template.h: - Return number of bytes written from lgl_xml_template_write_templates_to_file() and - lgl_xml_template_write_template_to_file(). - * docs/libglabels/libglabels-decl-list.txt: - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/db.sgml: - * docs/libglabels/tmpl/xml-template.sgml: - Update documentation to reflect above changes. - -2007-10-28 Jim Evins - - * libglabels/xml-template.c: - Remove any leading white space from part #s when parsing old names. - * src/mini-preview-pixbuf-cache.c: - If name isn't in cache add it. - -2007-10-26 Jim Evins - - * libglabels/Makefile.am: - * libglabels/category.c: - * libglabels/category.h: - * libglabels/db.c: - * libglabels/db.h: - * libglabels/libglabels-private.h: - * libglabels/libglabels.h: - * libglabels/paper.c: - * libglabels/paper.h: - * libglabels/template.c: - * libglabels/template.h: - * libglabels/xml-template.c: - Another pass at screwing with the libglabels API. Moved all - database related stuff to db.[ch]. - * docs/libglabels/libglabels-decl-list.txt: - * docs/libglabels/libglabels-docs.sgml: - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/category.sgml: - * docs/libglabels/tmpl/db.sgml: - * docs/libglabels/tmpl/init.sgml: - * docs/libglabels/tmpl/libglabels-unused.sgml: - * docs/libglabels/tmpl/paper.sgml: - * docs/libglabels/tmpl/template-construction.sgml: - * docs/libglabels/tmpl/template-db.sgml: - * docs/libglabels/tmpl/template-misc.sgml: - * docs/libglabels/tmpl/template-struct.sgml: - * docs/libglabels/tmpl/template.sgml: - Updated documentation to reflect above changes to libglabels API. - * src/file.c: - * src/glabels-batch.c: - * src/glabels.c: - * src/mini-preview-pixbuf-cache.c: - * src/prefs-model.c: - * src/print.c: - * src/template-designer.c: - * src/wdgt-media-select.c: - * src/wdgt-mini-preview.c: - * src/wdgt-rotate-label.c: - * src/xml-label-04.c: - * src/xml-label.c: - Reconciled usage with above libglabels API changes. - -2007-10-21 Jim Evins - - * data/glade/wdgt-media-select.glade: - * src/wdgt-media-select.c: - Added brand to filter settings. - -2007-10-21 Jim Evins - - * data/dtd/glabels-2.2.dtd: - Forgot to replace Alias name attribute with brand and part attributes. - * data/templates/avery-iso-templates.xml: - * data/templates/avery-other-templates.xml: - * data/templates/avery-us-templates.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/misc-other-templates.xml: - * data/templates/misc-us-templates.xml: - * data/templates/zweckform-iso-templates.xml: - Replaced all name attributes with brand/part attribute pairs. - -2007-10-20 Jim Evins - - * src/stock-pixmaps/*.png - Updated icons to use Tango color palette. - -2007-10-20 Jim Evins - - * data/dtd/Makefile.am: - * data/dtd/glabels-2.0.dtd: - * data/dtd/glabels-2.2.dtd: - Rename glabels-2.0.dtd to glabels-2.2.dtd. Added brand and part attributes to - template node. - * libglabels/template.c: - * libglabels/template.h: - * libglabels/xml-template.c: - * libglabels/xml.h: - Added brand and part attributes to template and alias structures and nodes. - * src/file.c: - * src/label.c: - * src/mini-preview-pixbuf-cache.c: - * src/template-designer.c: - * src/wdgt-media-select.c: - Use modified libglabels API. - * docs/libglabels/libglabels-decl-list.txt: - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/template-construction.sgml: - * docs/libglabels/tmpl/template-db.sgml: - * docs/libglabels/tmpl/template-struct.sgml: - Update libglabels documentation to reflect above modifications. - -2007-10-14 Jim Evins - - * docs/libglabels/libglabels-decl-list.txt: - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/category.sgml: - * libglabels/category.c: - * libglabels/category.h: - Added lgl_category_get_id_list() and lgl_category_free_id_list() to have - parity with paper functions. - -2007-10-12 Jim Evins - - * docs/libglabels/libglabels-decl-list.txt: - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/category.sgml: - * docs/libglabels/tmpl/enums.sgml: - * docs/libglabels/tmpl/libglabels-unused.sgml: - * docs/libglabels/tmpl/paper.sgml: - * docs/libglabels/tmpl/template-struct.sgml: - * libglabels/init.c: - * libglabels/template.c: - * libglabels/template.h: - Another pass at fleshing out the libglabels documentation. - * src/cairo-label-path.c: - * src/cairo-markup-path.c: - * src/label.c: - * src/mini-preview-pixbuf.c: - * src/print-op.c: - * src/print.c: - * src/view.c: - * src/wdgt-media-select.c: - * src/wdgt-mini-preview.c: - * src/wdgt-print-copies.c: - * src/wdgt-print-merge.c: - * src/wdgt-rotate-label.c: - Removed lgl_template_get_first_frame() from libglabels API and all references. - -2007-10-11 Jim Evins - * configure.in: - Extended checks for deprecated symbols. - * libglabels/template.c: - Removed g_strcasecmp references, which are deprecated. - -2007-10-09 Jim Evins - - * src/merge-evolution.c: - Create address book if it does not exist. Also, be more robust about handling - error conditions -- don't just assume GError has been set. - -2007-10-08 Jim Evins - - * libglabels/template.c: - * libglabels/xml-template.c: - * src/template-designer.c: - Missed some symbols with libglabels API work. - -2007-10-01 Jim Evins - - * docs/libglabels/libglabels-decl-list.txt: - * docs/libglabels/libglabels-docs.sgml: - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/category.sgml: - * docs/libglabels/tmpl/enums.sgml: - * docs/libglabels/tmpl/init.sgml: - * docs/libglabels/tmpl/libglabels-unused.sgml: - * docs/libglabels/tmpl/paper.sgml: - * docs/libglabels/tmpl/template-construction.sgml: - * docs/libglabels/tmpl/template-db.sgml: - * docs/libglabels/tmpl/template-misc.sgml: - * docs/libglabels/tmpl/template-struct.sgml: - * docs/libglabels/tmpl/template.sgml: - * docs/libglabels/tmpl/xml-category.sgml: - * docs/libglabels/tmpl/xml-template.sgml: - * libglabels/category.h: - * libglabels/init.c: - * libglabels/libglabels-private.h: - * libglabels/paper.h: - * libglabels/template.c: - * libglabels/template.h: - * libglabels/xml-template.h: - Basic documentation framework for libglabels updated. This still needs some - fleshing out. - -2007-09-27 Jim Evins - - * docs/libglabels/libglabels-decl-list.txt: - * docs/libglabels/libglabels-docs.sgml: - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/enums.sgml: - * docs/libglabels/tmpl/init.sgml: - * docs/libglabels/tmpl/libglabels-unused.sgml: - * docs/libglabels/tmpl/paper.sgml: - * docs/libglabels/tmpl/template.sgml: - * docs/libglabels/tmpl/xml-paper.sgml: - * docs/libglabels/tmpl/xml-template.sgml: - * docs/libglabels/tmpl/xml.sgml: - * libglabels/Makefile.am: - * libglabels/category.c: - * libglabels/category.h: - * libglabels/enums.h: - * libglabels/init.c: - * libglabels/init.h: - * libglabels/libglabels-private.h: - * libglabels/libglabels.h: - * libglabels/paper.c: - * libglabels/paper.h: - * libglabels/template.c: - * libglabels/template.h: - * libglabels/xml-category.c: - * libglabels/xml-category.h: - * libglabels/xml-paper.c: - * libglabels/xml-paper.h: - * libglabels/xml-template.c: - * libglabels/xml-template.h: - * libglabels/xml.c: - * libglabels/xml.h: - * src/cairo-label-path.c: - * src/cairo-label-path.h: - * src/cairo-markup-path.c: - * src/cairo-markup-path.h: - * src/file.c: - * src/glabels-batch.c: - * src/glabels.c: - * src/label-object.c: - * src/label.c: - * src/label.h: - * src/mini-preview-pixbuf-cache.c: - * src/mini-preview-pixbuf.c: - * src/mini-preview-pixbuf.h: - * src/prefs-dialog.c: - * src/prefs-model.c: - * src/prefs-model.h: - * src/prefs.c: - * src/prefs.h: - * src/print-op.c: - * src/print.c: - * src/template-designer.c: - * src/view-barcode.c: - * src/view-box.c: - * src/view-ellipse.c: - * src/view-image.c: - * src/view-line.c: - * src/view.c: - * src/wdgt-media-select.c: - * src/wdgt-mini-preview.c: - * src/wdgt-mini-preview.h: - * src/wdgt-print-copies.c: - * src/wdgt-print-merge.c: - * src/wdgt-rotate-label.c: - * src/xml-label-04.c: - * src/xml-label.c: - Major cleanup of libglabels API -- this breaks API compatibility with older - development and stable versions -- as far as I know, there are currently - no external users of this library yet. - -2007-09-14 Jim Evins - - * src/marshal.list: - * src/label.c: - * src/label.h: - * src/label-object.c: - * src/label-object.h: - * src/label-barcode.c: - * src/label-ellipse.c: - * src/view.c: - * src/view-object.c: - * src/view-barcode.c: - * src/view-box.c: - * src/view-ellipse.c: - * src/view-image.c: - * src/view-line.c: - * src/view-text.c: - Better separation of model from view. - -2007-08-21 Jim Evins - - * src/print-op.c: (create_custom_widget_cb): - Fix problem with force_outline_flag -- don't override with default. - -2007-08-21 Jim Evins - - * data/dtd/glabels-2.0.dtd: - * libglabels/template.c: - * libglabels/template.h: - * libglabels/xml-template.c: - * src/cairo-markup-path.c: - Added "Markup-rect" element to template format. - -2007-08-21 Jim Evins - - * configure.in: - Changed version to 2.1.pre5svn. - * src/view.c: (draw_markup_layer): - Do a stroke for each markup path, otherwise multiple markups - get connected. - -2007-08-17 Jim Evins - - * configure.in: - Bump libglabels revision numbers for 2.1.4 release. - -2007-08-16 Jim Evins - - * Makefile.am: - Include subdir iec16022-0.2.1. - * NEWS: - * configure.in: - * glabels.spec.in: - Preparation for 2.1.4. - - -2007-08-11 Jim Evins - - * po/POTFILES.in: - Updated file list. - * configure.in: - * po/eo.po: - Added Esperanto translation. Provided by Antonio C. - Codazzi "la Filozofo" . - * po/fr.po: - Updated French translation. Provided by Claude Paroz - . - * AUTHORS: - Updated to reflect above translations. - -2007-08-11 Jim Evins - - * AUTHORS: - * data/templates/avery-iso-templates.xml: - * data/templates/avery-us-templates.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/misc-other-templates.xml: - * data/templates/misc-us-templates.xml: - * data/templates/zweckform-iso-templates.xml: - Caught up with backlog of template submissions. - -2007-08-10 Jim Evins - - * src/bc-postnet.c: (gl_barcode_postnet_new): - * src/bc.c: - Added support for Brazilian CEPNet barcodes. This is simply an - instance of the US POSTNET format with 8 digits. Patch supplied - by Mário Meyer in bug # 1768792. - * AUTHORS: - Updated acknowledgments to reflect above patch and recent shuffling - of underlying technology. - -2007-05-13 Jim Evins - - * src/merge-text.c: (parse_line), (parse_field): - Remove leading and trailing spaces from CSV fields, unless quoted. - -2007-05-09 Jim Evins - - * src/object-editor-bc-page.c: - * src/object-editor-data-page.c: - * src/object-editor-fill-page.c: - * src/object-editor-image-page.c: - * src/object-editor-line-page.c: - * src/object-editor-lsize-page.c: - * src/object-editor-position-page.c: - * src/object-editor-private.h: - * src/object-editor-shadow-page.c: - * src/object-editor-size-page.c: - * src/object-editor-text-page.c: - * src/object-editor.c: - * src/prefs-dialog.c: - * src/template-designer.c: - * src/ui-property-bar.c: - * src/wdgt-media-select.c: - Replaced signal block/unblock pairs with simple flags. This reduces - some code clutter, hopefully making it easier to read. - -2007-05-05 Jim Evins - - * src/template-designer.c: (apply_cb): - Add new template to mini-preview pixbuf cache. - -2007-05-03 Jim Evins - - * src/label-image.c: (gl_label_image_init), (draw_object): - Scale default pixbuf up, to prevent bluring. Use cairo_fill to - render image. - -2007-05-02 Jim Evins - - * src/view.c: (draw_select_region_layer), (motion_notify_event_cb), - (button_release_event_cb): - Removed attempt at rendering optimization by clipping the updates - to areas affected -- this actually seemed to hurt update performance. - -2007-04-30 Jim Evins - - * src/color.h: - * src/color.c: (gl_color_shadow), (gl_color_node_new_default), - (gl_color_node_equal), (gl_color_node_expand): - * src/label-barcode.c: (draw_object): - * src/label-box.c: (draw_object), (draw_shadow): - * src/label-ellipse.c: (draw_object), (draw_shadow): - * src/label-line.c: (draw_object), (draw_shadow): - * src/label-text.c: (draw_object), (draw_shadow): - * src/wdgt-mini-preview.c: (draw_shadow), (draw_labels): - * src/wdgt-rotate-label.c: (drawingarea_update): - Some cleanup to color related code. - -2007-04-30 Jim Evins - - * src/label.h: - Added glLabelRegion structure type. - * src/label-object.c: (gl_label_object_get_extent): - * src/label-object.h: - Modified gl_label_object_get_extent() to fill in a glLabelRegion struct. - * src/view.h: - * src/view.c: (gl_view_update_region), (draw_select_region_layer), - (gl_view_select_region), (gl_view_align_selection_left), - (gl_view_align_selection_right), (gl_view_align_selection_hcenter), - (gl_view_align_selection_top), (gl_view_align_selection_bottom), - (gl_view_align_selection_vcenter), - (gl_view_center_selection_horiz), (gl_view_center_selection_vert), - (gl_view_move_selection), (gl_view_can_selection_text), - (motion_notify_event_cb), (button_press_event_cb), - (button_release_event_cb): - - Reconcile with new gl_label_object_get_extent() API. - - Use glLabelRegion for view->select_region. - - Added gl_view_update_region() to clip updates to region. - - Use gl_view_update_region() during manipulation of view->select_region. - -2007-04-26 Jim Evins - - * src/mini-preview-pixbuf.c: (draw_paper), (draw_label_outlines), - (draw_label_outline): - * src/print.c: (print_crop_marks), (draw_outline): - * src/view-object.c: (gl_view_object_draw_handles): - * src/view.c: (draw_bg_layer), (draw_grid_layer), - (draw_markup_layer), (draw_fg_layer), (draw_select_region_layer): - * src/wdgt-mini-preview.c: (draw_paper), (draw_labels): - * src/wdgt-rotate-label.c: (drawingarea_update): - Added defines for various magic numbers. - -2007-04-25 Jim Evins - - * src/label-text.c: (get_size), (draw_object), (draw_shadow): - Scale text down. Cairo seems to render text too large. - -2007-04-25 Jim Evins - - * src/view.h: - * src/view.c: (gl_view_update), (expose_cb), - (motion_notify_event_cb), (button_press_event_cb), - (button_release_event_cb): - - Try not to let updates get backed up. - - Grab pointer when doing any drag operations. - -2007-04-11 Jim Evins - - * src/cairo-label-path.c: (gl_cairo_label_path), - (gl_cairo_rect_label_path), (gl_cairo_round_label_path), - (gl_cairo_cd_label_path): - * src/cairo-label-path.h: - * src/mini-preview-pixbuf.c: (draw_paper), (draw_label_outlines), - (draw_label_outline): - * src/print.c: (draw_outline), (clip_to_outline): - * src/view.c: (draw_bg_layer), (draw_fg_layer): - * src/wdgt-mini-preview.c: (draw_labels): - * src/wdgt-rotate-label.c: (drawingarea_update): - Modified to universally use gl_cairo_label_path() to create paths - for labels. Added shadow to mini preview in rotate widget. - -2007-04-10 Jim Evins - - * libglabels/template.h: - * libglabels/template.c: (gl_template_get_name_list_unique), - (gl_template_get_name_list_all), (gl_template_from_name): - Modified libglabels to allow you to get a list of all template names - including all aliases or just a list of primary names of each unique - template. - * src/Makefile.am: - * src/file.c: (gl_file_properties): - * src/glabels.c: (main): - * src/mini-preview-pixbuf-cache.h: - * src/mini-preview-pixbuf-cache.c: - * src/wdgt-media-select.c: (gl_wdgt_media_select_construct), - (filter_changed_cb), (load_list): - Added mini-preview pixbuf cache, so that only one mini-preview is - needed for a unique template and gets reused for all aliases. These - pixbufs will also live for the life of the program so they are not - rebuilt everytime a new label dialog is invoked. - * src/mini-preview-pixbuf.c: (draw_paper), - (draw_rect_label_outline), (draw_round_label_outline), - (draw_cd_label_outline): - Removed some comment artifacts. - -2007-04-04 Jim Evins - - * src/mini-preview-pixbuf.c: (gl_mini_preview_pixbuf_new), - (draw_paper), (draw_label_outlines), (draw_rect_label_outline), - (draw_round_label_outline), (draw_cd_label_outline): - * src/wdgt-media-select.c: (load_list): - * src/wdgt-rotate-label.c: (draw_cd_label_outline): - Cosmetic enhancments to mini previews. - -2007-04-04 Jim Evins - - * src/ui-property-bar.c: (gl_ui_property_bar_finalize), - (gl_ui_property_bar_construct): - Save copy of GladeXML tree so that we don't lose tooltips. - -2007-04-02 Jim Evins - - * src/merge-properties-dialog.c: - * src/new-label-dialog.c: - * src/object-editor.c: - * src/prefs-dialog.c: - * src/print-op.c: - * src/template-designer.c: - * src/ui-property-bar.c: - * src/wdgt-media-select.c: - * src/wdgt-rotate-label.c: - Fixed several memory leaks. - -2007-04-01 Jim Evins - - * src/label-text.c: (gl_label_text_init), (copy), - (gl_label_text_set_lines), (buffer_changed_cb), (get_size), - (set_font_family), (set_font_size), (set_font_weight), - (set_font_italic_flag), (set_text_alignment), - (set_text_line_spacing): - Cache object size, so that expensive extent calculations are only done - when needed. - -2007-03-30 Jim Evins - - * src/prefs-model.c: (gl_prefs_model_load_settings): - Default to an unlimited list of recent documents, since this parameter - seems to be pre-filter anyway. - -2007-03-30 Jim Evins - - * src/label-box.c: (draw_shadow): - * src/label-ellipse.c: (draw_shadow): - Added missing shadow fill. - -2007-03-28 Jim Evins - - * src/ui-commands.c: (gl_ui_cmd_file_print): - Unreferencing the print operation sometimes crashes. Just don't do it - right now. - -2007-03-28 Jim Evins - - * src/print-op.c: (gl_print_op_construct), - (gl_print_op_get_settings), (gl_print_op_set_settings), - (gl_print_op_free_settings), (create_custom_widget_cb): - * src/print-op.h: - * src/ui-commands.c: (gl_ui_cmd_file_print): - * src/window.c: (gl_window_init): - * src/window.h: - Save print settings and custom settings between print operations - on the same window. - -2007-03-24 Jim Evins - - * src/object-editor-image-page.c: - (gl_object_editor_prepare_image_page), - (gl_object_editor_set_image), (img_selection_changed_cb): - Workaround for GtkFileChooserButton bug # 327243. This the root - cause for gLabels bug # 1192884. I have actually observed 3 delayed - "selection-changed" signals -- the first 2 return NULL -- this is - what caused the image to reset to the default followed by setting - it back to the original image, trying to fit it into a new bounding - box. This sequence of events is much more evident with the new - cairo rendering. - -2007-03-23 Jim Evins - - Merged all changes from experimental cairo branch to trunk. - Trunk no longer depends on libgnomecanvas or libgnomeprint[ui]. - -2007-03-23 Jim Evins - - * src/label-object.h: - * src/label-object.c: (gl_label_object_class_init), - (gl_label_object_get_raw_size), (gl_label_object_get_size): - Created "get_raw_size" method. - * src/label-barcode.c: (get_size): - * src/xml-label.c: (xml_create_object_text), - (xml_create_object_barcode): - Use new "get_raw_size" method on label-objects when apropos. - * src/label-text.h: - * src/label-text.c: (get_size), (draw_object), (draw_shadow), - (auto_shrink_font_size): - Added "auto shrink" functionality back. - -2007-03-19 Jim Evins - - * src/label-text.c: (draw_object), (draw_shadow): - Don't use negative scales in workaround from previous commit. - - -2007-03-18 Jim Evins - - * src/xml-label.c: - Forgot to remove include of xml-lable-191 in previous commit. - * src/label-text.c: (get_size), (draw_object), (draw_shadow): - Workaround for pango Bug #341481. Render text at device scale, - and scale font size accordingly. Also, don't do any hinting. - -2007-03-18 Jim Evins - - * src/cairo-ellipse-path.c: - * src/cairo-ellipse-path.h: - Forgot to add these new files during last mass commit. - -2007-03-18 Jim Evins - - * src/Makefile.am: - * src/xml-label-191.c: - * src/xml-label-191.h: - Removed -- Very buggy. Version 1.91 is a very old "unstable" version, - so there is no need to keep compatability. - * src/base64.c: - * src/bc-iec16022.c: - * src/cairo-label-path.c: - * src/cairo-label-path.h: - * src/cairo-markup-path.c: - * src/color.c: - * src/debug.c: - * src/file.c: - * src/glabels-batch.c: - * src/glabels.c: - * src/label-barcode.c: - * src/label-box.c: - * src/label-ellipse.c: - * src/label-image.c: - * src/label-line.c: - * src/label-object.c: - * src/label-object.h: - * src/label-text.c: - * src/label.c: - * src/label.h: - * src/merge-properties-dialog.c: - * src/merge.c: - * src/new-label-dialog.c: - * src/object-editor-bc-page.c: - * src/object-editor-data-page.c: - * src/object-editor-edit-page.c: - * src/object-editor-fill-page.c: - * src/object-editor-image-page.c: - * src/object-editor-line-page.c: - * src/object-editor-private.h: - * src/object-editor-shadow-page.c: - * src/object-editor-text-page.c: - * src/object-editor.c: - * src/pixbuf-cache.c: - * src/print-op.c: - * src/print.c: - * src/recent.c: - * src/stock.c: - * src/template-designer.c: - * src/text-node.c: - * src/ui-property-bar.c: - * src/ui.c: - * src/view-barcode.c: - * src/view-box.c: - * src/view-ellipse.c: - * src/view-image.c: - * src/view-line.c: - * src/view-object.c: - * src/view-object.h: - * src/view-text.c: - * src/view.c: - * src/wdgt-media-select.c: - * src/wdgt-print-copies.c: - * src/wdgt-print-merge.c: - * src/window.c: - * src/xml-label-04.c: - * src/xml-label.c: - Many changes, including: - - Move draw methods from view-*() to label-*(). - - Use same drawing code for on screen view and printing. - - Fix all issues exposed with '-Wall -Werror'. - -2007-03-14 Jim Evins - - * src/Makefile.am: - * src/cairo-handle-path.c: - * src/cairo-handle-path.h: - * src/cairo-object-path.c: - * src/cairo-object-path.h: - Removed cairo-handle-path.[ch] and cairo-object-path.[ch]. - * src/view-barcode.c: (gl_view_barcode_class_init), (draw_object), - (object_at): - * src/view-box.c: (gl_view_box_class_init), (draw_object), - (draw_shadow), (object_at): - * src/view-ellipse.c: (gl_view_ellipse_class_init), - (create_ellipse_path), (draw_object), (draw_shadow), (object_at): - * src/view-image.c: (gl_view_image_class_init), (draw_object), - (object_at): - * src/view-line.c: (gl_view_line_class_init), (draw_object), - (draw_shadow), (object_at): - * src/view-object.c: (gl_view_object_draw), (gl_view_object_at), - (create_handle_path), (gl_view_object_draw_handles), - (gl_view_object_handle_at): - * src/view-object.h: - * src/view-text.c: (gl_view_text_class_init), (draw_object), - (draw_shadow), (object_at): - * src/view.c: (motion_notify_event_cb), (button_press_event_cb): - Some restructuring of new code. - -2007-03-12 Jim Evins - - * src/Makefile.am: - * src/cairo-object-path.c: - * src/view-barcode.c: - * src/view-barcode.h: - * src/view.c: - Added barcode object support to view. - -2007-03-12 Jim Evins - - * src/Makefile.am: - * src/view-text.h: - * src/view-text.c: - * src/view.c: - * src/cairo-object-path.c: - * src/cairo-object-path.h: - * src/view-box.c: - * src/view-ellipse.c: - * src/view-image.c: - * src/view-line.c: - * src/view-object.c: - * src/view-object.h: - Added text object support to view. Added object_at method to all - view_objects. - -2007-03-11 Jim Evins - - * src/Makefile.am: - * src/cairo-object-path.c: (gl_cairo_object_path), - (gl_cairo_image_object_path): - * src/view-image.c: (gl_view_image_class_init), - (gl_view_image_finalize), (gl_view_image_new), - (update_editor_from_label_cb), (draw), - (gl_view_image_get_create_cursor), - (gl_view_image_create_button_press_event), - (gl_view_image_create_motion_event), - (gl_view_image_create_button_release_event): - * src/view-image.h: - * src/view.c: (gl_view_construct), (gl_view_object_create_mode), - (selection_received_cb), (motion_notify_event_cb), - (button_press_event_cb), (button_release_event_cb): - Added image object support to view. - -2007-03-11 Jim Evins - - * src/Makefile.am: - * src/cairo-object-path.c: (gl_cairo_object_path), - (gl_cairo_line_object_path): - * src/view-line.c: (gl_view_line_class_init), (gl_view_line_new), - (update_object_from_editor_cb), (update_editor_from_object_cb), - (update_editor_from_label_cb), (draw), - (gl_view_line_get_create_cursor), - (gl_view_line_create_button_press_event), - (gl_view_line_create_motion_event), - (gl_view_line_create_button_release_event): - * src/view-line.h: - * src/view-object.c: (gl_view_object_resize_event): - * src/view.c: (gl_view_construct), (gl_view_object_create_mode), - (selection_received_cb), (motion_notify_event_cb), - (button_press_event_cb), (button_release_event_cb): - Added line object support to view. - * src/cairo-handle-path.c: - Made handles slightly larger. - - -2007-03-11 Jim Evins - - * src/Makefile.am: - * src/cairo-handle-path.c: - * src/cairo-label-path.c: (gl_cairo_rect_label_path), - (gl_cairo_round_label_path), (gl_cairo_cd_label_path): - * src/cairo-markup-path.c: (gl_cairo_markup_margin_rect_path), - (gl_cairo_markup_margin_round_path), - (gl_cairo_markup_margin_cd_path), (gl_cairo_markup_circle_path): - * src/cairo-object-path.c: (gl_cairo_object_path), - (gl_cairo_ellipse_object_path): - * src/label-object.c: (gl_label_object_rotate): - * src/view-box.c: - * src/view-box.h: - * src/view-ellipse.c: (gl_view_ellipse_class_init), - (gl_view_ellipse_new), (update_object_from_editor_cb), - (update_editor_from_object_cb), (update_editor_from_label_cb), - (draw), (gl_view_ellipse_get_create_cursor), - (gl_view_ellipse_create_button_press_event), - (gl_view_ellipse_create_motion_event), - (gl_view_ellipse_create_button_release_event): - * src/view-ellipse.h: - * src/view-object.c: - * src/view-object.h: - * src/view.c: (gl_view_construct), (gl_view_object_create_mode), - (select_object_real), (selection_received_cb), - (motion_notify_event_cb), (button_press_event_cb), - (button_release_event_cb): - * src/view.h: - Added ellipse object support to view. Plus other cleanup. - -2007-03-11 Jim Evins - - * src/view-box.h: - * src/view-box.c: (gl_view_box_get_create_cursor), - (gl_view_box_create_button_press_event), - (gl_view_box_create_motion_event), - (gl_view_box_create_button_release_event): - * src/view-object.c: (gl_view_object_set_view), - (gl_view_object_handle_at): - * src/view.h: - * src/view.c: (gl_view_arrow_mode), (gl_view_object_create_mode), - (motion_notify_event_cb), (button_press_event_cb), - (button_release_event_cb), (key_press_event_cb): - Added creation code for box object. - -2007-03-09 Jim Evins - - * src/view-object.c: (gl_view_object_resize_event): - * src/view-object.h: - * src/view.c: (motion_notify_event_cb): - Fix bugs with resizing transformed objects. - * src/cairo-handle-path.c: (gl_cairo_handle_path): - * src/cairo-object-path.c: (gl_cairo_object_path): - * src/cairo-object-path.h: - * src/label-object.c: (gl_label_object_init), - (gl_label_object_dup), (gl_label_object_get_extent), - (gl_label_object_flip_horiz), (gl_label_object_flip_vert), - (gl_label_object_rotate), (gl_label_object_set_matrix), - (gl_label_object_get_matrix): - * src/label-object.h: - * src/print.c: (draw_object): - * src/view-box.c: - * src/view-highlight.c: - * src/view-highlight.h: - * src/xml-label-191.c: (xml191_parse_object): - * src/xml-label.c: (xml_parse_affine_attrs), - (xml_create_affine_attrs): - Replace libart affine matrices with cairo matrices. - -2007-03-08 Jim Evins - - * src/view-object.h: - * src/view.c: (gl_view_update), (motion_notify_event_cb): - * src/view-object.c: (gl_view_object_handle_at), - (gl_view_object_resize_event): - Added resize code -- still a bit buggy. - -2007-03-07 Jim Evins - - * src/Makefile.am: - * src/cairo-handle-path.c: - * src/cairo-handle-path.h: - * src/view-box.c: (gl_view_box_new): - * src/view-object.c: (gl_view_object_set_object), - (gl_view_object_draw_handles), (gl_view_object_handle_at): - * src/view-object.h: - * src/view.c: (draw_highlight_layer), (select_object_real), - (unselect_object_real), (view_handle_at), (motion_notify_event_cb), - (button_press_event_cb), (button_release_event_cb), - (key_press_event_cb): - * src/view.h: - Added beginnings of object resize handles. - -2007-03-07 Jim Evins - - * src/view.h: - * src/view.c: (gl_view_init), (gl_view_arrow_mode), - (gl_view_object_create_mode), (motion_notify_event_cb), - (button_press_event_cb), (button_release_event_cb), - (key_press_event_cb): - Added move selection support. - -2007-03-05 Jim Evins - - * src/cairo-object-path.c: (gl_cairo_object_path): - * src/view-object.c: (gl_view_object_draw), - (gl_view_object_draw_highlight): - * src/view.c: (view_object_at), (motion_notify_event_cb), - (button_press_event_cb), (button_release_event_cb): - Additional refinements to select logic. - -2007-03-05 Jim Evins - - * src/view.h: - * src/view.c: (gl_view_init), (gl_view_construct), - (label_changed_cb), (draw_layers), (draw_select_region_layer), - (gl_view_select_region), (object_at), (motion_notify_event_cb), - (button_press_event_cb), (button_release_event_cb): - Added initial select region support and context menu. - -2007-03-04 Jim Evins - - * configure.in: - * src/Makefile.am: - * src/debug.c: - * src/debug.h: - * src/file.c: - * src/label.c: - * src/label.h: - * src/print-op.c: - * src/print.c: - * src/ui-commands.c: - * src/view-box.c: - * src/view-box.h: - * src/view-object.c: - * src/view-object.h: - * src/view.c: - * src/view.h: - * src/wdgt-print-copies.c: - * src/wdgt-print-merge.c: - * src/xml-label.c: - Initial port to a raw Cairo canvas. This removes all remaining - dependencies on libgnomecanvas and libgnomeprint[ui]. Basically - the view is becoming a canvas widget in its own right. Still needs - a lot of work. - * src/cairo-label-path.c: - * src/cairo-label-path.h: - * src/cairo-markup-path.c: - * src/cairo-markup-path.h: - * src/cairo-object-path.c: - * src/cairo-object-path.h: - New files to support cairo canvas. - * src/canvas-hacktext.c: - * src/canvas-hacktext.h: - Removed. - -2007-02-18 Jim Evins - - * src/bc.h: - GNOME_FONT_BOOK changed to PANGO_WEIGHT_NORMAL. - -2007-02-14 Jim Evins - - * src/base64.c: - * src/base64.h: - * src/bc-gnubarcode.c: - * src/bc-gnubarcode.h: - * src/bc-postnet.c: - * src/bc-postnet.h: - * src/bc.c: - * src/bc.h: - * src/canvas-hacktext.c: - * src/canvas-hacktext.h: - * src/debug.c: - * src/debug.h: - * src/file.c: - * src/file.h: - * src/glabels.c: - * src/hig.h: - * src/label-barcode.c: - * src/label-barcode.h: - * src/label-box.c: - * src/label-box.h: - * src/label-ellipse.c: - * src/label-ellipse.h: - * src/label-image.c: - * src/label-image.h: - * src/label-line.c: - * src/label-line.h: - * src/label-object.c: - * src/label-object.h: - * src/label-text.c: - * src/label-text.h: - * src/label.c: - * src/label.h: - * src/merge-evolution.c: - * src/merge-evolution.h: - * src/merge-init.c: - * src/merge-init.h: - * src/merge-properties-dialog.c: - * src/merge-properties-dialog.h: - * src/merge-text.c: - * src/merge-text.h: - * src/merge-vcard.c: - * src/merge-vcard.h: - * src/merge.c: - * src/merge.h: - * src/mini-preview-pixbuf.h: - * src/new-label-dialog.c: - * src/new-label-dialog.h: - * src/object-editor-bc-page.c: - * src/object-editor-data-page.c: - * src/object-editor-edit-page.c: - * src/object-editor-fill-page.c: - * src/object-editor-image-page.c: - * src/object-editor-line-page.c: - * src/object-editor-lsize-page.c: - * src/object-editor-position-page.c: - * src/object-editor-private.h: - * src/object-editor-size-page.c: - * src/object-editor-text-page.c: - * src/object-editor.c: - * src/object-editor.h: - * src/pixbuf-cache.c: - * src/pixbuf-cache.h: - * src/prefs-dialog.c: - * src/prefs-dialog.h: - * src/prefs-model.c: - * src/prefs-model.h: - * src/prefs.c: - * src/prefs.h: - * src/print-op.c: - * src/stock.c: - * src/stock.h: - * src/template-designer.c: - * src/text-node.c: - * src/text-node.h: - * src/ui-commands.c: - * src/ui-commands.h: - * src/ui-property-bar.c: - * src/ui-property-bar.h: - * src/ui-sidebar.c: - * src/ui-sidebar.h: - * src/ui-util.c: - * src/ui-util.h: - * src/ui.c: - * src/ui.h: - * src/util.c: - * src/util.h: - * src/view-barcode.c: - * src/view-barcode.h: - * src/view-box.c: - * src/view-box.h: - * src/view-ellipse.c: - * src/view-ellipse.h: - * src/view-highlight.c: - * src/view-highlight.h: - * src/view-image.c: - * src/view-image.h: - * src/view-line.c: - * src/view-line.h: - * src/view-object.c: - * src/view-object.h: - * src/view-text.c: - * src/view-text.h: - * src/view.c: - * src/view.h: - * src/wdgt-chain-button.c: - * src/wdgt-chain-button.h: - * src/wdgt-media-select.c: - * src/wdgt-mini-preview.c: - * src/wdgt-print-copies.c: - * src/wdgt-print-copies.h: - * src/wdgt-print-merge.c: - * src/wdgt-print-merge.h: - * src/wdgt-rotate-label.c: - * src/window.h: - * src/xml-label-04.c: - * src/xml-label-04.h: - * src/xml-label-191.c: - * src/xml-label-191.h: - * src/xml-label.c: - * src/xml-label.h: - - Assorted superficial cleanup. Including: - - Use G_DEFINE_TYPE for all objects. - - Reconcile style of all class initializer functions - - Reconcile style of all finalize functions - - Add emacs mode line to all source files - -2007-02-06 Jim Evins - -Assorted cleanup and removal of deprecated items. - - * src/splash.c: - * src/splash.h: - * src/Makefile.am: - Removed annoying splash screen. - * src/glabels-batch.c: (main): - * src/glabels.c: (main): - Converted from popt to GOption. - * src/object-editor-shadow-page.c: - (gl_object_editor_set_shadow_state): - Removed deprecated method on GtkToggleButton. - * src/ui-commands.c: (gl_ui_cmd_help_about): - Removed dependency on libgnomui/qnome-url.h. - * src/template-designer.c: - Removed dependency on libgnome/gnome-program.h. - - -2007-02-04 Jim Evins - - * src/color.c: - * src/color.h: - * src/prefs-model.c: - * src/print.c: (draw_text_object): - * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_construct): - Removed GnomeCanvas artifacts from color.[ch] and related modules. - -2007-02-04 Jim Evins - - * src/wdgt-mini-preview.c: - * src/wdgt-mini-preview.h: - Ported widget from GnomeCanvas to Cairo. - -2007-02-03 Jim Evins - - * data/glade/template-designer.glade: - * src/template-designer.c: - * src/template-designer.h: - Ported GnomeDruid to GtkAssistant. Since libglade does not - yet support the GtkAssistant and we derive directly from - the Assistant, the pages are layed out in a GtkNotebook in - the glade description -- we then append each page to the - assistant. - -2007-01-25 Jim Evins - - * data/glade/object-editor.glade: - Added dummy page to notebook, to prevent shadow page from - becoming the default current page at creation. - * src/view-box.c: (construct_properties_editor): - * src/view-ellipse.c: (construct_properties_editor): - * src/view-line.c: (construct_properties_editor): - * src/view-text.c: (construct_properties_editor): - Reconciled order of params. - -2007-01-19 Jim Evins - - * src/label-barcode.h: - * src/label-object.c: (gl_label_object_set_font_weight), - (gl_label_object_set_text_alignment), - (gl_label_object_get_font_weight), - (gl_label_object_get_text_alignment): - * src/label-object.h: - * src/label-text.c: (gl_label_text_instance_init), (copy), - (get_size), (set_font_family), (set_font_weight), - (set_text_alignment), (get_font_weight), (get_text_alignment): - * src/label-text.h: - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page), - (gl_object_editor_set_font_family), - (gl_object_editor_set_font_weight), - (gl_object_editor_get_font_weight), - (gl_object_editor_set_text_alignment), - (gl_object_editor_get_text_alignment), - (gl_object_editor_set_text_color): - * src/object-editor.h: - * src/prefs-dialog.c: (construct_object_page), - (update_object_page_from_prefs), (update_prefs_from_object_page): - * src/prefs-model.c: (gl_prefs_model_save_settings), - (gl_prefs_model_load_settings): - * src/prefs-model.h: - * src/print.c: (draw_text_object): - * src/ui-property-bar.c: (gl_ui_property_bar_construct), - (reset_to_default_properties), (update_text_properties), - (font_bold_toggled_cb), (text_align_toggled_cb): - * src/ui-sidebar.c: - * src/util.c: (gl_util_align_to_string), (gl_util_string_to_align), - (gl_util_weight_to_string), (gl_util_string_to_weight), - (gl_util_get_font_family_list), (gl_util_font_family_list_free): - * src/util.h: - * src/view-text.c: (update_object_from_editor_cb), - (update_editor_from_object_cb), (draw_hacktext), (draw_cursor): - * src/view.c: (gl_view_set_selection_text_alignment), - (gl_view_set_default_text_alignment), - (gl_view_get_default_text_alignment): - * src/view.h: - * src/xml-label-04.c: (xml04_parse_text_props): - * src/xml-label-191.c: (xml191_parse_text_props): - * src/xml-label.c: (xml_parse_object_text), - (xml_parse_toplevel_span), (xml_create_object_text), - (xml_create_toplevel_span): - Converted all model internals to Pango. GnomeFont remains in - view until GnomeCanvas can be replaced with a cairo-based canvas. - -2007-01-17 Jim Evins - - * src/Makefile.am: - * src/hig.c: - Deleted hig.c. - * src/hig.h: - * src/wdgt-print-copies.c: (gl_wdgt_print_copies_get_type), - (gl_wdgt_print_copies_construct): - * src/wdgt-print-copies.h: - * src/wdgt-print-merge.c: (gl_wdgt_print_merge_get_type), - (gl_wdgt_print_merge_construct): - * src/wdgt-print-merge.h: - Removed all remaining HIG wrapper widgets. - -2007-01-16 Jim Evins - - * src/Makefile.am: - * src/print-dialog.c: - * src/print-dialog.h: - * src/print-op.c: - * src/print-op.h: - * src/template-designer.c: (print_test_cb): - * src/ui-commands.c: (gl_ui_cmd_file_print): - * src/print.c: - Renamed PrintDialog to PrintOp. Added constructor for batch - printing. - * src/glabels-batch.c: (main): - Converted to use new PrintOp object for printing. - -2007-01-15 Jim Evins - - * data/glade/Makefile.am: - * data/glade/print-custom-widget.glade: - * src/print-dialog.c: - * src/print-dialog.h: - * src/print.c: - * src/print.h: - * src/template-designer.c: (print_test_cb): - * src/ui-commands.c: (gl_ui_cmd_file_print): - * src/wdgt-print-merge.c: (gl_wdgt_print_merge_get_copies): - * src/wdgt-print-merge.h: - * src/window.c: (gl_window_init): - * src/window.h: - Initial conversion to GtkPrintOperation. - Still to do: - - Remove font and other libgnomeprint[ui] from elsewhere - - Add batch initialization of print operation - -2007-01-08 Jim Evins - * configure.in: - Updated dependencies. Set version to 2.1.pre4cvs. - -2007-01-03 Jim Evins - - * src/recent-files/* - Removed EggRecent stuff. - * configure.in: - * src/Makefile.am: - * src/file.c: - * src/recent.c: - * src/recent.h: - * src/ui-commands.c: - * src/ui-commands.h: - * src/ui.c: - Ported from EggRecent to GtkRecentManager. - - -2007-01-02 Jim Evins - - * configure.in: - * iec16022-0.2.1/BUGS: - * iec16022-0.2.1/CHANGELOG: - * iec16022-0.2.1/CREDITS: - * iec16022-0.2.1/INSTALL: - * iec16022-0.2.1/LICENSE: - * iec16022-0.2.1/Makefile.am: - * iec16022-0.2.1/Makefile.dist: - * iec16022-0.2.1/README: - * iec16022-0.2.1/README.glabels: - * iec16022-0.2.1/TODO: - * iec16022-0.2.1/iec16022.1: - * iec16022-0.2.1/iec16022.c: - * iec16022-0.2.1/iec16022ecc200.c: - * iec16022-0.2.1/iec16022ecc200.h: - * iec16022-0.2.1/image.c: - * iec16022-0.2.1/image.h: - * iec16022-0.2.1/reedsol.c: - * iec16022-0.2.1/reedsol.h: - * iec16022-0.2.1/test/testsuite-example.bin: - * iec16022-0.2.1/test/testsuite-example.eps: - * iec16022-0.2.1/test/testsuite-example.hex: - * iec16022-0.2.1/test/testsuite-example.png: - * iec16022-0.2.1/test/testsuite-example.text: - * iec16022-0.2.1/test/testsuite.sh: - Include modified copy of iec16022-0.2.1 to provide encoding - support for datamatrix 2D barcodes. - * src/Makefile.am: - * src/bc-iec16022.c: - * src/bc-iec16022.h: - * src/bc.c: - Added initial datamatrix 2D barcode backend to barcode code. - * INSTALL: - * gtk-doc.make: - Automatic updates to later versions of these files. - -2006-11-28 Jim Evins - - * data/templates/avery-iso-templates.xml: - * data/templates/avery-us-templates.xml: - * data/templates/categories.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/misc-us-templates.xml: - * data/templates/zweckform-iso-templates.xml: - More categorization. - -2006-09-12 Jim Evins - - * data/dtd/glabels-2.0.dtd: - * data/templates/Makefile.am: - * data/templates/avery-iso-templates.xml: - * data/templates/avery-other-templates.xml: - * data/templates/avery-us-templates.xml: - * data/templates/categories.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/misc-other-templates.xml: - * data/templates/zweckform-iso-templates.xml: - * data/glade/Makefile.am: - * data/glade/new-label-dialog.glade: - * data/glade/wdgt-media-select.glade: - * data/glade/wdgt-rotate-label.glade: - * libglabels/Makefile.am: - * libglabels/category.c: - * libglabels/category.h: - * libglabels/libglabels.h: - * libglabels/paper.c: - * libglabels/template.c: - * libglabels/template.h: - * libglabels/xml-category.c: - * libglabels/xml-category.h: - * libglabels/xml-template.c: - Added support for category meta data. - * src/Makefile.am: - * src/file.c: - * src/mini-preview-pixbuf.c: - * src/mini-preview-pixbuf.h: - * src/new-label-dialog.c: - * src/new-label-dialog.h: - * src/wdgt-media-select.c: - * src/wdgt-media-select.h: - * src/wdgt-rotate-label.c: - * src/wdgt-rotate-label.h: - New "new label" dialog. - -2006-05-27 Jim Evins - - * NEWS: - * autogen.sh: - * configure.in: - Preparation for 2.1.3. - * acinclude.m4: - * omf.make: - * xmldocs.make: - Removed. - -2006-05-22 Jim Evins - - * src/print.c: (draw_barcode_object): - Don't print "Invalid barcode data" if data field is empty. Patch provided - by Darren Warner . Fixes Bug #1479839. - * AUTHORS: - Added acknowledgment for above patch. - * src/bc-gnubarcode.c: (gl_barcode_gnubarcode_new): - * src/bc-postnet.c: (postnet_code): - Removed "Invalid barcode data" warnings from stderr. - * src/view-barcode.c: (draw_barcode): - Draw box around barcode extent if data empty or invalid. Center a - message whether the data is empty or invalid in box. - -2006-05-22 Jim Evins - - * src/print.c: (draw_text_object): - Check shadow state when printing text. - -2006-05-20 Jim Evins - - * src/ui-commands.c: (gl_ui_cmd_view_grid_toggle), - (gl_ui_cmd_view_markup_toggle): - Fixed crash when grid or markup have been toggled off during - a previous session. Bug #1434324. - -2006-04-05 Jim Evins - - * src/object-editor.c: (gl_object_editor_set_key_names): - Fixed potential crash when freeing empty key list. - -2006-03-11 Jim Evins - - * src/print.c: (draw_text_object): - * src/view-text.c: (gl_view_text_new), - (construct_properties_editor), (update_object_from_editor_cb), - (update_editor_from_object_cb), (update_editor_from_label_cb), - (draw_hacktext): - Added shadow support to text object. - -2006-02-18 Jim Evins - - * src/print.c: (draw_line_object): - * src/view-line.c: (gl_view_line_new), - (construct_properties_editor), (update_canvas_item_from_object_cb), - (update_object_from_editor_cb), (update_editor_from_object_cb), - (update_editor_from_label_cb): - Added shadow support to line object. - -2006-02-16 Jim Evins - - * src/view-box.c: - Comment changes. - * src/print.c: (draw_ellipse_object): - * src/view-ellipse.c: (gl_view_ellipse_new), - (construct_properties_editor), (update_canvas_item_from_object_cb), - (update_object_from_editor_cb), (update_editor_from_object_cb), - (update_editor_from_label_cb): - Added shadow support to ellipse object. - -2006-02-15 Jim Evins - - * src/label-object.c: - Changed default shadow offsets. - * src/view-box.c: (gl_view_box_new): - Simplified gl_view_box_new() so that is does not duplicate code - in update_canvas_item_from_object_cb(). - -2006-02-07 Jim Evins - - * data/glade/object-editor.glade: - Fixed color groups of color combos. - * src/color.h: - Added default shadow color. - * src/object-editor.c: (gl_object_editor_construct_color_combo): - Added shadow color group. - -2006-02-06 Jim Evins - - * src/object-editor-shadow-page.c: - Forgot to add this file. - * src/view-box.c: (gl_view_box_new), - (update_canvas_item_from_object_cb), (update_editor_from_label_cb): - Update limits on shadow offset spinbuttons. - -2006-01-19 Jim Evins - - * src/merge-evolution.c: (gl_merge_evolution_get_key_list): - Initialize key_list to NULL. - * data/glade/object-editor.glade: - * src/Makefile.am: - * src/color.c: - * src/color.h: - * src/label-object.c: - * src/label-object.h: - * src/object-editor-fill-page.c: - * src/object-editor-private.h: - * src/object-editor.c: - * src/object-editor.h: - * src/xml-label.c: - Created infrastructure for shadow support. - * src/view-box.c: - * src/print.c: - Initial shadow support in box object only. - -2006-01-05 Jim Evins - - * src/merge-properties-dialog.c: (src_changed_cb): - Be extra paranoid before calling strcmp(). - * src/merge.c: (gl_merge_set_src): - Don't make (merge == NULL) a critical error. - -2005-12-22 Jim Evins - - * src/glabels-batch.c: (main): - Compile warning free with gcc 4.0. - -2005-12-21 Jim Evins - - * glabels.spec.in: - Updated example RPM spec file. - -2005-12-21 Jim Evins - - * NEWS: - * configure.in: - Preparation for 2.1.2. - -2005-12-20 Jim Evins - - * src/Makefile.am: - Define unique G_LOG_DOMAIN for glabels. - * src/critical-error-handler.c: (gl_critical_error_handler_init): - * src/warning-handler.c: (gl_warning_handler_init), - (warning_handler): - Register for G_LOG_DOMAIN instead of NULL. - -2005-12-10 Jim Evins - - * src/merge-evolution.c: - * src/merge-vcard.c: - Fixed indentation. - -2005-12-08 Jim Evins - - * libglabels/paper.c: (read_paper_files_from_dir): - * libglabels/template.c: (gl_template_register), - (read_template_files_from_dir): - * libglabels/xml-paper.c: (gl_xml_paper_read_papers_from_file), - (gl_xml_paper_parse_papers_doc): - * libglabels/xml-template.c: - (gl_xml_template_read_templates_from_file), - (gl_xml_template_parse_templates_doc), - (gl_xml_template_parse_template_node), - (xml_parse_label_rectangle_node), (xml_parse_label_round_node), - (xml_parse_label_cd_node), (xml_parse_layout_node), - (xml_parse_markup_margin_node), (xml_parse_markup_line_node), - (xml_parse_markup_circle_node), - (gl_xml_template_write_templates_to_file), (xml_create_label_node): - * libglabels/xml.c: (gl_xml_get_prop_length): - Re-classified g_warnings to g_messages. - * src/Makefile.am: - * src/glabels.c: (main): - * src/warning-handler.c: (gl_warning_handler_init), - (warning_handler): - * src/warning-handler.h: - Added warning message handler to make sure the user is - presented with appropriate non-fatal errors. - * src/critical-error-handler.c: (critical_error_handler): - Changed exit to abort. - * src/bc-gnubarcode.c: (gl_barcode_gnubarcode_new), (render_pass1): - * src/bc-postnet.c: (postnet_code): - * src/bc.c: (id_to_index), (name_to_index): - * src/merge.c: (gl_merge_register_backend), (gl_merge_new): - * src/object-editor.c: (gl_object_notebook_construct_valist): - * src/prefs-dialog.c: (update_locale_page_from_prefs): - * src/prefs.c: (gl_prefs_get_units_per_point), - (gl_prefs_get_units_precision), (gl_prefs_get_units_step_size), - (gl_prefs_get_units_string): - * src/print.c: (draw_outline), (clip_to_outline), (clip_punchouts): - * src/splash.c: (gl_splash): - * src/ui-commands.c: (gl_ui_cmd_help_contents): - * src/view-highlight.c: (gl_view_highlight_new), - (highlight_resizable_box_construct), (object_changed_cb), - (view_scale_changed_cb): - * src/view.c: (draw_label_layer), (draw_bg_fg_layers), - (draw_markup_layer), (draw_markup_margin), - (gl_view_object_create_mode), (canvas_event), - (selection_received_cb): - * src/wdgt-mini-preview.c: (mini_outline_list_new): - * src/wdgt-rotate-label.c: (mini_preview_canvas_update): - * src/xml-label-04.c: (gl_xml_label_04_parse), - (xml04_parse_media_description), (xml04_parse_text_props), - (xml04_parse_barcode_props): - * src/xml-label-191.c: (gl_xml_label_191_parse), - (xml191_parse_objects), (xml191_parse_object), - (xml191_parse_text_props), (xml191_parse_image_props), - (xml191_parse_barcode_props), (xml191_parse_data), - (xml191_parse_sheet), (xml191_parse_label), (xml191_parse_layout), - (xml191_parse_markup): - * src/xml-label.c: (gl_xml_label_open), (gl_xml_label_open_buffer), - (xml_doc_to_label), (xml_parse_label), (xml_parse_objects), - (xml_parse_object_text), (xml_parse_object_image), - (xml_parse_object_barcode), (xml_parse_data), - (xml_parse_toplevel_span), (gl_xml_label_save), - (xml_create_objects): - Re-classified g_warnings to g_messages. - * src/merge-evolution.c: (gl_merge_evolution_open), - (gl_merge_evolution_close), (gl_merge_evolution_get_record): - Use g_warning to output errors encountered while - communicating with the evolution data server - instead of embedding them in the data. - -2005-12-08 Jim Evins - - * libglabels/libglabels-private.h: - Set G_LOG_DOMAIN - * libglabels/paper.c: (read_papers): - * libglabels/template.c: (read_templates): - Made appropriate warnings critical. - * src/Makefile.am: - * src/critical-error-handler.h: - * src/critical-error-handler.c: (gl_critical_error_handler_init), - (critical_error_handler): - Created critical error handler. - * src/glabels.c: (main): - Register critical error handler. - * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init): - * src/object-editor.c: (gl_object_editor_init): - * src/prefs-dialog.c: (gl_prefs_dialog_init): - * src/template-designer.c: (gl_template_designer_init): - * src/ui-property-bar.c: (gl_ui_property_bar_instance_init): - Made appropriate warnings critical. - -2005-11-27 Jim Evins - - * src/merge-evolution.c: (gl_merge_evolution_get_key_list), - (gl_merge_evolution_get_primary_key), - (gl_merge_evolution_get_record): - Don't create "record_key" pseudo-key. Don't populate - fields with null data. - -2005-11-25 Jim Evins - - * src/merge-evolution.c: (gl_merge_evolution_finalize), - (gl_merge_evolution_get_key_list), (gl_merge_evolution_open), - (gl_merge_evolution_get_record), (gl_merge_evolution_copy), - (free_field_list): - Query EDS for all supported fields. Patch provided by - Austin Henry . - -2005-10-29 Jim Evins - - * src/glabels.c: (main): - * src/label-barcode.c: (gl_label_barcode_finalize): - * src/label-text.c: (gl_label_text_finalize), (set_font_family): - * src/label.c: (gl_label_instance_init), (gl_label_finalize): - * src/object-editor.c: (gl_object_editor_finalize): - Another pass at valgrinding -- plugged several memory leaks. - * src/view-text.c: (gl_view_text_new), - (update_canvas_item_from_object_cb), (draw_hacktext): - Commented out artifacts of edit-in-place code. - -2005-10-28 Jim Evins - - * src/canvas-hacktext.c: (gl_canvas_hacktext_set_arg): - Fixed use of uninitialized variable. Caught by - d binderman . - -2005-10-27 Jim Evins - - * src/merge-evolution.c: (gl_merge_evolution_get_record): - * src/merge-vcard.c: (gl_merge_vcard_get_record), - (parse_next_vcard): - Additional cleanup of EDS and vcard backends. Provided by - Austin Henry . - -2005-10-24 Jim Evins - - * AUTHORS: - * src/Makefile.am: - * src/merge-evolution.c: - * src/merge-evolution.h: - * src/merge-init.c: (gl_merge_init): - * src/merge-properties-dialog.c: (type_changed_cb): - * src/merge-vcard.c: - * src/merge-vcard.h: - * src/ui-commands.c: (gl_ui_cmd_help_about): - Added Evolution Data Server and VCard merge backends. Original patch - provided by Austin Henry . - * configure.in: - Only support EDS and VCard backends if libebook is installed. Allow - user to disable support, even if installed. - -2005-10-24 Jim Evins - - * AUTHORS: - * data/templates/avery-iso-templates.xml: - * data/templates/avery-us-templates.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/zweckform-iso-templates.xml: - Collected all template changes and submissions since last - release. - -2005-10-23 Jim Evins - - * configure.in: - * data/mime/Makefile.am: - Added configure options to disable update-mime-database and - update-desktop-database as part of the install. Patch - provided by Leonardo Boshell (qhoracio@sourceforge.net). - -2005-10-23 Jim Evins - - * libglabels/xml.h: - * libglabels/xml.c: (gl_xml_get_prop_string), - (gl_xml_get_prop_i18n_string), (gl_xml_set_prop_string), - (gl_xml_is_node), (gl_xml_get_node_content): - Added new XML utility functions. - * libglabels/xml-paper.c: - * libglabels/xml-template.c: - * src/xml-label.c: - Cleanup by using new xml utilities created above. - * libglabels/paper.c: (gl_paper_free): - * src/file.c: (new_response): - * src/object-editor-image-page.c: (add_image_filters_to_chooser): - * src/pixbuf-cache.c: (gl_pixbuf_cache_add_pixbuf), - (gl_pixbuf_cache_get_pixbuf): - * src/ui-property-bar.c: - (gl_ui_property_bar_construct_color_combo): - * src/view-highlight.c: (gl_view_highlight_finalize): - * src/view-image.c: (update_object_from_editor_cb): - * src/view.c: (gl_view_finalize), (draw_bg_fg_layers), - (draw_bg_fg_rounded_rect), (draw_bg_fg_round), (draw_bg_fg_cd), - (draw_bg_fg_cd_bc), (draw_markup_layer), (draw_markup_margin), - (draw_markup_margin_rect), (draw_markup_margin_rounded_rect), - (draw_markup_margin_round), (draw_markup_margin_cd), - (draw_markup_margin_cd_bc): - * src/wdgt-mini-preview.c: (mini_outline_list_new): - * src/wdgt-rotate-label.c: (gl_wdgt_rotate_label_finalize): - Plugged various memory leaks located with valgrind. - * src/view-image.c: (update_canvas_item_from_object_cb): - Don't allow a width or height of zero when drawing pixbuf. - -2005-10-22 Jim Evins - - * libglabels/xml-paper.c: - * libglabels/xml-template.c: - * libglabels/xml.c: - * src/base64.c: - * src/bc-gnubarcode.c: - * src/canvas-hacktext.c: - * src/label-text.c: - * src/object-editor-data-page.c: - * src/print-dialog.c: - * src/print.c: - * src/recent.c: - * src/template-designer.c: - * src/text-node.c: - * src/ui-property-bar.c: - * src/ui.c: - * src/view-barcode.c: - * src/view-box.c: - * src/view-ellipse.c: - * src/view-image.c: - * src/view-line.c: - * src/view-text.c: - * src/view.c: - * src/wdgt-media-select.c: - * src/xml-label-04.c: - * src/xml-label-191.c: - * src/xml-label.c: - Modified to compile warning free with gcc-4.0. Mostly - casting to change signedness of characters. Did not - attack gnu-barcode library yet. - -2005-10-22 Jim Evins - - * src/glabels.c: (main): - * src/splash.c: (gl_splash): - Removed some small memory leaks. - * gtk-doc.make: - Added. - -2005-09-19 Jim Evins - - * data/glade/property-bar.glade: - Remove items from font_family_combo. This prevents the - double entry after adding text model and list of fonts. - * src/ui-property-bar.c: (reset_to_default_properties): - Free font_family_list. - -2005-07-01 Jim Evins - - * po/it.po: - Updated italian translation (Daniele Medri) - -2005-06-26 Jim Evins - - * docs/libglabels/libglabels-decl-list.txt: - Somehow never got checked in before. - * docs/libglabels/libglabels.types: - Removed -- don't need it afterall. - -2005-06-20 Jim Evins - - * NEWS: - Final prep for 2.1.1 release. - -2005-06-20 Jim Evins - - * configure.in: - Final preps for 2.1.1 release. - * docs/libglabels/libglabels.types: - Somehow never got checked in before. - * po/POTFILES.in: - Bring up-to-date with recent reorg of ui code. - - -2005-06-19 Jim Evins - - * src/template-designer.c: (construct_layout_page): - Removed attempt to match background color of mini preview widget to - background. - -2005-06-17 Jim Evins - - * help/C/figures/merge-ex2-4.png: - * help/C/glabels.xml: - Fixed spelling error. - -2005-06-13 Jim Evins - - * help/C/figures/merge-ex1-1.png: - * help/C/figures/merge-ex1-2.png: - * help/C/figures/merge-ex1-3.png: - * help/C/figures/merge-ex1-4.png: - * help/C/figures/merge-ex2-1.png: - * help/C/figures/merge-ex2-2.png: - * help/C/figures/merge-ex2-3.png: - * help/C/figures/merge-ex2-4.png: - Added figures for document merge tutorial. - * help/C/glabels.xml: - Added document merge tutorial. - -2005-05-19 Jim Evins - - * data/glade/merge-properties-dialog.glade: - Fixed irregular spacing. - * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init), - (gl_merge_properties_dialog_construct): - Set outer padding and remove separator. - -2005-05-18 Jim Evins - - * src/hig.h: - * src/hig.c: - Removed glHigDialog class. - * src/file.c: (gl_file_new), (create_new_dialog_widgets), - (gl_file_properties), (create_properties_dialog_widgets): - * src/prefs-dialog.h: - * src/prefs-dialog.c: (gl_prefs_dialog_get_type), - (gl_prefs_dialog_init), (gl_prefs_dialog_construct): - * src/print-dialog.h: - * src/prefs-dialog.h: - * src/print-dialog.c: (gl_print_dialog_get_type), - (gl_print_dialog_init), (gl_print_dialog_construct): - Replaced all instances of glHigDialog with GtkDialog. - -2005-05-17 Jim Evins - - * src/hig.h: - * src/hig.c: - Removed HigAlert class since it is obsoleted by the GtkMessageDialog class. - * src/file.c: (open_response), (gl_file_open_real), (gl_file_save), - (save_as_response), (gl_file_close): - Replaced all instances of HigAlert widgets with GtkMessageDialog widgets. - -2005-05-15 Jim Evins - - * src/ui-commands.h: - * src/ui-util.c: - * src/ui-util.h: - * src/ui.c: - * src/ui.h: - * src/view.c: - * src/window.c: - * src/window.h: - A little code reformatting -- no functional changes. - -2005-05-14 Jim Evins - - * src/Makefile.am: - Removed obsolete macros. - * src/marshal.list: - Added marshalling template to support new view signal: "context_menu_activate." - * src/view.h: - * src/view.c: (gl_view_class_init), (gl_view_construct), - (canvas_event_arrow_mode): - - Removed hardcoded context menus and added new signal "context_menu_activate" - to push this up to the uimanager. - - Removed merge properties and print dialogs so that they can be managed with - the window by the uimanager. - * src/merge-properties-dialog.h: - * src/merge-properties-dialog.c: (gl_merge_properties_dialog_new), - (gl_merge_properties_dialog_construct): - Changed calling convention of gl_merge_properties_dialog_new() to use - glLabel and GtkWindow instead of view to make more consistent with other - dialogs. - * src/print-dialog.h: - * src/print-dialog.c: (gl_print_dialog_new), - (gl_print_dialog_construct): - Removed last artifact of libbonoboui. - * src/ui-commands.c: (gl_ui_cmd_file_print), - (gl_ui_cmd_objects_merge_properties), (gl_ui_cmd_help_about): - Reconciled style for launching dialogs. - * src/ui.c: (gl_ui_new): - Added context menus to ui manager. - * src/view-object.c: (item_event_arrow_mode): - No longer try to select objects with right-click. - * src/window.h: - * src/window.c: (gl_window_init), (gl_window_set_label), - (context_menu_activate_cb): - Context menus and all dialogs are now managed in a consistent way in window - by the ui manager. - -2005-05-11 Jim Evins - - * src/window.h: - * src/window.c: (gl_window_init), (gl_window_destroy): - * src/ui.c: (gl_ui_new), (gl_ui_unref), (recent_tooltip_func): - * src/ui-commands.c: (gl_ui_cmd_file_open_recent): - Moved management of recent_view back from window.c to ui.c -- it just feels - better there. - -2005-05-10 Jim Evins - - * src/window.h: - * src/window.c: (gl_window_init): - * src/ui.h: - * src/ui.c: (gl_ui_new), (connect_proxy_cb), (disconnect_proxy_cb), - (menu_item_select_cb), (menu_item_deselect_cb): - Added GtkStatusbar which displays menu tooltips. - -2005-05-09 Jim Evins - - Replaced libbonoboui with GtkUIManager for creation of basic user interface menus - and toolbars. - - * configure.in: - * glabels.spec.in: - Removed dependencies on libbonoboui. - * data/Makefile.am: - * data/ui/Makefile.am: - * data/ui/glabels-ui.xml: - Removed data/ui directory. - * data/glade/Makefile.am: - * data/property-bar.glade: - Added glade description of property-bar for new libglade implementation - of glUIPropertyBar. - * src/Makefile.am: - * src/commands.h: - * src/commands.c: - * src/tools.h: - * src/tools.c: - * src/ui-commands.h: - * src/ui-commands.c: - Replaced commands.[ch] and tools.[ch] with the single ui-commands.[ch] module - since the distinction between "commands" and "tools" is no longer that clear. - * src/file.h: - * src/file.c: - Modified to expect glWindow instead of GtkWindow. gl_file_open_recent() - no longer has knowledge of eggRecent*. - * src/glabels.c: (main): - Removed libbonobo initialization and replaced bonobo_main loop with gtk_main - loop. - * src/object-editor.c: (gl_object_editor_init): - Make sure notebook does not respond to a "show_all" on the parent. - * src/recent-files/Makefile.am: - * src/recent-files/*.[ch] - Updated from latest version of libegg which now has a view based on - GtkUIManager. Removed unused bonobo and gtk views. - * src/ui-property-bar.h: - * src/ui-property-bar.c: - New implementation based on libglade. - * src/ui-sidebar.h: - * src/ui-sidebar.c: - Sidebar is now simply a GtkWidget and does not expect to be a part of - a libbonoboui interface. - * src/ui-util.h: - * src/ui-util.c: - * src/ui.h: - * src/ui.c: - Converted for use with GtkUIManager. - * src/window.h: - * src/window.c: - Now derived from GtkWindow instead of BonoboWindow and uses GtkUIManager - to create menus and toolbars. - -2005-04-25 Jim Evins - - * data/templates/misc-iso-templates.xml: - Added Fellows 04715 template provided by Steve Saxon. - * AUTHORS: - Updated acknowledgement for above. - -2005-04-23 Jim Evins - - * src/util.c: (gl_util_combo_box_set_strings): - Make sure to clear model before loading a new list of strings. - * src/wdgt-media-select.h: - * src/wdgt-media-select.c: (gl_wdgt_media_select_instance_init), - (gl_wdgt_media_select_construct), (page_size_combo_changed_cb), - (template_combo_changed_cb), (prefs_changed_cb), - (gl_wdgt_media_select_get_name), (gl_wdgt_media_select_set_name), - (gl_wdgt_media_select_get_page_size), - (gl_wdgt_media_select_set_page_size): - Replaced the deprecated GtkCombo widget with the new - GtkComboBox. - -2005-04-21 Jim Evins - - * data/glade/template-designer.glade: - * src/template-designer.c: (construct_pg_size_page), - (pg_size_page_changed_cb), (build_template): - Replaced the deprecated GtkCombo widget with the new - GtkComboBox. - -2005-04-20 Jim Evins - - * data/glade/prefs-dialog.glade: - * src/prefs-dialog.c: (construct_object_page), - (update_object_page_from_prefs), (update_prefs_from_object_page): - Replaced the deprecated GtkCombo widget with the new - GtkComboBox. - -2005-04-19 Jim Evins - - * data/glade/object-editor.glade: - * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page), - (style_changed_cb), (gl_object_editor_set_bc_style), - (gl_object_editor_get_bc_style), (gl_object_editor_set_bc_color), - (gl_object_editor_get_bc_color): - * src/object-editor-data-page.c: - (gl_object_editor_prepare_data_page), (gl_object_editor_set_data), - (gl_object_editor_get_data): - * src/object-editor-edit-page.c: - (gl_object_editor_prepare_edit_page), (insert_button_cb): - * src/object-editor-fill-page.c: - (gl_object_editor_prepare_fill_page), - (gl_object_editor_set_fill_color), - (gl_object_editor_get_fill_color): - * src/object-editor-image-page.c: - (gl_object_editor_prepare_image_page), - (gl_object_editor_set_image), (gl_object_editor_get_image): - * src/object-editor-line-page.c: - (gl_object_editor_prepare_line_page), - (gl_object_editor_set_line_color), - (gl_object_editor_get_line_color): - * src/object-editor-private.h: - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page), - (gl_object_editor_set_font_family), - (gl_object_editor_get_font_family), - (gl_object_editor_set_text_color), - (gl_object_editor_get_text_color): - * src/object-editor.c: (gl_object_editor_set_key_names): - * src/ui-sidebar.c: - In the object editor: replaced all instances of the deprecated - GtkCombo widget with the new GtkComboBox. - -2005-04-18 Jim Evins - - * src/stock.c: - Neglected to save this one in previous checkin to support - header cleanup. - -2005-04-17 Jim Evins - - * libglabels/libglabels-private.h: - * libglabels/paper.c: - * libglabels/paper.h: - * libglabels/template.c: - * libglabels/template.h: - * libglabels/xml-paper.c: - * libglabels/xml-paper.h: - * libglabels/xml-template.c: - * libglabels/xml.c: - * libglabels/xml.h: - * src/base64.c: - * src/base64.h: - * src/bc-gnubarcode.c: - * src/bc-postnet.c: - * src/bc.c: - * src/bc.h: - * src/commands.c: - * src/debug.c: - * src/debug.h: - * src/file.c: - * src/file.h: - * src/hig.c: - * src/hig.h: - * src/label-barcode.c: - * src/label-box.c: - * src/label-ellipse.c: - * src/label-image.c: - * src/label-image.h: - * src/label-line.c: - * src/label-object.c: - * src/label-text.c: - * src/label-text.h: - * src/label.c: - * src/merge-properties-dialog.c: - * src/object-editor-bc-page.c: - * src/object-editor-data-page.c: - * src/object-editor-edit-page.c: - * src/object-editor-fill-page.c: - * src/object-editor-image-page.c: - * src/object-editor-line-page.c: - * src/object-editor-lsize-page.c: - * src/object-editor-position-page.c: - * src/object-editor-private.h: - * src/object-editor-size-page.c: - * src/object-editor-text-page.c: - * src/object-editor.c: - * src/object-editor.h: - * src/pixbuf-cache.h: - * src/prefs-dialog.c: - * src/prefs-dialog.h: - * src/prefs-model.c: - * src/prefs-model.h: - * src/prefs.c: - * src/print-dialog.c: - * src/print-dialog.h: - * src/print.c: - * src/print.h: - * src/recent.c: - * src/recent.h: - * src/splash.c: - * src/splash.h: - * src/stock.h: - * src/template-designer.c: - * src/template-designer.h: - * src/text-node.h: - * src/tools.c: - * src/ui-property-bar.c: (gl_ui_property_bar_construct): - * src/ui-sidebar.c: - * src/ui-util.c: - * src/ui.c: - * src/util.c: - * src/util.h: - * src/view-barcode.c: - * src/view-box.c: - * src/view-ellipse.c: - * src/view-highlight.c: - * src/view-highlight.h: - * src/view-image.c: - * src/view-line.c: - * src/view-object.c: - * src/view-object.h: - * src/view-text.c: - * src/view.c: - * src/view.h: - * src/wdgt-chain-button.c: - * src/wdgt-media-select.c: - * src/wdgt-media-select.h: - * src/wdgt-mini-preview.c: - * src/wdgt-mini-preview.h: - * src/wdgt-print-copies.c: - * src/wdgt-print-copies.h: - * src/wdgt-print-merge.c: - * src/wdgt-print-merge.h: - * src/wdgt-rotate-label.c: - * src/wdgt-rotate-label.h: - * src/window.c: - * src/window.h: - * src/xml-label-04.c: - * src/xml-label-191.c: - * src/xml-label.c: - Cleanup of header files: - - all header files are now stand-alone, verified by including - first in corresponding "c" files - - replaced blanket includes of gnome, gtk, and glib with - targetted includes - -2005-04-16 Jim Evins - - * data/glade/Makefile.am: - * data/glade/merge-properties-dialog.glade: - Added merge properties dialog glade description file. - * src/merge-properties-dialog.h: - * src/merge-properties-dialog.c: - (gl_merge_properties_dialog_get_type), - (gl_merge_properties_dialog_init), - (gl_merge_properties_dialog_finalize), - (gl_merge_properties_dialog_new), - (gl_merge_properties_dialog_construct), (type_changed_cb), - (src_changed_cb), (response_cb), (load_tree), - (record_select_toggled_cb), (select_all_button_clicked_cb), - (unselect_all_button_clicked_cb): - Modified merge properties dialog to use libglade. Added - "select all" and "unselect all" buttons. - * src/merge-text.c: (parse_line): - Handle empty lines better. - * src/merge.c: (gl_merge_eval_key): - Evaluate the key whether the record is selected or not. - * src/util.h: - * src/util.c: (gl_util_combo_box_add_text_model): - Since libglade does not use the gtk_combo_box_new_text() - constructor for GtkComboBoxes, a utility function was created - to add an appropriate text model to a GtkComboBox. - * src/view.c: (gl_view_edit_merge_props): - Removed unnecessary "show all's". - -2005-04-15 Jim Evins - - * po/ru.po: - Updated russian translation (Vitaly Lipatov) - * data/templates/misc-iso-templates.xml: - Added templates for russian business cards provided by Vitaly Lipatov. - * AUTHORS: - Updated acknowledgements for above. - -2005-04-15 Jim Evins - - * data/templates/avery-us-templates.xml: - Added Avery 5388 and 5389 templates provided by Peter L. Berghold. - * data/templates/misc-iso-templates.xml: - Added Ryman standard CD/DVD template, provided by Dan Clark. - * AUTHORS: - Added acknowledgements for above. - -2005-04-10 Jim Evins - - * libglabels/xml-paper.c: (gl_xml_paper_parse_paper_node): - * libglabels/xml-template.c: (gl_xml_template_parse_template_node), - (xml_parse_label_rectangle_node), (xml_parse_label_round_node), - (xml_parse_label_cd_node), (xml_parse_alias_node): - * libglabels/xml.c: (gl_xml_get_prop_double), - (gl_xml_get_prop_boolean), (gl_xml_get_prop_int), - (gl_xml_get_prop_uint), (gl_xml_get_prop_length): - * src/xml-label-04.c: (xml04_parse_media_description), - (xml04_parse_text_props), (xml04_parse_barcode_props), - (xml04_parse_merge_properties): - * src/xml-label-191.c: (xml191_parse_object), - (xml191_parse_text_props), (xml191_parse_barcode_props), - (xml191_parse_merge_fields), (xml191_parse_pixdata), - (xml191_parse_sheet), (xml191_parse_label), (xml191_parse_markup), - (xml191_parse_alias): - * src/xml-label.c: (xml_parse_object_text), - (xml_parse_object_barcode), (xml_parse_merge_fields), - (xml_parse_pixdata), (xml_parse_toplevel_span): - Make sure to use xmlFree for anything obtained from libxml - in case libxml and glib use different memory management - space. - -2005-04-08 Jim Evins - - * src/util.h: - * src/util.c: (gl_util_combo_box_set_strings), (search_text_func), - (gl_util_combo_box_set_active_text): - Added utility functions to simplify working with GtkComboBox - widgets in GTK-2.6. - * src/ui-property-bar.h: - * src/ui-property-bar.c: (gl_ui_property_bar_construct), - (reset_to_default_properties), (update_text_properties), - (font_family_changed_cb): - Replaced deprecated GtkCombo with GtkComboBox. - - -2005-04-03 Jim Evins - - * src/Makefile.am: - * src/wdgt-image-select.h: - * src/wdgt-image-select.c: - Removed obsolete wdgt-image-select.[ch] files. - * libglabels/paper.c: (gl_paper_dup): - Fixed rename of parameter introduced during documentation - updates. - * data/glade/object-editor.glade: - * src/object-editor-image-page.c: - (gl_object_editor_prepare_image_page), (img_radio_toggled_cb), - (gl_object_editor_set_image), (gl_object_editor_get_image), - (update_preview_cb), (add_image_filters_to_chooser): - * src/object-editor-private.h: - Replaced deprecated GnomePixmapEntry with - GtkFileChooserButton. - -2005-04-02 Jim Evins - - * src/mygal/mygal-combo-box.c: (deactivate_arrow), - (mygal_combo_box_popup_hide_unconditional), - (mygal_combo_box_popup_hide), (mygal_combo_box_popup_display), - (mygal_combo_toggle_pressed), (mygal_combo_box_init), - (mygal_combo_popup_tear_off), (mygal_combo_set_tearoff_state), - (mygal_combo_tearoff_bg_copy), (mygal_combo_popup_reparent), - (cb_tearable_button_release), (mygal_combo_box_set_tearable): - Renamed all internal gtk_combo functions to mygal_combo - to prevent namespace confusion. - -2005-04-02 Jim Evins - - * src/mygal/color-palette.c: (color_palette_change_custom_color), - (cust_color_set), (color_palette_setup): - * src/mygal/color-palette.h: - Replaced deprecated GnomeColorPicker with GtkColorButton. - -2005-04-02 Jim Evins - - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/enums.sgml: - * docs/libglabels/tmpl/paper.sgml: - * docs/libglabels/tmpl/xml-paper.sgml: - * docs/libglabels/tmpl/xml-template.sgml: - * libglabels/enums.h: - * libglabels/paper.c: (gl_paper_dup): - * libglabels/paper.h: - * libglabels/xml-paper.c: - * libglabels/xml-template.c: - More documentation updates for libglabels. - -2005-03-23 Jim Evins - - * INSTALL: - Automatically updated. - * Makefile.am: - * autogen.sh: - * configure.in: - * docs/Makefile.am: - * docs/libglabels/Makefile.am: - * docs/libglabels/libglabels-docs.sgml: - * docs/libglabels/libglabels-sections.txt: - * docs/libglabels/libglabels-undocumented.txt: - * docs/libglabels/tmpl/enums.sgml: - * docs/libglabels/tmpl/libglabels-unused.sgml: - * docs/libglabels/tmpl/libglabels.sgml: - * docs/libglabels/tmpl/paper.sgml: - * docs/libglabels/tmpl/template.sgml: - * docs/libglabels/tmpl/xml-paper.sgml: - * docs/libglabels/tmpl/xml-template.sgml: - * docs/libglabels/tmpl/xml.sgml: - Added basic gtk-doc stuff to support documenting libglabels - API. - * libglabels/xml.c: - Updated function comments with gtk-doc markup. - * missing: - Removed. - -2005-03-22 Jim Evins - - Since the development version now requires gtk-2.6/gnome-2.10, I - have made a first pass at removing deprecations. - - * configure.in: - * libglabels/Makefile.am: - * src/Makefile.am: - Added configure option to turn on X_DISABLE_DEPRECATED flags. - Also removed all remnants of HAVE_FILECHOOSER. - * src/file.c: (gl_file_open_real): - Removed code for old GtkFileSelection. - * libglabels/libglabels-private.h: - * libglabels/paper.c: - * libglabels/template.c: - * libglabels/xml-paper.c: - * libglabels/xml-template.c: - * libglabels/xml.c: - * src/bc.c: - * src/file.c: - * src/glabels-batch.c: - * src/glabels.c: - * src/label.c: - * src/merge-init.c: - * src/merge-properties-dialog.c: - * src/merge.c: - * src/object-editor.c: - * src/prefs-dialog.c: - * src/prefs.c: - * src/print-dialog.c: - * src/print.c: - * src/stock.c: - * src/template-designer.c: - * src/ui-property-bar.c: - * src/ui-sidebar.c: - * src/view-barcode.c: - * src/view-box.c: - * src/view-ellipse.c: - * src/view-image.c: - * src/view-line.c: - * src/view-text.c: - * src/view.c: - * src/wdgt-image-select.c: - * src/wdgt-media-select.c: - * src/wdgt-print-copies.c: - * src/wdgt-print-merge.c: - * src/wdgt-rotate-label.c: - * src/window.c: - * src/xml-label-04.c: - * src/xml-label-191.c: - * src/xml-label.c: - Added '#include " where needed. - Removed any unused '#include "s. - -2005-03-22 Jim Evins - - * src/commands.c: (activate_url), (gl_cmd_help_about): - Replaced GnomeAbout with GtkAboutDialog. Therefore the - development version of glabels now depends on GTK 2.6 and - GNOME 2.10. - * configure.in: - Updated library dependencies. - -2005-02-28 Jim Evins - - * AUTHORS: - * data/templates/misc-iso-templates.xml: - Added 'Ednet 45021' template provided by Ali Akcaagac - . - -2005-02-14 Jim Evins - - * data/templates/avery-us-templates.xml: - Updated templates to use inches instead of points. - * src/print-dialog.c: (printer_page_new): - Changed packing style when adding printer selector widget. This fixes - debian Bug#295274. - -2005-02-13 Jim Evins - - * AUTHORS: - * po/es.po: - Updated spanish translations. (sergio rivadero) - -2005-02-05 Jim Evins - - Some cleanup to libglabels. - - * configure.in: - Updated version to 2.1.1cvs. Added generation of libglabels.pc. - * libglabels/libglabels.pc.in - Created. - * libglabels/enums.h - Created. Currently only contains glUnitsType which provides enumerations - for all possible units of distance. - * libglabels/Makefile.am: - Incorporated new files enums.h and libglabels.pc[.in]. - * libglabels/libglabels.h: - Include enums.h. - * libglabels/template.h: - * libglabels/template.c: (gl_template_layout_new): - Changed parameters nx and ny to gint from gdouble. - * libglabels/xml.h: - * libglabels/xml.c: (gl_xml_get_prop_length), - (gl_xml_set_prop_length), (gl_xml_set_default_units): - Added support for different output units. - * src/prefs-dialog.c: (update_locale_page_from_prefs), - (update_prefs_from_locale_page): - * src/prefs-model.c: (string_to_units), (units_to_string): - * src/prefs-model.h: - * src/prefs.c: (gl_prefs_get_units_per_point), - (gl_prefs_get_units_precision), (gl_prefs_get_units_step_size), - (gl_prefs_get_units_string): - * src/prefs.h: - * src/wdgt-media-select.c: (details_update), (get_label_size_desc): - Reconciled all length enumerations with the new enumerations provided - in libglabels/enums.h. - -2005-02-03 Jim Evins - - * po/cs.po: - Updated Czech translations. (David Makovský and Zbynek Mrkvick) - * po/it.po: - Updated Italian translations. (Daniele Medri) - * AUTHORS: - Updated credits to reflect above translations. - - -2005-01-22 Jim Evins - - * MESSAGE-OF-DOOM: - Added. - * Makefile.am: - Added MESSAGE-OF-DOOM to EXTRA_DIST. - * NEWS: - Final prep for 2.1.0. - * configure.in: - Set version to 2.1.0. Output MESSAGE-OF-DOOM. - * glabels.spec.in: - Added '--remove-original' flag to desktop-file-install, so that there is - only one menu entry. - -2005-01-20 Jim Evins - - * data/glade/object-editor.glade: - - Font family entry should not be editable. - - img_key_entry should have sensitivity=YES, so that it follows the - sensitivity of img_key_combo. - -2005-01-19 Jim Evins - - * AUTHORS: - Give credit to Frederic Ruaudel for the color merge patches. - -2005-01-18 Frederic Ruaudel - - Add support to merge color for all other color attribute (Feature - Requests item #1008635. If the data is invalid, the color used is transparent - (GL_COLOR_NONE). The format for color in merge data file are those accepted - by gdk_color_parse() these include name for a color from rgb.txt, such as - DarkSlateGray, or a hex specification such as #305050. File format has been - changed but backward compatibility is preserved for all format. For - box/ellipse/line, keep attribute "line_color" for static color or replace by - "line_color_field" for merge data. For text/barcode objects, keep attribute - "color" for static color or replace by "color_field" for merge data. In the - edit canvas window, merged color are represented by half-transparent black - line/area. - - * data/dtd/glabels-2.0.dtd: - Added line_color_field to line_attrs. Added color_field to - Object-barcode and Span. - * data/glade/object-editor.glade: - Modify the layout of the editor to add merge possibility to color options - * src/color.c: - Fix a copy/paste error in a comment - * src/color.h: - Add default color for merge color representation in the editor canvas. - * src/label-barcode.c: - * src/object-editor-bc-page.c: - * src/view-barcode.c: - Add merge color support for barcode color. - * src/label-box.c: - * src/view-box.c: - Add merge color support for box border color. - * src/label-ellipse.c: - * src/view-ellipse.c: - Add merge color support for ellipse border color. - * src/label-line.c: - * src/view-line.c: - Add merge color support for line color. - * src/label-object.c: - * src/label-object.h: - * src/object-editor.c: - * src/object-editor.h: - * src/ui-property-bar.c: - * src/view.c: - * src/view.h: - * src/xml-label-04.c: - * src/xml-label-191.c: - Add support for merging to other color attribute. - * src/label-text.c: - * src/object-editor-text-page.c: - * src/view-text.c: - Add merge color support for text color. - * src/object-editor-fill-page.c: - Change a blocked handler that didn't match the good widget. Fix the type - of some debug message. - * src/object-editor-line-page.c: - Add merging support to line color option. - * src/object-editor-private.h: - Add variables for new widget. - * src/print.c: - Modify the draw functions to get merge data if needed. - * src/window.c: - Change the default size of the window in order to see all widget in the - "text style tab" of the editor. - * src/xml-label.c: - Modify the parser to record/retreive the field value for objects that need - "color" attribute. For box/ellipse/line, keep attribute "line_color" for - static color or replace by "line_color_field" for merge data. For - text/barcode objects, keep attribute "color" for static color or replace - by "color_field" for merge data. - -2005-01-17 Jim Evins - - * src/view.c: (screen_changed_cb): - Don't do anything if we don't have a screen. - -2005-01-06 Jim Evins - - * src/view.c: (get_home_scale): - Fixed bad call to gtk_widget_has_screen() -- huh?. - -2005-01-06 Jim Evins - - * data/dtd/glabels-2.0.dtd: - Added fill_color_field to fill_attrs. Also added xmlns attribute to all - top-level elements. - -2005-01-06 Jim Evins - - * data/glade/object-editor.glade: - Set entries for fill and data field key dropdowns to NOT editable. - * src/view-box.c: (construct_properties_editor): - * src/view-ellipse.c: (construct_properties_editor): - Update object editor when label's merge property has changed. - * src/xml-label.c: (xml_parse_object_ellipse): - Completed the merge color support for the ellipse item. - -2005-01-06 Frederic Ruaudel - - Add support to merge color for object that have a "Fill color" attribute (Feature - Requests item #1008635. If the data is invalid, the color used is transparent - (GL_COLOR_NONE). The format for color in merge data file are those accepted - by gdk_color_parse() these include name for a color from rgb.txt, such as - DarkSlateGray, or a hex specification such as #305050. File format has been - changed but backward compatibility is preserved for all format. For box/ellipse, - keep attribute "fill_color" for static color or replace by "fill_color_field" - for merge data. - - * data/glade/object-editor.glade: - Modify "Fill" tab to add the merge key combo and convert the labels into - radio button. - * src/color.h: - * src/color.c: - Add "glColorNode" structure and associated functions to manage it. This - structure is equivalent for color than the "glTextNode". It holds the color - and the key field. - * src/label-object.h: - * src/label-object.c: - * src/label-box.c: - * src/label-ellipse.c: - * src/ui-property-bar.c: - * src/view.h: - * src/view.c: - * src/view-box.c: - * src/view-ellipse.c: - * src/xml-label-04.c: - * src/xml-label-191.c: - Change functions of objects that have a "fill color" attribute to use the - new "glColorNode" structure. Use barcode code as example. - * src/Makefile.am: - Add the color.[ch] file to glabels_batch binary that now need support for - "glColorNode". - * src/object-editor.h: - * src/object-editor.c: - * src/object-editor-fill-page.c: - Manage the new widget of the editor's "Fill" tab : key combo and radio button - to choose between static color or merge key. Use barcode code as example. - * src/object-editor-private.h: - Add new widget in the "_glObjectEditorPrivate" structure. - * src/print.c: - Modify the draw functions to get merge data if needed. - * src/xml-label.c: - Modify the parser to record/retreive the field value for objects that need - "Fill color" attribute. For box/ellipse, put attribute "fill_color" for static - color or "fill_color_field" for merge data. - -2005-01-04 Jim Evins - - * AUTHORS: - * data/templates/avery-iso-templates.xml: - * data/templates/misc-iso-templates.xml: - * data/templates/misc-us-templates.xml: - Added templates, submitted by Larry Harriman, Juan Carlos Valero, and - Nick Hill. - -2004-11-26 Jim Evins - - * AUTHORS: - * po/fr.po: - Updated french translations provided by Florent Morel . - * src/view-barcode.c: - * src/view-box.c: - * src/view-ellipse.c: - * src/view-image.c: - * src/view-line.c: - * src/view-text.c: - Added '#include ' -- HAVE_*GETTEXT macros were not defined and - thus _() strings were not being translated. - -2004-11-14 Jim Evins - - * src/debug.h: - * src/debug.c: (gl_debug_init), (gl_debug): - Borrowed from gedit: use environmental variables to select debug - sections. - * src/splash.c: - Removed unused include of debug.h. - * src/glabels.c: (main): - Added call to gl_debug_init(), and removed debug clutter from command line - options. - * src/glabels-batch.c: (main): - Added call to gl_debug_init(). - -2004-11-13 Jim Evins - - Drawing and property toolbars were being initialized with the "icons and text" - look in Fedora Core 3. Even though none of the buttons had any text attached to - them, the buttons were being sized as if they were. This led to less real estate - for the property editor, leading to Bug #1064630. The - - * data/ui/glabels-ui.xml: - Added explicit "look" property to both drawing and property toolbars. - * src/prefs-model.c: (gl_prefs_model_save_settings), - (gl_prefs_model_load_settings): - * src/prefs-model.h: - Removed drawing_toolbar_button_style configuration parameter. - * src/ui.c: (view_menu_item_toggled_cb), - (set_app_drawing_toolbar_style): - Do not attempt to adjust look property of the drawing toolbar. - -2004-10-28 Jim Evins - - * data/pixmaps/glabels-about-logo.png: - Updated about logo. - -2004-10-28 Jim Evins - - * data/man/glabels.1: - * src/glabels-batch.c: (main): - * src/print.h: - * src/print.c: (gl_print_batch): - - Added option to glabels-batch to select the first label to begin - printing on. - -2004-09-26 Jim Evins - - * data/desktop/glabels.desktop.in: - Point to app icon, "glabels.png" - * data/mime/glabels.keys.in: - Point at mime icon, "glabels-application-x-glabels.png" - * data/pixmaps/Makefile.am: - Added glabels_app_icondir. Renamed icons. - * data/pixmaps/glabels.png: - New cleaned up app icon. Deleted glabels-icon.png. - * data/pixmaps/glabels-application-x-glabels.png: - New mime icon. - * data/pixmaps/glabels-splash.png: - Renamed glabels-logo to glabels-splash to be more correct about role. - * src/glabels.c: - * src/template-designer.c: - Point at app icon, "glabels.png" - * src/splash.c: - Point at renamed splash image, "glabels-splash.png" - -2004-08-22 Jim Evins - - * AUTHORS: - * src/glabels-batch.c: (main): - Applied patch with minor mods to allow selecting merge source and - crop-marks on glabels-batch's command line. Original patch provided by - José Dapena Paz . - -2004-08-15 Jim Evins - - * data/desktop/glabels.desktop.in: - - Added encoding line - - Removed period from comment - - Fixed Terminal line, changed "0" to "false" - - Added semicolen to Categories line - * po/ja.po: - - Made sure desktop.in comment string above still translated properly - -2004-08-14 Jim Evins - - * libglabels/xml-paper.c: (gl_xml_paper_parse_paper_node): - * libglabels/xml-template.c: (gl_xml_template_parse_template_node): - * src/xml-label-191.c: (xml191_parse_sheet): - Fixed improper freeing of gettext strings. Merged from 2.0.1. - * configure.in: - Reconciled libglabels versioning with 2.0.1. - - -2004-08-14 Jim Evins - - * configure.in: - Updated version to 2.1cvs. - -2004-08-14 Jim Evins - - * po/ja.po: - Updated 2.0.x translation by Takeshi AIHANA . - -2004-08-14 Jim Evins - - Fixes for Bug #1008181. - - * src/bc.c: (gl_barcode_default_digits): - Make a format of zero digits, harmless. - * src/xml-label.c: (xml_parse_object_barcode): - Set default value of the format property of barcode objects to 10, not - zero. This will prevent crashes when reading pre 2.0.x files. - -2004-08-09 Jim Evins - - * NEWS: - * TODO: - * help/C/glabels-C.omf: - * help/C/glabels.xml: - Brought documentation up-to-date for 2.0.0 release. - -2004-08-09 Jim Evins - - These are hopefully the final preparations for 2.0.0. - - * data/mime/Makefile.am: - Include glabels.xml in EXTRA_DIST. - * configure.in: - - Updated comment style. - - Added LIBGLABELS_VERSION_INFO macro, updated Current. - - Added package and version info to configuration printout - - Update version to 2.0.0 - * libglabels/Makefile.am: - Use the new LIBGLABELS_VERSION_INFO macro. - -2004-08-09 Jim Evins - - * configure.in: - * glabels.spec.in: - Cleanup of required library macros. - -2004-08-08 Jim Evins - - * glabels.spec.in: - - Updated URL - - More specific of what to install in /usr/bin and /usr/lib - - Remove built mime registration files from staging directory - -2004-08-08 Jim Evins - - * data/mime/Makefile.am: - Fixed typo: key_files should have been keys_files. - -2004-08-08 Jim Evins - - Reorganization of runtime data files. Also added registration of mimetype with - new freedesktop.org mime database if available. - - * data/* - Moved files to appropriate subdirectories, creating local Makefile.am - in each subdirectory. - - Moved paper-sizes.xml and *-templates.xml to templates subdirectory. - These are now installed at $datadir/glabels/templates. - - Moved glabels.1 to man subdirectory. - - Moved glabels-2.0.dtd to dtd subdirectory. - - Moved glabels.desktop.in to desktop subdirectory. - - Moved glabels.keys.in and glabels.mime to mime subdirectory. - * data/pixmaps/* - Moved "./pixmaps" to "./data/pixmaps" - * data/ui/* - Moved src/glabels-ui.xml to data/ui directory. Created Makefile.am. - * data/glade/* - Moved libglade files from src to data/glade. Created Makefile.am. - * Makefile.am: - Removed pixmaps from SUBDIRS. - * configure.in: - - Removed pixmaps from makefiles. - - Added makefiles for new subdirs of data. - - Added tests for freedesktop.org mime database. - * glabels.spec.in: - - Added tests for freedesktop.org mime database for post install and - post un-install actions. - * libglabels/Makefile.am: - Moved system template files to $(datadir)/glabels/templates. - * libglabels/libglabels-private.h: - Moved system template files to $(datadir)/glabels/templates. - * po/POTFILES.in: - - Accounted for movement of ui and libglade files. - - Added missing .in files. - - Reorganized by directory. - * src/Makefile.am: - Accounted for movement of ui and libglade files. - * data/mime/glabels.xml.in: - New file for registering with freedesktop.org mime database. - -2004-08-07 Jim Evins - - * src/recent-files/*: - Re-synced to latest libegg/recent-files. - -2004-08-07 Jim Evins - - * Makefile.am: - * configure.in: - * help/* - Renamed "./doc" directory to "./help" which contains user documentation, - to be more consistent with other GNOME applications. - - -2004-07-26 Jim Evins - - * src/merge-properties-dialog.c: (gl_merge_properties_dialog_init): - Corrected button order of merge properties dialog. - -2004-07-18 Jim Evins - - * data/glabels-2.0.dtd: - * src/bc.c: (gl_barcode_default_digits), (gl_barcode_can_freeform), - (gl_barcode_get_prefered_n): - * src/bc.h: - * src/label-barcode.c: (copy), (gl_label_barcode_set_props), - (gl_label_barcode_get_props), (get_size): - * src/label-barcode.h: - * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page), - (style_changed_cb), (gl_object_editor_set_bc_style), - (gl_object_editor_get_bc_style): - * src/object-editor-data-page.c: (data_radio_toggled_cb), - (gl_object_editor_set_data), (gl_object_editor_get_data): - * src/object-editor-private.h: - * src/object-editor.c: (gl_object_editor_set_key_names): - * src/object-editor.glade: - * src/object-editor.h: - * src/print.c: (draw_barcode_object): - * src/view-barcode.c: (update_object_from_editor_cb), - (update_editor_from_object_cb), - (gl_view_barcode_create_event_handler), (draw_barcode): - * src/xml-label-04.c: (xml04_parse_barcode_props): - * src/xml-label-191.c: (xml191_parse_barcode_props): - * src/xml-label.c: (xml_parse_object_barcode), - (xml_create_object_barcode): - Added "format" attribute to barcode objects. This attribute is used - to properly format freeform barcodes barcodes prior to merge data is - applied, so that barcodes can be accurately layed out. This addresses - remaining issues of feature request #824787. Also added an example of - the format in the object editor. - -2004-07-12 Jim Evins - - Various code cleanups. - - * src/label-barcode.c: - Removed unneeded include of gnome-glyphlist.h. - - * src/label-text.c: (get_size): - Fixed memory leak: unref glyphlists when done with them. - - * src/object-editor-bc-page.c: (gl_object_editor_prepare_bc_page): - * src/object-editor-data-page.c: - (gl_object_editor_prepare_data_page): - * src/object-editor-image-page.c: - (gl_object_editor_prepare_image_page): - * src/object-editor-line-page.c: - (gl_object_editor_prepare_line_page): - * src/object-editor-lsize-page.c: - (gl_object_editor_prepare_lsize_page): - * src/object-editor-position-page.c: - (gl_object_editor_prepare_position_page): - * src/object-editor-size-page.c: - (gl_object_editor_prepare_size_page): - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page): - Removed unneeded size groups, originally intended to keep widgets aligned. - Now use tables to lay these out in object-editor.glade. - - * src/print.c: (draw_text_object): - Fixed memory leak: unref glyphlists when done with them. - - * src/view-barcode.c: (draw_barcode): - Fixed memory leak: unref glyphlists when done with them. - - * src/view-text.c: (update_object_from_editor_cb), (draw_hacktext): - - Removed unneeded cast of gl_object_editor_get_text_line_spacing()s - return value. - - Fixed memory leak: unref glyphlists when done with them. - -2004-07-11 Jim Evins - - * data/glabels-2.0.dtd: - * src/label-text.c: (gl_label_text_instance_init), (copy), - (gl_label_text_set_auto_shrink), (gl_label_text_get_auto_shrink): - * src/label-text.h: - * src/object-editor-private.h: - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page), - (gl_object_editor_set_text_auto_shrink), - (gl_object_editor_get_text_auto_shrink): - * src/object-editor.c: (gl_object_editor_set_key_names): - * src/object-editor.glade: - * src/object-editor.h: - * src/print.c: (draw_text_object): - * src/view-text.c: (update_object_from_editor_cb), - (update_editor_from_object_cb): - * src/xml-label.c: (xml_parse_object_text), - (xml_create_object_text): - Added option to allow document merge to auto shrink text size to fit - within the text box. The code in print.c that actually shrinks the - text is loosely based on a patch submitted by Mark Harrison - . This addresses feature request - #661421. - -2004-07-11 Jim Evins - - * data/glabels-2.0.dtd: - * libglabels/template.c: (gl_template_rect_label_type_new), - (gl_template_round_label_type_new), - (gl_template_cd_label_type_new), (gl_template_label_type_dup), - (template_full_page): - * libglabels/template.h: - * libglabels/xml-template.c: (xml_parse_label_rectangle_node), - (xml_create_label_node): - * pixmaps/ex-rect-size.png: - * src/print.c: (clip_to_outline), (clip_punchouts): - * src/template-designer.c: (construct_rect_size_page), - (rect_size_page_prepare_cb), (layout_page_prepare_cb), - (build_template): - * src/template-designer.glade: - * src/xml-label-191.c: (xml191_parse_label): - Modifications to allow separate horizontal (x_waste) and vertical (y_waste) - properties for rectangular labels. Templates remain backwards compatible, - but this breaks the libglabels API (I don't know of anyone outside of - glabels using libglabels at this time -- what can I say, the program is - is still "unstable"). This addresses the suggestion in Feature Request - #976313. - -2004-07-05 Jim Evins - * src/print.c: (print_crop_marks), (draw_outline): - Changed crop marks and label outlines to black, instead of 25% gray. - This addresses debian Bug #257460. - -2004-07-05 Jim Evins - - * src/object-editor-fill-page.c: (gl_object_editor_set_fill_color): - * src/object-editor-line-page.c: (gl_object_editor_set_line_color): - Preserve "is_default" of fill and line color_combos when creating from - existing objects. - -2004-07-02 Jim Evins - - * data/glabels.1: - Created man page. Based on page submitted by Matthew J. Lockner, however - it has been severely edited. - - * data/avery-other-templates.xml - * data/misc-other-templates.xml: - Started new files for predefined templates with non-standard sheet sizes. - These have been initially populated with the Avery 06141 and - OfficeMax #86112, both provided by Matthew J. Lockner. - - * data/Makefile.am: - Install above manpage and template files. - - * glabels.spec.in: - Make sure we install man pages. - - * src/glabels-batch.c: - Changed short form of help option to '-?' to be consistent with glabels. - - * AUTHORS: - Added acknowledgement for above labels. - -2004-07-02 Jim Evins - - * src/glabels.c: (main), (save_session_cb): - - Now include libbonoboui.h, recent.h, and file.h to provide missing - prototypes. - - save_session_cb() now returns gboolean. - - Minor formatting changes. - - * src/window.h: - * src/window.c: - - Now include file.h to provide missing prototype. - - gl_window_get_type() now returns GType, not guint. I believe this may - ultimately be cause of the segfault reported in Bug #982287, since - GType is actually a gulong, which may not be compatible on other - architectures (64bit) -- I cannot personally test this at this time. - I was sloppy in several other xxx_get_type() functions which also - returned guint -- see next group of files: - - * src/window.c: (gl_window_get_type): - * src/canvas-hacktext.c: (gl_canvas_hacktext_get_type): - * src/canvas-hacktext.h: - * src/hig.c: (gl_hig_alert_get_type), (gl_hig_dialog_get_type), - (gl_hig_category_get_type), (gl_hig_vbox_get_type), - (gl_hig_hbox_get_type): - * src/hig.h: - * src/label-barcode.c: (gl_label_barcode_get_type): - * src/label-barcode.h: - * src/label-box.c: (gl_label_box_get_type): - * src/label-box.h: - * src/label-ellipse.c: (gl_label_ellipse_get_type): - * src/label-ellipse.h: - * src/label-image.c: (gl_label_image_get_type): - * src/label-image.h: - * src/label-line.c: (gl_label_line_get_type): - * src/label-line.h: - * src/label-object.c: (gl_label_object_get_type): - * src/label-object.h: - * src/label-text.c: (gl_label_text_get_type): - * src/label-text.h: - * src/label.c: (gl_label_get_type): - * src/label.h: - * src/merge-properties-dialog.c: - (gl_merge_properties_dialog_get_type): - * src/merge-properties-dialog.h: - * src/merge-text.c: (gl_merge_text_get_type): - * src/merge-text.h: - * src/merge.c: (gl_merge_get_type): - * src/merge.h: - * src/object-editor.c: (gl_object_editor_get_type): - * src/prefs-dialog.c: (gl_prefs_dialog_get_type): - * src/prefs-dialog.h: - * src/prefs-model.c: (gl_prefs_model_get_type): - * src/prefs-model.h: - * src/print-dialog.c: (gl_print_dialog_get_type): - * src/print-dialog.h: - * src/template-designer.c: (gl_template_designer_get_type): - * src/template-designer.h: - * src/ui-property-bar.c: (gl_ui_property_bar_get_type): - * src/ui-property-bar.h: - * src/ui-sidebar.c: (gl_ui_sidebar_get_type): - * src/ui-sidebar.h: - * src/view-barcode.c: (gl_view_barcode_get_type): - * src/view-barcode.h: - * src/view-box.c: (gl_view_box_get_type): - * src/view-box.h: - * src/view-ellipse.c: (gl_view_ellipse_get_type): - * src/view-ellipse.h: - * src/view-highlight.c: (gl_view_highlight_get_type): - * src/view-highlight.h: - * src/view-image.c: (gl_view_image_get_type): - * src/view-image.h: - * src/view-line.c: (gl_view_line_get_type): - * src/view-line.h: - * src/view-object.c: (gl_view_object_get_type): - * src/view-object.h: - * src/view-text.c: (gl_view_text_get_type): - * src/view-text.h: - * src/view.c: (gl_view_get_type): - * src/view.h: - * src/wdgt-chain-button.c: (gl_wdgt_chain_button_get_type): - * src/wdgt-image-select.c: (gl_wdgt_image_select_get_type): - * src/wdgt-image-select.h: - * src/wdgt-media-select.c: (gl_wdgt_media_select_get_type): - * src/wdgt-media-select.h: - * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_get_type): - * src/wdgt-mini-preview.h: - * src/wdgt-print-copies.c: (gl_wdgt_print_copies_get_type): - * src/wdgt-print-copies.h: - * src/wdgt-print-merge.c: (gl_wdgt_print_merge_get_type): - * src/wdgt-print-merge.h: - * src/wdgt-rotate-label.c: (gl_wdgt_rotate_label_get_type): - * src/wdgt-rotate-label.h: - - Made sure all xxx_get_type functions returned GType, not guint. This - was the case in hig.[ch], window.[ch], ui-property-bar.[ch], - ui-sidebar.[ch], view.[ch], wdgt-image-select.[ch], - wdgt-media-select.[ch], wdgt-mini-preview.[ch], wdgt-print-copies.[ch], - wdt-print-merge.[ch], and wdgt-rotate-label.[ch]. See separate - window.[ch] details above for more info. - - Reconciled various coding style differences in all xxx_get_type() - functions: - * All prototypes include G_GNUC_CONST. - * All prototypes specify the return value as GType, not GtkType - or guint. - * Info structures are all declared as "static const." - * Generalized the names of type and info variables. - * Miscelaneous formatting. - -2004-06-08 Jim Evins - - * src/label.c: - * src/label.h: - * src/xml-label.c: - * AUTHORS: - Don't touch compression of original file -- still defaults to 9 for - new files. Original patch provided by Javier Donaire Segarra - (#912252 in patch tracker). - -2004-05-05 Jim Evins - - * data/glabels-2.0.dtd: - Broke DTD previously when adding new barcode types that contain a - plus sign (+). Simply changed the BC_STYLE_TYPE entity to "CDATA" - to avoid the problem. - * data/avery-iso-templates.xml: - * data/zweckform-iso-templates.xml: - * AUTHORS: - Added templates for Avery 7165, Zweckform 3688, 4732, and 6021. Templates - provided by Frank Altpeter. - * libglabels/xml-template.c: (xml_create_label_node): - Reordered markup and layout sub-nodes so that resulting templates will - validate against DTD. - -2004-03-13 Jim Evins - - * src/object-editor-size-page.c: (gl_object_editor_prepare_size_page): - Changed spin callback signals from "value-changed" back to "changed." - This was accidentally introduced in a previous revision, and can cause - size changes just by selecting the size tab. - -2004-03-06 Jim Evins - - * src/view.c: (draw_grid_layer): - For round labels (round and cd) adjust grid so that it lines up with - center of label. Also, no longer draw box around label in the grid layer, - it is hidden by he fg layer anyway. Feature suggested by - nemolivier@free.fr. Although the grid is aligned with the center of the - label, the coordinate system is still relative to the upper left corner - of the rectangle containing the label. - -2004-02-25 Jim Evins - - * configure.in: - Changed version to 2.0pre1cvs - - * libglabels/xml-template.c: (gl_xml_template_parse_templates_doc): - Removed extra xmlFreeDoc() calls upon error. Also print the doc->URL - instead of doc->name fields when errors encountered. - -2004-02-21 Jim Evins - - * data/avery-iso-templates.xml: - Added aliases for Avery 8651. Patch provided by Wayne Schuller. - - * glabels.spec.in: - Added libglabels library and include file to installed files. - - * configure.in: - Final prep for 1.93.3. - -2004-02-20 Jim Evins - - * src/glabels-batch.c: (main): - Changed key for setting output filename to GNOME_PRINT_KEY_OUTPUT_FILENAME - as suggested by Javier Donaire Segarra. This addresses bug #901063. - -2004-02-16 Jim Evins - - * configure.in: - If gtk+ >= 2.3.2 then define HAVE_FILE_CHOOSER. - - * src/Makefile.am: - Added HAVE_FILE_CHOOSER to INCLUDES. - - * src/file.c: (gl_file_open), (open_response), (gl_file_open_real), - (gl_file_save_as), (save_as_response): - Ported to use GtkFileChooserDialog if HAVE_FILE_CHOOSER is defined. - -2004-02-16 Jim Evins - - * src/xml-label-04.c: (xml04_parse_image_props): - * src/xml-label-191.c: (xml191_parse_image_props): - * src/xml-label.c: (xml_parse_object_image): - Delay setting image size until after image has been applied to new - object. - -2004-02-15 Jim Evins - - * src/label-barcode.c: (gl_label_barcode_set_data), - (gl_label_barcode_set_props): - Don't emit "changed" signal, if no change actually made for these - methods. Reduces number of unnecessary redraws of barcodes. - - * src/label-object.h: - * src/label-object.c: (gl_label_object_set_position), - (gl_label_object_set_position_relative), (set_size), - (gl_label_object_set_size), - (gl_label_object_set_size_honor_aspect): - Don't emit "changed" signal, if no change actually made for these - methods. - -2004-02-15 Jim Evins - - * data/glabels-2.0.dtd: - Added specific subtypes for various barcode types. - - * src/bc.h: - * src/bc.c: (id_to_index), (name_to_index), (gl_barcode_new), - (gl_barcode_get_styles_list), (gl_barcode_default_digits), - (gl_barcode_can_text), (gl_barcode_text_optional), - (gl_barcode_can_csum), (gl_barcode_csum_optional), - (gl_barcode_id_to_name), (gl_barcode_name_to_id): - Changed API to use a string id, rather than a fixed enumeration. Id and - name are separate strings. Added entries to backend table for specific - subtypes for various barcode types. - - * src/bc-postnet.h: - * src/bc-postnet.c: (gl_barcode_postnet_new), (postnet_code), - (is_length_valid): - Modified to conform to above API. Now more stringent with data length - for various subtypes. - - * src/bc-gnubarcode.h: - * src/bc-gnubarcode.c: (gl_barcode_gnubarcode_new), - (is_length_valid), (is_length1_valid), (is_length2_valid): - Modified to conform to above API. Now more stringent with data length - for various subtypes. - - * src/label-barcode.h: - * src/label-barcode.c: (copy), (gl_label_barcode_set_props), - (gl_label_barcode_get_props), (get_size): - Modified to use above API for storing barcode type. - - * src/object-editor.h: - * src/object-editor-bc-page.c: (style_changed_cb), - (gl_object_editor_set_bc_style), (gl_object_editor_get_bc_style): - Modified to use above API for storing barcode type. - - * src/object-editor-size-page.c: - (gl_object_editor_prepare_size_page), (aspect_toggle_cb), - (w_spin_cb), (h_spin_cb), (size_reset_cb): - Added debug markers. - - * src/object-editor.glade: - Made barcode style combo's text entry non-editable. - - * src/print.c: (draw_barcode_object): - Modified to use above API for barcode type. - - * src/view-barcode.c: (update_object_from_editor_cb), - (update_editor_from_object_cb), - (gl_view_barcode_create_event_handler), (draw_barcode): - Modified to use above API for barcode type. - - * src/xml-label-04.c: (xml04_parse_barcode_props): - * src/xml-label-191.c: (xml191_parse_barcode_props): - * src/xml-label.c: (xml_parse_object_barcode), - (xml_create_object_barcode): - Modified to use above API for barcode type. - -2004-02-07 Jim Evins - - * src/stock-pixmaps/Makefile.am: - * src/stock-pixmaps/stock_hchain_24.png: - * src/stock-pixmaps/stock_hchain_broken_24.png: - * src/stock-pixmaps/stock_vchain_24.png: - * src/stock-pixmaps/stock_vchain_broken_24.png: - Added chain pixmaps borrowed from the gimp's default theme. - - * src/stock.h: - * src/stock.c: (gl_stock_init), (add_button_icon): - Added above pixmaps to stock icon sets. Created add_button_icon() to - add these pixmaps sized as GTK_ICON_SIZE_BUTTON. - - * src/wdgt-chain-button.h - * src/wdgt-chain-button.c - * src/Makefile.am: - * po/POTFILES.in: - Added this Modified version of gimpchainbutton widget, borrowed from - the gimp. - - * AUTHORS: - Added acknowledgements of the above borrowing from the gimp. - - * src/object-editor-size-page.c: (aspect_toggle_cb), (w_spin_cb), - (h_spin_cb): - * src/object-editor.c: (gl_object_editor_construct_chain_button): - * src/object-editor.glade: - Replaced the keep aspect ratio check box with the above chain-button - widget. - - * src/text-node.c: (gl_text_node_equal): - * src/text-node.h: - Added function gl_text_node_equal() to compare text_nodes. - - * src/label-image.c: (gl_label_image_set_filename): - Replaced incomplete text_node comparison code with invocation of - gl_text_node_equal. This fixed the problem of not being able to - resize an image using the object_editor if the aspect ratio is not - locked. - -2004-02-04 Jim Evins - - * src/object-editor-image-page.c: - (gl_object_editor_prepare_image_page): - Track "changed" signal of pixmap entry's GtkEntry rather than its - "activate" signal -- this catches all changes to the entry rather than - just changes resulting from a browse, so one can easily pull previous - entries from the history. (This change is marked below on 2004-02-03, - but somehow never got checked in.) - - * src/view-highlight.c: (sl_resize_event_handler), - (sr_resize_event_handler), (st_resize_event_handler), - (sb_resize_event_handler): - Side resize handles will now confirm the actual resize that the object - accepted before adjusting position parameters. Previously some interesting - things happened when resizing a barcode to its minimum size. - -2004-02-03 Jim Evins - - * src/object-editor-image-page.c: - (gl_object_editor_prepare_image_page): - Track "changed" signal of pixmap entry's GtkEntry rather than its - "activate" signal -- this catches all changes to the entry rather than - just changes resulting from a browse, so one can easily pull previous - entries from the history. - - * src/view-highlight.c: (tl_resize_event_handler), - (tr_resize_event_handler), (bl_resize_event_handler), - (br_resize_event_handler): - Allow control key to be dropped while dragging a corner resize handle - without losing the aspect ratio lock. - -2004-02-02 Jim Evins - - * src/label-image.c: (gl_label_image_set_filename): - When setting a new filename adjust size such that the aspect ratio of - the image is preserved using the current size as a bounding box. - - * src/view-image.c: (update_object_from_editor_cb): - When updating object from editor, feed back possible size changes to - editor as a result of a possible change in image. - - * src/object-editor-size-page.c: (size_reset_cb): - Fixed typo when blocking spin handlers. If the base size is larger than - the max size, treat max size as a bounding box while keeping aspect - ratio. - - -2004-02-02 Jim Evins - - * src/label-object.h: - * src/label-object.c: (gl_label_object_set_size), - (gl_label_object_set_size_honor_aspect): - Added gl_label_object_set_size_honor_aspect() which will maintain the - current aspect ratio by modifying the supplied w or h apropriately. - - * src/view-highlight.c: (tl_resize_event_handler), - (tr_resize_event_handler), (bl_resize_event_handler), - (br_resize_event_handler): - Corner handles will now maintain the current aspect ratio if the - control key is pressed while resizing. This addresses feature - request #816603. - - -2004-01-31 Jim Evins - - * AUTHORS: - * data/avery-us-templates.xml: - Added entries for "LSK-3," "LSK-5," and "LSK-8." Submitted by JBadger. - - * libglabels/template.c: (read_template_files_from_dir): - Corrected problem with testing for extensions. - - * src/object-editor.glade: - Corrected grouping of radio buttons in barcode data page. - - * src/print.c: (draw_barcode_object): - * src/view-barcode.c: (draw_barcode): - Corrected problem with calculation of y_offset for locating characters. - -2004-01-24 Jim Evins - - * AUTHORS: - * data/avery-us-templates.xml: - Added Avery 5824, submitted by Fred Bacon. - -2004-01-20 Jim Evins - - Catching up on a couple of backlogged user template submissions. - - * data/avery-iso-templates.xml: - Added "DECAdry OLW-4731" and "DECAdry DLW-1731" aliases for Avery 7160. - Suggested by Linas Jakucionis. - - * data/zweckform-iso-templates.xml: - Added Zweckform 4760, submitted by Thomas Vill. - - * AUTHORS: - Updated to reflect above submissions. - -2004-01-06 Jim Evins - - Split-out template.[ch], paper.[ch], xml-template.[ch], xml-paper.[ch], and - xml.[ch] into a separate library called libglabels, to facilitate third - party use of glabels template files. This was suggested by Wayne Schuller. - Once split-out, some modifications to the structures and functions to - make a cleaner more useful API, hopefully. Rather extensive changes have - propogated to other modules. - - * src/paper.h: - * src/paper.c: - * src/template.h: - * src/template.c: - * src/xml-paper.h: - * src/xml-paper.c: - * src/xml-template.h: - * src/xml-template.c: - * src/xml.h: - * src/xml.c: - These files have been moved to libglabels/. API cleanup performed. - - * libglabels/libglabels.h: - * libglabels/libglabels-private.h: - * libglabels/Makefile.am: - These files have been added to finish out libglabels. - - * Makefile.am: - * configure.in: - * glabels.spec.in: - * po/POTFILES.in: - * src/Makefile.am: - Modified to reflect new sets of files in src/ and libglabels/. - - * COPYING.LIBGLABELS: - * COPYING-DOCS: - Added copy of the LGPL for libglabels, and a copy the GFDL for - documentation. - - * src/glabels-batch.c: - * src/glabels.c: - * src/label.c: (gl_label_finalize), (gl_label_set_template), - (gl_label_get_size): - * src/label.h: - * src/prefs-model.c: (gl_prefs_model_load_settings): - * src/print-dialog.c: - * src/print.c: (gl_print_simple), (gl_print_merge_collated), - (gl_print_merge_uncollated), (gl_print_batch), (print_info_free), - (print_crop_marks), (print_label), (draw_outline), - (clip_to_outline), (clip_punchouts): - * src/template-designer.c: (construct_pg_size_page), - (pg_size_page_changed_cb), (layout_page_changed_cb), - (print_test_cb), (build_template): - * src/util.c: (gl_util_fraction): - * src/util.h: - * src/view.c: (draw_bg_fg_layers), (draw_bg_fg_rect), - (draw_bg_fg_rounded_rect), (draw_bg_fg_round), (draw_bg_fg_cd), - (draw_bg_fg_cd_bc), (draw_markup_layer), (draw_markup_margin), - (draw_markup_margin_rect), (draw_markup_margin_rounded_rect), - (draw_markup_margin_round), (draw_markup_margin_cd), - (draw_markup_margin_cd_bc), (draw_markup_line), - (draw_markup_circle), (gl_view_copy): - * src/wdgt-media-select.c: (gl_wdgt_media_select_construct), - (page_size_entry_changed_cb), (details_update), (get_layout_desc), - (get_label_size_desc): - * src/wdgt-mini-preview.c: - (gl_wdgt_mini_preview_set_label_by_name), (mini_outline_list_new), - (cdbc_item): - * src/wdgt-print-copies.c: (gl_wdgt_print_copies_construct): - * src/wdgt-print-merge.c: (gl_wdgt_print_merge_construct): - * src/wdgt-rotate-label.c: (mini_preview_canvas_update), - (gl_wdgt_rotate_label_set_template_name), (cdbc_item): - * src/wdgt-rotate-label.h: - * src/xml-label-04.c: (xml04_parse_media_description): - * src/xml-label-191.c: (gl_xml_label_191_parse), - (xml191_parse_sheet), (xml191_parse_label), (xml191_parse_layout), - (xml191_parse_markup), (xml191_parse_alias): - * src/xml-label.c: (xml_doc_to_label), (xml_parse_label), - (xml_label_to_doc): - Various changes to accomodate new libglabels API. - -2004-01-03 Jim Evins - - * configure.in: - Release 1.93.2. - -2004-01-03 Jim Evins - - * AUTHORS: - Added acknowledgement of contributions by Wayne Schuller. - - * src/commands.c: (gl_cmd_file_print): - Create extra reference to print dialog, so that it can be properly re-used. - - * src/mygal/mygal-combo-box.h: - * src/mygal/mygal-combo-box.c: - (mygal_combo_box_popup_hide_unconditional), - (mygal_combo_box_popup_display), (mygal_combo_box_set_display), - (gtk_combo_set_tearoff_state), (mygal_combo_box_construct), - (mygal_combo_box_set_arrow_relief), (mygal_combo_box_set_title), - (mygal_combo_box_set_tearable): - Changed all occurances of GTK_IS_COMBO_BOX to MYGAL_IS_COMBO_BOX, to - complete the rename of this widget to prevent namespace collisions - with Gtk+-2.3. - - * src/prefs-dialog.glade: - Fixed alignment of Fill/Color widgets. - -2004-01-03 Jim Evins - - * data/avery-iso-templates.xml: - Added user submitted templates. - Avery 8435A & 8435B, submitted by Ludger Solbach. - - * doc/C/glabels.xml: - Added minimal documentation, noting the new template designer. - -2004-01-03 Jim Evins - - * pixmaps/ex-rect-size.png: - * pixmaps/ex-round-size.png: - * pixmaps/ex-cd-size.png: - * pixmaps/Makefile.am: - Added ex-rect-size.png, ex-round-size.png, and ex-cd-size.png image - files to be used as illustrations/examples in the template-designer. - - * src/template-designer.c: (construct_rect_size_page), - (construct_round_size_page), (construct_cd_size_page), - (construct_nlayouts_page), (rect_size_page_prepare_cb), - (round_size_page_prepare_cb), (cd_size_page_prepare_cb), - (layout_page_prepare_cb), (build_template): - * src/template-designer.glade: - Added illustrations for rectangle, round, and cd label size pages. - Added margin spinboxes to these pages, and now add a margin markup - to the constructed template. Added realistic default values for - some of the size spinboxes. Cleaned up the code for setting spinbox - ranges on the layouts page. - -2004-01-02 Jim Evins - - * src/object-editor-size-page.c: (h_spin_cb): - Fixed cut-n-paste error in h_spin_cb that loaded h from - the wrong spinbutton. - - * src/object-editor.h: - * src/object-editor.c: (gl_object_editor_class_init), - (gl_object_editor_changed_cb), (gl_object_editor_size_changed_cb): - * src/object-editor-private.h: - * src/object-editor-size-page.c: (w_spin_cb), (h_spin_cb), - (size_reset_cb): - Added "size_changed" signal. - - * src/view-text.c: (construct_properties_editor), - (update_object_from_editor_cb), - (update_object_from_editor_size_cb): - Track size changes from object editor separately from other - properties. This is so the default size (0,0) of a text - object is not modified unintentionally. - -2003-12-30 Wayne Schuller - - Added feature: line spacing - allows you to comfortably space a text box to - fit a label perfectly. - - * data/glabels-2.0.dtd: - * src/label-object.c: (gl_label_object_set_text_line_spacing), - (gl_label_object_get_text_alignment), - (gl_label_object_get_text_line_spacing): - * src/label-object.h: - * src/label-text.c: (gl_label_text_class_init), - (gl_label_text_instance_init), (copy), (get_size), - (set_text_line_spacing), (get_text_alignment), - (get_text_line_spacing): - * src/object-editor-private.h: - * src/object-editor-text-page.c: - (gl_object_editor_prepare_text_page), - (gl_object_editor_set_text_line_spacing), - (gl_object_editor_get_text_line_spacing): - * src/object-editor.glade: - * src/object-editor.h: - * src/prefs-dialog.c: (construct_object_page), - (update_object_page_from_prefs), (update_prefs_from_object_page): - * src/prefs-dialog.glade: - * src/prefs-model.c: (gl_prefs_model_save_settings), - (gl_prefs_model_load_settings), (get_float): - * src/prefs-model.h: - * src/print.c: (draw_text_object): - * src/ui-sidebar.c: - * src/view-text.c: (update_object_from_editor_cb), - (update_editor_from_object_cb), - (gl_view_text_create_event_handler), (draw_hacktext): - * src/view.c: (gl_view_construct), - (gl_view_set_selection_text_line_spacing), - (gl_view_set_default_text_line_spacing), - (gl_view_get_default_text_line_spacing): - * src/view.h: - * src/xml-label.c: (xml_parse_toplevel_span), - (xml_create_toplevel_span): - -2003-12-30 Jim Evins - - * src/template-designer.c: - * src/template-designer.h: - * src/template-designer.glade: - New template designer assistant. - - * po/POTFILES.in: - * src/Makefile.am: - Added entries for src/template-designer.* files. - - * pixmaps/ex-1layout.png - * pixmaps/ex-2layouts.png - * pixmaps/Makefile.am: - Added the new image files ex-*.png used as illustrations in the - template designer assistant. - - * src/print-dialog.h: - * src/print-dialog.c: (gl_print_dialog_finalize), - (gl_print_dialog_new), (gl_print_dialog_construct), - (gl_print_dialog_force_outline_flag): - Changed first argument of gl_print_dialog_new() from glView to glLabel, - to support printing from the template designer assistant which does not - have a full-fledged view. Nothing else from the view object was being - used by the dialog anyway. - - Added the gl_print_dialog_force_outline_flag() method, for better - integration with the template designer assistant. - - - * src/commands.h: - * src/commands.c: (gl_cmd_file_template_designer), - (gl_cmd_file_print): - Modified print command to provide label instead of view to dialog. - Added the gl_cmd_file_template_designer() command to invoke the - template designer assistant. - - * src/ui.c: - * src/glabels-ui.xml: - Added support for template designer assistant. - - * src/wdgt-mini-preview.h: - * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_set_template), - (gl_wdgt_mini_preview_set_bg_color): - Preview is now centered in canvas. Added - gl_wdgt_mini_preview_set_bg_color() to allow the template designer - assistant to match the background color with its own. - - * src/print.c: (clip_to_outline): - Fixed really stupid bug when adding waste to clip region of rectangular - labels/cards. Each side of the clip region needs to be extended by - twice the waste margin, as well as negatively offset by the waste - margin. - -2003-12-28 Jim Evins - - * src/prefs-dialog.c: (update_object_page_from_prefs): - Block intermediary function align_toggle_cb() instead of - update_prefs_from_object_page() for the three alignment - widgets. - -2003-12-28 Wayne Schuller - - * src/file.c: (gl_file_new), (gl_file_properties): - Swap button order and set default for higificatory pleasure. - -2003-12-27 Jim Evins - - * barcode-0.98/Makefile.am: - One last time: removed doc/Makefile and po/Makefile.in.in from - EXTRA_DIST files. - -2003-12-27 Jim Evins - - * barcode-0.98/Makefile.am: - Removed config.stat entry from EXTRA_DIST files. - - * barcode-0.98/Makefile.in: - Removed. - -2003-12-27 Jim Evins - - * configure.in: - Updated to work with latest gnome-common package from CVS. - Removed recursive configuration of barcode-0.98. - - * acconfig.h: - * macros/*: - Removed. - - * Makefile.am: - Added barcode-0.98/ as a SUBDIR, and removed dist-hook. - - * barcode-0.98/Makefile.in: - * barcode-0.98/configure.in: - * barcode-0.98/Makefile.am: - * barcode-0.98/README.glabels: - Modified to ignore the barcode package's build system, and build - as a part of glabels. - Renamed Makefile.in to Makefile.in.dist. - Renamed configure.in to configure.in.dist. - Added barcode-0.98/Makefile.am and barcode-0.98/README.glabels. - - * src/Makefile.am: - * src/mygal/Makefile.am: - * src/recent-files/Makefile.am: - In order to build against the GNOME 2.5 platform, - all use of *_DISABLE_DEPRECATED compile-time flags has been removed. - - * src/mygal/Makefile.am: - * src/mygal/mygal-combo-box.c: - * src/mygal/mygal-combo-box.h: - * src/mygal/widget-color-combo.c: - * src/mygal/widget-color-combo.h: - * po/POTFILES.in: - In order to build against the GNOME 2.5 platform, - Renamed gtk_combo_box widget to mygal_combo_box, to prevent namespace - collisions with the real gtk_combo_box widget, now a part of gtk. - -2003-12-26 Jim Evins - - * src/paper.c: - * src/template.c: - * src/util.c: - * src/util.h: - Moved local versions of get_home_data_dir() in paper.c and - template.c to util package. Cleaned up formatting in - util.[ch]. - - * src/template.c: - In gl_template_register() save a copy of the template in - ~/.glabels if the template is not known. Still need to - handle duplicate filename case and duplicate name but - different template case. - - * src/xml-label.c: - * src/xml.h: - Moved local definition of NAME_SPACE macro from xml-label.c - to xml.h. - - * src/xml-template.c: - * src/xml-template.h: - Added function gl_xml_template_write_template_to_file(), used - in gl_template_register(). diff --git a/glabels2/INSTALL b/glabels2/INSTALL deleted file mode 100644 index 23e5f25d..00000000 --- a/glabels2/INSTALL +++ /dev/null @@ -1,236 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -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, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - 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 you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' 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. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -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 support 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' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' 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' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - 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 machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -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. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: - - /bin/bash ./configure CONFIG_SHELL=/bin/bash - -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--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. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/glabels2/MESSAGE-OF-DOOM b/glabels2/MESSAGE-OF-DOOM deleted file mode 100644 index 9ddbfaa7..00000000 --- a/glabels2/MESSAGE-OF-DOOM +++ /dev/null @@ -1,15 +0,0 @@ - *** IMPORTANT *** - -This is an unstable (development) version of glabels. -It is for testing purposes only. - -Please, DO NOT use it in a production environment. -It will probably crash and you will lose your data. - -If you are looking for a stable release of glabels, it can be downloaded from: - - http://glabels.sourceforge.net/download - - *** END OF WARNING *** - - diff --git a/glabels2/Makefile.am b/glabels2/Makefile.am deleted file mode 100644 index ade9f9c2..00000000 --- a/glabels2/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -## Process this file with automake to produce Makefile.in - -LIB_BARCODE_DIR = barcode-0.98 -LIB_IEC16022_DIR = iec16022-0.2.1 -LIB_QRENCODE_DIR = qrencode-3.1.0 - -#distuninstallcheck_listfiles = find . -type f -print | grep -v scrollkeeper - -SUBDIRS = \ - po \ - $(LIB_BARCODE_DIR) \ - $(LIB_IEC16022_DIR) \ - $(LIB_QRENCODE_DIR) \ - libglabels \ - src \ - data \ - templates \ - help \ - docs - -EXTRA_DIST = \ - README \ - COPYING \ - COPYING-DOCS \ - COPYING-LIBGLABELS \ - COPYING-TEMPLATES \ - AUTHORS \ - ChangeLog \ - INSTALL \ - NEWS \ - TODO \ - intltool-extract.in \ - intltool-merge.in \ - intltool-update.in \ - gnome-doc-utils.make \ - glabels.spec.in \ - glabels.spec \ - MESSAGE-OF-DOOM - -DISTCLEANFILES = gnome-doc-utils.make - -DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper - diff --git a/glabels2/NEWS b/glabels2/NEWS deleted file mode 100644 index 95254c58..00000000 --- a/glabels2/NEWS +++ /dev/null @@ -1,118 +0,0 @@ -* gLabels 2.2.0 (stable) release. Release date 2007-12-26 - -- Migrated from EggRecent to GtkRecentManager -- Migrated from libgnomeprint to GtkPrintOperation and Cairo. -- Migrated from libgnomeprint to Pango for text layout. -- Migrated GnomeDruid to GtkAssistant for template designer. -- Migrated from GnomeCanvas to Cairo. -- Removed all deprecated widgets as of Gnome-2.16/Gtk-2.10. -- Added categorization of templates and an updated New Label dialog. -- New label dialog now allows selection of recently used templates -- Removed splash screen. -- Added initial support for datamatrix 2D barcodes. -- Added support for Brazilian CEPNet barcodes. -- Added shadow attribute to label objects. -- New merge backend for evolution data server (Austin Henry) -- Various bug fixes. -- New templates. - - -* gLabels 2.1.5 (unstable) release. Release date 2007-12-09. - -- New label dialog now allows selection of recently used templates -- Store brand and part number as separate fields in templates -- Major cleanup of libglabels API and documentation -- Minor bug fixes (and probably some new bugs). - - -* gLabels 2.1.4 (unstable) release. Release date 2007-08-17. - -- Added categorization of templates and an updated New Label dialog. -- Added initial support for datamatrix 2D barcodes. -- Migrated from EggRecent to GtkRecentManager. -- Migrated from libgnomeprint to GtkPrintOperation and Cairo. -- Migrated from libgnomeprint to Pango for text layout. -- Migrated GnomeDruid to GtkAssistant for template designer. -- Migrated from GnomeCanvas to Cairo. -- Removed splash screen. -- Added support for Brazilian CEPNet barcodes. -- Updated French translation (Claude Paroz) -- New Esperanto translation (Antonio C. Codazzi) -- Minor bug fixes (and probably some new bugs). -- New templates. - - -* gLabels 2.1.3 (unstable) release. Release date 2006-05-27. - -- Don't print "Invalid barcode data" if data field is empty. (Bug #1479839) (Darren Warner) -- Fixed hangup when grid or markup have been toggled during a previous session. (Bug #1434324) -- Added shadow attribute to label objects. -- Fixed color groups in color combo widgets. -- Fixed several potential crashes. - - -* gLabels 2.1.2 (unstable) release. Release date 2005-12-21. - -- Updated Italian translation (Daniele Medri) -- Fixed double entry in property bar's font family combobox -- Don't allow zero width or height when drawing pixbufs -- Fixed various memory leaks -- New configure option to disable update-mime-database and update-desktop-database -- New merge backend for evolution data server (Austin Henry) -- New minimal merge backend for VCards using evolution data server API (Austin Henry) -- New templates and fixes - - -* gLabels 2.1.1 (unstable) release. Release date 2005-06-21. - -- Added document merge tutorial to help documentation -- Replaced deprecated widgets (now requires Gnome 2.10 and GTK+ 2.6) -- Replaced libbonoboui with GtkUIManager (now requires Gnome 2.10 and GTK+ 2.6) -- Updated Russian translation (Vitaly Lipatov) -- Updated Spanish translation (Sergio Rivadero) -- Updated Czech translation (David Makovský and Zbynek Mrkvick) -- Updated Italian translation (Daniele Medri) -- Added documentation for libglabels -- Minor bug fixes and cleanup -- New templates - - -* gLabels 2.1.0 (unstable) release. Release date 2005-01-22. - -- Added ability to select color from merge source (Frederic Ruaudel) -- See 2.0.2 - - -* gLabels 2.0.2 release. Release date 2005-01-22. - -- Desktop file reconciled with desktop-entry-spec -- New cleaned-up icon -- Added option to glabels-batch to allow selection of first label. -- Added options to glabels-batch to allow selection of merge source and crop marks. - (José Dapena Paz) -- Updated french translation (Florent Morel) -- Fixed translation problem with object editor labels -- Minor bug fixes and cleanup -- New templates - -* gLabels 2.0.1 release. Release date 2004-08-15. - -- Fixed crash when reading some labels created with 1.93.x. -- Updated japanese translations (Takeshi AIHANA) -- Fixed crash from improperly freeing translation strings. - - -* gLabels 2.0.0 release. Release date 2004-08-09. - -- Fixed crash when encountering old template files -- Align grid to label center for DVD/CD and round labels -- Don't touch compression of original file -- 64-bit fixes -- Added man page -- Fixed missing outline problem experienced with some printers -- Added separate horizontal and vertical waste properties for rectangular templates -- Added option to auto-shrink text during document merge -- Fixed memory leaks -- Added format attibute to barcode objects, to allow correct layout of merged labels -- Fixed mime type registration for GNOME 2.6 - diff --git a/glabels2/README b/glabels2/README deleted file mode 100644 index abbd9c92..00000000 --- a/glabels2/README +++ /dev/null @@ -1,43 +0,0 @@ -Copyright -========= - - Copyright (C) 2001-2007 Jim Evins - - gLabels contains components copyrighted by others -- see th 'AUTHORS' file in - this directory. - - For license information see the 'COPYING.README_FIRST' file in this directory. - - - -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 -=================== - -GLIB+-2.18.x -GTK+-2.14.x -LIBXML-2.7.x - -All of these libraries are available as part of Gnome 2.16 - - - -Author and Acknowledgments: -=========================== - -See the AUTHORS file. - - - -Website -======= - -http://glabels.sourceforge.net/ - diff --git a/glabels2/TODO b/glabels2/TODO deleted file mode 100644 index e5d4bfeb..00000000 --- a/glabels2/TODO +++ /dev/null @@ -1,47 +0,0 @@ - -Development plan ----------------- -This development plan sets a specific set of milestones for future versions of glabels. - - -Goals for 2.2.x: - - - Bugfixes - - - Translations - - -Possible Goals for 2.3.x (current development branch): - - - Undo, Redo capability - - - Make text items rich. I.e. allow multiple characteristics - to exist within a single object. - - - Text effects. (follow contour, non-rectangular text boxes, - ...) - - - Ability to select/unselect individual records during a merge-print. - - - Add additional "merge" backends. Candidates include: - gnome-db - internal database stored in glabels file - generic XML - freedb (CDDB) for CD labels - ADIF for generating QSL-cards - - - Printer calibration tool: a facility for tweaking output origin and - scale. This should really be part of the underlying print system but - currently is not, so I may want to add the hack. - - - Adjustable grid spacing. Spacing of visible grid should be user - adjustable. This grid spacing should be an integral multiple of - a finer invisible grid. There should be a "snap to grid" toggle, - that causes all posistioning and sizing performed on the canvas - to snap to the closest grid. The possible grid spacing should be - appropriate for the current units selected (e.g. .1 points, .01 mm, - 1/64 inch, 0.001 inch). - - - Allow for management of custom templates - (i.e. delete, rename, edit). - diff --git a/glabels2/autogen.sh b/glabels2/autogen.sh deleted file mode 100755 index 66bb0fd8..00000000 --- a/glabels2/autogen.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -REQUIRED_AUTOMAKE_VERSION=1.8 - -PKG_NAME="glabels" - -(test -f $srcdir/configure.in \ - && test -f $srcdir/README \ - && test -d $srcdir/src) || { - echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" - echo " top-level $PKG_NAME directory" - exit 1 -} - -which gnome-autogen.sh || { - echo "You need to install gnome-common from the GNOME CVS" - exit 1 -} -USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh - diff --git a/glabels2/barcode-0.98/COPYING b/glabels2/barcode-0.98/COPYING deleted file mode 100644 index a43ea212..00000000 --- a/glabels2/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. - - - Copyright (C) 19yy - - 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. - - , 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/glabels2/barcode-0.98/ChangeLog b/glabels2/barcode-0.98/ChangeLog deleted file mode 100644 index 024706de..00000000 --- a/glabels2/barcode-0.98/ChangeLog +++ /dev/null @@ -1,460 +0,0 @@ -2002-03-01 Alessandro Rubini - - * 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 - - * barcode.spec: new file - -2002-02-27 Alessandro Rubini - - * bookland/bookland.py: updated to version 0.92 by Judah Milgram - -2001-11-13 Alessandro Rubini - - * README: Added a pointer to the Windows port. - -2001-11-09 Cloyce D. Spradling - - * 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 - - * pcl.c (Barcode_pcl_print): bugfix: bars were misplaced - -2001-10-16 Nathan D. Holmes - - ====> 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * sample.c (main): added upc-e and ean-8 samples - -2001-08-11 Boszormenyi Zoltan - - * ps.c (Barcode_ps_print): don't output "showpage" in EPS mode - -2001-08-11 Alessandro Rubini - - * README: Changed host names, added barcode-commit list. - -2000-11-29 Alessandro Rubini - - * doc/doc.barcode (The Field List): 1pt == 0.352mm, not 0.0352 - (thanks to Stephen Irven for reporting) - -2000-11-09 Alessandro Rubini - - ====> 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 - - * 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 - - * 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 - - * 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 - - * contrib/barcodeps-0.1.tgz: new file, sent to Alessandro on Oct 7 - -2000-10-10 Alessandro Rubini - - * 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 - - * ps.c (Barcode_ps_print): add a backslash in front of '(' too. - Suggested by H Y . - (Barcode_ps_print): use ps arrays to get compact (and prettier) - PostScript output. Suggested by Hans Schou . - - * main.c (get_geometry): accept "+offset+offset" to keep default size. - Suggested by Godmar Back . - -2000-09-16 Alessandro Rubini - - * ps.c (Barcode_ps_print): use "half text height" instead of - "two text heights" as minimum bar height. Suggested by - Oliver Vecernik . - -2000-09-14 Alessandro Rubini - - * barcode.h: added the standard ``extern "C"'' stuff for C++ - (bug reported by Dany Pardo ) - -2000-09-08 Andrea Ferraris - - * 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 - - * i25.c (Barcode_i25_encode): fixed checksum calculation - (thanks to Hans Schou for reporting) - -2000-05-19 Alessandro Rubini - - ====> 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 - - * 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 - - * doc/Makefile: modified to build with both gmake and pmake - - * Makefile: modified to build with both gmake and pmake - -2000-04-20 Alessandro Rubini - - * 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 - - * 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 - -====> Version 0.95 released to ftp.prosa.it and ftp.gnu.org - -2000-01-26 Alessandro Rubini - - * code128.c (Barcode_128_encode): new encoding: full-featured code128 - - * README: added reference to original ftp site - -2000-01-05 Alessandro Rubini - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * main.c (main): print tables: y used xmargin (Tim Withers,Jon Bakken) - -1999-09-06 Alessandro Rubini - - * 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 - - * 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 - - * main.c (strerror): replacement strerror selected by autoconf - -1999-08-06 Alessandro Rubini - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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/glabels2/barcode-0.98/INSTALL b/glabels2/barcode-0.98/INSTALL deleted file mode 100644 index 5a6cb878..00000000 --- a/glabels2/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/glabels2/barcode-0.98/Makefile.am b/glabels2/barcode-0.98/Makefile.am deleted file mode 100644 index 84e97c92..00000000 --- a/glabels2/barcode-0.98/Makefile.am +++ /dev/null @@ -1,73 +0,0 @@ -INCLUDES = \ - $(GLABELS_CFLAGS) - - -BC_FILES = \ - library.c \ - ean.c \ - code128.c \ - code39.c \ - code93.c \ - i25.c \ - msi.c \ - plessey.c \ - codabar.c \ - ps.c \ - pcl.c \ - barcode.h - -noinst_LTLIBRARIES = libbarcode.la - -libbarcode_la_SOURCES = $(BC_FILES) - -EXTRA_DIST = \ - barcode.spec \ - ChangeLog \ - cmdline.c \ - cmdline.h \ - configure \ - configure.in.dist \ - COPYING \ - INSTALL \ - install-sh \ - main.c \ - Makefile.in.dist \ - missing \ - mkinstalldirs \ - README \ - README.glabels \ - sample.c \ - TODO \ - bookland/bookland.py \ - compat/getopt.c \ - compat/getopt.h \ - contrib/barcode-for-delphi.tar.gz \ - contrib/barcode-SVG.tar.gz.README \ - contrib/barcode-for-delphi.tar.gz.README \ - contrib/barcodeps-0.1.tgz \ - contrib/grab-0.0.4.tar.gz \ - contrib/barcodeps-0.1.tgz.README \ - contrib/grab-0.0.4.tar.gz.README \ - contrib/barcode-SVG.tar.gz \ - debian/changelog \ - debian/control \ - debian/copyright \ - debian/dirs \ - debian/info \ - debian/README.debian \ - debian/rules \ - doc/barcodedoc.txt \ - doc/barcode.ps \ - doc/infofilter \ - doc/manpager \ - doc/texi2html \ - doc/barcode.info \ - doc/mktxt \ - doc/barcode.pdf \ - doc/doc.barcode \ - doc/Makefile.in \ - doc/README - - - - diff --git a/glabels2/barcode-0.98/Makefile.in.dist b/glabels2/barcode-0.98/Makefile.in.dist deleted file mode 100644 index 848aa265..00000000 --- a/glabels2/barcode-0.98/Makefile.in.dist +++ /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/glabels2/barcode-0.98/README b/glabels2/barcode-0.98/README deleted file mode 100644 index d3ae2a7f..00000000 --- a/glabels2/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/glabels2/barcode-0.98/README.glabels b/glabels2/barcode-0.98/README.glabels deleted file mode 100644 index b0dc9592..00000000 --- a/glabels2/barcode-0.98/README.glabels +++ /dev/null @@ -1,7 +0,0 @@ -The following changes have been made to the stock barcode-0.98 distribution -to facilitate compilation with glabels: - - Makefile.in renamed to Makefile.in.dist - configure.in renamed to configure.in.dist - added Makefile.am, which is configured from ../configure.in - diff --git a/glabels2/barcode-0.98/TODO b/glabels2/barcode-0.98/TODO deleted file mode 100644 index c91c79cf..00000000 --- a/glabels2/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/glabels2/barcode-0.98/barcode.h b/glabels2/barcode-0.98/barcode.h deleted file mode 100644 index 6b9bdf4e..00000000 --- a/glabels2/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 - -#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/glabels2/barcode-0.98/barcode.spec b/glabels2/barcode-0.98/barcode.spec deleted file mode 100644 index eccb6026..00000000 --- a/glabels2/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/glabels2/barcode-0.98/bookland/bookland.py b/glabels2/barcode-0.98/bookland/bookland.py deleted file mode 100644 index 373587cb..00000000 --- a/glabels2/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=] [-s|--height=] [-r|--reduction=] [-o|outfile=] [-z|--quietzone] [| ]" - 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/glabels2/barcode-0.98/cmdline.c b/glabels2/barcode-0.98/cmdline.c deleted file mode 100644 index a69a825b..00000000 --- a/glabels2/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 -#include -#include - -#ifdef NO_GETOPT - /* use replacement */ - #include "compat/getopt.h" -#else - #include -#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 ? "" : " ", 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/glabels2/barcode-0.98/cmdline.h b/glabels2/barcode-0.98/cmdline.h deleted file mode 100644 index 69319915..00000000 --- a/glabels2/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/glabels2/barcode-0.98/codabar.c b/glabels2/barcode-0.98/codabar.c deleted file mode 100644 index 7065b9ea..00000000 --- a/glabels2/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 -#include -#include -#include -#include - -#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; ierror = 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/glabels2/barcode-0.98/code128.c b/glabels2/barcode-0.98/code128.c deleted file mode 100644 index cebba54c..00000000 --- a/glabels2/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 -#include -#include -#include -#include - -#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; ierror = 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 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 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 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/glabels2/barcode-0.98/code39.c b/glabels2/barcode-0.98/code39.c deleted file mode 100644 index 3308c950..00000000 --- a/glabels2/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 -#include -#include -#include -#include - -#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/glabels2/barcode-0.98/code93.c b/glabels2/barcode-0.98/code93.c deleted file mode 100644 index 73f8cee3..00000000 --- a/glabels2/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 -#include -#include -#include -#include - -#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; iflags & 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/glabels2/barcode-0.98/compat/getopt.c b/glabels2/barcode-0.98/compat/getopt.c deleted file mode 100644 index 91f00b55..00000000 --- a/glabels2/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 . - Ditto for AIX 3.2 and . */ -#ifndef _NO_PROTO -#define _NO_PROTO -#endif - -#ifdef HAVE_CONFIG_H -#include -#endif - -#if !defined (__STDC__) || !__STDC__ -/* This is a separate conditional since some stdc systems - reject `defined (const)'. */ -#ifndef const -#define const -#endif -#endif - -#include - -/* 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 -#if defined (_LIBC) || defined (HAVE_UNISTD_H) -#include -#endif -#endif /* GNU C library. */ - -#ifdef VMS -#include -#if HAVE_STRING_H - 0 -#include -#endif -#endif - -#ifdef WIN32 -/* It's not Unix, really. See? Capital letters. */ -#include -#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 -# 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 -#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/glabels2/barcode-0.98/compat/getopt.h b/glabels2/barcode-0.98/compat/getopt.h deleted file mode 100644 index 952f4830..00000000 --- a/glabels2/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/glabels2/barcode-0.98/configure b/glabels2/barcode-0.98/configure deleted file mode 100755 index f0e5d457..00000000 --- a/glabels2/barcode-0.98/configure +++ /dev/null @@ -1,5197 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. -# -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="barcode.h" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_STAT_H -# include -#endif -#if STDC_HEADERS -# include -# include -#else -# if HAVE_STDLIB_H -# include -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include -# endif -# include -#endif -#if HAVE_STRINGS_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#else -# if HAVE_STDINT_H -# include -# endif -#endif -#if HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP GETOPT_O NO_GETOPT NO_LIBPAPER LIBPAPER NO_STRERROR GMAKEDEPEND0 GMAKEDEPEND1 GMAKEDEPEND2 LIBOBJS LTLIBOBJS MAKEINFO REMOVEHTMLTAGS INFOTOHTML' -ac_subst_files='' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -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' - -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 - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # 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_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$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 ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) 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 | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$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 | -n) - 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_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - 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 "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -# 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_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - 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 "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # 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 <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -_ACEOF - - cat <<_ACEOF -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core core.* *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# 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 - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# 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 "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -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 "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -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 $# != 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 - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -echo "$as_me:$LINENO: checking for C compiler default output" >&5 -echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 - -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# 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 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - ''\ - '#include ' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - RANLIB=$ac_ct_RANLIB -else - RANLIB="$ac_cv_prog_RANLIB" -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 - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $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 -# AmigaOS /C/install, which installs bootblocks on floppy discs -# 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 "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /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 - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -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 "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&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}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -if test x$GCC = xyes; then - CFLAGS="$CFLAGS -Wall" -fi - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep - - -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -if test "${ac_cv_header_getopt_h+set}" = set; then - echo "$as_me:$LINENO: checking for getopt.h" >&5 -echo $ECHO_N "checking for getopt.h... $ECHO_C" >&6 -if test "${ac_cv_header_getopt_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_getopt_h" >&5 -echo "${ECHO_T}$ac_cv_header_getopt_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking getopt.h usability" >&5 -echo $ECHO_N "checking getopt.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking getopt.h presence" >&5 -echo $ECHO_N "checking getopt.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: getopt.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: getopt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: getopt.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: getopt.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: getopt.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: getopt.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: getopt.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: getopt.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: getopt.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: getopt.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for getopt.h" >&5 -echo $ECHO_N "checking for getopt.h... $ECHO_C" >&6 -if test "${ac_cv_header_getopt_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_getopt_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_getopt_h" >&5 -echo "${ECHO_T}$ac_cv_header_getopt_h" >&6 - -fi -if test $ac_cv_header_getopt_h = yes; then - : -else - NO_GETOPT=-DNO_GETOPT;GETOPT_O=compat/getopt.o -fi - - -if test "${ac_cv_header_paper_h+set}" = set; then - echo "$as_me:$LINENO: checking for paper.h" >&5 -echo $ECHO_N "checking for paper.h... $ECHO_C" >&6 -if test "${ac_cv_header_paper_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_paper_h" >&5 -echo "${ECHO_T}$ac_cv_header_paper_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking paper.h usability" >&5 -echo $ECHO_N "checking paper.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking paper.h presence" >&5 -echo $ECHO_N "checking paper.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: paper.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: paper.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: paper.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: paper.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: paper.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: paper.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: paper.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: paper.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: paper.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: paper.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for paper.h" >&5 -echo $ECHO_N "checking for paper.h... $ECHO_C" >&6 -if test "${ac_cv_header_paper_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_paper_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_paper_h" >&5 -echo "${ECHO_T}$ac_cv_header_paper_h" >&6 - -fi -if test $ac_cv_header_paper_h = yes; then - LIBPAPER=-lpaper -else - NO_LIBPAPER=-DNO_LIBPAPER -fi - - - -for ac_header in unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - no:yes ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -echo "$as_me:$LINENO: checking for strerror" >&5 -echo $ECHO_N "checking for strerror... $ECHO_C" >&6 -if test "${ac_cv_func_strerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char strerror (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strerror (); -/* 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 -char (*f) () = strerror; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != strerror; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_strerror=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_strerror=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_strerror" >&5 -echo "${ECHO_T}$ac_cv_func_strerror" >&6 -if test $ac_cv_func_strerror = yes; then - : -else - NO_STRERROR=-DNO_STRERROR -fi - - -for ac_func in strcasecmp -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* 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 (); -/* 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 -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -echo "$as_me:$LINENO: checking \"for gmake\"" >&5 -echo $ECHO_N "checking \"for gmake\"... $ECHO_C" >&6 -GMAKE=no -${MAKE=make} --version 2> /dev/null | grep GNU > /dev/null && GMAKE=yes -echo "$as_me:$LINENO: result: $GMAKE" >&5 -echo "${ECHO_T}$GMAKE" >&6 -if test "$GMAKE" = "yes"; then - GMAKEDEPEND0='ifeq (.depend,$(wildcard .depend))' - GMAKEDEPEND1='include .depend' - GMAKEDEPEND2='endif' -fi - -echo "$as_me:$LINENO: checking \"if makeinfo can output html\"" >&5 -echo $ECHO_N "checking \"if makeinfo can output html\"... $ECHO_C" >&6 -MAKEINFOHTML=no -${MAKEINFO=makeinfo} --help | grep .--html > /dev/null && MAKEINFOHTML=yes -echo "$as_me:$LINENO: result: $MAKEINFOHTML" >&5 -echo "${ECHO_T}$MAKEINFOHTML" >&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 - - - - - - - - - - - - ac_config_files="$ac_config_files Makefile" -cat >confcache <<\_ACEOF -# 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, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# 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 \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.57, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@GETOPT_O@,$GETOPT_O,;t t -s,@NO_GETOPT@,$NO_GETOPT,;t t -s,@NO_LIBPAPER@,$NO_LIBPAPER,;t t -s,@LIBPAPER@,$LIBPAPER,;t t -s,@NO_STRERROR@,$NO_STRERROR,;t t -s,@GMAKEDEPEND0@,$GMAKEDEPEND0,;t t -s,@GMAKEDEPEND1@,$GMAKEDEPEND1,;t t -s,@GMAKEDEPEND2@,$GMAKEDEPEND2,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # 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_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; - *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - - - - - - - ac_config_files="$ac_config_files doc/Makefile" -cat >confcache <<\_ACEOF -# 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, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# 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 \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.57, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@GETOPT_O@,$GETOPT_O,;t t -s,@NO_GETOPT@,$NO_GETOPT,;t t -s,@NO_LIBPAPER@,$NO_LIBPAPER,;t t -s,@LIBPAPER@,$LIBPAPER,;t t -s,@NO_STRERROR@,$NO_STRERROR,;t t -s,@GMAKEDEPEND0@,$GMAKEDEPEND0,;t t -s,@GMAKEDEPEND1@,$GMAKEDEPEND1,;t t -s,@GMAKEDEPEND2@,$GMAKEDEPEND2,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@REMOVEHTMLTAGS@,$REMOVEHTMLTAGS,;t t -s,@INFOTOHTML@,$INFOTOHTML,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # 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_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; - *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - - diff --git a/glabels2/barcode-0.98/configure.in.dist b/glabels2/barcode-0.98/configure.in.dist deleted file mode 100644 index 07120b48..00000000 --- a/glabels2/barcode-0.98/configure.in.dist +++ /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/glabels2/barcode-0.98/contrib/barcode-SVG.tar.gz b/glabels2/barcode-0.98/contrib/barcode-SVG.tar.gz deleted file mode 100644 index 69df9562..00000000 Binary files a/glabels2/barcode-0.98/contrib/barcode-SVG.tar.gz and /dev/null differ diff --git a/glabels2/barcode-0.98/contrib/barcode-SVG.tar.gz.README b/glabels2/barcode-0.98/contrib/barcode-SVG.tar.gz.README deleted file mode 100644 index 1608ebaf..00000000 --- a/glabels2/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/glabels2/barcode-0.98/contrib/barcode-for-delphi.tar.gz b/glabels2/barcode-0.98/contrib/barcode-for-delphi.tar.gz deleted file mode 100644 index cbc8e676..00000000 Binary files a/glabels2/barcode-0.98/contrib/barcode-for-delphi.tar.gz and /dev/null differ diff --git a/glabels2/barcode-0.98/contrib/barcode-for-delphi.tar.gz.README b/glabels2/barcode-0.98/contrib/barcode-for-delphi.tar.gz.README deleted file mode 100644 index 36d216d7..00000000 --- a/glabels2/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 . diff --git a/glabels2/barcode-0.98/contrib/barcodeps-0.1.tgz b/glabels2/barcode-0.98/contrib/barcodeps-0.1.tgz deleted file mode 100644 index 1dadb1c6..00000000 Binary files a/glabels2/barcode-0.98/contrib/barcodeps-0.1.tgz and /dev/null differ diff --git a/glabels2/barcode-0.98/contrib/barcodeps-0.1.tgz.README b/glabels2/barcode-0.98/contrib/barcodeps-0.1.tgz.README deleted file mode 100644 index b0364f6e..00000000 --- a/glabels2/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/glabels2/barcode-0.98/contrib/grab-0.0.4.tar.gz b/glabels2/barcode-0.98/contrib/grab-0.0.4.tar.gz deleted file mode 100644 index 91fa9e6a..00000000 Binary files a/glabels2/barcode-0.98/contrib/grab-0.0.4.tar.gz and /dev/null differ diff --git a/glabels2/barcode-0.98/contrib/grab-0.0.4.tar.gz.README b/glabels2/barcode-0.98/contrib/grab-0.0.4.tar.gz.README deleted file mode 100644 index 4a048075..00000000 --- a/glabels2/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/glabels2/barcode-0.98/debian/README.debian b/glabels2/barcode-0.98/debian/README.debian deleted file mode 100644 index 7223023a..00000000 --- a/glabels2/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/glabels2/barcode-0.98/debian/changelog b/glabels2/barcode-0.98/debian/changelog deleted file mode 100644 index b43e686f..00000000 --- a/glabels2/barcode-0.98/debian/changelog +++ /dev/null @@ -1,27 +0,0 @@ -barcode (0.98) unstable; urgency=low - - * New upstream release - - -- Alessandro Rubini Fri, 1 Mar 2002 23:04:14 +0100 - -barcode (0.96) unstable; urgency=low - - * New upstream release - - -- Alessandro Rubini Wed, 8 Nov 2000 18:29:18 +0200 - -barcode (0.95) unstable; urgency=low - - * New upstream release - - -- Alessandro Rubini Thu, 3 Feb 2000 21:16:59 +0200 - -barcode (0.94) unstable; urgency=low - - * Initial Release. - - -- Alessandro Rubini Sun, 24 Oct 1999 01:10:23 +0200 - -Local variables: -mode: debian-changelog -End: diff --git a/glabels2/barcode-0.98/debian/control b/glabels2/barcode-0.98/debian/control deleted file mode 100644 index aacbfd49..00000000 --- a/glabels2/barcode-0.98/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: barcode -Section: misc -Priority: optional -Maintainer: Alessandro Rubini -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/glabels2/barcode-0.98/debian/copyright b/glabels2/barcode-0.98/debian/copyright deleted file mode 100644 index c193af2c..00000000 --- a/glabels2/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/glabels2/barcode-0.98/debian/dirs b/glabels2/barcode-0.98/debian/dirs deleted file mode 100644 index 6822e402..00000000 --- a/glabels2/barcode-0.98/debian/dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/bin -usr/include -usr/info diff --git a/glabels2/barcode-0.98/debian/info b/glabels2/barcode-0.98/debian/info deleted file mode 100644 index 18336bfb..00000000 --- a/glabels2/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/glabels2/barcode-0.98/debian/rules b/glabels2/barcode-0.98/debian/rules deleted file mode 100755 index c48c5a1c..00000000 --- a/glabels2/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/glabels2/barcode-0.98/doc/Makefile.in b/glabels2/barcode-0.98/doc/Makefile.in deleted file mode 100644 index dae8f6b6..00000000 --- a/glabels2/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/glabels2/barcode-0.98/doc/README b/glabels2/barcode-0.98/doc/README deleted file mode 100644 index 5af5490f..00000000 --- a/glabels2/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/glabels2/barcode-0.98/doc/barcode.info b/glabels2/barcode-0.98/doc/barcode.info deleted file mode 100644 index 66b59d06..00000000 --- a/glabels2/barcode-0.98/doc/barcode.info +++ /dev/null @@ -1,747 +0,0 @@ -This is barcode.info, produced by makeinfo version 4.0b 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 "[ x ] [+ - + ]" (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 - " x [+ + [- - [- ]]]" (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 "," 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: Top154 -Node: Overview526 -Node: The Barcode Object1404 -Node: The Field List2821 -Node: The Intermediate Representation6586 -Node: Supported Flags8359 -Node: The API11343 -Node: The barcode Executable14029 -Node: The Command Line14458 -Node: Supported Encodings19557 -Node: PCL Output28997 -Node: Bugs and Pending Issues31316 - -End Tag Table diff --git a/glabels2/barcode-0.98/doc/barcode.pdf b/glabels2/barcode-0.98/doc/barcode.pdf deleted file mode 100644 index b2268f4d..00000000 Binary files a/glabels2/barcode-0.98/doc/barcode.pdf and /dev/null differ diff --git a/glabels2/barcode-0.98/doc/barcode.ps b/glabels2/barcode-0.98/doc/barcode.ps deleted file mode 100644 index cc6cc2c4..00000000 --- a/glabels2/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.08.21:2135 -%%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 D97 DI<923807FF80037F13F00203B512FC02 -0F80023F8091B500031380499038F8007F010701E0EBFFC049EB800149495A49485B495A -49485B5A485BA248491580180048496D5A486F5A93C8FC485BA35A91CAFCA3B5FC5BA45B -A65B17036C6CED0780170FEF3FC0003F167F6DEC01FF001F4B13806C6C021F13006C6DEB -7FFC6C9039F00FFFF86C90B612E06C5E013F4AC7FC010F14F0010049C8FC323773B540> -II<923807FF8092B512E0020714F8021F80027F80903A01FFFE03FF49D9F000 -13804901C0EB7FC0495B013F90C7123F495A495A5C5A485B4849147F18804816FF4A4913 -00485DEE0FFE4849EB7FFC923807FFF891B612E0485E94C7FC16F04BC8FCB5CAFC5BA45B -A7007F1603EF0780170F003FEE3FC0177F6C6CEC01FF4C13806C6C021F13006C01C0EB7F -FC6C9039F00FFFF86C90B612E06C6C5D6D4AC7FC010714F09026007FFEC8FC323773B540 ->I<923807FFC0037F13FC0203B6FC020F15C0023F8191B5000313F8499039F8007FFC01 -0701E0133F4901806D7E4990C76C7E49481680495A4948804818C0485BA2485BA248494A -13E05AA2485BA24D13C05A91C8FCA25FB517805BA25F19005B6017FF605E60495E5E6C6C -4A5B604C5B003F4B90C7FC6D4A5A001F4B5A6C6C4A5A6CD980035B6CD9F01F13C06C90B6 -5A6C4BC8FC013F14F0010F14C0010001F8C9FC3B3773B547>111 -D114 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fb cmsy10 10.95 1 -/Fb 1 16 df15 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fc cmb10 10.95 10 -/Fc 10 115 df97 D<13FFB5FCA512077EAFEC03FE91381FFF -C0027F13F091B57E9138FE0FFE9138F003FF4A7E02C014804A6C13C017E0A3EE7FF0A317 -F8AC17F0A3EEFFE0A217C05D02C014806E4813006E485A9138FC1FFC01FCB55A496C13E0 -D9F01F1380C7D807FCC7FC2D407EBE33>III<49B47E010F13F0013F7F90B512FE48EBC3FF480100 -13804848EB7FC04848133F001F15E05B003FEC1FF0A2485A150F16F8A212FFA290B6FCA4 -01F0C8FCA5127FA37F003F15F8A26C6C1301000F15F06D13036C6CEB07E06C9038800FC0 -6C9038F07F806C6CB512006D5B010F13F8010013C0252B7EA92A>I103 -D105 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 df97 -DII<963803FFC0061FB512E06060A47214C0F000 -1F61A21B80A261A21B00A296B5FCA262A260A262A260A262A260A262A260A2DCFFE05C03 -0F13FC037FEBFF1F4AB6129F020792B55A4AEBE07F023FEB000F4A487F4948486D5C4913 -F04981495B49496D91C7FC495B5B92C8FC90B55E485B5F485B4860A248495CA248605C5F -5A4A5EA2485EA24A5EA2B55DA24A5EA25FA291C85CA24DEC3F801A7F19005B94B513FFA2 -4E1400A24C5C007F614C13FC4C1403003F4B5D6D4A14076C4B5D6C6D49140F4BB55C6CD9 -C007013F495A6C9026F03FFEEBFE3FC690B5D8F81FB55A6DDAF0075C011FDAC00349C7FC -010749C75B9026007FF0EC1FF04B6571E355>II<93381FFF804BB512F8031F14 -FF037F15C04AB77E0207D9FC0313F8021FD9E0007F4A0180EB3FFEDAFFFEC76C7E494916 -8049496E13C0495B49496E13E0495B494916F05B90B5C87E1AF8485B485F5C5A5C5AA248 -5B605A5CA2485FA24A17F0A2B55EA24A17E0A2601AC091C9FC95B51280A21A005F615F49 -5F4D5B127F6D4B5B616C4C5B4D5B6C6D4A90C7FC4D5A6C6D495B6C4B5B6C6D010F13E06C -01F8013F5B6CD9FE01B5C8FC013FB612FC6D15F0010715C0010002FCC9FC020F13C04542 -71C055>111 D114 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fe cmbxti10 13.15 11 -/Fe 11 120 df97 D99 D<943801FF800403B512C05E1980A282EE000F1900A25FA260A2173FA260 -A2177FA260A217FFA260A25EEDFFC1020701F15B023F13FD91B7FC4913E00107D9003F5B -49487F49487F495A49486D5B495A485D5C4894C7FC5A4A5B5A91C75B5A163FA248485DA2 -167F127F495DA216FF12FF495DA25D181E49EDE03FA24B5C187E17C0A2007F5F5D4B1380 -003F4AEB81F85D6C6C49EB83F06C6C48B55B2707FE0FFC13CF6CB539F07FFFC06C4A6C5B -6C6CD9800F90C7FC903A0FFC0003FC3A4D75CB41>III104 D<15F8EC03FC4A7E4A7EA25CA35DA2 -5D6E5AEC03E091C8FCAEEB07F8EB1FFEEB7FFF90B57E3901FC7FC0D803F07FEA07E0D80F -C07FA2381F80FFA2485A5B007E5CA25B00FE5C485A007C5C12005B92C7FCA25B5C133F5C -A2137F5CA213FFECF00F48EC1F8014E0153F48150014C05D48147E14805D14816CEB01F8 -4A5A4A5A6CEB1FC06CEBFF806D90C7FC6D5AEB07F0214E78CC27>I108 D<913801FFC0021F13F8027F13FE91B6FC4901001380D903FC -EB3FC0D907F0130F010FEC3FE04948137F4A13FF133FA2017F4913C0A26F138017006E13 -7E02FC90C7FCECFFC015FE6F7E16E06D80826D807F6D80010180EB003F1403EC003FD803 -C0130FD80FE01303EA3FF0486C7FA200FF5DA34B5A5B49495A495C49130F6CC7485AD83F -C0EB7FC03A1FF803FF806CB548C7FC6C14F8000114E026001FFEC8FC2B3377B135>115 -DI119 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Ff cmbx12 13.14 13 -/Ff 13 117 df<923803FFE092B512FC020714FF021F81027F9038007FC0DAFFF0EB0FE0 -010301C0804990C7EA3FF84948147F4A81494814FF495AA2137F5CA2715A715A715AEF07 -8094C8FCA8EF07FCB9FCA526007FF0C7123F171FB3B3003FB5D8E00FB512F8A53D4D7ECC -44>12 D46 D85 D97 D100 DII< -EB7FC0B5FCA512037EB3A2923801FFC0030F13F8033F13FE4B7F9126C1FE077F9126C3F0 -037F9138C7C001DACF8080150002DE7F02FC81A25CA25CA35CB3A9B6D8C07FEBFFE0A53B -4C7BCB44>104 D108 -D<903A7FC001FFC0B5010F13F8033F13FE4B7F9126C1FE077F9126C3F0037F00039038C7 -C0016CD9CF8080150002DE7F02FC81A25CA25CA35CB3A9B6D8C07FEBFFE0A53B317BB044 ->110 D<913807FF80027F13F80103B6FC010F15C090261FFE017F903A7FF0003FF8D9FF -C0EB0FFC48496D7E4890C76C7E4817804980000F17C048486E13E0A2003F17F049157FA2 -007F17F8A400FF17FCAB007F17F8A36C6CEDFFF0A3001F17E06D5C000F17C06C6C4A1380 -6C17006C6D495A6C01E0EB1FFC6D6C495A903A3FFE01FFF0010FB612C0010392C7FCD900 -7F13F80207138036337DB13D>I<90390FFF8070017FEBF1F048B6FC1207380FFC01391F -E0003F4848130F491307127F90C712035A1501A27FA213E06D90C7FC13FE387FFFF0ECFF -C015F06C14FC6C14FF6C15806C15C06C15E0C615F0013F14F8010714FCEB007F14019138 -003FFE150F0078140700F81403A26C1401A37E16FC6C14036D14F87F6DEB07F001F8EB1F -E001FFEBFFC091B51280D8FC7F1400D8F81F13FCD8E00313C027337CB130>115 -D<14F8A61301A41303A21307A2130FA2131F133F137F13FF1203000F90B512F0B7FCA426 -007FF8C7FCB3A6167CAA013F14F880A290391FFE01F0010F1303903907FF87E06DEBFFC0 -6D14806D6C1300EC0FFC26467EC430>I E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fg cmti10 10.95 35 -/Fg 35 122 df<933807FF80043F13E09338FE00F8DB01F0133EDB07E0130E4B48131F4C -137F031F14FF4BC7FCA218FE157E1878180015FE5DA31401A25DA414030103B712F0A218 -E0903A0003F000070207140F4B14C0A3171F020F15805DA2173F1800141F5D5F177EA214 -3F92C712FE5FA34A1301027EECF81CA3160302FEECF03C4A1538A21878187013014A0101 -13F018E0933800F1C0EF7F804948EC1F0094C7FCA35C1307A2001E5B127F130F00FF5BA2 -49CAFC12FEEAF81EEA703CEA7878EA1FF0EA07C0385383BF33>12 -DI40 -D<14031580A2EC01C0EC00E0A21570A215781538153CA3151EA4151FA2150FA7151FA915 -3FA2153EA3157EA2157CA215FCA215F8A21401A215F0A2140315E0A2140715C0A2EC0F80 -A2141F15005C143EA25CA25CA2495A5C1303495A5C130F49C7FC131E5B137C5B5B485A48 -5A485A48C8FC121E5A12705A5A205A7FC325>I<387FFFFCA3B5FCA21605799521>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<92391FE00380ED7FFC913A01FFFE0700913907F01F8F91390FC007DF4AC6 -6CB4FC023E6D5A4A130014FC495A4948147CA2495AA2010F15785CA3011F1570A46E91C7 -FCA2808014FE90380FFFE015FC6DEBFF8016E06D806D806D6C7F141F02037FEC003FED07 -FF1501A281A282A212075A167E120EA2001E15FE5EA25E003E14015E003F14034B5A486C -5C150F6D495A6D49C8FCD8F9F0137C39F8FE01F839F03FFFF0D8E00F13C026C001FEC9FC -314279BF33>83 D<277FFFFE01B500FC90B512E0B5FCA20003902680000790C7380FFC00 -6C90C701FCEC07F049725A04035EA26350C7FCA20407150EA2040F5D1A3C041F15386216 -3B6216734F5A6D14E303014B5A6C15C303034BC8FC1683DB0703140E191E030E151C6103 -1C7F61ED380161157003F04A5A15E002014B5A15C0DA03804AC9FC60DA0700140E60140E -605C029C5D14B8D97FF85D5C715A5C4A5DA24A92CAFC5F91C7FC705A137E5F137C5F1378 -01705D53406EBD5B>87 D<147E49B47E903907C1C38090391F80EFC090383F00FF017E13 -7F4914804848133F485AA248481400120F5B001F5C157E485AA215FE007F5C90C7FCA214 -01485C5AA21403EDF0385AA21407EDE078020F1370127C021F13F0007E013F13E0003E13 -7FECF3E1261F01E313C03A0F8781E3803A03FF00FF00D800FC133E252977A72E>97 -DIIII<167C4BB4FC923807C78092380F83C0ED1F87161FED3F3FA2157EA21780EE0E004B -C7FCA414015DA414035DA30103B512F8A390260007E0C7FCA3140F5DA5141F5DA4143F92 -C8FCA45C147EA414FE5CA413015CA4495AA4495AA4495A121E127F5C12FF49C9FCA2EAFE -1EEAF83C1270EA7878EA3FE0EA0F802A5383BF1C>III<1478EB01FCA21303A314F8EB00E01400AD137C48 -B4FC38038F80EA0707000E13C0121E121CEA3C0F1238A2EA781F00701380A2EAF03F1400 -12005B137E13FE5BA212015BA212035B1438120713E0000F1378EBC070A214F0EB80E0A2 -EB81C01383148038078700EA03FEEA00F8163E79BC1C>I108 -DIII<903903E001F890390FF807FE903A1E7C1E0F80903A1C3E3C07C001 -3C137801389038E003E0EB783F017001C013F0ED80019038F07F0001E015F8147E160300 -0113FEA2C75AA20101140717F05CA20103140F17E05CA20107EC1FC0A24A1480163F010F -15005E167E5E131F4B5A6E485A4B5A90393FB80F80DA9C1FC7FCEC0FFCEC03E049C9FCA2 -137EA213FEA25BA21201A25BA21203A2387FFFE0B5FCA22D3A80A72E>I114 DII<137C48B4141C26038F80137EEA0707000E7F001E15FE -121CD83C0F5C12381501EA781F007001805BA2D8F03F1303140000005D5B017E1307A201 -FE5C5B150F1201495CA2151F0003EDC1C0491481A2153F1683EE0380A2ED7F07000102FF -13005C01F8EBDF0F00009038079F0E90397C0F0F1C90391FFC07F8903907F001F02A2979 -A731>I<017CEB01C048B4EB07F038038F80EA0707000E01C013F8121E001C1403EA3C0F -0038EC01F0A2D8781F130000705BA2EAF03F91C712E012005B017E130116C013FE5B1503 -000115805BA2ED07001203495B150EA25DA25D1578000114706D5B0000495A6D485AD97E -0FC7FCEB1FFEEB03F0252979A72A>I<017C167048B491387001FC3A038F8001F8EA0707 -000E01C015FE001E1403001CEDF000EA3C0F0038177C1507D8781F4A133C00701380A2D8 -F03F130F020049133812005B017E011F14784C137013FE5B033F14F0000192C712E05BA2 -170100034A14C049137E17031880A2EF070015FE170E00010101141E01F86D131C0000D9 -039F5BD9FC076D5A903A3E0F07C1E0903A1FFC03FFC0902703F0007FC7FC372979A73C> -I<903903F001F890390FFC07FE90393C1E0E0F9026780F1C138001F0EBB83FD801E013F8 -9039C007F07FEA0380000714E0D9000F140048151C000E4AC7FCA2001E131FA2C75BA214 -3F92C8FCA35C147EA314FE4A131CA30101143C001E1538003F491378D87F811470018314 -F000FF5D9039077801C039FE0F7C033A7C0E3C078027783C1E1EC7FC391FF80FFC3907E0 -03F029297CA72A>I<137C48B4143826038F8013FCEA0707000E7F001E1401001C15F8EA -3C0F12381503D8781F14F000701380A2D8F03F1307020013E012005B017E130F16C013FE -5B151F1201491480A2153F000315005BA25D157EA315FE5D00011301EBF8030000130790 -387C1FF8EB3FF9EB07E1EB00035DA21407000E5CEA3F80007F495AA24A5AD8FF0090C7FC -143E007C137E00705B387801F0383803E0381E0FC06CB4C8FCEA03F8263B79A72C>I -E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fh cmsl10 10.95 33 -/Fh 33 122 df<007FB5FCA2B512FEA418067C961E>45 D<157015F014011407143F9038 -03FFE0137FEBFFCFEBF80F1300141F15C0A5143F1580A5147F1500A55C5CA513015CA513 -035CA513075CA5130F5CA3131F497EB612F8A31D3D78BC2D>49 DII<01061403D90780131F90390FF801FE91B512FC16F816F016E0168049EB -FE0015F890381C7FC091C8FCA3133C1338A513781370A2EC1FE0ECFFF8903873E03E9038 -FF001F01FCEB0F804914C049EB07E04914F049130390C7FC16F8A61507A21206EA3F8048 -7EA2150F00FF15F0A24914E090C7121F00FC15C000F0143F00701580ED7F0012786C14FE -4A5A6C495A390F800FE03907E03FC06CB5C7FCC613FCEB1FE0283F7ABC2D>53 -D56 DI<17E016011603831607A2160FA2161F83163FA2167F167716F7EEE7FCED -01E316C3150316831507EE03FEED0F01150E151E151C153C03387FED7800157015F05D4A -4880177F4A5AA24AC7FCA2020E81173F5C021FB6FC5CA20270C7EA3FE0171F5CA2495AA2 -494881170F49C8FCA2130EA24982013C1507A2137CD801FE4B7E2607FF80EC3FFEB500F0 -0107B512FC19F85E3E417DC044>65 D<013FB7FC18E018FC903B007FE00007FE6E489038 -01FF809438007FC05DF03FE0F01FF0A3027F16F892C8FCA54A16F04A153F19E0187F19C0 -F0FF8001014B13004A4A5A4D5AEF1FF04D5ADC03FFC7FC49B612F8EFFF8002F8C7EA3FE0 -EF0FF0EF07FC717E010715014A81711380A319C0130F5CA5011F4B13805C19005F601707 -013F4B5A4A4A5A4D5A4D5A017F913801FF8001FF020F90C7FCB812FC17F094C8FC3D3E7D -BD40>II<013FB812F8A39026007F -F0C7127F6E48140F18034B14011800A31978147F4B1570A502FF147092C7FCA3190017F0 -495D4A1301A21607161F91B6FC495DA29138FC003F160F1607160301075D5CA219E01801 -19C0010FEC07004A90C712031980A218071900011F5E5C181EA2183E183C013F167C4A15 -FC4D5A1707017F151F01FF4AB45AB9FCA2603D3E7DBD3E>69 D<011FB512FC5BA2903900 -3FF8006E5AA25DA5143F5DA5147F5DA514FF92C7FCA55B5CA513035CA513075CA5130F5C -A5131F5CA3133F497E007FB512F0A2B6FC263E7EBD21>73 D<90263FFFF093381FFFF850 -13F0629026007FF8EFF000023F4D5AA2023B933801DFC0A2DA39FCED039FA2F1073F1479 -0271040E5BEC70FE191C19381A7F02F01670DAE07F94C7FC19E0A2F001C06201016D6C49 -5A02C05FF00700A2180E6F6C14010103161C028003385BA218706F7EF0E00313070200DA -01C05BA2923907F00380A294380700075B010E902603F80E5C5FA25F190F011E6D6C5A01 -1C605FA2EEFDC0DB00FF141F013C5D013860013C92C7FC017C5C01FE027E143F2607FF80 -017C4A7EB500FC037FB512E004785E4A1338553E7CBD53>77 D<90263FFFE0023FB5FC6F -16FEA29026003FF8020313C0021F030013004A6C157C023B163C6F153814398102381678 -02787FDA707F157082153F82031F15F002F07FDAE00F5D8215078203031401010180DAC0 -015D82811780047F1303010315C04A013F5C17E0161F17F0040F1307010715F891C70007 -91C7FC17FC160317FE04015B4915FF010E6E130E188E177F18CEEF3FDE011E16FE011C6F -5AA2170FA21707133C01386F5A133C017C150113FE2607FF801400B512FC18705C483E7D -BD44>I<013FB612FEEFFFE018F8903B007FF0000FFC6E48EB01FF7113804BEC7FC0183F -19E0F01FF0A2147F5D19F8A402FFED3FF092C8FCA219E0A2F07FC05B4AEDFF8019004D5A -4D5AEF0FF80103ED3FE04A903801FF8091B648C7FC17F002FCCAFCA213075CA5130F5CA5 -131F5CA5133F5CA3137F497EB612E0A25D3D3E7DBD3E>80 D<9238FF80070207EBE00F02 -1FEBF81E91387F00FE02FCEB1F3ED903F0EB0FFE49481307494813034AEB01FC49C7FC49 -1400133E137E177C491578A57F1770A26D1500808080EB7FFEECFFE06D13FEEDFFC06D14 -F06D14FC010380010080143F02031480DA003F13C015031500EE7FE0163F161FA2160F12 -1CA31607160F003C16C0A31780003E151F1700007E5D007F153E6D5C16FC01E0495AD87D -F0495AD8FCFCEB0FC03AF87F803F8027F01FFFFEC7FCD8E00713F839C0007FC030427BBF -33>83 D85 D97 DIIIII<1478EB01FE130314FFA25B14FE130314FCEB00F0 -1400ACEB03F8EA01FF14F0A2EA001F130FA314E0A5131F14C0A5133F1480A5137F1400A5 -5B5BA4EA03FF007F13F0A2B5FC183E7DBD1A>105 D<143FEB1FFF5BA213017FA214FEA5 -130114FCA5130314F8A5130714F0A5130F14E0A5131F14C0A5133F1480A5137F1400A55B -5BA4EA03FF007F13F8A2B5FC183F7DBE1A>108 D<903907F007F8D803FFEB1FFF9139E0 -781FC09138E1E00F3B001FE38007E090380FE70002EE14F014FC14D814F85CA24A130F13 -1F4A14E0A4161F133F4A14C0A4163F137F91C71380A4167F5B491500A300015D486C4913 -80B5D8F87F13FCA32E287DA733>110 DI<903907F01F80D803 -FFEB7FE09138E1E1F09138E387F839001FE707EB0FE614EE02FC13F002D813E09138F801 -804AC7FCA25C131FA25CA4133F5CA5137F91C8FCA55B5BA31201487EB512FEA325287EA7 -24>114 D<9138FF81C0010713E390381F807F90397C003F8049131F4848130F5B000314 -07A248481400A27FA27F6D90C7FCEBFF8014FC6C13FF6C14C015F06C6C7F011F7F130790 -38007FFE1403140100381300157EA2123C153E157E007C147CA2007E147815F8007F495A -4A5A486C485A26F9E01FC7FC38E0FFFC38C01FE0222A7DA824>II118 -DI<90B539E007 -FFF05E18E0902707FE000313006D48EB01FC705A5F01014A5A5F16036E5C0100140794C7 -FC160E805E805E1678ED8070023F13F05EED81C015C191381FC38015C793C8FC15EF15EE -EC0FFCA25DA26E5AA25DA26E5A5DA24AC9FC5C140E141E141C5C121C003F5B5A485B495A -130300FE5B4848CAFCEA701EEA783CEA3FF0EA0FC0343A80A630>121 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fi cmbx12 17.28 43 -/Fi 43 122 df46 D<16F04B7E1507151F153FEC01FF1407 -147F010FB5FCB7FCA41487EBF007C7FCB3B3B3B3007FB91280A6395E74DD51>49 -D<913801FFF8021FEBFFC091B612F8010315FF010F16C0013F8290267FFC0114F89027FF -E0003F7F4890C7000F7F48486E7FD807F86E148048486E14C048486E14E048486F13F001 -FC17F8486C816D17FC6E80B56C16FE8380A219FFA283A36C5BA26C5B6C90C8FCD807FC5D -EA01F0CA14FEA34D13FCA219F85F19F04D13E0A294B512C019804C14004C5B604C5B4C5B -604C13804C90C7FC4C5A4C5A4B13F05F4B13804B90C8FC4B5AED1FF84B5A4B5A4B48143F -4A5B4A48C8FC4A5A4A48157E4A5A4A5AEC7F8092C9FC02FE16FE495A495A4948ED01FCD9 -0FC0150749B8FC5B5B90B9FC5A4818F85A5A5A5A5ABAFCA219F0A4405E78DD51>I<92B5 -FC020F14F8023F14FF49B712C04916F0010FD9C01F13FC90271FFC00077FD93FE001017F -49486D8049C86C7F484883486C6F7F14C0486D826E806E82487FA4805CA36C5E4A5E6C5B -6C5B6C495E011FC85A90C95CA294B55A614C91C7FC604C5B4C5B4C5B4C5B047F13809226 -0FFFFEC8FC020FB512F817E094C9FC17F817FF91C7003F13E0040713F8040113FE707F71 -7F7113E085717FA2717F85A285831A80A31AC0EA03FCEA0FFF487F487F487FA2B57EA31A -80A34D14005C7E4A5E5F6C495E49C8485BD81FF85F000F5ED807FE92B55A6C6C6C491480 -6C01F0010791C7FC6C9026FF803F5B6D90B65A011F16F0010716C001014BC8FCD9001F14 -F0020149C9FC426079DD51>II<01C0EE01C0D801F8160F01FF167F02F0EC07FFDAFF8090B5FC92B712 -8019006060606060606095C7FC17FC5F17E0178004FCC8FC16E09026FC3FFCC9FC91CBFC -ADED3FFE0203B512F0020F14FE023F6E7E91B712E001FDD9E00F7F9027FFFE00037F02F8 -01007F02E06EB4FC02806E138091C8FC496F13C04917E07113F0EA00F090C914F8A219FC -83A219FEA419FFA3EA03F0EA0FFC487E487E487FA2B57EA319FEA35C4D13FC6C90C8FC5B -4917F8EA3FF001804B13F06D17E0001F5E6C6C17C06D4B1380D807FC92B512006C6C4A5B -6C6C6C01075B6C01E0011F5BD97FFE90B55A6DB712C0010F93C7FC6D15FC010115F0D900 -3F1480020301F0C8FC406078DD51>III<92383FFF800203B512FC021FECFF80027F -15E049B712F849D9F0077F010F90C76C7ED91FFCEC1FFFD93FF06E7F494802037F494882 -717F484980854890C9127FA24884183FA25A80A380806E157F6E5E14FE6E7E6F4A5A6C14 -F003FC495B03FF495B6C1580DCE0075B6CDBF80F90C7FC9338FE1FFE6C9238FF7FF84D5A -6D16C06D5E6D4BC8FC6D6F7E6D16E00101826D16FC023F814A8149B87E01078349839026 -3FFE3F8190267FFC0F819026FFF003814849C6FC48496D804849131F4890C70007801601 -48486E1580003F163F49150F007F7014C0491501717E8400FF835B8484A384A21A80A27F -007F1900607F003F606D160F001F606D4C5A6C6D153F6C6D4B5A6C01F04B5A6C01FC0203 -5B6C01FF021F5B6D9027F001FFFEC7FC6D90B65A010F16F001035E010093C8FC020F14F8 -DA007F90C9FC426079DD51>I66 D<4DB5ED03C0057F02F01407 -0407B600FE140F047FDBFFC0131F4BB800F0133F030F05FC137F033F9127F8007FFE13FF -92B6C73807FF814A02F0020113C3020702C09138007FE74A91C9001FB5FC023F01FC1607 -4A01F08291B54882490280824991CB7E49498449498449498449865D49498490B5FC484A -84A2484A84A24891CD127FA25A4A1A3F5AA348491A1FA44899C7FCA25CA3B5FCB07EA380 -A27EA2F50FC0A26C7FA37E6E1A1F6C1D80A26C801D3F6C6E1A00A26C6E616D1BFE6D7F6F -4E5A7F6D6D4E5A6D6D4E5A6D6D4E5A6D6E171F6D02E04D5A6E6DEFFF806E01FC4C90C7FC -020F01FFEE07FE6E02C0ED1FF8020102F8ED7FF06E02FF913803FFE0033F02F8013F1380 -030F91B648C8FC030117F86F6C16E004071680DC007F02F8C9FC050191CAFC626677E375 ->IIII73 D76 D<94381FFFE00407B67E043F15F04BB712FE030F -EEFFC0033FD9FC0014F092B500C0010F13FC020349C7000113FF4A01F86E6C7F021F496F -13E04A01C0030F7F4A496F7F91B5C96C7F0103497013FF494970804B834949717F498749 -49717F49874B8390B586484A717FA24891CB6C7FA2481D804A84481DC0A348497214E0A3 -481DF0A34A85481DF8A5B51CFCB06C1DF8A36E96B5FCA36C1DF0A46C6D4E14E0A36C1DC0 -6E606C1D80A26C6E4D1400A26C6E4D5BA26C6E4D5BA26D6D4D5B6D636D6D4D5B6F94B5FC -6D636D6D4C5C6D6D4C91C7FC6D6E4B5B6D02E0031F5B023F6D4B13F06E01FC92B55A6E01 -FF02035C020302C0010F91C8FC020002FC90B512FC033F90B712F0030F17C0030394C9FC -DB007F15F804071580DC001F01E0CAFC666677E379>79 DI83 D<001FBEFCA64849C79126E0000F -148002E0180091C8171F498601F81A0349864986A2491B7FA2491B3F007F1DC090C9181F -A4007E1C0FA600FE1DE0481C07A5CA95C7FCB3B3B3A3021FBAFCA663617AE070>II<913803FFFE027FEBFF -F00103B612FE010F6F7E4916E090273FFE001F7FD97FE001077FD9FFF801017F486D6D7F -717E486D6E7F85717FA2717FA36C496E7FA26C5B6D5AEB1FC090C9FCA74BB6FC157F0207 -B7FC147F49B61207010F14C0013FEBFE004913F048B512C04891C7FC485B4813F85A5C48 -5B5A5CA2B55AA45FA25F806C5E806C047D7F6EEB01F96C6DD903F1EBFF806C01FED90FE1 -14FF6C9027FFC07FC01580000191B5487E6C6C4B7E011F02FC130F010302F001011400D9 -001F90CBFC49437CC14E>97 D<903807FF80B6FCA6C6FC7F7FB3A8EFFFF8040FEBFF8004 -7F14F00381B612FC038715FF038F010014C0DBBFF0011F7FDBFFC001077F93C76C7F4B02 -007F03F8824B6F7E4B6F13804B17C0851BE0A27313F0A21BF8A37313FCA41BFEAE1BFCA4 -4F13F8A31BF0A24F13E0A24F13C06F17804F1300816F4B5A6F4A5B4AB402075B4A6C6C49 -5B9126F83FE0013F13C09127F00FFC03B55A4A6CB648C7FCDAC00115F84A6C15E091C700 -1F91C8FC90C8000313E04F657BE35A>I<92380FFFF04AB67E020F15F0023F15FC91B77E -01039039FE001FFF4901F8010113804901E0010713C04901804913E0017F90C7FC49484A -13F0A2485B485B5A5C5A7113E0485B7113C048701380943800FE0095C7FC485BA4B5FCAE -7EA280A27EA2806C18FCA26C6D150119F87E6C6D15036EED07F06C18E06C6D150F6D6DEC -1FC06D01E0EC7F806D6DECFF00010701FCEB03FE6D9039FFC03FFC010091B512F0023F5D -020F1580020102FCC7FCDA000F13C03E437BC148>II<92380FFFC04AB512FC020FECFF8002 -3F15E091B712F80103D9FE037F499039F0007FFF011F01C0011F7F49496D7F4990C76C7F -49486E7F48498048844A804884485B727E5A5C48717EA35A5C721380A2B5FCA391B9FCA4 -1A0002C0CBFCA67EA380A27EA27E6E160FF11F806C183F6C7FF17F006C7F6C6D16FE6C17 -016D6C4B5A6D6D4A5A6D01E04A5A6D6DEC3FE0010301FC49B45A6D9026FFC01F90C7FC6D -6C90B55A021F15F8020715E0020092C8FC030713F041437CC14A>III<903807FF80B6FCA6C6FC7F7FB3A8EF1FFF94B512F0040714FC041F14FF4C8193267F -E07F7F922781FE001F7FDB83F86D7FDB87F07FDB8FC0814C7F039FC78015BE03BC8003FC -825DA25DA25DA45DB3B2B7D8F007B71280A651647BE35A>II<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>I114 -D<913A3FFF8007800107B5EAF81F011FECFE7F017F91B5FC48B8FC48EBE0014890C7121F -D80FFC1407D81FF0801600485A007F167F49153FA212FF171FA27F7F7F6D92C7FC13FF14 -E014FF6C14F8EDFFC06C15FC16FF6C16C06C16F06C826C826C826C82013F1680010F16C0 -1303D9007F15E0020315F0EC001F1500041F13F81607007C150100FC81177F6C163FA217 -1F7EA26D16F0A27F173F6D16E06D157F6D16C001FEEDFF806D0203130002C0EB0FFE02FC -EB7FFC01DFB65A010F5DD8FE0315C026F8007F49C7FC48010F13E035437BC140>II<902607FFC0ED3F -FEB60207B5FCA6C6EE00076D826D82B3B3A260A360A2607F60183E6D6D147E4E7F6D6D49 -48806D6DD907F0ECFF806D01FFEB3FE06D91B55A6E1500021F5C020314F8DA003F018002 -F0C7FC51427BC05A>III<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 D37 D<141E147F14FF5BEB03FEEB07FCEB0FF0EB1FE0EB3FC0 -EB7F80EBFF00485A5B12035B485A120F5BA2485AA2123F5BA2127F90C7FCA412FEAD127F -A47F123FA27F121FA26C7EA27F12076C7E7F12017F6C7EEB7F80EB3FC0EB1FE0EB0FF0EB -07FCEB03FEEB01FF7F147F141E184771BE30>40 D<127812FE7E7F6C7E6C7EEA0FF06C7E -6C7E6C7E6C7EEB7F80133F14C0131FEB0FE014F01307A2EB03F8A214FC1301A214FE1300 -A4147FAD14FEA4130114FCA2130314F8A2EB07F0A2130F14E0EB1FC0133F1480137FEBFF -00485A485A485A485AEA3FE0485A485A90C7FC5A1278184778BE30>I<14E0497E497EA6 -0038EC0380007EEC0FC0D8FF83EB3FE001C3137F9038F3F9FF267FFBFB13C06CB6128000 -0FECFE00000314F86C5C6C6C13C0011F90C7FC017F13C048B512F04880000F14FE003FEC -FF80267FFBFB13C026FFF3F913E09038C3F87F0183133FD87E03EB0FC00038EC03800000 -91C7FCA66D5A6D5A23277AAE30>I<143EA2147FAF007FB7FCA2B81280A36C1600A2C76C -C8FCAF143EA229297DAF30>II<007FB612F0A2B712F8A36C15F0A225077B9E30>I<120FEA3FC0EA7FE0A2EAFFF0A4EA -7FE0A2EA3FC0EA0F000C0C6E8B30>I<16F01501ED03F8A21507A2ED0FF0A2ED1FE0A2ED -3FC0A2ED7F80A2EDFF00A24A5AA25D1403A24A5AA24A5AA24A5AA24A5AA24A5AA24AC7FC -A2495AA25C1303A2495AA2495AA2495AA2495AA2495AA249C8FCA2485AA25B1203A2485A -A2485AA2485AA2485AA2485AA248C9FCA25AA2127CA225477BBE30>I<14FE903807FFC0 -497F013F13F8497F90B57E48EB83FF4848C6138049137F4848EB3FC04848EB1FE049130F -001F15F0491307A24848EB03F8A290C712014815FCA400FEEC00FEAD6C14016C15FCA36D -1303003F15F8A26D1307001F15F0A26D130F6C6CEB1FE0A26C6CEB3FC06C6CEB7F806D13 -FF2601FF8313006CEBFFFE6D5B6D5B010F13E06D5BD900FEC7FC273A7CB830>IIIII<000FB612804815C05AA316800180C8FCAEEB -83FF019F13C090B512F015FC8181D9FE0313809039F0007FC049133F0180EB1FE06CC712 -0F000E15F0C81207A216F81503A31218127EA2B4FC150716F048140F6C15E06C141F6DEB -3FC06D137F3A3FE001FF80261FFC0F13006CB55A6C5C6C5C6C14E06C6C1380D90FFCC7FC -25397BB730>II<127CB712FC16FEA416FC48C7EA0FF816F0ED1FE0007CEC3FC0 -C8EA7F80EDFF00A24A5A4A5A5D14075D140F5D4A5AA24A5AA24AC7FCA25C5C13015CA213 -035CA213075CA4495AA6131F5CA96D5A6DC8FC273A7CB830>I<49B4FC011F13F0017F13 -FC90B57E0003ECFF804815C048010113E03A1FF8003FF049131FD83FC0EB07F8A24848EB -03FC90C71201A56D1303003F15F86D13076C6CEB0FF06C6CEB1FE0D807FCEB7FC03A03FF -83FF806C90B512006C6C13FC011F13F0497F90B512FE48802607FE0013C0D80FF8EB3FE0 -D81FE0EB0FF04848EB07F8491303007F15FC90C712014815FE481400A66C14016C15FC6D -1303003F15F86D1307D81FF0EB1FF06D133F3A0FFF01FFE06C90B512C06C1580C6ECFE00 -6D5B011F13F0010190C7FC273A7CB830>I<49B4FC010F13E0013F13F890B57E48804880 -48010113803A0FFC007FC0D81FF0EB3FE04848131F49EB0FF048481307A290C7EA03F85A -4815FC1501A416FEA37E7E6D1303A26C6C13076C6C130F6D133FD80FFC13FF6CB6FC7E6C -14FE6C14F9013FEBE1FC010F138190380060011400ED03F8A2150716F0150F000F15E048 -6C131F486CEB3FC0157FEDFF804A1300EC07FE391FF01FFC90B55A6C5C6C5C6C1480C649 -C7FCEB3FF0273A7CB830>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F00C7 -FCAF120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F000C276EA630>II<16F01503ED07F8151F157FEDFFF014034A13C0021F138091383F -FE00ECFFF8495B010713C0495BD93FFEC7FC495A3801FFF0485B000F13804890C8FCEA7F -FC5BEAFFE05B7FEA7FF87FEA1FFF6C7F000313E06C7F38007FFC6D7E90380FFF806D7F01 -0113F06D7FEC3FFE91381FFF80020713C06E13F01400ED7FF8151F1507ED03F01500252F -7BB230>I<1278127EB4FC13C07FEA7FF813FEEA1FFF6C13C000037F6C13F86C6C7EEB1F -FF6D7F010313E06D7F9038007FFC6E7E91380FFF806E13C0020113F080ED3FF8151F153F -EDFFF05C020713C04A138091383FFE004A5A903801FFF0495B010F13804990C7FCEB7FFC -48485A4813E0000F5B4890C8FCEA7FFE13F8EAFFE05B90C9FC127E1278252F7BB230>62 -D64 -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>I75 -D<383FFFF8487FB57EA26C5B6C5BD801FCC9FCB3B0EE0F80EE1FC0A9003FB7FC5AB8FCA2 -7E6C16802A387EB730>III<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>III<3A3FFF01FFF84801837F02C77FA202835B6C01015B3A01FC007F806D91C7FC00 -005C6D5BEB7F01EC81FCEB3F8314C3011F5B14E7010F5B14FF6D5BA26D5BA26D5BA26D90 -C8FCA4497FA2497FA2815B81EB0FE781EB1FC381EB3F8181EB7F0081497F49800001143F -49800003141F49800007140FD87FFEEB7FFFB590B5128080A25C6C486D130029387DB730 ->II<007FB612F0A2B712F8A36C15F0A225077B7D30>95 D97 DII<913801FFE04A -7F5CA28080EC0007AAEB03FE90381FFF874913E790B6FC5A5A481303380FFC00D81FF013 -3F49131F485A150F4848130790C7FCA25AA25AA87E6C140FA27F003F141F6D133F6C7E6D -137F390FF801FF2607FE07EBFFC06CB712E06C16F06C14F76D01C713E0011F010313C0D9 -07FCC8FC2C397DB730>I<49B4FC010713E0011F13F8017F7F90B57E488048018113803A -07FC007FC04848133FD81FE0EB1FE0150F484814F0491307127F90C7FCED03F85A5AB7FC -A516F048C9FC7E7EA27F003FEC01F06DEB03F86C7E6C7E6D1307D807FEEB1FF03A03FFC0 -7FE06C90B5FC6C15C0013F14806DEBFE00010713F8010013C0252A7CA830>IIII<14E0EB03F8A2497EA36D5AA2EB00E091C8FCA9381FFFF8487F5AA27E7EEA0001B3A9 -003FB612C04815E0B7FCA27E6C15C023397AB830>I107 -D<387FFFF8B57EA47EEA0001B3B3A8007FB612F0B712F8A46C15F025387BB730>I<02FC -137E3B7FC3FF01FF80D8FFEF01877F90B500CF7F15DF92B57E6C010F13872607FE07EB03 -F801FC13FE9039F803FC01A201F013F8A301E013F0B3A23C7FFE0FFF07FF80B548018F13 -C0A46C486C01071380322881A730>II<49B4FC010F -13E0013F13F8497F90B57E0003ECFF8014013A07FC007FC04848EB3FE0D81FE0EB0FF0A2 -4848EB07F8491303007F15FC90C71201A300FEEC00FEA86C14016C15FCA26D1303003F15 -F86D13076D130F6C6CEB1FF06C6CEB3FE06D137F3A07FF01FFC06C90B512806C15006C6C -13FC6D5B010F13E0010190C7FC272A7CA830>II<49B413F8010FEBC1FC013F13F14913FD48B6FC5A481381390FFC00 -7F49131F4848130F491307485A491303127F90C7FC15015A5AA77E7E15037FA26C6C1307 -150F6C6C131F6C6C133F01FC137F3907FF01FF6C90B5FC6C14FD6C14F9013F13F1010F13 -C1903803FE0190C7FCAD92B512F84A14FCA46E14F82E3C7DA730>II<9038 -1FFC1E48B5129F000714FF5A5A5A387FF007EB800100FEC7FC4880A46C143E007F91C7FC -13E06CB4FC6C13FC6CEBFF806C14E0000114F86C6C7F01037F9038000FFF02001380007C -147F00FEEC1FC0A2150F7EA27F151F6DEB3F806D137F9039FC03FF0090B6FC5D5D00FC14 -F0D8F83F13C026780FFEC7FC222A79A830>III<3B3FFFC07FFF80 -486DB512C0B515E0A26C16C06C496C13803B01F80003F000A26D130700005DA26D130F01 -7E5CA2017F131F6D5CA2EC803F011F91C7FCA26E5A010F137EA2ECE0FE01075BA214F101 -035BA3903801FBF0A314FF6D5BA36E5A6E5A2B277EA630>I<3B3FFFC01FFFE0486D4813 -F0B515F8A26C16F06C496C13E0D807E0C7EA3F00A26D5C0003157EA56D14FE00015DEC0F -80EC1FC0EC3FE0A33A00FC7FF1F8A2147DA2ECFDF9017C5C14F8A3017E13FBA290393FF0 -7FE0A3ECE03FA2011F5C90390F800F802D277FA630>I<3A3FFF81FFFC4801C37FB580A2 -6C5D6C01815BC648C66CC7FC137FEC80FE90383F81FC90381FC3F8EB0FE3ECE7F06DB45A -6D5B7F6D5B92C8FC147E147F5C497F81903803F7E0EB07E790380FE3F0ECC1F890381F81 -FC90383F80FE90387F007E017E137F01FE6D7E48486D7E267FFF80B5FCB500C1148014E3 -A214C16C0180140029277DA630>I<3B3FFFC07FFF80486DB512C0B515E0A26C16C06C49 -6C13803B01FC0003F000A2000014076D5C137E150F017F5C7F151FD91F805BA214C0010F -49C7FCA214E00107137EA2EB03F0157C15FCEB01F85DA2EB00F9ECFDF0147D147FA26E5A -A36E5AA35DA2143F92C8FCA25C147EA2000F13FE486C5AEA3FC1EBC3F81387EB8FF0EBFF -E06C5B5C6C90C9FC6C5AEA01F02B3C7EA630>I<001FB612FC4815FE5AA316FC90C7EA0F -F8ED1FF0ED3FE0ED7FC0EDFF80003E491300C7485A4A5A4A5A4A5A4A5A4A5A4A5A4990C7 -FC495A495A495A495A495A495A4948133E4890C7127F485A485A485A485A485A48B7FCB8 -FCA46C15FE28277DA630>II125 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>I46 -D<913803FFC0023F13FC91B6FC010315C0010F018113F0903A1FFC003FF849486D7E4948 -6D7E49486D7E48496D138048496D13C0A24817E04890C813F0A34817F8A24817FC49157F -A3007F17FEA600FF17FFB3A5007F17FEA6003F17FCA26D15FFA26C17F8A36C17F0A26C6D -4913E0A26C6D4913C06C17806E5B6C6D4913006D6C495AD91FFCEB3FF8903A0FFF81FFF0 -6D90B55A01011580D9003F01FCC7FC020313C0384F7BCD43>48 D<157815FC1403140714 -1F14FF130F0007B5FCB6FCA2147F13F0EAF800C7FCB3B3B3A6007FB712FEA52F4E76CD43 ->II<91380FFFC091B512FC0107ECFF80011F15E090 -263FF8077F9026FF800113FC4848C76C7ED803F86E7E491680D807FC8048B416C080486D -15E0A4805CA36C17C06C5B6C90C75AD801FC1680C9FC4C13005FA24C5A4B5B4B5B4B13C0 -4B5BDBFFFEC7FC91B512F816E016FCEEFF80DA000713E0030113F89238007FFE707E7013 -807013C018E07013F0A218F8A27013FCA218FEA2EA03E0EA0FF8487E487E487EB57EA318 -FCA25E18F891C7FC6C17F0495C6C4816E001F04A13C06C484A1380D80FF84A13006CB44A -5A6CD9F0075BC690B612F06D5D011F1580010302FCC7FCD9001F1380374F7ACD43>I<17 -7C17FEA2160116031607160FA2161F163F167FA216FF5D5DA25D5DED1FBFED3F3F153E15 -7C15FCEC01F815F0EC03E01407EC0FC01580EC1F005C147E147C5C1301495A495A5C495A -131F49C7FC133E5B13FC485A5B485A1207485A485A90C8FC123E127E5ABA12C0A5C96C48 -C7FCAF020FB712C0A53A4F7CCE43>III<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 DI<932601FFFCEC01C0047FD9FFC013030307B600F81307033F03FE131F -92B8EA803F0203DAE003EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5FC -494848C9FC4901F8824949824949824949824949824990CA7E494883A2484983485B1B7F -485B481A3FA24849181FA3485B1B0FA25AA298C7FC5CA2B5FCAE7EA280A2F307C07EA36C -7FA21B0F6C6D1980A26C1A1F6C7F1C006C6D606C6D187EA26D6C606D6D4C5A6D6D16036D -6D4C5A6D6D4C5A6D01FC4C5A6D6DEE7F806D6C6C6C4BC7FC6E01E0EC07FE020F01FEEC1F -F80203903AFFE001FFF0020091B612C0033F93C8FC030715FCDB007F14E0040101FCC9FC -525479D261>I -III73 D76 -D<93380FFFC00303B6FC031F15E092B712FC0203D9FC0013FF020F01C0010F13C0023F90 -C7000313F0DA7FFC02007F494848ED7FFE4901E0ED1FFF49496F7F49496F7F4990C96C7F -49854948707F4948707FA24849717E48864A83481B804A83481BC0A2481BE04A83A2481B -F0A348497113F8A5B51AFCAF6C1BF86E5FA46C1BF0A26E5F6C1BE0A36C6D4D13C0A26C6D -4D1380A26C1B006C6D4D5A6E5E6C626D6C4C5B6D6D4B5B6D6D4B5B6D6D4B5B6D6D4B5B6D -6D4B90C7FC6D6D4B5A6D01FF02035B023F01E0011F13F0020F01FC90B512C0020390B7C8 -FC020016FC031F15E0030392C9FCDB001F13E0565479D265>79 DI82 D<91260FFF80130791B500F85B010702FF5B011FEDC0 -3F49EDF07F9026FFFC006D5A4801E0EB0FFD4801800101B5FC4848C87E48488149150F00 -1F824981123F4981007F82A28412FF84A27FA26D82A27F7F6D93C7FC14C06C13F014FF15 -F86CECFF8016FC6CEDFFC017F06C16FC6C16FF6C17C06C836C836D826D82010F82130301 -0082021F16801400030F15C0ED007F040714E01600173F050F13F08383A200788200F882 -A3187FA27EA219E07EA26CEFFFC0A27F6D4B13806D17006D5D01FC4B5A01FF4B5A02C04A -5A02F8EC7FF0903B1FFFC003FFE0486C90B65AD8FC0393C7FC48C66C14FC48010F14F048 -D9007F90C8FC3C5479D24B>I<003FBC1280A59126C0003F9038C0007F49C71607D87FF8 -060113C001E08449197F49193F90C8171FA2007E1A0FA3007C1A07A500FC1BE0481A03A6 -C994C7FCB3B3AC91B912F0A553517BD05E>II97 DI<913801FFF8021FEB -FF8091B612F0010315FC010F9038C00FFE903A1FFE0001FFD97FFC491380D9FFF05B4817 -C048495B5C5A485BA2486F138091C7FC486F1300705A4892C8FC5BA312FFAD127F7FA27E -A2EF03E06C7F17076C6D15C07E6E140F6CEE1F806C6DEC3F006C6D147ED97FFE5C6D6CEB -03F8010F9038E01FF0010390B55A01001580023F49C7FC020113E033387CB63C>I<4DB4 -7E0407B5FCA5EE001F1707B3A4913801FFE0021F13FC91B6FC010315C7010F9038E03FE7 -4990380007F7D97FFC0101B5FC49487F4849143F484980485B83485B5A91C8FC5AA3485A -A412FFAC127FA36C7EA37EA26C7F5F6C6D5C7E6C6D5C6C6D49B5FC6D6C4914E0D93FFED9 -0FEFEBFF80903A0FFFC07FCF6D90B5128F0101ECFE0FD9003F13F8020301C049C7FC4154 -7CD24B>I<913803FFC0023F13FC49B6FC010715C04901817F903A3FFC007FF849486D7E -49486D7E4849130F48496D7E48178048497F18C0488191C7FC4817E0A248815B18F0A212 -FFA490B8FCA318E049CAFCA6127FA27F7EA218E06CEE01F06E14037E6C6DEC07E0A26C6D -EC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFEEB03FE903A0FFFC03FF8010390B55A01 -0015C0021F49C7FC020113F034387CB63D>IIII<137F497E000313E0487FA2487FA76C5BA2 -6C5BC613806DC7FC90C8FCADEB3FF0B5FCA512017EB3B3A6B612E0A51B547BD325>I108 DII<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>IIII<007FB500 -F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07F86D6D5C6D6D495A6D4B5A6F495A6D6D -91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C485A6EEB8FE06EEBCFC06EEBFF806E91C9 -FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5FCDA01FD7F03F87F4A486C7E4A486C7E -020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A6D7F495A49486D7F01076F7E49486E7E -49486E7FEBFFF0B500FE49B612C0A542357EB447>II -E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fl cmr10 10.95 83 -/Fl 83 124 df<4AB4EB0FE0021F9038E03FFC913A7F00F8FC1ED901FC90383FF03FD907 -F090397FE07F80494801FF13FF4948485BD93F805C137F0200ED7F00EF003E01FE6D91C7 -FC82ADB97EA3C648C76CC8FCB3AE486C4A7E007FD9FC3FEBFF80A339407FBF35>11 -DII<001E130F397F803FC000FF137F01C013E0A201E013F0A3007F13 -3F391E600F3000001300A401E01370491360A3000114E04913C000031301010013804813 -03000EEB070048130E0018130C0038131C003013181C1C7DBE2D>34 -D<14E0A4EB07FC90383FFF8090B512E03901F8E3F03903E0E0FCD807C0133CD80F807FD8 -1F007F003E80003C1580007C140316C00078141F00F8143F157FA47EED3F806CEC0E0092 -C7FC127F138013C0EA3FF013FEEA1FFF6C13FC6C13FF6C14C06C806C6C13F8011F7F1303 -01007FECE7FF14E102E01380157F153FED1FC0A2003E140F127FD8FF801307A5130000FC -158000F0140F1270007815005D6C141E153E6C5C6C5C3907C0E1F03903F8EFE0C6B51280 -D93FFEC7FCEB0FF8EB00E0A422497BC32D>36 D<013F1603D9FFC04B7E2601E0E0150F26 -07C070151F48486C4BC7FC023E157E48486C15FE48D90FC0EB03FC003ED90EF0EB0FF8DA -0F3F13FD007E903A070FFFF1F0007C0200EB03E0160000FC6D6C495A170F604DC8FC5F17 -3E5F17FC5F4C5A1603007CD907005B4C5A007E150F003E495C020E49C9FC003F5D6C4913 -3E260F803C5B023813FC6C6C485B3A01E0E001F03800FFC090273F0003E0133F90C70007 -ECFFC09339C001E0E0923A0F8007C070031F49487E0400143C033E90381F001C037E497F -037C133E4B150F0201027E7F4B137C4A5A020702FCEB03805D4A5A141F92C7FC143E147E -147C5CA2495A0103037CEB07005C4948147E010F033E5B4A160E49C8123F496F5B013E92 -380F803C49173801FC6F6C5A49923801E0E0496FB45A0160043FC7FC41497BC34C>II<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A3 -12011380120313005A120E5A1218123812300B1C79BE19>I<1430147014E0EB01C0EB03 -801307EB0F00131E133E133C5B13F85B12015B1203A2485AA2120F5BA2121F90C7FCA25A -A3123E127EA6127C12FCB2127C127EA6123E123FA37EA27F120FA27F1207A26C7EA21201 -7F12007F13787F133E131E7FEB07801303EB01C0EB00E014701430145A77C323>I<12C0 -7E12707E7E121E7E6C7E7F12036C7E7F12007F1378137CA27FA2133F7FA21480130FA214 -C0A3130714E0A6130314F0B214E01307A614C0130FA31480A2131F1400A25B133EA25BA2 -137813F85B12015B485A12075B48C7FC121E121C5A5A5A5A145A7BC323>II<121EEA7F80 -12FF13C0A213E0A3127FEA1E601200A413E013C0A312011380120313005A120E5A121812 -3812300B1C798919>44 DI<121EEA7F80A2EAFFC0A4EA7F80A2 -EA1E000A0A798919>IIIIII<150E151E153EA2157EA215FE -1401A21403EC077E1406140E141CA214381470A214E0EB01C0A2EB0380EB0700A2130E5B -A25B5BA25B5B1201485A90C7FC5A120E120C121C5AA25A5AB8FCA3C8EAFE00AC4A7E49B6 -FCA3283E7EBD2D>I<00061403D80780131F01F813FE90B5FC5D5D5D15C092C7FC14FCEB -3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49137E497F90C71380 -0006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7121F12FC007015C0 -12780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F80FE0C6B55A013F90 -C7FCEB07F8243F7CBC2D>II<1238 -123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED078016005D48141E15 -1C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C147814F8A213015C13 -03A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D>III<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3121EEA7F80A2EAFFC0A4EA -7F80A2EA1E000A2779A619>I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3121E12 -7FEAFF80A213C0A4127F121E1200A412011380A3120313005A1206120E120C121C5A1230 -A20A3979A619>I63 D<15074B7EA34B7EA34B7EA34B7EA34B7E15E7A2913801C7FC -15C3A291380381FEA34AC67EA3020E6D7EA34A6D7EA34A6D7EA34A6D7EA34A6D7EA34948 -6D7E91B6FCA249819138800001A249C87EA24982010E157FA2011E82011C153FA2013C82 -0138151FA2017882170F13FC00034C7ED80FFF4B7EB500F0010FB512F8A33D417DC044> -65 DIIIII -III<011FB512FCA3D9000713006E5A1401B3B3A6123F -EA7F80EAFFC0A44A5A1380D87F005B007C130700385C003C495A6C495A6C495A2603E07E -C7FC3800FFF8EB3FC026407CBD2F>IIIIIII82 DI<003FB91280A3903AF0007FE001018090393FC0003F48C7ED1FC0007E17 -07127C00781703A300701701A548EF00E0A5C81600B3B14B7E4B7E0107B612FEA33B3D7D -BC42>IIII89 -D<003FB712F8A391C7EA1FF013F801E0EC3FE00180EC7FC090C8FC003EEDFF80A2003C4A -1300007C4A5A12784B5A4B5AA200704A5AA24B5A4B5AA2C8485A4A90C7FCA24A5A4A5AA2 -4A5AA24A5A4A5AA24A5A4A5AA24990C8FCA2495A4948141CA2495A495AA2495A495A173C -495AA24890C8FC485A1778485A484815F8A24848140116034848140F4848143FED01FFB8 -FCA32E3E7BBD38>II<486C13C000 -03130101001380481303000EEB070048130E0018130C0038131C00301318007013380060 -1330A300E01370481360A400CFEB678039FFC07FE001E013F0A3007F133FA2003F131F01 -C013E0390F0007801C1C73BE2D>I -I96 D -II<49B4FC010F13E090383F00F8017C131E4848131F -4848137F0007ECFF80485A5B121FA24848EB7F00151C007F91C7FCA290C9FC5AAB6C7EA3 -003FEC01C07F001F140316806C6C13076C6C14000003140E6C6C131E6C6C137890383F01 -F090380FFFC0D901FEC7FC222A7DA828>II -II<167C903903F801 -FF903A1FFF078F8090397E0FDE1F9038F803F83803F001A23B07E000FC0600000F6EC7FC -49137E001F147FA8000F147E6D13FE00075C6C6C485AA23901F803E03903FE0FC026071F -FFC8FCEB03F80006CAFC120EA3120FA27F7F6CB512E015FE6C6E7E6C15E06C810003813A -0FC0001FFC48C7EA01FE003E140048157E825A82A46C5D007C153E007E157E6C5D6C6C49 -5A6C6C495AD803F0EB0FC0D800FE017FC7FC90383FFFFC010313C0293D7EA82D>III<1478EB01FEA2EB03FFA4EB01FEA2EB00781400AC147FEB7FFFA313 -017F147FB3B3A5123E127F38FF807E14FEA214FCEB81F8EA7F01387C03F0381E07C0380F -FF803801FC00185185BD1C>II -I<2701F801FE14FF00FF902707FFC00313E0913B1E07E00F03F0913B7803F03C01F80007 -903BE001F87000FC2603F9C06D487F000101805C01FBD900FF147F91C75B13FF4992C7FC -A2495CB3A6486C496CECFF80B5D8F87FD9FC3F13FEA347287DA74C>I<3901F801FE00FF -903807FFC091381E07E091387803F000079038E001F82603F9C07F0001138001FB6D7E91 -C7FC13FF5BA25BB3A6486C497EB5D8F87F13FCA32E287DA733>I<14FF010713E090381F -81F890387E007E01F8131F4848EB0F804848EB07C04848EB03E0000F15F04848EB01F8A2 -003F15FCA248C812FEA44815FFA96C15FEA36C6CEB01FCA3001F15F86C6CEB03F0A26C6C -EB07E06C6CEB0FC06C6CEB1F80D8007EEB7E0090383F81FC90380FFFF0010090C7FC282A -7EA82D>I<3901FC03FC00FF90381FFF8091387C0FE09039FDE003F03A07FFC001FC6C49 -6C7E6C90C7127F49EC3F805BEE1FC017E0A2EE0FF0A3EE07F8AAEE0FF0A4EE1FE0A2EE3F -C06D1580EE7F007F6E13FE9138C001F89039FDE007F09039FC780FC0DA3FFFC7FCEC07F8 -91C9FCAD487EB512F8A32D3A7EA733>I<02FF131C0107EBC03C90381F80F090397F0038 -7C01FC131CD803F8130E4848EB0FFC150748481303121F485A1501485AA448C7FCAA6C7E -A36C7EA2001F14036C7E15076C6C130F6C7E6C6C133DD8007E137990383F81F190380FFF -C1903801FE0190C7FCAD4B7E92B512F8A32D3A7DA730>I<3901F807E000FFEB1FF8EC78 -7CECE1FE3807F9C100031381EA01FB1401EC00FC01FF1330491300A35BB3A5487EB512FE -A31F287EA724>I<90383FC0603901FFF8E03807C03F381F000F003E1307003C1303127C -0078130112F81400A27E7E7E6D1300EA7FF8EBFFC06C13F86C13FE6C7F6C1480000114C0 -D8003F13E0010313F0EB001FEC0FF800E01303A214017E1400A27E15F07E14016C14E06C -EB03C0903880078039F3E01F0038E0FFFC38C01FE01D2A7DA824>I<131CA6133CA4137C -A213FCA2120112031207001FB512C0B6FCA2D801FCC7FCB3A215E0A912009038FE01C0A2 -EB7F03013F138090381F8700EB07FEEB01F81B397EB723>IIIIII<001FB61280A2EBE0000180140049485A001E495A121C4A5A003C -495A141F00385C4A5A147F5D4AC7FCC6485AA2495A495A130F5C495A90393FC00380A2EB -7F80EBFF005A5B484813071207491400485A48485BA248485B4848137F00FF495A90B6FC -A221277EA628>II E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fm cmbx12 20.736 11 -/Fm 11 115 df<137F3801FFC0000713F0487F487F487F487FA2B61280A96C1400A26C5B -6C5B6C5B6C5B000113C06C6CC7FC1919729836>46 D48 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/glabels2/barcode-0.98/doc/barcodedoc.txt b/glabels2/barcode-0.98/doc/barcodedoc.txt deleted file mode 100644 index 2d242f99..00000000 --- a/glabels2/barcode-0.98/doc/barcodedoc.txt +++ /dev/null @@ -1,734 +0,0 @@ - - -This is barcode.info, produced by makeinfo version 4.0b 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 "[ x ] [+ - + ]" (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 - " x [+ + [- - [- ]]]" (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 "," 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: Top154 - Node: Overview526 - Node: The Barcode Object1404 -Node: The Field List2821 -Node: The Intermediate Representation6586 -Node: Supported Flags8359 -Node: The API11343 -Node: The barcode Executable14029 -Node: The Command Line14458 -Node: Supported Encodings19557 -Node: PCL Output28997 -Node: Bugs and Pending Issues31316 - - - -End Tag Table \ No newline at end of file diff --git a/glabels2/barcode-0.98/doc/doc.barcode b/glabels2/barcode-0.98/doc/doc.barcode deleted file mode 100644 index 7b460558..00000000 --- a/glabels2/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 -%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{} @t{x} - @i{}] [@t{+} @i{} @t{+} @i{}]'' (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{} @t{x} @i{} [@t{+} @i{} - @t{+} @i{} [@t{-} @i{} [@t{-} - @i{}]]]'' (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{}@t{,}@i{}'' 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 (maintainer) -%M .PP -%M Leonid A. Broukhis (several encodings) -%M .PP -%M Andrea Scopece (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/glabels2/barcode-0.98/doc/infofilter b/glabels2/barcode-0.98/doc/infofilter deleted file mode 100755 index 92bc8b7d..00000000 --- a/glabels2/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/glabels2/barcode-0.98/doc/manpager b/glabels2/barcode-0.98/doc/manpager deleted file mode 100755 index 46de5be2..00000000 --- a/glabels2/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/glabels2/barcode-0.98/doc/mktxt b/glabels2/barcode-0.98/doc/mktxt deleted file mode 100755 index bd3f88ba..00000000 --- a/glabels2/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/glabels2/barcode-0.98/doc/texi2html b/glabels2/barcode-0.98/doc/texi2html deleted file mode 100755 index 2c61aa93..00000000 --- a/glabels2/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 = "\n"; # tag to know where to split -$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections -$html2_doctype = ''; - -# -# 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 - "*", "
    ", # HTML+ - " ", " ", - "\n", "\n", - "|", "", - # spacing commands - ":", "", - "!", "!", - "?", "?", - ".", ".", - ); - -# -# texinfo "things" (@foo{}) to HTML ones -# -%things_map = ( - 'TeX', 'TeX', - 'br', '

    ', # 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 = <= 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 = '' 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("

    \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("

    \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("

    ", __LINE__); - } else { - $_ = &debug("
    \n
    ", __LINE__); - } - if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') { - $_ .= "$type $name"; - $_ .= " @args" if @args; - } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr' - || $tag eq 'defcv' || $tag eq 'defop') { - $ftype = $name; - $name = shift(@args); - $name =~ s/^\{(.*)\}$/$1/; - $_ .= "$type $ftype $name"; - $_ .= " @args" if @args; - } else { - warn "$ERROR Unknown definition type: $tag\n"; - $_ .= "$type $name"; - $_ .= " @args" if @args; - } - $_ .= &debug("\n
    ", __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("\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, "
    \n"); - &html_pop_if('DD'); - &html_pop_if(); - } elsif (defined($def_map{$end_tag})) { - push(@lines, &debug("
    \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

    $name

    \n\n", __LINE__); - } else { - $_ = &debug("$name\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, "
      \n"); - } - while ($level < $curlevel) { - $curlevel--; - push(@toc_lines, "
    \n"); - } - $_ = "
  • " . &anchor($tocid, "$docu_doc#$docid", $name, 1); - push(@toc_lines, &substitute_style($_)); - # update DOC - push(@lines, &html_debug("\n", __LINE__)); - &html_reset; - $_ = "".&anchor($docid, "$docu_toc#$tocid", $name)."\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(<\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("
    $things_map{$in_table}\n", __LINE__)); - } else { - push(@lines, &debug("
    \@$in_table\{$what\}\n", __LINE__)); - } - push(@lines, "
    "); - &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("
  • $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("

    \n", __LINE__); - &html_pop; - } - } elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE') { - push(@lines, "

    \n"); - &html_push('P'); - $_ = &debug($_, __LINE__); - } - # otherwise - push(@lines, $_); -} - -# finish TOC -$level = 0; -while ($level < $curlevel) { - $curlevel--; - push(@toc_lines, "\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("

      \n", __LINE__)), next if /^\@menu\b/; - $in_menu = 0, push(@lines2, &debug("
    \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, "\n") if defined($last_letter); - push(@lines2, "

    " . &protect_html($letter) . "

    \n"); - push(@lines2, "\n"); - $last_letter = $letter; - } - @refs = (); - foreach (split(/$;/, $ary{$key})) { - push(@refs, &anchor('', $_, $key, 0)); - } - push(@lines2, "
  • " . join(", ", @refs) . "\n"); - } - push(@lines2, "
  • \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 (/^/) { - $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

    - -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, "

    " . &anchor($footid, "$d#$docid", $foot) . "

    \n"); - $text = "

    $text" unless $text =~ /^\s*

    /; - push(@foot_lines, "$text\n"); - $_ = $before . &anchor($docid, "$docu_foot#$footid", $foot) . $after; - } - } - # - # remove unnecessary

    - # - if (/^\s*

    \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 - -$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 = "

    " . join("

    \n

    ", split(/\n/, $_)) . "

    \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 "

    Table of Contents

    \n"; - &print(*toc_lines, FILE); - } - &print_ruler; - &print(*doc_lines, FILE); - if ($monolithic && @foot_lines) { - &print_ruler; - print FILE "

    Footnotes

    \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("$what") - if $debug & $DEBUG_HTML; - return($what); -} - -# to debug the output... -sub debug { - local($what, $line) = @_; - return("$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, "
  • " . &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"; - } 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 = "

    \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 < - -$header -$_ - - -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 "

    $_

    \n"; - } - } - if ($value{'_author'}) { - $value{'_author'} =~ s/\n+$//; - foreach (split(/\n/, $value{'_author'})) { - $_ = &substitute_style($_); - &unprotect_texi; - s/[\w.-]+\@[\w.-]+/
    $&<\/A>/g; - print FILE "
    $_
    \n"; - } - } - print FILE "

    \n"; -} - -sub print_footer { - print FILE < - -EOT -} - -sub print_toplevel_footer { - &print_ruler; - print FILE <texi2html -translator version 1.51.

    -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/\/\&\#62;/g; - # but recognize some HTML things - $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # - $what =~ s/\&\#60;A ([^\&]+)\&\#62;//g; # - $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;//g; # - 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; - 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/glabels2/barcode-0.98/ean.c b/glabels2/barcode-0.98/ean.c deleted file mode 100644 index 0801a0ef..00000000 --- a/glabels2/barcode-0.98/ean.c +++ /dev/null @@ -1,774 +0,0 @@ -/* - * ean.c -- encoding for ean, upc and isbn - * - * Copyright (c) 1999 Alessandro Rubini - * Copyright (c) 1999 Prosa Srl. - * Copyright (c) 2001 Boszormenyi Zoltan - * - * 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 -#include -#include -#include -#include - -#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= '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; iascii) { - 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; ipartial = 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/glabels2/barcode-0.98/i25.c b/glabels2/barcode-0.98/i25.c deleted file mode 100644 index 72bd0358..00000000 --- a/glabels2/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 -#include -#include -#include -#include - -#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; ierror = 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/glabels2/barcode-0.98/install-sh b/glabels2/barcode-0.98/install-sh deleted file mode 100644 index ab74c882..00000000 --- a/glabels2/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/glabels2/barcode-0.98/library.c b/glabels2/barcode-0.98/library.c deleted file mode 100644 index a8787020..00000000 --- a/glabels2/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 -#include -#include -#include -#ifdef HAVE_UNISTD_H /* sometimes (windows, for instance) it's missing */ -# include -#endif -#include - -#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/glabels2/barcode-0.98/main.c b/glabels2/barcode-0.98/main.c deleted file mode 100644 index e07e4d3c..00000000 --- a/glabels2/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 -#include -#include -#include - -#include "cmdline.h" -#include "barcode.h" - -#ifndef NO_LIBPAPER -#include -#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: [x][++]"}, - {'t', CMDLINE_S, NULL, get_table, "BARCODE_TABLE", NULL, - "table geometry: x[++]"}, - {'m', CMDLINE_S, NULL, get_margin, "BARCODE_MARGIN", "10", - "internal margin for each item in a table: [,]"}, - {'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 ) - */ -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/glabels2/barcode-0.98/missing b/glabels2/barcode-0.98/missing deleted file mode 100755 index d46f79f6..00000000 --- a/glabels2/barcode-0.98/missing +++ /dev/null @@ -1,198 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. -# Franc,ois Pinard , 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 - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.in; then - configure_ac=configure.ac -else - configure_ac=configure.in -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_ac'. 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_ac'. 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_ac'. 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_ac` - 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_ac'. - 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/glabels2/barcode-0.98/mkinstalldirs b/glabels2/barcode-0.98/mkinstalldirs deleted file mode 100755 index 6b3b5fc5..00000000 --- a/glabels2/barcode-0.98/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# 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/glabels2/barcode-0.98/msi.c b/glabels2/barcode-0.98/msi.c deleted file mode 100644 index 77a373b2..00000000 --- a/glabels2/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 -#include -#include -#include -#include - -#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; ipartial = partial; - bc->textinfo = textinfo; - - return 0; -} diff --git a/glabels2/barcode-0.98/pcl.c b/glabels2/barcode-0.98/pcl.c deleted file mode 100644 index d5ec097a..00000000 --- a/glabels2/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 -#include -#include -#include -#include - -#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/glabels2/barcode-0.98/plessey.c b/glabels2/barcode-0.98/plessey.c deleted file mode 100644 index ec471005..00000000 --- a/glabels2/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 -#include -#include -#include -#include - -#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; ierror = 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/glabels2/barcode-0.98/ps.c b/glabels2/barcode-0.98/ps.c deleted file mode 100644 index 35917517..00000000 --- a/glabels2/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 -#include -#include -#include -#include - -#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 : "", 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; ipartial); 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 : ""); - - 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/glabels2/barcode-0.98/sample.c b/glabels2/barcode-0.98/sample.c deleted file mode 100644 index 46e62058..00000000 --- a/glabels2/barcode-0.98/sample.c +++ /dev/null @@ -1,98 +0,0 @@ -#include -#include - -#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/glabels2/configure.in b/glabels2/configure.in deleted file mode 100644 index f6a13409..00000000 --- a/glabels2/configure.in +++ /dev/null @@ -1,216 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.52) - -AC_INIT(glabels, 2.3.pre0svn, http://sourceforge.net/tracker/?func=add&group_id=46122&atid=445116) -AC_CONFIG_SRCDIR(src/glabels.c) - -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) - -AM_MAINTAINER_MODE -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - -AC_CONFIG_HEADERS(config.h) - -IT_PROG_INTLTOOL([0.21]) - -PKG_PROG_PKG_CONFIG - -AC_PROG_LIBTOOL - -GNOME_DOC_INIT -GTK_DOC_CHECK(1.0) - -AC_ISC_POSIX -AC_PROG_CC -AC_PROG_INSTALL - -GNOME_COMPILE_WARNINGS - -AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) -AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource) - - -dnl --------------------------------------------------------------------------- -dnl - LIBGLABELS API versioning -dnl --------------------------------------------------------------------------- -dnl From the libtool manual: -dnl 1. Start with version information of `0:0:0' for each libtool library. -dnl 2. Update the version information only immediately before a public release. -dnl More frequent updates are unnecessary, and only guarantee that the current -dnl interface number gets larger faster. -dnl 3. If the library source code has changed at all since the last update, then increment -dnl revision (`c:r:a' becomes `c:r+1:a'). -dnl 4. If any interfaces have been added, removed, or changed since the last update, -dnl increment current, and set revision to 0. -dnl 5. If any interfaces have been added since the last public release, then increment age. -dnl 6. If any interfaces have been removed since the last public release, then set age -dnl to 0. -LIBGLABELS_C=5 -LIBGLABELS_R=1 -LIBGLABELS_A=0 - -LIBGLABELS_VERSION_INFO=${LIBGLABELS_C}:${LIBGLABELS_R}:${LIBGLABELS_A} -AC_SUBST(LIBGLABELS_VERSION_INFO) - - -dnl --------------------------------------------------------------------------- -dnl - Library dependencies -dnl --------------------------------------------------------------------------- -GLIB_REQUIRED=2.20.0 -GTK_REQUIRED=2.16.0 -LIBXML_REQUIRED=2.7.0 -LIBEBOOK_REQUIRED=2.26.0 - -dnl Make above strings available for packaging files (e.g. rpm spec files) -AC_SUBST(GLIB_REQUIRED) -AC_SUBST(GTK_REQUIRED) -AC_SUBST(LIBXML_REQUIRED) -AC_SUBST(LIBEBOOK_REQUIRED) - - -dnl --------------------------------------------------------------------------- -dnl - Check for evolution data server -dnl --------------------------------------------------------------------------- -AC_ARG_WITH(libebook, - [AC_HELP_STRING([--without-libebook], - [build without Evolution Data Server support])]) -have_libebook=no -if test "x$with_libebook" != xno; then - PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2 >= $LIBEBOOK_REQUIRED, - [have_libebook=yes], [have_libebook=no]) -fi - -if test "x$have_libebook" = "xyes"; then - AC_DEFINE(HAVE_LIBEBOOK,1,[Define to 1 for EDS support]) - OPTIONAL_MODULES="$OPTIONAL_MODULES libebook-1.2 >= $LIBEBOOK_REQUIRED" -fi - - -dnl --------------------------------------------------------------------------- -dnl - GLABELS prerequisites -dnl --------------------------------------------------------------------------- -PKG_CHECK_MODULES(GLABELS, \ -glib-2.0 >= $GLIB_REQUIRED \ -gtk+-2.0 >= $GTK_REQUIRED \ -libxml-2.0 >= $LIBXML_REQUIRED \ -$OPTIONAL_MODULES \ -) - -AC_SUBST(GLABELS_CFLAGS) -AC_SUBST(GLABELS_LIBS) - - -dnl --------------------------------------------------------------------------- -dnl - LIBGLABELS more modest prerequisites -dnl --------------------------------------------------------------------------- -PKG_CHECK_MODULES(LIBGLABELS, \ -glib-2.0 >= $GLIB_REQUIRED \ -libxml-2.0 >= $LIBXML_REQUIRED \ -) - -AC_SUBST(LIBGLABELS_CFLAGS) -AC_SUBST(LIBGLABELS_LIBS) - - -dnl --------------------------------------------------------------------------- -dnl - Enable deprecation testing -dnl --------------------------------------------------------------------------- -AC_ARG_ENABLE(deprecations, - [AC_HELP_STRING([--enable-deprecations], - [warn about deprecated usages [default=no]])],, - [enable_deprecations=no]) - -if test "x$enable_deprecations" = "xyes"; then - DISABLE_DEPRECATED_CFLAGS="\ --DG_DISABLE_DEPRECATED \ --DGDK_DISABLE_DEPRECATED \ --DGTK_DISABLE_DEPRECATED \ --DGDK_PIXBUF_DISABLE_DEPRECATED \ -" - AC_SUBST(DISABLE_DEPRECATED_CFLAGS) -fi - - -dnl --------------------------------------------------------------------------- -dnl - Is freedesktop mime dbase available? -dnl --------------------------------------------------------------------------- -AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no) -AM_CONDITIONAL(HAVE_NEW_MIME, test x$UPDATE_MIME_DATABASE != xno) - -AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no) -AM_CONDITIONAL(HAVE_NEWER_MIME, test x$UPDATE_DESKTOP_DATABASE != xno) - -AC_ARG_ENABLE(update-mimedb, AC_HELP_STRING([--disable-update-mimedb], - [disable the update-mime-database after install [default=no]]),, - enable_update_mimedb=yes) -AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes) - -AC_ARG_ENABLE(update-desktopdb, AC_HELP_STRING([--disable-update-desktopdb], - [disable the update-desktop-database after install [default=no]]),, - enable_update_desktopdb=yes) -AM_CONDITIONAL(ENABLE_UPDATE_DESKTOPDB, test x$enable_update_desktopdb = xyes) - - -dnl --------------------------------------------------------------------------- -dnl - Supported languages -dnl --------------------------------------------------------------------------- -GETTEXT_PACKAGE=glabels -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package]) - -AM_GLIB_GNU_GETTEXT - - -dnl --------------------------------------------------------------------------- -dnl - Misc. -dnl --------------------------------------------------------------------------- - -dnl Setup for libqrencode compilation -AC_DEFINE(__STATIC, static, [Static attribute, needed to compile libqrencode]) - - -dnl --------------------------------------------------------------------------- -dnl - Makefiles, etc. -dnl --------------------------------------------------------------------------- -AC_OUTPUT([ -Makefile -barcode-0.98/Makefile -iec16022-0.2.1/Makefile -qrencode-3.1.0/Makefile -libglabels/Makefile -libglabels/libglabels.pc -src/Makefile -src/pixmaps/Makefile -src/stock-pixmaps/Makefile -data/Makefile -data/pixmaps/Makefile -data/mime/Makefile -data/builder/Makefile -data/desktop/Makefile -data/man/Makefile -templates/Makefile -po/Makefile.in -help/Makefile -docs/Makefile -docs/libglabels/Makefile -glabels.spec -]) - - -dnl --------------------------------------------------------------------------- -dnl - Print configuration information -dnl --------------------------------------------------------------------------- -echo " -Configuration: - - Package: ${PACKAGE}-${VERSION}: - Installation prefix ${prefix} - Source code location: ${srcdir} - Compiler: ${CC} - Evolution Data Server support: ${have_libebook} - -" - -cat ${srcdir}/MESSAGE-OF-DOOM - diff --git a/glabels2/data/Makefile.am b/glabels2/data/Makefile.am deleted file mode 100644 index c285ea28..00000000 --- a/glabels2/data/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -## Process this file with automake to produce Makefile.in - -SUBDIRS = desktop builder man mime pixmaps - - diff --git a/glabels2/data/builder/Makefile.am b/glabels2/data/builder/Makefile.am deleted file mode 100644 index 9279a65b..00000000 --- a/glabels2/data/builder/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -## Process this file with automake to produce Makefile.in - -builderdir = $(datadir)/glabels/builder/ - -builder_DATA = \ - property-bar.builder \ - print-op-dialog-custom-widget.builder \ - wdgt-media-select.builder \ - merge-properties-dialog.builder \ - template-designer.builder \ - prefs-dialog.builder \ - object-editor.builder - -EXTRA_DIST = $(builder_DATA) diff --git a/glabels2/data/builder/merge-properties-dialog.builder b/glabels2/data/builder/merge-properties-dialog.builder deleted file mode 100644 index 18ae33dd..00000000 --- a/glabels2/data/builder/merge-properties-dialog.builder +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - True - vertical - 6 - - - True - 0 - none - - - True - 12 - - - True - 12 - 2 - 2 - 6 - 6 - - - True - 0 - Format: - - - GTK_FILL - - - - - - True - False - - - 1 - 2 - GTK_FILL - - - - - True - vertical - - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 0 - Location: - - - 1 - 2 - GTK_FILL - - - - - - - - - - True - <b>Source</b> - True - - - - - False - 0 - - - - - True - 0 - none - - - True - 12 - - - True - vertical - 6 - - - 500 - 350 - True - False - 6 - automatic - automatic - in - - - True - - - - - 0 - - - - - True - 6 - 12 - - - Select all - True - False - False - True - False - - - False - False - 0 - - - - - Unselect all - True - False - False - True - False - - - False - False - 1 - - - - - False - 1 - - - - - - - - - True - <b>Record selection/preview</b> - True - - - - - 1 - - - - - - diff --git a/glabels2/data/builder/object-editor.builder b/glabels2/data/builder/object-editor.builder deleted file mode 100644 index 5cfb9002..00000000 --- a/glabels2/data/builder/object-editor.builder +++ /dev/null @@ -1,2247 +0,0 @@ - - - - - - True - 6 - dialog1 - dialog - - - True - - - True - 6 - 12 - - - True - 12 - - - True - - - False - 0 - - - - - True - <span weight="bold" size="larger">Xxx object properties</span> - True - - - False - False - 1 - - - - - False - False - 0 - - - - - True - True - True - - - True - 12 - 6 - - - True - - - True - True - - - 232 - True - True - - - - - 0 - - - - - 0 - - - - - True - 12 - - - Insert merge field - True - True - False - True - - - False - 0 - - - - - False - False - 1 - - - - - False - - - - - True - Text - - - False - - - - - True - 12 - 12 - - - True - 12 - - - True - 0 - Family: - - - False - False - 0 - - - - - True - - - - - - 1 - - - - - False - False - 0 - - - - - True - 12 - - - True - 0 - Size: - - - False - False - 0 - - - - - True - 12 - - - True - True - adjustment1 - 0.0099999997764800008 - True - - - False - False - 0 - - - - - 1 - - - - - False - False - 1 - - - - - True - 12 - - - True - 0 - Style: - - - False - False - 0 - - - - - True - 12 - - - True - True - False - - - True - gtk-bold - 4 - - - - - False - False - 0 - - - - - True - True - False - - - True - gtk-italic - 4 - - - - - False - False - 1 - - - - - 1 - - - - - False - False - 2 - - - - - True - 12 - - - True - 0 - 0.14000000059604645 - Color: - - - False - False - 0 - - - - - True - 6 - - - True - 6 - - - True - True - False - True - False - True - - - False - False - 0 - - - - - True - 12 - - - - - - 1 - - - - - 0 - - - - - True - 6 - - - Key: - True - True - False - True - False - True - text_color_radio - - - False - False - 0 - - - - - True - 12 - - - True - - - 0 - - - - - 1 - - - - - 1 - - - - - 1 - - - - - False - False - 3 - - - - - True - 12 - - - True - 0 - Alignment: - - - False - False - 0 - - - - - True - 12 - - - True - True - False - - - True - gtk-justify-left - 4 - - - - - False - False - 0 - - - - - True - True - False - - - True - gtk-justify-center - 4 - - - - - False - False - 1 - - - - - True - True - False - - - True - gtk-justify-right - 4 - - - - - False - False - 2 - - - - - 1 - - - - - False - False - 4 - - - - - True - 12 - - - True - 0 - Line Spacing: - - - False - False - 0 - - - - - True - 12 - - - True - True - adjustment2 - 0.0099999997764800008 - 2 - - - False - False - 0 - - - - - 1 - - - - - False - False - 5 - - - - - Allow merge to automatically shrink text - True - True - False - True - True - - - False - False - 6 - - - - - 1 - False - - - - - True - Style - - - 1 - False - - - - - True - 12 - 12 - - - True - 12 - - - True - 0 - Width: - - - False - False - 0 - - - - - True - 12 - - - True - True - adjustment3 - 0.0099999997764800008 - 2 - True - - - False - False - 0 - - - - - True - points - - - False - False - 1 - - - - - 1 - - - - - False - False - 0 - - - - - True - 12 - - - True - 0 - 0.14000000059604645 - Color: - - - False - False - 0 - - - - - True - 6 - - - True - 6 - - - True - False - False - True - False - True - - - False - False - 0 - - - - - True - 12 - - - - - - 1 - - - - - 0 - - - - - True - 6 - - - Key: - True - False - False - True - False - True - line_color_radio - - - False - False - 0 - - - - - True - 12 - - - True - - - 0 - - - - - 1 - - - - - 1 - - - - - 1 - - - - - False - False - 1 - - - - - 2 - - - - - True - Line - - - 2 - False - - - - - True - 12 - - - True - 12 - - - True - 0 - 0.14000000059604645 - Color: - - - False - False - 0 - - - - - True - 6 - - - True - 6 - - - True - False - False - True - False - True - True - - - False - False - 0 - - - - - True - 12 - - - - - - 1 - - - - - 0 - - - - - True - 6 - - - Key: - True - False - False - True - False - True - fill_color_radio - - - False - False - 0 - - - - - True - 12 - - - True - - - 0 - - - - - 1 - - - - - 1 - - - - - 1 - - - - - False - False - 0 - - - - - 3 - - - - - True - Fill - - - 3 - False - - - - - True - 12 - 12 - - - True - 12 - - - File: - True - True - False - True - False - True - - - False - False - 0 - - - - - True - True - - - 1 - - - - - False - False - 0 - - - - - True - 12 - - - Key: - True - False - True - False - True - False - True - img_file_radio - - - False - False - 0 - - - - - True - - - 1 - - - - - False - False - 1 - - - - - 4 - - - - - True - Image - - - 4 - False - - - - - True - 12 - 12 - - - True - 12 - - - Literal: - True - True - False - True - True - - - False - False - 0 - - - - - True - True - - - 1 - - - - - False - False - 0 - - - - - True - 12 - - - Key: - True - True - False - True - True - data_literal_radio - - - False - False - 0 - - - - - True - - - 1 - - - - - False - False - 1 - - - - - True - 12 - - - True - - - - False - False - 0 - - - - - True - 2 - 2 - 6 - 6 - - - True - 0 - format: - - - GTK_FILL - - - - - - True - 0 - 00000000000 00000 - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - digits: - - - 1 - 2 - GTK_FILL - - - - - - True - - - True - True - adjustment13 - 1 - True - - - False - False - 0 - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - 1 - - - - - False - False - 2 - - - - - 5 - - - - - True - Data - - - 5 - False - - - - - True - 12 - 12 - - - True - 12 - - - True - 0 - Style: - - - False - False - 0 - - - - - True - - - 1 - - - - - False - False - 0 - - - - - Text - True - True - False - True - True - - - False - False - 1 - - - - - Checksum - True - True - False - True - True - - - False - False - 2 - - - - - True - 12 - - - True - 0 - 0.14000000059604645 - Color: - - - False - False - 0 - - - - - True - 6 - - - True - 6 - - - True - True - False - True - False - True - - - False - False - 0 - - - - - True - 12 - - - - - - 1 - - - - - 0 - - - - - True - 6 - - - Key: - True - True - False - True - False - True - bc_color_radio - - - False - False - 0 - - - - - True - 12 - - - True - - - 0 - - - - - 1 - - - - - 1 - - - - - 1 - - - - - False - False - 3 - - - - - 6 - - - - - True - Style - - - 6 - False - - - - - True - 12 - 12 - - - True - 3 - 3 - 12 - 12 - - - True - 0 - Width: - - - GTK_FILL - - - - - - True - 0 - Height: - - - 1 - 2 - GTK_FILL - - - - - - True - 12 - - - True - True - adjustment5 - 0.0099999997764800008 - 2 - True - True - - - False - 0 - - - - - True - inches - - - False - False - 1 - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 12 - - - Reset image size - True - True - False - True - - - False - False - 0 - - - - - 2 - 2 - 3 - GTK_FILL - - - - - - True - 12 - - - True - True - adjustment4 - 0.0099999997764800008 - 2 - True - True - - - False - 0 - - - - - True - inches - - - False - False - 1 - - - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - - - - - - 2 - 3 - 2 - GTK_FILL - - - - - - - - - 0 - - - - - 7 - - - - - True - Size - - - 7 - False - - - - - True - 12 - 12 - - - True - 2 - 2 - 12 - 12 - - - True - 0 - Length: - - - GTK_FILL - - - - - - True - 0 - Angle: - - - 1 - 2 - GTK_FILL - - - - - - True - 12 - - - True - True - adjustment6 - 0.0099999997764800008 - 2 - True - True - - - False - 0 - - - - - True - inches - - - False - False - 1 - - - - - 1 - 2 - GTK_FILL - - - - - True - 12 - - - True - True - adjustment7 - 0.0099999997764800008 - 1 - True - True - - - False - 0 - - - - - True - degrees - - - False - False - 1 - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - 0 - - - - - 8 - - - - - True - Size - - - 8 - False - - - - - True - 12 - 12 - - - True - 2 - 3 - 12 - 12 - - - 50 - True - 0 - X: - - - GTK_FILL - - - - - - True - 0 - Y: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - True - adjustment8 - 0.0099999997764800008 - 2 - True - True - - - 1 - 2 - - - - - - - True - True - adjustment9 - 0.0099999997764800008 - 2 - True - True - - - 1 - 2 - 1 - 2 - - - - - - - 0 - - - - - 9 - - - - - True - Position - - - 9 - False - - - - - True - 12 - 12 - - - Enable shadow - True - True - False - True - True - - - False - False - 0 - - - - - True - 12 - - - True - 12 - - - True - 0 - X Offset: - - - False - False - 0 - - - - - True - 12 - - - True - True - adjustment10 - 0.0099999997764800008 - 2 - True - True - - - False - 0 - - - - - True - inches - - - False - False - 1 - - - - - 1 - - - - - 0 - - - - - True - 12 - - - True - 0 - Y Offset: - - - False - False - 0 - - - - - True - 12 - - - True - True - adjustment11 - 0.0099999997764800008 - 2 - True - True - - - False - 0 - - - - - True - inches - - - False - False - 1 - - - - - 1 - - - - - 1 - - - - - True - 12 - - - True - 0 - 0.14000000059604645 - Color: - - - False - False - 0 - - - - - True - 6 - - - True - 6 - - - True - True - False - True - False - True - - - False - False - 0 - - - - - True - 12 - - - - - - False - False - 1 - - - - - 0 - - - - - True - 6 - - - Key: - True - True - False - True - False - True - shadow_color_radio - - - False - False - 0 - - - - - True - 12 - - - True - - - 0 - - - - - 1 - - - - - 1 - - - - - 1 - - - - - 2 - - - - - True - 12 - - - True - 0 - Opacity: - - - False - False - 0 - - - - - True - 12 - - - True - True - adjustment12 - 1 - - - False - 0 - - - - - True - % - - - False - False - 1 - - - - - 1 - - - - - 3 - - - - - False - False - 1 - - - - - 10 - - - - - True - Shadow - - - 10 - False - - - - - True - - - - - - 11 - - - - - True - label48 - - - 11 - False - - - - - 1 - - - - - 2 - - - - - True - end - - - gtk-close - True - True - True - False - True - - - False - False - 0 - - - - - False - end - 0 - - - - - - closebutton1 - - - - 1 - 1 - 100 - 1 - 10 - - - 1 - 5 - 0.01 - 0.10000000000000001 - - - 1 - 0.25 - 4 - 0.25 - 1 - - - 1 - 100 - 0.01 - 0.10000000000000001 - - - 1 - 100 - 0.01 - 0.10000000000000001 - - - 1 - 100 - 0.01 - 0.10000000000000001 - - - -180 - 180 - 0.10000000000000001 - 5 - - - 100 - 0.01 - 1 - - - 100 - 0.01 - 1 - - - 100 - 0.01 - 1 - - - 100 - 0.01 - 1 - - - 1 - 100 - 1 - 10 - - - 1 - 1 - 100 - 1 - 10 - - diff --git a/glabels2/data/builder/prefs-dialog.builder b/glabels2/data/builder/prefs-dialog.builder deleted file mode 100644 index 65d23688..00000000 --- a/glabels2/data/builder/prefs-dialog.builder +++ /dev/null @@ -1,789 +0,0 @@ - - - - - - True - gLabels Preferences - dialog - - - True - - - True - True - - - True - 12 - 12 - - - True - 0 - Select locale specific behavior. - - - False - False - 0 - - - - - True - 0 - none - - - True - - - True - - - - False - False - 0 - - - - - True - 6 - 6 - - - Points - True - True - False - True - True - - - False - False - 0 - - - - - Inches - True - True - False - True - True - units_points_radio - - - False - False - 1 - - - - - Millimeters - True - True - False - True - True - units_points_radio - - - False - False - 2 - - - - - 1 - - - - - - - True - 0 - <span weight="bold">Units</span> - True - - - - - False - False - 1 - - - - - True - 0 - none - - - True - - - True - - - - False - False - 0 - - - - - True - 6 - 6 - - - US Letter - True - True - False - True - True - - - False - False - 0 - - - - - ISO A4 - True - True - False - True - True - page_size_us_letter_radio - - - False - False - 1 - - - - - 1 - - - - - - - True - 0 - <span weight="bold">Default page size</span> - True - - - - - False - False - 2 - - - - - - - True - Locale - - - False - - - - - True - 12 - 12 - - - True - 0 - Select default properties for new objects. - - - False - False - 0 - - - - - True - 0 - none - - - True - - - True - - - - False - False - 0 - - - - - True - 4 - 2 - 12 - 12 - - - True - 0 - Font: - - - GTK_FILL - - - - - - True - 0 - Color: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Alignment: - - - 2 - 3 - GTK_FILL - - - - - - 90 - True - 0 - Line Spacing: - - - 3 - 4 - GTK_FILL - - - - - - True - 12 - - - True - - - - - - 0 - - - - - True - True - adjustment1 - 1 - True - - - False - False - 1 - - - - - True - True - False - - - True - gtk-bold - 4 - - - - - False - False - 2 - - - - - True - True - False - - - True - gtk-italic - 4 - - - - - False - False - 3 - - - - - 1 - 2 - GTK_FILL - - - - - True - 12 - - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 12 - - - True - True - False - - - True - gtk-justify-left - 4 - - - - - False - False - 0 - - - - - True - True - False - - - True - gtk-justify-center - 4 - - - - - False - False - 1 - - - - - True - True - False - - - True - gtk-justify-right - 4 - - - - - False - False - 2 - - - - - 1 - 2 - 2 - 3 - GTK_FILL - GTK_FILL - - - - - True - 40 - - - True - True - adjustment2 - 0.0099999997764800008 - 2 - - - False - False - 0 - - - - - 1 - 2 - 3 - 4 - GTK_FILL - GTK_FILL - - - - - 1 - - - - - - - True - <span weight="bold">Text</span> - True - - - - - False - False - 1 - - - - - True - 0 - none - - - True - - - True - - - - False - False - 0 - - - - - True - 2 - 2 - 12 - 12 - - - 90 - True - 0 - Width: - - - GTK_FILL - - - - - - True - 0 - Color: - - - 1 - 2 - GTK_FILL - - - - - - True - 12 - - - True - True - adjustment3 - 0.0099999997764800008 - 2 - True - - - False - False - 0 - - - - - True - points - - - False - False - 1 - - - - - 1 - 2 - GTK_FILL - - - - - True - 12 - - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - 1 - - - - - - - True - <span weight="bold">Line</span> - True - - - - - False - False - 2 - - - - - True - 0 - none - - - True - - - True - - - - False - False - 0 - - - - - True - 2 - 12 - 12 - - - 90 - True - 0 - Color: - - - GTK_FILL - - - - - - True - 12 - - - - - - 1 - 2 - GTK_FILL - - - - - 1 - - - - - - - True - <span weight="bold">Fill</span> - True - - - - - False - False - 3 - - - - - 1 - - - - - True - Object defaults - - - 1 - False - - - - - 2 - - - - - True - end - - - gtk-close - True - True - True - False - True - - - False - False - 0 - - - - - False - end - 0 - - - - - - closebutton1 - - - - 1 - 1 - 100 - 1 - 10 - - - 1 - 5 - 0.01 - 0.10000000000000001 - - - 1 - 0.25 - 4 - 0.25 - 1 - - diff --git a/glabels2/data/builder/print-op-dialog-custom-widget.builder b/glabels2/data/builder/print-op-dialog-custom-widget.builder deleted file mode 100644 index 59afddbb..00000000 --- a/glabels2/data/builder/print-op-dialog-custom-widget.builder +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - True - window1 - - - True - 12 - 3 - - - - - - True - vertical - 12 - - - True - vertical - 12 - - - True - 0 - none - - - True - 12 - - - True - vertical - 6 - - - True - 6 - - - Sheets: - True - True - False - True - True - - - False - False - 0 - - - - - True - True - - adjustment1 - - - False - False - 1 - - - - - 0 - - - - - True - 6 - - - Labels - True - True - False - True - True - simple_sheets_radio - - - False - False - 0 - - - - - True - 3 - - - True - from: - - - False - False - 0 - - - - - True - True - - adjustment2 - - - False - False - 1 - - - - - False - False - 3 - 1 - - - - - True - 3 - - - True - to: - - - False - False - 0 - - - - - True - True - - adjustment3 - - - False - False - 1 - - - - - False - False - 3 - 2 - - - - - 1 - - - - - - - - - True - <b>Copies</b> - True - - - - - False - False - 0 - - - - - True - 0 - none - - - True - 12 - - - True - vertical - 6 - - - True - 6 - - - True - Start on label - - - False - False - 0 - - - - - True - True - - adjustment4 - - - False - False - 1 - - - - - True - on 1st sheet - - - False - False - 2 - - - - - False - False - 0 - - - - - True - 6 - - - True - Copies: - - - False - False - 0 - - - - - True - True - - adjustment5 - - - False - False - 1 - - - - - True - 12 - - - Collate - True - True - False - True - - - False - False - 0 - - - - - True - gtk-missing-image - - - 1 - - - - - False - False - 12 - 2 - - - - - 1 - - - - - - - - - True - <b>Merge Control</b> - True - - - - - False - False - 1 - - - - - False - False - 0 - - - - - True - 0 - none - - - True - 12 - - - True - vertical - - - print outlines (to test printer alignment) - True - True - False - True - True - - - False - False - 0 - - - - - print in reverse (i.e. a mirror image) - True - True - False - True - True - - - False - False - 1 - - - - - print crop marks - True - True - False - True - True - - - False - False - 2 - - - - - - - - - True - <b>Options</b> - True - - - - - False - False - 1 - - - - - False - False - end - 0 - - - - - - - 1 - 1 - 100 - 1 - 10 - - - 1 - 1 - 100 - 1 - 10 - - - 1 - 1 - 100 - 1 - 10 - - - 1 - 1 - 100 - 1 - 10 - - - 1 - 1 - 100 - 1 - 10 - - diff --git a/glabels2/data/builder/property-bar.builder b/glabels2/data/builder/property-bar.builder deleted file mode 100644 index a98e892b..00000000 --- a/glabels2/data/builder/property-bar.builder +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - True - window1 - - - True - icons - False - - - True - - - True - Font family - False - - - - - - - - False - - - - - True - - - True - 6 - - - True - True - Font size - adjustment1 - 1 - - - - - - - False - - - - - True - - - False - - - - - True - Bold - True - gtk-bold - - - False - True - - - - - True - Italic - True - gtk-italic - - - False - True - - - - - True - - - False - - - - - True - Left align - True - gtk-justify-left - - - False - True - - - - - True - Center align - True - gtk-justify-center - text_align_left_radio - - - False - True - - - - - True - Right align - True - gtk-justify-right - text_align_left_radio - - - False - True - - - - - True - - - False - - - - - True - - - True - Text color - False - - - - - - - - False - - - - - True - - - True - Fill color - False - - - - - - - - False - - - - - True - - - True - Line color - False - - - - - - - - False - - - - - True - - - False - - - - - True - - - True - True - Line width - adjustment2 - 1 - 2 - - - - - False - - - - - - - 1 - 1 - 250 - 1 - 10 - - - 1 - 0.25 - 4 - 0.25 - 1 - - diff --git a/glabels2/data/builder/template-designer.builder b/glabels2/data/builder/template-designer.builder deleted file mode 100644 index d61f0ec6..00000000 --- a/glabels2/data/builder/template-designer.builder +++ /dev/null @@ -1,2152 +0,0 @@ - - - - - - True - window1 - - - True - True - 6 - - - True - Welcome to the gLabels Template Designer. - -This dialog will assist you in the creation of a custom gLabels template. - - - - - True - start_page - - - False - - - - - True - 18 - 24 - - - True - 0 - Please enter the following identifying information about the template stationery. - - - False - False - 0 - - - - - True - 6 - 2 - 12 - 12 - - - True - 0 - Brand/Manufacturer: - - - GTK_FILL - - - - - - True - 0 - Part #: - - - 1 - 2 - GTK_FILL - - - - - - True - 12 - - - True - True - - - False - False - 0 - - - - - True - 0 - (e.g., 8163A) - - - False - False - 1 - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 12 - - - True - True - - - False - False - 0 - - - - - True - 0 - (e.g., Avery, Acme, ...) - - - False - False - 1 - - - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 0 - 0 - Description: - - - 4 - 5 - GTK_FILL - - - - - - True - True - - - 1 - 2 - 4 - 5 - - - - - - True - 0 - 0 - (e.g., "Mailing Labels," "Business Cards," ...) - - - 1 - 2 - 5 - 6 - GTK_FILL - - - - - - True - 6 - - - True - - - False - False - 0 - - - - - True - 0 - True - - - False - 1 - - - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - - - - - - - - - - - - - - 1 - - - - - 1 - - - - - True - name_page - - - 1 - False - - - - - True - 18 - 24 - - - True - 0 - Please select the page size of the template stationery. - - - False - False - 0 - - - - - True - 3 - 2 - 12 - 12 - - - True - 0 - Page size: - - - GTK_FILL - - - - - - True - 0 - Width: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Height: - - - 2 - 3 - GTK_FILL - - - - - - True - - - True - - - False - False - 0 - - - - - - - - 1 - 2 - GTK_FILL - - - - - True - 12 - - - True - True - adjustment1 - 0.0099999997764800008 - - - False - False - 0 - - - - - True - 0 - inches - - - False - False - 1 - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 12 - - - True - True - adjustment2 - 0.0099999997764800008 - - - False - False - 0 - - - - - True - 0 - inches - - - False - False - 1 - - - - - 1 - 2 - 2 - 3 - GTK_FILL - GTK_FILL - - - - - False - False - 1 - - - - - 2 - - - - - True - pg_size_page - - - 2 - False - - - - - True - 18 - 24 - - - True - 0 - Please select the basic shape of the labels or cards. - - - False - False - 0 - - - - - True - 6 - - - Rectangular or square (can have rounded corners) - True - True - False - True - True - - - False - False - 0 - - - - - Round - True - True - False - True - True - shape_rect_radio - - - False - False - 1 - - - - - CD/DVD (including credit card CDs) - True - True - False - True - True - shape_rect_radio - - - False - False - 2 - - - - - 1 - - - - - 3 - - - - - True - shape_page - - - 3 - False - - - - - True - 18 - 24 - - - True - 0 - Please enter the following size parameters of a single label or card in your template. - - - False - False - 0 - - - - - True - 12 - - - True - 6 - 3 - 12 - 12 - - - True - 0 - 1. Width: - - - GTK_FILL - - - - - - True - 0 - 2. Height: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - 3. Round (radius of corner): - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - 4. Horiz. waste (overprint allowed): - - - 3 - 4 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 2 - 3 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 3 - 4 - GTK_FILL - - - - - - True - True - adjustment3 - 0.0099999997764800008 - - - 1 - 2 - - - - - - True - True - adjustment4 - 0.0099999997764800008 - - - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment5 - 0.0099999997764800008 - - - 1 - 2 - 2 - 3 - - - - - - True - True - adjustment6 - 0.0099999997764800008 - - - 1 - 2 - 3 - 4 - - - - - - True - 0 - 6. Margin - - - 5 - 6 - GTK_FILL - - - - - - True - True - adjustment8 - 0.0099999997764800008 - - - 1 - 2 - 5 - 6 - - - - - - True - 0 - inches - - - 2 - 3 - 5 - 6 - GTK_FILL - - - - - - True - True - adjustment7 - 0.0099999997764800008 - - - 1 - 2 - 4 - 5 - - - - - - True - 0 - inches - - - 2 - 3 - 4 - 5 - GTK_FILL - - - - - - True - 0 - 5. Vert. waste (overprint allowed): - - - 4 - 5 - GTK_FILL - - - - - - False - False - 0 - - - - - True - 1 - 0 - - - 1 - - - - - False - False - 1 - - - - - 4 - - - - - True - rect_size_page - - - 4 - False - - - - - True - 18 - 24 - - - True - 0 - Please enter the following size parameters of a single label in your template. - - - False - False - 0 - - - - - True - 12 - - - True - 3 - 3 - 12 - 12 - - - True - 0 - 1. Radius: - - - GTK_FILL - - - - - - True - 0 - 2. Waste (overprint allowed): - - - 1 - 2 - GTK_FILL - - - - - - True - True - adjustment9 - 0.0099999997764800008 - - - 1 - 2 - - - - - - True - True - adjustment10 - 0.0099999997764800008 - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - inches - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - 0 - 3. Margin - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 2 - 3 - GTK_FILL - - - - - - True - True - adjustment11 - 0.0099999997764800008 - - - 1 - 2 - 2 - 3 - - - - - - False - False - 0 - - - - - True - 1 - 0 - - - 1 - - - - - False - False - 1 - - - - - 5 - - - - - True - round_size_page - - - 5 - False - - - - - True - 18 - 24 - - - True - 0 - Please enter the following size parameters of a single label in your template. - - - False - False - 0 - - - - - True - 12 - - - True - 6 - 3 - 12 - 12 - - - True - 0 - 1. Outer radius: - - - GTK_FILL - - - - - - True - 0 - 2. Inner radius: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - 3. Clipping width: - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - 4. Clipping height: - - - 3 - 4 - GTK_FILL - - - - - - True - 0 - 5. Waste (overprint allowed): - - - 4 - 5 - GTK_FILL - - - - - - True - True - adjustment12 - 0.0099999997764800008 - - - 1 - 2 - - - - - - True - True - adjustment13 - 0.0099999997764800008 - - - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment14 - 0.0099999997764800008 - - - 1 - 2 - 2 - 3 - - - - - - True - True - adjustment15 - 0.0099999997764800008 - - - 1 - 2 - 3 - 4 - - - - - - True - True - adjustment16 - 0.0099999997764800008 - - - 1 - 2 - 4 - 5 - - - - - - True - 0 - inches - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 2 - 3 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 3 - 4 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 4 - 5 - GTK_FILL - - - - - - True - 0 - 6. Margin - - - 5 - 6 - GTK_FILL - - - - - - True - 0 - inches - - - 2 - 3 - 5 - 6 - GTK_FILL - - - - - - True - True - adjustment17 - 0.0099999997764800008 - - - 1 - 2 - 5 - 6 - - - - - - False - False - 0 - - - - - True - 1 - 0 - - - 1 - - - - - False - False - 1 - - - - - 6 - - - - - True - cd_size_page - - - 6 - False - - - - - True - 18 - 24 - - - True - 0 - How many layouts will your template contain? - -A layout is a set of labels or cards that can be arranged in a simple grid. -Most templates only need one layout, as in the first example. -The second example illustrates when two layouts are needed. - - - False - False - 0 - - - - - True - 12 - - - True - - - True - - - 0 - - - - - True - Templates needing only -one layout. - center - - - False - False - 1 - - - - - 0 - - - - - True - - - True - - - 0 - - - - - True - Templates needing -two layouts. - center - - - False - False - 1 - - - - - 1 - - - - - False - False - 1 - - - - - True - 12 - - - True - 0 - Number of layouts: - - - False - False - 0 - - - - - True - True - 1 - adjustment18 - 1 - True - - - False - False - 1 - - - - - False - False - 2 - - - - - 7 - - - - - True - nlayouts_page - - - 7 - False - - - - - True - 18 - 12 - - - True - 0 - Please enter the following layout information. - - - False - False - 0 - - - - - True - 18 - - - True - 7 - 4 - 12 - 6 - - - True - 0 - Layout #1 - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Layout #2 - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Number across (nx): - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Number down (ny): - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - Distance from left edge (x0): - - - 3 - 4 - GTK_FILL - - - - - - True - 0 - Distance from top edge (y0): - - - 4 - 5 - GTK_FILL - - - - - - True - 0 - Horizontal pitch (dx): - - - 5 - 6 - GTK_FILL - - - - - - True - 0 - Vertical pitch (dy): - - - 6 - 7 - GTK_FILL - - - - - - True - 0 - inches - - - 3 - 4 - 3 - 4 - GTK_FILL - - - - - - True - 0 - inches - - - 3 - 4 - 4 - 5 - GTK_FILL - - - - - - True - 0 - inches - - - 3 - 4 - 5 - 6 - GTK_FILL - - - - - - True - 0 - inches - - - 3 - 4 - 6 - 7 - GTK_FILL - - - - - - True - True - adjustment19 - 0.0099999997764800008 - - - 1 - 2 - 1 - 2 - - - - - - True - True - adjustment21 - 0.0099999997764800008 - - - 1 - 2 - 2 - 3 - - - - - - True - True - adjustment20 - 0.0099999997764800008 - - - 2 - 3 - 1 - 2 - - - - - - True - True - adjustment22 - 0.0099999997764800008 - - - 2 - 3 - 2 - 3 - - - - - - True - True - adjustment23 - 0.0099999997764800008 - - - 1 - 2 - 3 - 4 - - - - - - True - True - adjustment24 - 0.0099999997764800008 - - - 2 - 3 - 3 - 4 - - - - - - True - True - adjustment25 - 0.0099999997764800008 - - - 1 - 2 - 4 - 5 - - - - - - True - True - adjustment26 - 0.0099999997764800008 - - - 2 - 3 - 4 - 5 - - - - - - True - True - adjustment27 - 0.0099999997764800008 - - - 1 - 2 - 5 - 6 - - - - - - True - True - adjustment28 - 0.0099999997764800008 - - - 2 - 3 - 5 - 6 - - - - - - True - True - adjustment29 - 0.0099999997764800008 - - - 1 - 2 - 6 - 7 - - - - - - True - True - adjustment30 - 0.0099999997764800008 - - - 2 - 3 - 6 - 7 - - - - - - - - - - - - - - - - - - False - False - 0 - - - - - True - - - True - - - - 0 - - - - - True - 6 - - - True - - - - - - 0 - - - - - Print test sheet - True - True - False - 6 - True - - - False - False - 1 - - - - - False - False - 1 - - - - - 1 - - - - - False - False - 1 - - - - - 8 - - - - - True - layout_page - - - 8 - False - - - - - True - Congratulations! - -You have completed the gLabels Template Designer. -If you wish to accept and save your design, click "Apply." - -Otherwise, you may click "Cancel" to abandon your design -or "Back" to continue editing this design. - - - 9 - - - - - True - finish_page - - - 9 - False - - - - - - - 1 - 100 - 1 - 10 - - - 1 - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 1 - 1 - 2 - 1 - 1 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - - 100 - 1 - 10 - - diff --git a/glabels2/data/builder/wdgt-media-select.builder b/glabels2/data/builder/wdgt-media-select.builder deleted file mode 100644 index 80ab2f1f..00000000 --- a/glabels2/data/builder/wdgt-media-select.builder +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - True - window1 - - - True - - - True - 12 - - - True - - - 480 - 320 - True - True - 12 - automatic - automatic - in - - - True - False - - - - - 0 - - - - - - - True - Recent templates - - - False - - - - - True - - - True - 12 - 12 - - - True - 6 - - - True - Brand: - - - False - False - 0 - - - - - True - False - - - False - 1 - - - - - False - False - 0 - - - - - True - 6 - - - True - Page size: - - - False - False - 0 - - - - - True - False - - - False - 1 - - - - - False - 1 - - - - - True - 6 - - - True - Category: - - - False - False - 0 - - - - - True - False - - - False - 1 - - - - - False - 2 - - - - - False - 0 - - - - - 480 - 320 - True - True - 12 - automatic - automatic - in - - - True - False - - - - - 1 - - - - - 1 - - - - - True - Search all templates - - - 1 - False - - - - - 0 - - - - - - diff --git a/glabels2/data/desktop/Makefile.am b/glabels2/data/desktop/Makefile.am deleted file mode 100644 index ce2a21fc..00000000 --- a/glabels2/data/desktop/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -## Process this file with automake to produce Makefile.in - -@INTLTOOL_DESKTOP_RULE@ - -DESKTOP_IN_FILES = glabels.desktop.in -DESKTOP_FILES =$(DESKTOP_IN_FILES:.desktop.in=.desktop) - -desktopdir = $(datadir)/applications -desktop_DATA = $(DESKTOP_FILES) - -EXTRA_DIST = $(DESKTOP_IN_FILES) - -CLEANFILES = $(DESKTOP_FILES) diff --git a/glabels2/data/desktop/glabels.desktop.in b/glabels2/data/desktop/glabels.desktop.in deleted file mode 100644 index 6f0956cf..00000000 --- a/glabels2/data/desktop/glabels.desktop.in +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -_Name=gLabels Label Designer -_Comment=Create labels, business cards and media covers -Exec=glabels %F -Icon=glabels.png -Terminal=false -Type=Application -Categories=GTK;Office; -StartupNotify=true -MimeType=application/x-glabels; diff --git a/glabels2/data/man/Makefile.am b/glabels2/data/man/Makefile.am deleted file mode 100644 index 34051904..00000000 --- a/glabels2/data/man/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -## Process this file with automake to produce Makefile.in - -man_MANS = glabels.1 - -EXTRA_DIST = $(man_MANS) - diff --git a/glabels2/data/man/glabels.1 b/glabels2/data/man/glabels.1 deleted file mode 100644 index 489b2a42..00000000 --- a/glabels2/data/man/glabels.1 +++ /dev/null @@ -1,67 +0,0 @@ -.TH glabels 1 "Jun 28, 2004" -.SH NAME -glabels \- Label and business card creation program for GNOME -.SH SYNOPSIS -.B glabels -.RI [OPTIONS] -.RI [label-filename...] -.sp -.B glabels-batch -.RI [OPTIONS] -.RI [label-filename...] -.SH DESCRIPTION -.B 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. -.B glabels -is pre-configured with templates for many of these products. -It also provides an interactive template designer for creating new -templates according to user specifications. -.PP -For full documentation see the \fBgLabels\fR online help. - -.PP -.B glabels-batch -is a command line utility to print labels previously prepared with -.B glabels. -.SH OPTIONS -.TP -\fB\-?\fR, \fB\-\-help\fR -Display a summary of available command-line options. -.TP -\fB\-\-usage\fR -Display a short usage summary. -.TP -\fB\-v\fR, \fB\-\-version\fR -Print program version information. -.PP -.B Options specific to glabels-batch -.TP -\fB\-o\fR \fIfilename\fR, \fB\-\-output\fR=\fIfilename\fR -Set output filename to \fIfilename\fR. (default="output.ps") -.TP -\fB\-s\fR \fIn\fR, \fB\-\-sheets\fR=\fIn\fR -Set number of sheets to \fIn\fR. (default=1) -.TP -\fB\-c\fR \fIn\fR, \fB\-\-copies\fR=\fIn\fR -Set number of copies to \fIn\fR. (default=1) -.TP -\fB\-f\fR \fIn\fR, \fB\-\-first\fR=\fIn\fR -Set label on first sheet to start printing from to \fIn\fR. (default=1) -.TP -\fB\-l\fR, \fB\-\-outline\fR -Print outlines around labels. This is useful for testing printer alignment -or printing proof sheets. -.TP -\fB\-r\fR, \fB\-\-reverse\fR -Print mirror image of labels. This is useful for clear labels intended to be -seen from the back through glass. - -.SH FILES -The $HOME/.glabels directory contains all user-defined templates. -.SH SEE ALSO -The gLabels homepage at . -.SH AUTHOR -Jim Evins diff --git a/glabels2/data/mime/Makefile.am b/glabels2/data/mime/Makefile.am deleted file mode 100644 index 027c1022..00000000 --- a/glabels2/data/mime/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -## Process this file with automake to produce Makefile.in - -keys_in_files=glabels.keys.in -keys_files = $(keys_in_files:.keys.in=.keys) -@INTLTOOL_KEYS_RULE@ - -xml_in_files=glabels.xml.in -xml_files = $(xml_in_files:.xml.in=.xml) -@INTLTOOL_XML_RULE@ - -mimedir = $(datadir)/mime-info -mime_DATA = $(keys_files) glabels.mime - -appdir = $(datadir)/application-registry -app_DATA = glabels.applications - -newmimedir = $(datadir)/mime/packages -newmime_DATA = $(xml_files) - -EXTRA_DIST = \ - $(keys_in_files) \ - $(mime_DATA) \ - $(app_DATA) \ - $(xml_in_files) \ - $(newmime_DATA) - -CLEANFILES = $(keys_files) $(xml_files) - - -install-data-hook: -if ENABLE_UPDATE_MIMEDB -if HAVE_NEW_MIME - $(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime" -endif -endif -if ENABLE_UPDATE_DESKTOPDB -if HAVE_NEWER_MIME - $(UPDATE_DESKTOP_DATABASE) -endif -endif - -uninstall-hook: -if ENABLE_UPDATE_MIMEDB -if HAVE_NEW_MIME - $(UPDATE_MIME_DATABASE) "$(DESTDIR)$(datadir)/mime" -endif -endif -if ENABLE_UPDATE_DESKTOPDB -if HAVE_NEWER_MIME - $(UPDATE_DESKTOP_DATABASE) -endif -endif - diff --git a/glabels2/data/mime/glabels.applications b/glabels2/data/mime/glabels.applications deleted file mode 100644 index 1391018e..00000000 --- a/glabels2/data/mime/glabels.applications +++ /dev/null @@ -1,9 +0,0 @@ -glabels - command=glabels - name=gLabels - can_open_multiple_files=true - expects_uris=false - requires_terminal=false - mime_types=application/x-glabels - uses_gnomevfs=false - diff --git a/glabels2/data/mime/glabels.keys.in b/glabels2/data/mime/glabels.keys.in deleted file mode 100644 index 596c96c7..00000000 --- a/glabels2/data/mime/glabels.keys.in +++ /dev/null @@ -1,9 +0,0 @@ -application/x-glabels: - open=glabels %f - _description=gLabels Project File - icon_filename=glabels-application-x-glabels.png - default_action_type=application - category=Documents - short_list_application_ids_for_novice_user_level=glabels - short_list_application_ids_for_intermediate_user_level=glabels - short_list_application_ids_for_advanced_user_level=glabels diff --git a/glabels2/data/mime/glabels.mime b/glabels2/data/mime/glabels.mime deleted file mode 100644 index ab2f8cd3..00000000 --- a/glabels2/data/mime/glabels.mime +++ /dev/null @@ -1,2 +0,0 @@ -application/x-glabels - ext: glabels diff --git a/glabels2/data/mime/glabels.xml.in b/glabels2/data/mime/glabels.xml.in deleted file mode 100644 index 70f0e2f3..00000000 --- a/glabels2/data/mime/glabels.xml.in +++ /dev/null @@ -1,8 +0,0 @@ - - - - <_comment>gLabels Project File - - - - diff --git a/glabels2/data/pixmaps/Makefile.am b/glabels2/data/pixmaps/Makefile.am deleted file mode 100644 index 4cebb802..00000000 --- a/glabels2/data/pixmaps/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -## Process this file with automake to produce Makefile.in - -glabels_pixmapsdir = $(datadir)/pixmaps/glabels - -glabels_pixmaps_DATA = \ - glabels-splash.png \ - glabels-about-logo.png \ - ex-rect-size.png \ - ex-round-size.png \ - ex-cd-size.png \ - ex-1layout.png \ - ex-2layouts.png - -glabels_app_icondir = $(datadir)/pixmaps - -glabels_app_icon_DATA = \ - glabels.png - -glabels_mime_icondir = $(datadir)/pixmaps - -glabels_mime_icon_DATA = \ - glabels-application-x-glabels.png - -EXTRA_DIST = $(glabels_pixmaps_DATA) \ - $(glabels_app_icon_DATA) \ - $(glabels_mime_icon_DATA) diff --git a/glabels2/data/pixmaps/ex-1layout.png b/glabels2/data/pixmaps/ex-1layout.png deleted file mode 100644 index 3045c5f2..00000000 Binary files a/glabels2/data/pixmaps/ex-1layout.png and /dev/null differ diff --git a/glabels2/data/pixmaps/ex-2layouts.png b/glabels2/data/pixmaps/ex-2layouts.png deleted file mode 100644 index 1bb5931a..00000000 Binary files a/glabels2/data/pixmaps/ex-2layouts.png and /dev/null differ diff --git a/glabels2/data/pixmaps/ex-cd-size.png b/glabels2/data/pixmaps/ex-cd-size.png deleted file mode 100644 index 68261f03..00000000 Binary files a/glabels2/data/pixmaps/ex-cd-size.png and /dev/null differ diff --git a/glabels2/data/pixmaps/ex-rect-size.png b/glabels2/data/pixmaps/ex-rect-size.png deleted file mode 100644 index 2710472f..00000000 Binary files a/glabels2/data/pixmaps/ex-rect-size.png and /dev/null differ diff --git a/glabels2/data/pixmaps/ex-round-size.png b/glabels2/data/pixmaps/ex-round-size.png deleted file mode 100644 index c45d6c3b..00000000 Binary files a/glabels2/data/pixmaps/ex-round-size.png and /dev/null differ diff --git a/glabels2/data/pixmaps/glabels-about-logo.png b/glabels2/data/pixmaps/glabels-about-logo.png deleted file mode 100644 index 9997c67e..00000000 Binary files a/glabels2/data/pixmaps/glabels-about-logo.png and /dev/null differ diff --git a/glabels2/data/pixmaps/glabels-application-x-glabels.png b/glabels2/data/pixmaps/glabels-application-x-glabels.png deleted file mode 100644 index 59c749f3..00000000 Binary files a/glabels2/data/pixmaps/glabels-application-x-glabels.png and /dev/null differ diff --git a/glabels2/data/pixmaps/glabels-splash.png b/glabels2/data/pixmaps/glabels-splash.png deleted file mode 100644 index 713cb8a2..00000000 Binary files a/glabels2/data/pixmaps/glabels-splash.png and /dev/null differ diff --git a/glabels2/data/pixmaps/glabels.png b/glabels2/data/pixmaps/glabels.png deleted file mode 100644 index afb7ecfb..00000000 Binary files a/glabels2/data/pixmaps/glabels.png and /dev/null differ diff --git a/glabels2/docs/Makefile.am b/glabels2/docs/Makefile.am deleted file mode 100644 index 0cb49459..00000000 --- a/glabels2/docs/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -## Process this file with automake to produce Makefile.in. - -SUBDIRS = libglabels diff --git a/glabels2/docs/libglabels/Makefile.am b/glabels2/docs/libglabels/Makefile.am deleted file mode 100644 index 28e56fdb..00000000 --- a/glabels2/docs/libglabels/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# We require automake 1.6 at least. -AUTOMAKE_OPTIONS = 1.6 - -# This is a blank Makefile.am for using gtk-doc. -# Copy this to your project's API docs directory and modify the variables to -# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples -# of using the various options. - -# The name of the module, e.g. 'glib'. -DOC_MODULE=libglabels - -# The top-level SGML file. You can change this if you want to. -DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml - -# The directory containing the source code. Relative to $(srcdir). -# gtk-doc will search all .c & .h files beneath here for inline comments -# documenting the functions and macros. -# e.g. DOC_SOURCE_DIR=../../../gtk -DOC_SOURCE_DIR=../../libglabels - -# Extra options to pass to gtkdoc-scangobj. Not normally needed. -SCANGOBJ_OPTIONS= - -# Extra options to supply to gtkdoc-scan. -# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" -SCAN_OPTIONS= - -# Extra options to supply to gtkdoc-mkdb. -# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml -MKDB_OPTIONS=--sgml-mode --output-format=xml - -# Extra options to supply to gtkdoc-fixref. Not normally needed. -# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html -FIXXREF_OPTIONS= - -# Used for dependencies. The docs will be rebuilt if any of these change. -# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h -# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c -HFILE_GLOB= -CFILE_GLOB= - -# Header files to ignore when scanning. -# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h -IGNORE_HFILES=libglabels-private.h - -# Images to copy into HTML directory. -# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png -HTML_IMAGES= - -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). -# e.g. content_files=running.sgml building.sgml changes-2.0.sgml -content_files= - -# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. -# Only needed if you are using gtkdoc-scangobj to dynamically query widget -# signals and properties. -# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) -# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -INCLUDES= -GTKDOC_LIBS= - -# This includes the standard gtk-doc make rules, copied by gtkdocize. -include $(top_srcdir)/gtk-doc.make - -# Other files to distribute -# e.g. EXTRA_DIST += version.xml.in -EXTRA_DIST += diff --git a/glabels2/docs/libglabels/libglabels-decl-list.txt b/glabels2/docs/libglabels/libglabels-decl-list.txt deleted file mode 100644 index d3e6343c..00000000 --- a/glabels2/docs/libglabels/libglabels-decl-list.txt +++ /dev/null @@ -1,166 +0,0 @@ -
    -xml-paper -lgl_xml_paper_read_papers_from_file -lgl_xml_paper_parse_papers_doc -lgl_xml_paper_parse_paper_node -
    - -
    -enums -lglUnitsType -
    - -
    -xml-category -lgl_xml_category_read_categories_from_file -lgl_xml_category_parse_categories_doc -lgl_xml_category_parse_category_node -
    - -
    -libglabels -
    - -
    -db -lglDbRegStatus -lgl_db_init -lgl_db_get_paper_id_list -lgl_db_free_paper_id_list -lgl_db_get_paper_name_list -lgl_db_free_paper_name_list -lgl_db_lookup_paper_from_name -lgl_db_lookup_paper_from_id -lgl_db_lookup_paper_id_from_name -lgl_db_lookup_paper_name_from_id -lgl_db_is_paper_id_known -lgl_db_is_paper_id_other -lgl_db_get_category_id_list -lgl_db_free_category_id_list -lgl_db_get_category_name_list -lgl_db_free_category_name_list -lgl_db_lookup_category_from_name -lgl_db_lookup_category_from_id -lgl_db_lookup_category_id_from_name -lgl_db_lookup_category_name_from_id -lgl_db_is_category_id_known -lgl_db_get_brand_list -lgl_db_free_brand_list -lgl_db_register_template -lgl_db_does_template_exist -lgl_db_does_template_name_exist -lgl_db_get_template_name_list_unique -lgl_db_get_template_name_list_all -lgl_db_free_template_name_list -lgl_db_lookup_template_from_name -lgl_db_print_known_papers -lgl_db_print_known_categories -lgl_db_print_known_templates -lgl_db_print_aliases -
    - -
    -str -lgl_str_utf8_casecmp -
    - -
    -template -lglTemplate -lglTemplateAlias -lglTemplateFrameAll -lglTemplateFrameRect -lglTemplateFrameRound -lglTemplateFrameCD -lglTemplateLayout -lglTemplateMarkupMargin -lglTemplateMarkupLine -lglTemplateMarkupCircle -lglTemplateMarkupRect -lglTemplateOrigin -lglTemplateFrameShape -lglTemplateFrame -lglTemplateMarkupType -lglTemplateMarkup -lgl_template_get_name -lgl_template_do_templates_match -lgl_template_does_brand_match -lgl_template_does_page_size_match -lgl_template_does_category_match -lgl_template_frame_get_size -lgl_template_frame_get_n_labels -lgl_template_frame_get_origins -lgl_template_new -lgl_template_add_alias -lgl_template_add_category -lgl_template_add_frame -lgl_template_frame_rect_new -lgl_template_alias_new -lgl_template_frame_round_new -lgl_template_frame_cd_new -lgl_template_frame_add_layout -lgl_template_frame_add_markup -lgl_template_layout_new -lgl_template_markup_margin_new -lgl_template_markup_line_new -lgl_template_markup_circle_new -lgl_template_markup_rect_new -lgl_template_dup -lgl_template_free -lgl_template_alias_dup -lgl_template_alias_free -lgl_template_frame_dup -lgl_template_frame_free -lgl_template_layout_dup -lgl_template_layout_free -lgl_template_markup_dup -lgl_template_markup_free -
    - -
    -category -lglCategory -lgl_category_new -lgl_category_dup -lgl_category_free -
    - -
    -xml -LGL_XML_NAME_SPACE -lgl_xml_get_prop_string -lgl_xml_get_prop_i18n_string -lgl_xml_get_prop_double -lgl_xml_get_prop_boolean -lgl_xml_get_prop_int -lgl_xml_get_prop_uint -lgl_xml_get_prop_length -lgl_xml_set_prop_string -lgl_xml_set_prop_double -lgl_xml_set_prop_boolean -lgl_xml_set_prop_int -lgl_xml_set_prop_uint_hex -lgl_xml_set_prop_length -lgl_xml_is_node -lgl_xml_get_node_content -lgl_xml_set_default_units -
    - -
    -xml-template -lgl_xml_template_read_templates_from_file -lgl_xml_template_parse_templates_doc -lgl_xml_template_parse_template_node -lgl_xml_template_write_templates_to_file -lgl_xml_template_write_template_to_file -lgl_xml_template_create_template_node -
    - -
    -paper -lglPaper -lgl_paper_new -lgl_paper_dup -lgl_paper_free -
    - diff --git a/glabels2/docs/libglabels/libglabels-docs.sgml b/glabels2/docs/libglabels/libglabels-docs.sgml deleted file mode 100644 index a4b5b381..00000000 --- a/glabels2/docs/libglabels/libglabels-docs.sgml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - LibGlabels Reference Manual - - - - Basic LibGlabels Usage - - - - - - - - Working Directly With LibGlabels XML - - - - - - - - Miscellaneous - - - - - diff --git a/glabels2/docs/libglabels/libglabels-overrides.txt b/glabels2/docs/libglabels/libglabels-overrides.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/glabels2/docs/libglabels/libglabels-sections.txt b/glabels2/docs/libglabels/libglabels-sections.txt deleted file mode 100644 index 658d109c..00000000 --- a/glabels2/docs/libglabels/libglabels-sections.txt +++ /dev/null @@ -1,194 +0,0 @@ -
    -db -libglabels/db.h -lglDbRegStatus - -lgl_db_init - -lgl_db_get_paper_id_list -lgl_db_free_paper_id_list -lgl_db_get_paper_name_list -lgl_db_free_paper_name_list -lgl_db_lookup_paper_from_id -lgl_db_lookup_paper_from_name -lgl_db_lookup_paper_id_from_name -lgl_db_lookup_paper_name_from_id -lgl_db_is_paper_id_known -lgl_db_is_paper_id_other - -lgl_db_get_category_id_list -lgl_db_free_category_id_list -lgl_db_get_category_name_list -lgl_db_free_category_name_list -lgl_db_lookup_category_from_id -lgl_db_lookup_category_from_name -lgl_db_lookup_category_id_from_name -lgl_db_lookup_category_name_from_id -lgl_db_is_category_id_known - -lgl_db_get_brand_list -lgl_db_free_brand_list - -lgl_db_register_template -lgl_db_does_template_exist -lgl_db_does_template_name_exist -lgl_db_get_template_name_list_unique -lgl_db_get_template_name_list_all -lgl_db_free_template_name_list -lgl_db_lookup_template_from_name - -lgl_db_print_known_papers -lgl_db_print_known_categories -lgl_db_print_known_templates -lgl_db_print_aliases -
    - -
    -template -libglabels/template.h -lglTemplate - -lglTemplateAlias - -lglTemplateFrameShape -lglTemplateFrame -lglTemplateFrameAll -lglTemplateFrameRect -lglTemplateFrameRound -lglTemplateFrameCD - -lglTemplateLayout - -lglTemplateMarkupType -lglTemplateMarkup -lglTemplateMarkupMargin -lglTemplateMarkupLine -lglTemplateMarkupCircle -lglTemplateMarkupRect - -lglTemplateOrigin - -lgl_template_new -lgl_template_dup -lgl_template_free -lgl_template_add_category -lgl_template_add_frame -lgl_template_add_alias - -lgl_template_get_name -lgl_template_do_templates_match -lgl_template_does_brand_match -lgl_template_does_page_size_match -lgl_template_does_category_match - -lgl_template_alias_new -lgl_template_alias_dup -lgl_template_alias_free - -lgl_template_frame_rect_new -lgl_template_frame_round_new -lgl_template_frame_cd_new -lgl_template_frame_dup -lgl_template_frame_free -lgl_template_frame_add_layout -lgl_template_frame_add_markup - -lgl_template_frame_get_size -lgl_template_frame_get_n_labels -lgl_template_frame_get_origins - -lgl_template_layout_new -lgl_template_layout_dup -lgl_template_layout_free - -lgl_template_markup_margin_new -lgl_template_markup_line_new -lgl_template_markup_circle_new -lgl_template_markup_rect_new -lgl_template_markup_dup -lgl_template_markup_free -
    - -
    -paper -libglabels/paper.h -lglPaper -lgl_paper_new -lgl_paper_dup -lgl_paper_free -
    - -
    -category -libglabels/category.h -lglCategory -lgl_category_new -lgl_category_dup -lgl_category_free -
    - -
    -xml-paper -libglabels/xml-paper.h -lgl_xml_paper_read_papers_from_file -lgl_xml_paper_parse_papers_doc -lgl_xml_paper_parse_paper_node -
    - -
    -xml-category -libglabels/xml-category.h -lgl_xml_category_read_categories_from_file -lgl_xml_category_parse_categories_doc -lgl_xml_category_parse_category_node -
    - -
    -xml-template -libglabels/xml-templates.h -lgl_xml_template_read_templates_from_file -lgl_xml_template_parse_templates_doc -lgl_xml_template_parse_template_node -lgl_xml_template_write_templates_to_file -lgl_xml_template_write_template_to_file -lgl_xml_template_create_template_node -
    - -
    -xml -libglabels/xml.h -LGL_XML_NAME_SPACE - -lgl_xml_get_prop_string -lgl_xml_get_prop_i18n_string -lgl_xml_get_prop_double -lgl_xml_get_prop_boolean -lgl_xml_get_prop_int -lgl_xml_get_prop_uint -lgl_xml_get_prop_length - -lgl_xml_set_prop_string -lgl_xml_set_prop_double -lgl_xml_set_prop_boolean -lgl_xml_set_prop_int -lgl_xml_set_prop_uint_hex -lgl_xml_set_prop_length - -lgl_xml_is_node -lgl_xml_get_node_content - -lgl_xml_set_default_units -
    - -
    -enums -libglabels/enums.h -lglUnitsType -
    - -
    -str -libglabels/str.h -lgl_str_utf8_casecmp -
    - diff --git a/glabels2/docs/libglabels/libglabels-undocumented.txt b/glabels2/docs/libglabels/libglabels-undocumented.txt deleted file mode 100644 index 0c4f3ab3..00000000 --- a/glabels2/docs/libglabels/libglabels-undocumented.txt +++ /dev/null @@ -1,10 +0,0 @@ -99% symbol docs coverage. -141 symbols documented. -1 symbols incomplete. -1 not documented. - - -LGL_XML_NAME_SPACE -lglPaper (pwg_size) - - diff --git a/glabels2/docs/libglabels/libglabels.types b/glabels2/docs/libglabels/libglabels.types deleted file mode 100644 index e69de29b..00000000 diff --git a/glabels2/docs/libglabels/tmpl/category.sgml b/glabels2/docs/libglabels/tmpl/category.sgml deleted file mode 100644 index 2143fd19..00000000 --- a/glabels2/docs/libglabels/tmpl/category.sgml +++ /dev/null @@ -1,55 +0,0 @@ - -The lglCategory Structure - - -Template category definitions - - - -This section describes a structure for representing a category of stationary and related -functions. - - - - - - - - - - - - -This structure defines a category. - - -@id: Category ID. -@name: Localized category name. - - - - - - -@id: -@name: -@Returns: - - - - - - - -@orig: -@Returns: - - - - - - - -@category: - - diff --git a/glabels2/docs/libglabels/tmpl/db.sgml b/glabels2/docs/libglabels/tmpl/db.sgml deleted file mode 100644 index 3d5d2de3..00000000 --- a/glabels2/docs/libglabels/tmpl/db.sgml +++ /dev/null @@ -1,314 +0,0 @@ - -Database - - -Database of pre-defined templates - - - -This section describes a set of functions to locate and add templates and related information in -the LibGlabels template database. - - - - - - - - - - - - -This enumeration defines a set of possible return values for lgl_db_register_template(). - - -@LGL_DB_REG_OK: Registration successful. -@LGL_DB_REG_BAD_PAPER_ID: Registration failed because paper id is unknown. -@LGL_DB_REG_BRAND_PART_EXISTS: Registration failed because template with same brand and part name/number already exists. -@LGL_DB_REG_FILE_WRITE_ERROR: Registration failed because an error while writing to disk. - - - - - - - - - - - - - -@Returns: - - - - - - - -@ids: - - - - - - - -@Returns: - - - - - - - -@names: - - - - - - - -@id: -@Returns: - - - - - - - -@name: -@Returns: - - - - - - - -@name: -@Returns: - - - - - - - -@id: -@Returns: - - - - - - - -@id: -@Returns: - - - - - - - -@id: -@Returns: - - - - - - - -@Returns: - - - - - - - -@ids: - - - - - - - -@Returns: - - - - - - - -@names: - - - - - - - -@id: -@Returns: - - - - - - - -@name: -@Returns: - - - - - - - -@name: -@Returns: - - - - - - - -@id: -@Returns: - - - - - - - -@id: -@Returns: - - - - - - - -@paper_id: -@category_id: -@Returns: - - - - - - - -@brands: - - - - - - - -@template: -@Returns: - - - - - - - -@brand: -@part: -@Returns: - - - - - - - -@name: -@Returns: - - - - - - - -@brand: -@paper_id: -@category_id: -@Returns: - - - - - - - -@brand: -@paper_id: -@category_id: -@Returns: - - - - - - - -@names: - - - - - - - -@name: -@Returns: - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@template: - - diff --git a/glabels2/docs/libglabels/tmpl/enums.sgml b/glabels2/docs/libglabels/tmpl/enums.sgml deleted file mode 100644 index b74f00d1..00000000 --- a/glabels2/docs/libglabels/tmpl/enums.sgml +++ /dev/null @@ -1,33 +0,0 @@ - -Enumerations - - -Common enumerations used by libglabels - - - -This section defines enumerations used to interact with libglabels. - - - - - - - - - - - - -This enumeration defines a set of units of distance supported by the libglabels XML distance -attributes. - - -@LGL_UNITS_POINT: Points. Encoded as "pt" in XML distance attributes. -@LGL_UNITS_INCH: Inches. Encoded as "in" in XML distance attributes. -@LGL_UNITS_MM: Millmeters. Encoded as "mm" in XML distance attributes. -@LGL_UNITS_CM: Centimeters. Encoded as "cm" in XML distance attributes. -@LGL_UNITS_PICA: Picas. Encoded as "pc" in XML distance attributes. -@LGL_UNITS_FIRST: First enumeration. Used for generic iteration through supported units.. -@LGL_UNITS_LAST: Last enumeration. Used for generic iteration through supported units. - diff --git a/glabels2/docs/libglabels/tmpl/libglabels-unused.sgml b/glabels2/docs/libglabels/tmpl/libglabels-unused.sgml deleted file mode 100644 index dc089b42..00000000 --- a/glabels2/docs/libglabels/tmpl/libglabels-unused.sgml +++ /dev/null @@ -1,1519 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -init - - - - - - - - - - - - - - - - - - - - - - - -libglabels - - - - -This section describes a set of functions for constructing new template structures. - - - - - - - - - - -Functions to help create new templates - - - - - - - -Construction Functions - - - - -This section describes a set of functions to locate pre-defined templates and add templates -to the LibGlabels template database. - - - - - - - - - - -Database of pre-defined templates - - - - - - - -Database - - - - -This section describes miscellaneous template functions. - - - - - - - - - - -Miscellaneous template functions - - - - - - - -Miscellaneous Functions - - - - - - - - - - - - - - - - - - - - - - - -template2 - - - - - - - - - - - - - - - - - - - - - - - -template3 - - - - - - - - - - - - - -@id: -@name: - - - - - - -@id: -@name: -@width: -@height: - - - - - - -@name: -@description: -@page_size: -@page_width: -@page_height: -@categories: -@frames: -@aliases: - - - - - - - - - - - - -@shape: -@id: -@layouts: -@markups: - - - - - - -@shape: -@id: -@layouts: -@markups: -@r1: -@r2: -@w: -@h: -@waste: - - - - - - -@shape: -@id: -@layouts: -@markups: -@w: -@h: -@r: -@x_waste: -@y_waste: - - - - - - -@shape: -@id: -@layouts: -@markups: -@r: -@waste: - - - - - - -@GL_TEMPLATE_FRAME_SHAPE_RECT: -@GL_TEMPLATE_FRAME_SHAPE_ROUND: -@GL_TEMPLATE_FRAME_SHAPE_CD: - - - - - - -@GL_TEMPLATE_SHAPE_RECT: -@GL_TEMPLATE_SHAPE_ROUND: -@GL_TEMPLATE_SHAPE_CD: - - - - - - -@id: -@layouts: -@markups: -@shape: - - - - - - -@nx: -@ny: -@x0: -@y0: -@dx: -@dy: - - - - - - - - - - - - -@type: -@x0: -@y0: -@r: - - - - - - -@type: -@x1: -@y1: -@x2: -@y2: - - - - - - -@type: -@size: - - - - - - -@type: -@x1: -@y1: -@w: -@h: -@r: - - - - - - -@GL_TEMPLATE_MARKUP_MARGIN: -@GL_TEMPLATE_MARKUP_LINE: -@GL_TEMPLATE_MARKUP_CIRCLE: -@GL_TEMPLATE_MARKUP_RECT: - - - - - - -@x: -@y: - - - -Enumerations for the units of length supported by libglabels. Internally -all lengths are in points. Externally libglabels supports points ("pt"), -inches ("in"), millimeters ("mm"), centimeters ("cm"), and picas ("pc"). -These units are identical to the absolute length units supported in -the CSS2 Specification (Section 4.3.2). - - -@GL_UNITS_POINT: -@GL_UNITS_INCH: -@GL_UNITS_MM: -@GL_UNITS_CM: -@GL_UNITS_PICA: -@GL_UNITS_FIRST: -@GL_UNITS_LAST: - - - - - - -@orig: -@Returns: - - - - - - -@category: - - - - - - -@names: - - - - - - -@id: -@Returns: - - - - - - -@name: -@Returns: - - - - - - -@Returns: - - - - - - - - - - - - -@name: -@Returns: - - - - - - -@id: -@Returns: - - - - - - -@id: -@name: -@Returns: - - - - - - -@orig: -@Returns: - - - - - - -@paper: - - - - - - -@ids: - - - - - - -@names: - - - - - - -@id: -@Returns: - - - - - - -@name: -@Returns: - - - - - - -@Returns: - - - - - - -@Returns: - - - - - - - - - - - - -@id: -@Returns: - - - - - - -@id: -@Returns: - - - - - - -@name: -@Returns: - - - - - - -@id: -@Returns: - - - - - - -@id: -@name: -@width: -@height: -@Returns: - - - - - - - - - - - - -@template: -@alias: - - - - - - -@template: -@category: - - - - - - -@template: -@frame: - - - - - - -@template: -@label_type: - - - - - - -@frame: -@layout: - - - - - - -@frame: -@markup: - - - - - - -@id: -@r1: -@r2: -@w: -@h: -@waste: -@Returns: - - - - - - -@template: -@category: -@Returns: - - - - - - -@template: -@page_size: -@Returns: - - - - - - -@orig: -@Returns: - - - - - - -@id: -@r1: -@r2: -@w: -@h: -@waste: -@Returns: - - - - - - -@orig_frame: -@Returns: - - - - - - -@frame: - - - - - - -@frame: -@Returns: - - - - - - -@frame: -@Returns: - - - - - - -@frame: -@w: -@h: - - - - - - -@id: -@w: -@h: -@r: -@x_waste: -@y_waste: -@Returns: - - - - - - -@id: -@r: -@waste: -@Returns: - - - - - - -@template: - - - - - - -@names: - - - - - - -@name: -@Returns: - - - - - - -@template: -@Returns: - - - - - - -@template: -@Returns: - - - - - - -@label_type: -@w: -@h: - - - - - - -@label_type: -@Returns: - - - - - - -@page_size: -@Returns: - - - - - - -@page_size: -@category: -@Returns: - - - - - - -@page_size: -@category: -@Returns: - - - - - - -@template: -@Returns: - - - - - - -@label_type: -@Returns: - - - - - - - - - - - - -@orig_ltype: -@Returns: - - - - - - -@ltype: - - - - - - -@orig_layout: -@Returns: - - - - - - -@layout: - - - - - - -@nx: -@ny: -@x0: -@y0: -@dx: -@dy: -@Returns: - - - - - - -@x0: -@y0: -@r: -@Returns: - - - - - - -@orig_markup: -@Returns: - - - - - - -@markup: - - - - - - -@x1: -@y1: -@x2: -@y2: -@Returns: - - - - - - -@size: -@Returns: - - - - - - -@x1: -@y1: -@w: -@h: -@r: -@Returns: - - - - - - -@name: -@description: -@page_size: -@page_width: -@page_height: -@Returns: - - - - - - -@template: - - - - - - - - - - - - -@id: -@w: -@h: -@r: -@x_waste: -@y_waste: -@Returns: - - - - - - -@template: - - - - - - -@id: -@r: -@waste: -@Returns: - - - - - - -@categories_doc: -@Returns: - - - - - - -@category_node: -@Returns: - - - - - - -@utf8_filename: -@Returns: - - - - - - -@node: -@Returns: - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - -@node: -@name: -@Returns: - - - - - - -@paper_node: -@Returns: - - - - - - -@papers_doc: -@Returns: - - - - - - -@utf8_filename: -@Returns: - - - - - - -@units: - - - - - - -@node: -@property: -@val: - - - - - - -@node: -@property: -@val: - - - - - - -@node: -@property: -@val: - - - - - - -@node: -@property: -@val: - - - - - - -@node: -@property: -@val: - - - - - - -@node: -@property: -@val: - - - - - - -@template: -@root: -@ns: - - - - - - -@templates: -@Returns: - - - - - - -@template_node: -@Returns: - - - - - - -@templates_doc: -@Returns: - - - - - - -@utf8_filename: -@Returns: - - - - - - -@template: -@utf8_filename: - - - - - - -@templates: -@utf8_filename: - - - - - - -@ids: - - - - - - -@names: - - - - - - -@id: -@Returns: - - - - - - -@name: -@Returns: - - - - - - -@Returns: - - - - - - -@Returns: - - - - - - - - - - - - -@name: -@Returns: - - - - - - -@id: -@Returns: - - - - - - - - - - - - -@ids: - - - - - - -@names: - - - - - - -@id: -@Returns: - - - - - - -@name: -@Returns: - - - - - - -@Returns: - - - - - - -@Returns: - - - - - - - - - - - - -@id: -@Returns: - - - - - - -@id: -@Returns: - - - - - - -@name: -@Returns: - - - - - - -@id: -@Returns: - - - - - - - - - - - - -@frame: -@layout: - - - - - - -@frame: -@markup: - - - - - - -@brands: - - - - - - -@names: - - - - - - -@name: -@Returns: - - - - - - -@page_size: -@category: -@Returns: - - - - - - -@template: -@Returns: - - - - - - -@brand: -@page_size: -@category: -@Returns: - - - - - - -@brand: -@page_size: -@category: -@Returns: - - - - - - - - - - - - -@template: - - - - - - - - - - - - -@template: - - - - - - -@templates: -@Returns: - diff --git a/glabels2/docs/libglabels/tmpl/libglabels.sgml b/glabels2/docs/libglabels/tmpl/libglabels.sgml deleted file mode 100644 index 0552a20b..00000000 --- a/glabels2/docs/libglabels/tmpl/libglabels.sgml +++ /dev/null @@ -1,19 +0,0 @@ - -libglabels - - - - - - - - - - - - - - - - - diff --git a/glabels2/docs/libglabels/tmpl/paper.sgml b/glabels2/docs/libglabels/tmpl/paper.sgml deleted file mode 100644 index fab9ee67..00000000 --- a/glabels2/docs/libglabels/tmpl/paper.sgml +++ /dev/null @@ -1,61 +0,0 @@ - -The lglPaper Structure - - -Paper size definitions - - - -This section describes a structure for representing a paper size definition -and related functions. - - - - - - - - - - - - -This structure defines a paper (page) size. - - -@id: Paper size ID. -@name: Localized paper size name. -@width: Width of paper in points. -@height: Height of paper in points. -@pwg_size: - - - - - - -@id: -@name: -@width: -@height: -@pwg_size: -@Returns: - - - - - - - -@orig: -@Returns: - - - - - - - -@paper: - - diff --git a/glabels2/docs/libglabels/tmpl/str.sgml b/glabels2/docs/libglabels/tmpl/str.sgml deleted file mode 100644 index 53cbd3b9..00000000 --- a/glabels2/docs/libglabels/tmpl/str.sgml +++ /dev/null @@ -1,30 +0,0 @@ - -String Utility Functions - - -String utility functions provided by libglabels - - - -This section defines string utility functions used by libglabels and of -possible use to a user of libglabels. - - - - - - - - - - - - - - - -@s1: -@s2: -@Returns: - - diff --git a/glabels2/docs/libglabels/tmpl/template.sgml b/glabels2/docs/libglabels/tmpl/template.sgml deleted file mode 100644 index e7a58879..00000000 --- a/glabels2/docs/libglabels/tmpl/template.sgml +++ /dev/null @@ -1,532 +0,0 @@ - -The lglTemplate Structure - - -How templates are represented in memory - - - -This section describes a set of structures that represent a template in memory. It also -describes functions to help create and interpret these structures. - - - - - - - - - - - - -This is the main structure of a libglabels template. A template represents a single sheet -of peel-off labels or cards. - - -@brand: Brand name of label or card. E.g. "Avery." -@part: Part name or number of label or card. E.g. "8160." -@description: A description of the template. E.g. "Mailing labels." -@paper_id: A paper ID. E.g. "A4" or "US-Letter." -@page_width: Page width in points. Used only if paper_id is "Other." -@page_height: Page height in points. Used only if paper_id is "Other." -@aliases: A list of alternate names for this template. Often a single template can be used for -multiple products. -@category_ids: A list of category IDs that this template belongs to. -@frames: A list of (#lglTemplateFrame *) structures. GLabels currently only supports one frame -per template -- future versions may support multiple frames per template. - - - -This structure defines an alias for the parent template structure. An alias is used for -different products that can use the same template. - - -@brand: Brand name of label or card. E.g. "Avery." -@part: Part name or number of label or card. E.g. "8160." - - - -This enumeration defines frame types that are supported by libglabels - - -@LGL_TEMPLATE_FRAME_SHAPE_RECT: A rectangular frame. (May have rounded corners.) -@LGL_TEMPLATE_FRAME_SHAPE_ROUND: A round frame. -@LGL_TEMPLATE_FRAME_SHAPE_CD: A CD or DVD frame. (Includes credit-card style CDs.) - - - -A union of all possible frame structures. The type of structure is indicated by the shape -member, which overlays the first field of all other member structures. - - - - - -This structure is composed of a set of fields common to all frame structures. All frame types -can be cast to this structure. - - -@shape: The shape of the frame. -@id: Reserved for future use. Should always be zero. -@layouts: A list of (#lglTemplateLayout *) structures. Typically a frame will have a single -layout, representing a simple grid of labels or cards. If the layout of labels or cards is -more complex, multiple (#lglTemplateLayout *) structures may be needed. -@markups: A list of (#lglTemplateMarkup *) structures, which represent non-printing markup lines. - - - -This structure defines the frame for a rectangular label or card. - - -@shape: Common field. Always #LGL_TEMPLATE_FRAME_SHAPE_RECT for #lglTemplateFrameRect. -@id: Common field. See #lglTemplateFrameAll. -@layouts: Common field. See #lglTemplateFrameAll. -@markups: Common field. See #lglTemplateFrameAll. -@w: Width of label or card in points. -@h: Height of label or card in points. -@r: Radius of corners in points. -@x_waste: Amount of horizontal over-print to allow in points. -@y_waste: Amount of vertical over-print to allow in points. - - - -This structure defines the frame for a round label or card. - - -@shape: Common field. Always #LGL_TEMPLATE_FRAME_SHAPE_ROUND for #lglTemplateFrameRound. -@id: Common field. See #lglTemplateFrameAll. -@layouts: Common field. See #lglTemplateFrameAll. -@markups: Common field. See #lglTemplateFrameAll. -@r: Radius of label or card in points. -@waste: Amount of over-print to allow in points. - - - -This structure defines the frame for a CD or DVD label. This structure also supports -credit-card CD labels. - - -@shape: Common field. Always #LGL_TEMPLATE_FRAME_SHAPE_CD for #lglTemplateFrameCD. -@id: Common field. See #lglTemplateFrameAll. -@layouts: Common field. See #lglTemplateFrameAll. -@markups: Common field. See #lglTemplateFrameAll. -@r1: Outer radius of label in points. -@r2: Radius of center hole in points. -@w: Clip width in points. Used for credit-card CD labels. This field is ignored if zero. -@h: Clip height in points. Used for credit-card CD labels. This field is ignored if zero. -@waste: Amount of over-print to allow in points. - - - -This structure defines a simple grid layout of labels or cards. - - -@nx: Number of labels or cards across in the grid (horizontal). -@ny: Number of labels or cards down in the grid (vertical). -@x0: Distance (in points) from the left edge of page to the left edge of the left column of -cards or labels in the layout. -@y0: Distance (in points) from the top edge of page to the top edge of the top row of -cards or labels in the layout. -@dx: Horizontal pitch of grid in points. This is the distance from left edge to left edge -(not the gap between labels or cards). -@dy: Vertical pitch of grid in points. This is the distance from top edge to top edge -(not the gap between labels or cards). - - - -This enumeration defines markup types that are supported by libglabels - - -@LGL_TEMPLATE_MARKUP_MARGIN: A margin line around perimeter of label or card. -@LGL_TEMPLATE_MARKUP_LINE: A simple line segment. -@LGL_TEMPLATE_MARKUP_CIRCLE: A circle. -@LGL_TEMPLATE_MARKUP_RECT: A rectangle. Possibly with rounded corners. - - - -A union of all possible markup structures. The type of structure is indicated by the type -member, which overlays the first field of all other member structures. - - - - - -This structure defines a simple margin markup around the perimeter of a label or card. - - -@type: Common field. Always #LGL_TEMPLATE_MARKUP_MARGIN for #lglTemplateMarkupMargin. -@size: Distance of margin from edge of label or card. - - - -This structure defines a simple line segment markup. - - -@type: Common field. Always #LGL_TEMPLATE_MARKUP_LINE for #lglTemplateMarkupLine. -@x1: Distance (in points) of first endpoint from left edge of label or card. -@y1: Distance (in points) of first endpoint from top edge of label or card. -@x2: Distance (in points) of second endpoint from left edge of label or card. -@y2: Distance (in points) of second endpoint from top edge of label or card. - - - -This structure defines a simple circle markup. - - -@type: Common field. Always #LGL_TEMPLATE_MARKUP_CIRCLE for #lglTemplateMarkupCircle. -@x0: Distance (in points) of vertex from left edge of label or card. -@y0: Distance (in points) of vertex from top edge of label or card. -@r: Radius of circle in points. - - - -This structure defines a simple rectangle markup. The rectangle can have rounded corners. - - -@type: Common field. Always #LGL_TEMPLATE_MARKUP_RECT for #lglTemplateMarkupRect. -@x1: Distance (in points) of left edge of markup from left edge of label or card. -@y1: Distance (in points) of top edge of markup from top edge of label or card. -@w: Width of rectangle in points. -@h: Height of rectangle in points. -@r: Radius of corners in points. Should be zero for sharp corners. - - - -This structure represents the cartesian coordinates of the origin of a label or card on the page. -The orign is the upper left corner of the extent of the label or card. These coordinates are -relative to the upper left corner of the page. - - -@x: Distance in points from top edge of page. -@y: Distance in points from left edge of page. - - - - - - -@brand: -@part: -@description: -@paper_id: -@page_width: -@page_height: -@Returns: - - - - - - - -@orig_template: -@Returns: - - - - - - - -@template: - - - - - - - -@template: -@category_id: - - - - - - - -@template: -@frame: - - - - - - - -@template: -@alias: - - - - - - - -@template: -@Returns: - - - - - - - -@template1: -@template2: -@Returns: - - - - - - - -@template: -@brand: -@Returns: - - - - - - - -@template: -@paper_id: -@Returns: - - - - - - - -@template: -@category_id: -@Returns: - - - - - - - -@brand: -@part: -@Returns: - - - - - - - -@orig_alias: -@Returns: - - - - - - - -@alias: - - - - - - - -@id: -@w: -@h: -@r: -@x_waste: -@y_waste: -@Returns: - - - - - - - -@id: -@r: -@waste: -@Returns: - - - - - - - -@id: -@r1: -@r2: -@w: -@h: -@waste: -@Returns: - - - - - - - -@orig_frame: -@Returns: - - - - - - - -@frame: - - - - - - - -@frame: -@layout: - - - - - - - -@frame: -@markup: - - - - - - - -@frame: -@w: -@h: - - - - - - - -@frame: -@Returns: - - - - - - - -@frame: -@Returns: - - - - - - - -@nx: -@ny: -@x0: -@y0: -@dx: -@dy: -@Returns: - - - - - - - -@orig_layout: -@Returns: - - - - - - - -@layout: - - - - - - - -@size: -@Returns: - - - - - - - -@x1: -@y1: -@x2: -@y2: -@Returns: - - - - - - - -@x0: -@y0: -@r: -@Returns: - - - - - - - -@x1: -@y1: -@w: -@h: -@r: -@Returns: - - - - - - - -@orig_markup: -@Returns: - - - - - - - -@markup: - - diff --git a/glabels2/docs/libglabels/tmpl/xml-category.sgml b/glabels2/docs/libglabels/tmpl/xml-category.sgml deleted file mode 100644 index f22b59ed..00000000 --- a/glabels2/docs/libglabels/tmpl/xml-category.sgml +++ /dev/null @@ -1,47 +0,0 @@ - -XML Category Functions - - -Functions to parse glabels XML category definition files - - - -This section describes a number of functions for parsing glabels -XML category definition files. - - - - - - - - - - - - - - - -@utf8_filename: -@Returns: - - - - - - - -@categories_doc: -@Returns: - - - - - - - -@category_node: -@Returns: - - diff --git a/glabels2/docs/libglabels/tmpl/xml-paper.sgml b/glabels2/docs/libglabels/tmpl/xml-paper.sgml deleted file mode 100644 index 0909d2cf..00000000 --- a/glabels2/docs/libglabels/tmpl/xml-paper.sgml +++ /dev/null @@ -1,47 +0,0 @@ - -XML Paper Functions - - -Functions to parse glabels XML paper definition files - - - -This section describes a number of functions for parsing glabels -XML paper definition files. - - - - - - - - - - - - - - - -@utf8_filename: -@Returns: - - - - - - - -@papers_doc: -@Returns: - - - - - - - -@paper_node: -@Returns: - - diff --git a/glabels2/docs/libglabels/tmpl/xml-template.sgml b/glabels2/docs/libglabels/tmpl/xml-template.sgml deleted file mode 100644 index 071a08ab..00000000 --- a/glabels2/docs/libglabels/tmpl/xml-template.sgml +++ /dev/null @@ -1,78 +0,0 @@ - -XML Template Functions - - -Functions to create and parse glabels XML template nodes and files - - - -This section describes a number of functions for creating and parsing -glabels XML template nodes and files. Template nodes are used in both -template files and document files. - - - - - - - - - - - - - - - -@utf8_filename: -@Returns: - - - - - - - -@templates_doc: -@Returns: - - - - - - - -@template_node: -@Returns: - - - - - - - -@templates: -@utf8_filename: -@Returns: - - - - - - - -@template: -@utf8_filename: -@Returns: - - - - - - - -@template: -@root: -@ns: - - diff --git a/glabels2/docs/libglabels/tmpl/xml.sgml b/glabels2/docs/libglabels/tmpl/xml.sgml deleted file mode 100644 index e0803379..00000000 --- a/glabels2/docs/libglabels/tmpl/xml.sgml +++ /dev/null @@ -1,194 +0,0 @@ - -XML Helper Functions - - -Functions to help format and parse glabels XML properties - - - -This section describes a number of "helper" functions for formatting and -parsing various types of properties for tags in glabels XML file formats. - - -These functions are basically wrappers to functions from libxml2. - - - - - - - - - - - - - - - - - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - - -@node: -@property: -@default_val: -@Returns: - - - - - - - -@node: -@property: -@val: - - - - - - - -@node: -@property: -@val: - - - - - - - -@node: -@property: -@val: - - - - - - - -@node: -@property: -@val: - - - - - - - -@node: -@property: -@val: - - - - - - - -@node: -@property: -@val: - - - - - - - -@node: -@name: -@Returns: - - - - - - - -@node: -@Returns: - - - - - - - -@units: - - diff --git a/glabels2/glabels.spec.in b/glabels2/glabels.spec.in deleted file mode 100644 index 6050b0d6..00000000 --- a/glabels2/glabels.spec.in +++ /dev/null @@ -1,106 +0,0 @@ -Summary: glabels is a GNOME program to create labels and business cards -Name: glabels -Version: @VERSION@ -Release: 1 -License: GPL -Group: Applications/Publishing -URL: http://glabels.sourceforge.net/ - -Source: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/root-%{name}-%{version} -Prefix: %{_prefix} - -BuildRequires: gtk2-devel >= @GTK_REQUIRED@ -BuildRequires: libxml2-devel >= @LIBXML_REQUIRED@ -BuildRequires: libgnomeui-devel >= @LIBGNOMEUI_REQUIRED@ -BuildRequires: libglade2-devel >= @LIBGLADE_REQUIRED@ - -Requires: gtk2 >= @GTK_REQUIRED@ -Requires: libxml2 >= @LIBXML_REQUIRED@ -Requires: libgnomeui >= @LIBGNOMEUI_REQUIRED@ -Requires: libglade2 >= @LIBGLADE_REQUIRED@ - -%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 -%configure -%{__make} %{?_smp_mflags} - -%install -%{__rm} -rf %{buildroot} -%makeinstall -%find_lang %{name} - -desktop-file-install --vendor gnome --delete-original \ - --add-category X-Red-Hat-Base \ - --dir %{buildroot}%{_datadir}/applications \ - %{buildroot}%{_datadir}/applications/%{name}.desktop - -%{__rm} -rf %{buildroot}/var/scrollkeeper -%{__rm} -f %{buildroot}%{_datadir}/mime/XMLnamespaces -%{__rm} -f %{buildroot}%{_datadir}/mime/globs -%{__rm} -f %{buildroot}%{_datadir}/mime/magic -%{__rm} -f %{buildroot}%{_datadir}/mime/mime.cache -%{__rm} -rf %{buildroot}%{_datadir}/mime/application -%{__rm} -rf %{buildroot}%{_datadir}/mime/aliases -%{__rm} -rf %{buildroot}%{_datadir}/mime/subclasses - - -%clean -%{__rm} -rf %{buildroot} - -%post -scrollkeeper-update -if (update-mime-database -v &> /dev/null); then - update-mime-database "%{_datadir}/mime" > /dev/null -fi - -%postun -scrollkeeper-update -if (update-mime-database -v &> /dev/null); then - update-mime-database "%{_datadir}/mime" > /dev/null -fi - -%files -f %{name}.lang -%defattr(-, root, root) -%doc README COPYING.README_FIRST COPYING COPYING-DOCS COPYING-LIBGLABELS ChangeLog NEWS AUTHORS INSTALL -%doc %{_datadir}/gnome/help/glabels/ -%{_bindir}/glabels -%{_bindir}/glabels-batch -%{_libdir}/libglabels.* -%{_libdir}/pkgconfig/libglabels.pc -%{_includedir}/libglabels/* -%{_datadir}/glabels/ -%{_datadir}/pixmaps/* -%{_datadir}/omf/ -%{_datadir}/applications/*.desktop -%{_datadir}/application-registry/* -%{_datadir}/mime-info/* -%{_datadir}/mime/packages/* -%{_datadir}/man/* -%{_datadir}/gtk-doc/html/libglabels/* - -%changelog -* Sun Aug 8 2004 Jim Evins -- Added support for freedesktop.org mime database registration - -* Sat Feb 21 2004 Jim Evins -- Added libglabels related files - -* Tue Dec 23 2003 Jim Evins -- Added support for scrollkeeper - -* Sat Oct 18 2003 Jim Evins -- Updated, based largely on Dag Wieers glabels.spec - -* Sat May 19 2001 Jim Evins -- Created - diff --git a/glabels2/gtk-doc.make b/glabels2/gtk-doc.make deleted file mode 100644 index 0f87cc79..00000000 --- a/glabels2/gtk-doc.make +++ /dev/null @@ -1,196 +0,0 @@ -# -*- mode: makefile -*- - -#################################### -# Everything below here is generic # -#################################### - -if GTK_DOC_USE_LIBTOOL -GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -GTKDOC_RUN = $(LIBTOOL) --mode=execute -else -GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -GTKDOC_RUN = sh -c -endif - -# We set GPATH here; this gives us semantics for GNU make -# which are more like other make's VPATH, when it comes to -# whether a source that is a target of one rule is then -# searched for in VPATH/GPATH. -# -GPATH = $(srcdir) - -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) - -EXTRA_DIST = \ - $(content_files) \ - $(HTML_IMAGES) \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-overrides.txt - -DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ - $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp - -SCANOBJ_FILES = \ - $(DOC_MODULE).args \ - $(DOC_MODULE).hierarchy \ - $(DOC_MODULE).interfaces \ - $(DOC_MODULE).prerequisites \ - $(DOC_MODULE).signals - -REPORT_FILES = \ - $(DOC_MODULE)-undocumented.txt \ - $(DOC_MODULE)-undeclared.txt \ - $(DOC_MODULE)-unused.txt - -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) - -if ENABLE_GTK_DOC -all-local: html-build.stamp -else -all-local: -endif - -docs: html-build.stamp - -$(REPORT_FILES): sgml-build.stamp - -#### scan #### - -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - @echo 'gtk-doc: Scanning header files' - @-chmod -R u+w $(srcdir) - cd $(srcdir) && \ - gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) - if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ - else \ - cd $(srcdir) ; \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ - fi - touch scan-build.stamp - -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp - @true - -#### templates #### - -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - @echo 'gtk-doc: Rebuilding template files' - @-chmod -R u+w $(srcdir) - cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -tmpl/*.sgml: - @true - - -#### xml #### - -sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - @echo 'gtk-doc: Building XML' - @-chmod -R u+w $(srcdir) - cd $(srcdir) && \ - gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) - touch sgml-build.stamp - -sgml.stamp: sgml-build.stamp - @true - -#### html #### - -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building HTML' - @-chmod -R u+w $(srcdir) - rm -rf $(srcdir)/html - mkdir $(srcdir)/html - mkhtml_options=""; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$(?)" = "0"; then \ - mkhtml_options=--path="$(srcdir)"; \ - fi - cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) - @echo 'gtk-doc: Fixing cross-references' - cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - touch html-build.stamp - -############## - -clean-local: - rm -f *~ *.bak - rm -rf .libs - -distclean-local: - cd $(srcdir) && \ - rm -rf xml $(REPORT_FILES) \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - -maintainer-clean-local: clean - cd $(srcdir) && rm -rf xml html - -install-data-local: - installfiles=`echo $(srcdir)/html/*`; \ - if test "$$installfiles" = '$(srcdir)/html/*'; \ - then echo '-- Nothing to install' ; \ - else \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - $(mkinstalldirs) $${installdir} ; \ - for i in $$installfiles; do \ - echo '-- Installing '$$i ; \ - $(INSTALL_DATA) $$i $${installdir}; \ - done; \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - mv -f $${installdir}/$(DOC_MODULE).devhelp \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ - fi; \ - ! which gtkdoc-rebase >/dev/null 2>&1 || \ - gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ - fi - -uninstall-local: - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - rm -rf $${installdir} - -# -# Require gtk-doc when making dist -# -if ENABLE_GTK_DOC -dist-check-gtkdoc: -else -dist-check-gtkdoc: - @echo "*** gtk-doc must be installed and enabled in order to make dist" - @false -endif - -dist-hook: dist-check-gtkdoc dist-hook-local - mkdir $(distdir)/tmpl - mkdir $(distdir)/xml - mkdir $(distdir)/html - -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl - -cp $(srcdir)/xml/*.xml $(distdir)/xml - cp $(srcdir)/html/* $(distdir)/html - -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ - cd $(distdir) && rm -f $(DISTCLEANFILES) - ! which gtkdoc-rebase >/dev/null 2>&1 || \ - gtkdoc-rebase --online --relative --html-dir=$(distdir)/html - -.PHONY : dist-hook-local docs diff --git a/glabels2/help/C/figures/glabels-template-cd.png b/glabels2/help/C/figures/glabels-template-cd.png deleted file mode 100644 index 0a3de3bf..00000000 Binary files a/glabels2/help/C/figures/glabels-template-cd.png and /dev/null differ diff --git a/glabels2/help/C/figures/glabels-template-label.png b/glabels2/help/C/figures/glabels-template-label.png deleted file mode 100644 index 87a724b9..00000000 Binary files a/glabels2/help/C/figures/glabels-template-label.png and /dev/null differ diff --git a/glabels2/help/C/figures/glabels-template-layout.png b/glabels2/help/C/figures/glabels-template-layout.png deleted file mode 100644 index c7127952..00000000 Binary files a/glabels2/help/C/figures/glabels-template-layout.png and /dev/null differ diff --git a/glabels2/help/C/figures/main-window-empty.png b/glabels2/help/C/figures/main-window-empty.png deleted file mode 100644 index 305bd609..00000000 Binary files a/glabels2/help/C/figures/main-window-empty.png and /dev/null differ diff --git a/glabels2/help/C/figures/merge-ex1-1.png b/glabels2/help/C/figures/merge-ex1-1.png deleted file mode 100644 index f8673c1d..00000000 Binary files a/glabels2/help/C/figures/merge-ex1-1.png and /dev/null differ diff --git a/glabels2/help/C/figures/merge-ex1-2.png b/glabels2/help/C/figures/merge-ex1-2.png deleted file mode 100644 index a87675aa..00000000 Binary files a/glabels2/help/C/figures/merge-ex1-2.png and /dev/null differ diff --git a/glabels2/help/C/figures/merge-ex1-3.png b/glabels2/help/C/figures/merge-ex1-3.png deleted file mode 100644 index f31ecafe..00000000 Binary files a/glabels2/help/C/figures/merge-ex1-3.png and /dev/null differ diff --git a/glabels2/help/C/figures/merge-ex1-4.png b/glabels2/help/C/figures/merge-ex1-4.png deleted file mode 100644 index 71e11864..00000000 Binary files a/glabels2/help/C/figures/merge-ex1-4.png and /dev/null differ diff --git a/glabels2/help/C/figures/merge-ex2-1.png b/glabels2/help/C/figures/merge-ex2-1.png deleted file mode 100644 index 1c64ed76..00000000 Binary files a/glabels2/help/C/figures/merge-ex2-1.png and /dev/null differ diff --git a/glabels2/help/C/figures/merge-ex2-2.png b/glabels2/help/C/figures/merge-ex2-2.png deleted file mode 100644 index e1d8f2af..00000000 Binary files a/glabels2/help/C/figures/merge-ex2-2.png and /dev/null differ diff --git a/glabels2/help/C/figures/merge-ex2-3.png b/glabels2/help/C/figures/merge-ex2-3.png deleted file mode 100644 index baac803a..00000000 Binary files a/glabels2/help/C/figures/merge-ex2-3.png and /dev/null differ diff --git a/glabels2/help/C/figures/merge-ex2-4.png b/glabels2/help/C/figures/merge-ex2-4.png deleted file mode 100644 index 62d750c6..00000000 Binary files a/glabels2/help/C/figures/merge-ex2-4.png and /dev/null differ diff --git a/glabels2/help/C/figures/object-editor-sidebar.png b/glabels2/help/C/figures/object-editor-sidebar.png deleted file mode 100644 index f0624a26..00000000 Binary files a/glabels2/help/C/figures/object-editor-sidebar.png and /dev/null differ diff --git a/glabels2/help/C/figures/print-copies.png b/glabels2/help/C/figures/print-copies.png deleted file mode 100644 index d34d03c9..00000000 Binary files a/glabels2/help/C/figures/print-copies.png and /dev/null differ diff --git a/glabels2/help/C/figures/print-merge.png b/glabels2/help/C/figures/print-merge.png deleted file mode 100644 index de654d09..00000000 Binary files a/glabels2/help/C/figures/print-merge.png and /dev/null differ diff --git a/glabels2/help/C/glabels.xml b/glabels2/help/C/glabels.xml deleted file mode 100644 index e74eb322..00000000 --- a/glabels2/help/C/glabels.xml +++ /dev/null @@ -1,2127 +0,0 @@ - - - - - - gLabels"> - -]> - - - - - -
    - - - - &app; Manual V&manrevision; - - - User manual for the gLabels label and business card creation program - - - - 2003-2007 - Jim Evins - - - Jim Evins - - - &legal; - - - - - Jim - Evins - - - - - - - - - - - - - - - - - - - - - gLabels Manual V&manrevision; - &date; - - Jim Evins - evins@snaught.com - - Jim Evins - - - - - This manual describes version &appversion; of gLabels. - - - Feedback - To report a bug or make a suggestion regarding the &app; application or - this manual, follow the directions in the gLabels Contact Page. - - - - - - - gLabels - - - glabels - - - - - - - - - - Introduction - - The &app; application 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. - - - - - - - - - - - Getting Started - - - To Start &app; - You can start &app; in the following ways: - - - - Applications menu - - Choose - - Office - gLabels - . - - - - Command line - - Type glabels, - then press Return: - - - - - - - When You Start &app; - When you start &app;, the following window is displayed. - - -
    - &app; Start Up Window - - - - - - -
    - - - - - - The &app; window contains the following elements: - - - - Menubar. - - The menus on the menubar contain all of the commands you - need to create and edit labels and business cards in - &app;. - - - - Main toolbar. - - The main toolbar contains a subset of common File and Edit - commands that you can access from the menubar. - - - - Drawing toolbar. - - The drawing toolbar contains a subset of commands for - editing the current glabels document. - - - - Display area. - - The display area is the main drawing interface to - &app;. - - - - Object sidebar. - - The object sidebar provides an interface for viewing and - editing all properties of an individual object. - - - - Properties toolbar. - - The properties toolbar contains a set of tools to - manipulate the properties of selected objects and set default - properties for new objects. - - - - Statusbar. - - The statusbar displays information about current - &app; activity and contextual - information about the menu items. - - - -
    -
    - - - - - - - - Usage - - - - To Create a New Label or Card - - To create a new label or business card, choose - File New - - to display the New Label or Card dialog. Select - the media type and orientation for the new document, - then click OK. A new document is - displayed in the display area of the &app; - window. - - If your particular media type is missing from this dialog, - see - - - - - - To Open a File - - To open a file, choose - File Open - to display the Open File dialog. - Select the file that you want to open, then click - OK. The file is displayed in the display area - of the &app; window. - - You can also open multiple files in - &app;. The application creates a separate - application window for each open file. - - The application records the paths and filenames of the - most recent files that you have edited and displays the files as menu - items on the - FileRecent Files - menu. - - - - - - To Open Multiple Files from a Command Line - - You can run &app; from a command line - and open a single file or multiple files. To open multiple files from - a command line, type the following command, then press - Return: - - glabels - file1.glabels file2.glabels file3.glabels - - - When the application starts, the files that you specify are - displayed in separate &app; windows. - - - - - - To Save a File - - You can save files in the following ways: - - - - - To save changes to an existing file, choose - File - Save . - - - - - To save a new file or to save an existing file under a new - filename, choose File - Save As . Enter a name - for the file in the Save As dialog box, - then click OK. - - - - - - - - - To Change Label Properties - - To change the media type and/or orientation of a label, choose - File - Properties to display the - Label properties dialog. Select the - new media type and orientation for the document, then click - OK. - - - - - - To Create a Custom Template - - To create a new custom template, choose - File - Template Designer ... - to display the Template Designer dialog. - This dialog will assist you in creating a custom template for - most types of label or card stationery that you may encounter. - - If you prefer, you can create your templates manually. - For this option see - - - - - - - To Close a File - - To close the current document, choose - File - Close to close the application - window. If the current document is modified, a confirmation dialog - will be presented, allowing you to save the document or cancel - the command. If the window being closed is the only open window, - &app; will exit. - - - - - - To Quit <application>&app;</application> - - To quit &app;, choose - File - Quit . This is equivalent - to closing all open windows. See - . - - - - - - To Print Labels or Cards - - To print labels or cards, choose - File Print - to display the Print dialog. - Once print options have been selected, click Print - to print the labels or cards. To simply preview the results, - click Print Preview instead. - - The Print dialog allows you to specify the - following print options: - - - The Labels Tab of the Print Dialog - - - - - Print control (Simple) - - - For simple labels or cards (no document merge), the job - tabbed section contains the following copy controls. - - - - - - The number of copies of the label can be selected by - choosing the number of full sheets to print, or a specific - subset of labels on a single sheet. - - The mini-preview can also be used to graphically select - the subset of labels by clicking the first label on the - mini-preview and dragging to the last label. - - - - - - Print control (Merge) - - - For labels or cards using the document merge (also known - as "mail merge") capability, the job tabbed section contains - the following merge controls instead of copy controls. - - - - - - The total number of labels or cards printed is the - product of the number of records in the merge source and - the number of copies selected. If multiple copies are - selected, these can be either collated (copies of the - same record grouped together) or un-collated (one copy - each record is printed before next copy). - - Printing can begin on any label on the first sheet. - This can be selected with the Start on - label spinbutton. - - The mini-preview can also be used to graphically select - this first label, by clicking on the desired label in the - mini-preview. - - - - - Options - - The following options can also be selected. - - - print outlines - Print outlines of labels. This option is useful for - dry-runs, to test printer alignment. - - - print in reverse - Prints the labels as mirror images. This option is - useful for printing on clear labels that will be viewed - from the reverse side (e.g. in a car window). - - - print crop marks - Prints crop marks along the edge of the sheet. - This option is useful for printing on blank stock, to - be cut after printing. This option does not work well - with all templates. - - - - - - - - - - - - To Create New Objects - - Objects are created by choosing the appropriate selection under - the Objects - Create Object submenu or - the Drawing Toolbar. This will place the - display area into object creation mode as indicated by its cursor. - To return to the default object selection mode without creating - an object, choose Objects - Select Mode . This will - return the display area's cursor to the default selection arrow. - - The following describes the object creation mode for each object - type: - - - - - Text - - Click the desired location of the upper left corner of the - text object. New text objects are initialized with the - string "Text." To change this text, or other properties, see - . - - - - - Box - - Click the desired location of the upper left corner of the - box object and drag to the desired location of the lower right - corner. If you simply click in a single location, a square - box will be created. To change properties of the box object, see - . - - - - - Line - - Click the desired location of one end of the - line object and drag to the desired location of the other end. - If you simply click in a single location, a diagonal line - will be created. To change properties of the line object, see - . - - - - - Ellipse - - Click the desired location of the upper left corner of the - ellipse object and drag to the desired location of the lower - right corner. If you simply click in a single location, a circle - will be created. To change properties of the ellipse object, see - . - - - - - Image - - Click the desired location of the upper left corner of the - image object and drag to the desired location of the lower - right corner. If you simply click in a single location, a square - will be created. New image objects are initialized with a - simple checkerboard image. To change this image, or other - properties of the image object, see - . - - - - - Barcode - - Click the desired location of the upper left corner of the - barcode object. New barcode objects are initialized to a - POSTNET barcode with representative data. To change data - and properties of the barcode object, see - . - - - - - - - - - - - To Select Objects - - A prerequisite for performing operations on objects is the - selection of individual objects or groups of objects. The - display area must be in the object selection mode to create new - selections, as indicated by an arrow cursor. The object - selection mode is selected by the - Objects - Select Mode menu item, - or the corresponding command on the Drawing - Toolbar. - - - - - Selecting a single object - - A single object can be selected simply by clicking - on the desired object in the display area. - Once selected the object will be highlighted with a set of - resizing handles. - - - - - Aggregate object selections - - Multiple objects can be selected by first selecting the first - object as above and then by holding the Ctrl - key while selecting additional objects. - Individual objects can be added to an existing selection - at any time by holding the Ctrl key while - selecting the desired objects. All objects can also be - selected by using the Edit - Select All - menu item. All objects in an aggregate object selection will be - highlighted. - - - - - Area selections - - Multiple objects can also be selected by clicking an empty - area and dragging to form a rectangular area. When released, - all objects contained in the area will form an aggregate - selection. An area selection can be used to add to an existing - selection by holding the Ctrl key while - performing the selection. - - - - - Unselecting objects - - Individual objects can be removed from an existing - selection by holding the Ctrl key while - clicking on a previously selected object. An entire selection - can be dismissed by using the - Edit Un-select All - menu item - or by simply clicking any empty space in the display area. - Once an object is unselected its highlight is removed. - - - - - - - - - - Clipboard Commands - - Object selections can be manipulated using the standard clipboard - operations Cut, - Copy, Paste, - and Delete. - - - - - - - - CtrlX - - Cut - - - - Moves selected objects to the clipboard. The objects are - then available for pasting back into the current document or - another document. - - - - - - - - CtrlC - - Copy - - - - Copies selected objects to the clipboard without deleting - them. The objects are then available for pasting back into - the current document or another document. - - - - - - - - CtrlV - - Paste - - - - Pastes objects from the clipboard into the current document. - &app; can only paste objects from - another &app; document. - - - - - - - - Delete - - Delete - - - - Deletes selected objects without placing them on the - clipboard. - - - - - - - - - - To Edit Object Properties - - Most object properties can be modified through the object - editor sidebar, illustrated below. To use the object editor, - a single object must first be selected. See - . - - -
    - Object Editor Sidebar - - - - - - -
    - - - The object editor will contain a subset of the following - tabbed sections, depending on object type: - - - Text Tabbed Section (Text objects) - - This section contains a small editor for changing the content - of a text object. It also contains a dropdown menu of available - document merge keys, that can be inserted into text. - - - - - Image Tabbed Section (Image objecs) - - This section contains a file entry with preview to select - image files. The browse button can be used to easily locate - image files. Alternatively, a document merge key can be used - instead to provide a filename at print time. - - - - - Data Tabbed Section (Barcode objecs) - - This section contains a text entry to enter literal barcode - data. Alternatively, a document merge key can be used to - provide this data at print time. - - - - - Style Tabbed Section (Text objects) - - This section contains controls to select text properties, - including font family, font size, font weight, color, and - text justification. - - - - - Style Tabbed Section (Barcode objecs) - - This section contains controls to select barcode properties, - including barcode style, color, whether to print text, and whether - to include a checksum digit. - - - - - Line Tabbed Section - - This section contains controls to select properties of lines - and outlines. These properties include line width and color. - - - - - Fill Tabbed Section - - This section contains controls to select fill properties of box - and ellipse objects. Currently the only fill property is fill - color. - - - - - Size Tabbed Section (All except line objects) - - This section contains controls to select the width and height - of an object. A checkbox is provided, so that the current aspect - ratio can be locked while manipulating the width and height controls. - Image objects also provide a button to reset the size to the - image's natural size (Assumes 72DPI). - - - - - Size Tabbed Section (Line objects) - - This section contains controls to select the length and angle - of a line object. - - - - - Position Tabbed Section - - This section contains controls to change the position of an - object. - - - - - - Shadow Tabbed Section (All except image and barcode objects) - - This section contains controls to add a shadow to an object. - - - - -
    - - - - Other Manipulations of Objects - - Objects can also be manipulated in the following ways. - - - Moving and Resizing Objects - - Objects can be moved by simply clicking on a selected - object and dragging the object to its new location. If the object - is part of an aggregate selection, all objects in the selection - will move with the object being dragged, maintaining their relative - positions to one another. If no object is selected, clicking on - an object will create a new selection containing that object. - See . - - A selected object can be resized by clicking one of its resize - handle and dragging it to obtain the new size. - - - - - Changing Stacking Order - - Stacking order refers to relative position in the z-axis of - objects. That is when objects overlap, which object will appear - on top of the other. By default, newer objects will appear above - older objects. To change this order, select one or more objects - and choose Objects - Order - Bring to Front - to raise the selection to the top of the stacking - order, or choose Objects - Order - Send to Back - to lower the selection to the bottom of the - stacking order. These menuitems are also available by right-clicking - the display area when there is a non-empty selection. - - - - - Rotating and Flipping Objects - - Objects can be rotated 90 degrees in either direction, or flipped - horizontally or vertically, by choosing the appropriate menuitem - in the Objects - Rotate/Flip sub-menu. These - menuitems are also available by right-clicking - the display area when there is a non-empty selection. - - - - - Aligning Objects - - Objects can be aligned horizontally or vertically, relative to - one another, or relative to the center line of the label, by - choosing the appropriate menuitem from the - Objects - Align Horizontal - or Objects - Align Horizontal sub-menus. - These menuitems are also available by right-clicking - the display area when there is a non-empty selection. - - - - - Using the Property Bar - - The property bar can be used to change some common properties - of objects en-masse. These properties include font family, font - size, font weight, text alignment, text color, fill color, line - or outline color, and line width. The property bar also controls - the defaults for these properties for any newly created objects. - - - - - - - - - - - Performing a Document Merge - - Document Merge (sometimes called "Mail Merge") is a powerful - feature that allows a unique label or card to be printed for each - record in an external data source. - - 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 back-ends only exist for - text files and the evolution data server -- others are planned. The currently - supported text-file format is very simple: each line is a record; - fields are delimited by commas (CSV), tabs, 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 common way of creating CSV files is - to export them from a spreadsheet program. - - A label must then be configured to "point at" this data file. - To configure the merge properties of a document, choose - Objects - Merge Properties menu item - to display the merge properties dialog. This - dialog is used to select the exact data file format and file - name (location) of the merge data. - - Finally, once the label has been configured for a data file, - field keys can be inserted into text objects and used as source - or data for barcode objects and image filenames for image objects. - See for more information - on using merge data for these object types. - - 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, barcode, and - image objects. - - See for a detailed - tutorial on the document merge feature. - - - - - -
    - - - - - - - - Settings - To configure &app;, choose - - Settings - Preferences - . The - Preferences dialog contains the following tabbed - sections: - - - - - - - - - - - - - - Locale - - - - Units - - Use this radio button group to specify your prefered units. - Select one of the following options: - - - - Points - Use points (1 point = 1/72 in = 0.352778 mm). - - - - Inches - Use inches. - - - - Millimeters - Use millimeters. - - - Default: - Inches. - - - - - Default page size - - Use this radio button group to specify your prefered page size. - This will make it quicker for you to locate media types when creating a new - label or card. - - - - US Letter - Most of your media will be of the US Letter page size (8.5 x 11 inches). - - - - ISO A4 - Most of your media will be of the ISO A4 page size (210 x 297 mm). - - - Default: - US Letter. - - - - - - - - Object defaults - - - - Text - - Use these controls to set the default properties of new text objects. - These properties are - - - - Font - These controls are used to select font family and font size, and - whether the font should bold or in italics. - - - - Color - This control selects the default text color. - - - - Alignment - These controls are used to select the default text alignment (left, center or right). - - - - - - - Line - - Use these controls to set the default properties of lines and outlines of - new objects. These properties are - - - - Width - This control selects the default line width. - - - - Color - This control selects the default line color. - - - - - - - Fill - - Use these controls to set the default fill properties of - new objects. These properties are - - - - Color - This control selects the default fill color. - - - - - - - - - - - - - - Document Merge Tutorial - - Document Merge (sometimes called "Mail Merge") is a powerful - feature that allows a unique label or card to be printed for each - record in an external data source. It is however, the most mis-understood - feature of glabels. The following examples - will step through a couple of common tasks using the document merge - feature. - - - Example 1: Name Tags - - In this example we are organizing an orientation party for the new - crew members of our ship. We have a list of freshman crew members that we - created in gnumeric and exported as the following - CSV file. We could have created this file by using a text editor, but heck it - is the 23rd century. - - -Name,Department,SN -"Jim Kirk",Management,"SC937-0176 CEC" -"Mr. Spock",Sciences,S179-276SP -"Leonard McCoy",Medicine,unknown -"Montgomery Scott",Engineering,SE-197-54T - - - In glabels we have created a new glabels - document using the Avery 5395 "Name Badge Labels" template. Next we use the - Objects - Merge Properties menu item to display - the merge properties dialog. We use this dialog to - select the source type (in our case CSV) and the merge source (filename) as - shown. - - -
    - Merge properties dialog - - - - - - -
    - - - Before applying the merge source, we uncheck the first record since it is only - column headers from our original gnumeric spreadsheet - and would simply waste our first label. We could also unselect any other records - that we didn't want to print a label for. - - We can also view each record in more detail by clicking on the appropriate - expander (the little triangles) as shown. Once we are satisfied with the - selections in this dialog we click OK to accept the - changes. - - Now we start adding objects to our glabels document as shown. - - -
    - Adding objects - - - - - - -
    - - - In this example we have added three text objects and a barcode object. The - first text object contains only simple literal text ("Hello, my name is"). The - second text object contains a single merge field ("${1}") corresponding to the - first field of a record (first column of a line) which contains the new crew - member's full name. The third text field contains both literal text - ("Department: ") followed by a single merge field ("${2}") corresponding to - the second field or the crew member's department. The barcode object is - configured to use field (or key) "3" which contains our crew member's - starfleet serial number. - - Now we can print our name tags by selecting the - File - Print menu item. This will display - print dialog as shown below. - - -
    - Printing name tags - - - - - - -
    - - - Just to make sure our labels are going to look okay, we select the - Print outlines option and click - Print Preview. This will display a print preview dialog - as shown below. - - -
    - Name tags preview - - - - - - -
    - - - Everything looks good, so we can now load up our printer with - the appropriate label stock, print our name tags and start beaming our guests - aboard. - -
    - - - Example 2: Address Labels - - In this example we are going to throw a party and need to print mailing - address labels for our invitations. We have a list of our closest friends - that we created in gnumeric and exported as the - following CSV file. It should be noted that not everyone has a middle initial or - a two line address. - - -LAST,FIRST,MI,ADDR1,ADDR2,CITY,STATE,ZIP -,,,,,,, -Critter,Ess,S,"123 Faux St.",,Alexandria,VA,22310 -Doe,John,,"Apt 1X","451 Mystery St.",Trenton,NJ,08601 -Summers,Joyce,,"1630 Revello Dr",,Sunnydale,CA,95037 -McGarret,Steve,O,"404 Piikoi Street",,Honolulu,HI,96813 -Kramer,Cosmo,,"Apt 5B","129 W. 81 St.","New York",NY,10024-7207 - - - In glabels we have created a new glabels - document using the Avery 5512 "Address Labels" template. Next we use the - Objects - Merge Properties menu item to display - the merge properties dialog. We use this dialog to - select the source type (in our case CSV) and the merge source (filename) as - shown. - - -
    - Merge properties dialog - - - - - - -
    - - - Before applying the merge source, we uncheck the first record since it is only - column headers from our original gnumeric spreadsheet - and would simply waste our first label. We also unselect the second record - which is empty (an artifact of our original spreadsheet). We could also unselect - any other records that we didn't want to print a label for. - - We can also view each record in more detail by clicking on the appropriate - expander (the little triangles) as shown. Once we are satisfied with the - selections in this dialog we click OK to accept the - changes. - - Now we start adding objects to our glabels document as shown. - - -
    - Adding objects - - - - - - -
    - - - In this example we have a single text object. This text object contains - all of our merge fields organized on multiple lines as a mailing address. - Notice that fields ${4} and ${5} (corresponding to ADDR1 and ADDR2) are each - located with no other text on their own lines. When - glabels encounters a field as the only text on - a line, it will not expand the line if the field is empty. - - Now we can print our address labels by selecting the - File - Print menu item. This will display - print dialog as shown below. - - -
    - Printing address labels - - - - - - -
    - - - Just to make sure our labels are going to look okay, we select the - Print outlines option and click - Print Preview. This will display a print preview dialog - as shown below. - - -
    - Address labels preview - - - - - - -
    - - - Everything looks good, so we can now load up our printer with - the appropriate label stock, print our address labels and start mailing - our party invitations. - -
    - -
    - - - - - - - Manually Creating New Templates - - Predefined templates are defined by XML files located in - ${prefix}/share/glabels/, - where ${prefix} is usually something like - /usr/local or /usr depending - on the configuration option prefix. gLabels will - use all files of the form *-templates.xml - or *.template, that it finds in - ${prefix}/share/glabels/ and - ${HOME}/.glabels/. - Additional templates can be added by creating additional - *.template files in either of these directories. - - - The format for these files is defined in the DTD: - glabels-2.2.dtd. (This DTD also describes other - XML formats used by glabels.) - - - Assumptions/caveats - - - A sheet contains only one size of label or card (if a sheet - contains more than one size of item, it can be split into - multiple templates for multiple pass printing) - - - Distances can be expressed in units of pt, - in, mm, - cm, or pc. For example: - "1.0in" or "2.54cm". If no - units are specified, computer points (pt) will - be assumed (1 pt = - 1/72 in = 0.352778 mm). - - - - - - - Template Files - - -<?xml version="1.0"?> -<Glabels-templates> - - ...templates... - -</Glabels-templates> - - - - - - Example Template - - <Template brand="Avery" part="8160" size="US-Letter" description="Mailing Labels"> - <Label-rectangle id="0" width="189pt" height="72pt" round="5pt"> - <Markup-margin size="5pt"/> - <Layout nx="3" ny="10" x0="11.25pt" y0="36pt" dx="200pt" dy="72pt"/> - </Label-rectangle> - <Alias brand="Avery" part="5160"/> - <Alias brand="Avery" part="6233"/> - </Template> - - - - - Template Node - - A Template node describes a single stationary - product. It must contain one instance of any type of Label node - (Label-rectangle, - Label-round, or Label-cd). - This node can be followed by zero or more - Alias nodes. - - - - - - - - - Property - - - Description - - - - - - brand - - Brand or manufacturer of stationary product. - E.g. "Avery" - - - - part - - Part number or name of stationary product. - E.g. "8160" - - - - size - - Size of sheet. E.g., "US-Letter," "A4", ... - - - - description - - Description of stationary product. E.g, - "Mailing Labels." - - - - _description - - Translatable description of stationary product. - E.g, "Mailing Labels." (Only useful for predefined - templates) - - - - width - - Page width. Only valid if size="Other" - - - - height - - Page height. Only valid if size="Other" - - - - - - - - - - Label-rectangle Node - - A Label-rectangle node describes the - dimensions of a single label or business card that is rectangular - in shape (may have rounded edges). - - - - - - - - - Property - - - Description - - - - - - id - - Reserved for future use. Should always be 0. - - - - width - Width of label/card - - - height - Height of label/card - - - round - - Radius of corners. For items with square edges - (business cards), the radius should be 0. - - - - x_waste - - Amount of horizontal waste (over-print) to allow. This is useful - for minimizing alignment problems when using non-white - backgrounds (e.g. images). - - - - y_waste - - Amount of vertical waste (over-print) to allow. This is useful - for minimizing alignment problems when using non-white - backgrounds (e.g. images). - - - - - - - -
    - Label-rectangle Parameters - - - - - - -
    - - -
    - - - Label-round Node - - A Label-round node describes the dimensions - of a simple round label (not a CD). - - - - - - - - - Property - - - Description - - - - - - id - - Reserved for future use. Should always be 0. - - - - radius - Radius (1/2 diameter) of label - - - waste - - Amount of waste (over-print) to allow. This is useful - for minimizing alignment problems when using non-white - backgrounds (e.g. images). - - - - - - - - - - Label-cd Node - - A Label-cd node describes the dimensions - of a CD, DVD, or business card CD. - - - - - - - - - Property - - - Description - - - - - - id - - Reserved for future use. Should always be 0. - - - - radius - Outer radius of label - - - hole - Radius of concentric hole - - - width - - If present, the label is clipped to the given width. - (Useful for "business card CDs"). - - - - height - - If present, the label is clipped to the given height. - (Useful for "business card CDs"). - - - - waste - - Amount of waste (over-print) to allow. This is useful - for minimizing alignment problems when using non-white - backgrounds (e.g. images). - - - - - - - -
    - CD Label Parameters - - - - - - -
    - - -
    - - - Markup-margin Node - - A Markup-margin describes a margin along - all edges of a label. - - - - - - - - - Property - - - Description - - - - - - size - - Size of the margin. I.e. the distance of the margin - line from the edge of the card/label. - - - - - - - - - - Markup-line Node - - A Markup-line describes a markup line. - - - - - - - - - Property - - - Description - - - - - - x1 - - x coordinate of 1st endpoint of the line segment. - - - - y1 - - y coordinate of 1st endpoint of the line segment. - - - - x2 - - x coordinate of 2nd endpoint of the line segment. - - - - y2 - - y coordinate of 2nd endpoint of the line segment. - - - - - - - - - - Markup-circle Node - - A Markup-circle describes a markup circle. - - - - - - - - - - Property - - - Description - - - - - - x0 - - x coordinate of circle origin (center). - - - - y0 - - y coordinate of circle origin (center). - - - - radius - Radius of circle. - - - - - - - - - Markup-rect Node - - A Markup-rect describes a markup rectangle. - - - - - - - - - - Property - - - Description - - - - - - x1 - - x coordinate of upper left corner of rectangle. - - - - y1 - - y coordinate of upper left corner of rectangle. - - - - w - - Width of rectangle. - - - - h - - Height of rectangle. - - - - r - Radius of rounded corners of rectangle. - - - - - - - - - Layout Node - - A label node may contain multiple Layout - children. If labels are arranged in a simple grid pattern, only - one layout is needed. However, if labels are arranged in multiple - grids, such as a running bond pattern, multiple - layout tags can be used. Note: a single label - can always be treated as a grid of one. - - - - - - - - - Property - - - Description - - - - - - nx - - Number of labels/cards across in the grid - (horizontal) - - - - ny - - Number of labels/cards up and down in the grid - (vertical) - - - - x0 - - Distance from left edge of sheet to the left edge of - the left column of cards/labels in the layout. - - - - y0 - - Distance from the top edge of sheet to the top edge of - the top row of labels/cards in the layout. - - - - dx - Horizontal pitch of grid. - - - dy - Vertical pitch of grid. - - - - - - -
    - Layout Parameters - - - - - - -
    - - -
    - - - Alias Node - - An Alias node provides the name of a - product with the same size and layout characteristics as the - parent template. - - - - - - - - - Property - - - Description - - - - - - brand - - The brand or manufacturer of the equivalent product. - - - - part - - The part number or name of the equivalent product. - - - - - - - - -
    - - - - - - - - - - - - - - About &app; - &app; was written by Jim Evins - (evins@snaught.com). To find more information about - &app;, please visit the - gLabels Web - page. - - To report a bug or make a suggestion regarding this application or - this manual, follow the directions at the - gLabels Contact Page. - - - This program is distributed 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. A copy of this license can be found at this - link, or in the file - COPYING included with the source code of this program. - - - - - - - -
    diff --git a/glabels2/help/C/legal.xml b/glabels2/help/C/legal.xml deleted file mode 100644 index ac97e1de..00000000 --- a/glabels2/help/C/legal.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation - License (GFDL), 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 can find - a copy of the GFDL at this link or in the file COPYING-DOCS - distributed with this manual. - - This manual is part of a collection of GNOME manuals - distributed under the GFDL. If you want to distribute this - manual separately from the collection, you can do so by - adding a copy of the license to the manual, as described in - section 6 of the license. - - - - 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 the members of - the GNOME Documentation Project are made aware of those - trademarks, then the names are in capital letters or initial - capital letters. - - - - DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED - UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE - WITH THE FURTHER UNDERSTANDING THAT: - - - - DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR - IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES - THAT THE DOCUMENT OR MODIFIED VERSION OF THE - DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR - A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE - RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE - OF THE DOCUMENT OR MODIFIED VERSION OF THE - DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR - MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY - CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY - SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS - LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED - VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER - EXCEPT UNDER THIS DISCLAIMER; AND - - - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL - THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), - CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, - INITIAL WRITER, ANY CONTRIBUTOR, OR ANY - DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION - OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH - PARTIES, BE LIABLE TO ANY PERSON FOR ANY - DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER - INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS - OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR - MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR - LOSSES ARISING OUT OF OR RELATING TO USE OF THE - DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, - EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF - THE POSSIBILITY OF SUCH DAMAGES. - - - - - - diff --git a/glabels2/help/Makefile.am b/glabels2/help/Makefile.am deleted file mode 100644 index 708fb593..00000000 --- a/glabels2/help/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -include $(top_srcdir)/gnome-doc-utils.make - -dist-hook: doc-dist-hook - -DOC_MODULE = glabels -DOC_ENTITIES = legal.xml -DOC_INCLUDES = -DOC_FIGURES = figures/glabels-template-cd.png \ - figures/glabels-template-label.png \ - figures/glabels-template-layout.png \ - figures/main-window-empty.png \ - figures/merge-ex1-1.png \ - figures/merge-ex1-2.png \ - figures/merge-ex1-3.png \ - figures/merge-ex1-4.png \ - figures/merge-ex2-1.png \ - figures/merge-ex2-2.png \ - figures/merge-ex2-3.png \ - figures/merge-ex2-4.png \ - figures/object-editor-sidebar.png \ - figures/print-copies.png \ - figures/print-merge.png - -DOC_LINGUAS = de diff --git a/glabels2/help/de/de.po b/glabels2/help/de/de.po deleted file mode 100644 index cd4b7106..00000000 --- a/glabels2/help/de/de.po +++ /dev/null @@ -1,2650 +0,0 @@ -# German translation of the gLabels2 documentation. -# Mario Blättermann , 2008, 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels2\n" -"POT-Creation-Date: 2008-12-23 09:45+0100\n" -"PO-Revision-Date: 2009-09-06 18:51+0100\n" -"Last-Translator: Mario Blättermann \n" -"Language-Team: German \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: German\n" -"X-Poedit-Country: GERMANY\n" - -#: ../C/legal.xml:2(para) -msgid "" -"Permission is granted to copy, distribute and/or modify this document under " -"the terms of the GNU Free Documentation License (GFDL), 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 can find a copy " -"of the GFDL at this link or in " -"the file COPYING-DOCS distributed with this manual." -msgstr "" -"Das vorliegende Dokument kann gemäß den Bedingungen der GNU Free " -"Documentation License (GFDL), Version 1.1 oder jeder späteren, von der Free " -"Software Foundation veröffentlichten Version ohne unveränderbare Abschnitte " -"sowie ohne Texte auf dem vorderen und hinteren Buchdeckel kopiert, verteilt " -"und/oder modifiziert werden. Eine Kopie der GFDL finden Sie unter diesem " -"Link oder in der mit diesem " -"Handbuch gelieferten Datei COPYING-DOCS." - -#: ../C/legal.xml:12(para) -msgid "" -"This manual is part of a collection of GNOME manuals distributed under the " -"GFDL. If you want to distribute this manual separately from the collection, " -"you can do so by adding a copy of the license to the manual, as described in " -"section 6 of the license." -msgstr "" -"Dieses Handbuch ist Teil einer Sammlung von GNOME-Handbüchern, die unter der " -"GFDL veröffentlicht werden. Wenn Sie dieses Handbuch getrennt von der " -"Sammlung weiterverbreiten möchten, können Sie das tun, indem Sie eine Kopie " -"der Lizenz zum Handbuch hinzufügen, wie es in Abschnitt 6 der Lizenz " -"beschrieben ist." - -#: ../C/legal.xml:19(para) -msgid "" -"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 the members of the GNOME Documentation Project are made " -"aware of those trademarks, then the names are in capital letters or initial " -"capital letters." -msgstr "" -"Viele der Namen, die von Unternehmen verwendet werden, um ihre Produkte und " -"Dienstleistungen von anderen zu unterscheiden, sind eingetragene " -"Warenzeichen. An den Stellen, an denen diese Namen in einer GNOME-" -"Dokumentation erscheinen, werden die Namen in Großbuchstaben oder mit einem " -"großen Anfangsbuchstaben geschrieben, wenn das GNOME-Dokumentationsprojekt " -"auf diese Warenzeichen hingewiesen wird." - -#: ../C/legal.xml:35(para) -msgid "" -"DOCUMENT IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTY OF ANY KIND, " -"EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT " -"THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS " -"MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK " -"AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED " -"VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION " -"PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY " -"CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR " -"CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS " -"LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS " -"AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND" -msgstr "" -"DIESES DOKUMENT WIRD »WIE VORLIEGEND« GELIEFERT, OHNE GARANTIEN IRGENDEINER " -"ART, SOWOHL AUSDRÜCKLICH GENANNTE ALS AUCH ANGEDEUTETE. DIES BEZIEHT SICH " -"AUCH OHNE EINSCHRÄNKUNG AUF GARANTIEN, DASS DIESES DOKUMENT ODER VERÄNDERTE " -"FASSUNGEN DIESES DOKUMENTS FREI VON HANDELSDEFEKTEN, FÜR EINEN BESTIMMTEN " -"ZWECK GEEIGNET IST ODER DASS ES KEINE RECHTE DRITTER VERLETZT. DAS VOLLE " -"RISIKO WAS QUALITÄT, GENAUIGKEIT UND LEISTUNG DES DOKUMENTS ODER VERÄNDERTE " -"FASSUNGEN DES DOKUMENTS LIEGT BEI IHNEN. SOLLTE EIN DOKUMENT ODER EINE " -"VERÄNDERTE FASSUNG DAVON FEHLER IRGENDEINER ART BEINHALTEN, TRAGEN SIE (NICHT " -"DER URSPRUNGSAUTOR, DER AUTOR ODER EIN MITWIRKENDER) DIE KOSTEN FÜR " -"NOTWENDIGE DIENSTLEISTUNGEN, REPARATUREN ODER FEHLERKORREKTUREN. DIESER " -"HAFTUNGSAUSSCHLUSS IST EIN ESSENZIELLER TEIL DIESER LIZENZ. DIE VERWENDUNG " -"EINES DOKUMENTS ODER EINER VERÄNDERTEN VERSION DES DOKUMENTS IST NICHT " -"GESTATTET AUßER UNTER BEACHTUNG DIESES HAFTUNGSAUSSCHLUSSES UND" - -#: ../C/legal.xml:55(para) -msgid "" -"UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING " -"NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY " -"CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE " -"DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR " -"ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY " -"CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK " -"STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR " -"LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED " -"VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE " -"POSSIBILITY OF SUCH DAMAGES." -msgstr "" -"UNTER KEINEN UMSTÄNDEN UND AUF BASIS KEINER RECHTSGRUNDLAGE, EGAL OB DURCH " -"UNERLAUBTEN HANDLUNGEN (EINSCHLIEßLICH FAHRLÄSSIGKEIT), VERTRAG ODER " -"ANDERWEITIG KANN DER AUTOR, URSPRUNGSAUTOR, EIN MITWIRKENDER ODER EIN " -"VERTRIEBSPARTNER DIESES DOKUMENTS ODER EINER VERÄNDERTEN FASSUNG DES " -"DOKUMENTS ODER EIN ZULIEFERER EINER DIESER PARTEIEN, HAFTBAR GEMACHT WERDEN " -"FÜR DIREKTE, INDIREKTE, SPEZIELLE, VERSEHENTLICHE ODER FOLGESCHÄDEN JEGLICHER " -"ART, EINSCHLIEßLICH UND OHNE EINSCHRÄNKUNGEN SCHÄDEN DURCH VERLUST VON " -"KULANZ, ARBEITSAUSFALL, COMPUTERVERSAGEN ODER COMPUTERFEHLFUNKTIONEN ODER " -"ALLE ANDEREN SCHÄDEN ODER VERLUSTE, DIE SICH AUS ODER IN VERBINDUNG MIT DER " -"VERWENDUNG DES DOKUMENTS UND VERÄNDERTER FASSUNGEN DES DOKUMENTS ERGEBEN, " -"AUCH WENN DIE OBEN GENANNTEN PARTEIEN ÜBER DIE MÖGLICHKEIT SOLCHER SCHÄDEN " -"INFORMIERT WAREN." - -#: ../C/legal.xml:28(para) -msgid "" -"DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS " -"OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT: " -"" -msgstr "" -"DAS DOKUMENT UND VERÄNDERTE FASSUNGEN DES DOKUMENTS WERDEN UNTER DEN " -"BEDINGUNGEN DER GNU FREE DOCUMENTATION LICENSE ZUR VERFÜGUNG GESTELLT MIT DEM " -"WEITERGEHENDEN VERSTÄNDNIS, DASS: " - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:194(None) -msgid "" -"@@image: 'figures/main-window-empty.png'; md5=0ca03656fde7f33222bb6f016fdf79c4" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:446(None) -msgid "" -"@@image: 'figures/print-copies.png'; md5=45f2eae7cd262a36ed6b20a254b94447" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:478(None) -msgid "@@image: 'figures/print-merge.png'; md5=df81b305a7e76484df98034c1c035604" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:789(None) -msgid "" -"@@image: 'figures/object-editor-sidebar.png'; " -"md5=08e152bad535a2b3d1ff7ed73de5b483" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1230(None) -msgid "@@image: 'figures/merge-ex1-1.png'; md5=731c7bcd2ff66d18300e87f1c3d9ec0e" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1255(None) -msgid "@@image: 'figures/merge-ex1-2.png'; md5=27ed61afe77cda96c208fcda51990c89" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1283(None) -msgid "@@image: 'figures/merge-ex1-3.png'; md5=8f686530b1196b04595be50a9f8d4728" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1301(None) -msgid "@@image: 'figures/merge-ex1-4.png'; md5=9cec0c679929cc904f81f435cd3bd060" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1347(None) -msgid "@@image: 'figures/merge-ex2-1.png'; md5=d48a99d65408584eae2603a0c07610da" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1373(None) -msgid "@@image: 'figures/merge-ex2-2.png'; md5=2912c145fd9caac56ad7cf8c4437636b" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1398(None) -msgid "@@image: 'figures/merge-ex2-3.png'; md5=59a1dc5ff94656877a6220f73fe25b3c" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1416(None) -msgid "@@image: 'figures/merge-ex2-4.png'; md5=67391b05421901a36d276736c1f664dd" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1652(None) -msgid "" -"@@image: 'figures/glabels-template-label.png'; " -"md5=b7db4090373462b8d45feb22d4cd5646" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:1773(None) -msgid "" -"@@image: 'figures/glabels-template-cd.png'; " -"md5=145b49a5380de63ffa9451d2bbb81934" -msgstr "translated" - -#. When image changes, this message will be marked fuzzy or untranslated for you. -#. It doesn't matter what you translate it to: it's not used at all. -#: ../C/glabels.xml:2035(None) -msgid "" -"@@image: 'figures/glabels-template-layout.png'; " -"md5=a8adcff0584be1f0275bc2a169a580df" -msgstr "translated" - -#: ../C/glabels.xml:31(title) -msgid "gLabels Manual V2.2" -msgstr "gLabels-Handbuch V2.2" - -#: ../C/glabels.xml:34(year) -msgid "2003-2007" -msgstr "2003-2007" - -#: ../C/glabels.xml:35(holder) ../C/glabels.xml:51(publishername) -#: ../C/glabels.xml:102(para) -msgid "Jim Evins" -msgstr "Jim Evins" - -#: ../C/glabels.xml:61(firstname) -msgid "Jim" -msgstr "Jim" - -#: ../C/glabels.xml:62(surname) -msgid "Evins" -msgstr "Evins" - -#: ../C/glabels.xml:96(revnumber) -msgid "gLabels Manual V2.2" -msgstr "gLabels-Handbuch V2.2" - -#: ../C/glabels.xml:99(para) -msgid "Jim Evins evins@snaught.com" -msgstr "Jim Evins evins@snaught.com" - -#: ../C/glabels.xml:107(releaseinfo) -msgid "This manual describes version 2.2 of gLabels." -msgstr "Dieses Handbuch beschreibt Version 2.2 von gLabels." - -#: ../C/glabels.xml:110(title) -msgid "Feedback" -msgstr "Rückmeldungen" - -#: ../C/glabels.xml:111(para) -msgid "" -"To report a bug or make a suggestion regarding the gLabels application or this manual, follow the directions in the gLabels Contact " -"Page." -msgstr "" -"Um einen Fehler zu melden oder einen Vorschlag zur Anwendung " -"gLabels oder zu diesem Handbuch zu machen, folgen " -"Sie den Anweisungen auf der gLabels-Kontaktseite." - -#: ../C/glabels.xml:120(primary) -msgid "gLabels" -msgstr "gLabels" - -#: ../C/glabels.xml:123(primary) -msgid "glabels" -msgstr "glabels" - -#: ../C/glabels.xml:134(title) -msgid "Introduction" -msgstr "Einführung" - -#: ../C/glabels.xml:136(para) -msgid "" -"The gLabels application 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." -msgstr "" -"Die Anwendung gLabels ist ein ressourcenschonendes " -"Programm zum Erstellen von Etiketten und Visitenkarten für die " -"GNOME-Arbeitsumgebung. Es wurde für die " -"verschiedensten mit Laser- oder Tintenstrahldruckern bedruckbaren (auch " -"selbstklebenden) Etiketten sowie Visitenkarten entworfen, so wie Sie sie in " -"den meisten Schreibwarengeschäften finden." - -#: ../C/glabels.xml:157(title) -msgid "Getting Started" -msgstr "Erste Schritte" - -#: ../C/glabels.xml:160(title) -msgid "To Start gLabels" -msgstr "gLabels starten" - -#: ../C/glabels.xml:161(para) -msgid "" -"You can start gLabels " -"in the following ways:" -msgstr "" -"Sie können gLabels auf folgende Arten starten:" - -#: ../C/glabels.xml:165(term) -msgid "Applications menu" -msgstr "Menü Anwendungen" - -#: ../C/glabels.xml:167(para) -msgid "" -"Choose OfficegLabels." -msgstr "" -"Wählen Sie BüroanwendungengLabels." - -#: ../C/glabels.xml:175(term) -msgid "Command line" -msgstr "Befehlszeile" - -#: ../C/glabels.xml:177(para) -msgid "Type glabels, then press Return:" -msgstr "" -"Geben Sie glabels ein, und drücken Sie dann die " -"Eingabetaste." - -#: ../C/glabels.xml:185(title) -msgid "When You Start gLabels" -msgstr "Beim Start von gLabels" - -#: ../C/glabels.xml:186(para) -msgid "" -"When you start gLabels, " -"the following window is displayed." -msgstr "" -"Wenn Sie gLabels starten, wird folgendes Fenster " -"angezeigt." - -#: ../C/glabels.xml:190(title) -msgid "gLabels Start Up Window" -msgstr "gLabels-Startfenster" - -#. for example, the items on the menubar and on the toolbar. This section is optional. -#: ../C/glabels.xml:204(para) -msgid "" -"The gLabels window contains the following elements:" -msgstr "" -"Das gLabels-Fenster enthält folgende Elemente:" - -#: ../C/glabels.xml:208(term) -msgid "Menubar." -msgstr "Menüleiste." - -#: ../C/glabels.xml:210(para) -msgid "" -"The menus on the menubar contain all of the commands you need to create and " -"edit labels and business cards in gLabels." -msgstr "" -"Die Menüs in der Menüleiste enthalten alle Befehle, die Sie zum Erstellen und " -"Bearbeiten von Etiketten und Visitenkarten in gLabels benötigen." - -#: ../C/glabels.xml:216(term) -msgid "Main toolbar." -msgstr "Haupt-Werkzeugleiste." - -#: ../C/glabels.xml:218(para) -msgid "" -"The main toolbar contains a subset of common File and Edit commands that you " -"can access from the menubar." -msgstr "" -"Die Haupt-Werkzeugleiste enthält eine Auswahl der Befehle, die Sie über die " -"Menüleiste in den Menüs »Datei« und »Bearbeiten« erreichen." - -#: ../C/glabels.xml:223(term) -msgid "Drawing toolbar." -msgstr "Zeichenwerkzeugleiste." - -#: ../C/glabels.xml:225(para) -msgid "" -"The drawing toolbar contains a subset of commands for editing the current " -"glabels document." -msgstr "" -"Die Zeichenwerkzeugleiste enthält eine Auswahl von Befehlen zum Bearbeiten " -"des aktuellen gLabels-Dokuments." - -#: ../C/glabels.xml:230(term) -msgid "Display area." -msgstr "Anzeigebereich." - -#: ../C/glabels.xml:232(para) -msgid "" -"The display area is the main drawing interface to " -"gLabels." -msgstr "" -"Der Anzeigebereich ist die Zeichenfläche für gLabels." - -#: ../C/glabels.xml:237(term) -msgid "Object sidebar." -msgstr "Objekt-Seitenleiste." - -#: ../C/glabels.xml:239(para) -msgid "" -"The object sidebar provides an interface for viewing and editing all " -"properties of an individual object." -msgstr "" -"Die Objekt-Seitenleiste stellt eine Schnittstelle zum Betrachten und " -"Bearbeiten der Eigenschaften eines bestimmten Objekts zur Verfügung." - -#: ../C/glabels.xml:244(term) -msgid "Properties toolbar." -msgstr "Eingenschaften-Werkzeugleiste." - -#: ../C/glabels.xml:246(para) -msgid "" -"The properties toolbar contains a set of tools to manipulate the properties " -"of selected objects and set default properties for new objects." -msgstr "" -"Die Eigenschaften-Werkzeugleiste enthält eine Reihe von Werkzeugen zum " -"Manipulieren der Eigenschaften ausgewählter Objekte sowie zum Setzen der " -"Standardeigenschaften für neue Objekte." - -#: ../C/glabels.xml:252(term) -msgid "Statusbar." -msgstr "Statusleiste." - -#: ../C/glabels.xml:254(para) -msgid "" -"The statusbar displays information about current " -"gLabels activity and " -"contextual information about the menu items." -msgstr "" -"In der Statusleiste werden Informationen über die aktuelle " -"gLabels-Aktivität und Kontextinformationen über " -"die Menüpunkte angezeigt." - -#: ../C/glabels.xml:270(title) -msgid "Usage" -msgstr "Benutzung" - -#: ../C/glabels.xml:274(title) -msgid "To Create a New Label or Card" -msgstr "Erstellen eines neuen Etiketts oder einer neuen Karte" - -#: ../C/glabels.xml:276(para) -msgid "" -"To create a new label or business card, choose FileNew to display the " -"New Label or Card dialog. Select the media type and " -"orientation for the new document, then click OK. A new " -"document is displayed in the display area of the " -"gLabels window." -msgstr "" -"Um ein neues Etikett oder eine neue Visitenkarte anzulegen, wählen Sie " -"DateiNeu, um den Dialog Neues Etikett oder neue Karte " -"anzuzeigen. Wählen Sie den Medientyp und die Ausrichtung für das neue " -"Dokument aus und klicken Sie anschließend auf OK. Ein " -"neues Dokument erscheint im Anzeigebereich des " -"gLabels-Fensters." - -#: ../C/glabels.xml:285(para) -msgid "" -"If your particular media type is missing from this dialog, see " -msgstr "" -"Falls Ihr spezieller Medientyp in diesem Dialog nicht angezeigt wird, siehe " -"." - -#: ../C/glabels.xml:292(title) -msgid "To Open a File" -msgstr "Öffnen einer Datei" - -#: ../C/glabels.xml:294(para) -msgid "" -"To open a file, choose FileOpen to display the Open File " -"dialog. Select the file that you want to open, then click OK. The file is displayed in the display area of the " -"gLabels window." -msgstr "" -"Um eine Datei zu öffnen, wählen Sie DateiÖffnen, um den Dialog " -"Datei öffnen anzuzeigen. Wählen Sie die gewünschte Datei " -"aus und klicken Sie dann auf Öffnen. Die Datei wird im " -"Anzeigebereich des gLabels-Fensters geöffnet." - -#: ../C/glabels.xml:301(para) -msgid "" -"You can also open multiple files in gLabels. The application creates a separate application " -"window for each open file." -msgstr "" -"Sie können in gLabels auch mehrere Dateien öffnen. " -"Die Anwendung erzeugt ein separates Fenster für jede geöffnete Datei." - -#: ../C/glabels.xml:305(para) -msgid "" -"The application records the paths and filenames of the most recent files that " -"you have edited and displays the files as menu items on the " -"FileRecent Files menu." -msgstr "" -"Die Anwendung speichert die Pfade und Dateinamen der von Ihnen zuletzt " -"bearbeiteten Dateien. Diese Dateien werden als Einträge im Menü " -"DateiZuletzt benutzt angezeigt." - -#: ../C/glabels.xml:315(title) -msgid "To Open Multiple Files from a Command Line" -msgstr "Öffnen mehrerer Dateien aus einer Befehlszeile" - -#: ../C/glabels.xml:317(para) -msgid "" -"You can run gLabels " -"from a command line and open a single file or multiple files. To open " -"multiple files from a command line, type the following command, then press " -"Return:" -msgstr "" -"Sie können gLabels aus einer Befehlszeile starten " -"und eine Datei oder mehrere Dateien öffnen. Um mehrere Dateien aus einer " -"Befehlszeile zu öffnen, geben Sie den folgenden Befehl ein und drücken dann " -"die Eingabetaste:" - -#: ../C/glabels.xml:323(replaceable) -msgid "file1.glabels file2.glabels file3.glabels" -msgstr "Datei1.glabels Datei2.glabels Datei3.glabels" - -#: ../C/glabels.xml:322(command) -msgid "glabels " -msgstr "glabels " - -#: ../C/glabels.xml:326(para) -msgid "" -"When the application starts, the files that you specify are displayed in " -"separate gLabels " -"windows." -msgstr "" -"Wenn die Anwendung startet, werden die von Ihnen angegebenen Dateien in " -"separaten gLabels-Fenstern angezeigt." - -#: ../C/glabels.xml:333(title) -msgid "To Save a File" -msgstr "Speichern einer Datei" - -#: ../C/glabels.xml:335(para) -msgid "You can save files in the following ways:" -msgstr "Sie können Dateien auf folgende Arten speichern:" - -#: ../C/glabels.xml:340(para) -msgid "" -"To save changes to an existing file, choose FileSave." -msgstr "" -"Um die Änderungen in der bereits vorhandenen Datei zu speichern, wählen Sie " -"DateiSpeichern." - -#: ../C/glabels.xml:347(para) -msgid "" -"To save a new file or to save an existing file under a new filename, choose " -"FileSave As. Enter a name for the file in the Save As " -"dialog box, then click OK." -msgstr "" -"Um eine neue Datei oder eine bestehende Datei unter einem neuen Dateinamen zu " -"speichern, wählen Sie DateiSpeichern unter. Geben Sie " -"einen Namen für die Datei im Dialogfeld Speichern unter " -"ein und klicken Sie anschließend auf OK. " - -#: ../C/glabels.xml:360(title) -msgid "To Change Label Properties" -msgstr "Ändern der Eigenschaften eines Etiketts" - -#: ../C/glabels.xml:362(para) -msgid "" -"To change the media type and/or orientation of a label, choose " -"FileProperties to display the Label properties dialog. " -"Select the new media type and orientation for the document, then click " -"OK." -msgstr "" -"Um den Medientyp oder die Ausrichtung des Etiketts zu ändern, wählen Sie " -"DateiEigenschaften, um den Dialog Etikett-Eigenschaften " -"anzuzeigen. Wählen Sie den neuen Medientyp für das Dokument aus und klicken " -"Sie anschließend auf OK." - -#: ../C/glabels.xml:373(title) -msgid "To Create a Custom Template" -msgstr "Erstellen einer benutzerdefinierten Vorlage" - -#: ../C/glabels.xml:375(para) -msgid "" -"To create a new custom template, choose FileTemplate Designer ... to " -"display the Template Designer dialog. This dialog will " -"assist you in creating a custom template for most types of label or card " -"stationery that you may encounter." -msgstr "" -"Um eine neue benutzerdefinierte Vorlage zu erstellen, wählen Sie " -"DateiVorlagen-Designer …, um den Vorlagen-Designer-" -"Dialog anzuzeigen. Dieser Dialog hilft Ihnen bei der Erstellung einer " -"benutzerdefinierten Vorlage für die meisten Typen von Etiketten oder " -"Visitenkarten, die Ihnen in Schreibwarengeschäften begegnen könnten." - -#: ../C/glabels.xml:382(para) -msgid "" -"If you prefer, you can create your templates manually. For this option see " -"" -msgstr "" -"Falls Sie dies bevorzugen, können Sie Ihre Vorlagen auch manuell erstellen. " -"Weitere Informationen hierzu finden Sie in ." - -#: ../C/glabels.xml:390(title) -msgid "To Close a File" -msgstr "Schließen einer Datei" - -#: ../C/glabels.xml:392(para) -msgid "" -"To close the current document, choose FileClose to close the " -"application window. If the current document is modified, a confirmation " -"dialog will be presented, allowing you to save the document or cancel the " -"command. If the window being closed is the only open window, " -"gLabels will exit." -msgstr "" -"Um das aktuelle Dokument zu schließen, wählen Sie DateiSchließen, um das " -"Anwendungsfenster zu schließen. Falls das aktuelle Dokument bearbeitet wurde, " -"wird ein Bestätigungsdialog geöffnet, in welchem Sie das Dokument speichern " -"oder den Vorgang abbrechen können. Falls das zu schließende Fenster das " -"einzige offene Fenster ist, wird gLabels dadurch beendet." - -#: ../C/glabels.xml:404(title) -msgid "To Quit gLabels" -msgstr "gLabels beenden" - -#: ../C/glabels.xml:406(para) -msgid "" -"To quit gLabels, choose " -"FileQuit. This is equivalent to closing all open windows. See ." -msgstr "" -"Um gLabels zu beenden, " -"wählen Sie DateiBeenden. Dadurch werden alle offenen Fenster geschlossen. " -"Siehe ." - -#: ../C/glabels.xml:416(title) -msgid "To Print Labels or Cards" -msgstr "Drucken von Etiketten oder Karten" - -#: ../C/glabels.xml:418(para) -msgid "" -"To print labels or cards, choose FilePrint to display the " -"Print dialog. Once print options have been selected, " -"click Print to print the labels or cards. To simply " -"preview the results, click Print Preview instead." -msgstr "" -"Um Etiketten oder Visitenkarten zu drucken, wählen Sie " -"DateiDrucken, um den Drucken-Dialog anzuzeigen. Nachdem " -"Sie die Druckoptionen ausgewählt haben, klicken Sie auf Drucken, um die Etiketten oder Visitenkarten zu drucken. Um zunächst eine " -"Vorschau auf die Druckergebnisse zu erhalten, klicken Sie auf " -"Druckvorschau." - -#: ../C/glabels.xml:425(para) -msgid "" -"The Print dialog allows you to specify the following " -"print options:" -msgstr "" -"Im Dialog Drucken können Sie die folgenden Optionen zum " -"Drucken festlegen:" - -#: ../C/glabels.xml:429(title) -msgid "The Labels Tab of the Print Dialog" -msgstr "Der Reiter »Etiketten« des Druckdialogs" - -#: ../C/glabels.xml:434(guilabel) -msgid "Print control (Simple)" -msgstr "Drucksteuerung (einfach)" - -#: ../C/glabels.xml:437(para) -msgid "" -"For simple labels or cards (no document merge), the job tabbed section " -"contains the following copy controls." -msgstr "" -"Für einfache Etiketten oder Karten (keine Dokumentmischung) enthält der " -"Reiter »Labels« die folgenden Einstellmöglichkeiten." - -#: ../C/glabels.xml:442(title) -msgid "Print Copy Controls" -msgstr "Angeben der Kopien" - -#. ==== End of Figure ==== -#: ../C/glabels.xml:453(para) -msgid "" -"The number of copies of the label can be selected by choosing the number of " -"full sheets to print, or a specific subset of labels on a single sheet." -msgstr "" -"Die Anzahl der Kopien können Sie wählen, indem Sie die Anzahl der vollständig " -"zu druckenden Seiten oder eine Teilmenge von Etiketten auf einer einzelnen " -"Seite auswählen." - -#: ../C/glabels.xml:457(para) -msgid "" -"The mini-preview can also be used to graphically select the subset of labels " -"by clicking the first label on the mini-preview and dragging to the last " -"label." -msgstr "" -"Die verkleinerte Vorschau können Sie auch dazu verwenden, einen Teil der " -"Etiketten grafisch auszuwählen, indem Sie auf das erste Etikett klicken und " -"es auf das letzte Etikett ziehen." - -#: ../C/glabels.xml:465(guilabel) -msgid "Print control (Merge)" -msgstr "Drucksteuerung (Mischen)" - -#: ../C/glabels.xml:468(para) -msgid "" -"For labels or cards using the document merge (also known as \"mail merge\") " -"capability, the job tabbed section contains the following merge controls " -"instead of copy controls." -msgstr "" -"Für Etiketten oder Karten unter Verwendung der Dokumentmischung enthält " -"dieser Reiter die folgenden Einstellungen zur Mischung von Dokumenten " -"anstelle der Festlegung der Kopien." - -#: ../C/glabels.xml:474(title) -msgid "Print Document Merge Controls" -msgstr "Steuerung der Einmischung von Dokumenten" - -#. ==== End of Figure ==== -#: ../C/glabels.xml:485(para) -msgid "" -"The total number of labels or cards printed is the product of the number of " -"records in the merge source and the number of copies selected. If multiple " -"copies are selected, these can be either collated (copies of the same record " -"grouped together) or un-collated (one copy each record is printed before next " -"copy)." -msgstr "" -"Die Gesamtzahl der gedruckten Etiketten oder Karten ergibt sich als Produkt " -"aus der Anzahl der Datensätze in der Einmischquelle und der Anzahl der " -"gewählten Kopien. Falls mehrere Kopien gewählt wurden, können diese entweder " -"zusammengefasst werden (durch Gruppieren der Kopien des gleichen Datensatzes) " -"oder nicht zusammengefasst (eine Kopie jedes Datensatzes wird immer vor der " -"nächsten Kopie gedruckt)." - -#: ../C/glabels.xml:492(para) -msgid "" -"Printing can begin on any label on the first sheet. This can be selected with " -"the Start on label spinbutton." -msgstr "" -"Der Druck kann mit jedem beliebigen Etikett der ersten Seite begonnen werden. " -"Dies können Sie im Einstellfeld Start bei Etikett " -"auswählen." - -#: ../C/glabels.xml:496(para) -msgid "" -"The mini-preview can also be used to graphically select this first label, by " -"clicking on the desired label in the mini-preview." -msgstr "" -"In der verkleinerten Vorschau können Sie das erste Etikett grafisch " -"auswählen, indem Sie das gewünschte Etikett anklicken." - -#: ../C/glabels.xml:503(guilabel) -msgid "Options" -msgstr "Optionen" - -#: ../C/glabels.xml:505(para) -msgid "The following options can also be selected." -msgstr "Die folgenden Optionen können ebenfalls gewählt werden." - -#: ../C/glabels.xml:508(guilabel) -msgid "print outlines" -msgstr "Begrenzungen drucken" - -#: ../C/glabels.xml:509(para) -msgid "" -"Print outlines of labels. This option is useful for dry-runs, to test printer " -"alignment." -msgstr "" -"Begrenzungen der Etiketten drucken. Diese Option ist nützlich, wenn Sie die " -"Lage des Papiers im Drucker prüfen wollen." - -#: ../C/glabels.xml:513(guilabel) -msgid "print in reverse" -msgstr "Spiegelbildlich drucken" - -#: ../C/glabels.xml:514(para) -msgid "" -"Prints the labels as mirror images. This option is useful for printing on " -"clear labels that will be viewed from the reverse side (e.g. in a car window)." -msgstr "" -"Druckt die Etiketten spiegelbildlich. Diese Option ist nützlich für das " -"Drucken durchsichtiger Aufkleber, die von der Rückseite aus betrachtet werden " -"(z.B. hinter Autoscheiben)." - -#: ../C/glabels.xml:519(guilabel) -msgid "print crop marks" -msgstr "Schnitt" - -#: ../C/glabels.xml:520(para) -msgid "" -"Prints crop marks along the edge of the sheet. This option is useful for " -"printing on blank stock, to be cut after printing. This option does not work " -"well with all templates." -msgstr "" -"Druckt Schnittmarken entlang der Papierränder. Diese Option ist nützlich zum " -"Drucken auf Papier, das erst nach dem Druck beschnitten werden soll. Diese " -"Option funktioniert eventuell nicht mit allen Vorlagen." - -#: ../C/glabels.xml:535(title) -msgid "To Create New Objects" -msgstr "Erstellen neuer Objekte" - -#: ../C/glabels.xml:537(para) -msgid "" -"Objects are created by choosing the appropriate selection under the " -"ObjectsCreate Object submenu or the Drawing Toolbar. This will place the display area into object creation mode as " -"indicated by its cursor. To return to the default object selection mode " -"without creating an object, choose ObjectsSelect Mode. This will return " -"the display area's cursor to the default selection arrow." -msgstr "" -"Objekte können ausgewählt werden, indem Sie das entsprechende Objekt in " -"ObjekteErzeugen auswählen oder über die Zeichenwerkzeugleiste. Dadurch wird der Anzeigebereich in den Objekterzeugungsmodus " -"versetzt, was am Mauszeiger erkennbar ist. Um zum vorgegebenen " -"Objektauswahlmodus zurückzukehren, ohne ein Objekt zu erzeugen, wählen Sie " -"ObjekteAuswahlmodus. Dadurch wird der Mauszeiger im Anzeigebereich " -"wieder in den vorgegebenen Auswahlzeiger geändert." - -#: ../C/glabels.xml:547(para) -msgid "The following describes the object creation mode for each object type:" -msgstr "" -"Nachfolgend wird der Modus zur Erstellung der Objekte für jeden Objekttyp " -"beschrieben:" - -#: ../C/glabels.xml:553(term) ../C/glabels.xml:1122(guilabel) -msgid "Text" -msgstr "Text" - -#: ../C/glabels.xml:555(para) -msgid "" -"Click the desired location of the upper left corner of the text object. New " -"text objects are initialized with the string \"Text.\" To change this text, " -"or other properties, see ." -msgstr "" -"Klicken Sie auf die gewünschte Stelle in der linken oberen Ecke des " -"Textobjekts. Neue Textobjekte erhalten anfänglich den Inhalt »Text«. Wie Sie " -"diesen Text oder andere Eigenschaften ändern können, finden Sie in ." - -#: ../C/glabels.xml:563(term) -msgid "Box" -msgstr "Rechteck" - -#: ../C/glabels.xml:565(para) -msgid "" -"Click the desired location of the upper left corner of the box object and " -"drag to the desired location of the lower right corner. If you simply click " -"in a single location, a square box will be created. To change properties of " -"the box object, see ." -msgstr "" -"Klicken Sie auf die gewünschte Stelle für die linke obere Ecke des " -"Rechteckobjekts und ziehen Sie zur gewünschten rechten unteren Ecke. Wenn Sie " -"einfach auf eine Stelle klicken, wird ein quadratisches Objekt erzeugt. Wie " -"Sie die Eigenschaften des Rechteckobjekts ändern können, finden Sie in ." - -#: ../C/glabels.xml:574(term) ../C/glabels.xml:1148(guilabel) -msgid "Line" -msgstr "Linie" - -#: ../C/glabels.xml:576(para) -msgid "" -"Click the desired location of one end of the line object and drag to the " -"desired location of the other end. If you simply click in a single location, " -"a diagonal line will be created. To change properties of the line object, see " -"." -msgstr "" -"Klicken Sie auf die gewünschte Stelle für das Ende des Linienobjekts und " -"ziehen Sie zur gewünschten Stelle des anderen Endes. Wenn Sie einfach auf " -"eine Stelle klicken, wird eine diagonale Linie erzeugt. Wie Sie die " -"Eigenschaften des Linienobjekts ändern können, finden Sie in ." - -#: ../C/glabels.xml:585(term) -msgid "Ellipse" -msgstr "Ellipse" - -#: ../C/glabels.xml:587(para) -msgid "" -"Click the desired location of the upper left corner of the ellipse object and " -"drag to the desired location of the lower right corner. If you simply click " -"in a single location, a circle will be created. To change properties of the " -"ellipse object, see ." -msgstr "" -"Klicken Sie auf die gewünschte Stelle für die linke obere Ecke des " -"Ellipsenobjekts und ziehen Sie zur gewünschten rechten unteren Ecke. Wenn Sie " -"einfach auf eine Stelle klicken, wird ein Kreis erzeugt. Wie Sie die " -"Eigenschaften des Ellipsenobjekts ändern können, finden Sie in ." - -#: ../C/glabels.xml:596(term) -msgid "Image" -msgstr "Image" - -#: ../C/glabels.xml:598(para) -msgid "" -"Click the desired location of the upper left corner of the image object and " -"drag to the desired location of the lower right corner. If you simply click " -"in a single location, a square will be created. New image objects are " -"initialized with a simple checkerboard image. To change this image, or other " -"properties of the image object, see ." -msgstr "" -"Klicken Sie auf die gewünschte Stelle für die linke obere Ecke des " -"Bildobjekts und ziehen Sie zur gewünschten rechten unteren Ecke. Wenn Sie " -"einfach auf eine Stelle klicken, wird ein quadratisches Objekt erzeugt. Neue " -"Bildobjekte erhalten anfänglich ein Schachbrettmuster. Wie Sie dies oder " -"andere Eigenschaften des Bildobjekts ändern können, finden Sie in ." - -#: ../C/glabels.xml:609(term) -msgid "Barcode" -msgstr "Strichcode" - -#: ../C/glabels.xml:611(para) -msgid "" -"Click the desired location of the upper left corner of the barcode object. " -"New barcode objects are initialized to a POSTNET barcode with representative " -"data. To change data and properties of the barcode object, see ." -msgstr "" -"Klicken Sie auf die gewünschte Stelle für die linke obere Ecke des " -"Strichcodeobjekts und ziehen Sie zur gewünschten rechten unteren Ecke. Neue " -"Objekte erhalten anfänglich einen POSTNET-Strichcode mit Beispieldaten. Wie " -"Sie die Eigenschaften des Strichcodeobjekts ändern können, finden Sie in " -"." - -#: ../C/glabels.xml:626(title) -msgid "To Select Objects" -msgstr "Auswählen von Objekten" - -#: ../C/glabels.xml:628(para) -msgid "" -"A prerequisite for performing operations on objects is the selection of " -"individual objects or groups of objects. The display area must be in the " -"object selection mode to create new selections, as indicated by an arrow " -"cursor. The object selection mode is selected by the " -"ObjectsSelect Mode menu item, or the corresponding command on the Drawing " -"Toolbar." -msgstr "" -"Eine Voraussetzung zum Ausführen von Operationen auf Objekten ist die Auswahl " -"individueller Objekte oder Gruppen von Objekten. Der Anzeigebereich muss sich " -"im Objektauswahlmodus befinden, was durch einen pfeilförmigen Mauszeiger " -"angezeigt wird. Der Objektauswahlmodus wird über den Menüeintrag " -"ObjekteAuswahlmodus aktiviert oder über das entsprechende Objekt in der " -"Zeichenwerkzeugleiste." - -#: ../C/glabels.xml:641(term) -msgid "Selecting a single object" -msgstr "Auswahl eines einzelnen Objekts" - -#: ../C/glabels.xml:643(para) -msgid "" -"A single object can be selected simply by clicking on the desired object in " -"the display area. Once selected the object will be highlighted with a set of " -"resizing handles." -msgstr "" -"Ein einzelnes Objekt können Sie auswählen, indem Sie das gewünschte Objekt im " -"Anzeigebereich anklicken. Nach dem Anklicken wird das Objekt durch " -"Anfasspunkte zur Größenänderung hervorgehoben." - -#: ../C/glabels.xml:651(term) -msgid "Aggregate object selections" -msgstr "Auswahl mehrerer Objekte" - -#: ../C/glabels.xml:653(para) -msgid "" -"Multiple objects can be selected by first selecting the first object as above " -"and then by holding the Ctrl key while selecting additional " -"objects. Individual objects can be added to an existing selection at any time " -"by holding the Ctrl key while selecting the desired objects. " -"All objects can also be selected by using the EditSelect All menu item. All " -"objects in an aggregate object selection will be highlighted." -msgstr "" -"Sie können mehrere Objekte auswählen, indem Sie zunächst das erste Objekt " -"auswählen, wie oben beschrieben. Halten Sie dann bei der Auswahl weiterer " -"Objekte die Strg-Taste gedrückt. Zusätzliche Objekte können " -"Sie jederzeit zur Auswahl hinzufügen, wenn Sie wiederum die Strg-Taste gedrückt halten und die gewünschten Objekte auswählen. Alle " -"Objekte lassen sich über den Menüeintrag BearbeitenAlle auswählen auswählen. " -"Alle Objekte in einer zusammenhängenden Objektauswahl werden hervorgehoben " -"dargestellt." - -#: ../C/glabels.xml:667(term) -msgid "Area selections" -msgstr "Bereichsauswahl" - -#: ../C/glabels.xml:669(para) -msgid "" -"Multiple objects can also be selected by clicking an empty area and dragging " -"to form a rectangular area. When released, all objects contained in the area " -"will form an aggregate selection. An area selection can be used to add to an " -"existing selection by holding the Ctrl key while performing " -"the selection." -msgstr "" -"Sie können auch mehrere Objekte auswählen, indem Sie in einen leeren Bereich " -"klicken und mit der Maus die Form eines Rechtecks aufziehen. Daraufhin bilden " -"alle Objekte in diesem Bereich eine zusammenhängende Auswahl. Eine " -"Bereichsauswahl kann zum Hinzufügen einer vorhandenen Auswahl benutzt werden, " -"wenn Sie bei der Auswahl die Strg-Taste gedrückt halten." - -#: ../C/glabels.xml:679(term) -msgid "Unselecting objects" -msgstr "Auswahl von Objekten aufheben" - -#: ../C/glabels.xml:681(para) -msgid "" -"Individual objects can be removed from an existing selection by holding the " -"Ctrl key while clicking on a previously selected object. An " -"entire selection can be dismissed by using the EditUn-select All menu item or by " -"simply clicking any empty space in the display area. Once an object is " -"unselected its highlight is removed." -msgstr "" -"Sie können individuelle Objekte aus einer vorhandenen Auswahl entfernen, wenn " -"Sie beim Klicken auf ein zuvor ausgewähltes Objekt die Strg-" -"Taste gedrückt halten. Die gesamte Auswahl können Sie rückgängig machen, " -"indem Sie im Menü BearbeitenAlle " -"Markierungen löschen wählen. Sobald ein Objekt " -"nicht mehr ausgewählt ist, wird es nicht mehr hervorgehoben dargestellt." - -#: ../C/glabels.xml:698(title) -msgid "Clipboard Commands" -msgstr "Befehle für die Zwischenablage" - -#: ../C/glabels.xml:700(para) -msgid "" -"Object selections can be manipulated using the standard clipboard operations " -"Cut, Copy, " -"Paste, and Delete." -msgstr "" -"Objektauswahlen können durch die Standardoperationen der Zwischenablage " -"Ausschneiden, Kopieren, " -"Einfügen und Löschen " -"manipuliert werden." - -#: ../C/glabels.xml:711(keycap) ../C/glabels.xml:727(keycap) -#: ../C/glabels.xml:743(keycap) -msgid "Ctrl" -msgstr "Strg" - -#: ../C/glabels.xml:711(keycap) -msgid "X" -msgstr "X" - -#: ../C/glabels.xml:713(guimenuitem) -msgid "Cut" -msgstr "Ausschneiden" - -#: ../C/glabels.xml:717(para) -msgid "" -"Moves selected objects to the clipboard. The objects are then available for " -"pasting back into the current document or another document." -msgstr "" -"Verschiebt die ausgewählten Objekte in die Zwischenablage. Diese Objekte sind " -"dann verfügbar, um später in das aktuelle Dokument oder ein anderes Dokument " -"eingefügt zu werden." - -#: ../C/glabels.xml:727(keycap) -msgid "C" -msgstr "C" - -#: ../C/glabels.xml:729(guimenuitem) -msgid "Copy" -msgstr "Kopieren" - -#: ../C/glabels.xml:733(para) -msgid "" -"Copies selected objects to the clipboard without deleting them. The objects " -"are then available for pasting back into the current document or another " -"document." -msgstr "" -"Kopiert die ausgewählten Objekte in die Zwischenablage, ohne sie zu " -"entfernen. Diese Objekte sind dann verfügbar, um später in das aktuelle " -"Dokument oder ein anderes Dokument eingefügt zu werden." - -#: ../C/glabels.xml:743(keycap) -msgid "V" -msgstr "V" - -#: ../C/glabels.xml:745(guimenuitem) -msgid "Paste" -msgstr "Einfügen" - -#: ../C/glabels.xml:749(para) -msgid "" -"Pastes objects from the clipboard into the current document. " -"gLabels can only paste " -"objects from another gLabels document." -msgstr "" -"Fügt Objekte aus der Zwischenablage in das aktuelle Dokument ein. " -"gLabels kann nur Objekte aus anderen " -"gLabels-Dokumenten einfügen." - -#: ../C/glabels.xml:759(keycap) ../C/glabels.xml:761(guimenuitem) -msgid "Delete" -msgstr "Löschen" - -#: ../C/glabels.xml:765(para) -msgid "Deletes selected objects without placing them on the clipboard." -msgstr "" -"Entfernt die ausgewählten Objekte, ohne sie in die Zwischenablage zu " -"verschieben." - -#: ../C/glabels.xml:776(title) -msgid "To Edit Object Properties" -msgstr "Bearbeiten der Objekteigenschaften" - -#: ../C/glabels.xml:778(para) -msgid "" -"Most object properties can be modified through the object editor sidebar, " -"illustrated below. To use the object editor, a single object must first be " -"selected. See ." -msgstr "" -"Die meisten Objekteigenschaften können Sie über die Objekteditor-Seitenleiste " -"verändern, wie unten illustriert. Um den Objekteditor zu verwenden, muss " -"zunächst ein einzelnes Objekt ausgewählt werden. Siehe ." - -#: ../C/glabels.xml:785(title) -msgid "Object Editor Sidebar" -msgstr "Objekteditor-Seitenleiste" - -#. ==== End of Figure ==== -#: ../C/glabels.xml:796(para) -msgid "" -"The object editor will contain a subset of the following tabbed sections, " -"depending on object type:" -msgstr "" -"Der Objekteditor bietet eine Auswahl der folgenden Reiter, abhängig vom " -"Objekttyp:" - -#: ../C/glabels.xml:800(title) -msgid "Text Tabbed Section (Text objects)" -msgstr "Text-Reiter (Textobjekte)" - -#: ../C/glabels.xml:802(para) -msgid "" -"This section contains a small editor for changing the content of a text " -"object. It also contains a dropdown menu of available document merge keys, " -"that can be inserted into text." -msgstr "" -"Dieser Abschnitt bietet einen kleinen Editor zum Bearbeiten des Inhalts eines " -"Textobjekts. Weiterhin ist ein Ausklappmenü mit den verfügbaren Schlüsseln " -"zur Dokumentmischung enthalten, die in den Text eingefügt werden können." - -#: ../C/glabels.xml:809(title) -msgid "Image Tabbed Section (Image objecs)" -msgstr "Bild-Reiter (Bild-Objekte)" - -#: ../C/glabels.xml:811(para) -msgid "" -"This section contains a file entry with preview to select image files. The " -"browse button can be used to easily locate image files. Alternatively, a " -"document merge key can be used instead to provide a filename at print time." -msgstr "" -"Dieser Abschnitt enthält einen Dateiwähler mit Vorschau zur Auswahl von " -"Bilddateien. Der »Durchsuchen«-Knopf kann zum Suchen von Bilddateien benutzt " -"werden. Alternativ können Sie einen Schlüssel zur Dokumenteinmischung " -"anstelle eines Dateinamens angeben, der bei der Ausgabe des Dokuments ersetzt " -"wird." - -#: ../C/glabels.xml:819(title) -msgid "Data Tabbed Section (Barcode objecs)" -msgstr "Daten-Reiter (Strichcode-Objekte)" - -#: ../C/glabels.xml:821(para) -msgid "" -"This section contains a text entry to enter literal barcode data. " -"Alternatively, a document merge key can be used to provide this data at print " -"time." -msgstr "" -"Dieser Abschnitt enthält ein Textfeld zur Eingabe von Strichcode-Daten. " -"Alternativ kann hier ein Schlüssel zur Dokumentmischung eingetragen werden, " -"der beim Druck für die Bereitstellung der richtigen Daten sorgt." - -#: ../C/glabels.xml:828(title) -msgid "Style Tabbed Section (Text objects)" -msgstr "Stil-Reiter (Text-Objekte)" - -#: ../C/glabels.xml:830(para) -msgid "" -"This section contains controls to select text properties, including font " -"family, font size, font weight, color, and text justification." -msgstr "" -"Dieser Abschnitt enthält Einstellmöglichkeiten für die Texteigenschaften, wie " -"Schriftfamilie, Schriftgröße, Schriftstärke, Schriftfarbe und Ausrichtung des " -"Texts." - -#: ../C/glabels.xml:837(title) -msgid "Style Tabbed Section (Barcode objecs)" -msgstr "Stil-Reiter (Strichcode-Objekte)" - -#: ../C/glabels.xml:839(para) -msgid "" -"This section contains controls to select barcode properties, including " -"barcode style, color, whether to print text, and whether to include a " -"checksum digit." -msgstr "" -"Dieser Abschnitt enthält Einstellmöglichkeiten für die Eigenschaften des " -"Strichcodes, wie Stil, Farbe, Drucken von Text oder Beinhalten einer " -"Prüfsumme." - -#: ../C/glabels.xml:846(title) -msgid "Line Tabbed Section" -msgstr "Linie-Reiter" - -#: ../C/glabels.xml:848(para) -msgid "" -"This section contains controls to select properties of lines and outlines. " -"These properties include line width and color." -msgstr "" -"Dieser Abschnitt enthält Einstellmöglichkeiten für die Auswahl von " -"Eigenschaften von Linien und Begrenzungen, wie Linienbreite und -farbe." - -#: ../C/glabels.xml:854(title) -msgid "Fill Tabbed Section" -msgstr "Füllung-Reiter" - -#: ../C/glabels.xml:856(para) -msgid "" -"This section contains controls to select fill properties of box and ellipse " -"objects. Currently the only fill property is fill color." -msgstr "" -"Dieser Abschnitt enthält Einstellmöglichkeiten für die Auswahl der " -"Füllungseigenschaften von Rechteck- und Ellipsenobjekten. Derzeit ist nur die " -"Einstellung der Füllungsfarbe möglich." - -#: ../C/glabels.xml:863(title) -msgid "Size Tabbed Section (All except line objects)" -msgstr "Reiter »Größe« (alle außer Linienobjekte)" - -#: ../C/glabels.xml:865(para) -msgid "" -"This section contains controls to select the width and height of an object. A " -"checkbox is provided, so that the current aspect ratio can be locked while " -"manipulating the width and height controls. Image objects also provide a " -"button to reset the size to the image's natural size (Assumes 72DPI)." -msgstr "" -"Dieser Abschnitt enthält Einstellmöglichkeiten für die Höhe und die Breite " -"eines Objekts. Mit einem Ankreuzfeld können Sie die Werte aneinander koppeln, " -"so dass das Seitenverhältnis beim Ändern der Höhe oder Breite erhalten " -"bleibt. Für Bildobjekte gibt es außerdem einen Knopf zum Zurücksetzen des " -"Bildes auf Originalgröße, wobei eine Auflösung von 72 dpi angenommen wird." - -#: ../C/glabels.xml:874(title) -msgid "Size Tabbed Section (Line objects)" -msgstr "Reiter »Größe« (Linienobjekte)" - -#: ../C/glabels.xml:876(para) -msgid "" -"This section contains controls to select the length and angle of a line " -"object." -msgstr "" -"Dieser Abschnitt enthält Einstellmöglichkeiten für die Länge und den Winkel " -"eines Linienobjekts." - -#: ../C/glabels.xml:882(title) -msgid "Position Tabbed Section" -msgstr "Reiter »Position«" - -#: ../C/glabels.xml:884(para) -msgid "This section contains controls to change the position of an object." -msgstr "" -"Dieser Abschnitt beschreibt die Möglichkeiten zur Positionierung eines " -"Objekts." - -#: ../C/glabels.xml:891(title) -msgid "Shadow Tabbed Section (All except image and barcode objects)" -msgstr "Reiter »Schattierung« (alle außer Bild- und Strichcodeobjekten)" - -#: ../C/glabels.xml:893(para) -msgid "This section contains controls to add a shadow to an object." -msgstr "" -"Dieser Abschnitt enthält Einstellmöglichkeiten für die Schattierung eines " -"Objekts." - -#: ../C/glabels.xml:902(title) -msgid "Other Manipulations of Objects" -msgstr "Andere Manipulationen von Objekten" - -#: ../C/glabels.xml:904(para) -msgid "Objects can also be manipulated in the following ways." -msgstr "Objekte können auf die folgenden Arten manipuliert werden." - -#: ../C/glabels.xml:907(title) -msgid "Moving and Resizing Objects" -msgstr "Verschieben und Größenänderung von Objekten" - -#: ../C/glabels.xml:909(para) -msgid "" -"Objects can be moved by simply clicking on a selected object and dragging the " -"object to its new location. If the object is part of an aggregate selection, " -"all objects in the selection will move with the object being dragged, " -"maintaining their relative positions to one another. If no object is " -"selected, clicking on an object will create a new selection containing that " -"object. See ." -msgstr "" -"Objekte können Sie durch einfaches Anklicken und Ziehen des ausgewählten " -"Objekts zur neuen Position verschieben. Falls dieses Objekt Teil einer " -"Mehrfachauswahl ist, werden durch Ziehen dieses Objektes alle Objekte " -"verschoben, wobei deren Abstände untereinander erhalten bleiben. Falls kein " -"Objekt ausgewählt ist, wird durch Anklicken eines Objekts eine neue Auswahl " -"erzeugt, die dieses Objekt enthält. Siehe ." - -#: ../C/glabels.xml:917(para) -msgid "" -"A selected object can be resized by clicking one of its resize handle and " -"dragging it to obtain the new size." -msgstr "" -"Die Größe eines ausgewählten Objekts kann geändert werden, indem Sie auf " -"einen der Größenänderungs-Anfasspunkte klicken und diesen ziehen, um die " -"gewünschte Größe zu erreichen." - -#: ../C/glabels.xml:923(title) -msgid "Changing Stacking Order" -msgstr "Ändern der Reihenfolge der Ebenen" - -#: ../C/glabels.xml:925(para) -msgid "" -"Stacking order refers to relative position in the z-axis of objects. That is " -"when objects overlap, which object will appear on top of the other. By " -"default, newer objects will appear above older objects. To change this order, " -"select one or more objects and choose ObjectsOrderBring to Front to raise the selection to the top of the stacking " -"order, or choose ObjectsOrderSend to Back to lower the " -"selection to the bottom of the stacking order. These menuitems are also " -"available by right-clicking the display area when there is a non-empty " -"selection." -msgstr "" -"Die Stapelreihenfolge bezieht sich auf die relative Position in der Z-Achse " -"von Objekten. Das beschreibt beim Überlappen von Objekten, welches der " -"Objekte über den anderen erscheint. Per Vorgabe werden neue Objekte immer " -"oberhalb von bereits vorhandenen Objekten platziert. Um diese Anordnung zu " -"ändern, wählen Sie ObjekteAnordnungGanz nach vorn, um die Auswahl im Stapel nach oben zu verschieben, " -"oder ObjekteAnordnungGanz nach hinten, um die " -"Auswahl im Stapel nach unten zu verschieben. Diese Menüeinträge sind auch " -"durch einen Klick mit der rechten Maustaste auf den Ansichtsbereich " -"verfügbar, falls sich dort eine nicht leere Auswahl befindet." - -#: ../C/glabels.xml:943(title) -msgid "Rotating and Flipping Objects" -msgstr "Drehen und Spiegeln von Objekten" - -#: ../C/glabels.xml:945(para) -msgid "" -"Objects can be rotated 90 degrees in either direction, or flipped " -"horizontally or vertically, by choosing the appropriate menuitem in the " -"ObjectsRotate/Flip sub-menu. These menuitems are also available by right-clicking " -"the display area when there is a non-empty selection." -msgstr "" -"Objekte können um 90 Grad in jeder Richtung gedreht oder horizontal oder " -"vertikal gespiegelt werden. Wählen Sie hierzu den entsprechenden Eintrag im " -"Menü ObjekteDrehen/Spiegeln. Diese Menüeinträge sind auch verfügbar, wenn Sie " -"mit der rechten Maustaste in eine nicht leere Auswahl im Ansichtsbereich " -"klicken." - -#: ../C/glabels.xml:955(title) -msgid "Aligning Objects" -msgstr "Ausrichten von Objekten" - -#: ../C/glabels.xml:957(para) -msgid "" -"Objects can be aligned horizontally or vertically, relative to one another, " -"or relative to the center line of the label, by choosing the appropriate " -"menuitem from the ObjectsAlign " -"Horizontal or ObjectsAlign Horizontal sub-menus. " -"These menuitems are also available by right-clicking the display area when " -"there is a non-empty selection." -msgstr "" -"Objekte können horizontal oder vertikal zu einem anderen Objekt oder relativ " -"zu einer Mittellinie des Etiketts angeordnet werden, indem Sie " -"ObjekteHorizontal oder ObjekteVertikal wählen. Diese Menüeinträge sind auch verfügbar, " -"wenn Sie mit der rechten Maustaste in eine nicht leere Auswahl im " -"Ansichtsbereich klicken." - -#: ../C/glabels.xml:970(title) -msgid "Using the Property Bar" -msgstr "Verwendung der Eigenschaftsleiste" - -#: ../C/glabels.xml:972(para) -msgid "" -"The property bar can be used to change some common properties of objects en-" -"masse. These properties include font family, font size, font weight, text " -"alignment, text color, fill color, line or outline color, and line width. The " -"property bar also controls the defaults for these properties for any newly " -"created objects." -msgstr "" -"Mit der Eigenschaftsleiste können Sie einige Eigenschaften von Objekten in " -"einem Arbeitsgang ändern. Diese Eigenschaften umfassen Schriftfamilie, " -"Schriftgröße, Schriftstärke, Textausrichtung, Textfarbe, Füllfarbe, Farbe von " -"Linien oder Begrenzungen sowie Linienbreiten. Die Eigenschaftsleiste regelt " -"auch die Vorgaben für diese Eigenschaften, wenn neue Objekte erzeugt werden." - -#: ../C/glabels.xml:987(title) -msgid "Performing a Document Merge" -msgstr "Ausführung einer Dokumentmischung" - -#: ../C/glabels.xml:989(para) -msgid "" -"Document Merge (sometimes called \"Mail Merge\") is a powerful feature that " -"allows a unique label or card to be printed for each record in an external " -"data source." -msgstr "" -"Dokumentmischung ist ein mächtiges Funktionsmerkmal, das es Ihnen ermöglicht, " -"ein einzelnes Etikett oder eine einzelne Karte für jeden Datensatz aus einer " -"externen Datenquelle zu erstellen." - -#: ../C/glabels.xml:993(para) -msgid "" -"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 back-" -"ends only exist for text files and the evolution data server -- others are " -"planned. The currently supported text-file format is very simple: each line " -"is a record; fields are delimited by commas (CSV), tabs, 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 common way of creating CSV files is to export them from a " -"spreadsheet program." -msgstr "" -"Der erste Schritt zur Ausführung einer Dokumentmischung ist die Vorbereitung " -"eines Quelldokuments, welches die Daten zum Mischen enthält. Diese Daten " -"können aus E-Mail-Adressen oder anderen Daten bestehen, aus denen Sie die " -"einzelnen Etiketten oder Karten erstellen wollen. Gegenwärtig können als " -"Datenquellen entweder Textdateien oder die Daten des Evolution-Adressbuchs " -"verwendet werden, andere sind bereits in Planung. Das derzeit unterstützte " -"Textformat ist recht einfach: Jede Zeile stellt einen Datensatz dar, wobei " -"die einzelnen Felder durch Kommata (CSV), Tabulatoren oder Semikola getrennt " -"werden. Neue Zeilen werden durch einen Zeilenumbruch »\\n« erzeugt. Diese " -"Datei kann mit einem Texteditor, einem anderen Programm oder einem Skript " -"erstellt werden. Ein üblicher Weg der Erstellung ist der Export einer CSV-" -"Datei aus einer Tabellenkalkulation." - -#: ../C/glabels.xml:1005(para) -msgid "" -"A label must then be configured to \"point at\" this data file. To configure " -"the merge properties of a document, choose ObjectsMerge Properties menu item to " -"display the merge properties dialog. This dialog is used " -"to select the exact data file format and file name (location) of the merge " -"data." -msgstr "" -"Ein Etikett muss erstellt werden, das auf diese Datenquelle »zeigt«. Um die " -"Mischeigenschaften für ein Dokument festzulegen, wählen Sie " -"ObjekteMischeinstellungen. Der Dialog Mischeinstellungen " -"wird geöffnet. In diesem Dialog wählen Sie das genaue Dateiformat und den " -"Dateinamen (den Ort) der einzumischenden Daten aus." - -#: ../C/glabels.xml:1013(para) -msgid "" -"Finally, once the label has been configured for a data file, field keys can " -"be inserted into text objects and used as source or data for barcode objects " -"and image filenames for image objects. See for more information on using merge data for these object " -"types." -msgstr "" -"Zum Schluss, sobald das Etikett für die Datenquelle eingerichtet wurde, " -"können die Feldschlüssel in Textobjekte eingefügt werden, um sie als " -"Datenquelle für Strichcodeobjekte oder Bilder für Bildobjekte zu verwenden. " -"Weitere Informationen über die Verwendung der Mischdaten für diese " -"Objekttypen finden Sie in ." - -#: ../C/glabels.xml:1019(para) -msgid "" -"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, barcode, and image objects." -msgstr "" -"Da Ihr Etikett nun konfiguriert ist, druckt gLabels genau ein Etikett für jeden Datensatz des Quelldokuments, wobei " -"alle Text-, Bild- und Strichcode-Objekte durch die Einträge der Felder jedes " -"Datensatzes ersetzt werden." - -#: ../C/glabels.xml:1024(para) -msgid "" -"See for a detailed tutorial on the " -"document merge feature." -msgstr "" -"In finden Sie eine ausführliche " -"Anleitung für dieses Funktionsmerkmal." - -#: ../C/glabels.xml:1039(title) -msgid "Settings" -msgstr "Einstellungen" - -#: ../C/glabels.xml:1040(para) -msgid "" -"To configure gLabels, choose " -"SettingsPreferences. The Preferences dialog " -"contains the following tabbed sections:" -msgstr "" -"Um gLabels zu konfigurieren, wählen Sie " -"EinstellungenEinstellungen. Der Dialog Einstellungen " -"enthält die folgenden Reiter:" - -#: ../C/glabels.xml:1061(title) -msgid "Locale" -msgstr "Lokale Einstellungen" - -#: ../C/glabels.xml:1065(guilabel) -msgid "Units" -msgstr "Einheiten" - -#: ../C/glabels.xml:1067(para) -msgid "" -"Use this radio button group to specify your prefered units. Select one of the " -"following options:" -msgstr "" -"Verwenden Sie diese Radioknöpfe, um Ihre bevorzugten Maßeinheiten " -"festzulegen. Wählen Sie aus den folgenden Optionen:" - -#: ../C/glabels.xml:1072(guilabel) -msgid "Points" -msgstr "Punkte" - -#: ../C/glabels.xml:1073(para) -msgid "Use points (1 point = 1/72 in = 0.352778 mm)." -msgstr "Punkte verwenden (1 Punkt = 1/72 Zoll = 0.352778 mm)." - -#: ../C/glabels.xml:1077(guilabel) -msgid "Inches" -msgstr "Zoll" - -#: ../C/glabels.xml:1078(para) -msgid "Use inches." -msgstr "Zoll verwenden." - -#: ../C/glabels.xml:1082(guilabel) -msgid "Millimeters" -msgstr "Millimeter" - -#: ../C/glabels.xml:1083(para) -msgid "Use millimeters." -msgstr "Millimeter verwenden." - -#: ../C/glabels.xml:1086(para) -msgid "Default: Inches." -msgstr "Standard: Zoll." - -#: ../C/glabels.xml:1092(guilabel) -msgid "Default page size" -msgstr "Vorgegebene Seitengröße" - -#: ../C/glabels.xml:1094(para) -msgid "" -"Use this radio button group to specify your prefered page size. This will " -"make it quicker for you to locate media types when creating a new label or " -"card." -msgstr "" -"Verwenden Sie diese Radioknöpfe zur Auswahl Ihrer bevorzugten Papiergröße. " -"Dadurch lassen sich beim Erstellen neuer Etiketten oder Visitenkarten die " -"entsprechenden Papiertypen schneller finden." - -#: ../C/glabels.xml:1100(guilabel) -msgid "US Letter" -msgstr "US-Letter" - -#: ../C/glabels.xml:1101(para) -msgid "Most of your media will be of the US Letter page size (8.5 x 11 inches)." -msgstr "Die meisten Ihrer Medien haben das US-Letter-Format (8.5 x 11 inches)." - -#: ../C/glabels.xml:1105(guilabel) -msgid "ISO A4" -msgstr "ISO A4" - -#: ../C/glabels.xml:1106(para) -msgid "Most of your media will be of the ISO A4 page size (210 x 297 mm)." -msgstr "Die meisten Ihrer Medien haben das ISO-A4-Format (210 x 297 mm)." - -#: ../C/glabels.xml:1109(para) -msgid "Default: US Letter." -msgstr "Standard: US-Letter." - -#: ../C/glabels.xml:1118(title) -msgid "Object defaults" -msgstr "Objekt-Voreinstellungen" - -#: ../C/glabels.xml:1124(para) -msgid "" -"Use these controls to set the default properties of new text objects. These " -"properties are" -msgstr "" -"Verwenden Sie diese Einstellmöglichkeiten, um die Standardeigenschaften neuer " -"Textobjekte festzulegen. Diese Eigenschaften sind" - -#: ../C/glabels.xml:1129(guilabel) -msgid "Font" -msgstr "Schrift" - -#: ../C/glabels.xml:1130(para) -msgid "" -"These controls are used to select font family and font size, and whether the " -"font should bold or in italics." -msgstr "" -"Verwenden Sie diese Einstellmöglichkeiten, um die Schriftfamilie und -größe " -"festzulegen, sowie um anzugeben, ob die Schrift fett oder kursiv dargestellt " -"werden soll." - -#: ../C/glabels.xml:1135(guilabel) ../C/glabels.xml:1160(guilabel) -#: ../C/glabels.xml:1175(guilabel) -msgid "Color" -msgstr "Farbe" - -#: ../C/glabels.xml:1136(para) -msgid "This control selects the default text color." -msgstr "Diese Einstellung wählt die Standard-Textfarbe aus." - -#: ../C/glabels.xml:1140(guilabel) -msgid "Alignment" -msgstr "Ausrichtung" - -#: ../C/glabels.xml:1141(para) -msgid "" -"These controls are used to select the default text alignment (left, center or " -"right)." -msgstr "" -"Mit diesen Einstellungen wählen Sie die vorgegebene Textausrichtung (links, " -"mittig oder rechts)." - -#: ../C/glabels.xml:1150(para) -msgid "" -"Use these controls to set the default properties of lines and outlines of new " -"objects. These properties are" -msgstr "" -"Verwenden sie diese Einstellmöglichkeiten, um die Standardeigenschaften von " -"Begrenzungen und neuen Objekten festzulegen. Diese Eigenschaften sind" - -#: ../C/glabels.xml:1155(guilabel) -msgid "Width" -msgstr "Breite" - -#: ../C/glabels.xml:1156(para) -msgid "This control selects the default line width." -msgstr "Diese Einstellung wählt die Standard-Linienbreite aus." - -#: ../C/glabels.xml:1161(para) -msgid "This control selects the default line color." -msgstr "Diese Einstellung wählt die Standard-Linienfarbe aus." - -#: ../C/glabels.xml:1168(guilabel) -msgid "Fill" -msgstr "Füllen" - -#: ../C/glabels.xml:1170(para) -msgid "" -"Use these controls to set the default fill properties of new objects. These " -"properties are" -msgstr "" -"Verwenden Sie diese Einstellmöglichkeiten zum Angeben der " -"Füllungseigenschaften eines neuen Objekts. Diese Eigenschaften sind" - -#: ../C/glabels.xml:1176(para) -msgid "This control selects the default fill color." -msgstr "Diese Einstellung wählt die Standard-Füllfarbe aus." - -#: ../C/glabels.xml:1190(title) -msgid "Document Merge Tutorial" -msgstr "Anleitung zur Dokumentmischung" - -#: ../C/glabels.xml:1192(para) -msgid "" -"Document Merge (sometimes called \"Mail Merge\") is a powerful feature that " -"allows a unique label or card to be printed for each record in an external " -"data source. It is however, the most mis-understood feature of " -"glabels. The following examples will step through " -"a couple of common tasks using the document merge feature." -msgstr "" -"Dokumentmischung ist ein mächtiges Funktionsmerkmal, das es Ihnen ermöglicht, " -"ein einzelnes Etikett oder eine einzelne Karte für jeden Datensatz aus einer " -"externen Datenquelle zu erstellen. Es ist allerdings die am häufigsten " -"missverstandene Funktion in glabels. Die folgenden " -"Beispiele führen Sie schrittweise durch viele der Aufgaben, die Sie mit der " -"Dokumentmischung ausführen können." - -#: ../C/glabels.xml:1200(title) -msgid "Example 1: Name Tags" -msgstr "Beispiel 1: Namensschilder" - -#: ../C/glabels.xml:1202(para) -msgid "" -"In this example we are organizing an orientation party for the new crew " -"members of our ship. We have a list of freshman crew members that we created " -"in gnumeric and exported as the following CSV " -"file. We could have created this file by using a text editor, but heck it is " -"the 23rd century." -msgstr "" -"In diesem Beispiel organisieren Sie eine Orientierungsparty für die neuen " -"Mannschaftsmitglieder Ihres Schiffes. Eine Liste der neuen Mitglieder haben " -"Sie in gnumeric erstellt und in die folgende CSV-" -"Datei exportiert. Sie könnten diese Datei auch in einem Texteditor erstellen, " -"aber schließlich leben wir im 23. Jahrhundert..." - -#: ../C/glabels.xml:1208(programlisting) -#, no-wrap -msgid "" -"\n" -"Name,Department,SN\n" -"\"Jim Kirk\",Management,\"SC937-0176 CEC\"\n" -"\"Mr. Spock\",Sciences,S179-276SP\n" -"\"Leonard McCoy\",Medicine,unknown\n" -"\"Montgomery Scott\",Engineering,SE-197-54T\n" -" " -msgstr "" -"\n" -"Name,Department,SN\n" -"\"Jim Kirk\",Management,\"SC937-0176 CEC\"\n" -"\"Mr. Spock\",Sciences,S179-276SP\n" -"\"Leonard McCoy\",Medicine,unknown\n" -"\"Montgomery Scott\",Engineering,SE-197-54T\n" -" " - -#: ../C/glabels.xml:1216(para) -msgid "" -"In glabels we have created a new glabels document " -"using the Avery 5395 \"Name Badge Labels\" template. Next we use the " -"ObjectsMerge Properties menu item to display the merge " -"properties dialog. We use this dialog to select the source type " -"(in our case CSV) and the merge source (filename) as shown." -msgstr "" -"In glabels haben Sie ein neues Dokument unter " -"Verwendung der Dokumentvorlage »Avery 5395 Namensschild-Etiketten« erzeugt. " -"Zunächst öffnen Sie mittels ObjekteMischeinstellungen den Dialog " -"Mischeinstellungen. In diesem Dialog wählen Sie wie " -"gezeigt die Datenquelle aus, in diesem Fall CSV, sowie die Mischquelle " -"(Dateiname)." - -#: ../C/glabels.xml:1226(title) ../C/glabels.xml:1343(title) -msgid "Merge properties dialog" -msgstr "Mischeinstellungen-Dialog" - -#. ==== End of Figure ==== -#: ../C/glabels.xml:1237(para) -msgid "" -"Before applying the merge source, we uncheck the first record since it is " -"only column headers from our original gnumeric " -"spreadsheet and would simply waste our first label. We could also unselect " -"any other records that we didn't want to print a label for." -msgstr "" -"Bevor Sie eine neue Einmischquelle anwenden, sollten Sie den ersten Datensatz " -"deaktivieren, weil dieser nur Spaltenköpfe aus der originalen " -"gnumeric-Tabelle enthält. Dadurch würde nur das " -"erste Etikett verschwendet. Weiterhin können Sie alle anderen Datensätze " -"entfernen, die Sie nicht für ein Etikett verwenden wollen." - -#: ../C/glabels.xml:1242(para) ../C/glabels.xml:1360(para) -msgid "" -"We can also view each record in more detail by clicking on the appropriate " -"expander (the little triangles) as shown. Once we are satisfied with the " -"selections in this dialog we click OK to accept the " -"changes." -msgstr "" -"Sie können jeden Datensatz detailliert betrachten, indem Sie auf die kleinen " -"Dreiecke klicken. Sobald Sie mit der Auswahl zufrieden sind, klicken Sie auf " -"OK, um die Änderungen anzuwenden." - -#: ../C/glabels.xml:1247(para) ../C/glabels.xml:1365(para) -msgid "Now we start adding objects to our glabels document as shown." -msgstr "" -"Nun beginnen wir mit dem Hinzufügen von Objekten zu unserem gLabels-Dokument, " -"wie gezeigt." - -#: ../C/glabels.xml:1251(title) ../C/glabels.xml:1369(title) -msgid "Adding objects" -msgstr "Hinzufügen von Objekten" - -#. ==== End of Figure ==== -#: ../C/glabels.xml:1262(para) -msgid "" -"In this example we have added three text objects and a barcode object. The " -"first text object contains only simple literal text (\"Hello, my name is\"). " -"The second text object contains a single merge field (\"${1}\") corresponding " -"to the first field of a record (first column of a line) which contains the " -"new crew member's full name. The third text field contains both literal text " -"(\"Department: \") followed by a single merge field (\"${2}\") corresponding " -"to the second field or the crew member's department. The barcode object is " -"configured to use field (or key) \"3\" which contains our crew member's " -"starfleet serial number." -msgstr "" -"In diesem Beispiel haben Sie drei Textobjekte und ein Strichcodeobjekt " -"hinzugefügt. Das erste Textobjekt enthält nur einfachen Text (»Hello, my name " -"is«). Das zweite Textobjekt enthält ein einfaches Mischfeld (»${1}«), welches " -"zum ersten Feld eines Datensatzes (erste Spalte einer Zeile) korrespondiert, " -"die den vollen Namen eines Mannschaftsmitglieds enthält. Das dritte Feld " -"enthält sowohl einfachen Text (»Department:«) als auch ein einzelnes Mischfeld " -"(»${2}«), welches zum zweiten Feld oder zum Arbeitsgebiet eines " -"Mannschaftsmitglieds korrespondiert. Das Strichcodefeld ist so eingestellt, " -"das Feld (oder den Schlüssel) »3« zu verwenden, das die Sternenflotten-" -"Seriennummer des Mannschaftsmitglieds enthält." - -#: ../C/glabels.xml:1272(para) -msgid "" -"Now we can print our name tags by selecting the FilePrint menu item. This will " -"display print dialog as shown below." -msgstr "" -"Nun können Sie Ihre Namensschilder drucken, indem Sie " -"DateiDrucken wählen. Der unten angezeigte Druckdialog wird geöffnet." - -#: ../C/glabels.xml:1279(title) -msgid "Printing name tags" -msgstr "Drucken der Namensschilder" - -#. ==== End of Figure ==== -#: ../C/glabels.xml:1290(para) ../C/glabels.xml:1405(para) -msgid "" -"Just to make sure our labels are going to look okay, we select the " -"Print outlines option and click Print " -"Preview. This will display a print preview dialog as shown below." -msgstr "" -"Um sicher zu stellen, dass Ihre Etiketten gut aussehen, wählen Sie die Option " -"Begrenzungen drucken und klicken auf " -"Druckvorschau. Der Druckvorschaudialog wird geöffnet, " -"wie unten angezeigt." - -#: ../C/glabels.xml:1297(title) -msgid "Name tags preview" -msgstr "Vorschau der Namensschilder" - -#. ==== End of Figure ==== -#: ../C/glabels.xml:1308(para) -msgid "" -"Everything looks good, so we can now load up our printer with the appropriate " -"label stock, print our name tags and start beaming our guests aboard." -msgstr "" -"Alles sieht gut aus, also können wir jetzt den Drucker mit den entsprechenden " -"Etiketten bestücken, die Namensschilder drucken und die Gäste an Bord beamen." - -#: ../C/glabels.xml:1315(title) -msgid "Example 2: Address Labels" -msgstr "Beispiel 2: Adressetiketten" - -#: ../C/glabels.xml:1317(para) -msgid "" -"In this example we are going to throw a party and need to print mailing " -"address labels for our invitations. We have a list of our closest friends " -"that we created in gnumeric and exported as the " -"following CSV file. It should be noted that not everyone has a middle initial " -"or a two line address." -msgstr "" -"In diesem Beispiel planen Sie eine Party. Dafür benötigen Sie Adressetiketten " -"für die Einladungen. Sie haben eine Liste Ihrer besten Freunde in " -"gnumeric erstellt, die Sie in die folgende CSV-" -"Datei exportiert haben. Es ist zu beachten, dass nicht jeder einen zweiten " -"Vornamen oder eine zweizeilige Adresse hat." - -#: ../C/glabels.xml:1323(programlisting) -#, no-wrap -msgid "" -"\n" -"LAST,FIRST,MI,ADDR1,ADDR2,CITY,STATE,ZIP\n" -",,,,,,,\n" -"Critter,Ess,S,\"123 Faux St.\",,Alexandria,VA,22310\n" -"Doe,John,,\"Apt 1X\",\"451 Mystery St.\",Trenton,NJ,08601\n" -"Summers,Joyce,,\"1630 Revello Dr\",,Sunnydale,CA,95037\n" -"McGarret,Steve,O,\"404 Piikoi Street\",,Honolulu,HI,96813\n" -"Kramer,Cosmo,,\"Apt 5B\",\"129 W. 81 St.\",\"New York\",NY,10024-7207\n" -" " -msgstr "" -"\n" -"LAST,FIRST,MI,ADDR1,ADDR2,CITY,STATE,ZIP\n" -",,,,,,,\n" -"Critter,Ess,S,\"123 Faux St.\",,Alexandria,VA,22310\n" -"Doe,John,,\"Apt 1X\",\"451 Mystery St.\",Trenton,NJ,08601\n" -"Summers,Joyce,,\"1630 Revello Dr\",,Sunnydale,CA,95037\n" -"McGarret,Steve,O,\"404 Piikoi Street\",,Honolulu,HI,96813\n" -"Kramer,Cosmo,,\"Apt 5B\",\"129 W. 81 St.\",\"New York\",NY,10024-7207\n" -" " - -#: ../C/glabels.xml:1333(para) -msgid "" -"In glabels we have created a new glabels document " -"using the Avery 5512 \"Address Labels\" template. Next we use the " -"ObjectsMerge Properties menu item to display the merge " -"properties dialog. We use this dialog to select the source type " -"(in our case CSV) and the merge source (filename) as shown." -msgstr "" -"In glabels haben Sie ein neues Dokument unter " -"Verwendung der Dokumentvorlage »Avery 5512 Adressetiketten« erzeugt. Zunächst " -"öffnen Sie mittels ObjekteMischeinstellungen den Dialog " -"Mischeinstellungen. In diesem Dialog wählen Sie wie " -"gezeigt die Datenquelle aus, in diesem Fall CSV, sowie die Mischquelle " -"(Dateiname)." - -#. ==== End of Figure ==== -#: ../C/glabels.xml:1354(para) -msgid "" -"Before applying the merge source, we uncheck the first record since it is " -"only column headers from our original gnumeric " -"spreadsheet and would simply waste our first label. We also unselect the " -"second record which is empty (an artifact of our original spreadsheet). We " -"could also unselect any other records that we didn't want to print a label " -"for." -msgstr "" -"Bevor Sie eine neue Einmischquelle anwenden, sollten Sie den ersten Datensatz " -"deaktivieren, weil dieser nur Spaltenköpfe aus der originalen " -"gnumeric-Tabelle enthält. Dadurch würde nur das " -"erste Etikett verschwendet. Weiterhin können Sie alle anderen Datensätze " -"entfernen, die Sie nicht für ein Etikett verwenden wollen." - -#. ==== End of Figure ==== -#: ../C/glabels.xml:1380(para) -msgid "" -"In this example we have a single text object. This text object contains all " -"of our merge fields organized on multiple lines as a mailing address. Notice " -"that fields ${4} and ${5} (corresponding to ADDR1 and ADDR2) are each located " -"with no other text on their own lines. When glabels encounters a field as the only text on a line, it will not " -"expand the line if the field is empty." -msgstr "" -"In diesem Beispiel haben Sie ein einzelnes Textobjekt. Dieses Textobjekt " -"enthält alle Einmischfelder, angeordnet in mehreren Zeilen wie eine " -"Versandadresse. Beachten Sie, dass die Felder ${4} und ${5} (korrespondierend " -"zu ADDR1 und ADDR2) jeweils keinen weiteren Text in deren Zeilen enthalten. " -"Wenn glabels ein solches Feld als »nur Text« in " -"einer Zeile erkennt, wird die Zeile nicht expandiert, falls das Feld leer ist." - -#: ../C/glabels.xml:1387(para) -msgid "" -"Now we can print our address labels by selecting the " -"FilePrint menu item. This will display print dialog as shown below." -msgstr "" -"Nun können Sie Ihre Adressetiketten drucken, indem Sie " -"DateiDrucken wählen. Der unten angezeigte Druckdialog wird geöffnet." - -#: ../C/glabels.xml:1394(title) -msgid "Printing address labels" -msgstr "Adressetiketten drucken" - -#: ../C/glabels.xml:1412(title) -msgid "Address labels preview" -msgstr "Adressetiketten-Vorschau" - -#. ==== End of Figure ==== -#: ../C/glabels.xml:1423(para) -msgid "" -"Everything looks good, so we can now load up our printer with the appropriate " -"label stock, print our address labels and start mailing our party invitations." -msgstr "" -"Alles sieht gut aus, also können wir jetzt den Drucker mit den entsprechenden " -"Etiketten bestücken, die Adressetiketten drucken und die Einladungen zur " -"Party versenden." - -#: ../C/glabels.xml:1436(title) -msgid "Manually Creating New Templates" -msgstr "Manuelles Erstellen neuer Vorlagen" - -#: ../C/glabels.xml:1438(para) -msgid "" -"Predefined templates are defined by XML files located in ${prefix}/" -"share/glabels/, where ${prefix} is usually " -"something like /usr/local or /usr " -"depending on the configuration option prefix. gLabels " -"will use all files of the form *-templates.xml or " -"*.template, that it finds in ${prefix}/share/" -"glabels/ and ${HOME}/.glabels/. Additional " -"templates can be added by creating additional *.template " -"files in either of these directories." -msgstr "" -"Vordefinierte Vorlagen sind als XML-Dateien verfügbar, die in " -"${prefix}/share/glabels/ gespeichert sind, wobei " -"${prefix} üblicherweise /usr/local oder " -"/usr ist, abhängig von der Konfigurationsoption " -"prefix. gLabels verwendet " -"alle Dateien der Form *-templates.xml oder *." -"template, die es in ${prefix}/share/glabels/ " -"und ${HOME}/.glabels/ findet. Zusätzliche Vorlagen " -"können unter Verwendung der Dateiendung *.template in " -"einem dieser Ordner gespeichert werden." - -#: ../C/glabels.xml:1451(para) -msgid "" -"The format for these files is defined in the DTD: glabels-2.2.dtd. (This DTD also describes other XML formats used by glabels.)" -msgstr "" -"Das Format dieser Dateien ist in einer DTD definiert: glabels-2.2." -"dtd. Diese DTD beschreibt außerdem weitere von gLabels benutzte XML-" -"Formate." - -#: ../C/glabels.xml:1457(title) -msgid "Assumptions/caveats" -msgstr "Voraussetzungen" - -#: ../C/glabels.xml:1460(para) -msgid "" -"A sheet contains only one size of label or card (if a sheet contains more " -"than one size of item, it can be split into multiple templates for multiple " -"pass printing)" -msgstr "" -"Eine Seite enthält nur eine Etiketten- oder Kartengröße. Falls eine Seite " -"mehrere Größen enthält, kann sie für das Drucken in mehreren Durchläufen über " -"mehrere Vorlagen verteilt werden." - -#: ../C/glabels.xml:1465(para) -msgid "" -"Distances can be expressed in units of pt, in, mm, cm, or pc. For example: \"1.0in\" or \"2.54cm\". If no units are specified, computer points (pt) will be assumed (1 pt = 1/72 in = 0.352778 mm)." -msgstr "" -"Abstände können in den Einheiten pt, in, mm, cm oder " -"pc ausgedrückt werden. Beispiel: »1.0in« oder »2.54cm«. Falls keine Einheiten angegeben " -"werden, nimmt der Rechner Punkt an. ein Punkt (pt) " -"entspricht = 1/72 in = 0.352778 mm." - -#: ../C/glabels.xml:1478(title) -msgid "Template Files" -msgstr "Vorlagedateien" - -#: ../C/glabels.xml:1480(programlisting) -#, no-wrap -msgid "" -"\n" -"<?xml version=\"1.0\"?>\n" -"<Glabels-templates>\n" -"\n" -" ...templates...\n" -"\n" -"</Glabels-templates>\n" -" " -msgstr "" -"\n" -"<?xml version=\"1.0\"?>\n" -"<Glabels-templates>\n" -"\n" -" ...Vorlagen...\n" -"\n" -"</Glabels-templates>\n" -" " - -#: ../C/glabels.xml:1492(title) -msgid "Example Template" -msgstr "Beispielvorlage" - -#: ../C/glabels.xml:1493(programlisting) -#, no-wrap -msgid "" -"\n" -" <Template brand=\"Avery\" part=\"8160\" size=\"US-Letter\" description=\"Mailing Labels\">\n" -" <Label-rectangle id=\"0\" width=\"189pt\" height=\"72pt\" round=\"5pt\">\n" -" <Markup-margin size=\"5pt\"/>\n" -" <Layout nx=\"3\" ny=\"10\" x0=\"11.25pt\" y0=\"36pt\" dx=\"200pt\" dy=\"72pt\"/>\n" -" </Label-rectangle>\n" -" <Alias brand=\"Avery\" part=\"5160\"/>\n" -" <Alias brand=\"Avery\" part=\"6233\"/>\n" -" </Template>\n" -" " -msgstr "" -"\n" -" <Template brand=\"Avery\" part=\"8160\" size=\"US-Letter\" description=\"Mailing Labels\">\n" -" <Label-rectangle id=\"0\" width=\"189pt\" height=\"72pt\" round=\"5pt\">\n" -" <Markup-margin size=\"5pt\"/>\n" -" <Layout nx=\"3\" ny=\"10\" x0=\"11.25pt\" y0=\"36pt\" dx=\"200pt\" dy=\"72pt\"/>\n" -" </Label-rectangle>\n" -" <Alias brand=\"Avery\" part=\"5160\"/>\n" -" <Alias brand=\"Avery\" part=\"6233\"/>\n" -" </Template>\n" -" " - -#: ../C/glabels.xml:1506(title) -msgid "Template Node" -msgstr "Knoten »Template«" - -#: ../C/glabels.xml:1508(para) -msgid "" -"A Template node describes a single stationary product. " -"It must contain one instance of any type of Label node (Label-" -"rectangle, Label-round, or Label-" -"cd). This node can be followed by zero or more Alias nodes." -msgstr "" -"Ein Template-Knoten beschreibt ein einzelnes Produkt. Es " -"muss eine Instanz eines der anderen Label-Knoten (Label-rectangle, Label-round, or Label-cd) enthalten. Auf diesen Knoten können einer, mehrere oder kein " -"Alias-Knoten folgen." - -#: ../C/glabels.xml:1522(para) ../C/glabels.xml:1597(para) -#: ../C/glabels.xml:1674(para) ../C/glabels.xml:1719(para) -#: ../C/glabels.xml:1795(para) ../C/glabels.xml:1828(para) -#: ../C/glabels.xml:1879(para) ../C/glabels.xml:1922(para) -#: ../C/glabels.xml:1981(para) ../C/glabels.xml:2058(para) -msgid "Property" -msgstr "Eigenschaft" - -#: ../C/glabels.xml:1525(para) ../C/glabels.xml:1600(para) -#: ../C/glabels.xml:1677(para) ../C/glabels.xml:1722(para) -#: ../C/glabels.xml:1798(para) ../C/glabels.xml:1831(para) -#: ../C/glabels.xml:1882(para) ../C/glabels.xml:1925(para) -#: ../C/glabels.xml:1984(para) ../C/glabels.xml:2061(para) -msgid "Description" -msgstr "Beschreibung" - -#: ../C/glabels.xml:1531(para) ../C/glabels.xml:2067(para) -msgid "brand" -msgstr "brand" - -#: ../C/glabels.xml:1533(para) -msgid "Brand or manufacturer of stationary product. E.g. \"Avery\"" -msgstr "Marke oder Hersteller des Produkts, z.B. »Avery«" - -#: ../C/glabels.xml:1538(para) ../C/glabels.xml:2073(para) -msgid "part" -msgstr "part" - -#: ../C/glabels.xml:1540(para) -msgid "Part number or name of stationary product. E.g. \"8160\"" -msgstr "Bestellnummer oder Name des Produkts, z.B. »8160«" - -#: ../C/glabels.xml:1545(para) ../C/glabels.xml:1804(para) -msgid "size" -msgstr "size" - -#: ../C/glabels.xml:1547(para) -msgid "Size of sheet. E.g., \"US-Letter,\" \"A4\", ..." -msgstr "Größe des Papiers, z.B. »US-Letter«, »A4«, …" - -#: ../C/glabels.xml:1551(para) -msgid "description" -msgstr "description" - -#: ../C/glabels.xml:1553(para) -msgid "Description of stationary product. E.g, \"Mailing Labels.\"" -msgstr "Beschreibung des Produkts, z.B. »Mailing Labels«." - -#: ../C/glabels.xml:1558(para) -msgid "_description" -msgstr "_description" - -#: ../C/glabels.xml:1560(para) -msgid "" -"Translatable description of stationary product. E.g, \"Mailing Labels." -"\" (Only useful for predefined templates)" -msgstr "" -"Übersetzbare Beschreibung des Produkts, z.B. »Mailing Labels« (nur sinnvoll " -"für vordefinierte Vorlagen)" - -#: ../C/glabels.xml:1566(para) ../C/glabels.xml:1612(para) -#: ../C/glabels.xml:1742(para) -msgid "width" -msgstr "width" - -#: ../C/glabels.xml:1568(para) -msgid "Page width. Only valid if size=\"Other\"" -msgstr "Seitenbreite. Nur gültig, wenn als Größe »Other« festgelegt ist." - -#: ../C/glabels.xml:1572(para) ../C/glabels.xml:1616(para) -#: ../C/glabels.xml:1749(para) -msgid "height" -msgstr "height" - -#: ../C/glabels.xml:1574(para) -msgid "Page height. Only valid if size=\"Other\"" -msgstr "Seitenhöhe. Nur gültig, wenn als Größe »Other« festgelegt ist." - -#: ../C/glabels.xml:1584(title) -msgid "Label-rectangle Node" -msgstr "Knoten »Label-rectangle«" - -#: ../C/glabels.xml:1586(para) -msgid "" -"A Label-rectangle node describes the dimensions of a " -"single label or business card that is rectangular in shape (may have rounded " -"edges)." -msgstr "" -"Ein Label-rectangle-Knoten beschreibt die Abmessungen " -"eines einzelnen Etiketts oder einer einzelnen Karte in rechteckiger Form, " -"wobei abgerundete Ecken möglich sind." - -#: ../C/glabels.xml:1606(para) ../C/glabels.xml:1683(para) -#: ../C/glabels.xml:1728(para) -msgid "id" -msgstr "id" - -#: ../C/glabels.xml:1608(para) ../C/glabels.xml:1685(para) -#: ../C/glabels.xml:1730(para) -msgid "Reserved for future use. Should always be 0." -msgstr "Für zukünftige Verwendung reserviert. Sollte immer 0 sein." - -#: ../C/glabels.xml:1613(para) -msgid "Width of label/card" -msgstr "Breite des Etiketts oder der Karte" - -#: ../C/glabels.xml:1617(para) -msgid "Height of label/card" -msgstr "Höhe des Etiketts oder der Karte" - -#: ../C/glabels.xml:1620(para) -msgid "round" -msgstr "round" - -#: ../C/glabels.xml:1622(para) -msgid "" -"Radius of corners. For items with square edges (business cards), the radius " -"should be 0." -msgstr "" -"Radius der Ecken. Für Objekte mit nicht abgerundeten Ecken (Visitenkarten) " -"sollte der Radius 0 sein." - -#: ../C/glabels.xml:1627(para) -msgid "x_waste" -msgstr "x_waste" - -#: ../C/glabels.xml:1629(para) -msgid "" -"Amount of horizontal waste (over-print) to allow. This is useful for " -"minimizing alignment problems when using non-white backgrounds (e.g. images)." -msgstr "" -"Erlaubte Breite des horizontalen Überdruckens. Dies minimiert " -"Ausrichtungsprobleme auf anderen als weißen Hintergründen (z.B. Bilder)." - -#: ../C/glabels.xml:1635(para) -msgid "y_waste" -msgstr "y_waste" - -#: ../C/glabels.xml:1637(para) -msgid "" -"Amount of vertical waste (over-print) to allow. This is useful for minimizing " -"alignment problems when using non-white backgrounds (e.g. images)." -msgstr "" -"Erlaubte Breite des vertikalen Überdruckens. Dies minimiert " -"Ausrichtungsprobleme auf anderen als weißen Hintergründen (z.B. Bilder)." - -#: ../C/glabels.xml:1648(title) -msgid "Label-rectangle Parameters" -msgstr "Parameter zu Label-rectangle " - -#: ../C/glabels.xml:1662(title) -msgid "Label-round Node" -msgstr "Knoten »Label-round«" - -#: ../C/glabels.xml:1664(para) -msgid "" -"A Label-round node describes the dimensions of a simple " -"round label (not a CD)." -msgstr "" -"Ein Label-round-Knoten beschreibt die Abmessungen eines " -"einfachen Rundetiketts (nicht einer CD)." - -#: ../C/glabels.xml:1689(para) ../C/glabels.xml:1734(para) -#: ../C/glabels.xml:1900(para) -msgid "radius" -msgstr "radius" - -#: ../C/glabels.xml:1690(para) -msgid "Radius (1/2 diameter) of label" -msgstr "Radius (halber Durchmesser) des Etiketts" - -#: ../C/glabels.xml:1693(para) ../C/glabels.xml:1756(para) -msgid "waste" -msgstr "waste" - -#: ../C/glabels.xml:1695(para) ../C/glabels.xml:1758(para) -msgid "" -"Amount of waste (over-print) to allow. This is useful for minimizing " -"alignment problems when using non-white backgrounds (e.g. images)." -msgstr "" -"Erlaubte Breite des Überdruckens. Dies minimiert Ausrichtungsprobleme auf " -"anderen als weißen Hintergründen (z.B. Bilder)." - -#: ../C/glabels.xml:1707(title) -msgid "Label-cd Node" -msgstr "Knoten »Label-cd«" - -#: ../C/glabels.xml:1709(para) -msgid "" -"A Label-cd node describes the dimensions of a CD, DVD, " -"or business card CD." -msgstr "" -"Ein Label-cd-Knoten beschreibt die Abmessungen einer CD, " -"DVD oder Visitenkarten-CD." - -#: ../C/glabels.xml:1735(para) -msgid "Outer radius of label" -msgstr "Äußerer Radius des Etiketts" - -#: ../C/glabels.xml:1738(para) -msgid "hole" -msgstr "hole" - -#: ../C/glabels.xml:1739(para) -msgid "Radius of concentric hole" -msgstr "Radius des Mittellochs" - -#: ../C/glabels.xml:1744(para) -msgid "" -"If present, the label is clipped to the given width. (Useful for \"business " -"card CDs\")." -msgstr "" -"Falls vorhanden, wird das Etikett auf die angegebene Größe begrenzt (nützlich " -"für »Visitenkarten-CDs«)" - -#: ../C/glabels.xml:1751(para) -msgid "" -"If present, the label is clipped to the given height. (Useful for \"business " -"card CDs\")." -msgstr "" -"Falls vorhanden, wird das Etikett auf die angegebene Höhe begrenzt (nützlich " -"für »Visitenkarten-CDs«)" - -#: ../C/glabels.xml:1769(title) -msgid "CD Label Parameters" -msgstr "CD-Label-Parameter" - -#: ../C/glabels.xml:1783(title) -msgid "Markup-margin Node" -msgstr "Knoten »Markup-margin«" - -#: ../C/glabels.xml:1785(para) -msgid "" -"A Markup-margin describes a margin along all edges of a " -"label." -msgstr "" -"Ein Markup-margin-Knoten beschreibt die Ränder entlang " -"der Seiten eines Etiketts." - -#: ../C/glabels.xml:1806(para) -msgid "" -"Size of the margin. I.e. the distance of the margin line from the edge of the " -"card/label." -msgstr "" -"Randbreite. Die Breite des Bereichs zwischen der Randlinie und dem Rand des " -"Etiketts/der Karte." - -#: ../C/glabels.xml:1817(title) -msgid "Markup-line Node" -msgstr "Knoten »Markup-line«" - -#: ../C/glabels.xml:1819(para) -msgid "A Markup-line describes a markup line." -msgstr "" -"Ein Markup-line-Knoten beschreibt eine Markierungslinie." - -#: ../C/glabels.xml:1837(para) ../C/glabels.xml:1931(para) -msgid "x1" -msgstr "x1" - -#: ../C/glabels.xml:1839(para) -msgid "x coordinate of 1st endpoint of the line segment." -msgstr "x-Koordinate des Anfangspunkts des Linienabschnitts." - -#: ../C/glabels.xml:1843(para) ../C/glabels.xml:1937(para) -msgid "y1" -msgstr "y1" - -#: ../C/glabels.xml:1845(para) -msgid "y coordinate of 1st endpoint of the line segment." -msgstr "y-Koordinate des Anfangspunkts des Linienabschnitts." - -#: ../C/glabels.xml:1849(para) -msgid "x2" -msgstr "x2" - -#: ../C/glabels.xml:1851(para) -msgid "x coordinate of 2nd endpoint of the line segment." -msgstr "x-Koordinate des Endpunkts des Linienabschnitts." - -#: ../C/glabels.xml:1855(para) -msgid "y2" -msgstr "y2" - -#: ../C/glabels.xml:1857(para) -msgid "y coordinate of 2nd endpoint of the line segment." -msgstr "y-Koordinate des Endpunkts des Linienabschnitts." - -#: ../C/glabels.xml:1867(title) -msgid "Markup-circle Node" -msgstr "Knoten »Markup-circle«" - -#: ../C/glabels.xml:1869(para) -msgid "A Markup-circle describes a markup circle." -msgstr "" -"Ein Markup-circle-Knoten beschreibt einen " -"Markierungskreis." - -#: ../C/glabels.xml:1888(para) ../C/glabels.xml:2004(para) -msgid "x0" -msgstr "x0" - -#: ../C/glabels.xml:1890(para) -msgid "x coordinate of circle origin (center)." -msgstr "x-Koordinate des Kreismittelpunkts." - -#: ../C/glabels.xml:1894(para) ../C/glabels.xml:2011(para) -msgid "y0" -msgstr "y0" - -#: ../C/glabels.xml:1896(para) -msgid "y coordinate of circle origin (center)." -msgstr "y-Koordinate des Kreismittelpunkts." - -#: ../C/glabels.xml:1901(para) -msgid "Radius of circle." -msgstr "Radius des Kreises." - -#: ../C/glabels.xml:1910(title) -msgid "Markup-rect Node" -msgstr "Knoten »Markup-rect«" - -#: ../C/glabels.xml:1912(para) -msgid "A Markup-rect describes a markup rectangle." -msgstr "" -"Ein Markup-rect-Knoten beschreibt ein " -"Markierungsrechteck." - -#: ../C/glabels.xml:1933(para) -msgid "x coordinate of upper left corner of rectangle." -msgstr "x-Koordinate der oberen linken Ecke des Rechtecks." - -#: ../C/glabels.xml:1939(para) -msgid "y coordinate of upper left corner of rectangle." -msgstr "y-Koordinate der oberen linken Ecke des Rechtecks." - -#: ../C/glabels.xml:1943(para) -msgid "w" -msgstr "w" - -#: ../C/glabels.xml:1945(para) -msgid "Width of rectangle." -msgstr "Breite des Rechtecks." - -#: ../C/glabels.xml:1949(para) -msgid "h" -msgstr "h" - -#: ../C/glabels.xml:1951(para) -msgid "Height of rectangle." -msgstr "Höhe des Rechtecks." - -#: ../C/glabels.xml:1955(para) -msgid "r" -msgstr "r" - -#: ../C/glabels.xml:1956(para) -msgid "Radius of rounded corners of rectangle." -msgstr "Radius der abgerundeten Ecken des Rechtecks." - -#: ../C/glabels.xml:1965(title) -msgid "Layout Node" -msgstr "Knoten »Layout«" - -#: ../C/glabels.xml:1967(para) -msgid "" -"A label node may contain multiple Layout children. If " -"labels are arranged in a simple grid pattern, only one layout is needed. " -"However, if labels are arranged in multiple grids, such as a running bond " -"pattern, multiple layout tags can be used. Note: a " -"single label can always be treated as a grid of one." -msgstr "" -"Ein Label-Knoten kann mehrere Layout-Unterknoten " -"enthalten. Wenn die Etiketten in einem einfachen rechteckigen Raster " -"angeordnet sind, dann wird nur ein Layout benötigt. Falls die Etiketten " -"jedoch in komplizierteren Rasteranordnungen vorliegen, können mehrere " -"Layout-Unterknoten verwendet werden. Beachten Sie, dass " -"ein einzelnes Etikett immer auch als ein Raster aus Etiketten betrachtet " -"werden kann." - -#: ../C/glabels.xml:1990(para) -msgid "nx" -msgstr "nx" - -#: ../C/glabels.xml:1992(para) -msgid "Number of labels/cards across in the grid (horizontal)" -msgstr "Anzahl der Etiketten/Karten im Raster in horizontaler Richtung" - -#: ../C/glabels.xml:1997(para) -msgid "ny" -msgstr "ny" - -#: ../C/glabels.xml:1999(para) -msgid "Number of labels/cards up and down in the grid (vertical)" -msgstr "Anzahl der Etiketten/Karten im Raster in vertikaler Richtung" - -#: ../C/glabels.xml:2006(para) -msgid "" -"Distance from left edge of sheet to the left edge of the left column of cards/" -"labels in the layout." -msgstr "" -"Abstand von linken Rand des Papiers zum linken Rand der linken Reihe der " -"Karten/Etiketten im Layout." - -#: ../C/glabels.xml:2013(para) -msgid "" -"Distance from the top edge of sheet to the top edge of the top row of labels/" -"cards in the layout." -msgstr "" -"Abstand von oberen Rand des Papiers zum oberen Rand der oberen Reihe der " -"Karten/Etiketten im Layout." - -#: ../C/glabels.xml:2018(para) -msgid "dx" -msgstr "dx" - -#: ../C/glabels.xml:2019(para) -msgid "Horizontal pitch of grid." -msgstr "Horizontaler Rasterabstand des Zeichengitters." - -#: ../C/glabels.xml:2022(para) -msgid "dy" -msgstr "dy" - -#: ../C/glabels.xml:2023(para) -msgid "Vertical pitch of grid." -msgstr "Vertikaler Rasterabstand des Zeichengitters." - -#: ../C/glabels.xml:2031(title) -msgid "Layout Parameters" -msgstr "Layout-Parameter" - -#: ../C/glabels.xml:2045(title) -msgid "Alias Node" -msgstr "Knoten »Alias«" - -#: ../C/glabels.xml:2047(para) -msgid "" -"An Alias node provides the name of a product with the " -"same size and layout characteristics as the parent template." -msgstr "" -"Ein Alias-Knoten beschreibt den Namen eines Produkts mit " -"der gleichen Größe und dem gleichen Layout einer anderen Vorlage." - -#: ../C/glabels.xml:2069(para) -msgid "The brand or manufacturer of the equivalent product." -msgstr "Die Marke oder der Hersteller des entsprechenden Produkts." - -#: ../C/glabels.xml:2075(para) -msgid "The part number or name of the equivalent product." -msgstr "Die Bestellnummer oder der Name des entsprechenden Produkts." - -#: ../C/glabels.xml:2111(title) -msgid "About gLabels" -msgstr "Info zu gLabels" - -#: ../C/glabels.xml:2112(para) -msgid "" -"gLabels was written by Jim Evins " -"(evins@snaught.com). To find more information about " -"gLabels, please visit the gLabels Web page." -msgstr "" -"gLabels wurde von Jim Evins (evins@snaught." -"com) geschrieben. Weitere Informationen zu gLabels finden Sie auf der gLabels-Webseite." - -#: ../C/glabels.xml:2117(para) -msgid "" -"To report a bug or make a suggestion regarding this application or this " -"manual, follow the directions at the gLabels Contact Page." -msgstr "" -"Um einen Fehler zu melden oder einen Vorschlag zu dieser Anwendung oder zu " -"diesem Handbuch zu machen, folgen Sie den Anweisungen auf der gLabels-" -"Kontaktseite." - -#: ../C/glabels.xml:2123(para) -msgid "" -"This program is distributed 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. A copy of this license can be " -"found at this link, or in the " -"file COPYING included with the source code of this program." -msgstr "" -"Dieses Programm ist freie Software. Sie können es unter den Bedingungen der " -"GNU General Public License, wie von der Free Software " -"Foundation veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß " -"Version 2 der Lizenz oder (nach Ihrer Option) jeder späteren Version. Eine " -"Kopie der GNU General Public License finden Sie unter " -"diesem Link, oder in der Datei " -"COPYING, die im Quellcode dieses Programms enthalten ist." - -#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. -#: ../C/glabels.xml:0(None) -msgid "translator-credits" -msgstr "Mario Blättermann , 2008, 2009" diff --git a/glabels2/help/de/figures/main-window-empty.png b/glabels2/help/de/figures/main-window-empty.png deleted file mode 100644 index b7ad788e..00000000 Binary files a/glabels2/help/de/figures/main-window-empty.png and /dev/null differ diff --git a/glabels2/help/de/figures/merge-ex1-1.png b/glabels2/help/de/figures/merge-ex1-1.png deleted file mode 100644 index 2e539fc2..00000000 Binary files a/glabels2/help/de/figures/merge-ex1-1.png and /dev/null differ diff --git a/glabels2/help/de/figures/merge-ex1-2.png b/glabels2/help/de/figures/merge-ex1-2.png deleted file mode 100644 index c60b3bec..00000000 Binary files a/glabels2/help/de/figures/merge-ex1-2.png and /dev/null differ diff --git a/glabels2/help/de/figures/merge-ex1-3.png b/glabels2/help/de/figures/merge-ex1-3.png deleted file mode 100644 index 01b345d5..00000000 Binary files a/glabels2/help/de/figures/merge-ex1-3.png and /dev/null differ diff --git a/glabels2/help/de/figures/merge-ex1-4.png b/glabels2/help/de/figures/merge-ex1-4.png deleted file mode 100644 index 814c73d6..00000000 Binary files a/glabels2/help/de/figures/merge-ex1-4.png and /dev/null differ diff --git a/glabels2/help/de/figures/merge-ex2-1.png b/glabels2/help/de/figures/merge-ex2-1.png deleted file mode 100644 index 8cb49995..00000000 Binary files a/glabels2/help/de/figures/merge-ex2-1.png and /dev/null differ diff --git a/glabels2/help/de/figures/merge-ex2-2.png b/glabels2/help/de/figures/merge-ex2-2.png deleted file mode 100644 index 0fc1b06f..00000000 Binary files a/glabels2/help/de/figures/merge-ex2-2.png and /dev/null differ diff --git a/glabels2/help/de/figures/merge-ex2-3.png b/glabels2/help/de/figures/merge-ex2-3.png deleted file mode 100644 index 8ea450a2..00000000 Binary files a/glabels2/help/de/figures/merge-ex2-3.png and /dev/null differ diff --git a/glabels2/help/de/figures/merge-ex2-4.png b/glabels2/help/de/figures/merge-ex2-4.png deleted file mode 100644 index 0bc3c6b0..00000000 Binary files a/glabels2/help/de/figures/merge-ex2-4.png and /dev/null differ diff --git a/glabels2/help/de/figures/object-editor-sidebar.png b/glabels2/help/de/figures/object-editor-sidebar.png deleted file mode 100644 index 94ad2346..00000000 Binary files a/glabels2/help/de/figures/object-editor-sidebar.png and /dev/null differ diff --git a/glabels2/help/de/figures/print-copies.png b/glabels2/help/de/figures/print-copies.png deleted file mode 100644 index 7e539441..00000000 Binary files a/glabels2/help/de/figures/print-copies.png and /dev/null differ diff --git a/glabels2/help/de/figures/print-merge.png b/glabels2/help/de/figures/print-merge.png deleted file mode 100644 index 3a9efc3e..00000000 Binary files a/glabels2/help/de/figures/print-merge.png and /dev/null differ diff --git a/glabels2/help/glabels.omf.in b/glabels2/help/glabels.omf.in deleted file mode 100644 index ccbdae2d..00000000 --- a/glabels2/help/glabels.omf.in +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - manual - - - - - diff --git a/glabels2/iec16022-0.2.1/BUGS b/glabels2/iec16022-0.2.1/BUGS deleted file mode 100644 index 9de2b176..00000000 --- a/glabels2/iec16022-0.2.1/BUGS +++ /dev/null @@ -1,6 +0,0 @@ -iec16022 -f i -c aaaaabbbbbccccc -Barcode too long for 32x8 -No barcode produced - -We should find a suit barcode and not error here. - diff --git a/glabels2/iec16022-0.2.1/CHANGELOG b/glabels2/iec16022-0.2.1/CHANGELOG deleted file mode 100644 index 7c02bce3..00000000 --- a/glabels2/iec16022-0.2.1/CHANGELOG +++ /dev/null @@ -1,26 +0,0 @@ -0.2.1 - - Fix 'Barcode too long' bug. Thanks to Alessandro Zummo. - - Use Lindent to start cleaning up the code mess. - -2006-11-11 Stefan Schmidt - -0.2 - - Rewrite Makefile. - - Documentation update. - - Exclude double include of header files. - - Layout cahnges. Place return value in front of function name. - - 80 character per line. - - Print version number before usage. - - Tests - -2006-02-06 Stefan Schmidt - - -0.1 - - Initial release. - - INSTALL, README, TODO, CREDITS, Makefile, LICENSE and CHANGELOG files - added. - - Fix some include issues. - - Fix some signed/unsigned issues. - -2006-01-08 Stefan Schmidt diff --git a/glabels2/iec16022-0.2.1/CREDITS b/glabels2/iec16022-0.2.1/CREDITS deleted file mode 100644 index 37e2bcc8..00000000 --- a/glabels2/iec16022-0.2.1/CREDITS +++ /dev/null @@ -1,10 +0,0 @@ -Adrian Kennard, Andrews & Arnold Ltd for the original source code. You can -find it at http://aa.gg/free/ - -Cliff Hones for the RS coding. - -Jan Luebbe for writing the manual page and maintaining -the debian package. - -Daniel Willman for maintaining the gentoo -ebuild. diff --git a/glabels2/iec16022-0.2.1/INSTALL b/glabels2/iec16022-0.2.1/INSTALL deleted file mode 100644 index 102a61e1..00000000 --- a/glabels2/iec16022-0.2.1/INSTALL +++ /dev/null @@ -1,8 +0,0 @@ -To install this software you need the following libraries installed: -- libpopt -- zlib - -Installing iec16022 is really simple. Just do a 'make' and 'make install'. - -In standard configuration the binary will be installed in /usr/local/bin. You -can change the prefix and DESTDIR in the Makefile. diff --git a/glabels2/iec16022-0.2.1/LICENSE b/glabels2/iec16022-0.2.1/LICENSE deleted file mode 100644 index 3912109b..00000000 --- a/glabels2/iec16022-0.2.1/LICENSE +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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. - - - Copyright (C) - - 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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. - - , 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/glabels2/iec16022-0.2.1/Makefile.am b/glabels2/iec16022-0.2.1/Makefile.am deleted file mode 100644 index 566bdc09..00000000 --- a/glabels2/iec16022-0.2.1/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -INCLUDES = \ - -DLIB \ - $(GLABELS_CFLAGS) - - -IEC_FILES = \ - iec16022ecc200.c \ - reedsol.c - -noinst_LTLIBRARIES = libiec16022.la - -libiec16022_la_SOURCES = $(IEC_FILES) - -EXTRA_DIST = \ - BUGS \ - CHANGELOG \ - CREDITS \ - iec16022.1 \ - iec16022.c \ - iec16022ecc200.h \ - image.c \ - image.h \ - INSTALL \ - LICENSE \ - Makefile.dist \ - README \ - README.glabels \ - reedsol.h \ - TODO \ - test/testsuite-example.bin \ - test/testsuite-example.eps \ - test/testsuite-example.hex \ - test/testsuite-example.png \ - test/testsuite-example.text \ - test/testsuite.sh diff --git a/glabels2/iec16022-0.2.1/Makefile.dist b/glabels2/iec16022-0.2.1/Makefile.dist deleted file mode 100644 index 4929afdb..00000000 --- a/glabels2/iec16022-0.2.1/Makefile.dist +++ /dev/null @@ -1,40 +0,0 @@ -CC=/usr/bin/cc -INSTALL=/usr/bin/install -GZIP=/bin/gzip - -prefix=/usr/local -bindir=$(prefix)/bin -mandir=$(prefix)/share/man - -CFLAGS=-Wall - -.PHONY: test clean - -all: iec16022 manpage - -iec16022: iec16022ecc200.o image.o iec16022.c - $(CC) -c iec16022.c - $(CC) -o iec16022 $(CFLAGS) reedsol.o iec16022.o image.o iec16022ecc200.o -lz -lpopt - -manpage: iec16022.1 - $(GZIP) -f --best < iec16022.1 > iec16022.1.gz - -install: all - $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 - $(INSTALL) -m 755 iec16022 $(DESTDIR)$(bindir) - $(INSTALL) -m 644 iec16022.1.gz $(DESTDIR)$(mandir)/man1 - -test: iec16022 - cd test; ./testsuite.sh - -iec16022ecc200.o: iec16022ecc200.c iec16022ecc200.h reedsol.o - $(CC) -c iec16022ecc200.c - -image.o: image.c image.h - $(CC) -c image.c - -reedsol.o: reedsol.c reedsol.h - $(CC) -DLIB -c reedsol.c - -clean: - rm -f iec16022 iec16022.1.gz *.o diff --git a/glabels2/iec16022-0.2.1/README b/glabels2/iec16022-0.2.1/README deleted file mode 100644 index 072c0aef..00000000 --- a/glabels2/iec16022-0.2.1/README +++ /dev/null @@ -1,13 +0,0 @@ -With iec16022 you can produce 2d barcodes. Also known as Data Matrix. These -barcodes are defined in ISO/IEC 16022. - -The code was originally written by Andrews & Arnold Ltd. You can download this -code from http://aa.gg/free/. -The current maintainer of the code is Stefan Schmidt. - -Website: http://www.datenfreihafen.org/projects/iec16022.html -Maillinglist: https://sirius.lasnet.de/mailman/listinfo/iec16022 -SVN repository: https://svn.datenfreihafen.org/iec16022/ - - -Stefan Schmidt diff --git a/glabels2/iec16022-0.2.1/README.glabels b/glabels2/iec16022-0.2.1/README.glabels deleted file mode 100644 index ad1dced7..00000000 --- a/glabels2/iec16022-0.2.1/README.glabels +++ /dev/null @@ -1,6 +0,0 @@ -The following changes have been made to the stock iec16022 0.2.1 distribution -to facilitate compilation with glabels: - - Makefile renamed to Makefile.dist - added Makefile.am, which is configured from ../configure.in - diff --git a/glabels2/iec16022-0.2.1/TODO b/glabels2/iec16022-0.2.1/TODO deleted file mode 100644 index 6c0a97bc..00000000 --- a/glabels2/iec16022-0.2.1/TODO +++ /dev/null @@ -1,9 +0,0 @@ -- Fix compiler warnings. -- Test on 64bit, powerpc, arm, etc. Anyone? -- Test stamp feature. Anyone? -- Use autotools - -Some things to think about: ---------------------------- -- Use libpng? -- Merge iec16022 in barcode? diff --git a/glabels2/iec16022-0.2.1/iec16022.1 b/glabels2/iec16022-0.2.1/iec16022.1 deleted file mode 100644 index 681c3a7f..00000000 --- a/glabels2/iec16022-0.2.1/iec16022.1 +++ /dev/null @@ -1,52 +0,0 @@ -.TH iec16022 1 2006-01-14 "iec16022 0.1" -.SH NAME -iec16022 \- program to generate 2d barcodes -.SH SYNOPSIS -.B iec16022 -.RI [ options ] -.SH DESCRIPTION -This manual page documents briefly the -.B iec16022 -command. -.PP -.B iec16022 -generates 2d barcodes conforming to the ISO/IEC 16022 standard (which is -also known as Data Matrix and Semacode). -.SH OPTIONS -These programs follow the usual GNU command line syntax, with long -options starting with two dashes (`-'). -A summary of options is included below. -.TP -.B \-s, \-\-size WxH -Sets the size of the generated barcode. -.TP -.B \-c, \-\-barcode text -Specifies the text to be encoded. -.TP -.B \-\-ecc 000|050|080|100|140|200 -Sets the type of ecc to be used. -.TP -.B \-i, \-\-infile filename -Read input data from file. -.TP -.B \-o, \-\-outfile filenmae -Save output to file (instead of standard output). -.TP -.B \-f, \-\-format Text|EPS|Bin|Hex|Stamp|PNG -Set the output type. -.TP -.B \-?, \-\-help -Show summary of options. -.TP -.B \-\-usage -Show short overview of options. -.SH EXAMPLE -To produce a datamatrix barcode for foobar in PNG format you need the following -arguments: -.TP -.B iec16022 -f PNG -c foobar -o foobar.png -.SH AUTHOR -iec16022 was written by Adrian Kennard, Andrews & Arnold Ltd. -.PP -This manual page was written by Jan Luebbe , -for the Debian project (but may be used by others). diff --git a/glabels2/iec16022-0.2.1/iec16022.c b/glabels2/iec16022-0.2.1/iec16022.c deleted file mode 100644 index 6fb7c30a..00000000 --- a/glabels2/iec16022-0.2.1/iec16022.c +++ /dev/null @@ -1,462 +0,0 @@ -/** - * - * IEC16022 bar code generation - * Adrian Kennard, Andrews & Arnold Ltd - * with help from Cliff Hones on the RS coding - * - * (c) 2004 Adrian Kennard, Andrews & Arnold Ltd - * (c) 2006 Stefan Schmidt - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#define IEC16022_VERSION "0.2" - -#include -#include -#include -#include -#include -#include -#include -#include "image.h" -#include "iec16022ecc200.h" - - // simple checked response malloc -void *safemalloc(int n) -{ - void *p = malloc(n); - if (!p) { - fprintf(stderr, "Malloc(%d) failed\n", n); - exit(1); - } - return p; -} - -// hex dump - bottom left pixel first -void dumphex(unsigned char *grid, int W, int H, unsigned char p) -{ - int c = 0, y; - for (y = 0; y < H; y++) { - int v = 0, x, b = 128; - for (x = 0; x < W; x++) { - if (grid[y * W + x]) - v |= b; - b >>= 1; - if (!b) { - printf("%02X", v ^ p); - v = 0; - b = 128; - c++; - } - } - if (b != 128) { - printf("%02X", v ^ p); - c++; - } - printf(" "); - c++; - if (c >= 80) { - printf("\n"); - c = 0; - } - } - if (c) - printf("\n"); -} - -int main(int argc, const char *argv[]) -{ - char c; - int W = 0, H = 0; - int ecc = 0; - int barcodelen = 0; - char *encoding = 0; - char *outfile = 0; - char *infile = 0; - char *barcode = 0; - char *format = "Text"; - char *size = 0; - char *eccstr = 0; - int len = 0, maxlen = 0, ecclen = 0; - unsigned char *grid = 0; - poptContext optCon; // context for parsing command-line options - const struct poptOption optionsTable[] = { - { - "size", 's', POPT_ARG_STRING, &size, 0, "Size", "WxH"}, - { - "barcode", 'c', POPT_ARG_STRING, &barcode, 0, "Barcode", - "text"}, - { - "ecc", 0, POPT_ARG_STRING, &eccstr, 0, "ECC", - "000/050/080/100/140/200"}, - { - "infile", 'i', POPT_ARG_STRING, &infile, 0, "Barcode file", - "filename"}, - { - "outfile", 'o', POPT_ARG_STRING, &outfile, 0, - "Output filename", - "filename"}, - { - "encoding", 'e', POPT_ARG_STRING, &encoding, 0, - "Encoding template", - "[CTXEAB]* for ecc200 or 11/27/41/37/128/256"}, - { - "format", 'f', POPT_ARGFLAG_SHOW_DEFAULT | POPT_ARG_STRING, - &format, 0, - "Output format", "Text/EPS/PNG/Bin/Hex/Stamp"}, - POPT_AUTOHELP { - NULL, 0, 0, NULL, 0} - }; - optCon = poptGetContext(NULL, argc, argv, optionsTable, 0); - poptSetOtherOptionHelp(optCon, "[barcode]"); - if ((c = poptGetNextOpt(optCon)) < -1) { - /* an error occurred during option processing */ - fprintf(stderr, "%s: %s\n", poptBadOption(optCon, - POPT_BADOPTION_NOALIAS), - poptStrerror(c)); - return 1; - } - - if (poptPeekArg(optCon) && !barcode && !infile) - barcode = (char *)poptGetArg(optCon); - if (poptPeekArg(optCon) || !barcode && !infile || barcode && infile) { - fprintf(stderr, "Version: %s\n", IEC16022_VERSION); - poptPrintUsage(optCon, stderr, 0); - return -1; - } - if (outfile && !freopen(outfile, "w", stdout)) { - perror(outfile); - return 1; - } - - if (infile) { // read from file - FILE *f = fopen(infile, "rb"); - barcode = safemalloc(4001); - if (!f) { - perror(infile); - return 1; - } - barcodelen = fread(barcode, 1, 4000, f); - if (barcodelen < 0) { - perror(infile); - return 1; - } - barcode[barcodelen] = 0; // null terminate anyway - close(f); - } else - barcodelen = strlen(barcode); - // check parameters - if (size) { - char *x = strchr(size, 'x'); - W = atoi(size); - if (x) - H = atoi(x + 1); - if (!H) - W = H; - } - if (eccstr) - ecc = atoi(eccstr); - if (W & 1) { // odd size - if (W != H || W < 9 || W > 49) { - fprintf(stderr, "Invalid size %dx%d\n", W, H); - return 1; - } - if (!eccstr) { - if (W >= 17) - ecc = 140; - else if (W >= 13) - ecc = 100; - else if (W >= 11) - ecc = 80; - else - ecc = 0; - } - if (ecc && ecc != 50 && ecc != 80 && ecc != 100 && ecc != 140 || - ecc == 50 && W < 11 || ecc == 80 && W < 13 || ecc == 100 - && W < 13 || ecc == 140 && W < 17) { - fprintf(stderr, "ECC%03d invalid for %dx%d\n", ecc, W, - H); - return 1; - } - - } else if (W) { // even size - if (W < H) { - int t = W; - W = H; - H = t; - } - if (!eccstr) - ecc = 200; - if (ecc != 200) { - fprintf(stderr, "ECC%03d invalid for %dx%d\n", ecc, W, - H); - return 1; - } - } - - else { // auto size - if (!eccstr) - // default is even sizes only unless explicit ecc set to force odd - // sizes - ecc = 200; - } - - if (tolower(*format) == 's') { // special stamp format checks & defaults - if (!W) - W = H = 32; - if (ecc != 200 || W != 32 || H != 32) - fprintf(stderr, "Stamps must be 32x32\n"); - if (encoding) - fprintf(stderr, "Stamps should use auto encoding\n"); - else { - int n; - for (n = 0; n < barcodelen && (barcode[n] == ' ' || - isdigit(barcode[n]) - || isupper(barcode[n])); - n++) ; - if (n < barcodelen) - fprintf(stderr, - "Has invalid characters for a stamp\n"); - else { - // Generate simplistic encoding rules as used by the windows app - // TBA - does not always match the windows app... - n = 0; - encoding = safemalloc(barcodelen + 1); - while (n < barcodelen) { - // ASCII - while (1) { - if (n == barcodelen - || n + 3 <= barcodelen - && (!isdigit(barcode[n]) - || - !isdigit(barcode - [n + 1]))) - break; - encoding[n++] = 'A'; - if (n < barcodelen - && isdigit(barcode[n - 1]) - && isdigit(barcode[n])) - encoding[n++] = 'A'; - } - // C40 - while (1) { - int r = 0; - while (n + r < barcodelen - && - isdigit(barcode[n + r])) - r++; - if (n + 3 > barcodelen - || r >= 6) - break; - encoding[n++] = 'C'; - encoding[n++] = 'C'; - encoding[n++] = 'C'; - } - } - encoding[n] = 0; - //fprintf (stderr, "%s\n%s\n", barcode, encoding); - } - } - } - // processing stamps - if ((W & 1) || ecc < 200) { // odd sizes - fprintf(stderr, "Not done odd sizes yet, sorry\n"); - } else { // even sizes - grid = - iec16022ecc200(&W, &H, &encoding, barcodelen, barcode, &len, - &maxlen, &ecclen); - } - - // output - if (!grid || !W) { - fprintf(stderr, "No barcode produced\n"); - return 1; - } - switch (tolower(*format)) { - case 'i': // info - printf("Size : %dx%d\n", W, H); - printf("Encoded : %d of %d bytes with %d bytes of ecc\n", len, - maxlen, ecclen); - printf("Barcode : %s\n", barcode); - printf("Encoding: %s\n", encoding); - break; - case 'h': // hex - dumphex(grid, W, H, 0); - break; - case 'b': // bin - { - int y; - for (y = 0; y < H; y++) { - int v = 0, x, b = 128; - for (x = 0; x < W; x++) { - if (grid[y * W + x]) - v |= b; - b >>= 1; - if (!b) { - putchar(v); - v = 0; - b = 128; - } - } - if (b != 128) - putchar(v); - } - } - break; - case 't': // text - { - int y; - for (y = H - 1; y >= 0; y--) { - int x; - for (x = 0; x < W; x++) - printf("%c", - grid[W * y + x] ? '*' : ' '); - printf("\n"); - } - } - break; - case 'e': // EPS - printf("%%!PS-Adobe-3.0 EPSF-3.0\n" - "%%%%Creator: IEC16022 barcode/stamp generator\n" - "%%%%BarcodeData: %s\n" "%%%%BarcodeSize: %dx%d\n" - "%%%%BarcodeFormat: ECC200\n" - "%%%%DocumentData: Clean7Bit\n" "%%%%LanguageLevel: 1\n" - "%%%%Pages: 1\n" "%%%%BoundingBox: 0 0 %d %d\n" - "%%%%EndComments\n" "%%%%Page: 1 1\n" - "%d %d 1[1 0 0 1 -1 -1]{<\n", barcode, W, H, W + 2, - H + 2, W, H); - dumphex(grid, W, H, 0xFF); - printf(">}image\n"); - break; - case 's': // Stamp - { - char temp[74], c; - time_t now; - struct tm t = { - 0 - }; - int v; - if (barcodelen < 74) { - fprintf(stderr, - "Does not look like a stamp barcode\n"); - return 1; - } - memcpy(temp, barcode, 74); - c = temp[5]; - temp[56] = 0; - t.tm_year = atoi(temp + 54) + 100; - t.tm_mday = 1; - now = mktime(&t); - temp[54] = 0; - now += 86400 * (atoi(temp + 51) - 1); - t = *gmtime(&now); - temp[46] = 0; - v = atoi(temp + 36); - printf("%%!PS-Adobe-3.0 EPSF-3.0\n" - "%%%%Creator: IEC16022 barcode/stamp generator\n" - "%%%%BarcodeData: %s\n" "%%%%BarcodeSize: %dx%d\n" "%%%%DocumentData: Clean7Bit\n" "%%%%LanguageLevel: 1\n" "%%%%Pages: 1\n" "%%%%BoundingBox: 0 0 190 80\n" "%%%%EndComments\n" "%%%%Page: 1 1\n" "10 dict begin/f{findfont exch scalefont \ - setfont}bind def/rm/rmoveto load def/m/moveto load \ - def/rl/rlineto load def\n" "/l/lineto load def/cp/closepath load def/c{dup stringwidth \ - pop -2 div 0 rmoveto show}bind def\n" "gsave 72 25.4 div dup scale 0 0 m 67 0 rl 0 28 rl -67 0 rl \ - cp clip 1 setgray fill 0 setgray 0.5 0 translate 0.3 \ - setlinewidth\n" "32 32 1[2 0 0 2 0 -11]{<\n", barcode, W, H); - dumphex(grid, W, H, 0xFF); - printf(">}image\n" - "3.25/Helvetica-Bold f 8 25.3 m(\\243%d.%02d)c\n" - "2.6/Helvetica f 8 22.3 m(%.4s %.4s)c\n" - "1.5/Helvetica f 8 3.3 m(POST BY)c\n" - "3.3/Helvetica f 8 0.25 m(%02d.%02d.%02d)c\n", - v / 100, v % 100, temp + 6, temp + 10, t.tm_mday, - t.tm_mon + 1, t.tm_year % 100); - if (c == '1' || c == '2' || c == 'A' || c == 'S') { - if (c == '2') - printf - ("42 0 m 10 0 rl 0 28 rl -10 0 rl cp 57 0 m 5 0 rl 0 \ - 28 rl -5 0 rl cp"); - else - printf - ("42 0 m 5 0 rl 0 28 rl -5 0 rl cp 52 0 m 10 0 rl 0 \ - 28 rl -10 0 rl cp"); - printf - (" 21 0 m 16 0 rl 0 28 rl -16 0 rl cp fill\n" - "21.3 0.3 m 15.4 0 rl 0 13 rl -15.4 0 rl cp 1 setgray \ - fill gsave 21.3 0.3 15.4 27.4 rectclip newpath\n"); - switch (c) { - case '1': - printf - ("27/Helvetica-Bold f 27 8.7 m(1)show grestore 0 setgray \ - 1.5/Helvetica-Bold f 22 3.3 m(POSTAGE PAID GB)show \ - 1.7/Helvetica f 29 1.5 m(DumbStamp.co.uk)c\n"); - break; - case '2': - printf - ("21/Helvetica-Bold f 23.5 13 m(2)1.25 1 scale show grestore \ - 0 setgray 1.5/Helvetica-Bold f 22 3.3 \ - m(POSTAGE PAID GB)show 1.7/Helvetica f 29 1.5 \ - m(DumbStamp.co.uk)c\n"); - break; - case 'A': - printf - ("16/Helvetica-Bold f 29 14.75 m 1.1 1 scale(A)c grestore 0 \ - setgray 1.5/Helvetica-Bold f 22 3.3 m(POSTAGE PAID GB)show \ - 1.7/Helvetica f 22 1.5 m(Par Avion)show\n"); - break; - case 'S': - printf - ("10/Helvetica-Bold f 29 17 m(SU)c grestore 0 setgray \ - 1.5/Helvetica-Bold f 22 1.5 m(POSTAGE PAID GB)show\n"); - break; - } - printf - ("2.3/Helvetica-Bold f 29 10 m(LOYAL MAIL)c\n"); - } else if (c == 'P') { // Standard Parcels - printf("21 0 m 41 0 rl 0 28 rl -41 0 rl cp fill\n" "37.7 0.3 m 24 0 rl 0 27.4 rl -24 0 rl cp 1 setgray fill \ - gsave 21.3 0.3 16.4 27.4 rectclip newpath\n" "22.5/Helvetica-Bold f 37.75 -1.25 m 90 rotate(SP)show \ - grestore 0 setgray\n" - "3.5/Helvetica-Bold f 49.7 21.5 m(LOYAL MAIL)c\n" "2.3/Helvetica-Bold f 49.7 7 m(POSTAGE PAID GB)c\n" "2.6/Helveica f 49.7 4.25 m(DumbStamp.co.uk)c\n"); - } else if (c == '3') - printf("21.15 0.15 40.7 27.7 rectstroke\n" - "21 0 m 41 0 rl 0 5 rl -41 0 rl cp fill\n" - "0 1 2{0 1 18{dup 1.525 mul 22.9 add 24 3 index 1.525 mul \ - add 3 -1 roll 9 add 29 div 0 360 arc fill}for pop}for\n" "50.5 23.07 m 11.5 0 rl 0 5 rl -11.5 0 rl cp fill\n" - "5.85/Helvetica f 23.7 15.6 m(Loyal Mail)show\n" "4.75/Helvetica-Bold f 24 11 m(special)show 4.9/Helvetica \ - f(delivery)show\n" "gsave 1 setgray 3.2/Helvetica-Bold f 24 1.6 \ - m(next day)show 26 10.15 m 2 0 rl stroke grestore\n" "21.15 9.9 m 53.8 9.9 l stroke 53.8 9.9 0.4 0 360 \ - arc fill\n"); - printf("end grestore\n"); - } - break; - case 'p': // png - { - int x, y; - Image *i = ImageNew(W + 2, H + 2, 2); - i->Colour[0] = 0xFFFFFF; - i->Colour[1] = 0; - for (y = 0; y < H; y++) - for (x = 0; x < W; x++) - if (grid[y * W + x]) - ImagePixel(i, x + 1, H - y) = 1; - ImageWritePNG(i, fileno(stdout), 0, -1, barcode); - ImageFree(i); - } - break; - default: - fprintf(stderr, "Unknown output format %s\n", format); - break; - } - return 0; -} diff --git a/glabels2/iec16022-0.2.1/iec16022ecc200.c b/glabels2/iec16022-0.2.1/iec16022ecc200.c deleted file mode 100644 index 0b28db70..00000000 --- a/glabels2/iec16022-0.2.1/iec16022ecc200.c +++ /dev/null @@ -1,963 +0,0 @@ -/** - * - * IEC16022 bar code generation - * Adrian Kennard, Andrews & Arnold Ltd - * with help from Cliff Hones on the RS coding - * - * (c) 2004 Adrian Kennard, Andrews & Arnold Ltd - * (c) 2006 Stefan Schmidt - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include "reedsol.h" -#include "iec16022ecc200.h" - -static struct ecc200matrix_s { - int H, W; - int FH, FW; - int bytes; - int datablock, rsblock; -} ecc200matrix[] = { - 10, 10, 10, 10, 3, 3, 5, // - 12, 12, 12, 12, 5, 5, 7, // - 8, 18, 8, 18, 5, 5, 7, // - 14, 14, 14, 14, 8, 8, 10, // - 8, 32, 8, 16, 10, 10, 11, // - 16, 16, 16, 16, 12, 12, 12, // - 12, 26, 12, 26, 16, 16, 14, // - 18, 18, 18, 18, 18, 18, 14, // - 20, 20, 20, 20, 22, 22, 18, // - 12, 36, 12, 18, 22, 22, 18, // - 22, 22, 22, 22, 30, 30, 20, // - 16, 36, 16, 18, 32, 32, 24, // - 24, 24, 24, 24, 36, 36, 24, // - 26, 26, 26, 26, 44, 44, 28, // - 16, 48, 16, 24, 49, 49, 28, // - 32, 32, 16, 16, 62, 62, 36, // - 36, 36, 18, 18, 86, 86, 42, // - 40, 40, 20, 20, 114, 114, 48, // - 44, 44, 22, 22, 144, 144, 56, // - 48, 48, 24, 24, 174, 174, 68, // - 52, 52, 26, 26, 204, 102, 42, // - 64, 64, 16, 16, 280, 140, 56, // - 72, 72, 18, 18, 368, 92, 36, // - 80, 80, 20, 20, 456, 114, 48, // - 88, 88, 22, 22, 576, 144, 56, // - 96, 96, 24, 24, 696, 174, 68, // - 104, 104, 26, 26, 816, 136, 56, // - 120, 120, 20, 20, 1050, 175, 68, // - 132, 132, 22, 22, 1304, 163, 62, // - 144, 144, 24, 24, 1558, 156, 62, // 156*4+155*2 - 0 // terminate -}; - - // simple checked response malloc -static void *safemalloc(int n) -{ - void *p = malloc(n); - if (!p) { - fprintf(stderr, "Malloc(%d) failed\n", n); - exit(1); - } - return p; -} - -// Annex M placement alorithm low level -static void ecc200placementbit(int *array, int NR, int NC, int r, int c, - int p, char b) -{ - if (r < 0) { - r += NR; - c += 4 - ((NR + 4) % 8); - } - if (c < 0) { - c += NC; - r += 4 - ((NC + 4) % 8); - } - array[r * NC + c] = (p << 3) + b; -} - -static void ecc200placementblock(int *array, int NR, int NC, int r, - int c, int p) -{ - ecc200placementbit(array, NR, NC, r - 2, c - 2, p, 7); - ecc200placementbit(array, NR, NC, r - 2, c - 1, p, 6); - ecc200placementbit(array, NR, NC, r - 1, c - 2, p, 5); - ecc200placementbit(array, NR, NC, r - 1, c - 1, p, 4); - ecc200placementbit(array, NR, NC, r - 1, c - 0, p, 3); - ecc200placementbit(array, NR, NC, r - 0, c - 2, p, 2); - ecc200placementbit(array, NR, NC, r - 0, c - 1, p, 1); - ecc200placementbit(array, NR, NC, r - 0, c - 0, p, 0); -} - -static void ecc200placementcornerA(int *array, int NR, int NC, int p) -{ - ecc200placementbit(array, NR, NC, NR - 1, 0, p, 7); - ecc200placementbit(array, NR, NC, NR - 1, 1, p, 6); - ecc200placementbit(array, NR, NC, NR - 1, 2, p, 5); - ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4); - ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3); - ecc200placementbit(array, NR, NC, 1, NC - 1, p, 2); - ecc200placementbit(array, NR, NC, 2, NC - 1, p, 1); - ecc200placementbit(array, NR, NC, 3, NC - 1, p, 0); -} - -static void ecc200placementcornerB(int *array, int NR, int NC, int p) -{ - ecc200placementbit(array, NR, NC, NR - 3, 0, p, 7); - ecc200placementbit(array, NR, NC, NR - 2, 0, p, 6); - ecc200placementbit(array, NR, NC, NR - 1, 0, p, 5); - ecc200placementbit(array, NR, NC, 0, NC - 4, p, 4); - ecc200placementbit(array, NR, NC, 0, NC - 3, p, 3); - ecc200placementbit(array, NR, NC, 0, NC - 2, p, 2); - ecc200placementbit(array, NR, NC, 0, NC - 1, p, 1); - ecc200placementbit(array, NR, NC, 1, NC - 1, p, 0); -} - -static void ecc200placementcornerC(int *array, int NR, int NC, int p) -{ - ecc200placementbit(array, NR, NC, NR - 3, 0, p, 7); - ecc200placementbit(array, NR, NC, NR - 2, 0, p, 6); - ecc200placementbit(array, NR, NC, NR - 1, 0, p, 5); - ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4); - ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3); - ecc200placementbit(array, NR, NC, 1, NC - 1, p, 2); - ecc200placementbit(array, NR, NC, 2, NC - 1, p, 1); - ecc200placementbit(array, NR, NC, 3, NC - 1, p, 0); -} - -static void ecc200placementcornerD(int *array, int NR, int NC, int p) -{ - ecc200placementbit(array, NR, NC, NR - 1, 0, p, 7); - ecc200placementbit(array, NR, NC, NR - 1, NC - 1, p, 6); - ecc200placementbit(array, NR, NC, 0, NC - 3, p, 5); - ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4); - ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3); - ecc200placementbit(array, NR, NC, 1, NC - 3, p, 2); - ecc200placementbit(array, NR, NC, 1, NC - 2, p, 1); - ecc200placementbit(array, NR, NC, 1, NC - 1, p, 0); -} - -// Annex M placement alorithm main function -static void ecc200placement(int *array, int NR, int NC) -{ - int r, c, p; - // invalidate - for (r = 0; r < NR; r++) - for (c = 0; c < NC; c++) - array[r * NC + c] = 0; - // start - p = 1; - r = 4; - c = 0; - do { - // check corner - if (r == NR && !c) - ecc200placementcornerA(array, NR, NC, p++); - if (r == NR - 2 && !c && NC % 4) - ecc200placementcornerB(array, NR, NC, p++); - if (r == NR - 2 && !c && (NC % 8) == 4) - ecc200placementcornerC(array, NR, NC, p++); - if (r == NR + 4 && c == 2 && !(NC % 8)) - ecc200placementcornerD(array, NR, NC, p++); - // up/right - do { - if (r < NR && c >= 0 && !array[r * NC + c]) - ecc200placementblock(array, NR, NC, r, c, p++); - r -= 2; - c += 2; - } - while (r >= 0 && c < NC); - r++; - c += 3; - // down/left - do { - if (r >= 0 && c < NC && !array[r * NC + c]) - ecc200placementblock(array, NR, NC, r, c, p++); - r += 2; - c -= 2; - } - while (r < NR && c >= 0); - r += 3; - c++; - } - while (r < NR || c < NC); - // unfilled corner - if (!array[NR * NC - 1]) - array[NR * NC - 1] = array[NR * NC - NC - 2] = 1; -} - -// calculate and append ecc code, and if necessary interleave -static void ecc200(unsigned char *binary, int bytes, int datablock, int rsblock) -{ - int blocks = (bytes + 2) / datablock, b; - rs_init_gf(0x12d); - rs_init_code(rsblock, 1); - for (b = 0; b < blocks; b++) { - unsigned char buf[256], ecc[256]; - int n, p = 0; - for (n = b; n < bytes; n += blocks) - buf[p++] = binary[n]; - rs_encode(p, buf, ecc); - p = rsblock - 1; // comes back reversed - for (n = b; n < rsblock * blocks; n += blocks) - binary[bytes + n] = ecc[p--]; - } -} - -/* - * perform encoding for ecc200, source s len sl, to target t len tl, using - * optional encoding control string e return 1 if OK, 0 if failed. Does all - * necessary padding to tl - */ - -char ecc200encode(unsigned char *t, int tl, unsigned char *s, int sl, - char *encoding, int *lenp) -{ - char enc = 'a'; // start in ASCII encoding mode - int tp = 0, sp = 0; - if (strlen(encoding) < sl) { - fprintf(stderr, "Encoding string too short\n"); - return 0; - } - // do the encoding - while (sp < sl && tp < tl) { - char newenc = enc; // suggest new encoding - if (tl - tp <= 1 && (enc == 'c' || enc == 't') || tl - tp <= 2 - && enc == 'x') - enc = 'a'; // auto revert to ASCII - newenc = tolower(encoding[sp]); - switch (newenc) { // encode character - case 'c': // C40 - case 't': // Text - case 'x': // X12 - { - char out[6], p = 0; - const char *e, - *s2 = "!\"#$%&'()*+,-./:;<=>?@[\\]_", - *s3 = 0; - if (newenc == 'c') { - e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - s3 = "`abcdefghijklmnopqrstuvwxyz{|}~\177"; - } - if (newenc == 't') { - e = " 0123456789abcdefghijklmnopqrstuvwxyz"; - s3 = "`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~\177"; - } - if (newenc == 'x') - e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\r*>"; - do { - unsigned char c = s[sp++]; - char *w; - if (c & 0x80) { - if (newenc == 'x') { - fprintf(stderr, - "Cannot encode char 0x%02X in X12\n", - c); - return 0; - } - c &= 0x7f; - out[p++] = 1; - out[p++] = 30; - } - w = strchr(e, c); - if (w) - out[p++] = ((w - e) + 3) % 40; - else { - if (newenc == 'x') { - fprintf(stderr, - "Cannot encode char 0x%02X in X12\n", - c); - return 0; - } - if (c < 32) { // shift 1 - out[p++] = 0; - out[p++] = c; - } else { - w = strchr(s2, c); - if (w) { // shift 2 - out[p++] = 1; - out[p++] = - (w - s2); - } else { - w = strchr(s3, - c); - if (w) { - out[p++] - = 2; - out[p++] - = - (w - - s3); - } else { - fprintf - (stderr, - "Could not encode 0x%02X, should \ - not happen\n", c); - return - 0; - } - } - } - } - if (p == 2 && tp + 2 == tl && sp == sl) - out[p++] = 0; // shift 1 pad at end - while (p >= 3) { - int v = - out[0] * 1600 + - out[1] * 40 + out[2] + 1; - if (enc != newenc) { - if (enc == 'c' - || enc == 't' - || enc == 'x') - t[tp++] = 254; // escape C40/text/X12 - else if (enc == 'x') - t[tp++] = 0x7C; // escape EDIFACT - if (newenc == 'c') - t[tp++] = 230; - if (newenc == 't') - t[tp++] = 239; - if (newenc == 'x') - t[tp++] = 238; - enc = newenc; - } - t[tp++] = (v >> 8); - t[tp++] = (v & 0xFF); - p -= 3; - out[0] = out[3]; - out[1] = out[4]; - out[2] = out[5]; - } - } - while (p && sp < sl); - } - break; - case 'e': // EDIFACT - { - unsigned char out[4], p = 0; - if (enc != newenc) { // can only be from C40/Text/X12 - t[tp++] = 254; - enc = 'a'; - } - while (sp < sl && tolower(encoding[sp]) == 'e' - && p < 4) - out[p++] = s[sp++]; - if (p < 4) { - out[p++] = 0x1F; - enc = 'a'; - } // termination - t[tp] = ((s[0] & 0x3F) << 2); - t[tp++] |= ((s[1] & 0x30) >> 4); - t[tp] = ((s[1] & 0x0F) << 4); - if (p == 2) - tp++; - else { - t[tp++] |= ((s[2] & 0x3C) >> 2); - t[tp] = ((s[2] & 0x03) << 6); - t[tp++] |= (s[3] & 0x3F); - } - } - break; - case 'a': // ASCII - if (enc != newenc) { - if (enc == 'c' || enc == 't' || enc == 'x') - t[tp++] = 254; // escape C40/text/X12 - else - t[tp++] = 0x7C; // escape EDIFACT - } - enc = 'a'; - if (sl - sp >= 2 && isdigit(s[sp]) - && isdigit(s[sp + 1])) { - t[tp++] = - (s[sp] - '0') * 10 + s[sp + 1] - '0' + 130; - sp += 2; - } else if (s[sp] > 127) { - t[tp++] = 235; - t[tp++] = s[sp++] - 127; - } else - t[tp++] = s[sp++] + 1; - break; - case 'b': // Binary - { - int l = 0; // how much to encode - if (encoding) { - int p; - for (p = sp; - p < sl - && tolower(encoding[p]) == 'b'; - p++) - l++; - } - t[tp++] = 231; // base256 - if (l < 250) - t[tp++] = l; - else { - t[tp++] = 249 + (l / 250); - t[tp++] = (l % 250); - } - while (l-- && tp < tl) { - t[tp] = s[sp++] + (((tp + 1) * 149) % 255) + 1; // see annex H - tp++; - } - enc = 'a'; // reverse to ASCII at end - } - break; - default: - fprintf(stderr, "Unknown encoding %c\n", newenc); - return 0; // failed - } - } - if (lenp) - *lenp = tp; - if (tp < tl && enc != 'a') { - if (enc == 'c' || enc == 'x' || enc == 't') - t[tp++] = 254; // escape X12/C40/Text - else - t[tp++] = 0x7C; // escape EDIFACT - } - if (tp < tl) - t[tp++] = 129; // pad - while (tp < tl) { // more padding - int v = 129 + (((tp + 1) * 149) % 253) + 1; // see Annex H - if (v > 254) - v -= 254; - t[tp++] = v; - } - if (tp > tl || sp < sl) - return 0; // did not fit - /* - * for (tp = 0; tp < tl; tp++) fprintf (stderr, "%02X ", t[tp]); \ - * fprintf (stderr, "\n"); - */ - return 1; // OK -} - -// Auto encoding format functions -static char encchr[] = "ACTXEB"; - -enum { - E_ASCII, - E_C40, - E_TEXT, - E_X12, - E_EDIFACT, - E_BINARY, - E_MAX -}; - -unsigned char switchcost[E_MAX][E_MAX] = { - 0, 1, 1, 1, 1, 2, // From E_ASCII - 1, 0, 2, 2, 2, 3, // From E_C40 - 1, 2, 0, 2, 2, 3, // From E_TEXT - 1, 2, 2, 0, 2, 3, // From E_X12 - 1, 2, 2, 2, 0, 3, // From E_EDIFACT - 0, 1, 1, 1, 1, 0, // From E_BINARY -}; - -/* - * Creates a encoding list (malloc) - * returns encoding string - * if lenp not null, target len stored - * if error, null returned - * if exact specified, then assumes shortcuts applicable for exact fit - * in target - * 1. No unlatch to return to ASCII for last encoded byte after C40 or - * Text or X12 - * 2. No unlatch to return to ASCII for last 1 or 2 encoded bytes after - * EDIFACT - * 3. Final C40 or text encoding exactly in last 2 bytes can have a shift - * 0 to pad to make a tripple - * Only use the encoding from an exact request if the len matches the target, - * otherwise free the result and try again with exact=0 - */ - -static char *encmake(int l, unsigned char *s, int *lenp, char exact) -{ - char *encoding = 0; - int p = l; - char e; - struct { - // number of bytes of source that can be encoded in a row at this point - // using this encoding mode - short s; - // number of bytes of target generated encoding from this point to end if - // already in this encoding mode - short t; - } enc[MAXBARCODE][E_MAX]; - memset(&enc, 0, sizeof(enc)); - if (!l) - return ""; // no length - if (l > MAXBARCODE) - return 0; // not valid - while (p--) { - char b = 0, sub; - int sl, tl, bl, t; - // consider each encoding from this point - // ASCII - sl = tl = 1; - if (isdigit(s[p]) && p + 1 < l && isdigit(s[p + 1])) - sl = 2; // double digit - else if (s[p] & 0x80) - tl = 2; // high shifted - bl = 0; - if (p + sl < l) - for (e = 0; e < E_MAX; e++) - if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + - switchcost[E_ASCII] - [e]) < bl || !bl)) { - bl = t; - b = e; - } - enc[p][E_ASCII].t = tl + bl; - enc[p][E_ASCII].s = sl; - if (bl && b == E_ASCII) - enc[p][b].s += enc[p + sl][b].s; - // C40 - sub = tl = sl = 0; - do { - unsigned char c = s[p + sl++]; - if (c & 0x80) { // shift + upper - sub += 2; - c &= 0x7F; - } - if (c != ' ' && !isdigit(c) && !isupper(c)) - sub++; // shift - sub++; - while (sub >= 3) { - sub -= 3; - tl += 2; - } - } while (sub && p + sl < l); - if (exact && sub == 2 && p + sl == l) { - // special case, can encode last block with shift 0 at end (Is this - // valid when not end of target buffer?) - sub = 0; - tl += 2; - } - if (!sub) { // can encode C40 - bl = 0; - if (p + sl < l) - for (e = 0; e < E_MAX; e++) - if (enc[p + sl][e].t - && - ((t = - enc[p + sl][e].t + - switchcost[E_C40][e]) < bl - || !bl)) { - bl = t; - b = e; - } - if (exact && enc[p + sl][E_ASCII].t == 1 && 1 < bl) { - // special case, switch to ASCII for last bytes - bl = 1; - b = E_ASCII; - } - enc[p][E_C40].t = tl + bl; - enc[p][E_C40].s = sl; - if (bl && b == E_C40) - enc[p][b].s += enc[p + sl][b].s; - } - // Text - sub = tl = sl = 0; - do { - unsigned char c = s[p + sl++]; - if (c & 0x80) { // shift + upper - sub += 2; - c &= 0x7F; - } - if (c != ' ' && !isdigit(c) && !islower(c)) - sub++; // shift - sub++; - while (sub >= 3) { - sub -= 3; - tl += 2; - } - } while (sub && p + sl < l); - if (exact && sub == 2 && p + sl == l) { - // special case, can encode last block with shift 0 at end (Is this - // valid when not end of target buffer?) - sub = 0; - tl += 2; - } - if (!sub && sl) { // can encode Text - bl = 0; - if (p + sl < l) - for (e = 0; e < E_MAX; e++) - if (enc[p + sl][e].t - && - ((t = - enc[p + sl][e].t + - switchcost[E_TEXT][e]) < bl - || !bl)) { - bl = t; - b = e; - } - if (exact && enc[p + sl][E_ASCII].t == 1 && 1 < bl) { // special case, switch to ASCII for last bytes - bl = 1; - b = E_ASCII; - } - enc[p][E_TEXT].t = tl + bl; - enc[p][E_TEXT].s = sl; - if (bl && b == E_TEXT) - enc[p][b].s += enc[p + sl][b].s; - } - // X12 - sub = tl = sl = 0; - do { - unsigned char c = s[p + sl++]; - if (c != 13 && c != '*' && c != '>' && c != ' ' - && !isdigit(c) && !isupper(c)) { - sl = 0; - break; - } - sub++; - while (sub >= 3) { - sub -= 3; - tl += 2; - } - } while (sub && p + sl < l); - if (!sub && sl) { // can encode X12 - bl = 0; - if (p + sl < l) - for (e = 0; e < E_MAX; e++) - if (enc[p + sl][e].t - && - ((t = - enc[p + sl][e].t + - switchcost[E_X12][e]) < bl - || !bl)) { - bl = t; - b = e; - } - if (exact && enc[p + sl][E_ASCII].t == 1 && 1 < bl) { - // special case, switch to ASCII for last bytes - bl = 1; - b = E_ASCII; - } - enc[p][E_X12].t = tl + bl; - enc[p][E_X12].s = sl; - if (bl && b == E_X12) - enc[p][b].s += enc[p + sl][b].s; - } - // EDIFACT - sl = bl = 0; - if (s[p + 0] >= 32 && s[p + 0] <= 94) { // can encode 1 - char bs = 0; - if (p + 1 == l && (!bl || bl < 2)) { - bl = 2; - bs = 1; - } else - for (e = 0; e < E_MAX; e++) - if (e != E_EDIFACT && enc[p + 1][e].t - && - ((t = - 2 + enc[p + 1][e].t + - switchcost[E_ASCII][e]) - < bl || !bl)) // E_ASCII as allowed for unlatch - { - bs = 1; - bl = t; - b = e; - } - if (p + 1 < l && s[p + 1] >= 32 && s[p + 1] <= 94) { // can encode 2 - if (p + 2 == l && (!bl || bl < 2)) { - bl = 3; - bs = 2; - } else - for (e = 0; e < E_MAX; e++) - if (e != E_EDIFACT - && enc[p + 2][e].t - && - ((t = - 3 + enc[p + 2][e].t + - switchcost[E_ASCII][e]) - < bl || !bl)) // E_ASCII as allowed for unlatch - { - bs = 2; - bl = t; - b = e; - } - if (p + 2 < l && s[p + 2] >= 32 && s[p + 2] <= 94) { // can encode 3 - if (p + 3 == l && (!bl || bl < 3)) { - bl = 3; - bs = 3; - } else - for (e = 0; e < E_MAX; e++) - if (e != E_EDIFACT - && enc[p + 3][e].t - && - ((t = - 3 + enc[p + - 3][e].t + - switchcost - [E_ASCII][e]) - < bl || !bl)) // E_ASCII as allowed for unlatch - { - bs = 3; - bl = t; - b = e; - } - if (p + 4 < l && s[p + 3] >= 32 && s[p + 3] <= 94) { // can encode 4 - if (p + 4 == l - && (!bl || bl < 3)) { - bl = 3; - bs = 4; - } else { - for (e = 0; e < E_MAX; - e++) - if (enc[p + 4] - [e].t - && - ((t = - 3 + - enc[p + - 4][e]. - t + - switchcost - [E_EDIFACT] - [e]) < bl - || !bl)) { - bs = 4; - bl = t; - b = e; - } - if (exact - && enc[p + - 4][E_ASCII].t - && enc[p + - 4][E_ASCII]. - t <= 2 - && (t = - 3 + enc[p + - 4] - [E_ASCII].t) < - bl) { - // special case, switch to ASCII for last 1 ot two bytes - bs = 4; - bl = t; - b = E_ASCII; - } - } - } - } - } - enc[p][E_EDIFACT].t = bl; - enc[p][E_EDIFACT].s = bs; - if (bl && b == E_EDIFACT) - enc[p][b].s += enc[p + bs][b].s; - } - // Binary - bl = 0; - for (e = 0; e < E_MAX; e++) - if (enc[p + 1][e].t - && - ((t = - enc[p + 1][e].t + switchcost[E_BINARY][e] + - ((e == E_BINARY - && enc[p + 1][e].t == 249) ? 1 : 0)) - < bl || !bl)) { - bl = t; - b = e; - } - enc[p][E_BINARY].t = 1 + bl; - enc[p][E_BINARY].s = 1; - if (bl && b == E_BINARY) - enc[p][b].s += enc[p + 1][b].s; - /* - * fprintf (stderr, "%d:", p); for (e = 0; e < E_MAX; e++) fprintf \ - * (stderr, " %c*%d/%d", encchr[e], enc[p][e].s, enc[p][e].t); \ - * fprintf (stderr, "\n"); - */ - } - encoding = safemalloc(l + 1); - p = 0; - { - char cur = E_ASCII; // starts ASCII - while (p < l) { - int t, m = 0; - char b = 0; - for (e = 0; e < E_MAX; e++) - if (enc[p][e].t - && ((t = enc[p][e].t + switchcost[cur][e]) < - m || t == m && e == cur || !m)) { - b = e; - m = t; - } - cur = b; - m = enc[p][b].s; - if (!p && lenp) - *lenp = enc[p][b].t; - while (p < l && m--) - encoding[p++] = encchr[b]; - } - } - encoding[p] = 0; - return encoding; -} - -/* - * Main encoding function - * Returns the grid (malloced) containing the matrix. L corner at 0,0. - * Takes suggested size in *Wptr, *Hptr, or 0,0. Fills in actual size. - * Takes barcodelen and barcode to be encoded - * Note, if *encodingptr is null, then fills with auto picked (malloced) - * encoding - * If lenp not null, then the length of encoded data before any final - * unlatch or pad is stored - * If maxp not null, then the max storage of this size code is stored - * If eccp not null, then the number of ecc bytes used in this size is - * stored - * Returns 0 on error (writes to stderr with details). - */ - -unsigned char *iec16022ecc200(int *Wptr, int *Hptr, char **encodingptr, - int barcodelen, unsigned char *barcode, - int *lenp, int *maxp, int *eccp) -{ - unsigned char binary[3000]; // encoded raw data and ecc to place in barcode - int W = 0, H = 0; - char *encoding = 0; - unsigned char *grid = 0; - struct ecc200matrix_s *matrix; - memset(binary, 0, sizeof(binary)); - if (encodingptr) - encoding = *encodingptr; - if (Wptr) - W = *Wptr; - if (Hptr) - H = *Hptr; - - // encoding - if (W) { // known size - for (matrix = ecc200matrix; matrix->W && (matrix->W != W || - matrix->H != H); - matrix++) ; - if (!matrix->W) { - fprintf(stderr, "Invalid size %dx%d\n", W, H); - return 0; - } - if (!encoding) { - int len; - char *e = encmake(barcodelen, barcode, &len, 1); - if (e && len != matrix->bytes) { // try not an exact fit - free(e); - e = encmake(barcodelen, barcode, &len, 0); - if (len > matrix->bytes) { - fprintf(stderr, - "Cannot make barcode fit %dx%d\n", - W, H); - return 0; - } - } - encoding = e; - } - } else { - // find a suitable encoding - if (encoding == NULL) - encoding = encmake(barcodelen, barcode, NULL, 1); - - if (encoding) { // find one that fits chosen encoding - for (matrix = ecc200matrix; matrix->W; matrix++) - if (ecc200encode - (binary, matrix->bytes, barcode, barcodelen, - encoding, 0)) - break; - } else { - int len; - char *e; - e = encmake(barcodelen, barcode, &len, 1); - for (matrix = ecc200matrix; - matrix->W && matrix->bytes != len; matrix++) ; - if (e && !matrix->W) { // try for non exact fit - free(e); - e = encmake(barcodelen, barcode, &len, 0); - for (matrix = ecc200matrix; - matrix->W && matrix->bytes < len; - matrix++) ; - } - encoding = e; - } - if (!matrix->W) { - fprintf(stderr, - "Cannot find suitable size, barcode too long\n"); - return 0; - } - W = matrix->W; - H = matrix->H; - } - if (!ecc200encode(binary, matrix->bytes, barcode, barcodelen, - encoding, lenp)) { - fprintf(stderr, "Barcode too long for %dx%d\n", W, H); - return 0; - } - // ecc code - ecc200(binary, matrix->bytes, matrix->datablock, matrix->rsblock); - { // placement - int x, y, NC, NR, *places; - NC = W - 2 * (W / matrix->FW); - NR = H - 2 * (H / matrix->FH); - places = safemalloc(NC * NR * sizeof(int)); - ecc200placement(places, NR, NC); - grid = safemalloc(W * H); - memset(grid, 0, W * H); - for (y = 0; y < H; y += matrix->FH) { - for (x = 0; x < W; x++) - grid[y * W + x] = 1; - for (x = 0; x < W; x += 2) - grid[(y + matrix->FH - 1) * W + x] = 1; - } - for (x = 0; x < W; x += matrix->FW) { - for (y = 0; y < H; y++) - grid[y * W + x] = 1; - for (y = 0; y < H; y += 2) - grid[y * W + x + matrix->FW - 1] = 1; - } - for (y = 0; y < NR; y++) { - for (x = 0; x < NC; x++) { - int v = places[(NR - y - 1) * NC + x]; - //fprintf (stderr, "%4d", v); - if (v == 1 || v > 7 - && (binary[(v >> 3) - 1] & (1 << (v & 7)))) - grid[(1 + y + - 2 * (y / (matrix->FH - 2))) * W + - 1 + x + - 2 * (x / (matrix->FW - 2))] = 1; - } - //fprintf (stderr, "\n"); - } - free(places); - } - if (Wptr) - *Wptr = W; - if (Hptr) - *Hptr = H; - if (encodingptr) - *encodingptr = encoding; - if (maxp) - *maxp = matrix->bytes; - if (eccp) - *eccp = - (matrix->bytes + 2) / matrix->datablock * matrix->rsblock; - return grid; -} diff --git a/glabels2/iec16022-0.2.1/iec16022ecc200.h b/glabels2/iec16022-0.2.1/iec16022ecc200.h deleted file mode 100644 index 08678f08..00000000 --- a/glabels2/iec16022-0.2.1/iec16022ecc200.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - * - * IEC16022 bar code generation - * Adrian Kennard, Andrews & Arnold Ltd - * with help from Cliff Hones on the RS coding - * - * (c) 2004 Adrian Kennard, Andrews & Arnold Ltd - * (c) 2006 Stefan Schmidt - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * - * Main encoding function - * Returns the grid (malloced) containing the matrix. L corner at 0,0. - * Takes suggested size in *Wptr, *Hptr, or 0,0. Fills in actual size. - * Takes barcodelen and barcode to be encoded - * Note, if *encodingptr is null, then fills with auto picked (malloced) - * encoding. - * If lenp not null, then the length of encoded data before any final unlatch - * or pad is stored. - * If maxp not null, then the max storage of this size code is stored - * If eccp not null, then the number of ecc bytes used in this size is stored - * Returns 0 on error (writes to stderr with details). - * - */ - -#ifndef __IEC16022ECC200_H -#define __IEC16022ECC200_H - -unsigned char *iec16022ecc200(int *Wptr, int *Hptr, char **encodingptr, - int barcodelen, unsigned char *barcode, - int *lenp, int *maxp, int *eccp); -#define MAXBARCODE 3116 - -#endif /* __IEC16022ECC200_H */ diff --git a/glabels2/iec16022-0.2.1/image.c b/glabels2/iec16022-0.2.1/image.c deleted file mode 100644 index f7dc3056..00000000 --- a/glabels2/iec16022-0.2.1/image.c +++ /dev/null @@ -1,668 +0,0 @@ -/** - * - * Image handling tools, (c) AJK 2001-2005 - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include -#include -#include -#include -#include "image.h" - -#define INTERLACE -#define CLEAR -#define USEZLIB - -#ifdef USEZLIB -#include -#endif - -unsigned char const bbc[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // - 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00, // ! - 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, // " - 0x36, 0x36, 0x7F, 0x36, 0x7F, 0x36, 0x36, 0x00, // # - 0x0C, 0x3F, 0x68, 0x3E, 0x0B, 0x7E, 0x18, 0x00, // $ - 0x60, 0x66, 0x0C, 0x18, 0x30, 0x66, 0x06, 0x00, // % - 0x38, 0x6C, 0x6C, 0x38, 0x6D, 0x66, 0x3B, 0x00, // & - 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, // ' - 0x0C, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0C, 0x00, // ( - 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00, // ) - 0x00, 0x18, 0x7E, 0x3C, 0x7E, 0x18, 0x00, 0x00, // * - 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, // + - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, // , - 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, // - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, // . - 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00, 0x00, // / - 0x18, 0x24, 0x66, 0x66, 0x66, 0x24, 0x18, 0x00, // 0 (non crossed) - 0x18, 0x38, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00, // 1 - 0x3C, 0x66, 0x06, 0x0C, 0x18, 0x30, 0x7E, 0x00, // 2 - 0x3C, 0x66, 0x06, 0x1C, 0x06, 0x66, 0x3C, 0x00, // 3 - 0x0C, 0x1C, 0x3C, 0x6C, 0x7E, 0x0C, 0x0C, 0x00, // 4 - 0x7E, 0x60, 0x7C, 0x06, 0x06, 0x66, 0x3C, 0x00, // 5 - 0x1C, 0x30, 0x60, 0x7C, 0x66, 0x66, 0x3C, 0x00, // 6 - 0x7E, 0x06, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00, // 7 - 0x3C, 0x66, 0x66, 0x3C, 0x66, 0x66, 0x3C, 0x00, // 8 - 0x3C, 0x66, 0x66, 0x3E, 0x06, 0x0C, 0x38, 0x00, // 9 - 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, // : - 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x30, // ; - 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x00, // < - 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00, // = - 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x00, // > - 0x3C, 0x66, 0x0C, 0x18, 0x18, 0x00, 0x18, 0x00, // ? - 0x3C, 0x66, 0x6E, 0x6A, 0x6E, 0x60, 0x3C, 0x00, // @ - 0x3C, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00, // A - 0x7C, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x00, // B - 0x3C, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x00, // C - 0x78, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0x78, 0x00, // D - 0x7E, 0x60, 0x60, 0x7C, 0x60, 0x60, 0x7E, 0x00, // E - 0x7E, 0x60, 0x60, 0x7C, 0x60, 0x60, 0x60, 0x00, // F - 0x3C, 0x66, 0x60, 0x6E, 0x66, 0x66, 0x3C, 0x00, // G - 0x66, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00, // H - 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00, // I - 0x3E, 0x0C, 0x0C, 0x0C, 0x0C, 0x6C, 0x38, 0x00, // J - 0x66, 0x6C, 0x78, 0x70, 0x78, 0x6C, 0x66, 0x00, // K - 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7E, 0x00, // L - 0x63, 0x77, 0x7F, 0x6B, 0x6B, 0x63, 0x63, 0x00, // M - 0x66, 0x66, 0x76, 0x7E, 0x6E, 0x66, 0x66, 0x00, // N - 0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, // O - 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, 0x60, 0x00, // P - 0x3C, 0x66, 0x66, 0x66, 0x6A, 0x6C, 0x36, 0x00, // Q - 0x7C, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0x66, 0x00, // R - 0x3C, 0x66, 0x60, 0x3C, 0x06, 0x66, 0x3C, 0x00, // S - 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // T - 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, // U - 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00, // V - 0x63, 0x63, 0x6B, 0x6B, 0x7F, 0x77, 0x63, 0x00, // W - 0x66, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x66, 0x00, // X - 0x66, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x00, // Y - 0x7E, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x7E, 0x00, // Z - 0x7C, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7C, 0x00, // [ - 0x00, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x00, 0x00, // - 0x3E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x3E, 0x00, // ] - 0x18, 0x3C, 0x66, 0x42, 0x00, 0x00, 0x00, 0x00, // ^ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, // _ - 0x1C, 0x36, 0x30, 0x7C, 0x30, 0x30, 0x7E, 0x00, // ` - 0x00, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, // a - 0x60, 0x60, 0x7C, 0x66, 0x66, 0x66, 0x7C, 0x00, // b - 0x00, 0x00, 0x3C, 0x66, 0x60, 0x66, 0x3C, 0x00, // c - 0x06, 0x06, 0x3E, 0x66, 0x66, 0x66, 0x3E, 0x00, // d - 0x00, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, // e - 0x1C, 0x30, 0x30, 0x7C, 0x30, 0x30, 0x30, 0x00, // f - 0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x3C, // g - 0x60, 0x60, 0x7C, 0x66, 0x66, 0x66, 0x66, 0x00, // h - 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x3C, 0x00, // i - 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x70, // j - 0x60, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0x00, // k - 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, // l - 0x00, 0x00, 0x36, 0x7F, 0x6B, 0x6B, 0x63, 0x00, // m - 0x00, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x66, 0x00, // n - 0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00, // o - 0x00, 0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, // p - 0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x07, // q - 0x00, 0x00, 0x6C, 0x76, 0x60, 0x60, 0x60, 0x00, // r - 0x00, 0x00, 0x3E, 0x60, 0x3C, 0x06, 0x7C, 0x00, // s - 0x30, 0x30, 0x7C, 0x30, 0x30, 0x30, 0x1C, 0x00, // t - 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00, // u - 0x00, 0x00, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00, // v - 0x00, 0x00, 0x63, 0x6B, 0x6B, 0x7F, 0x36, 0x00, // w - 0x00, 0x00, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x00, // x - 0x00, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x06, 0x3C, // y - 0x00, 0x00, 0x7E, 0x0C, 0x18, 0x30, 0x7E, 0x00, // z - 0x0C, 0x18, 0x18, 0x70, 0x18, 0x18, 0x0C, 0x00, // { - 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, // | - 0x30, 0x18, 0x18, 0x0E, 0x18, 0x18, 0x30, 0x00, // } - 0x31, 0x6B, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, // ~ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // -}; - -const char smallc[] = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-+&()/[];%"; -unsigned char const small[] = { - 0x00, 0x00, 0x00, // - 0x1F, 0x11, 0x1F, //0 - 0x11, 0x1F, 0x10, //1 - 0x1D, 0x15, 0x17, //2 - 0x11, 0x15, 0x1F, //3 - 0x07, 0x04, 0x1F, //4 - 0x17, 0x15, 0x1D, //5 - 0x1F, 0x15, 0x1D, //6 - 0x01, 0x01, 0x1F, //7 - 0x1F, 0x15, 0x1F, //8 - 0x17, 0x15, 0x1F, //9 - 0x1E, 0x05, 0x1E, //A - 0x1F, 0x15, 0x0A, //B - 0x0E, 0x11, 0x11, //C - 0x1F, 0x11, 0x0E, //D - 0x1F, 0x15, 0x11, //E - 0x1F, 0x05, 0x01, //F - 0x0E, 0x11, 0x19, //G - 0x1F, 0x04, 0x1F, //H - 0x11, 0x1F, 0x11, //I - 0x11, 0x0F, 0x01, //J - 0x1F, 0x04, 0x1B, //K - 0x1F, 0x10, 0x10, //L - 0x1F, 0x03, 0x1F, //M - 0x1F, 0x01, 0x1F, //N - 0x0E, 0x11, 0x0E, //O - 0x1F, 0x05, 0x02, //P - 0x0E, 0x19, 0x1E, //Q - 0x1F, 0x05, 0x1A, //R - 0x12, 0x15, 0x09, //S - 0x01, 0x1F, 0x01, //T - 0x1F, 0x10, 0x1F, //U - 0x0F, 0x10, 0x0F, //V - 0x1F, 0x18, 0x1F, //W - 0x1B, 0x04, 0x1B, //X - 0x03, 0x1C, 0x03, //Y - 0x19, 0x15, 0x13, //Z - 0x04, 0x04, 0x04, //- - 0x04, 0x0E, 0x04, //+ - 0x04, 0x0E, 0x04, //& (+) - 0x00, 0x0E, 0x11, //( - 0x11, 0x0E, 0x00, //) - 0x08, 0x04, 0x02, /// - 0x00, 0x1F, 0x11, //[ - 0x11, 0x1F, 0x00, //] - 0x10, 0x0A, 0x00, //; - 0x09, 0x04, 0x12, //% -}; - -Image *ImageNew(int w, int h, int c) -{ // create a new blank image - Image *i; - if (!w || !h) - return 0; - i = malloc(sizeof(*i)); - if (!i) - return 0; - memset(i, 0, sizeof(*i)); - i->W = w; - i->L = w + 1; - i->H = h; - i->C = c; - i->Image = malloc((w + 1) * h); - if (!i->Image) { - free(i); - return 0; - } - memset(i->Image, 0, (w + 1) * h); - if (c) { - i->Colour = malloc(sizeof(Colour) * c); - if (!i->Colour) { - free(i->Image); - free(i); - return 0; - } - memset(i->Colour, 0, sizeof(Colour) * c); - } - return i; -} - -void ImageFree(Image * i) -{ // free an image - if (i) { - if (i->Image) - free(i->Image); - if (i->Colour) - free(i->Colour); - free(i); - } -} - -#define MAXLZW 4096 -typedef short LZW[256]; -typedef LZW LZWTree[MAXLZW]; -typedef struct strPrivate { - int cols; // number of colours, power of 2 - unsigned char colbits; // number of bits for colours - int fh; // file handle - int lzwnext; // next code - int lzwlast; // last code in current bit size - int lzwbits; // current bit size - LZWTree lzw; // encode tree - unsigned char block[256]; // block so far, with count at start - int blockv; // pending value - int blockb; // bits used in pending value - short lzwcode; // which code we are on now -} Private; - -static LZWFlush(Private * p) -{ // flush this block - write(p->fh, p->block, *p->block + 1); - *p->block = 0; -} - -static LZWOut(Private * p, short v) -{ // output a value - p->blockv |= (v << p->blockb); - p->blockb += p->lzwbits; - while (p->blockb >= 8) { - p->block[++*p->block] = p->blockv; // last partial byte - p->blockv >>= 8; - p->blockb -= 8; - if (*p->block == 255) - LZWFlush(p); - } -} - -static LZWClear(Private * p) -{ - int c; - p->lzwbits = p->colbits + 1; - p->lzwnext = p->cols + 2; - p->lzwlast = (1 << p->lzwbits) - 1; - p->lzwcode = p->cols; // starting point - for (c = 0; c < p->cols; c++) { - p->lzw[p->cols][c] = c; // links to literal entries - // links from literals, dead ends initially - memset(&p->lzw[c], -1, p->cols * 2); - } -} - -static ImageStart(Private * p) -{ - unsigned char b = p->colbits; - write(p->fh, &b, 1); - *p->block = 0; - p->blockb = 0; - p->blockv = 0; - LZWClear(p); - LZWOut(p, p->cols); // clear code -} - -static ImageEnd(Private * p) -{ - LZWOut(p, p->lzwcode); // last prefix - LZWOut(p, p->cols + 1); // end code - if (p->blockb) - p->block[++*p->block] = p->blockv; // last partial byte - LZWFlush(p); -} - -static ImageOut(Private * p, unsigned char c) -{ - short next = p->lzw[p->lzwcode][c]; - if (next == -1) { // dead end - LZWOut(p, p->lzwcode); // prefix -#ifdef CLEAR - if (p->lzwnext + 1 == MAXLZW) { - LZWOut(p, p->cols); // clear code - LZWClear(p); - } else -#endif - if (p->lzwnext < MAXLZW) { - memset(p->lzw[p->lzwnext], -1, p->cols * 2); // init dead ends - p->lzw[p->lzwcode][c] = p->lzwnext; - if (p->lzwnext > p->lzwlast) { // bigger code - p->lzwbits++; - p->lzwlast = (1 << p->lzwbits) - 1; - } - p->lzwnext++; - } - p->lzwcode = c; - } else - p->lzwcode = next; // not a dead end -} - -// write GIF image -void ImageWriteGif(Image * i, int fh, int back, int trans, char *comment) -{ - struct strPrivate p; - p.fh = fh; - // count colours, min 4 - for (p.colbits = 2, p.cols = 4; p.cols < i->C; - p.cols *= 2, p.colbits++) ; - { // headers - char buf[1500]; - int n = 0; - strcpy(buf, "GIF87a"); -#ifndef INTERLACE - if (comment || trans >= 0) -#endif - buf[4] = '9'; // needs gif89 format - n = 6; - buf[n++] = (i->W & 255); - buf[n++] = (i->W >> 8); - buf[n++] = (i->H & 255); - buf[n++] = (i->H >> 8); - buf[n++] = (i->Colour ? 0x80 : 0) + 0x70 + (p.colbits - 1); - buf[n++] = back; // background - buf[n++] = 0; // aspect - if (i->Colour) { - int c; - for (c = 0; c < p.cols; c++) { - if (c < i->C) { - buf[n++] = (i->Colour[c] >> 16 & 255); - buf[n++] = (i->Colour[c] >> 8 & 255); - buf[n++] = (i->Colour[c] & 255); - } else { // extra, unused, colour - buf[n++] = 0; - buf[n++] = 0; - buf[n++] = 0; - } - } - } - // comment - if (comment && strlen(comment) < 256) { // comment - buf[n++] = 0x21; //extension - buf[n++] = 0xFE; //comment - buf[n++] = strlen(comment); - strcpy(buf + n, comment); - n += buf[n - 1]; - buf[n++] = 0; // end of block - } - if (trans >= 0) { // transparrent - buf[n++] = 0x21; // extension - buf[n++] = 0xF9; // graphic control - buf[n++] = 4; // len - buf[n++] = 1; // transparrent - buf[n++] = 0; // delay - buf[n++] = 0; - buf[n++] = trans; - buf[n++] = 0; // terminator - } - // image - buf[n++] = 0x2C; - buf[n++] = 0; // offset X - buf[n++] = 0; - buf[n++] = 0; // offset Y - buf[n++] = 0; - buf[n++] = (i->W & 255); - buf[n++] = (i->W >> 8); - buf[n++] = (i->H & 255); - buf[n++] = (i->H >> 8); -#ifdef INTERLACE - buf[n++] = 0x40; // interlaced, no local colour table -#else - buf[n++] = 0x00; // non interlaced, no local colour table -#endif - write(fh, buf, n); - } - // image data - { - unsigned char *b; - int x, y; - ImageStart(&p); -#ifdef INTERLACE - for (y = 0; y < i->H; y += 8) - for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) - ImageOut(&p, *b++); - for (y = 4; y < i->H; y += 8) - for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) - ImageOut(&p, *b++); - for (y = 2; y < i->H; y += 4) - for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) - ImageOut(&p, *b++); - for (y = 1; y < i->H; y += 2) - for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) - ImageOut(&p, *b++); -#else - for (y = 0; y < i->H; y++) - for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) - ImageOut(&p, *b++); -#endif - ImageEnd(&p); - } - write(fh, "\0", 1); // end of image data - write(fh, "\x3B", 1); // trailer -} - -void ImageText(Image * i, int x, int y, int col, char *text) -{ // writes 8x8 text - if (i && text) - while (*text) { - if (*text >= ' ' && *text) { - int r; - unsigned const char *b = - bbc + (*text - ' ') * 8; - for (r = 0; r < 8; r++) { - unsigned char v = *b++; - unsigned char *p = - &ImagePixel(i, x, y + r); - unsigned char m; - for (m = 0x80; m; m >>= 1, p++) - if (v & m) - *p = col; - } - } - x += 8; - text++; - } -} - -void ImageSmall(Image * i, int x, int y, int col, char *text) -{ // writes 4x6 digits - if (i && text) - while (*text) { - char *p = strchr(smallc, toupper(*text)); - if (p) { - int r; - char m = 1; - unsigned const char *b = - small + (p - smallc) * 3; - for (r = 0; r < 5; r++) { - int c; - for (c = 0; c < 3; c++) - if (b[c] & m) - ImagePixel(i, x + c, - y + r) = col; - m <<= 1; - } - x += 4; - } else if (*text == '.') { - ImagePixel(i, x, y + 4) = col; - x += 2; - } else if (*text == ':') { - ImagePixel(i, x, y + 1) = col; - ImagePixel(i, x, y + 3) = col; - x += 2; - } - text++; - } -} - -void ImageRect(Image * i, int x, int y, int w, int h, int c) -{ // fill a box - if (i && w && h) { - while (h--) { - unsigned char *p = &ImagePixel(i, x, y); - int n = w; - while (n--) - *p++ = c; - y++; - } - } -} - -// PNG code - - /* Table of CRCs of all 8-bit messages. */ -static unsigned int crc_table[256]; - - /* Make the table for a fast CRC. */ -void make_crc_table(void) -{ - unsigned int c; - int n, k; - for (n = 0; n < 256; n++) { - c = (unsigned int)n; - for (k = 0; k < 8; k++) { - if (c & 1) - c = 0xedb88320L ^ (c >> 1); - else - c = c >> 1; - } - crc_table[n] = c; - } -} - - /* Update a running CRC with the bytes buf[0..len-1]--the CRC - should be initialized to all 1's, and the transmitted value - is the 1's complement of the final running CRC (see the - crc() routine below)). */ - -unsigned int update_crc(unsigned int crc, unsigned char *buf, int len) -{ - unsigned int c = crc; - int n; - - for (n = 0; n < len; n++) - c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8); - - return c; -} - - /* Return the CRC of the bytes buf[0..len-1]. */ -unsigned int crc(unsigned char *buf, int len) -{ - return update_crc(0xffffffffL, buf, len) ^ 0xffffffffL; -} - -unsigned int writecrc(int fh, char *ptr, int len, unsigned int c) -{ - write(fh, ptr, len); - while (len--) - c = crc_table[(c ^ *ptr++) & 0xff] ^ (c >> 8); - return c; -} - -void writechunk(int fh, char *typ, void *ptr, int len) -{ - unsigned int v = htonl(len), crc; - write(fh, &v, 4); - crc = writecrc(fh, typ, 4, ~0); - if (len) - crc = writecrc(fh, ptr, len, crc); - v = htonl(~crc); - write(fh, &v, 4); -} - -#ifndef USEZLIB -unsigned int adlersum(unsigned char *p, int l, unsigned int adler) -{ - unsigned int s1 = (adler & 65535), s2 = (adler >> 16); - while (l--) { - s1 += *p++; - s2 += s1; - } - s1 %= 65521; // can be delayed due to sensible "l" values... - s2 %= 65521; - return (s2 << 16) + s1; -} -#endif - -// write PNG image -void ImageWritePNG(Image * i, int fh, int back, int trans, char *comment) -{ - make_crc_table(); - write(fh, "\211PNG\r\n\032\n", 8); // PNG header - { // IHDR - struct { - unsigned int width; - unsigned int height; - unsigned char depth; - unsigned char colour; - unsigned char compress; - unsigned char filter; - unsigned char interlace; - } ihdr = { - 0, 0, 8, 3, 0, 0}; - ihdr.width = htonl(i->W); - ihdr.height = htonl(i->H); - writechunk(fh, "IHDR", &ihdr, 13); - } - { // PLTE - unsigned int v = htonl(i->C * 3), crc, n; - write(fh, &v, 4); - crc = writecrc(fh, "PLTE", 4, ~0); - for (n = 0; n < i->C; n++) { - v = htonl(i->Colour[n] << 8); - crc = writecrc(fh, (void *)&v, 3, crc); - } - v = htonl(~crc); - write(fh, &v, 4); - } - if (back >= 0) { // bKGD - unsigned char b = back; - writechunk(fh, "bKGD", &b, 1); - } - if (*comment) { // tEXt - char c[] = "Comment"; - unsigned int v = htonl(strlen(c) + strlen(comment) + 1), crc; - write(fh, &v, 4); - crc = writecrc(fh, "tEXt", 4, ~0); - crc = writecrc(fh, c, strlen(c) + 1, crc); - crc = writecrc(fh, comment, strlen(comment), crc); - v = htonl(~crc); - write(fh, &v, 4); - } - { // tRNS - unsigned char alpha[256]; - int n; - for (n = 0; n < i->C; n++) - // 4th palette byte treated as 0=opaque, 255-transparren - alpha[n] = 255 - (i->Colour[n] >> 24); - if (trans >= 0 && trans < i->C) - // manual set of specific transparrent colour - alpha[trans] = 0; - writechunk(fh, "tRNS", alpha, i->C); - } -#ifndef USEZLIB - { // IDAT - unsigned int v = htonl(i->H * (i->L + 5) + 6), - crc, adler = 1, n; - unsigned char *p = i->Image; - write(fh, &v, 4); - crc = writecrc(fh, "IDAT", 4, ~0); - crc = writecrc(fh, "\170\001", 2, crc); // zlib header for deflate - n = i->H; - while (n--) { - unsigned char h[5]; - h[0] = (n ? 0 : 1); // last chunk in deflate, un compressed - h[1] = (i->L & 255); // Len, LSB first as per deflate spec - h[2] = (i->L / 256); - h[3] = ~(i->L & 255); // Inverse of Len - h[4] = ~(i->L / 256); - *p = 0; // filter 0 (NONE) - crc = writecrc(fh, h, 5, crc); - crc = writecrc(fh, p, i->L, crc); - adler = adlersum(p, i->L, adler); - p += i->L; - } - v = htonl(adler); - crc = writecrc(fh, (void *)&v, 4, crc); - v = htonl(~crc); - write(fh, &v, 4); - } -#else - { // IDAT - unsigned char *temp; - unsigned long n; - for (n = 0; n < i->H; n++) - i->Image[n * i->L] = 0; // filter 0 - n = i->H * i->L * 1001 / 1000 + 12; - temp = malloc(n); - if (compress2(temp, &n, i->Image, i->L * i->H, 9) != Z_OK) - fprintf(stderr, "Deflate error\n"); - else - writechunk(fh, "IDAT", temp, n); - free(temp); - } -#endif - writechunk(fh, "IEND", 0, 0); // IEND -} diff --git a/glabels2/iec16022-0.2.1/image.h b/glabels2/iec16022-0.2.1/image.h deleted file mode 100644 index 92d6d06e..00000000 --- a/glabels2/iec16022-0.2.1/image.h +++ /dev/null @@ -1,49 +0,0 @@ -/** - * - * Image handling tools, (c) AJK 2001-2005 - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef __IMAGE_H -#define __IMAGE_H - -typedef unsigned int Colour; // RGB value - -// Image object -typedef struct { - int W, // width - L, // Line length in Image (W+1) - H; // height - unsigned char *Image; // image array, one byte per pixel - int C; // colours (can be non power of 2, max 256) - Colour *Colour; // colour map (must have entry for each colour) -} Image; - -// macros and functions - -#define ImagePixel(i,x,y) ((i)->Image[1+(i)->L*(y)+(x)]) - -Image *ImageNew(int w, int h, int c); // create a new blank image -void ImageFree(Image * i); // free an image -void ImageWriteGif(Image * i, int fh, int back, int trans, char *comment); -void ImageWritePNG(Image * i, int fh, int back, int trans, char *comment); -void ImageText(Image * i, int x, int y, int c, char *text); // write 8x8 text -void ImageSmall(Image * i, int x, int y, int c, char *text); // write 4x6 text -void ImageRect(Image * i, int x, int y, int w, int h, int c); // fill a box -#define ImageWrite ImageWritePNG // default - -#endif /* __IMAGE_H */ diff --git a/glabels2/iec16022-0.2.1/reedsol.c b/glabels2/iec16022-0.2.1/reedsol.c deleted file mode 100644 index a9502412..00000000 --- a/glabels2/iec16022-0.2.1/reedsol.c +++ /dev/null @@ -1,172 +0,0 @@ -/** - * - * This is a simple Reed-Solomon encoder - * (C) Cliff Hones 2004 - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -// It is not written with high efficiency in mind, so is probably -// not suitable for real-time encoding. The aim was to keep it -// simple, general and clear. -// -// - -// Usage: -// First call rs_init_gf(poly) to set up the Galois Field parameters. -// Then call rs_init_code(size, index) to set the encoding size -// Then call rs_encode(datasize, data, out) to encode the data. -// -// These can be called repeatedly as required - but note that -// rs_init_code must be called following any rs_init_gf call. -// -// If the parameters are fixed, some of the statics below can be -// replaced with constants in the obvious way, and additionally -// malloc/free can be avoided by using static arrays of a suitable -// size. - -#include // only needed for debug (main) -#include // only needed for malloc/free - -static int gfpoly; -static int symsize; // in bits -static int logmod; // 2**symsize - 1 -static int rlen; - -static int *log = NULL, *alog = NULL, *rspoly = NULL; - -// rs_init_gf(poly) initialises the parameters for the Galois Field. -// The symbol size is determined from the highest bit set in poly -// This implementation will support sizes up to 30 bits (though that -// will result in very large log/antilog tables) - bit sizes of -// 8 or 4 are typical -// -// The poly is the bit pattern representing the GF characteristic -// polynomial. e.g. for ECC200 (8-bit symbols) the polynomial is -// a**8 + a**5 + a**3 + a**2 + 1, which translates to 0x12d. - -void rs_init_gf(int poly) -{ - int m, b, p, v; - - // Return storage from previous setup - if (log) { - free(log); - free(alog); - free(rspoly); - rspoly = NULL; - } - // Find the top bit, and hence the symbol size - for (b = 1, m = 0; b <= poly; b <<= 1) - m++; - b >>= 1; - m--; - gfpoly = poly; - symsize = m; - - // Calculate the log/alog tables - logmod = (1 << m) - 1; - log = (int *)malloc(sizeof(int) * (logmod + 1)); - alog = (int *)malloc(sizeof(int) * logmod); - - for (p = 1, v = 0; v < logmod; v++) { - alog[v] = p; - log[p] = v; - p <<= 1; - if (p & b) - p ^= poly; - } -} - -// rs_init_code(nsym, index) initialises the Reed-Solomon encoder -// nsym is the number of symbols to be generated (to be appended -// to the input data). index is usually 1 - it is the index of -// the constant in the first term (i) of the RS generator polynomial: -// (x + 2**i)*(x + 2**(i+1))*... [nsym terms] -// For ECC200, index is 1. - -void rs_init_code(int nsym, int index) -{ - int i, k; - - if (rspoly) - free(rspoly); - rspoly = (int *)malloc(sizeof(int) * (nsym + 1)); - - rlen = nsym; - - rspoly[0] = 1; - for (i = 1; i <= nsym; i++) { - rspoly[i] = 1; - for (k = i - 1; k > 0; k--) { - if (rspoly[k]) - rspoly[k] = - alog[(log[rspoly[k]] + index) % logmod]; - rspoly[k] ^= rspoly[k - 1]; - } - rspoly[0] = alog[(log[rspoly[0]] + index) % logmod]; - index++; - } -} - -// Note that the following uses byte arrays, so is only suitable for -// symbol sizes up to 8 bits. Just change the data type of data and res -// to unsigned int * for larger symbols. - -void rs_encode(int len, unsigned char *data, unsigned char *res) -{ - int i, k, m; - for (i = 0; i < rlen; i++) - res[i] = 0; - for (i = 0; i < len; i++) { - m = res[rlen - 1] ^ data[i]; - for (k = rlen - 1; k > 0; k--) { - if (m && rspoly[k]) - res[k] = - res[k - - 1] ^ alog[(log[m] + - log[rspoly[k]]) % logmod]; - else - res[k] = res[k - 1]; - } - if (m && rspoly[0]) - res[0] = alog[(log[m] + log[rspoly[0]]) % logmod]; - else - res[0] = 0; - } -} - -#ifndef LIB -// The following tests the routines with the ISO/IEC 16022 Annexe R data -int main(void) -{ - register int i; - - unsigned char data[9] = { 142, 164, 186 }; - unsigned char out[5]; - - rs_init_gf(0x12d); - rs_init_code(5, 1); - - rs_encode(3, data, out); - - printf("Result of Annexe R encoding:\n"); - for (i = 4; i >= 0; i--) - printf(" %d\n", out[i]); - - return 0; -} -#endif diff --git a/glabels2/iec16022-0.2.1/reedsol.h b/glabels2/iec16022-0.2.1/reedsol.h deleted file mode 100644 index 0181a8df..00000000 --- a/glabels2/iec16022-0.2.1/reedsol.h +++ /dev/null @@ -1,29 +0,0 @@ -/** - * - * This is a simple Reed-Solomon encoder - * (C) Cliff Hones 2004 - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef __REEDSOL_H -#define __REEDSOL_H - -void rs_init_gf(int poly); -void rs_init_code(int nsym, int index); -void rs_encode(int len, unsigned char *data, unsigned char *res); - -#endif /* __REEDSOL_H */ diff --git a/glabels2/iec16022-0.2.1/test/testsuite-example.bin b/glabels2/iec16022-0.2.1/test/testsuite-example.bin deleted file mode 100644 index 02a4436d..00000000 --- a/glabels2/iec16022-0.2.1/test/testsuite-example.bin +++ /dev/null @@ -1 +0,0 @@ -ÿÿÿÿ¿`ïÁ϶mÜ>ýÜÏÃðŠ¼N¯·«9š‚±¤Ë»¾ƒÐ@¨ÄÌEÙù£,Æ<°Ü-öb°:Çw×ɪªªªÿÿÿÿŸÀŽöÊÕï—¦‘¸%kûhŽÔ«-¨Û£0ËQ³kâÛ€Éôå£ÂÍ~„ögëTåགྷ絪ªªª \ No newline at end of file diff --git a/glabels2/iec16022-0.2.1/test/testsuite-example.eps b/glabels2/iec16022-0.2.1/test/testsuite-example.eps deleted file mode 100644 index 9f97c228..00000000 --- a/glabels2/iec16022-0.2.1/test/testsuite-example.eps +++ /dev/null @@ -1,15 +0,0 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%Creator: IEC16022 barcode/stamp generator -%%BarcodeData: Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o -%%BarcodeSize: 32x32 -%%BarcodeFormat: ECC200 -%%DocumentData: Clean7Bit -%%LanguageLevel: 1 -%%Pages: 1 -%%BoundingBox: 0 0 34 34 -%%EndComments -%%Page: 1 1 -32 32 1[1 0 0 1 -1 -1]{< -00000000 409F10E5 3E304992 23C102F9 23E0303C 0F7543B1 504854C6 657D4E5B 3444417C 2FBF573B 33BA2606 5CD339C3 4FE823D2 099D4FC5 38882836 55555555 -00000000 603F7109 352A10F0 68596EFB 47DA7094 0497712B 54D257E4 24ED5CCF 34AE4C94 1DE524E1 7F360B1A 5C3D3281 7BE60998 14AB1A1F 427C184A 55555555 ->}image diff --git a/glabels2/iec16022-0.2.1/test/testsuite-example.hex b/glabels2/iec16022-0.2.1/test/testsuite-example.hex deleted file mode 100644 index 874101c1..00000000 --- a/glabels2/iec16022-0.2.1/test/testsuite-example.hex +++ /dev/null @@ -1,2 +0,0 @@ -FFFFFFFF BF60EF1A C1CFB66D DC3EFD06 DC1FCFC3 F08ABC4E AFB7AB39 9A82B1A4 CBBBBE83 D040A8C4 CC45D9F9 A32CC63C B017DC2D F662B03A C777D7C9 AAAAAAAA -FFFFFFFF 9FC08EF6 CAD5EF0F 97A69104 B8258F6B FB688ED4 AB2DA81B DB12A330 CB51B36B E21ADB1E 80C9F4E5 A3C2CD7E 8419F667 EB54E5E0 BD83E7B5 AAAAAAAA diff --git a/glabels2/iec16022-0.2.1/test/testsuite-example.png b/glabels2/iec16022-0.2.1/test/testsuite-example.png deleted file mode 100644 index 050d1f0e..00000000 Binary files a/glabels2/iec16022-0.2.1/test/testsuite-example.png and /dev/null differ diff --git a/glabels2/iec16022-0.2.1/test/testsuite-example.text b/glabels2/iec16022-0.2.1/test/testsuite-example.text deleted file mode 100644 index 097a7d1c..00000000 --- a/glabels2/iec16022-0.2.1/test/testsuite-example.text +++ /dev/null @@ -1,32 +0,0 @@ -* * * * * * * * * * * * * * * * -* **** ** ***** **** ** * * -*** * ** * * * *** * **** -* * ** ***** ** ** *** -* * **** * ** ** * ****** -* ** * ***** * *** * * -*** * ** * ** ** ** **** -** * ** * * ** ** ** ** * ** -** ** ** * * * * ** ** -* * * ** * ** ** * * ** ** -***** ** ** * * *** ** * * -* *** * * ** **** ** * ** -* * **** * ** * * * * -** * * ** * * **** **** **** -* ******* * *** **** ** -******************************** -* * * * * * * * * * * * * * * * -** *** *** ***** * ***** * * -**** ** ** * * ** *** * -* ** * ***** *** * ** * -* * ** * ** ** ** **** -** ** * * *** ** ****** * -** * * * * * ** * -** * *** *** *** ***** * ** -* ** * * * * ** ** * * -* * ***** ** **** * * ** *** * -**** * * * * **** * *** -** *** ******* ****** ** -** *** ***** ****** * ** -** *** ***** ** ** ** ** * -* ****** ** *** **** ** * -******************************** diff --git a/glabels2/iec16022-0.2.1/test/testsuite.sh b/glabels2/iec16022-0.2.1/test/testsuite.sh deleted file mode 100755 index 82a100af..00000000 --- a/glabels2/iec16022-0.2.1/test/testsuite.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -FAILED=0 - -../iec16022 -o testsuite-test.text -f Text -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" -../iec16022 -o testsuite-test.eps -f EPS -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" -../iec16022 -o testsuite-test.png -f PNG -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" -../iec16022 -o testsuite-test.bin -f Bin -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" -../iec16022 -o testsuite-test.hex -f Hex -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" - -diff -b testsuite-test.text testsuite-example.text && echo "Text test passed" || echo "Text test FAILED" || FAILED=1 -diff -b testsuite-test.eps testsuite-example.eps && echo "EPS test passed" || echo "EPS test FAILED" || FAILED=1 -diff -b testsuite-test.png testsuite-example.png && echo "PNG test passed" || echo "PNG test FAILED" || FAILED=1 -diff -b testsuite-test.bin testsuite-example.bin && echo "Bin test passed" || echo "Bin test FAILED" || FAILED=1 -diff -b testsuite-test.hex testsuite-example.hex && echo "Hex test passed" || echo "Hex test FAILED" || FAILED=1 - -rm testsuite-test.* - -exit $FAILED diff --git a/glabels2/libglabels/Makefile.am b/glabels2/libglabels/Makefile.am deleted file mode 100644 index 2d1228ab..00000000 --- a/glabels2/libglabels/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -templatesdir = $(datadir)/glabels/templates - -INCLUDES = \ - $(LIBGLABELS_CFLAGS) \ - -DDATADIR=\""$(datadir)"\" \ - -DLIBGLABELS_TEMPLATE_DIR=\""$(templatesdir)"\" \ - $(DISABLE_DEPRECATED_CFLAGS) - -libglabels_la_LDFLAGS=\ - -version-info $(LIBGLABELS_VERSION_INFO) \ - $(LIBGLABELS_LIBS) \ - -no-undefined - -lib_LTLIBRARIES = libglabels.la - -libglabelsincludedir=$(includedir)/libglabels - -libglabels_la_SOURCES = \ - libglabels-private.h \ - db.h \ - db.c \ - enums.h \ - paper.h \ - paper.c \ - category.h \ - category.c \ - template.h \ - template.c \ - xml-paper.h \ - xml-paper.c \ - xml-category.h \ - xml-category.c \ - xml-template.h \ - xml-template.c \ - xml.h \ - xml.c \ - str.h \ - str.c - -libglabelsinclude_HEADERS = \ - libglabels.h \ - db.h \ - enums.h \ - paper.h \ - category.h \ - template.h \ - xml-paper.h \ - xml-category.h \ - xml-template.h \ - xml.h \ - str.h - -EXTRA_DIST = \ - libglabels.pc.in - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libglabels.pc - diff --git a/glabels2/libglabels/category.c b/glabels2/libglabels/category.c deleted file mode 100644 index f7f4052c..00000000 --- a/glabels2/libglabels/category.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * category.c - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#include - -#include "category.h" - -#include -#include -#include - -#include "libglabels-private.h" - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - - -/*===========================================*/ -/* Functions. */ -/*===========================================*/ - -/** - * lgl_category_new: - * @id: Id of category definition. (E.g. label, card, etc.) Should be - * unique. - * @name: Localized name of category. - * - * Allocates and constructs a new #lglCategory structure. - * - * Returns: a pointer to a newly allocated #lglCategory structure. - * - */ -lglCategory * -lgl_category_new (gchar *id, - gchar *name) -{ - lglCategory *category; - - category = g_new0 (lglCategory,1); - category->id = g_strdup (id); - category->name = g_strdup (name); - - return category; -} - - -/** - * lgl_category_dup: - * @orig: #lglCategory structure to be duplicated. - * - * Duplicates an existing #lglCategory structure. - * - * Returns: a pointer to a newly allocated #lglCategory structure. - * - */ -lglCategory *lgl_category_dup (const lglCategory *orig) -{ - lglCategory *category; - - g_return_val_if_fail (orig, NULL); - - category = g_new0 (lglCategory,1); - - category->id = g_strdup (orig->id); - category->name = g_strdup (orig->name); - - return category; -} - - -/** - * lgl_category_free: - * @category: pointer to #lglCategory structure to be freed. - * - * Free all memory associated with an existing #lglCategory structure. - * - */ -void lgl_category_free (lglCategory *category) -{ - - if ( category != NULL ) { - - g_free (category->id); - category->id = NULL; - - g_free (category->name); - category->name = NULL; - - g_free (category); - } - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/category.h b/glabels2/libglabels/category.h deleted file mode 100644 index 3c19bf2e..00000000 --- a/glabels2/libglabels/category.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * category.h - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __CATEGORY_H__ -#define __CATEGORY_H__ - -#include - -G_BEGIN_DECLS - -/* - * Template class - */ -typedef struct _lglCategory lglCategory; - -struct _lglCategory { - gchar *id; /* Unique ID of category */ - gchar *name; /* Localized name of category */ -}; - - -/* - * Category construction - */ -lglCategory *lgl_category_new (gchar *id, - gchar *name); - -lglCategory *lgl_category_dup (const lglCategory *orig); -void lgl_category_free (lglCategory *category); - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/db.c b/glabels2/libglabels/db.c deleted file mode 100644 index 4a582e8d..00000000 --- a/glabels2/libglabels/db.c +++ /dev/null @@ -1,1614 +0,0 @@ -/* - * db.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#include - -#include "db.h" - -#include -#include -#include -#include -#include - -#include "libglabels-private.h" - -#include "xml-paper.h" -#include "xml-category.h" -#include "xml-template.h" - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static GList *papers = NULL; -static GList *categories = NULL; -static GList *templates = NULL; - -static GHashTable *template_cache = NULL; - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void init_template_cache (void); -static void add_to_template_cache (lglTemplate *template); - -static GList *read_papers (void); -static GList *read_paper_files_from_dir (GList *papers, - const gchar *dirname); - -static GList *read_categories (void); -static GList *read_category_files_from_dir (GList *categories, - const gchar *dirname); - -static GList *read_templates (void); -static GList *read_template_files_from_dir (GList *templates, - const gchar *dirname); - -static lglTemplate *template_full_page (const gchar *page_size); - - -/*===========================================*/ -/* Module initialization */ -/*===========================================*/ - -/** - * lgl_db_init: - * - * Initialize all libglabels subsystems. It is not necessary for an application to call - * lgl_db_init(), because libglabels will initialize on demand. An application programmer may - * choose to call lgl_db_init() at startup to minimize the impact of the first libglabels call - * on GUI response time. - * - * This function initializes its paper definitions, category definitions, and its template - * database.. It will search both system and user template directories to locate - * this data. - */ -void -lgl_db_init (void) -{ - lglPaper *paper_other; - lglCategory *category_user_defined; - GList *page_sizes; - GList *p; - - /* - * Paper definitions - */ - if (!papers) - { - - papers = read_papers (); - - /* Create and append an "Other" entry. */ - paper_other = lgl_paper_new ("Other", _("Other"), 0.0, 0.0, NULL); - papers = g_list_append (papers, paper_other); - - } - - /* - * Categories - */ - if (!categories) - { - categories = read_categories (); - - /* Create and append a "User defined" entry. */ - category_user_defined = lgl_category_new ("user-defined", _("User defined")); - categories = g_list_append (categories, category_user_defined); - } - - /* - * Templates - */ - if (!templates) - { - - templates = read_templates (); - - /* Create and append generic full page templates. */ - page_sizes = lgl_db_get_paper_id_list (); - for ( p=page_sizes; p != NULL; p=p->next ) - { - if ( !lgl_db_is_paper_id_other (p->data) ) - { - templates = g_list_append (templates, - template_full_page (p->data)); - } - } - lgl_db_free_paper_id_list (page_sizes); - - init_template_cache (); - } -} - - -/*===========================================*/ -/* Paper db functions. */ -/*===========================================*/ - -/** - * lgl_db_get_paper_id_list: - * - * Get a list of all paper ids known to libglabels. - * - * Returns: a list of paper ids. - * - */ -GList * -lgl_db_get_paper_id_list (void) -{ - GList *ids = NULL; - GList *p; - lglPaper *paper; - - if (!papers) - { - lgl_db_init (); - } - - for ( p=papers; p != NULL; p=p->next ) - { - paper = (lglPaper *)p->data; - ids = g_list_append (ids, g_strdup (paper->id)); - } - - return ids; -} - - -/** - * lgl_db_free_paper_id_list: - * @ids: List of id strings to be freed. - * - * Free up all storage associated with an id list obtained with - * lgl_db_get_paper_id_list(). - * - */ -void -lgl_db_free_paper_id_list (GList *ids) -{ - GList *p; - - for (p = ids; p != NULL; p = p->next) - { - g_free (p->data); - p->data = NULL; - } - - g_list_free (ids); -} - - -/** - * lgl_db_get_paper_name_list: - * - * Get a list of all localized paper names known to libglabels. - * - * Returns: a list of localized paper names. - * - */ -GList * -lgl_db_get_paper_name_list (void) -{ - GList *names = NULL; - GList *p; - lglPaper *paper; - - if (!papers) - { - lgl_db_init (); - } - - for ( p=papers; p != NULL; p=p->next ) - { - paper = (lglPaper *)p->data; - names = g_list_append (names, g_strdup (paper->name)); - } - - return names; -} - - -/** - * lgl_db_free_paper_name_list: - * @names: List of localized paper name strings to be freed. - * - * Free up all storage associated with a name list obtained with - * lgl_db_get_paper_name_list(). - * - */ -void -lgl_db_free_paper_name_list (GList *names) -{ - GList *p; - - for (p = names; p != NULL; p = p->next) - { - g_free (p->data); - p->data = NULL; - } - - g_list_free (names); -} - - -/** - * lgl_db_lookup_paper_from_name: - * @name: localized paper name string - * - * Lookup paper definition from localized paper name string. - * - * Returns: pointer to a newly allocated #lglPaper structure. - * - */ -lglPaper * -lgl_db_lookup_paper_from_name (const gchar *name) -{ - GList *p; - lglPaper *paper; - - if (!papers) - { - lgl_db_init (); - } - - if (name == NULL) - { - /* If no name, return first paper as a default */ - return lgl_paper_dup ((lglPaper *) papers->data); - } - - for (p = papers; p != NULL; p = p->next) - { - paper = (lglPaper *) p->data; - if (UTF8_EQUAL (paper->name, name)) - { - return lgl_paper_dup (paper); - } - } - - return NULL; -} - - -/** - * lgl_db_lookup_paper_from_id: - * @id: paper id string - * - * Lookup paper definition from id string. - * - * Returns: pointer to a newly allocated #lglPaper structure. - * - */ -lglPaper * -lgl_db_lookup_paper_from_id (const gchar *id) -{ - GList *p; - lglPaper *paper; - - if (!papers) - { - lgl_db_init (); - } - - if (id == NULL) - { - /* If no id, return first paper as a default */ - return lgl_paper_dup ((lglPaper *) papers->data); - } - - for (p = papers; p != NULL; p = p->next) - { - paper = (lglPaper *) p->data; - if (ASCII_EQUAL (paper->id, id)) - { - return lgl_paper_dup (paper); - } - } - - return NULL; -} - - -/** - * lgl_db_lookup_paper_id_from_name: - * @name: localized paper name stringp - * - * Lookup paper name string from localized paper name string. - * - * Returns: pointer to a newly allocated id string. - * - */ -gchar * -lgl_db_lookup_paper_id_from_name (const gchar *name) -{ - lglPaper *paper = NULL; - gchar *id = NULL; - - if (name != NULL) - { - paper = lgl_db_lookup_paper_from_name (name); - if ( paper != NULL ) - { - id = g_strdup (paper->id); - lgl_paper_free (paper); - paper = NULL; - } - } - - return id; -} - - -/** - * lgl_db_lookup_paper_name_from_id: - * @id: paper id string - * - * Lookup localized paper name string from paper id string. - * - * Returns: pointer to a newly allocated localized paper name string. - * - */ -gchar * -lgl_db_lookup_paper_name_from_id (const gchar *id) -{ - lglPaper *paper = NULL; - gchar *name = NULL; - - if (id != NULL) - { - paper = lgl_db_lookup_paper_from_id (id); - if ( paper != NULL ) - { - name = g_strdup (paper->name); - lgl_paper_free (paper); - paper = NULL; - } - } - - return name; -} - - -/** - * lgl_db_is_paper_id_known: - * @id: paper id to test - * - * Determine if given paper id is known to libglabels. - * - * Returns: TRUE if id is known, otherwise FALSE. - * - */ -gboolean -lgl_db_is_paper_id_known (const gchar *id) -{ - GList *p; - lglPaper *paper; - - if (!papers) - { - lgl_db_init (); - } - - if (id == NULL) - { - return FALSE; - } - - for (p = papers; p != NULL; p = p->next) - { - paper = (lglPaper *) p->data; - if (ASCII_EQUAL (paper->id, id)) - { - return TRUE; - } - } - - return FALSE; -} - - -/** - * lgl_db_is_paper_id_other: - * @id: paper id to test - * - * Determine if given paper id is the special id "Other." - * - * Returns: TRUE if id is "Other", otherwise FALSE. - * - */ -gboolean -lgl_db_is_paper_id_other (const gchar *id) -{ - if (id == NULL) - { - return FALSE; - } - - return (ASCII_EQUAL (id, "Other")); -} - - -static GList * -read_papers (void) -{ - gchar *data_dir; - GList *papers = NULL; - - data_dir = LGL_SYSTEM_DATA_DIR; - papers = read_paper_files_from_dir (papers, data_dir); - g_free (data_dir); - - data_dir = LGL_USER_DATA_DIR; - papers = read_paper_files_from_dir (papers, data_dir); - g_free (data_dir); - - if (papers == NULL) { - g_critical (_("Unable to locate paper size definitions. Libglabels may not be installed correctly!")); - } - - return papers; -} - - -static GList * -read_paper_files_from_dir (GList *papers, - const gchar *dirname) -{ - GDir *dp; - const gchar *filename, *extension; - gchar *full_filename = NULL; - GError *gerror = NULL; - GList *new_papers = NULL; - - if (dirname == NULL) { - return papers; - } - - if (!g_file_test (dirname, G_FILE_TEST_EXISTS)) { - return papers; - } - - dp = g_dir_open (dirname, 0, &gerror); - if (gerror != NULL) { - g_message ("cannot open data directory: %s", gerror->message ); - return papers; - } - - while ((filename = g_dir_read_name (dp)) != NULL) { - - extension = strrchr (filename, '.'); - - if (extension != NULL) { - - if ( ASCII_EQUAL (extension, ".paper") || - ASCII_EQUAL (filename, "paper-sizes.xml") ) - { - - full_filename = - g_build_filename (dirname, filename, NULL); - new_papers = - lgl_xml_paper_read_papers_from_file (full_filename); - g_free (full_filename); - - papers = g_list_concat (papers, new_papers); - new_papers = NULL; - - } - - } - - } - - g_dir_close (dp); - - return papers; -} - - -/** - * lgl_db_print_known_papers: - * - * For debugging purposes: print a list of all paper definitions known to - * libglabels. - * - */ -void -lgl_db_print_known_papers (void) -{ - GList *p; - lglPaper *paper; - - if (!papers) { - lgl_db_init (); - } - - g_print ("%s():\n", __FUNCTION__); - for (p = papers; p != NULL; p = p->next) { - paper = (lglPaper *) p->data; - - g_print ("PAPER id=\"%s\", name=\"%s\", width=%gpts, height=%gpts\n", - paper->id, paper->name, paper->width, paper->height); - - } - g_print ("\n"); - -} - - -/*===========================================*/ -/* Category db functions. */ -/*===========================================*/ - -/** - * lgl_db_get_category_id_list: - * - * Get a list of all category ids known to libglabels. - * - * Returns: a list of category ids. - * - */ -GList * -lgl_db_get_category_id_list (void) -{ - GList *ids = NULL; - GList *p; - lglCategory *category; - - if (!categories) - { - lgl_db_init (); - } - - for ( p=categories; p != NULL; p=p->next ) - { - category = (lglCategory *)p->data; - ids = g_list_append (ids, g_strdup (category->id)); - } - - return ids; -} - - -/** - * lgl_db_free_category_id_list: - * @ids: List of id strings to be freed. - * - * Free up all storage associated with an id list obtained with - * lgl_db_get_category_id_list(). - * - */ -void -lgl_db_free_category_id_list (GList *ids) -{ - GList *p; - - for (p = ids; p != NULL; p = p->next) - { - g_free (p->data); - p->data = NULL; - } - - g_list_free (ids); -} - - -/** - * lgl_db_get_category_name_list: - * - * Get a list of all localized category names known to libglabels. - * - * Returns: a list of localized category names. - * - */ -GList * -lgl_db_get_category_name_list (void) -{ - GList *names = NULL; - GList *p; - lglCategory *category; - - if (!categories) - { - lgl_db_init (); - } - - for ( p=categories; p != NULL; p=p->next ) - { - category = (lglCategory *)p->data; - names = g_list_append (names, g_strdup (category->name)); - } - - return names; -} - - -/** - * lgl_db_free_category_name_list: - * @names: List of localized category name strings to be freed. - * - * Free up all storage associated with a name list obtained with - * lgl_db_get_category_name_list(). - * - */ -void -lgl_db_free_category_name_list (GList *names) -{ - GList *p; - - for (p = names; p != NULL; p = p->next) - { - g_free (p->data); - p->data = NULL; - } - - g_list_free (names); -} - - -/** - * lgl_db_lookup_category_from_name: - * @name: localized category name string - * - * Lookup category definition from localized category name string. - * - * Returns: pointer to a newly allocated #lglCategory structure. - * - */ -lglCategory * -lgl_db_lookup_category_from_name (const gchar *name) -{ - GList *p; - lglCategory *category; - - if (!categories) - { - lgl_db_init (); - } - - if (name == NULL) - { - /* If no name, return first category as a default */ - return lgl_category_dup ((lglCategory *) categories->data); - } - - for (p = categories; p != NULL; p = p->next) - { - category = (lglCategory *) p->data; - if (UTF8_EQUAL (category->name, name)) - { - return lgl_category_dup (category); - } - } - - return NULL; -} - - -/** - * lgl_db_lookup_category_from_id: - * @id: category id string - * - * Lookup category definition from id string. - * - * Returns: pointer to a newly allocated #lglCategory structure. - * - */ -lglCategory * -lgl_db_lookup_category_from_id (const gchar *id) -{ - GList *p; - lglCategory *category; - - if (!categories) - { - lgl_db_init (); - } - - if (id == NULL) - { - /* If no id, return first category as a default */ - return lgl_category_dup ((lglCategory *) categories->data); - } - - for (p = categories; p != NULL; p = p->next) - { - category = (lglCategory *) p->data; - if (ASCII_EQUAL (category->id, id)) - { - return lgl_category_dup (category); - } - } - - return NULL; -} - - -/** - * lgl_db_lookup_category_id_from_name: - * @name: localized category name stringp - * - * Lookup category name string from localized category name string. - * - * Returns: pointer to a newly allocated id string. - * - */ -gchar * -lgl_db_lookup_category_id_from_name (const gchar *name) -{ - lglCategory *category = NULL; - gchar *id = NULL; - - if (name != NULL) - { - category = lgl_db_lookup_category_from_name (name); - if ( category != NULL ) - { - id = g_strdup (category->id); - lgl_category_free (category); - category = NULL; - } - } - - return id; -} - - -/** - * lgl_db_lookup_category_name_from_id: - * @id: category id string - * - * Lookup localized category name string from category id string. - * - * Returns: pointer to a newly allocated localized category name string. - * - */ -gchar * -lgl_db_lookup_category_name_from_id (const gchar *id) -{ - lglCategory *category = NULL; - gchar *name = NULL; - - if (id != NULL) - { - category = lgl_db_lookup_category_from_id (id); - if ( category != NULL ) - { - name = g_strdup (category->name); - lgl_category_free (category); - category = NULL; - } - } - - return name; -} - - -/** - * lgl_db_is_category_id_known: - * @id: category id to test - * - * Determine if given category id is known to libglabels. - * - * Returns: TRUE if id is known, otherwise FALSE. - * - */ -gboolean -lgl_db_is_category_id_known (const gchar *id) -{ - GList *p; - lglCategory *category; - - if (!categories) - { - lgl_db_init (); - } - - if (id == NULL) - { - return FALSE; - } - - for (p = categories; p != NULL; p = p->next) - { - category = (lglCategory *) p->data; - if (ASCII_EQUAL (category->id, id)) - { - return TRUE; - } - } - - return FALSE; -} - - -static GList * -read_categories (void) -{ - gchar *data_dir; - GList *categories = NULL; - - data_dir = LGL_SYSTEM_DATA_DIR; - categories = read_category_files_from_dir (categories, data_dir); - g_free (data_dir); - - data_dir = LGL_USER_DATA_DIR; - categories = read_category_files_from_dir (categories, data_dir); - g_free (data_dir); - - if (categories == NULL) { - g_critical (_("Unable to locate category definitions. Libglabels may not be installed correctly!")); - } - - return categories; -} - - -static GList * -read_category_files_from_dir (GList *categories, - const gchar *dirname) -{ - GDir *dp; - const gchar *filename, *extension; - gchar *full_filename = NULL; - GError *gerror = NULL; - GList *new_categories = NULL; - - if (dirname == NULL) { - return categories; - } - - if (!g_file_test (dirname, G_FILE_TEST_EXISTS)) { - return categories; - } - - dp = g_dir_open (dirname, 0, &gerror); - if (gerror != NULL) { - g_message ("cannot open data directory: %s", gerror->message ); - return categories; - } - - while ((filename = g_dir_read_name (dp)) != NULL) { - - extension = strrchr (filename, '.'); - - if (extension != NULL) { - - if ( ASCII_EQUAL (extension, ".category") || - ASCII_EQUAL (filename, "categories.xml") ) - { - - full_filename = - g_build_filename (dirname, filename, NULL); - new_categories = - lgl_xml_category_read_categories_from_file (full_filename); - g_free (full_filename); - - categories = g_list_concat (categories, new_categories); - new_categories = NULL; - - } - - } - - } - - g_dir_close (dp); - - return categories; -} - - -/** - * lgl_db_print_known_categories: - * - * For debugging purposes: print a list of all category definitions known to - * libglabels. - * - */ -void -lgl_db_print_known_categories (void) -{ - GList *p; - lglCategory *category; - - if (!categories) { - lgl_db_init (); - } - - g_print ("%s():\n", __FUNCTION__); - for (p = categories; p != NULL; p = p->next) { - category = (lglCategory *) p->data; - - g_print ("CATEGORY id=\"%s\", name=\"%s\"\n", category->id, category->name); - - } - g_print ("\n"); - -} - - -/*===========================================*/ -/* Brand db functions. */ -/*===========================================*/ - -/** - * lgl_db_get_brand_list: - * @paper_id: If non NULL, limit results to given page size. - * @category_id: If non NULL, limit results to given template category. - * - * Get a list of all valid brands of templates in the template database. - * Results can be filtered by page size and/or template category. A list of valid page - * sizes can be obtained using lgl_db_get_paper_id_list(). A list of valid template - * categories can be obtained using lgl_db_get_category_id_list(). - * - * Returns: a list of brands - */ -GList * -lgl_db_get_brand_list (const gchar *paper_id, - const gchar *category_id) -{ - GList *p_tmplt, *p_alias; - lglTemplate *template; - lglTemplateAlias *alias; - GList *brands = NULL; - - if (!templates) - { - lgl_db_init (); - } - - for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) - { - template = (lglTemplate *) p_tmplt->data; - if (lgl_template_does_page_size_match (template, paper_id) && - lgl_template_does_category_match (template, category_id)) - { - for (p_alias = template->aliases; p_alias != NULL; - p_alias = p_alias->next) - { - alias = (lglTemplateAlias *)p_alias->data; - - if ( !g_list_find_custom (brands, alias->brand, - (GCompareFunc)lgl_str_utf8_casecmp) ) - { - brands = g_list_insert_sorted (brands, - g_strdup (alias->brand), - (GCompareFunc)lgl_str_utf8_casecmp); - } - } - } - } - - return brands; -} - - -/** - * lgl_db_free_brand_list: - * @brands: List of template brand strings to be freed. - * - * Free up all storage associated with a list of template names obtained with - * lgl_db_get_brand_list(). - * - */ -void -lgl_db_free_brand_list (GList *brands) -{ - GList *p_brand; - - for (p_brand = brands; p_brand != NULL; p_brand = p_brand->next) - { - g_free (p_brand->data); - p_brand->data = NULL; - } - - g_list_free (brands); -} - - -/*===========================================*/ -/* Template db functions. */ -/*===========================================*/ - -/** - * lgl_db_register_template: - * @template: Pointer to a template structure to add to database. - * - * Register a template. This function adds a template to the template database. - * The template will be stored in an individual XML file in the user template directory. - * - * Returns: Status of registration attempt (#lglDbRegStatus) - */ -lglDbRegStatus -lgl_db_register_template (const lglTemplate *template) -{ - lglTemplate *template_copy; - gchar *dir, *filename, *abs_filename; - gint bytes_written; - - if (!templates) - { - lgl_db_init (); - } - - if (lgl_db_does_template_exist (template->brand, template->part)) - { - return LGL_DB_REG_BRAND_PART_EXISTS; - } - - if (lgl_db_is_paper_id_known (template->paper_id)) - { - dir = LGL_USER_DATA_DIR; - mkdir (dir, 0775); /* Try to make sure directory exists. */ - filename = g_strdup_printf ("%s_%s.template", template->brand, template->part); - abs_filename = g_build_filename (dir, filename, NULL); - bytes_written = lgl_xml_template_write_template_to_file (template, abs_filename); - g_free (dir); - g_free (filename); - g_free (abs_filename); - - if (bytes_written > 0) - { - template_copy = lgl_template_dup (template); - lgl_template_add_category (template_copy, "user-defined"); - templates = g_list_append (templates, template_copy); - add_to_template_cache (template_copy); - return LGL_DB_REG_OK; - } - else - { - return LGL_DB_REG_FILE_WRITE_ERROR; - } - } - else - { - g_message ("Cannot register new template with unknown page size."); - return LGL_DB_REG_BAD_PAPER_ID; - } - -} - - -/** - * lgl_db_does_template_exist: - * @brand: Brand name. - * @part: Part name/number. - * - * This function tests whether a template with the given brand and part name/number exists. - * - * Returns: TRUE if such a template exists in the database. - */ -gboolean -lgl_db_does_template_exist (const gchar *brand, - const gchar *part) -{ - GList *p_tmplt, *p_alias; - lglTemplate *template; - lglTemplateAlias *alias; - - if (!templates) - { - lgl_db_init (); - } - - if ((brand == NULL) || (part == NULL)) - { - return FALSE; - } - - for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) - { - template = (lglTemplate *) p_tmplt->data; - for (p_alias = template->aliases; p_alias != NULL; p_alias = p_alias->next) - { - alias = (lglTemplateAlias *)p_alias->data; - - if ( UTF8_EQUAL (brand, alias->brand) && - UTF8_EQUAL (part, alias->part) ) - { - return TRUE; - } - } - } - - return FALSE; -} - - -/** - * lgl_db_does_template_name_exist: - * @name: name string - * - * This function test whether a template with the given name exists. - * - * Returns: TRUE if such a template exists in the database. - * - */ -gboolean -lgl_db_does_template_name_exist (const gchar *name) -{ - GList *p_tmplt, *p_alias; - lglTemplate *template; - lglTemplateAlias *alias; - gchar *candidate_name; - - if (!templates) - { - lgl_db_init (); - } - - if (name == NULL) - { - return FALSE; - } - - for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) - { - template = (lglTemplate *) p_tmplt->data; - for (p_alias = template->aliases; p_alias != NULL; p_alias = p_alias->next) - { - alias = (lglTemplateAlias *)p_alias->data; - candidate_name = g_strdup_printf ("%s %s", alias->brand, alias->part); - - if ( UTF8_EQUAL (candidate_name, name) ) { - g_free (candidate_name); - return TRUE; - } - g_free (candidate_name); - } - } - - return FALSE; -} - - -/** - * lgl_db_get_template_name_list_unique: - * @brand: If non NULL, limit results to given brand - * @paper_id: If non NULL, limit results to given page size. - * @category_id: If non NULL, limit results to given template category. - * - * Get a list of valid names of unique templates in the template database. Results - * can be filtered by page size and/or template category. A list of valid page sizes - * can be obtained using lgl_db_get_paper_id_list(). A list of valid template categories - * can be obtained using lgl_db_get_category_id_list(). - * - * This function differs from lgl_db_get_template_name_list_all(), because it does not - * return multiple names for the same template. - * - * Returns: a list of template names. - */ -GList * -lgl_db_get_template_name_list_unique (const gchar *brand, - const gchar *paper_id, - const gchar *category_id) -{ - GList *p_tmplt; - lglTemplate *template; - gchar *name; - GList *names = NULL; - - if (!templates) - { - lgl_db_init (); - } - - for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) - { - template = (lglTemplate *) p_tmplt->data; - - if (lgl_template_does_brand_match (template, brand) && - lgl_template_does_page_size_match (template, paper_id) && - lgl_template_does_category_match (template, category_id)) - { - name = g_strdup_printf ("%s %s", template->brand, template->part); - names = g_list_insert_sorted (names, name, - (GCompareFunc)g_utf8_collate); - } - } - - return names; -} - - -/** - * lgl_db_get_template_name_list_all: - * @brand: If non NULL, limit results to given brand - * @paper_id: If non NULL, limit results to given page size. - * @category_id: If non NULL, limit results to given template category. - * - * Get a list of all valid names and aliases of templates in the template database. - * Results can be filtered by page size and/or template category. A list of valid page - * sizes can be obtained using lgl_db_get_paper_id_list(). A list of valid template - * categories can be obtained using lgl_db_get_category_id_list(). - * - * This function differs from lgl_db_get_template_name_list_unique(), because it will - * return multiple names for the same template. - * - * Returns: a list of template names and aliases. - */ -GList * -lgl_db_get_template_name_list_all (const gchar *brand, - const gchar *paper_id, - const gchar *category_id) -{ - GList *p_tmplt, *p_alias; - lglTemplate *template; - lglTemplateAlias *alias; - gchar *name; - GList *names = NULL; - - if (!templates) - { - lgl_db_init (); - } - - for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) - { - template = (lglTemplate *) p_tmplt->data; - if (lgl_template_does_page_size_match (template, paper_id) && - lgl_template_does_category_match (template, category_id)) - { - for (p_alias = template->aliases; p_alias != NULL; - p_alias = p_alias->next) - { - alias = (lglTemplateAlias *)p_alias->data; - - if ( !brand || UTF8_EQUAL( alias->brand, brand) ) - { - name = g_strdup_printf ("%s %s", alias->brand, alias->part); - names = g_list_insert_sorted (names, name, - (GCompareFunc)g_utf8_collate); - } - } - } - } - - return names; -} - - -/** - * lgl_db_free_template_name_list: - * @names: List of template name strings to be freed. - * - * Free up all storage associated with a list of template names obtained with - * lgl_db_get_template_name_list_all() or lgl_db_get_template_name_list_unique(). - * - */ -void -lgl_db_free_template_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); -} - - -/** - * lgl_db_lookup_template_from_name: - * @name: name string - * - * Lookup template in template database from name string. - * - * Returns: pointer to a newly allocated #lglTemplate structure. - * - */ -lglTemplate * -lgl_db_lookup_template_from_name (const gchar *name) -{ - GList *p_alias; - lglTemplate *template; - lglTemplateAlias *alias; - gchar *candidate_name; - lglTemplate *new_template; - - if (!templates) - { - lgl_db_init (); - } - - if (name == NULL) - { - /* If no name, return first template as a default */ - return lgl_template_dup ((lglTemplate *) templates->data); - } - - template = g_hash_table_lookup (template_cache, name); - - if (template) - { - for (p_alias = template->aliases; p_alias != NULL; p_alias = p_alias->next) - { - alias = (lglTemplateAlias *)p_alias->data; - candidate_name = g_strdup_printf ("%s %s", alias->brand, alias->part); - - if ( UTF8_EQUAL (candidate_name, name) ) - { - g_free (candidate_name); - new_template = lgl_template_dup (template); - g_free (new_template->brand); - new_template->brand = g_strdup (alias->brand); - g_free (new_template->part); - new_template->part = g_strdup (alias->part); - return new_template; - } - - g_free (candidate_name); - } - } - - /* No matching template has been found so return the first template */ - return lgl_template_dup ((lglTemplate *) templates->data); -} - - -static void -init_template_cache (void) -{ - GList *p_tmplt, *p_alias; - lglTemplate *template; - lglTemplateAlias *alias; - gchar *name; - - template_cache = g_hash_table_new (g_str_hash, g_str_equal); - - for ( p_tmplt=templates; p_tmplt != NULL; p_tmplt=p_tmplt->next ) - { - template = (lglTemplate *) p_tmplt->data; - - for ( p_alias=template->aliases; p_alias != NULL; p_alias=p_alias->next ) - { - alias = (lglTemplateAlias *)p_alias->data; - name = g_strdup_printf ("%s %s", alias->brand, alias->part); - - g_hash_table_insert (template_cache, name, template); - } - } -} - - -static void -add_to_template_cache (lglTemplate *template) -{ - GList *p_alias; - lglTemplateAlias *alias; - gchar *name; - - for ( p_alias=template->aliases; p_alias != NULL; p_alias=p_alias->next ) - { - alias = (lglTemplateAlias *)p_alias->data; - name = g_strdup_printf ("%s %s", alias->brand, alias->part); - - g_hash_table_insert (template_cache, name, template); - } -} - - -static GList * -read_templates (void) -{ - gchar *data_dir; - GList *templates = NULL; - GList *p; - lglTemplate *template; - - /* - * User defined templates. Add to user-defined category. - */ - data_dir = LGL_USER_DATA_DIR; - templates = read_template_files_from_dir (templates, data_dir); - g_free (data_dir); - for ( p=templates; p != NULL; p=p->next ) - { - template = (lglTemplate *)p->data; - lgl_template_add_category (template, "user-defined"); - } - - /* - * System templates. - */ - data_dir = LGL_SYSTEM_DATA_DIR; - templates = read_template_files_from_dir (templates, data_dir); - g_free (data_dir); - - if (templates == NULL) - { - g_critical (_("Unable to locate any template files. Libglabels may not be installed correctly!")); - } - - return templates; -} - - -static GList * -read_template_files_from_dir (GList *templates, - const gchar *dirname) -{ - GDir *dp; - const gchar *filename, *extension, *extension2; - gchar *full_filename = NULL; - GError *gerror = NULL; - GList *new_templates = NULL; - - if (dirname == NULL) - return templates; - - if (!g_file_test (dirname, G_FILE_TEST_EXISTS)) - { - return templates; - } - - dp = g_dir_open (dirname, 0, &gerror); - if (gerror != NULL) - { - g_message ("cannot open data directory: %s", gerror->message ); - return templates; - } - - while ((filename = g_dir_read_name (dp)) != NULL) - { - - extension = strrchr (filename, '.'); - extension2 = strrchr (filename, '-'); - - if ( (extension && ASCII_EQUAL (extension, ".template")) || - (extension2 && ASCII_EQUAL (extension2, "-templates.xml")) ) - { - - full_filename = g_build_filename (dirname, filename, NULL); - new_templates = - lgl_xml_template_read_templates_from_file (full_filename); - g_free (full_filename); - - templates = g_list_concat (templates, new_templates); - new_templates = NULL; - } - - } - - g_dir_close (dp); - - return templates; -} - - -static lglTemplate * -template_full_page (const gchar *paper_id) -{ - lglPaper *paper = NULL; - lglTemplate *template = NULL; - lglTemplateFrame *frame = NULL; - gchar *part; - gchar *desc; - - g_return_val_if_fail (paper_id, NULL); - - paper = lgl_db_lookup_paper_from_id (paper_id); - if ( paper == NULL ) - { - return NULL; - } - - part = g_strdup_printf ("%s-Full-Page", paper->id); - desc = g_strdup_printf (_("Generic %s full page template"), paper->name); - - template = lgl_template_new ("Generic", part, desc, - paper_id, paper->width, paper->height); - - - frame = lgl_template_frame_rect_new ("0", - paper->width, - paper->height, - 0.0, - 0.0, - 0.0); - lgl_template_add_frame (template, frame); - - lgl_template_frame_add_layout (frame, lgl_template_layout_new (1, 1, 0., 0., 0., 0.)); - - lgl_template_frame_add_markup (frame, lgl_template_markup_margin_new (9.0)); - - g_free (desc); - desc = NULL; - lgl_paper_free (paper); - paper = NULL; - - return template; -} - - -/** - * lgl_db_print_known_templates: - * - * Print all known templates (for debugging purposes). - * - */ -void -lgl_db_print_known_templates (void) -{ - GList *p; - lglTemplate *template; - - g_print ("%s():\n", __FUNCTION__); - for (p=templates; p!=NULL; p=p->next) - { - template = (lglTemplate *)p->data; - - g_print("TEMPLATE brand=\"%s\", part=\"%s\", description=\"%s\"\n", - template->brand, template->part, template->description); - - } - g_print ("\n"); - -} - - -/** - * lgl_db_print_aliases: - * @template: template - * - * Print all aliases of a template (for debugging purposes). - * - */ -void -lgl_db_print_aliases (const lglTemplate *template) -{ - GList *p; - lglTemplateAlias *alias; - - g_print ("%s():\n", __FUNCTION__); - for (p=template->aliases; p!=NULL; p=p->next) - { - alias = (lglTemplateAlias *)p->data; - - g_print("Alias: brand=\"%s\", part=\"%s\"\n", alias->brand, alias->part); - - } - g_print ("\n"); - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/db.h b/glabels2/libglabels/db.h deleted file mode 100644 index 96367c1d..00000000 --- a/glabels2/libglabels/db.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * db.h - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __DB_H__ -#define __DB_H__ - -#include - -#include "paper.h" -#include "category.h" -#include "template.h" - -G_BEGIN_DECLS - -typedef enum -{ - LGL_DB_REG_OK = 0, - LGL_DB_REG_BAD_PAPER_ID = -1, - LGL_DB_REG_BRAND_PART_EXISTS = -2, - LGL_DB_REG_FILE_WRITE_ERROR = -3 -} lglDbRegStatus; - -/* - * Module initialization - */ -void lgl_db_init (void); - - -/* - * Paper - */ -GList *lgl_db_get_paper_id_list (void); - -void lgl_db_free_paper_id_list (GList *ids); - -GList *lgl_db_get_paper_name_list (void); - -void lgl_db_free_paper_name_list (GList *names); - -lglPaper *lgl_db_lookup_paper_from_name (const gchar *name); - -lglPaper *lgl_db_lookup_paper_from_id (const gchar *id); - -gchar *lgl_db_lookup_paper_id_from_name (const gchar *name); - -gchar *lgl_db_lookup_paper_name_from_id (const gchar *id); - -gboolean lgl_db_is_paper_id_known (const gchar *id); - -gboolean lgl_db_is_paper_id_other (const gchar *id); - - - -/* - * Template categories - */ -GList *lgl_db_get_category_id_list (void); - -void lgl_db_free_category_id_list (GList *ids); - -GList *lgl_db_get_category_name_list (void); - -void lgl_db_free_category_name_list (GList *names); - -lglCategory *lgl_db_lookup_category_from_name (const gchar *name); - -lglCategory *lgl_db_lookup_category_from_id (const gchar *id); - -gchar *lgl_db_lookup_category_id_from_name (const gchar *name); - -gchar *lgl_db_lookup_category_name_from_id (const gchar *id); - -gboolean lgl_db_is_category_id_known (const gchar *id); - - -/* - * Template brands - */ -GList *lgl_db_get_brand_list (const gchar *paper_id, - const gchar *category_id); - -void lgl_db_free_brand_list (GList *brands); - - -/* - * Templates - */ -lglDbRegStatus lgl_db_register_template (const lglTemplate *template); - -gboolean lgl_db_does_template_exist (const gchar *brand, - const gchar *part); - -gboolean lgl_db_does_template_name_exist (const gchar *name); - -GList *lgl_db_get_template_name_list_unique (const gchar *brand, - const gchar *paper_id, - const gchar *category_id); - -GList *lgl_db_get_template_name_list_all (const gchar *brand, - const gchar *paper_id, - const gchar *category_id); - -void lgl_db_free_template_name_list (GList *names); - -lglTemplate *lgl_db_lookup_template_from_name (const gchar *name); - - -/* - * Debugging functions - */ -void lgl_db_print_known_papers (void); - -void lgl_db_print_known_categories (void); - -void lgl_db_print_known_templates (void); - -void lgl_db_print_aliases (const lglTemplate *template); - - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/enums.h b/glabels2/libglabels/enums.h deleted file mode 100644 index 6ebcc1d8..00000000 --- a/glabels2/libglabels/enums.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * enums.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __ENUMS_H__ -#define __ENUMS_H__ - -#include - -G_BEGIN_DECLS - -/* Units of distance */ -typedef enum { - LGL_UNITS_POINT, /* encoded as "pt" */ - LGL_UNITS_INCH, /* encoded as "in" */ - LGL_UNITS_MM, /* encoded as "mm" */ - LGL_UNITS_CM, /* encoded as "cm" */ - LGL_UNITS_PICA, /* encoded as "pc" */ - - LGL_UNITS_FIRST = LGL_UNITS_POINT, - LGL_UNITS_LAST = LGL_UNITS_PICA, -} lglUnitsType; - - -G_END_DECLS - - -#endif /* __ENUMS_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/libglabels-private.h b/glabels2/libglabels/libglabels-private.h deleted file mode 100644 index fa205ee8..00000000 --- a/glabels2/libglabels/libglabels-private.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * libglabels-private.h - * Copyright (C) 2004-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __LIBGLABELS_PRIVATE_H__ -#define __LIBGLABELS_PRIVATE_H__ - -#include - -#include "str.h" - -/* Data system and user data directories. (must free w/ g_free()) */ -#define LGL_SYSTEM_DATA_DIR g_build_filename (LIBGLABELS_TEMPLATE_DIR, NULL) -#define LGL_USER_DATA_DIR g_build_filename (g_get_home_dir (), ".glabels", NULL) - -#undef G_LOG_DOMAIN -#define G_LOG_DOMAIN "LibGlabels" - -#define UTF8_EQUAL(s1,s2) (!lgl_str_utf8_casecmp (s1, s2)) -#define ASCII_EQUAL(s1,s2) (!g_ascii_strcasecmp (s1, s2)) - - -#endif /* __LIBGLABELS_PRIVATE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/libglabels.h b/glabels2/libglabels/libglabels.h deleted file mode 100644 index bd46b19d..00000000 --- a/glabels2/libglabels/libglabels.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * libglabels.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __LIBGLABELS_H__ -#define __LIBGLABELS_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* __LIBGLABELS_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/libglabels.pc.in b/glabels2/libglabels/libglabels.pc.in deleted file mode 100644 index c16e8f47..00000000 --- a/glabels2/libglabels/libglabels.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libglabels -Description: GLabels Template Library -Requires: glib-2.0 libxml-2.0 -Version: @VERSION@ -Libs: -L${libdir} -lglabels -Cflags: -I${includedir} - diff --git a/glabels2/libglabels/paper.c b/glabels2/libglabels/paper.c deleted file mode 100644 index d0b80fbb..00000000 --- a/glabels2/libglabels/paper.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * paper.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#include - -#include "paper.h" - -#include -#include -#include - -#include "libglabels-private.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - - -/*===========================================*/ -/* Functions. */ -/*===========================================*/ - -/** - * lgl_paper_new: - * @id: Id of paper definition. (E.g. US-Letter, A4, etc.) Should be - * unique. - * @name: Localized name of paper. - * @width: Width of paper in points. - * @height: Height of paper in points. - * @pwg_size: PWG 5101.1-2002 size name. - * - * Allocates and constructs a new #lglPaper structure. - * - * Returns: a pointer to a newly allocated #lglPaper structure. - * - */ -lglPaper * -lgl_paper_new (gchar *id, - gchar *name, - gdouble width, - gdouble height, - gchar *pwg_size) -{ - lglPaper *paper; - - paper = g_new0 (lglPaper,1); - - paper->id = g_strdup (id); - paper->name = g_strdup (name); - paper->width = width; - paper->height = height; - paper->pwg_size = g_strdup (pwg_size); - - return paper; -} - - -/** - * lgl_paper_dup: - * @orig: #lglPaper structure to be duplicated. - * - * Duplicates an existing #lglPaper structure. - * - * Returns: a pointer to a newly allocated #lglPaper structure. - * - */ -lglPaper *lgl_paper_dup (const lglPaper *orig) -{ - lglPaper *paper; - - g_return_val_if_fail (orig, NULL); - - paper = g_new0 (lglPaper,1); - - paper->id = g_strdup (orig->id); - paper->name = g_strdup (orig->name); - paper->width = orig->width; - paper->height = orig->height; - paper->pwg_size = g_strdup (orig->pwg_size); - - return paper; -} - - -/** - * lgl_paper_free: - * @paper: pointer to #lglPaper structure to be freed. - * - * Free all memory associated with an existing #lglPaper structure. - * - */ -void lgl_paper_free (lglPaper *paper) -{ - - if ( paper != NULL ) { - - g_free (paper->id); - paper->id = NULL; - - g_free (paper->name); - paper->name = NULL; - - g_free (paper->pwg_size); - paper->pwg_size = NULL; - - g_free (paper); - } - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/paper.h b/glabels2/libglabels/paper.h deleted file mode 100644 index 0cf918f2..00000000 --- a/glabels2/libglabels/paper.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * paper.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __PAPER_H__ -#define __PAPER_H__ - -#include - -G_BEGIN_DECLS - - -/* - * lglPaper structure - */ -typedef struct _lglPaper lglPaper; - -struct _lglPaper { - gchar *id; /* Unique ID of paper definition */ - gchar *name; /* Localized name of paper */ - gdouble width; /* Width (in points) */ - gdouble height; /* Height (in points) */ - gchar *pwg_size; /* PWG 5101.1-2002 size name */ -}; - - -/* - * Paper construction - */ -lglPaper *lgl_paper_new (gchar *id, - gchar *name, - gdouble width, - gdouble height, - gchar *pwg_size); - -lglPaper *lgl_paper_dup (const lglPaper *orig); - -void lgl_paper_free (lglPaper *paper); - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/str.c b/glabels2/libglabels/str.c deleted file mode 100644 index 5c21f189..00000000 --- a/glabels2/libglabels/str.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * str.c - * Copyright (C) 2007-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#include - -#include "str.h" - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - - -/*===========================================*/ -/* Functions. */ -/*===========================================*/ - -/** - * lgl_str_utf8_casecmp: - * @s1: string to compare with s2. - * @s2: string to compare with s1. - * - * Compare two UTF-8 strings, ignoring the case of characters. - * - * This function should be used only on strings that are known to be encoded - * in UTF-8 or a compatible UTF-8 subset. - * - * Returns: 0 if the strings match, a negative value if s1 < s2, - * or a positive value if s1 > s2. - * - */ -gint -lgl_str_utf8_casecmp (const gchar *s1, - const gchar *s2) -{ - gchar *folded_s1; - gchar *folded_s2; - gint result; - - folded_s1 = g_utf8_casefold (s1, -1); - folded_s2 = g_utf8_casefold (s2, -1); - - result = g_utf8_collate (folded_s1, folded_s2); - - g_free (folded_s1); - g_free (folded_s2); - - return result; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/str.h b/glabels2/libglabels/str.h deleted file mode 100644 index 54e2361a..00000000 --- a/glabels2/libglabels/str.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * str.h - * Copyright (C) 2007-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __STR_H__ -#define __STR_H__ - -#include - -G_BEGIN_DECLS - -gint lgl_str_utf8_casecmp (const gchar *s1, - const gchar *s2); - -G_END_DECLS - - -#endif /* __STR_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/template.c b/glabels2/libglabels/template.c deleted file mode 100644 index 5675c401..00000000 --- a/glabels2/libglabels/template.c +++ /dev/null @@ -1,1122 +0,0 @@ -/* - * template.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#include - -#include "template.h" - -#include -#include -#include -#include -#include - -#include "libglabels-private.h" - -#include "paper.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static gint compare_origins (gconstpointer a, - gconstpointer b, - gpointer user_data); - -/*===========================================*/ -/* Functions. */ -/*===========================================*/ - -/** - * lgl_template_new: - * @brand: Template brand - * @part: Template part name/number - * @description: Template descriptions - * @paper_id: Page size id - * @page_width: Page width in points, set to zero unless paper_id="Other" - * @page_height: Page height in points, set to zero unless paper_id="Other" - * - * Create a new template structure, with the given top-level attributes. The - * created template will have no initial aliases, categories, or frames - * associated with it. See lgl_template_add_alias(), lgl_template_add_category(), - * and lgl_template_add_frame() to add these. - * - * Returns: pointer to a newly allocated #lglTemplate structure. - * - */ -lglTemplate * -lgl_template_new (const gchar *brand, - const gchar *part, - const gchar *description, - const gchar *paper_id, - gdouble page_width, - gdouble page_height) -{ - lglTemplate *template; - lglTemplateAlias *alias; - - template = g_new0 (lglTemplate,1); - - template->brand = g_strdup (brand); - template->part = g_strdup (part); - template->description = g_strdup (description); - template->paper_id = g_strdup (paper_id); - template->page_width = page_width; - template->page_height = page_height; - - /* Always include primary name in alias list. */ - template->aliases = NULL; - alias = lgl_template_alias_new (brand, part); - lgl_template_add_alias (template, alias); - - return template; -} - - -/** - * lgl_template_get_name: - * @template: Pointer to template structure to test - * - * This function returns the name of the given template. The name is the concetenation - * of the brand and part name/number. - * - * Returns: A pointer to a newly allocated name string. Should be freed with g_free(). - * - */ -gchar * -lgl_template_get_name (const lglTemplate *template) -{ - g_return_val_if_fail (template, NULL); - - return g_strdup_printf ("%s %s", template->brand, template->part); -} - - -/** - * lgl_template_do_templates_match: - * @template1: Pointer to 1st template structure to test - * @template2: Pointer to 2nd template structure to test - * - * This function tests if the given templates match. This is a simple test that only tests - * the brand and part name/number. It does not test if they are actually identical. - * - * Returns: TRUE if the two template matche. - * - */ -gboolean -lgl_template_do_templates_match (const lglTemplate *template1, - const lglTemplate *template2) -{ - g_return_val_if_fail (template1, FALSE); - g_return_val_if_fail (template2, FALSE); - - return (UTF8_EQUAL (template1->brand, template2->brand) && - UTF8_EQUAL (template1->part, template2->part)); -} - - -/** - * lgl_template_does_brand_match: - * @template: Pointer to template structure to test - * @brand: Brand string - * - * This function tests if the brand of the template matches the given brand. - * - * Returns: TRUE if the template matches the given brand. - * - */ -gboolean -lgl_template_does_brand_match (const lglTemplate *template, - const gchar *brand) -{ - g_return_val_if_fail (template, FALSE); - - /* NULL matches everything. */ - if (brand == NULL) - { - return TRUE; - } - - return UTF8_EQUAL (template->brand, brand); -} - - -/** - * lgl_template_does_page_size_match: - * @template: Pointer to template structure to test - * @paper_id: Page size ID string - * - * This function tests if the page size of the template matches the given ID. - * - * Returns: TRUE if the template matches the given page size ID. - * - */ -gboolean -lgl_template_does_page_size_match (const lglTemplate *template, - const gchar *paper_id) -{ - g_return_val_if_fail (template, FALSE); - - /* NULL matches everything. */ - if (paper_id == NULL) - { - return TRUE; - } - - return ASCII_EQUAL(paper_id, template->paper_id); -} - - -/** - * lgl_template_does_category_match: - * @template: Pointer to template structure to test - * @category_id: Category ID string - * - * This function tests if the given template belongs to the given category ID. - * - * Returns: TRUE if the template matches the given category ID. - * - */ -gboolean -lgl_template_does_category_match (const lglTemplate *template, - const gchar *category_id) -{ - GList *p; - - g_return_val_if_fail (template, FALSE); - - /* NULL matches everything. */ - if (category_id == NULL) - { - return TRUE; - } - - for ( p=template->category_ids; p != NULL; p=p->next ) - { - if (ASCII_EQUAL(category_id, p->data)) - { - return TRUE; - } - } - - return FALSE; -} - - -/** - * lgl_template_alias_new: - * @brand: Alias brand - * @part: Alias part name/number - * - * Create a new template alias structure, with the given brand and part number. - * - * Returns: pointer to a newly allocated #lglTemplateAlias structure. - * - */ -lglTemplateAlias * -lgl_template_alias_new (const gchar *brand, - const gchar *part) -{ - lglTemplateAlias *alias; - - alias = g_new0 (lglTemplateAlias,1); - - alias->brand = g_strdup (brand); - alias->part = g_strdup (part); - - return alias; -} - - -/** - * lgl_template_add_alias: - * @template: Pointer to template structure - * @alias: Alias string - * - * This function adds the given alias to a templates list of aliases. - * - */ -void -lgl_template_add_alias (lglTemplate *template, - lglTemplateAlias *alias) -{ - g_return_if_fail (template); - g_return_if_fail (alias); - - template->aliases = g_list_append (template->aliases, alias); -} - - -/** - * lgl_template_add_frame: - * @template: Pointer to template structure - * @frame: Pointer to frame structure - * - * This function adds the given frame structure to the template. Once added, - * the frame structure belongs to the given template; do not attempt to free - * it. - * - * Note: Currently glabels only supports a single frame per template. - * - */ -void -lgl_template_add_frame (lglTemplate *template, - lglTemplateFrame *frame) -{ - g_return_if_fail (template); - g_return_if_fail (frame); - - template->frames = g_list_append (template->frames, frame); -} - - -/** - * lgl_template_add_category: - * @template: Pointer to template structure - * @category_id: Category ID string - * - * This function adds the given category ID to a templates category list. - * - */ -void -lgl_template_add_category (lglTemplate *template, - const gchar *category_id) -{ - g_return_if_fail (template); - g_return_if_fail (category_id); - - template->category_ids = g_list_append (template->category_ids, - g_strdup (category_id)); -} - - -/** - * lgl_template_frame_rect_new: - * @id: ID of frame. (This should currently always be "0"). - * @w: width of frame in points. - * @h: height of frame in points. - * @r: radius of rounded corners in points. (Should be 0 for square corners.) - * @x_waste: Amount of overprint to allow in the horizontal direction. - * @y_waste: Amount of overprint to allow in the vertical direction. - * - * This function creates a new template frame for a rectangular label or card. - * - * Returns: Pointer to newly allocated #lglTemplateFrame structure. - * - */ -lglTemplateFrame * -lgl_template_frame_rect_new (const gchar *id, - gdouble w, - gdouble h, - gdouble r, - gdouble x_waste, - gdouble y_waste) -{ - lglTemplateFrame *frame; - - frame = g_new0 (lglTemplateFrame, 1); - - frame->shape = LGL_TEMPLATE_FRAME_SHAPE_RECT; - frame->rect.id = g_strdup (id); - - frame->rect.w = w; - frame->rect.h = h; - frame->rect.r = r; - frame->rect.x_waste = x_waste; - frame->rect.y_waste = y_waste; - - return frame; -} - - -/** - * lgl_template_frame_round_new: - * @id: ID of frame. (This should currently always be "0"). - * @r: radius of label in points. - * @waste: Amount of overprint to allow. - * - * This function creates a new template frame for a round label. - * - * Returns: Pointer to newly allocated #lglTemplateFrame structure. - * - */ -lglTemplateFrame * -lgl_template_frame_round_new (const gchar *id, - gdouble r, - gdouble waste) -{ - lglTemplateFrame *frame; - - frame = g_new0 (lglTemplateFrame, 1); - - frame->shape = LGL_TEMPLATE_FRAME_SHAPE_ROUND; - frame->round.id = g_strdup (id); - - frame->round.r = r; - frame->round.waste = waste; - - return frame; -} - - -/** - * lgl_template_frame_cd_new: - * @id: ID of frame. (This should currently always be "0"). - * @r1: outer radius of label in points. - * @r2: radius of center hole in points. - * @w: clip width of frame in points for business card CDs. Should be 0 for no clipping. - * @h: clip height of frame in points for business card CDs. Should be 0 for no clipping. - * @waste: Amount of overprint to allow. - * - * This function creates a new template frame for a CD/DVD label. - * - * Returns: Pointer to newly allocated #lglTemplateFrame structure. - * - */ -lglTemplateFrame * -lgl_template_frame_cd_new (const gchar *id, - gdouble r1, - gdouble r2, - gdouble w, - gdouble h, - gdouble waste) -{ - lglTemplateFrame *frame; - - frame = g_new0 (lglTemplateFrame, 1); - - frame->shape = LGL_TEMPLATE_FRAME_SHAPE_CD; - frame->cd.id = g_strdup (id); - - frame->cd.r1 = r1; - frame->cd.r2 = r2; - frame->cd.w = w; - frame->cd.h = h; - frame->cd.waste = waste; - - return frame; -} - - -/** - * lgl_template_frame_get_size: - * @frame: #lglTemplateFrame structure to query - * @w: pointer to location to receive width of frame - * @h: pointer to location to receive height of frame - * - * Get size (width and height) of given #lglTemplateFrame in points. - * - */ -void -lgl_template_frame_get_size (const lglTemplateFrame *frame, - gdouble *w, - gdouble *h) -{ - g_return_if_fail (frame); - - switch (frame->shape) { - case LGL_TEMPLATE_FRAME_SHAPE_RECT: - *w = frame->rect.w; - *h = frame->rect.h; - break; - case LGL_TEMPLATE_FRAME_SHAPE_ROUND: - *w = 2.0 * frame->round.r; - *h = 2.0 * frame->round.r; - break; - case LGL_TEMPLATE_FRAME_SHAPE_CD: - if (frame->cd.w == 0.0) { - *w = 2.0 * frame->cd.r1; - } else { - *w = frame->cd.w; - } - if (frame->cd.h == 0.0) { - *h = 2.0 * frame->cd.r1; - } else { - *h = frame->cd.h; - } - break; - default: - *w = 0.0; - *h = 0.0; - break; - } -} - - -/** - * lgl_template_frame_get_n_labels: - * @frame: #lglTemplateFrame structure to query - * - * Get total number of labels per sheet corresponding to the given frame. - * - * Returns: number of labels per sheet. - * - */ -gint -lgl_template_frame_get_n_labels (const lglTemplateFrame *frame) -{ - gint n_labels = 0; - GList *p; - lglTemplateLayout *layout; - - g_return_val_if_fail (frame, 0); - - for ( p=frame->all.layouts; p != NULL; p=p->next ) { - layout = (lglTemplateLayout *)p->data; - - n_labels += layout->nx * layout->ny; - } - - return n_labels; -} - - -/** - * lgl_template_frame_get_origins: - * @frame: #lglTemplateFrame structure to query - * - * Get an array of label origins for the given frame. These origins represent the - * upper left hand corner of each label on a page corresponding to the given frame. - * The origins will be ordered geometrically left to right and then top to bottom. - * The array should be freed using g_free(). - * - * Returns: A newly allocated array of #lglTemplateOrigin structures. - * - */ -lglTemplateOrigin * -lgl_template_frame_get_origins (const lglTemplateFrame *frame) -{ - gint i_label, n_labels, ix, iy; - lglTemplateOrigin *origins; - GList *p; - lglTemplateLayout *layout; - - g_return_val_if_fail (frame, NULL); - - n_labels = lgl_template_frame_get_n_labels (frame); - origins = g_new0 (lglTemplateOrigin, n_labels); - - i_label = 0; - for ( p=frame->all.layouts; p != NULL; p=p->next ) { - layout = (lglTemplateLayout *)p->data; - - for (iy = 0; iy < layout->ny; iy++) { - for (ix = 0; ix < layout->nx; ix++, i_label++) { - origins[i_label].x = ix*layout->dx + layout->x0; - origins[i_label].y = iy*layout->dy + layout->y0; - } - } - } - - g_qsort_with_data (origins, n_labels, sizeof(lglTemplateOrigin), - compare_origins, NULL); - - return origins; -} - - -/** - * lgl_template_frame_add_layout: - * @frame: Pointer to template frame to add layout to. - * @layout: Pointer to layout structure to add to frame. - * - * This function adds a layout structure to the given template frame. - * - */ -void -lgl_template_frame_add_layout (lglTemplateFrame *frame, - lglTemplateLayout *layout) -{ - g_return_if_fail (frame); - g_return_if_fail (layout); - - frame->all.layouts = g_list_append (frame->all.layouts, layout); -} - - -/** - * lgl_template_frame_add_markup: - * @frame: Pointer to template frame to add markup to. - * @markup: Pointer to markup structure to add to frame. - * - * This function adds a markup structure to the given template frame. - * - */ -void -lgl_template_frame_add_markup (lglTemplateFrame *frame, - lglTemplateMarkup *markup) -{ - g_return_if_fail (frame); - g_return_if_fail (markup); - - frame->all.markups = g_list_append (frame->all.markups, markup); -} - - -/** - * lgl_template_layout_new: - * @nx: Number of labels across. - * @ny: Number of labels down. - * @x0: X coordinate of the top-left corner of the top-left label in the layout in points. - * @y0: Y coordinate of the top-left corner of the top-left label in the layout in points. - * @dx: Horizontal pitch in points. This is the distance from left-edge to left-edge. - * @dy: Vertical pitch in points. This is the distance from top-edge to top-edge. - * - * This function creates a new layout structure with the given parameters. - * - * Returns: a newly allocated #lglTemplateLayout structure. - * - */ -lglTemplateLayout * -lgl_template_layout_new (gint nx, - gint ny, - gdouble x0, - gdouble y0, - gdouble dx, - gdouble dy) -{ - lglTemplateLayout *layout; - - layout = g_new0 (lglTemplateLayout, 1); - - layout->nx = nx; - layout->ny = ny; - layout->x0 = x0; - layout->y0 = y0; - layout->dx = dx; - layout->dy = dy; - - return layout; -} - - -/** - * lgl_template_markup_margin_new: - * @size: margin size in points. - * - * This function creates a new margin markup structure. - * - * Returns: a newly allocated #lglTemplateMarkup structure. - * - */ -lglTemplateMarkup * -lgl_template_markup_margin_new (gdouble size) -{ - lglTemplateMarkup *markup; - - markup = g_new0 (lglTemplateMarkup, 1); - - markup->type = LGL_TEMPLATE_MARKUP_MARGIN; - markup->margin.size = size; - - return markup; -} - - -/** - * lgl_template_markup_line_new: - * @x1: x coordinate of first endpoint. - * @y1: y coordinate of first endpoint. - * @x2: x coordinate of second endpoint. - * @y2: y coordinate of second endpoint. - * - * This function creates a new line markup structure. - * - * Returns: a newly allocated #lglTemplateMarkup structure. - * - */ -lglTemplateMarkup * -lgl_template_markup_line_new (gdouble x1, - gdouble y1, - gdouble x2, - gdouble y2) -{ - lglTemplateMarkup *markup; - - markup = g_new0 (lglTemplateMarkup, 1); - - markup->type = LGL_TEMPLATE_MARKUP_LINE; - markup->line.x1 = x1; - markup->line.y1 = y1; - markup->line.x2 = x2; - markup->line.y2 = y2; - - return markup; -} - - -/** - * lgl_template_markup_circle_new: - * @x0: x coordinate of center of circle. - * @y0: y coordinate of center of circle. - * @r: radius of circle. - * - * This function creates a new circle markup structure. - * - * Returns: a newly allocated #lglTemplateMarkup structure. - * - */ -lglTemplateMarkup * -lgl_template_markup_circle_new (gdouble x0, - gdouble y0, - gdouble r) -{ - lglTemplateMarkup *markup; - - markup = g_new0 (lglTemplateMarkup, 1); - - markup->type = LGL_TEMPLATE_MARKUP_CIRCLE; - markup->circle.x0 = x0; - markup->circle.y0 = y0; - markup->circle.r = r; - - return markup; -} - - -/** - * lgl_template_markup_rect_new: - * @x1: x coordinate of top-left corner of rectangle. - * @y1: y coordinate of top-left corner of rectangle. - * @w: width of rectangle. - * @h: height of rectangle. - * @r: radius of rounded corner. - * - * This function creates a new rectangle markup structure. - * - * Returns: a newly allocated #lglTemplateMarkup structure. - * - */ -lglTemplateMarkup * -lgl_template_markup_rect_new (gdouble x1, - gdouble y1, - gdouble w, - gdouble h, - gdouble r) -{ - lglTemplateMarkup *markup; - - markup = g_new0 (lglTemplateMarkup, 1); - - markup->type = LGL_TEMPLATE_MARKUP_RECT; - markup->rect.x1 = x1; - markup->rect.y1 = y1; - markup->rect.w = w; - markup->rect.h = h; - markup->rect.r = r; - - return markup; -} - - -/** - * lgl_template_dup: - * @orig_template: Template to duplicate. - * - * This function duplicates a template structure. - * - * Returns: a newly allocated #lglTemplate structure. - * - */ -lglTemplate * -lgl_template_dup (const lglTemplate *orig_template) -{ - lglTemplate *template; - lglTemplateAlias *alias; - GList *p; - lglTemplateFrame *frame; - - g_return_val_if_fail (orig_template, NULL); - - template = lgl_template_new (orig_template->brand, - orig_template->part, - orig_template->description, - orig_template->paper_id, - orig_template->page_width, - orig_template->page_height); - - for ( p=orig_template->aliases; p != NULL; p=p->next ) - { - alias = (lglTemplateAlias *)p->data; - - if ( !(UTF8_EQUAL (template->brand, alias->brand) && - UTF8_EQUAL (template->part, alias->part)) ) - { - lgl_template_add_alias (template, lgl_template_alias_dup (alias)); - } - - } - - for ( p=orig_template->category_ids; p != NULL; p=p->next ) - { - lgl_template_add_category (template, p->data); - } - - for ( p=orig_template->frames; p != NULL; p=p->next ) - { - frame = (lglTemplateFrame *)p->data; - - lgl_template_add_frame (template, lgl_template_frame_dup (frame)); - } - - return template; -} - - -/** - * lgl_template_free: - * @template: Template to free. - * - * This function frees all memory associated with given template structure. - * - */ -void -lgl_template_free (lglTemplate *template) -{ - GList *p; - lglTemplateFrame *frame; - - if ( template != NULL ) { - - g_free (template->brand); - template->brand = NULL; - - g_free (template->part); - template->part = NULL; - - g_free (template->description); - template->description = NULL; - - g_free (template->paper_id); - template->paper_id = NULL; - - for ( p=template->aliases; p != NULL; p=p->next ) { - - lgl_template_alias_free (p->data); - p->data = NULL; - - } - g_list_free (template->aliases); - template->aliases = NULL; - - for ( p=template->category_ids; p != NULL; p=p->next ) { - - g_free (p->data); - p->data = NULL; - - } - g_list_free (template->category_ids); - template->category_ids = NULL; - - for ( p=template->frames; p != NULL; p=p->next ) { - - frame = (lglTemplateFrame *)p->data; - - lgl_template_frame_free (frame); - p->data = NULL; - } - g_list_free (template->frames); - template->frames = NULL; - - g_free (template); - - } - -} - - -/** - * lgl_template_alias_dup: - * @orig_alias: Alias to duplicate. - * - * This function duplicates a template alias structure. - * - * Returns: a newly allocated #lglTemplateAlias structure. - * - */ -lglTemplateAlias * -lgl_template_alias_dup (const lglTemplateAlias *orig_alias) -{ - g_return_val_if_fail (orig_alias, NULL); - - return lgl_template_alias_new (orig_alias->brand, orig_alias->part); -} - - -/** - * lgl_template_alias_free: - * @alias: Alias to free. - * - * This function frees all memory associated with given template alias structure. - * - */ -void -lgl_template_alias_free (lglTemplateAlias *alias) -{ - - if ( alias != NULL ) - { - g_free (alias->brand); - alias->brand = NULL; - - g_free (alias->part); - alias->part = NULL; - - g_free (alias); - } -} - - -/** - * lgl_template_frame_dup: - * @orig_frame: Frame to duplicate. - * - * This function duplicates a template frame structure. - * - * Returns: a newly allocated #lglTemplateFrame structure. - * - */ -lglTemplateFrame * -lgl_template_frame_dup (const lglTemplateFrame *orig_frame) -{ - lglTemplateFrame *frame; - GList *p; - lglTemplateLayout *layout; - lglTemplateMarkup *markup; - - g_return_val_if_fail (orig_frame, NULL); - - switch (orig_frame->shape) { - - case LGL_TEMPLATE_FRAME_SHAPE_RECT: - frame = - lgl_template_frame_rect_new (orig_frame->all.id, - orig_frame->rect.w, - orig_frame->rect.h, - orig_frame->rect.r, - orig_frame->rect.x_waste, - orig_frame->rect.y_waste); - break; - - case LGL_TEMPLATE_FRAME_SHAPE_ROUND: - frame = - lgl_template_frame_round_new (orig_frame->all.id, - orig_frame->round.r, - orig_frame->round.waste); - break; - - case LGL_TEMPLATE_FRAME_SHAPE_CD: - frame = - lgl_template_frame_cd_new (orig_frame->all.id, - orig_frame->cd.r1, - orig_frame->cd.r2, - orig_frame->cd.w, - orig_frame->cd.h, - orig_frame->cd.waste); - break; - - default: - return NULL; - break; - } - - for ( p=orig_frame->all.layouts; p != NULL; p=p->next ) { - - layout = (lglTemplateLayout *)p->data; - - lgl_template_frame_add_layout (frame, lgl_template_layout_dup (layout)); - } - - for ( p=orig_frame->all.markups; p != NULL; p=p->next ) { - - markup = (lglTemplateMarkup *)p->data; - - lgl_template_frame_add_markup (frame, lgl_template_markup_dup (markup)); - } - - return frame; -} - - -/** - * lgl_template_frame_free: - * @frame: Frame to free. - * - * This function frees all memory associated with given template frame structure. - * - */ -void -lgl_template_frame_free (lglTemplateFrame *frame) -{ - GList *p; - lglTemplateLayout *layout; - lglTemplateMarkup *markup; - - if ( frame != NULL ) { - - g_free (frame->all.id); - frame->all.id = NULL; - - for ( p=frame->all.layouts; p != NULL; p=p->next ) { - - layout = (lglTemplateLayout *)p->data; - - lgl_template_layout_free (layout); - p->data = NULL; - } - g_list_free (frame->all.layouts); - frame->all.layouts = NULL; - - for ( p=frame->all.markups; p != NULL; p=p->next ) { - - markup = (lglTemplateMarkup *)p->data; - - lgl_template_markup_free (markup); - p->data = NULL; - } - g_list_free (frame->all.markups); - frame->all.markups = NULL; - - g_free (frame); - - } - -} - - -/** - * lgl_template_layout_dup: - * @orig_layout: Layout to duplicate. - * - * This function duplicates a template layout structure. - * - * Returns: a newly allocated #lglTemplateLayout structure. - * - */ -lglTemplateLayout * -lgl_template_layout_dup (const lglTemplateLayout *orig_layout) -{ - lglTemplateLayout *layout; - - g_return_val_if_fail (orig_layout, NULL); - - layout = g_new0 (lglTemplateLayout, 1); - - /* copy contents */ - *layout = *orig_layout; - - return layout; -} - - -/** - * lgl_template_layout_free: - * @layout: Layout to free. - * - * This function frees all memory associated with given template layout structure. - * - */ -void -lgl_template_layout_free (lglTemplateLayout *layout) -{ - g_free (layout); -} - - -/** - * lgl_template_markup_dup: - * @orig_markup: Markup to duplicate. - * - * This function duplicates a template markup structure. - * - * Returns: a newly allocated #lglTemplateMarkup structure. - * - */ -lglTemplateMarkup * -lgl_template_markup_dup (const lglTemplateMarkup *orig_markup) -{ - lglTemplateMarkup *markup; - - g_return_val_if_fail (orig_markup, NULL); - - markup = g_new0 (lglTemplateMarkup, 1); - - *markup = *orig_markup; - - return markup; -} - - -/** - * lgl_template_markup_free: - * @markup: Markup to free. - * - * This function frees all memory associated with given template markup structure. - * - */ -void -lgl_template_markup_free (lglTemplateMarkup *markup) -{ - g_free (markup); -} - - -static gint -compare_origins (gconstpointer a, - gconstpointer b, - gpointer user_data) -{ - const lglTemplateOrigin *a_origin = a, *b_origin = b; - - if ( a_origin->y < b_origin->y ) { - return -1; - } else if ( a_origin->y > b_origin->y ) { - return +1; - } else { - if ( a_origin->x < b_origin->x ) { - return -1; - } else if ( a_origin->x > b_origin->x ) { - return +1; - } else { - return 0; /* hopefully 2 labels won't have the same origin */ - } - } -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/template.h b/glabels2/libglabels/template.h deleted file mode 100644 index ca53ab1b..00000000 --- a/glabels2/libglabels/template.h +++ /dev/null @@ -1,383 +0,0 @@ -/* - * template.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __TEMPLATE_H__ -#define __TEMPLATE_H__ - -#include - -G_BEGIN_DECLS - -typedef struct _lglTemplate lglTemplate; - -typedef struct _lglTemplateAlias lglTemplateAlias; - -typedef union _lglTemplateFrame lglTemplateFrame; -typedef struct _lglTemplateFrameAll lglTemplateFrameAll; -typedef struct _lglTemplateFrameRect lglTemplateFrameRect; -typedef struct _lglTemplateFrameRound lglTemplateFrameRound; -typedef struct _lglTemplateFrameCD lglTemplateFrameCD; - -typedef struct _lglTemplateLayout lglTemplateLayout; - -typedef union _lglTemplateMarkup lglTemplateMarkup; -typedef struct _lglTemplateMarkupMargin lglTemplateMarkupMargin; -typedef struct _lglTemplateMarkupLine lglTemplateMarkupLine; -typedef struct _lglTemplateMarkupCircle lglTemplateMarkupCircle; -typedef struct _lglTemplateMarkupRect lglTemplateMarkupRect; - -typedef struct _lglTemplateOrigin lglTemplateOrigin; - -/* - * Top-level Template Structure - */ -struct _lglTemplate { - - gchar *brand; - gchar *part; - gchar *description; - gchar *paper_id; - gdouble page_width; - gdouble page_height; - - /* List of (lglTemplateAlias *) aliase structures. */ - GList *aliases; - - /* List of (gchar *) category ids. */ - GList *category_ids; - - /* List of (lglTemplateFrame *) label frame structures. - * Currently glabels only supports a single label frame per - * template. */ - GList *frames; - -}; - - -/* - * Top-level Template Structure - */ -struct _lglTemplateAlias { - - gchar *brand; - gchar *part; - -}; - -/* - * Possible Frame Shapes - */ -typedef enum { - LGL_TEMPLATE_FRAME_SHAPE_RECT, - LGL_TEMPLATE_FRAME_SHAPE_ROUND, - LGL_TEMPLATE_FRAME_SHAPE_CD, -} lglTemplateFrameShape; - - -/* - * Frame Structure - */ -struct _lglTemplateFrameAll { - - /* Begin Common Fields */ - lglTemplateFrameShape shape; - - gchar *id; /* Id, currently always "0" */ - GList *layouts; /* List of lglTemplateLayouts */ - GList *markups; /* List of lglTemplateMarkups */ - /* End Common Fields */ -}; - -struct _lglTemplateFrameRect { - - /* Begin Common Fields */ - lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_RECT. */ - - gchar *id; /* Id, currently always "0" */ - GList *layouts; /* List of lglTemplateLayouts */ - GList *markups; /* List of lglTemplateMarkups */ - /* End Common Fields */ - - gdouble w; /* Width */ - gdouble h; /* Height */ - gdouble r; /* Corner radius */ - gdouble x_waste; /* Amount of horiz overprint allowed. */ - gdouble y_waste; /* Amount of vert overprint allowed. */ -}; - -struct _lglTemplateFrameRound { - - /* Begin Common Fields */ - lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_ROUND. */ - - gchar *id; /* Id, currently always "0" */ - GList *layouts; /* List of lglTemplateLayouts */ - GList *markups; /* List of lglTemplateMarkups */ - /* End Common Fields */ - - gdouble r; /* Radius */ - gdouble waste; /* Amount of overprint allowed. */ -}; - -struct _lglTemplateFrameCD { - - /* Begin Common Fields */ - lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_CD. */ - - gchar *id; /* Id, currently always "0" */ - GList *layouts; /* List of lglTemplateLayouts */ - GList *markups; /* List of lglTemplateMarkups */ - /* End Common Fields */ - - gdouble r1; /* Outer radius */ - gdouble r2; /* Inner radius (hole) */ - gdouble w; /* Clip width, business card CDs */ - gdouble h; /* Clip height, business card CDs */ - gdouble waste; /* Amount of overprint allowed. */ -}; - -union _lglTemplateFrame{ - - lglTemplateFrameShape shape; - - lglTemplateFrameAll all; - lglTemplateFrameRect rect; - lglTemplateFrameRound round; - lglTemplateFrameCD cd; -}; - - -/* - * Label Layout Structure - */ -struct _lglTemplateLayout { - - gint nx; /* Number of labels across */ - gint ny; /* Number of labels up and down */ - - gdouble x0; /* Left of grid from left edge of paper */ - gdouble y0; /* Top of grid from top edge of paper */ - - gdouble dx; /* Horizontal pitch of grid */ - gdouble dy; /* Vertical pitch of grid */ - -}; - - -/* - * Possible Markup Types - */ -typedef enum { - LGL_TEMPLATE_MARKUP_MARGIN, - LGL_TEMPLATE_MARKUP_LINE, - LGL_TEMPLATE_MARKUP_CIRCLE, - LGL_TEMPLATE_MARKUP_RECT, -} lglTemplateMarkupType; - - -/* - * Label Markup Structure (Helpful lines drawn in glabels to help locate objects) - */ -struct _lglTemplateMarkupMargin { - - lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_MARGIN */ - - gdouble size; /* Margin size */ -}; - -struct _lglTemplateMarkupLine { - - lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_LINE */ - - gdouble x1, y1; /* 1st endpoint */ - gdouble x2, y2; /* 2nd endpoint */ -}; - -struct _lglTemplateMarkupCircle { - - lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_CIRCLE */ - - gdouble x0, y0; /* Center of circle */ - gdouble r; /* Radius of circle */ -}; - -struct _lglTemplateMarkupRect { - - lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_RECT */ - - gdouble x1, y1; /* Upper left corner */ - gdouble w, h; /* Width and height. */ - gdouble r; /* Radius of corners. */ -}; - -union _lglTemplateMarkup { - - lglTemplateMarkupType type; - - lglTemplateMarkupMargin margin; - lglTemplateMarkupLine line; - lglTemplateMarkupCircle circle; - lglTemplateMarkupRect rect; -}; - - -/* - * Origin coordinates - */ -struct _lglTemplateOrigin { - - gdouble x, y; /* Label origin relative to upper - * upper left hand corner of paper */ - -}; - - - -/* - * Template query functions - */ -gchar *lgl_template_get_name (const lglTemplate *template); - -gboolean lgl_template_do_templates_match (const lglTemplate *template1, - const lglTemplate *template2); - -gboolean lgl_template_does_brand_match (const lglTemplate *template, - const gchar *brand); - -gboolean lgl_template_does_page_size_match (const lglTemplate *template, - const gchar *paper_id); - -gboolean lgl_template_does_category_match (const lglTemplate *template, - const gchar *category_id); - - -/* - * Frame query functions - */ -void lgl_template_frame_get_size (const lglTemplateFrame *frame, - gdouble *w, - gdouble *h); - -gint lgl_template_frame_get_n_labels (const lglTemplateFrame *frame); - -lglTemplateOrigin *lgl_template_frame_get_origins (const lglTemplateFrame *frame); - - -/* - * Template Construction - */ -lglTemplate *lgl_template_new (const gchar *brand, - const gchar *part, - const gchar *description, - const gchar *paper_id, - gdouble page_width, - gdouble page_height); - -void lgl_template_add_alias (lglTemplate *template, - lglTemplateAlias *alias); - -void lgl_template_add_category (lglTemplate *template, - const gchar *category_id); - -void lgl_template_add_frame (lglTemplate *template, - lglTemplateFrame *frame); - -lglTemplateFrame *lgl_template_frame_rect_new (const gchar *id, - gdouble w, - gdouble h, - gdouble r, - gdouble x_waste, - gdouble y_waste); - -lglTemplateAlias *lgl_template_alias_new (const gchar *brand, - const gchar *part); - -lglTemplateFrame *lgl_template_frame_round_new (const gchar *id, - gdouble r, - gdouble waste); - -lglTemplateFrame *lgl_template_frame_cd_new (const gchar *id, - gdouble r1, - gdouble r2, - gdouble w, - gdouble h, - gdouble waste); - -void lgl_template_frame_add_layout (lglTemplateFrame *frame, - lglTemplateLayout *layout); - -void lgl_template_frame_add_markup (lglTemplateFrame *frame, - lglTemplateMarkup *markup); - -lglTemplateLayout *lgl_template_layout_new (gint nx, - gint ny, - gdouble x0, - gdouble y0, - gdouble dx, - gdouble dy); - -lglTemplateMarkup *lgl_template_markup_margin_new (gdouble size); - -lglTemplateMarkup *lgl_template_markup_line_new (gdouble x1, - gdouble y1, - gdouble x2, - gdouble y2); - -lglTemplateMarkup *lgl_template_markup_circle_new (gdouble x0, - gdouble y0, - gdouble r); - -lglTemplateMarkup *lgl_template_markup_rect_new (gdouble x1, - gdouble y1, - gdouble w, - gdouble h, - gdouble r); - -lglTemplate *lgl_template_dup (const lglTemplate *orig_template); - -void lgl_template_free (lglTemplate *template); - -lglTemplateAlias *lgl_template_alias_dup (const lglTemplateAlias *orig_alias); -void lgl_template_alias_free (lglTemplateAlias *alias); - -lglTemplateFrame *lgl_template_frame_dup (const lglTemplateFrame *orig_frame); -void lgl_template_frame_free (lglTemplateFrame *frame); - -lglTemplateLayout *lgl_template_layout_dup (const lglTemplateLayout *orig_layout); -void lgl_template_layout_free (lglTemplateLayout *layout); - -lglTemplateMarkup *lgl_template_markup_dup (const lglTemplateMarkup *orig_markup); -void lgl_template_markup_free (lglTemplateMarkup *markup); - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/xml-category.c b/glabels2/libglabels/xml-category.c deleted file mode 100644 index 4925eba3..00000000 --- a/glabels2/libglabels/xml-category.c +++ /dev/null @@ -1,175 +0,0 @@ -/* - * xml-category.c - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#include - -#include "xml-category.h" - -#include -#include -#include -#include - -#include "libglabels-private.h" - -#include "xml.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - - -/** - * lgl_xml_category_read_categories_from_file: - * @utf8_filename: Filename of categories file (name encoded as UTF-8) - * - * Read category definitions from a file. - * - * Returns: a list of #lglCategory structures. - * - */ -GList * -lgl_xml_category_read_categories_from_file (gchar *utf8_filename) -{ - gchar *filename; - GList *categories; - xmlDocPtr categories_doc; - - LIBXML_TEST_VERSION; - - filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); - if (!filename) { - g_message ("Utf8 filename conversion error"); - return NULL; - } - - categories_doc = xmlParseFile (filename); - if (!categories_doc) { - g_message ("\"%s\" is not a glabels category file (not XML)", - filename); - return NULL; - } - - categories = lgl_xml_category_parse_categories_doc (categories_doc); - - g_free (filename); - xmlFreeDoc (categories_doc); - - return categories; -} - - -/** - * lgl_xml_category_parse_categories_doc: - * @categories_doc: libxml #xmlDocPtr tree, representing a categories - * definition file. - * - * Read category definitions from a libxml #xmlDocPtr tree. - * - * Returns: a list of #lglCategory structures. - * - */ -GList * -lgl_xml_category_parse_categories_doc (xmlDocPtr categories_doc) -{ - GList *categories = NULL; - xmlNodePtr root, node; - lglCategory *category; - - LIBXML_TEST_VERSION; - - root = xmlDocGetRootElement (categories_doc); - if (!root || !root->name) { - g_message ("\"%s\" is not a glabels category file (no root node)", - categories_doc->name); - xmlFreeDoc (categories_doc); - return categories; - } - if (!lgl_xml_is_node (root, "Glabels-categories")) { - g_message ("\"%s\" is not a glabels category file (wrong root node)", - categories_doc->name); - xmlFreeDoc (categories_doc); - return categories; - } - - for (node = root->xmlChildrenNode; node != NULL; node = node->next) { - - if (lgl_xml_is_node (node, "Category")) { - category = lgl_xml_category_parse_category_node (node); - categories = g_list_append (categories, category); - } else { - if ( !xmlNodeIsText(node) ) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - } - - return categories; -} - - -/** - * lgl_xml_category_parse_category_node: - * @category_node: libxml #xmlNodePtr category node from a #xmlDocPtr tree. - * - * Read a single category definition from a libxml #xmlNodePtr node. - * - * Returns: a pointer to a newly created #lglCategory structure. - * - */ -lglCategory * -lgl_xml_category_parse_category_node (xmlNodePtr category_node) -{ - lglCategory *category; - gchar *id, *name; - - LIBXML_TEST_VERSION; - - id = lgl_xml_get_prop_string (category_node, "id", NULL); - name = lgl_xml_get_prop_i18n_string (category_node, "name", NULL); - - category = lgl_category_new (id, name); - - g_free (id); - g_free (name); - - return category; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/xml-category.h b/glabels2/libglabels/xml-category.h deleted file mode 100644 index 815acf96..00000000 --- a/glabels2/libglabels/xml-category.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * xml-category.h - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __XML_CATEGORY_H__ -#define __XML_CATEGORY_H__ - -#include -#include - -#include "category.h" - -G_BEGIN_DECLS - -GList *lgl_xml_category_read_categories_from_file (gchar *utf8_filename); - -GList *lgl_xml_category_parse_categories_doc (xmlDocPtr categories_doc); - -lglCategory *lgl_xml_category_parse_category_node (xmlNodePtr category_node); - - -G_END_DECLS - -#endif /* __XML_CATEGORY_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/xml-paper.c b/glabels2/libglabels/xml-paper.c deleted file mode 100644 index 00263e71..00000000 --- a/glabels2/libglabels/xml-paper.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * xml-paper.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#include - -#include "xml-paper.h" - -#include -#include -#include -#include - -#include "libglabels-private.h" - -#include "xml.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - - -/** - * lgl_xml_paper_read_papers_from_file: - * @utf8_filename: Filename of papers file (name encoded as UTF-8) - * - * Read paper definitions from a file. - * - * Returns: a list of #lglPaper structures. - * - */ -GList * -lgl_xml_paper_read_papers_from_file (gchar *utf8_filename) -{ - gchar *filename; - GList *papers; - xmlDocPtr papers_doc; - - LIBXML_TEST_VERSION; - - filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); - if (!filename) { - g_message ("Utf8 filename conversion error"); - return NULL; - } - - papers_doc = xmlParseFile (filename); - if (!papers_doc) { - g_message ("\"%s\" is not a glabels paper file (not XML)", - filename); - return NULL; - } - - papers = lgl_xml_paper_parse_papers_doc (papers_doc); - - g_free (filename); - xmlFreeDoc (papers_doc); - - return papers; -} - - -/** - * lgl_xml_paper_parse_papers_doc: - * @papers_doc: libxml #xmlDocPtr tree, representing a papers definition file. - * - * Read paper definitions from a libxml #xmlDocPtr tree. - * - * Returns: a list of #lglPaper structures. - * - */ -GList * -lgl_xml_paper_parse_papers_doc (xmlDocPtr papers_doc) -{ - GList *papers = NULL; - xmlNodePtr root, node; - lglPaper *paper; - - LIBXML_TEST_VERSION; - - root = xmlDocGetRootElement (papers_doc); - if (!root || !root->name) { - g_message ("\"%s\" is not a glabels paper file (no root node)", - papers_doc->name); - xmlFreeDoc (papers_doc); - return papers; - } - if (!lgl_xml_is_node (root, "Glabels-paper-sizes")) { - g_message ("\"%s\" is not a glabels paper file (wrong root node)", - papers_doc->name); - xmlFreeDoc (papers_doc); - return papers; - } - - for (node = root->xmlChildrenNode; node != NULL; node = node->next) { - - if (lgl_xml_is_node (node, "Paper-size")) { - paper = lgl_xml_paper_parse_paper_node (node); - papers = g_list_append (papers, paper); - } else { - if ( !xmlNodeIsText(node) ) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - } - - return papers; -} - - -/** - * lgl_xml_paper_parse_paper_node: - * @paper_node: libxml #xmlNodePtr paper node from a #xmlDocPtr tree. - * - * Read a single paper definition from a libxml #xmlNodePtr node. - * - * Returns: a pointer to a newly created #lglPaper structure. - * - */ -lglPaper * -lgl_xml_paper_parse_paper_node (xmlNodePtr paper_node) -{ - lglPaper *paper; - gchar *id, *name, *pwg_size; - gdouble width, height; - - LIBXML_TEST_VERSION; - - id = lgl_xml_get_prop_string (paper_node, "id", NULL); - - name = lgl_xml_get_prop_i18n_string (paper_node, "name", NULL); - - width = lgl_xml_get_prop_length (paper_node, "width", 0); - height = lgl_xml_get_prop_length (paper_node, "height", 0); - - pwg_size = lgl_xml_get_prop_string (paper_node, "pwg_size", NULL); - - paper = lgl_paper_new (id, name, width, height, pwg_size); - - g_free (id); - g_free (name); - g_free (pwg_size); - - return paper; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/xml-paper.h b/glabels2/libglabels/xml-paper.h deleted file mode 100644 index bffda36f..00000000 --- a/glabels2/libglabels/xml-paper.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * xml-paper.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __XML_PAPER_H__ -#define __XML_PAPER_H__ - -#include -#include - -#include "paper.h" - -G_BEGIN_DECLS - -GList *lgl_xml_paper_read_papers_from_file (gchar *utf8_filename); - -GList *lgl_xml_paper_parse_papers_doc (xmlDocPtr papers_doc); - -lglPaper *lgl_xml_paper_parse_paper_node (xmlNodePtr paper_node); - - -G_END_DECLS - -#endif /* __XML_PAPER_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/xml-template.c b/glabels2/libglabels/xml-template.c deleted file mode 100644 index 9a880c3c..00000000 --- a/glabels2/libglabels/xml-template.c +++ /dev/null @@ -1,976 +0,0 @@ -/* - * xml-template.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#include - -#include "xml-template.h" - -#include -#include -#include -#include - -#include "libglabels-private.h" - -#include "db.h" -#include "xml.h" - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ -static void xml_parse_meta_node (xmlNodePtr label_node, - lglTemplate *template); -static void xml_parse_label_rectangle_node (xmlNodePtr label_node, - lglTemplate *template); -static void xml_parse_label_round_node (xmlNodePtr label_node, - lglTemplate *template); -static void xml_parse_label_cd_node (xmlNodePtr label_node, - lglTemplate *template); -static void xml_parse_layout_node (xmlNodePtr layout_node, - lglTemplateFrame *frame); -static void xml_parse_markup_margin_node (xmlNodePtr markup_node, - lglTemplateFrame *frame); -static void xml_parse_markup_line_node (xmlNodePtr markup_node, - lglTemplateFrame *frame); -static void xml_parse_markup_circle_node (xmlNodePtr markup_node, - lglTemplateFrame *frame); -static void xml_parse_markup_rect_node (xmlNodePtr markup_node, - lglTemplateFrame *frame); -static void xml_parse_alias_node (xmlNodePtr alias_node, - lglTemplate *template); - -static void xml_create_meta_node (const gchar *category, - xmlNodePtr root, - const xmlNsPtr ns); -static void xml_create_label_node (const lglTemplateFrame *frame, - xmlNodePtr root, - const xmlNsPtr ns); -static void xml_create_layout_node (const lglTemplateLayout *layout, - xmlNodePtr root, - const xmlNsPtr ns); -static void xml_create_markup_margin_node (const lglTemplateMarkup *margin, - xmlNodePtr root, - const xmlNsPtr ns); -static void xml_create_markup_line_node (const lglTemplateMarkup *line, - xmlNodePtr root, - const xmlNsPtr ns); -static void xml_create_markup_circle_node (const lglTemplateMarkup *circle, - xmlNodePtr root, - const xmlNsPtr ns); -static void xml_create_markup_rect_node (const lglTemplateMarkup *circle, - xmlNodePtr root, - const xmlNsPtr ns); -static void xml_create_alias_node (const lglTemplateAlias *alias, - xmlNodePtr root, - const xmlNsPtr ns); - - -/** - * lgl_xml_template_read_templates_from_file: - * @utf8_filename: Filename of papers file (name encoded as UTF-8) - * - * Read glabels templates from template file. - * - * Returns: a list of #lglTemplate structures. - * - */ -GList * -lgl_xml_template_read_templates_from_file (const gchar *utf8_filename) -{ - gchar *filename; - xmlDocPtr templates_doc; - GList *templates = NULL; - - LIBXML_TEST_VERSION; - - filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); - if (!filename) { - g_message ("Utf8 filename conversion error"); - return NULL; - } - - templates_doc = xmlParseFile (filename); - if (!templates_doc) { - g_message ("\"%s\" is not a glabels template file (not XML)", - filename); - return templates; - } - - templates = lgl_xml_template_parse_templates_doc (templates_doc); - - g_free (filename); - xmlFreeDoc (templates_doc); - - return templates; -} - - -/** - * lgl_xml_template_parse_templates_doc: - * @templates_doc: libxml #xmlDocPtr tree, representing template file. - * - * Read glabels templates from a libxml #xmlDocPtr tree. - * - * Returns: a list of #lglTemplate structures. - * - */ -GList * -lgl_xml_template_parse_templates_doc (const xmlDocPtr templates_doc) -{ - - GList *templates = NULL; - xmlNodePtr root, node; - lglTemplate *template; - - LIBXML_TEST_VERSION; - - root = xmlDocGetRootElement (templates_doc); - if (!root || !root->name) { - g_message ("\"%s\" is not a glabels template file (no root node)", - templates_doc->URL); - return templates; - } - if (!lgl_xml_is_node (root, "Glabels-templates")) { - g_message ("\"%s\" is not a glabels template file (wrong root node)", - templates_doc->URL); - return templates; - } - - for (node = root->xmlChildrenNode; node != NULL; node = node->next) { - - if (lgl_xml_is_node (node, "Template")) { - template = lgl_xml_template_parse_template_node (node); - templates = g_list_append (templates, template); - } else { - if ( !xmlNodeIsText(node) ) { - if (!lgl_xml_is_node (node,"comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - } - - return templates; -} - - -/** - * lgl_xml_template_parse_template_node: - * @template_node: libxml #xmlNodePtr template node from a #xmlDocPtr tree. - * - * Read a single glabels template from a libxml #xmlNodePtr node. - * - * Returns: a pointer to a newly created #lglTemplate structure. - * - */ -lglTemplate * -lgl_xml_template_parse_template_node (const xmlNodePtr template_node) -{ - gchar *brand; - gchar *part; - gchar *name; - gchar *description; - gchar *paper_id; - gdouble page_width, page_height; - lglPaper *paper = NULL; - lglTemplate *template; - xmlNodePtr node; - gchar **v; - - brand = lgl_xml_get_prop_string (template_node, "brand", NULL); - part = lgl_xml_get_prop_string (template_node, "part", NULL); - if (!brand || !part) - { - name = lgl_xml_get_prop_string (template_node, "name", NULL); - if (name) - { - v = g_strsplit (name, " ", 2); - brand = g_strdup (v[0]); - part = g_strchug (g_strdup (v[1])); - g_free (name); - g_strfreev (v); - - } - else - { - g_message (_("Missing name or brand/part attributes.")); - } - } - - description = lgl_xml_get_prop_i18n_string (template_node, "description", NULL); - paper_id = lgl_xml_get_prop_string (template_node, "size", NULL); - - if (lgl_db_is_paper_id_other (paper_id)) { - - page_width = lgl_xml_get_prop_length (template_node, "width", 0); - page_height = lgl_xml_get_prop_length (template_node, "height", 0); - - } else { - paper = lgl_db_lookup_paper_from_id (paper_id); - if (paper == NULL) { - /* This should always be an id, but just in case a name - slips by! */ - g_message (_("Unknown page size id \"%s\", trying as name"), - paper_id); - paper = lgl_db_lookup_paper_from_name (paper_id); - g_free (paper_id); - paper_id = g_strdup (paper->id); - } - if (paper != NULL) { - page_width = paper->width; - page_height = paper->height; - } else { - page_width = 612; - page_height = 792; - g_message (_("Unknown page size id or name \"%s\""), - paper_id); - } - lgl_paper_free (paper); - paper = NULL; - } - - template = lgl_template_new (brand, part, description, - paper_id, page_width, page_height); - - for (node = template_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (lgl_xml_is_node (node, "Meta")) { - xml_parse_meta_node (node, template); - } else if (lgl_xml_is_node (node, "Label-rectangle")) { - xml_parse_label_rectangle_node (node, template); - } else if (lgl_xml_is_node (node, "Label-round")) { - xml_parse_label_round_node (node, template); - } else if (lgl_xml_is_node (node, "Label-cd")) { - xml_parse_label_cd_node (node, template); - } else if (lgl_xml_is_node (node, "Alias")) { - xml_parse_alias_node (node, template); - } else { - if (!xmlNodeIsText (node)) { - if (!lgl_xml_is_node (node,"comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - } - - g_free (brand); - g_free (part); - g_free (description); - g_free (paper_id); - - return template; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Meta Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_meta_node (xmlNodePtr meta_node, - lglTemplate *template) -{ - gchar *category; - - category = lgl_xml_get_prop_string (meta_node, "category", NULL); - - if (category != NULL) - { - lgl_template_add_category (template, category); - g_free (category); - } -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Label-rectangle Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_label_rectangle_node (xmlNodePtr label_node, - lglTemplate *template) -{ - gchar *id; - gchar *tmp; - gdouble x_waste, y_waste; - gdouble w, h, r; - lglTemplateFrame *frame; - xmlNodePtr node; - - id = lgl_xml_get_prop_string (label_node, "id", NULL); - - if ((tmp = lgl_xml_get_prop_string (label_node, "waste", NULL))) { - /* Handle single "waste" property. */ - x_waste = y_waste = lgl_xml_get_prop_length (label_node, "waste", 0); - g_free (tmp); - } else { - x_waste = lgl_xml_get_prop_length (label_node, "x_waste", 0); - y_waste = lgl_xml_get_prop_length (label_node, "y_waste", 0); - } - - w = lgl_xml_get_prop_length (label_node, "width", 0); - h = lgl_xml_get_prop_length (label_node, "height", 0); - r = lgl_xml_get_prop_length (label_node, "round", 0); - - frame = lgl_template_frame_rect_new ((gchar *)id, w, h, r, x_waste, y_waste); - lgl_template_add_frame (template, frame); - - for (node = label_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (lgl_xml_is_node (node, "Layout")) { - xml_parse_layout_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-margin")) { - xml_parse_markup_margin_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-line")) { - xml_parse_markup_line_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-circle")) { - xml_parse_markup_circle_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-rect")) { - xml_parse_markup_rect_node (node, frame); - } else if (!xmlNodeIsText (node)) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - - g_free (id); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Label-round Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_label_round_node (xmlNodePtr label_node, - lglTemplate *template) -{ - gchar *id; - gdouble waste; - gdouble r; - lglTemplateFrame *frame; - xmlNodePtr node; - - id = lgl_xml_get_prop_string (label_node, "id", NULL); - waste = lgl_xml_get_prop_length (label_node, "waste", 0); - r = lgl_xml_get_prop_length (label_node, "radius", 0); - - frame = lgl_template_frame_round_new ((gchar *)id, r, waste); - lgl_template_add_frame (template, frame); - - for (node = label_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (lgl_xml_is_node (node, "Layout")) { - xml_parse_layout_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-margin")) { - xml_parse_markup_margin_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-line")) { - xml_parse_markup_line_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-circle")) { - xml_parse_markup_circle_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-rect")) { - xml_parse_markup_rect_node (node, frame); - } else if (!xmlNodeIsText (node)) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - - g_free (id); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Label-cd Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_label_cd_node (xmlNodePtr label_node, - lglTemplate *template) -{ - gchar *id; - gdouble waste; - gdouble r1, r2, w, h; - lglTemplateFrame *frame; - xmlNodePtr node; - - id = lgl_xml_get_prop_string (label_node, "id", NULL); - waste = lgl_xml_get_prop_length (label_node, "waste", 0); - r1 = lgl_xml_get_prop_length (label_node, "radius", 0); - r2 = lgl_xml_get_prop_length (label_node, "hole", 0); - w = lgl_xml_get_prop_length (label_node, "width", 0); - h = lgl_xml_get_prop_length (label_node, "height", 0); - - frame = lgl_template_frame_cd_new ((gchar *)id, r1, r2, w, h, waste); - lgl_template_add_frame (template, frame); - - for (node = label_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (lgl_xml_is_node (node, "Layout")) { - xml_parse_layout_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-margin")) { - xml_parse_markup_margin_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-line")) { - xml_parse_markup_line_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-circle")) { - xml_parse_markup_circle_node (node, frame); - } else if (lgl_xml_is_node (node, "Markup-rect")) { - xml_parse_markup_rect_node (node, frame); - } else if (!xmlNodeIsText (node)) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - - g_free (id); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Label->Layout Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_layout_node (xmlNodePtr layout_node, - lglTemplateFrame *frame) -{ - gint nx, ny; - gdouble x0, y0, dx, dy; - xmlNodePtr node; - - nx = lgl_xml_get_prop_int (layout_node, "nx", 1); - ny = lgl_xml_get_prop_int (layout_node, "ny", 1); - - x0 = lgl_xml_get_prop_length (layout_node, "x0", 0); - y0 = lgl_xml_get_prop_length (layout_node, "y0", 0); - - dx = lgl_xml_get_prop_length (layout_node, "dx", 0); - dy = lgl_xml_get_prop_length (layout_node, "dy", 0); - - lgl_template_frame_add_layout (frame, lgl_template_layout_new (nx, ny, x0, y0, dx, dy)); - - for (node = layout_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (!xmlNodeIsText (node)) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Label->Markup-margin Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_markup_margin_node (xmlNodePtr markup_node, - lglTemplateFrame *frame) -{ - gdouble size; - xmlNodePtr node; - - size = lgl_xml_get_prop_length (markup_node, "size", 0); - - lgl_template_frame_add_markup (frame, lgl_template_markup_margin_new (size)); - - for (node = markup_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (!xmlNodeIsText (node)) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Label->Markup-line Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_markup_line_node (xmlNodePtr markup_node, - lglTemplateFrame *frame) -{ - gdouble x1, y1, x2, y2; - xmlNodePtr node; - - x1 = lgl_xml_get_prop_length (markup_node, "x1", 0); - y1 = lgl_xml_get_prop_length (markup_node, "y1", 0); - x2 = lgl_xml_get_prop_length (markup_node, "x2", 0); - y2 = lgl_xml_get_prop_length (markup_node, "y2", 0); - - lgl_template_frame_add_markup (frame, lgl_template_markup_line_new (x1, y1, x2, y2)); - - for (node = markup_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (!xmlNodeIsText (node)) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Label->Markup-circle Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_markup_circle_node (xmlNodePtr markup_node, - lglTemplateFrame *frame) -{ - gdouble x0, y0, r; - xmlNodePtr node; - - x0 = lgl_xml_get_prop_length (markup_node, "x0", 0); - y0 = lgl_xml_get_prop_length (markup_node, "y0", 0); - r = lgl_xml_get_prop_length (markup_node, "radius", 0); - - lgl_template_frame_add_markup (frame, lgl_template_markup_circle_new (x0, y0, r)); - - for (node = markup_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (!xmlNodeIsText (node)) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Label->Markup-rect Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_markup_rect_node (xmlNodePtr markup_node, - lglTemplateFrame *frame) -{ - gdouble x1, y1, w, h, r; - xmlNodePtr node; - - x1 = lgl_xml_get_prop_length (markup_node, "x1", 0); - y1 = lgl_xml_get_prop_length (markup_node, "y1", 0); - w = lgl_xml_get_prop_length (markup_node, "w", 0); - h = lgl_xml_get_prop_length (markup_node, "h", 0); - r = lgl_xml_get_prop_length (markup_node, "r", 0); - - lgl_template_frame_add_markup (frame, lgl_template_markup_rect_new (x1, y1, w, h, r)); - - for (node = markup_node->xmlChildrenNode; node != NULL; - node = node->next) { - if (!xmlNodeIsText (node)) { - if (!lgl_xml_is_node (node, "comment")) { - g_message ("bad node = \"%s\"",node->name); - } - } - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Template->Alias Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_alias_node (xmlNodePtr alias_node, - lglTemplate *template) -{ - gchar *brand; - gchar *part; - gchar *name; - gchar **v; - - brand = lgl_xml_get_prop_string (alias_node, "brand", NULL); - part = lgl_xml_get_prop_string (alias_node, "part", NULL); - if (!brand || !part) - { - name = lgl_xml_get_prop_string (alias_node, "name", NULL); - if (name) - { - g_message (_("Missing required \"brand\" or \"part\" attribute, trying deprecated name.")); - v = g_strsplit (name, " ", 2); - brand = g_strdup (v[0]); - part = g_strdup (v[1]); - g_free (name); - g_strfreev (v); - - } - else - { - g_message (_("Name attribute also missing.")); - } - } - - lgl_template_add_alias (template, lgl_template_alias_new (brand, part)); - - g_free (brand); - g_free (part); -} - -/** - * lgl_xml_template_write_templates_to_file: - * @templates: List of #lglTemplate structures - * @utf8_filename: Filename of templates file (name encoded as UTF-8) - * - * Write a list of #lglTemplate structures to a glabels XML template file. - * - * Returns: the number of bytes written or -1 in case of failure - * - */ -gint -lgl_xml_template_write_templates_to_file (GList *templates, - const gchar *utf8_filename) -{ - xmlDocPtr doc; - xmlNsPtr ns; - gint bytes_written; - GList *p; - lglTemplate *template; - gchar *filename; - - doc = xmlNewDoc ((xmlChar *)"1.0"); - doc->xmlRootNode = xmlNewDocNode (doc, NULL, (xmlChar *)"Glabels-templates", NULL); - - ns = xmlNewNs (doc->xmlRootNode, (xmlChar *)LGL_XML_NAME_SPACE, NULL); - xmlSetNs (doc->xmlRootNode, ns); - - for (p=templates; p!=NULL; p=p->next) { - template = (lglTemplate *)p->data; - lgl_xml_template_create_template_node (template, doc->xmlRootNode, ns); - } - - filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); - if (!filename) - { - g_message (_("Utf8 conversion error.")); - return -1; - } - else - { - xmlSetDocCompressMode (doc, 0); - bytes_written = xmlSaveFormatFile (filename, doc, TRUE); - xmlFreeDoc (doc); - g_free (filename); - return bytes_written; - } - -} - - -/** - * lgl_xml_template_write_template_to_file: - * @template: #lglTemplate structure to be written - * @utf8_filename: Filename of templates file (name encoded as UTF-8) - * - * Write a single #lglTemplate structures to a glabels XML template file. - * - * Returns: the number of bytes written or -1 in case of failure - * - */ -gint -lgl_xml_template_write_template_to_file (const lglTemplate *template, - const gchar *utf8_filename) -{ - GList *templates = NULL; - gint bytes_written; - - templates = g_list_append (templates, (gpointer)template); - - bytes_written = lgl_xml_template_write_templates_to_file (templates, utf8_filename); - - g_list_free (templates); - - return bytes_written; -} - - -/** - * lgl_xml_template_create_template_node: - * @template: #lglTemplate structure to be written - * @root: parent node to receive new child node - * @ns: a libxml #xmlNsPtr - * - * Add a single #lglTemplate child node to given #xmlNodePtr. - * - */ -void -lgl_xml_template_create_template_node (const lglTemplate *template, - xmlNodePtr root, - const xmlNsPtr ns) -{ - xmlNodePtr node; - GList *p; - lglTemplateAlias *alias; - lglTemplateFrame *frame; - - node = xmlNewChild (root, ns, (xmlChar *)"Template", NULL); - - lgl_xml_set_prop_string (node, "brand", template->brand); - lgl_xml_set_prop_string (node, "part", template->part); - - lgl_xml_set_prop_string (node, "size", template->paper_id); - if (xmlStrEqual ((xmlChar *)template->paper_id, (xmlChar *)"Other")) - { - - lgl_xml_set_prop_length (node, "width", template->page_width); - lgl_xml_set_prop_length (node, "height", template->page_height); - - } - - lgl_xml_set_prop_string (node, "description", template->description); - - for ( p=template->aliases; p != NULL; p=p->next ) { - alias = (lglTemplateAlias *)p->data; - if ( !(xmlStrEqual ((xmlChar *)template->brand, (xmlChar *)alias->brand) && - xmlStrEqual ((xmlChar *)template->part, (xmlChar *)alias->part)) ) - { - xml_create_alias_node ( alias, node, ns ); - } - } - for ( p=template->category_ids; p != NULL; p=p->next ) - { - xml_create_meta_node ( p->data, node, ns ); - } - for ( p=template->frames; p != NULL; p=p->next ) - { - frame = (lglTemplateFrame *)p->data; - xml_create_label_node (frame, node, ns); - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Template->Meta Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_meta_node (const gchar *category, - xmlNodePtr root, - const xmlNsPtr ns) -{ - xmlNodePtr node; - - node = xmlNewChild (root, ns, (xmlChar *)"Meta", NULL); - lgl_xml_set_prop_string (node, "category", category); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Template->Label Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_label_node (const lglTemplateFrame *frame, - xmlNodePtr root, - const xmlNsPtr ns) -{ - xmlNodePtr node; - GList *p; - lglTemplateMarkup *markup; - lglTemplateLayout *layout; - - switch (frame->shape) { - - case LGL_TEMPLATE_FRAME_SHAPE_RECT: - node = xmlNewChild(root, ns, (xmlChar *)"Label-rectangle", NULL); - lgl_xml_set_prop_string (node, "id", frame->all.id); - lgl_xml_set_prop_length (node, "width", frame->rect.w); - lgl_xml_set_prop_length (node, "height", frame->rect.h); - lgl_xml_set_prop_length (node, "round", frame->rect.r); - lgl_xml_set_prop_length (node, "x_waste", frame->rect.x_waste); - lgl_xml_set_prop_length (node, "y_waste", frame->rect.y_waste); - break; - - case LGL_TEMPLATE_FRAME_SHAPE_ROUND: - node = xmlNewChild(root, ns, (xmlChar *)"Label-round", NULL); - lgl_xml_set_prop_string (node, "id", frame->all.id); - lgl_xml_set_prop_length (node, "radius", frame->round.r); - lgl_xml_set_prop_length (node, "waste", frame->round.waste); - break; - - case LGL_TEMPLATE_FRAME_SHAPE_CD: - node = xmlNewChild(root, ns, (xmlChar *)"Label-cd", NULL); - lgl_xml_set_prop_string (node, "id", frame->all.id); - lgl_xml_set_prop_length (node, "radius", frame->cd.r1); - lgl_xml_set_prop_length (node, "hole", frame->cd.r2); - if (frame->cd.w != 0.0) { - lgl_xml_set_prop_length (node, "width", frame->cd.w); - } - if (frame->cd.h != 0.0) { - lgl_xml_set_prop_length (node, "height", frame->cd.h); - } - lgl_xml_set_prop_length (node, "waste", frame->cd.waste); - break; - - default: - g_message ("Unknown label style"); - return; - break; - - } - - for ( p=frame->all.markups; p != NULL; p=p->next ) { - markup = (lglTemplateMarkup *)p->data; - switch (markup->type) { - case LGL_TEMPLATE_MARKUP_MARGIN: - xml_create_markup_margin_node (markup, node, ns); - break; - case LGL_TEMPLATE_MARKUP_LINE: - xml_create_markup_line_node (markup, node, ns); - break; - case LGL_TEMPLATE_MARKUP_CIRCLE: - xml_create_markup_circle_node (markup, node, ns); - break; - case LGL_TEMPLATE_MARKUP_RECT: - xml_create_markup_rect_node (markup, node, ns); - break; - default: - g_message ("Unknown markup type"); - break; - } - } - - for ( p=frame->all.layouts; p != NULL; p=p->next ) { - layout = (lglTemplateLayout *)p->data; - xml_create_layout_node (layout, node, ns); - } - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Template->Label->Layout Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_layout_node (const lglTemplateLayout *layout, - xmlNodePtr root, - const xmlNsPtr ns) -{ - xmlNodePtr node; - - node = xmlNewChild(root, ns, (xmlChar *)"Layout", NULL); - lgl_xml_set_prop_int (node, "nx", layout->nx); - lgl_xml_set_prop_int (node, "ny", layout->ny); - lgl_xml_set_prop_length (node, "x0", layout->x0); - lgl_xml_set_prop_length (node, "y0", layout->y0); - lgl_xml_set_prop_length (node, "dx", layout->dx); - lgl_xml_set_prop_length (node, "dy", layout->dy); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Template->Label->Markup-margin Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_markup_margin_node (const lglTemplateMarkup *markup, - xmlNodePtr root, - const xmlNsPtr ns) -{ - xmlNodePtr node; - - node = xmlNewChild(root, ns, (xmlChar *)"Markup-margin", NULL); - - lgl_xml_set_prop_length (node, "size", markup->margin.size); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Template->Label->Markup-line Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_markup_line_node (const lglTemplateMarkup *markup, - xmlNodePtr root, - const xmlNsPtr ns) -{ - xmlNodePtr node; - - node = xmlNewChild(root, ns, (xmlChar *)"Markup-line", NULL); - - lgl_xml_set_prop_length (node, "x1", markup->line.x1); - lgl_xml_set_prop_length (node, "y1", markup->line.y1); - lgl_xml_set_prop_length (node, "x2", markup->line.x2); - lgl_xml_set_prop_length (node, "y2", markup->line.y2); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Template->Label->Markup-circle Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_markup_circle_node (const lglTemplateMarkup *markup, - xmlNodePtr root, - const xmlNsPtr ns) -{ - xmlNodePtr node; - - node = xmlNewChild(root, ns, (xmlChar *)"Markup-circle", NULL); - - lgl_xml_set_prop_length (node, "x0", markup->circle.x0); - lgl_xml_set_prop_length (node, "y0", markup->circle.y0); - lgl_xml_set_prop_length (node, "radius", markup->circle.r); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Template->Label->Markup-rect Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_markup_rect_node (const lglTemplateMarkup *markup, - xmlNodePtr root, - const xmlNsPtr ns) -{ - xmlNodePtr node; - - node = xmlNewChild(root, ns, (xmlChar *)"Markup-rect", NULL); - - lgl_xml_set_prop_length (node, "x1", markup->rect.x1); - lgl_xml_set_prop_length (node, "y1", markup->rect.y1); - lgl_xml_set_prop_length (node, "w", markup->rect.w); - lgl_xml_set_prop_length (node, "h", markup->rect.h); - lgl_xml_set_prop_length (node, "r", markup->rect.r); - -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Template->Alias Node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_alias_node (const lglTemplateAlias *alias, - xmlNodePtr root, - const xmlNsPtr ns) -{ - xmlNodePtr node; - - node = xmlNewChild (root, ns, (xmlChar *)"Alias", NULL); - - lgl_xml_set_prop_string (node, "brand", alias->brand); - lgl_xml_set_prop_string (node, "part", alias->part); - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/xml-template.h b/glabels2/libglabels/xml-template.h deleted file mode 100644 index e4460070..00000000 --- a/glabels2/libglabels/xml-template.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * xml-template.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __XML_TEMPLATE_H__ -#define __XML_TEMPLATE_H__ - -#include -#include - -#include "template.h" - -G_BEGIN_DECLS - -GList *lgl_xml_template_read_templates_from_file (const gchar *utf8_filename); - -GList *lgl_xml_template_parse_templates_doc (const xmlDocPtr templates_doc); - -lglTemplate *lgl_xml_template_parse_template_node (const xmlNodePtr template_node); - - -gint lgl_xml_template_write_templates_to_file (GList *templates, - const gchar *utf8_filename); - -gint lgl_xml_template_write_template_to_file (const lglTemplate *template, - const gchar *utf8_filename); - -void lgl_xml_template_create_template_node (const lglTemplate *template, - xmlNodePtr root, - const xmlNsPtr ns); - -G_END_DECLS - -#endif /* __XML_TEMPLATE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/xml.c b/glabels2/libglabels/xml.c deleted file mode 100644 index 91cbb205..00000000 --- a/glabels2/libglabels/xml.c +++ /dev/null @@ -1,543 +0,0 @@ -/* - * xml.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#include - -#include "xml.h" - -#include -#include -#include - -#include "libglabels-private.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - -#define POINTS_PER_POINT 1.0 /* internal units are points. */ -#define POINTS_PER_INCH 72.0 -#define POINTS_PER_MM 2.83464566929 -#define POINTS_PER_CM (10.0*POINTS_PER_MM) -#define POINTS_PER_PICA (1.0/12.0) - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -typedef struct { - xmlChar *name; - gdouble points_per_unit; -} UnitTableEntry; - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static UnitTableEntry unit_table[] = { - - /* These names are identical to the absolute length units supported in - the CSS2 Specification (Section 4.3.2) */ - - /* This table must be sorted exactly as the enumerations in lglUnitsType */ - - /* [LGL_UNITS_POINT] */ {(xmlChar *)"pt", POINTS_PER_POINT}, - /* [LGL_UNITS_INCH] */ {(xmlChar *)"in", POINTS_PER_INCH}, - /* [LGL_UNITS_MM] */ {(xmlChar *)"mm", POINTS_PER_MM}, - /* [LGL_UNITS_CM] */ {(xmlChar *)"cm", POINTS_PER_CM}, - /* [LGL_UNITS_PICA] */ {(xmlChar *)"pc", POINTS_PER_PICA}, - -}; - -static lglUnitsType default_units = LGL_UNITS_POINT; - - -/****************************************************************************/ - -/** - * lgl_xml_get_prop_string: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @default_val: a default value to return if property not found - * - * Return value of property as a string. - * - * Returns: the property as a pointer to a gchar string. This string should - * be freed with g_free(). - * - */ -gchar * -lgl_xml_get_prop_string (xmlNodePtr node, - const gchar *property, - const gchar *default_val) -{ - gchar *val; - xmlChar *string; - - string = xmlGetProp (node, (xmlChar *)property); - if ( string != NULL ) { - val = g_strdup ((gchar *)string); - xmlFree (string); - return val; - } - - if (default_val) { - return g_strdup (default_val); - } - - return NULL; -} - - -/** - * lgl_xml_get_prop_i18n_string: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @default_val: a default value to return if property not found - * - * Return value of a translatable property as a string. - * - * Returns: the property as a pointer to a gchar string. This string should - * be freed with g_free(). - * - */ -gchar * -lgl_xml_get_prop_i18n_string (xmlNodePtr node, - const gchar *property, - const gchar *default_val) -{ - gchar *_property; - gchar *val; - xmlChar *string; - - _property = g_strdup_printf ("_%s", property); - string = xmlGetProp (node, (xmlChar *)_property); - g_free (_property); - - if ( string != NULL ) { - - val = g_strdup (gettext ((char *)string)); - xmlFree (string); - return val; - - } - - string = xmlGetProp (node, (xmlChar *)property); - if ( string != NULL ) { - val = g_strdup ((gchar *)string); - xmlFree (string); - return val; - } - - if (default_val) { - return g_strdup (default_val); - } - - return NULL; -} - - -/** - * lgl_xml_get_prop_double: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @default_val: a default value to return if property not found - * - * Return value of property as a double. - * - * Returns: the property as a double. - * - */ -gdouble -lgl_xml_get_prop_double (xmlNodePtr node, - const gchar *property, - gdouble default_val) -{ - gdouble val; - xmlChar *string; - - string = xmlGetProp (node, (xmlChar *)property); - if ( string != NULL ) { - val = g_strtod ((gchar *)string, NULL); - xmlFree (string); - return val; - } - - return default_val; -} - - -/** - * lgl_xml_get_prop_boolean: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @default_val: a default value to return if property not found - * - * Return value of property as a boolean. - * - * Returns: the property as a boolean. - * - */ -gboolean -lgl_xml_get_prop_boolean (xmlNodePtr node, - const gchar *property, - gboolean default_val) -{ - gboolean val; - xmlChar *string; - - string = xmlGetProp (node, (xmlChar *)property); - if ( string != NULL ) { - val = !((xmlStrcasecmp (string, (xmlChar *)"false") == 0) || - xmlStrEqual (string, (xmlChar *)"0"));; - xmlFree (string); - return val; - } - - return default_val; -} - - -/** - * lgl_xml_get_prop_int: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @default_val: a default value to return if property not found - * - * Return value of property as an integer. - * - * Returns: the property as an integer. - * - */ -gint -lgl_xml_get_prop_int (xmlNodePtr node, - const gchar *property, - gint default_val) -{ - gint val; - xmlChar *string; - - string = xmlGetProp (node, (xmlChar *)property); - if ( string != NULL ) { - val = strtol ((char *)string, NULL, 0); - xmlFree (string); - return val; - } - - return default_val; -} - - -/** - * lgl_xml_get_prop_uint: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @default_val: a default value to return if property not found - * - * Return value of property (usually formatted in hex) as an unsigned integer. - * - * Returns: the property as an unsigned integer. - * - */ -guint -lgl_xml_get_prop_uint (xmlNodePtr node, - const gchar *property, - guint default_val) -{ - guint val; - xmlChar *string; - - string = xmlGetProp (node, (xmlChar *)property); - if ( string != NULL ) { - val = strtoul ((char *)string, NULL, 0); - xmlFree (string); - return val; - } - - return default_val; -} - - -/** - * lgl_xml_get_prop_length: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @default_val: a default value to return if property not found - * - * Return value of a length property as a double, converting to internal - * units (points). The property is expected to be formatted as a number - * followed by a units string. If there is no units string, the length - * is assumed to be in points. Valid units strings are "pt" for points, - * "in" for inches, "mm" for millimeters, "cm" for centimeters, and - * "pc" for picas. - * - * Returns: the length in points. - * - */ -gdouble -lgl_xml_get_prop_length (xmlNodePtr node, - const gchar *property, - gdouble default_val) -{ - gdouble val; - xmlChar *string; - xmlChar *unit; - gint i; - - string = xmlGetProp (node, (xmlChar *)property); - if ( string != NULL ) { - - val = g_strtod ((gchar *)string, (gchar **)&unit); - - if (unit != string) { - unit = (xmlChar *)g_strchug ((gchar *)unit); - if (strlen ((char *)unit) > 0 ) { - for (i=LGL_UNITS_FIRST; i<=LGL_UNITS_LAST; i++) { - if (xmlStrcasecmp (unit, unit_table[i].name) == 0) { - val *= unit_table[i].points_per_unit; - break; - } - } - if (i>LGL_UNITS_LAST) { - g_message ("Line %ld, Node \"%s\", Property \"%s\": Unknown unit \"%s\", assuming points", - xmlGetLineNo (node), node->name, property, - unit); - } - } - } - else { - val = 0.0; - } - - xmlFree (string); - return val; - } - - return default_val; -} - - -/** - * lgl_xml_set_prop_string: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @val: the value to set - * - * Set a property from a string. - * - */ -void -lgl_xml_set_prop_string (xmlNodePtr node, - const gchar *property, - const gchar *val) -{ - if (val != NULL) { - xmlSetProp (node, (xmlChar *)property, (xmlChar *)val); - } -} - - -/** - * lgl_xml_set_prop_double: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @val: the value to set - * - * Set a property from a double. - * - */ -void -lgl_xml_set_prop_double (xmlNodePtr node, - const gchar *property, - gdouble val) -{ - gchar *string, buffer[G_ASCII_DTOSTR_BUF_SIZE]; - - /* Guarantee "C" locale by use of g_ascii_formatd */ - string = g_ascii_formatd (buffer, G_ASCII_DTOSTR_BUF_SIZE, "%g", val); - - xmlSetProp (node, (xmlChar *)property, (xmlChar *)string); -} - - -/** - * lgl_xml_set_prop_boolean: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @val: the value to set - * - * Set a property from a boolean. - * - */ -void -lgl_xml_set_prop_boolean (xmlNodePtr node, - const gchar *property, - gboolean val) -{ - xmlSetProp (node, (xmlChar *)property, (xmlChar *)(val ? "True" : "False")); -} - -/** - * lgl_xml_set_prop_int: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @val: the value to set - * - * Set a property from an integer. - * - */ -void -lgl_xml_set_prop_int (xmlNodePtr node, - const gchar *property, - gint val) -{ - gchar *string; - - string = g_strdup_printf ("%d", val); - xmlSetProp (node, (xmlChar *)property, (xmlChar *)string); - g_free (string); -} - -/** - * lgl_xml_set_prop_uint_hex: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @val: the value to set - * - * Set a property from an unsigned integer and format in hex. - * - */ -void -lgl_xml_set_prop_uint_hex (xmlNodePtr node, - const gchar *property, - guint val) -{ - gchar *string; - - string = g_strdup_printf ("0x%08x", val); - xmlSetProp (node, (xmlChar *)property, (xmlChar *)string); - g_free (string); -} - -/** - * lgl_xml_set_prop_length: - * @node: the libxml2 #xmlNodePtr of the node - * @property: the property name - * @val: the length to set in internal units (points) - * - * Set a property from a length, performing any necessary conversion. - * Length properties are formatted as a number followed by a units string. - * The units of the formatted property is determined by the most recent call to - * lgl_xml_set_default_units(). - * - */ -void -lgl_xml_set_prop_length (xmlNodePtr node, - const gchar *property, - gdouble val) -{ - gchar *string, buffer[G_ASCII_DTOSTR_BUF_SIZE]; - gchar *string_unit; - - /* Convert to default units */ - val /= unit_table[default_units].points_per_unit; - - /* Guarantee "C" locale by use of g_ascii_formatd */ - string = g_ascii_formatd (buffer, G_ASCII_DTOSTR_BUF_SIZE, "%g", val); - - string_unit = g_strdup_printf ("%s%s", string, unit_table[default_units].name); - xmlSetProp (node, (xmlChar *)property, (xmlChar *)string_unit); - g_free (string_unit); -} - -/** - * lgl_xml_is_node - * @node: the libxml2 #xmlNodePtr of the node - * @name : the node name - * - * Test if a node name matches given name. - * - * Returns: TRUE if the name of the node matches. Otherwise FALSE. - * - */ -gboolean -lgl_xml_is_node (xmlNodePtr node, - const gchar *name) -{ - return xmlStrEqual (node->name, (xmlChar *)name); -} - - -/** - * lgl_xml_get_node_content - * @node: the libxml2 #xmlNodePtr of the node - * - * Get the content of a node. - * - * Returns: the property as a pointer to a gchar string. This string should - * be freed with g_free(). - */ -gchar * -lgl_xml_get_node_content (xmlNodePtr node) -{ - xmlChar *xml_content; - gchar *g_content; - - xml_content = xmlNodeGetContent (node); - - if (xml_content != NULL) { - - g_content = g_strdup ((gchar *)xml_content); - xmlFree (xml_content); - return g_content; - - } - - return NULL; -} - - -/** - * lgl_xml_set_default_units: - * @units: default units selection (#lglUnitsType) - * - * Set the default units when formatting lengths. See - * lgl_xml_set_prop_length(). - * - */ -void -lgl_xml_set_default_units (lglUnitsType units) -{ - g_return_if_fail ((units >= LGL_UNITS_FIRST) && (units <= LGL_UNITS_LAST)); - - default_units = units; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/libglabels/xml.h b/glabels2/libglabels/xml.h deleted file mode 100644 index 257ee455..00000000 --- a/glabels2/libglabels/xml.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * xml.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of libglabels. - * - * libglabels is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * libglabels is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libglabels. If not, see . - */ - -#ifndef __XML_H__ -#define __XML_H__ - -#include -#include - -#include "enums.h" - -#define LGL_XML_NAME_SPACE "http://snaught.com/glabels/2.2/" - -G_BEGIN_DECLS - -/* - * Get property functions - */ -gchar * lgl_xml_get_prop_string (xmlNodePtr node, - const gchar *property, - const gchar *default_val); - -gchar * lgl_xml_get_prop_i18n_string (xmlNodePtr node, - const gchar *property, - const gchar *default_val); - -gdouble lgl_xml_get_prop_double (xmlNodePtr node, - const gchar *property, - gdouble default_val); - -gboolean lgl_xml_get_prop_boolean (xmlNodePtr node, - const gchar *property, - gboolean default_val); - -gint lgl_xml_get_prop_int (xmlNodePtr node, - const gchar *property, - gint default_val); - -guint lgl_xml_get_prop_uint (xmlNodePtr node, - const gchar *property, - guint default_val); - -gdouble lgl_xml_get_prop_length (xmlNodePtr node, - const gchar *property, - gdouble default_val); - - -/* - * Set property functions - */ -void lgl_xml_set_prop_string (xmlNodePtr node, - const gchar *property, - const gchar *val); - -void lgl_xml_set_prop_double (xmlNodePtr node, - const gchar *property, - gdouble val); - -void lgl_xml_set_prop_boolean (xmlNodePtr node, - const gchar *property, - gboolean val); - -void lgl_xml_set_prop_int (xmlNodePtr node, - const gchar *property, - gint val); - -void lgl_xml_set_prop_uint_hex (xmlNodePtr node, - const gchar *property, - guint val); - -void lgl_xml_set_prop_length (xmlNodePtr node, - const gchar *property, - gdouble val); - -/* - * Other node functions - */ -gboolean lgl_xml_is_node (xmlNodePtr node, - const gchar *name); - -gchar * lgl_xml_get_node_content (xmlNodePtr node); - -/* - * Misc functions - */ -void lgl_xml_set_default_units (lglUnitsType units); - -G_END_DECLS - - -#endif /* __XML_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/po/LINGUAS b/glabels2/po/LINGUAS deleted file mode 100644 index 828512c8..00000000 --- a/glabels2/po/LINGUAS +++ /dev/null @@ -1,18 +0,0 @@ -# glabels translations -# -# please keep this list sorted alphabetically -# -ca -cs -de -eo -es -fr -it -ja -ko -pl -pt_BR -ru -zh_CN -zh_TW.Big5 diff --git a/glabels2/po/POTFILES.in b/glabels2/po/POTFILES.in deleted file mode 100644 index e6f46d59..00000000 --- a/glabels2/po/POTFILES.in +++ /dev/null @@ -1,222 +0,0 @@ -# List of source files containing translatable strings. - -src/bc.c -src/bc-gnubarcode.c -src/bc-gnubarcode.h -src/bc.h -src/bc-iec16022.c -src/bc-iec16022.h -src/bc-iec18004.c -src/bc-iec18004.h -src/bc-postnet.c -src/bc-postnet.h -src/builder-util.c -src/builder-util.h -src/cairo-ellipse-path.c -src/cairo-ellipse-path.h -src/cairo-label-path.c -src/cairo-label-path.h -src/cairo-markup-path.c -src/cairo-markup-path.h -src/color.c -src/color-combo-button.c -src/color-combo-button.h -src/color-combo.c -src/color-combo-color-menu-item.c -src/color-combo-color-menu-item.h -src/color-combo.h -src/color-combo-history.c -src/color-combo-history.h -src/color-combo-menu.c -src/color-combo-menu.h -src/color.h -src/color-swatch.c -src/color-swatch.h -src/combo-util.c -src/combo-util.h -src/critical-error-handler.c -src/critical-error-handler.h -src/debug.c -src/debug.h -src/file.c -src/file.h -src/file-util.c -src/file-util.h -src/font-combo.c -src/font-combo.h -src/font-combo-menu.c -src/font-combo-menu.h -src/font-combo-menu-item.c -src/font-combo-menu-item.h -src/font-sample.c -src/font-sample.h -src/font-util.c -src/font-util.h -src/glabels-batch.c -src/glabels.c -src/hig.h -src/label-barcode.c -src/label-barcode.h -src/label-box.c -src/label-box.h -src/label.c -src/label-ellipse.c -src/label-ellipse.h -src/label.h -src/label-image.c -src/label-image.h -src/label-line.c -src/label-line.h -src/label-object.c -src/label-object.h -src/label-text.c -src/label-text.h -src/marshal.c -src/marshal.h -src/merge.c -src/merge-evolution.c -src/merge-evolution.h -src/merge.h -src/merge-init.c -src/merge-init.h -src/merge-properties-dialog.c -src/merge-properties-dialog.h -src/merge-text.c -src/merge-text.h -src/merge-vcard.c -src/merge-vcard.h -src/mini-label-preview.c -src/mini-label-preview.h -src/mini-preview.c -src/mini-preview.h -src/mini-preview-pixbuf.c -src/mini-preview-pixbuf-cache.c -src/mini-preview-pixbuf-cache.h -src/mini-preview-pixbuf.h -src/new-label-dialog.c -src/new-label-dialog.h -src/object-editor-bc-page.c -src/object-editor.c -src/object-editor-data-page.c -src/object-editor-edit-page.c -src/object-editor-fill-page.c -src/object-editor.h -src/object-editor-image-page.c -src/object-editor-line-page.c -src/object-editor-lsize-page.c -src/object-editor-position-page.c -src/object-editor-private.h -src/object-editor-shadow-page.c -src/object-editor-size-page.c -src/object-editor-text-page.c -src/pixbuf-cache.c -src/pixbuf-cache.h -src/prefs.c -src/prefs-dialog.c -src/prefs-dialog.h -src/prefs.h -src/prefs-model.c -src/prefs-model.h -src/print.c -src/print.h -src/print-op.c -src/print-op-dialog.c -src/print-op-dialog.h -src/print-op.h -src/recent.c -src/recent.h -src/rotate-label-button.c -src/rotate-label-button.h -src/stock.c -src/stock.h -src/str-util.c -src/str-util.h -src/template-designer.c -src/template-designer.h -src/text-node.c -src/text-node.h -src/ui.c -src/ui-commands.c -src/ui-commands.h -src/ui.h -src/ui-property-bar.c -src/ui-property-bar.h -src/ui-sidebar.c -src/ui-sidebar.h -src/ui-util.c -src/ui-util.h -src/view-barcode.c -src/view-barcode.h -src/view-box.c -src/view-box.h -src/view.c -src/view-ellipse.c -src/view-ellipse.h -src/view.h -src/view-image.c -src/view-image.h -src/view-line.c -src/view-line.h -src/view-object.c -src/view-object.h -src/view-text.c -src/view-text.h -src/warning-handler.c -src/warning-handler.h -src/wdgt-chain-button.c -src/wdgt-chain-button.h -src/wdgt-media-select.c -src/wdgt-media-select.h -src/wdgt-merge-menu.c -src/wdgt-merge-menu.h -src/window.c -src/window.h -src/xml-label-04.c -src/xml-label-04.h -src/xml-label.c -src/xml-label.h - -libglabels/category.c -libglabels/category.h -libglabels/db.c -libglabels/db.h -libglabels/enums.h -libglabels/libglabels-private.h -libglabels/paper.c -libglabels/paper.h -libglabels/str.c -libglabels/str.h -libglabels/template.c -libglabels/template.h -libglabels/xml.c -libglabels/xml.h -libglabels/xml-category.c -libglabels/xml-category.h -libglabels/xml-paper.c -libglabels/xml-paper.h -libglabels/xml-template.c -libglabels/xml-template.h - -[type: gettext/glade]data/builder/merge-properties-dialog.builder -[type: gettext/glade]data/builder/object-editor.builder -[type: gettext/glade]data/builder/prefs-dialog.builder -[type: gettext/glade]data/builder/property-bar.builder -[type: gettext/glade]data/builder/template-designer.builder -[type: gettext/glade]data/builder/print-op-dialog-custom-widget.builder - -[type: gettext/ini]data/desktop/glabels.desktop.in - -[type: gettext/keys]data/mime/glabels.keys.in -[type: gettext/xml]data/mime/glabels.xml.in - -[type: gettext/xml]templates/paper-sizes.xml -[type: gettext/xml]templates/categories.xml -[type: gettext/xml]templates/avery-us-templates.xml -[type: gettext/xml]templates/avery-iso-templates.xml -[type: gettext/xml]templates/avery-other-templates.xml -[type: gettext/xml]templates/brother-other-templates.xml -[type: gettext/xml]templates/dymo-other-templates.xml -[type: gettext/xml]templates/misc-us-templates.xml -[type: gettext/xml]templates/misc-iso-templates.xml -[type: gettext/xml]templates/misc-other-templates.xml -[type: gettext/xml]templates/zweckform-iso-templates.xml diff --git a/glabels2/po/ca.po b/glabels2/po/ca.po deleted file mode 100644 index 5812736c..00000000 --- a/glabels2/po/ca.po +++ /dev/null @@ -1,2714 +0,0 @@ -# Catalan translations for glabels package -# Traduccions al català del paquet «glabels». -# Copyright (C) 2009 THE glabels'S COPYRIGHT HOLDER -# This file is distributed under the same license as the glabels package. -# David Planella , 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 2\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-02-08 11:57+0100\n" -"PO-Revision-Date: 2009-02-08 22:00+0100\n" -"Last-Translator: David Planella \n" -"Language-Team: Catalan \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../src/glabels.c:75 ../src/glabels-batch.c:70 -msgid "[FILE...]" -msgstr "[FITXER...]" - -#: ../src/glabels.c:91 -msgid "- gLabels label designer" -msgstr "- dissenyador d'etiquetes gLabels" - -#: ../src/glabels-batch.c:54 -msgid "set output filename (default=\"output.pdf\")" -msgstr "" -"estableix el nom del fitxer de sortida (valor predeterminat = «output.pdf»)" - -#: ../src/glabels-batch.c:54 ../src/glabels-batch.c:68 -msgid "filename" -msgstr "nom de fitxer" - -#: ../src/glabels-batch.c:56 -msgid "number of sheets (default=1)" -msgstr "nombre de fulls (valor predeterminat = 1" - -#: ../src/glabels-batch.c:56 -msgid "sheets" -msgstr "fulls" - -#: ../src/glabels-batch.c:58 -msgid "number of copies (default=1)" -msgstr "nombre de còpies (valor predeterminat = 1" - -#: ../src/glabels-batch.c:58 -msgid "copies" -msgstr "còpies" - -#: ../src/glabels-batch.c:60 -msgid "first label on first sheet (default=1)" -msgstr "la primera etiqueta al primer full" - -#: ../src/glabels-batch.c:60 -msgid "first" -msgstr "primer" - -#: ../src/glabels-batch.c:62 ../data/builder/print-custom-widget.glade.h:6 -msgid "print outlines (to test printer alignment)" -msgstr "imprimeix els contorns (per a comprovar l'alineació de la impressora)" - -#: ../src/glabels-batch.c:64 ../data/builder/print-custom-widget.glade.h:5 -msgid "print in reverse (i.e. a mirror image)" -msgstr "imprimeix invertit (és a dir, com una imatge reflectida en un mirall)" - -#: ../src/glabels-batch.c:66 ../data/builder/print-custom-widget.glade.h:4 -msgid "print crop marks" -msgstr "imprimeix les marques de tall" - -#: ../src/glabels-batch.c:68 -msgid "input file for merging" -msgstr "fitxer d'entrada per a fusionar" - -#: ../src/glabels-batch.c:96 -msgid "- batch process gLabels label files" -msgstr "- processa en lot fitxers d'etiqueta del gLabels" - -#: ../src/glabels-batch.c:142 -#, c-format -msgid "cannot perform document merge with glabels file %s\n" -msgstr "no es realitzar la fusió del document amb el fitxer %s del gLabels\n" - -#: ../src/glabels-batch.c:164 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "no es pot obrir el fitxer del gLabels %s\n" - -#: ../src/window.c:259 -msgid "(none) - gLabels" -msgstr "(cap) - gLabels" - -#: ../src/window.c:432 -msgid "(modified)" -msgstr "(modificat)" - -#: ../src/stock.c:72 -msgid "_Select Mode" -msgstr "Mode de _selecció" - -#: ../src/stock.c:73 -msgid "_Text" -msgstr "_Text" - -#: ../src/stock.c:74 -msgid "_Line" -msgstr "_Línia" - -#: ../src/stock.c:75 -msgid "_Box" -msgstr "_Quadre" - -#: ../src/stock.c:76 -msgid "_Ellipse" -msgstr "_El·lipse" - -#: ../src/stock.c:77 -msgid "_Image" -msgstr "_Imatge" - -#: ../src/stock.c:78 -msgid "Bar_code" -msgstr "_Codi de barres" - -#: ../src/stock.c:79 -msgid "_Merge Properties" -msgstr "Propietats de la _fusió" - -#: ../src/stock.c:80 -msgid "Object _Properties" -msgstr "_Propietats de l'objecte" - -#: ../src/stock.c:81 -msgid "Bring to _Front" -msgstr "Porta al p_rimer pla" - -#: ../src/stock.c:82 -msgid "Send to _Back" -msgstr "Envia al _fons" - -#: ../src/stock.c:83 -msgid "Rotate _Left" -msgstr "Gira a l'_esquerra" - -#: ../src/stock.c:84 -msgid "Rotate _Right" -msgstr "Gira a la _dreta" - -#: ../src/stock.c:85 -msgid "Flip _Horizontally" -msgstr "Capgira _horitzontalment" - -#: ../src/stock.c:86 -msgid "Flip _Vertically" -msgstr "Capgira _verticalment" - -#: ../src/stock.c:87 -msgid "_Lefts" -msgstr "_Esquerres" - -#: ../src/stock.c:88 -msgid "_Rights" -msgstr "_Dretes" - -#: ../src/stock.c:89 -msgid "_Centers" -msgstr "_Centres" - -#: ../src/stock.c:90 -msgid "_Tops" -msgstr "Parts _superiors" - -#: ../src/stock.c:91 -msgid "Bottoms" -msgstr "Parts inferiors" - -#: ../src/stock.c:92 -msgid "Centers" -msgstr "Centres" - -#: ../src/stock.c:93 ../src/stock.c:94 -msgid "Label Ce_nter" -msgstr "Ce_ntre de l'etiqueta" - -#: ../src/stock.c:95 ../data/builder/property-bar.glade.h:3 -msgid "Fill color" -msgstr "Color de l'emplenat" - -#: ../src/stock.c:96 ../data/builder/property-bar.glade.h:8 -msgid "Line color" -msgstr "Color de la línia" - -#: ../src/stock.c:97 ../src/stock.c:99 -msgid "Linked" -msgstr "Enllaçat" - -#: ../src/stock.c:98 ../src/stock.c:100 -msgid "Not Linked" -msgstr "Sense enllaçar" - -#. Menu entries. -#: ../src/ui.c:93 -msgid "_File" -msgstr "_Fitxer" - -#: ../src/ui.c:94 -msgid "Open Recent _Files" -msgstr "Obre els fitxers _recents" - -#: ../src/ui.c:95 -msgid "_Edit" -msgstr "_Edita" - -#: ../src/ui.c:96 -msgid "_View" -msgstr "_Visualitza" - -#: ../src/ui.c:97 -msgid "Customize Main Toolbar" -msgstr "Personalitza la barra d'eines principal" - -#: ../src/ui.c:98 -msgid "Customize Drawing Toolbar" -msgstr "Personalitza la barra d'eines de dibuix" - -#: ../src/ui.c:99 -msgid "Customize Properties Toolbar" -msgstr "Personalitza la barra d'eines de les propietats" - -#: ../src/ui.c:100 -msgid "_Objects" -msgstr "_Objectes" - -#: ../src/ui.c:101 -msgid "_Create" -msgstr "_Crea" - -#: ../src/ui.c:102 -msgid "_Order" -msgstr "_Ordena" - -#: ../src/ui.c:103 -msgid "_Rotate/Flip" -msgstr "_Gira/Capgira" - -#: ../src/ui.c:104 -msgid "Align _Horizontal" -msgstr "Alinea _horitzontalment" - -#: ../src/ui.c:105 -msgid "Align _Vertical" -msgstr "Alinea _verticalment" - -#: ../src/ui.c:106 -msgid "_Help" -msgstr "A_juda" - -#. Popup entries. -#: ../src/ui.c:109 ../src/ui.c:110 -msgid "Context Menu" -msgstr "Menú contextual" - -#: ../src/ui.c:115 -msgid "_New" -msgstr "_Nou" - -#: ../src/ui.c:117 -msgid "Create a new file" -msgstr "Crea un fitxer nou" - -#: ../src/ui.c:122 -msgid "_Open..." -msgstr "_Obre..." - -#: ../src/ui.c:124 -msgid "Open a file" -msgstr "Obre un fitxer" - -#: ../src/ui.c:129 -msgid "_Save" -msgstr "_Desa" - -#: ../src/ui.c:131 -msgid "Save current file" -msgstr "Desa el fitxer actual" - -#: ../src/ui.c:136 -msgid "Save _As..." -msgstr "_Anomena i desa..." - -#: ../src/ui.c:138 -msgid "Save the current file to a different name" -msgstr "Desa el fitxer actual amb un nom diferent" - -#: ../src/ui.c:143 -msgid "_Print..." -msgstr "_Imprimeix..." - -#: ../src/ui.c:145 -msgid "Print the current file" -msgstr "Imprimeix el fitxer actual" - -#: ../src/ui.c:150 -msgid "Properties..." -msgstr "Propietats..." - -#: ../src/ui.c:152 -msgid "Modify document properties" -msgstr "Modifica les propietats del document" - -#: ../src/ui.c:157 -msgid "Template _Designer..." -msgstr "Dissen_yador de plantilles..." - -#: ../src/ui.c:159 -msgid "Create a custom template" -msgstr "Crea una plantilla personalitzada" - -#: ../src/ui.c:164 -msgid "_Close" -msgstr "_Tanca" - -#: ../src/ui.c:166 -msgid "Close the current file" -msgstr "Tanca el fitxer actual" - -#: ../src/ui.c:171 -msgid "_Quit" -msgstr "_Surt" - -#: ../src/ui.c:173 -msgid "Quit the program" -msgstr "Surt del programa" - -#: ../src/ui.c:180 -msgid "Cut" -msgstr "Retalla" - -#: ../src/ui.c:182 -msgid "Cut the selection" -msgstr "Retalla la selecció" - -#: ../src/ui.c:187 -msgid "Copy" -msgstr "Copia" - -#: ../src/ui.c:189 -msgid "Copy the selection" -msgstr "Copia la selecció" - -#: ../src/ui.c:194 -msgid "Paste" -msgstr "Enganxa" - -#: ../src/ui.c:196 -msgid "Paste the clipboard" -msgstr "Enganxa el contingut del porta-retalls" - -#: ../src/ui.c:201 -msgid "Delete" -msgstr "Suprimeix" - -#: ../src/ui.c:203 -msgid "Delete the selected objects" -msgstr "Suprimeix els objectes seleccionats" - -#: ../src/ui.c:208 -msgid "Select All" -msgstr "Selecciona-ho tot" - -#: ../src/ui.c:210 -msgid "Select all objects" -msgstr "Selecciona tots els objectes" - -#: ../src/ui.c:215 -msgid "Un-select All" -msgstr "No seleccionis res" - -#: ../src/ui.c:217 -msgid "Remove all selections" -msgstr "Desfés totes les seleccions" - -#: ../src/ui.c:222 -msgid "Preferences" -msgstr "Preferències" - -#: ../src/ui.c:224 -msgid "Configure the application" -msgstr "Configura l'aplicació" - -#: ../src/ui.c:231 -msgid "Zoom in" -msgstr "Amplia" - -#: ../src/ui.c:233 -msgid "Increase magnification" -msgstr "Incrementa l'ampliació" - -#: ../src/ui.c:238 -msgid "Zoom out" -msgstr "Redueix" - -#: ../src/ui.c:240 -msgid "Decrease magnification" -msgstr "Redueix l'ampliació" - -#: ../src/ui.c:245 -msgid "Zoom 1 to 1" -msgstr "Amplia a 1:1" - -#: ../src/ui.c:247 -msgid "Restore scale to 100%" -msgstr "Refés l'escala a 100 %" - -#: ../src/ui.c:252 -msgid "Zoom to fit" -msgstr "Millor ajust" - -#: ../src/ui.c:254 -msgid "Set scale to fit window" -msgstr "Estableix l'escala per a encabir-ho a la finestra" - -#: ../src/ui.c:261 -msgid "Select Mode" -msgstr "Mode de selecció" - -#: ../src/ui.c:263 -msgid "Select, move and modify objects" -msgstr "Seleccioneu, moveu i modifiqueu objectes" - -#: ../src/ui.c:268 ../src/view-text.c:494 -#: ../data/builder/object-editor.glade.h:32 -msgid "Text" -msgstr "Text" - -#: ../src/ui.c:270 -msgid "Create text object" -msgstr "Crea un objecte de text" - -#: ../src/ui.c:275 -msgid "Box" -msgstr "Quadre" - -#: ../src/ui.c:277 -msgid "Create box/rectangle object" -msgstr "Crea un objecte quadre/rectangle" - -#: ../src/ui.c:282 ../data/builder/object-editor.glade.h:20 -msgid "Line" -msgstr "Línia" - -#: ../src/ui.c:284 -msgid "Create line object" -msgstr "Crea un objecte línia" - -#: ../src/ui.c:289 -msgid "Ellipse" -msgstr "El·lipse" - -#: ../src/ui.c:291 -msgid "Create ellipse/circle object" -msgstr "Crea un objecte el·lipse/cercle" - -#: ../src/ui.c:296 ../data/builder/object-editor.glade.h:16 -msgid "Image" -msgstr "Imatge" - -#: ../src/ui.c:298 -msgid "Create image object" -msgstr "Crea un objecte d'imatge" - -#: ../src/ui.c:303 -msgid "Barcode" -msgstr "Codi de barres" - -#: ../src/ui.c:305 -msgid "Create barcode object" -msgstr "Crea un objecte de codi de barres" - -#: ../src/ui.c:310 -msgid "Bring to front" -msgstr "Porta al primer pla" - -#: ../src/ui.c:312 -msgid "Raise object to top" -msgstr "Alça l'objecte fins al primer pla" - -#: ../src/ui.c:317 -msgid "Send to back" -msgstr "Porta al fons" - -#: ../src/ui.c:319 -msgid "Lower object to bottom" -msgstr "Baixa l'objecte fins al fons" - -#: ../src/ui.c:324 -msgid "Rotate left" -msgstr "Gira a l'esquerra" - -#: ../src/ui.c:326 -msgid "Rotate object 90 degrees counter-clockwise" -msgstr "" -"Gira l'objecte 90 graus en el sentit contrari a les agulles del rellotge" - -#: ../src/ui.c:331 -msgid "Rotate right" -msgstr "Gira a la dreta" - -#: ../src/ui.c:333 -msgid "Rotate object 90 degrees clockwise" -msgstr "Gira l'objecte 90 graus en el sentit de les agulles del rellotge" - -#: ../src/ui.c:338 -msgid "Flip horizontally" -msgstr "Capgira horitzontalment" - -#: ../src/ui.c:340 -msgid "Flip object horizontally" -msgstr "Capgira l'objecte horitzontalment" - -#: ../src/ui.c:345 -msgid "Flip vertically" -msgstr "Capgira verticalment" - -#: ../src/ui.c:347 -msgid "Flip object vertically" -msgstr "Capgira l'objecte verticalment" - -#: ../src/ui.c:352 -msgid "Align left" -msgstr "Alinea a l'esquerra" - -#: ../src/ui.c:354 -msgid "Align objects to left edges" -msgstr "Alinea els objectes a les vores esquerres" - -#: ../src/ui.c:359 -msgid "Align right" -msgstr "Alinea a la dreta" - -#: ../src/ui.c:361 -msgid "Align objects to right edges" -msgstr "Alinea els objectes a les vores dretes" - -#: ../src/ui.c:366 -msgid "Align horizontal center" -msgstr "Alinea als centre horitzontals" - -#: ../src/ui.c:368 -msgid "Align objects to horizontal centers" -msgstr "Alinea els objectes als centres horitzontals" - -#: ../src/ui.c:373 -msgid "Align tops" -msgstr "Alinea a les vores superiors" - -#: ../src/ui.c:375 -msgid "Align objects to top edges" -msgstr "Alinea els objectes a les vores superiors" - -#: ../src/ui.c:380 -msgid "Align bottoms" -msgstr "Alinea a les vores inferiors" - -#: ../src/ui.c:382 -msgid "Align objects to bottom edges" -msgstr "Alinea els objectes a les vores inferiors" - -#: ../src/ui.c:387 -msgid "Align vertical center" -msgstr "Alinea als centre verticals" - -#: ../src/ui.c:389 -msgid "Align objects to vertical centers" -msgstr "Alinea els objectes als centres verticals" - -#: ../src/ui.c:394 -msgid "Center horizontally" -msgstr "Centra horitzontalment" - -#: ../src/ui.c:396 -msgid "Center objects to horizontal label center" -msgstr "Centra els objectes al centre horitzontal de l'etiqueta" - -#: ../src/ui.c:401 -msgid "Center vertically" -msgstr "Centra verticalment" - -#: ../src/ui.c:403 -msgid "Center objects to vertical label center" -msgstr "Centra els objectes al centre vertical de l'etiqueta" - -#: ../src/ui.c:408 -msgid "Merge properties" -msgstr "Propietats de fusió" - -#: ../src/ui.c:410 -msgid "Edit merge properties" -msgstr "Edita les propietats de fusió" - -#: ../src/ui.c:417 -msgid "Contents" -msgstr "Contingut" - -#: ../src/ui.c:419 -msgid "Open glabels manual" -msgstr "Obre el manual del gLabels" - -#: ../src/ui.c:424 -msgid "About..." -msgstr "Quant a..." - -#: ../src/ui.c:426 -msgid "About glabels" -msgstr "Quant al gLabels" - -#: ../src/ui.c:436 -msgid "Property toolbar" -msgstr "Barra d'eines de les propietats" - -#: ../src/ui.c:438 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "" -"Canvia la visibilitat de la barra d'eines de les propietats a la finestra " -"actual" - -#: ../src/ui.c:444 ../src/ui.c:489 ../src/ui.c:497 -msgid "Show tooltips" -msgstr "Mostra els indicadors de funció" - -#: ../src/ui.c:446 -msgid "Show tooltips for property toolbar" -msgstr "Mostra els indicadors de funció a la barra de les propietats" - -#: ../src/ui.c:452 -msgid "Grid" -msgstr "Graella" - -#: ../src/ui.c:454 -msgid "Change the visibility of the grid in the current window" -msgstr "Canvia la visibilitat de la graella a la finestra actual" - -#: ../src/ui.c:460 -msgid "Markup" -msgstr "Marques" - -#: ../src/ui.c:462 -msgid "Change the visibility of markup lines in the current window" -msgstr "Canvia la visibilitat de les línies de marca a la finestra actual" - -#: ../src/ui.c:473 -msgid "Main toolbar" -msgstr "Barra d'eines principal" - -#: ../src/ui.c:475 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "" -"Canvia la visibilitat de la barra d'eines principal a la finestra actual" - -#: ../src/ui.c:481 -msgid "Drawing toolbar" -msgstr "Barra d'eines de dibuix" - -#: ../src/ui.c:483 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "" -"Canvia la visibilitat de la barra d'eines de dibuix a la finestra actual" - -#: ../src/ui.c:491 -msgid "Show tooltips for main toolbar" -msgstr "Mostra els indicadors de funció a la barra principal" - -#: ../src/ui.c:499 -msgid "Show tooltips for drawing toolbar" -msgstr "Mostra els indicadors de funció a la barra de dibuix" - -#: ../src/ui-property-bar.c:280 ../src/prefs-dialog.c:328 -#: ../src/object-editor-bc-page.c:93 ../src/object-editor-text-page.c:93 -#: ../src/object-editor-shadow-page.c:93 -msgid "Default" -msgstr "Predeterminat" - -#: ../src/ui-property-bar.c:292 ../src/prefs-dialog.c:334 -#: ../src/object-editor-fill-page.c:79 -msgid "No Fill" -msgstr "Sense emplenament" - -#: ../src/ui-property-bar.c:304 ../src/prefs-dialog.c:331 -#: ../src/object-editor-line-page.c:81 -msgid "No Line" -msgstr "Sense línia" - -#: ../src/ui-sidebar.c:152 -msgid "Object properties" -msgstr "Propietats de l'objecte" - -#: ../src/ui-commands.c:1084 -msgid "Glabels includes contributions from:" -msgstr "El gLabels inclou col·laboracions de:" - -#: ../src/ui-commands.c:1090 -msgid "See the file AUTHORS for additional credits," -msgstr "Consulteu el fitxer AUTHORS per a veure els crèdits addicionals" - -#: ../src/ui-commands.c:1091 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "o aneu a http://glabels.sourceforge.net/" - -#: ../src/ui-commands.c:1103 -msgid "A label and business card creation program.\n" -msgstr "Un programa de creació d'etiquetes i de targetes de visita.\n" - -#: ../src/ui-commands.c:1107 -msgid "translator-credits" -msgstr "David Planella " - -#: ../src/ui-commands.c:1110 -msgid "" -"Glabels is free software; you can redistribute it and/or modify it\n" -"under the terms of the GNU General Public License as published by\n" -"the Free Software Foundation; either version 2 of the License, or\n" -"(at your option) any later version.\n" -"\n" -"This program is distributed in the hope that it will be useful, but\n" -"WITHOUT ANY WARRANTY; without even the implied warranty of\n" -"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" -"the GNU General Public License for more details.\n" -msgstr "" -"El gLabels és programari lliure; podeu redistribuir-lo i/o modificar-lo \n" -"sota els termes de la Llicència Pública General GNU tal i com ha estat \n" -"publicada per la Free Software Foundation; ja sigui la versió 2 de la \n" -"Llicència o (si ho preferiu) qualsevol versió posterior.\n" -"\n" -"El gLabels es distribueix amb l'expectativa que serà útil, però SENSE \n" -"CAP GARANTIA; fins i tot sense la garantia implícita de COMERCIABILITAT o \n" -"ADEQUACIÓ PER A UN PROPÒSIT PARTICULAR. Vegeu la Llicència Pública " -"General \n" -"GNU per a obtenir-ne més detalls.\n" - -#: ../src/ui-commands.c:1136 -msgid "glabels" -msgstr "gLabels" - -#: ../src/file.c:91 -msgid "New Label or Card" -msgstr "Etiqueta o targeta nova" - -#: ../src/file.c:191 -msgid "Label properties" -msgstr "Propietats de l'etiqueta" - -#: ../src/file.c:292 ../src/file.c:578 -msgid "All files" -msgstr "Tots els fitxers" - -#: ../src/file.c:297 ../src/file.c:583 -msgid "gLabels documents" -msgstr "Documents del gLabel" - -#: ../src/file.c:343 ../src/file.c:640 -msgid "Empty file name selection" -msgstr "Selecció d'un nom de fitxer buit" - -#: ../src/file.c:346 ../src/file.c:362 -msgid "Please select a file or supply a valid file name" -msgstr "Seleccioneu un fitxer o introduïu un nom de fitxer vàlid" - -#: ../src/file.c:359 -msgid "File does not exist" -msgstr "El fitxer no existeix" - -#: ../src/file.c:433 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "No s'ha pogut obrir el fitxer «%s»" - -#: ../src/file.c:436 -msgid "Not a supported file format" -msgstr "No és un format de fitxer admès" - -#: ../src/file.c:513 ../src/file.c:690 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "No s'ha pogut desar el fitxer «%s»" - -#: ../src/file.c:517 ../src/file.c:694 -msgid "Error encountered during save. The file is still not saved." -msgstr "S'ha produït un error en desar. El fitxer no s'ha desat encara." - -#: ../src/file.c:556 -#, c-format -msgid "Save \"%s\" as" -msgstr "Desa «%s» com a" - -#: ../src/file.c:643 -msgid "Please supply a valid file name" -msgstr "Introduïu un nom de fitxer vàlid" - -#: ../src/file.c:664 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "Voleu sobreescriure el fitxer «%s»?" - -#: ../src/file.c:668 -msgid "File already exists." -msgstr "El fitxer ja existeix." - -#: ../src/file.c:764 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "Voleu desar els canvis al document «%s» abans de tancar-lo?" - -#: ../src/file.c:768 -msgid "Your changes will be lost if you don't save them." -msgstr "Es perdran els vostres canvis si no els deseu." - -#: ../src/file.c:771 -msgid "Close without saving" -msgstr "Tanca sense desar" - -#. Should not happen -#: ../src/prefs.c:159 ../src/prefs.c:166 -#: ../data/builder/object-editor.glade.h:43 -#: ../data/builder/prefs-dialog.glade.h:22 -msgid "points" -msgstr "punts" - -#: ../src/prefs.c:161 ../data/builder/object-editor.glade.h:42 -#: ../data/builder/template-designer.glade.h:64 -msgid "inches" -msgstr "polzades" - -#: ../src/prefs.c:163 -msgid "mm" -msgstr "mm" - -#: ../src/prefs-dialog.c:167 ../data/builder/prefs-dialog.glade.h:21 -msgid "gLabels Preferences" -msgstr "Preferències del gLabels" - -#. Build editor. -#: ../src/view-box.c:175 -msgid "Box object properties" -msgstr "Propietats de l'objecte quadre" - -#. Build editor. -#: ../src/view-ellipse.c:175 -msgid "Ellipse object properties" -msgstr "Propietats de l'objecte el·lipse" - -#. Build editor. -#: ../src/view-line.c:174 -msgid "Line object properties" -msgstr "Propietats de l'objecte línia" - -#. Build editor. -#: ../src/view-image.c:174 -msgid "Image object properties" -msgstr "Propietats de l'objecte imatge" - -#. Build editor. -#: ../src/view-text.c:178 -msgid "Text object properties" -msgstr "Propietats de l'objecte text" - -#. Build editor. -#: ../src/view-barcode.c:174 -msgid "Barcode object properties" -msgstr "Propietats de l'objecte codi de barres" - -#: ../src/object-editor-image-page.c:267 -msgid "All Files" -msgstr "Tots els fitxers" - -#: ../src/object-editor-image-page.c:272 -msgid "All Images" -msgstr "Totes les imatges" - -#: ../src/object-editor-image-page.c:287 -#, c-format -msgid "%s (*.%s)" -msgstr "%s (*.%s)" - -#: ../src/merge-properties-dialog.c:271 -msgid "Merge Properties" -msgstr "Propietats de la fusió" - -#: ../src/merge-properties-dialog.c:297 ../src/merge-properties-dialog.c:405 -msgid "Select merge-database source" -msgstr "Seleccioneu la font de la base de dades de la fusió" - -#: ../src/merge-properties-dialog.c:306 ../src/merge-properties-dialog.c:425 -msgid "N/A" -msgstr "No disponible" - -#: ../src/merge-properties-dialog.c:332 -msgid "Select" -msgstr "Seleccionat" - -#: ../src/merge-properties-dialog.c:340 -msgid "Record/Field" -msgstr "Registre/camp" - -#: ../src/merge-properties-dialog.c:348 -#: ../data/builder/object-editor.glade.h:10 -msgid "Data" -msgstr "Dades" - -#: ../src/merge-properties-dialog.c:418 -msgid "Fixed" -msgstr "Fixe" - -#. =================================================================== -#: ../src/print-op.c:242 ../src/wdgt-print-copies.c:171 -#: ../data/templates/misc-iso-templates.xml.h:34 -msgid "Labels" -msgstr "Etiquetes" - -#: ../src/template-designer.c:411 -msgid "gLabels Template Designer" -msgstr "Dissenyador de plantilles del gLabels" - -#: ../src/template-designer.c:481 -msgid "Welcome" -msgstr "Us donem la benvinguda" - -#: ../src/template-designer.c:534 -msgid "Name and Description" -msgstr "Nom i descripció" - -#: ../src/template-designer.c:595 -msgid "Page Size" -msgstr "Mida de la pàgina" - -#: ../src/template-designer.c:675 -msgid "Label or Card Shape" -msgstr "Forma de l'etiqueta o targeta" - -#: ../src/template-designer.c:735 -msgid "Label or Card Size" -msgstr "Mida de l'etiqueta o targeta" - -#: ../src/template-designer.c:844 -msgid "Label Size (round)" -msgstr "Mida de 'etiqueta (circular)" - -#: ../src/template-designer.c:935 -msgid "Label Size (CD/DVD)" -msgstr "Mida de 'etiqueta (CD/DVD)" - -#: ../src/template-designer.c:1036 -msgid "Number of Layouts" -msgstr "Nombre de disposicions" - -#: ../src/template-designer.c:1110 -msgid "Layout(s)" -msgstr "Disposicions" - -#: ../src/template-designer.c:1229 -msgid "Design Completed" -msgstr "S'ha completat el disseny" - -#: ../src/template-designer.c:1396 -msgid "" -"Brand and part# match an existing " -"template!" -msgstr "" -"La marca i el número de model " -"coincideixen amb un a plantilla existent" - -#: ../src/bc.c:67 -msgid "POSTNET (any)" -msgstr "POSTNET (qualsevol)" - -#: ../src/bc.c:70 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (només codi postal ZIP)" - -#: ../src/bc.c:73 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (codi postal ZIP+4)" - -#: ../src/bc.c:76 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: ../src/bc.c:79 -msgid "CEPNET" -msgstr "CEPNET" - -#: ../src/bc.c:82 -msgid "EAN (any)" -msgstr "EAN (qualsevol)" - -#: ../src/bc.c:85 -msgid "EAN-8" -msgstr "EAN-8" - -#: ../src/bc.c:88 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: ../src/bc.c:91 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: ../src/bc.c:94 -msgid "EAN-13" -msgstr "EAN-13" - -#: ../src/bc.c:97 -msgid "EAN-13 +2" -msgstr "EAN-13 +2" - -#: ../src/bc.c:100 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: ../src/bc.c:103 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A o UPC-E)" - -#: ../src/bc.c:106 -msgid "UPC-A" -msgstr "UPC-A" - -#: ../src/bc.c:109 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: ../src/bc.c:112 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: ../src/bc.c:115 -msgid "UPC-E" -msgstr "UPC-E" - -#: ../src/bc.c:118 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: ../src/bc.c:121 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: ../src/bc.c:124 -msgid "ISBN" -msgstr "ISBN" - -#: ../src/bc.c:127 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: ../src/bc.c:130 -msgid "Code 39" -msgstr "Codi 39" - -#: ../src/bc.c:133 -msgid "Code 128" -msgstr "Codi 128" - -#: ../src/bc.c:136 -msgid "Code 128C" -msgstr "Codi 128C" - -#: ../src/bc.c:139 -msgid "Code 128B" -msgstr "Codi 128B" - -#: ../src/bc.c:142 -msgid "Interleaved 2 of 5" -msgstr "Interfoliat 2 de 5" - -#: ../src/bc.c:145 -msgid "Codabar" -msgstr "Codabar" - -#: ../src/bc.c:148 -msgid "MSI" -msgstr "MSI" - -#: ../src/bc.c:151 -msgid "Plessey" -msgstr "Plessey" - -#: ../src/bc.c:154 -msgid "IEC16022 (DataMatrix)" -msgstr "IEC16022 (DataMatrix)" - -#: ../src/label.c:531 -msgid "Untitled" -msgstr "Sense títol" - -#: ../src/label-barcode.c:426 -msgid "Barcode data empty" -msgstr "Les dades del codi de barres estan buides" - -#: ../src/label-barcode.c:430 -msgid "Invalid barcode data" -msgstr "Les dades del codi de barres no són vàlides" - -#: ../src/xml-label.c:189 ../src/xml-label.c:226 -msgid "xmlParseFile error" -msgstr "Error de la funció xmlParseFile" - -#: ../src/xml-label.c:262 -msgid "No document root" -msgstr "No hi ha cap arrel del document" - -#: ../src/xml-label.c:270 -msgid "Importing from glabels 0.1 format" -msgstr "S'està important del format del gLabels 0.1" - -#: ../src/xml-label.c:279 -msgid "Importing from glabels 0.4 format" -msgstr "S'està important del format del gLabels 0.4" - -#: ../src/xml-label.c:288 -#, c-format -msgid "Unknown glabels Namespace -- Using %s" -msgstr "Espai de noms del gLabels desconegut -- s'utilitzarà el %s" - -#: ../src/xml-label.c:319 ../src/xml-label-04.c:79 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Node arrel incorrecte = «%s»" - -#: ../src/xml-label.c:356 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "node incorrecte en el node Document = «%s»" - -#: ../src/xml-label.c:401 ../src/xml-label-04.c:127 -#, c-format -msgid "bad node = \"%s\"" -msgstr "node incorrecte = «%s»" - -#: ../src/xml-label.c:840 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "node incorrecte en el node Data (dades) = «%s»" - -#: ../src/xml-label.c:1077 ../libglabels/xml-template.c:670 -msgid "Utf8 conversion error." -msgstr "Error de conversió a l'UTF-8" - -#: ../src/xml-label.c:1084 -msgid "Problem saving xml file." -msgstr "S'ha produït un problema en desar el fitxer" - -#: ../src/merge.c:170 ../src/merge.c:211 ../src/merge.c:375 ../src/merge.c:378 -msgid "None" -msgstr "Cap" - -#: ../src/merge-init.c:59 -msgid "Text file with comma delimeters (CSV)" -msgstr "Fitxer de text amb comes delimitadores (CSV)" - -#: ../src/merge-init.c:66 -msgid "Text file with colon delimeters" -msgstr "Fitxer de text amb dos punts delimitadors" - -#: ../src/merge-init.c:73 -msgid "Text file with tab delimeters" -msgstr "Fitxer de text amb tabulacions delimitadores" - -#: ../src/merge-init.c:82 -msgid "Data from default Evolution Addressbook" -msgstr "Dades de la llibreta d'adreces predeterminada de l'Evolution" - -#: ../src/merge-init.c:88 -msgid "Data from a file containing VCards" -msgstr "Dades d'un fitxer que conté VCards" - -#: ../src/merge-evolution.c:309 -msgid "Couldn't construct query" -msgstr "No s'ha pogut crear la sol·licitud" - -#: ../src/merge-evolution.c:315 ../src/merge-evolution.c:326 -msgid "Couldn't open addressbook." -msgstr "No s'ha pogut obrir la llibreta d'adreces" - -#: ../src/merge-evolution.c:341 -msgid "Couldn't list available fields." -msgstr "No s'ha pogut mostrar la llista dels camps disponibles." - -#: ../src/merge-evolution.c:377 -msgid "Couldn't get contacts." -msgstr "No s'han pogut obtenir els contactes." - -#: ../src/color-combo.c:210 -msgid "Default Color" -msgstr "Color predeterminat" - -#: ../src/color-combo-menu.c:86 -msgid "Dark Red" -msgstr "Vermell fosc" - -#: ../src/color-combo-menu.c:87 -msgid "Brown" -msgstr "Marró" - -#: ../src/color-combo-menu.c:88 -msgid "Dark Goldenrod" -msgstr "Vara d'or (goldenrod) fosc" - -#: ../src/color-combo-menu.c:89 -msgid "Dark Green" -msgstr "Verd fosc" - -#: ../src/color-combo-menu.c:90 -msgid "Dark Cyan" -msgstr "Cyan fosc" - -#: ../src/color-combo-menu.c:91 -msgid "Navy Blue" -msgstr "Blau ultramarí" - -#: ../src/color-combo-menu.c:92 -msgid "Dark Violet" -msgstr "Violeta fosc" - -#: ../src/color-combo-menu.c:94 -msgid "Red" -msgstr "Vermell" - -#: ../src/color-combo-menu.c:95 -msgid "Orange" -msgstr "Taronja" - -#: ../src/color-combo-menu.c:96 -msgid "Dark Yellow" -msgstr "Groc fosc" - -#: ../src/color-combo-menu.c:97 -msgid "Medium green" -msgstr "Verd mitjà" - -#: ../src/color-combo-menu.c:98 -msgid "Turquoise" -msgstr "Turquesa" - -#: ../src/color-combo-menu.c:99 -msgid "Blue" -msgstr "Blau" - -#: ../src/color-combo-menu.c:100 -msgid "Purple" -msgstr "Porpra" - -#: ../src/color-combo-menu.c:102 -msgid "Salmon" -msgstr "Salmó" - -#: ../src/color-combo-menu.c:103 -msgid "Gold" -msgstr "Daurat" - -#: ../src/color-combo-menu.c:104 -msgid "Yellow" -msgstr "Groc" - -#: ../src/color-combo-menu.c:105 -msgid "Green" -msgstr "Verd" - -#: ../src/color-combo-menu.c:106 -msgid "Cyan" -msgstr "Cyan" - -#: ../src/color-combo-menu.c:107 -msgid "SkyBlue" -msgstr "Blau cel" - -#: ../src/color-combo-menu.c:108 -msgid "Violet" -msgstr "Violeta" - -#: ../src/color-combo-menu.c:110 -msgid "Pink" -msgstr "Rosa" - -#: ../src/color-combo-menu.c:111 -msgid "Khaki" -msgstr "Caqui" - -#: ../src/color-combo-menu.c:112 -msgid "Light Yellow" -msgstr "Groc clar" - -#: ../src/color-combo-menu.c:113 -msgid "Light Green" -msgstr "Verd clar" - -#: ../src/color-combo-menu.c:114 -msgid "Light Cyan" -msgstr "Cyan clar" - -#: ../src/color-combo-menu.c:115 -msgid "Slate Gray" -msgstr "Gris de pissarra" - -#: ../src/color-combo-menu.c:116 -msgid "Thistle" -msgstr "Calcida" - -#: ../src/color-combo-menu.c:118 -msgid "White" -msgstr "Blanc" - -#: ../src/color-combo-menu.c:119 -#, c-format -msgid "10% Gray" -msgstr "10% Gris" - -#: ../src/color-combo-menu.c:120 -#, c-format -msgid "25% Gray" -msgstr "25% Gris" - -#: ../src/color-combo-menu.c:121 -#, c-format -msgid "40% Gray" -msgstr "40% Gris" - -#: ../src/color-combo-menu.c:122 -#, c-format -msgid "50% Gray" -msgstr "50% Gris" - -#: ../src/color-combo-menu.c:123 -#, c-format -msgid "60% Gray" -msgstr "60% Gris" - -#: ../src/color-combo-menu.c:124 -msgid "Black" -msgstr "Negre" - -#: ../src/color-combo-menu.c:252 ../src/color-combo-menu.c:369 -msgid "Custom Color" -msgstr "Color personalitzat" - -#: ../src/color-combo-menu.c:317 -#, c-format -msgid "Custom Color #%u" -msgstr "Color personalitzat núm. %u" - -#: ../src/wdgt-print-copies.c:153 -msgid "Sheets:" -msgstr "Fulls:" - -#: ../src/wdgt-print-copies.c:173 -msgid "from:" -msgstr "de:" - -#: ../src/wdgt-print-copies.c:179 -msgid "to:" -msgstr "a:" - -#: ../src/wdgt-print-merge.c:154 -msgid "Start on label" -msgstr "Comença a l'etiqueta" - -#: ../src/wdgt-print-merge.c:162 -msgid "on 1st sheet" -msgstr "al primer full" - -#: ../src/wdgt-print-merge.c:171 -msgid "Copies:" -msgstr "Còpies" - -#: ../src/wdgt-print-merge.c:177 -msgid "Collate" -msgstr "Compagina" - -#: ../src/wdgt-media-select.c:290 ../src/wdgt-media-select.c:294 -#: ../src/wdgt-media-select.c:299 ../src/wdgt-media-select.c:308 -#: ../src/wdgt-media-select.c:311 ../src/wdgt-media-select.c:404 -#: ../src/wdgt-media-select.c:611 ../src/wdgt-media-select.c:620 -msgid "Any" -msgstr "Qualsevol" - -#: ../src/wdgt-media-select.c:645 -#, c-format -msgid "%d per sheet" -msgstr "%d per full" - -#: ../src/wdgt-media-select.c:675 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: ../src/wdgt-media-select.c:680 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: ../src/wdgt-media-select.c:691 ../src/wdgt-media-select.c:705 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s de diàmetre" - -#: ../src/wdgt-media-select.c:695 ../src/wdgt-media-select.c:709 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s de diàmetre" - -#: ../src/wdgt-media-select.c:783 -msgid "No recent templates found." -msgstr "No s'ha trobat cap plantilla recent." - -#: ../src/wdgt-media-select.c:784 -msgid "Try selecting a template from the \"Search all templates\" page." -msgstr "" -"Proveu de seleccionar una plantilla de la pàgina «Cerca totes les plantilles»" - -#: ../src/wdgt-media-select.c:863 -msgid "No match." -msgstr "No hi ha cap coincidència." - -#: ../src/wdgt-media-select.c:864 -msgid "Try selecting a different brand, page size or category." -msgstr "Proveu de seleccionar una marca, mida de pàgina o categoria diferents." - -#: ../src/wdgt-rotate-label.c:129 -msgid "Normal" -msgstr "Normal" - -#: ../src/wdgt-rotate-label.c:130 -msgid "Rotated" -msgstr "Girat" - -#: ../src/critical-error-handler.c:73 -msgid "gLabels Fatal Error!" -msgstr "S'ha produït un error fatal del gLabels" - -#: ../src/warning-handler.c:73 -msgid "gLabels Error!" -msgstr "S'ha produït un error del gLabels" - -#. Create and append an "Other" entry. -#: ../libglabels/db.c:118 -msgid "Other" -msgstr "Una altra" - -#. Create and append a "User defined" entry. -#: ../libglabels/db.c:131 -msgid "User defined" -msgstr "Definit per l'usuari" - -#: ../libglabels/db.c:482 -msgid "" -"Unable to locate paper size definitions. Libglabels may not be installed " -"correctly!" -msgstr "" -"No s'han trobat les definicions de les mides de paper. Pot ser que la " -"libglables no s'hagi instal·lat correctametn" - -#: ../libglabels/db.c:875 -msgid "" -"Unable to locate category definitions. Libglabels may not be installed " -"correctly!" -msgstr "" -"No s'han trobat les definicions de les categories. Pot ser que la libglables " -"no s'hagi instal·lat correctametn" - -#: ../libglabels/db.c:1461 -msgid "" -"Unable to locate any template files. Libglabels may not be installed " -"correctly!" -msgstr "" -"No s'ha trobat cap plantilla. Pot ser que la libglables no s'hagi instal·lat " -"correctametn" - -#: ../libglabels/db.c:1538 -#, c-format -msgid "Generic %s full page template" -msgstr "Plantilla de pàgina completa %s genèrica" - -#: ../libglabels/xml-template.c:227 -msgid "Missing name or brand/part attributes." -msgstr "Manca el nom o bé els atributs de marca/model" - -#. This should always be an id, but just in case a name -#. slips by! -#: ../libglabels/xml-template.c:244 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "" -"Es desconeix l'identificador de mida de pàgina «%s»; s'intentarà com a nom" - -#: ../libglabels/xml-template.c:256 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "Es desconeix l'identificador de mida de pàgina o nom «%s»" - -#: ../libglabels/xml-template.c:615 -msgid "" -"Missing required \"brand\" or \"part\" attribute, trying deprecated name." -msgstr "" -"Manca l'atribut requerit «brand» (marca) o «part» (model), s'intentarà amb el " -"nom desaconsellat." - -#: ../libglabels/xml-template.c:625 -msgid "Name attribute also missing." -msgstr "També manca l'atribut del nom." - -#: ../data/builder/merge-properties-dialog.glade.h:1 -msgid "Record selection/preview" -msgstr "Selecció de registres/previsualització" - -#: ../data/builder/merge-properties-dialog.glade.h:2 -msgid "Source" -msgstr "Font" - -#: ../data/builder/merge-properties-dialog.glade.h:3 -msgid "Format:" -msgstr "Format:" - -#: ../data/builder/merge-properties-dialog.glade.h:4 -msgid "Location:" -msgstr "Ubicació:" - -#: ../data/builder/merge-properties-dialog.glade.h:5 -msgid "Select all" -msgstr "Selecciona-ho tot" - -#: ../data/builder/merge-properties-dialog.glade.h:6 -msgid "Unselect all" -msgstr "No seleccionis res" - -#: ../data/builder/merge-properties-dialog.glade.h:7 -#: ../data/builder/object-editor.glade.h:39 -msgid "dialog1" -msgstr "dialog1" - -#: ../data/builder/new-label-dialog.glade.h:1 -msgid "Label orientation" -msgstr "Orientació de l'etiqueta" - -#: ../data/builder/new-label-dialog.glade.h:2 -msgid "Media type" -msgstr "Tipus de suport" - -#: ../data/builder/object-editor.glade.h:2 -#, no-c-format -msgid "%" -msgstr "%" - -#: ../data/builder/object-editor.glade.h:3 -msgid "00000000000 00000" -msgstr "00000000000 00000" - -#: ../data/builder/object-editor.glade.h:4 -msgid "Xxx object properties" -msgstr "" -"Propietats de l'objecte Xxx" - -#: ../data/builder/object-editor.glade.h:5 -#: ../data/builder/prefs-dialog.glade.h:7 -msgid "Alignment:" -msgstr "Alineació:" - -#: ../data/builder/object-editor.glade.h:6 -msgid "Allow merge to automatically shrink text" -msgstr "Permet que la fusió encongeixi el text automàticament" - -#: ../data/builder/object-editor.glade.h:7 -msgid "Angle:" -msgstr "Angle:" - -#: ../data/builder/object-editor.glade.h:8 -msgid "Checksum" -msgstr "Suma de verificació" - -#: ../data/builder/object-editor.glade.h:9 -#: ../data/builder/prefs-dialog.glade.h:8 -msgid "Color:" -msgstr "Color:" - -#: ../data/builder/object-editor.glade.h:11 -msgid "Enable shadow" -msgstr "Habilita l'ombra" - -#: ../data/builder/object-editor.glade.h:12 -msgid "Family:" -msgstr "Família:" - -#: ../data/builder/object-editor.glade.h:13 -msgid "File:" -msgstr "Fitxer:" - -#: ../data/builder/object-editor.glade.h:14 -msgid "Fill" -msgstr "Emplenat" - -#: ../data/builder/object-editor.glade.h:15 -#: ../data/builder/template-designer.glade.h:30 -msgid "Height:" -msgstr "Alçada:" - -#: ../data/builder/object-editor.glade.h:17 -msgid "Insert merge field" -msgstr "Inseriu el camp de fusió" - -#: ../data/builder/object-editor.glade.h:18 -msgid "Key:" -msgstr "Clau:" - -#: ../data/builder/object-editor.glade.h:19 -msgid "Length:" -msgstr "Llargada:" - -#: ../data/builder/object-editor.glade.h:21 -#: ../data/builder/prefs-dialog.glade.h:12 -msgid "Line Spacing:" -msgstr "Espaiat de línia:" - -#: ../data/builder/object-editor.glade.h:22 -msgid "Literal:" -msgstr "Literal:" - -#: ../data/builder/object-editor.glade.h:23 -msgid "Opacity:" -msgstr "Opacitat:" - -#: ../data/builder/object-editor.glade.h:24 -msgid "Position" -msgstr "Posició" - -#: ../data/builder/object-editor.glade.h:25 -msgid "Reset image size" -msgstr "Reinicialitza la mida de la imatge" - -#: ../data/builder/object-editor.glade.h:26 -msgid "Select A File" -msgstr "Seleccioneu un fitxer" - -#: ../data/builder/object-editor.glade.h:27 -msgid "Shadow" -msgstr "Ombra" - -#: ../data/builder/object-editor.glade.h:28 -msgid "Size" -msgstr "Mida" - -#: ../data/builder/object-editor.glade.h:29 -msgid "Size:" -msgstr "Mida:" - -#: ../data/builder/object-editor.glade.h:30 -msgid "Style" -msgstr "Estil" - -#: ../data/builder/object-editor.glade.h:31 -msgid "Style:" -msgstr "Estil:" - -#: ../data/builder/object-editor.glade.h:33 -#: ../data/builder/prefs-dialog.glade.h:20 -#: ../data/builder/template-designer.glade.h:61 -msgid "Width:" -msgstr "Amplada:" - -#: ../data/builder/object-editor.glade.h:34 -msgid "X Offset:" -msgstr "Desplaçament X:" - -#: ../data/builder/object-editor.glade.h:35 -msgid "X:" -msgstr "X:" - -#: ../data/builder/object-editor.glade.h:36 -msgid "Y Offset:" -msgstr "Desplaçament Y:" - -#: ../data/builder/object-editor.glade.h:37 -msgid "Y:" -msgstr "Y:" - -#: ../data/builder/object-editor.glade.h:38 -msgid "degrees" -msgstr "graus" - -#: ../data/builder/object-editor.glade.h:40 -msgid "digits:" -msgstr "dígits:" - -#: ../data/builder/object-editor.glade.h:41 -msgid "format:" -msgstr "format:" - -#: ../data/builder/prefs-dialog.glade.h:1 -msgid " " -msgstr " " - -#: ../data/builder/prefs-dialog.glade.h:2 -msgid "Default page size" -msgstr "Mida de pàgina predeterminada" - -#: ../data/builder/prefs-dialog.glade.h:3 -msgid "Fill" -msgstr "Emplenat" - -#: ../data/builder/prefs-dialog.glade.h:4 -msgid "Line" -msgstr "Línia" - -#: ../data/builder/prefs-dialog.glade.h:5 -msgid "Text" -msgstr "Text" - -#: ../data/builder/prefs-dialog.glade.h:6 -msgid "Units" -msgstr "Unitats" - -#: ../data/builder/prefs-dialog.glade.h:9 -msgid "Font:" -msgstr "Tipus de lletra" - -#: ../data/builder/prefs-dialog.glade.h:10 -msgid "ISO A4" -msgstr "A4 de l'ISO" - -#: ../data/builder/prefs-dialog.glade.h:11 -msgid "Inches" -msgstr "Polzades" - -#: ../data/builder/prefs-dialog.glade.h:13 -msgid "Locale" -msgstr "Localització" - -#: ../data/builder/prefs-dialog.glade.h:14 -msgid "Millimeters" -msgstr "Mil·límetres" - -#: ../data/builder/prefs-dialog.glade.h:15 -msgid "Object defaults" -msgstr "Valors predeterminats dels objectes" - -#: ../data/builder/prefs-dialog.glade.h:16 -msgid "Points" -msgstr "Punts" - -#: ../data/builder/prefs-dialog.glade.h:17 -msgid "Select default properties for new objects." -msgstr "Seleccioneu els valors predeterminats dels objectes nous" - -#: ../data/builder/prefs-dialog.glade.h:18 -msgid "Select locale specific behavior." -msgstr "Seleccioneu el comportament específic de la localització" - -#. Most popular (at top of list) -#: ../data/builder/prefs-dialog.glade.h:19 -#: ../data/templates/paper-sizes.xml.h:29 -msgid "US Letter" -msgstr "Carta EUA" - -#: ../data/builder/print-custom-widget.glade.h:1 -msgid "Options" -msgstr "Opcions" - -#: ../data/builder/print-custom-widget.glade.h:2 -msgid "Print control (Merge)" -msgstr "Control d'impressió (fusió)" - -#: ../data/builder/print-custom-widget.glade.h:3 -msgid "Print control (Simple)" -msgstr "Control d'impressió (simple)" - -#: ../data/builder/property-bar.glade.h:1 -msgid "Bold" -msgstr "Negreta" - -#: ../data/builder/property-bar.glade.h:2 -msgid "Center align" -msgstr "Alineació al centre" - -#: ../data/builder/property-bar.glade.h:4 -msgid "Font family" -msgstr "Família del tipus de lletra" - -#: ../data/builder/property-bar.glade.h:5 -msgid "Font size" -msgstr "Mida del tipus de lletra" - -#: ../data/builder/property-bar.glade.h:6 -msgid "Italic" -msgstr "Cursiva" - -#: ../data/builder/property-bar.glade.h:7 -msgid "Left align" -msgstr "Alineació a l'esquerra" - -#: ../data/builder/property-bar.glade.h:9 -msgid "Line width" -msgstr "Amplada de la línia" - -#: ../data/builder/property-bar.glade.h:10 -msgid "Right align" -msgstr "Alineació a la dreta" - -#: ../data/builder/property-bar.glade.h:11 -msgid "Text Color" -msgstr "Color del text" - -#: ../data/builder/template-designer.glade.h:1 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(p.ex. «Etiquetes de correu», «Targetes de visita», etc.)" - -#: ../data/builder/template-designer.glade.h:2 -msgid "(e.g., 8163A)" -msgstr "(p.ex. 8163A)" - -#: ../data/builder/template-designer.glade.h:3 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(p.ex. Avery, Acme, ...)" - -#: ../data/builder/template-designer.glade.h:4 -msgid "1. Outer radius:" -msgstr "1. Radi exterior:" - -#: ../data/builder/template-designer.glade.h:5 -msgid "1. Radius:" -msgstr "1. Radi:" - -#: ../data/builder/template-designer.glade.h:6 -msgid "1. Width:" -msgstr "1. Amplada:" - -#: ../data/builder/template-designer.glade.h:7 -msgid "2. Height:" -msgstr "2. Alçada:" - -#: ../data/builder/template-designer.glade.h:8 -msgid "2. Inner radius:" -msgstr "2. Radi interior:" - -#: ../data/builder/template-designer.glade.h:9 -msgid "2. Waste (overprint allowed):" -msgstr "2. Residu (es pot imprimir fora dels límits):" - -#: ../data/builder/template-designer.glade.h:10 -msgid "3. Clipping width:" -msgstr "3. Amplada de retallada:" - -#: ../data/builder/template-designer.glade.h:11 -msgid "3. Margin" -msgstr "3. Marge" - -#: ../data/builder/template-designer.glade.h:12 -msgid "3. Round (radius of corner):" -msgstr "3. Corba (radi de la cantonada):" - -#: ../data/builder/template-designer.glade.h:13 -msgid "4. Clipping height:" -msgstr "4. Alçada de retallada" - -#: ../data/builder/template-designer.glade.h:14 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "2. Residu horitz. (es pot imprimir fora dels límits):" - -#: ../data/builder/template-designer.glade.h:15 -msgid "5. Vert. waste (overprint allowed):" -msgstr "5. Residu vert. (es pot imprimir fora dels límits):" - -#: ../data/builder/template-designer.glade.h:16 -msgid "5. Waste (overprint allowed):" -msgstr "2. Residu (es pot imprimir fora dels límits):" - -#: ../data/builder/template-designer.glade.h:17 -msgid "6. Margin" -msgstr "6. Marge" - -#: ../data/builder/template-designer.glade.h:18 -msgid "Brand/Manufacturer:" -msgstr "Marca/fabricant:" - -#: ../data/builder/template-designer.glade.h:19 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD (també s'hi inclouen els CD de mida de targeta de crèdit)" - -#: ../data/builder/template-designer.glade.h:20 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"Enhorabona!\n" -"\n" -"Heu completat el dissenyador de plantilles del gLabels.\n" -"Si voleu acceptar i desar el vostre disseny, premeu «Aplica».\n" -"\n" -"En cas contrari, podeu fer clic a «Cancel·la» per a abandonar-lo \n" -"o a «Enrere» per a continuar-lo editant." - -#: ../data/builder/template-designer.glade.h:27 -msgid "Description:" -msgstr "Descripció:" - -#: ../data/builder/template-designer.glade.h:28 -msgid "Distance from left edge (x0):" -msgstr "Distància des de la vora esquerra (x0):" - -#: ../data/builder/template-designer.glade.h:29 -msgid "Distance from top edge (y0):" -msgstr "Distància des de la vora superior (y0):" - -#: ../data/builder/template-designer.glade.h:31 -msgid "Horizontal pitch (dx):" -msgstr "Separació horitzontal (dx):" - -#: ../data/builder/template-designer.glade.h:32 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" -"Quantes disposicions contindrà la vostra plantilla?\n" -"\n" -"Una disposició és un conjunt d'etiquetes o targetes que es poden disposar \n" -"en una graella simple. La majoria de les plantilles només necessiten una \n" -"disposició, com podeu veure en el primer exemple.\n" -"El segon exemple mostra en quins casos en calen dues." - -#: ../data/builder/template-designer.glade.h:37 -msgid "Layout #1" -msgstr "Disposició n. 1" - -#: ../data/builder/template-designer.glade.h:38 -msgid "Layout #2" -msgstr "Disposició n. 2" - -#: ../data/builder/template-designer.glade.h:39 -msgid "Number across (nx):" -msgstr "Nombre per amplada (nx):" - -#: ../data/builder/template-designer.glade.h:40 -msgid "Number down (ny):" -msgstr "Nombre per alçada (ny):" - -#: ../data/builder/template-designer.glade.h:41 -msgid "Number of layouts:" -msgstr "Nombre de disposicions:" - -#: ../data/builder/template-designer.glade.h:42 -#: ../data/builder/wdgt-media-select.glade.h:3 -msgid "Page size:" -msgstr "Mida de la pàgina:" - -#: ../data/builder/template-designer.glade.h:43 -msgid "Part #:" -msgstr "Núm. de model:" - -#: ../data/builder/template-designer.glade.h:44 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "" -"Introduïu la informació d'identificació següent sobre la papereria de la " -"plantilla." - -#: ../data/builder/template-designer.glade.h:45 -msgid "Please enter the following layout information." -msgstr "Introduïu la informació de disposició següent." - -#: ../data/builder/template-designer.glade.h:46 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "" -"Introduïu els paràmetres de mida següents d'una etiqueta única a la vostra " -"plantilla." - -#: ../data/builder/template-designer.glade.h:47 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" -"Introduïu els paràmetres de mida següents d'una etiqueta única o targeta a " -"la vostra plantilla" - -#: ../data/builder/template-designer.glade.h:48 -msgid "Please select the basic shape of the labels or cards." -msgstr "Seleccioneu la forma bàsica de les etiquetes o targetes." - -#: ../data/builder/template-designer.glade.h:49 -msgid "Please select the page size of the template stationery." -msgstr "Seleccioneu la mida de la pàgina de la papereria de la plantilla." - -#: ../data/builder/template-designer.glade.h:50 -msgid "Print test sheet" -msgstr "Imprimeix un full de mostra" - -#: ../data/builder/template-designer.glade.h:51 -msgid "Rectangular or square (can have rounded corners)" -msgstr "Rectangular o quadrada (pot tenir cantonades arrodonides)" - -#: ../data/builder/template-designer.glade.h:52 -msgid "Round" -msgstr "Circular" - -#: ../data/builder/template-designer.glade.h:53 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"Plantilles que requereixen\n" -"dues disposicions." - -#: ../data/builder/template-designer.glade.h:55 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"Plantilles que requereixen\n" -"una disposició." - -#: ../data/builder/template-designer.glade.h:57 -msgid "Vertical pitch (dy):" -msgstr "Separació vertical (dy):" - -#: ../data/builder/template-designer.glade.h:58 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"Us donem la benvinguda al dissenyador de plantilles del gLabels.\n" -"\n" -"Aquest diàleg us ajudarà a crear una plantilla personalitzada del \n" -"gLabels." - -#: ../data/builder/template-designer.glade.h:62 -msgid "cd_size_page" -msgstr "cd_size_page" - -#: ../data/builder/template-designer.glade.h:63 -msgid "finish_page" -msgstr "finish_page" - -#: ../data/builder/template-designer.glade.h:65 -msgid "layout_page" -msgstr "layout_page" - -#: ../data/builder/template-designer.glade.h:66 -msgid "name_page" -msgstr "name_page" - -#: ../data/builder/template-designer.glade.h:67 -msgid "nlayouts_page" -msgstr "nlayouts_page" - -#: ../data/builder/template-designer.glade.h:68 -msgid "pg_size_page" -msgstr "pg_size_page" - -#: ../data/builder/template-designer.glade.h:69 -msgid "rect_size_page" -msgstr "rect_size_page" - -#: ../data/builder/template-designer.glade.h:70 -msgid "round_size_page" -msgstr "round_size_page" - -#: ../data/builder/template-designer.glade.h:71 -msgid "shape_page" -msgstr "shape_page" - -#: ../data/builder/template-designer.glade.h:72 -msgid "start_page" -msgstr "start_page" - -#: ../data/builder/wdgt-media-select.glade.h:1 -msgid "Brand:" -msgstr "Marca:" - -#: ../data/builder/wdgt-media-select.glade.h:2 -msgid "Category:" -msgstr "Categoria:" - -#: ../data/builder/wdgt-media-select.glade.h:4 -msgid "Recent templates" -msgstr "Plantilles recents" - -#: ../data/builder/wdgt-media-select.glade.h:5 -msgid "Search all templates" -msgstr "Cerca totes les plantilles" - -#. Other ISO A series sizes -#: ../data/templates/paper-sizes.xml.h:2 -msgid "A0" -msgstr "A0" - -#: ../data/templates/paper-sizes.xml.h:3 -msgid "A1" -msgstr "A1" - -#: ../data/templates/paper-sizes.xml.h:4 -msgid "A10" -msgstr "A10" - -#: ../data/templates/paper-sizes.xml.h:5 -msgid "A2" -msgstr "A2" - -#: ../data/templates/paper-sizes.xml.h:6 -msgid "A3" -msgstr "A3" - -#: ../data/templates/paper-sizes.xml.h:7 -msgid "A4" -msgstr "A4" - -#: ../data/templates/paper-sizes.xml.h:8 -msgid "A5" -msgstr "A5" - -#: ../data/templates/paper-sizes.xml.h:9 -msgid "A6" -msgstr "A6" - -#: ../data/templates/paper-sizes.xml.h:10 -msgid "A7" -msgstr "A7" - -#: ../data/templates/paper-sizes.xml.h:11 -msgid "A8" -msgstr "A8" - -#: ../data/templates/paper-sizes.xml.h:12 -msgid "A9" -msgstr "A9" - -#. ISO B series sizes -#: ../data/templates/paper-sizes.xml.h:14 -msgid "B0" -msgstr "B0" - -#: ../data/templates/paper-sizes.xml.h:15 -msgid "B1" -msgstr "B1" - -#: ../data/templates/paper-sizes.xml.h:16 -msgid "B10" -msgstr "B10 " - -#: ../data/templates/paper-sizes.xml.h:17 -msgid "B2" -msgstr "B2" - -#: ../data/templates/paper-sizes.xml.h:18 -msgid "B3" -msgstr "B3" - -#: ../data/templates/paper-sizes.xml.h:19 -msgid "B4" -msgstr "B4" - -#: ../data/templates/paper-sizes.xml.h:20 -msgid "B5" -msgstr " " - -#: ../data/templates/paper-sizes.xml.h:21 -msgid "B6" -msgstr "B6 " - -#: ../data/templates/paper-sizes.xml.h:22 -msgid "B7" -msgstr "B7" - -#: ../data/templates/paper-sizes.xml.h:23 -msgid "B8" -msgstr "B8" - -#: ../data/templates/paper-sizes.xml.h:24 -msgid "B9" -msgstr "B9" - -#: ../data/templates/paper-sizes.xml.h:25 -msgid "US Executive" -msgstr "Executiu EUA" - -#. Other US paper sizes -#: ../data/templates/paper-sizes.xml.h:27 -msgid "US Legal" -msgstr "Legal EUA" - -#: ../data/templates/categories.xml.h:1 -msgid "Any card" -msgstr "Qualsevol targeta" - -#: ../data/templates/categories.xml.h:2 -msgid "Any label" -msgstr "Qualsevol etiqueta" - -#: ../data/templates/categories.xml.h:3 -msgid "Business cards" -msgstr "Targetes de visita" - -#: ../data/templates/categories.xml.h:4 -msgid "CD/DVD or other media" -msgstr "CD/DVD o un altre suport" - -#: ../data/templates/categories.xml.h:5 -msgid "Mailing/shipping products" -msgstr "Productes de correu/facturació" - -#: ../data/templates/categories.xml.h:6 -msgid "Rectangular labels" -msgstr "Etiquetes rectangulars" - -#: ../data/templates/categories.xml.h:7 -msgid "Round labels" -msgstr "Etiquetes arrodonides" - -#: ../data/templates/categories.xml.h:8 -msgid "Square labels" -msgstr "Etiquetes quadrades" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:2 -#: ../data/templates/avery-iso-templates.xml.h:2 -#: ../data/templates/dymo-other-templates.xml.h:4 -#: ../data/templates/misc-iso-templates.xml.h:2 -#: ../data/templates/zweckform-iso-templates.xml.h:2 -msgid "Address Labels" -msgstr "Etiquetes d'adreça" - -#. =================================================================== -#. ============================================================ -#. =================================================================== -#. ******************************************************************** -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:4 -#: ../data/templates/avery-iso-templates.xml.h:8 -#: ../data/templates/misc-us-templates.xml.h:4 -#: ../data/templates/misc-iso-templates.xml.h:12 -#: ../data/templates/zweckform-iso-templates.xml.h:6 -msgid "Business Cards" -msgstr "Targetes de visita" - -#. =================================================================== -#. =============================================================== -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:6 -#: ../data/templates/avery-iso-templates.xml.h:14 -#: ../data/templates/misc-us-templates.xml.h:8 -#: ../data/templates/misc-iso-templates.xml.h:16 -#: ../data/templates/zweckform-iso-templates.xml.h:8 -msgid "CD/DVD Labels" -msgstr "Etiquetes de CD/DVD" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:8 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "Etiquetes de CD/DVD (etiquetes del disc)" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:10 -msgid "CD/DVD Labels (Spine Labels)" -msgstr "Etiquetes de CD/DVD (etiquetes del llom)" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:12 -#: ../data/templates/avery-iso-templates.xml.h:16 -msgid "Diskette Labels" -msgstr "Etiquetes de disquet" - -#. the LSK labels can be torn in half down the center -#: ../data/templates/avery-us-templates.xml.h:14 -msgid "Divider Labels" -msgstr "Etiquetes divisòries" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:16 -msgid "Filing Labels" -msgstr "Etiquetes d'arxivador" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:18 -msgid "Full Sheet Labels" -msgstr "Etiquetes de full complet" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:20 -msgid "ID Labels" -msgstr "Etiquetes d'identificació" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:22 -msgid "Index Cards" -msgstr "Targetes d'índex" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:24 -msgid "Large Round Labels" -msgstr "Etiquetes rodones grans" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:26 -msgid "Name Badge Labels" -msgstr "Etiquetes d'acreditació" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:28 -msgid "Post cards" -msgstr "Postals" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:30 -#: ../data/templates/dymo-other-templates.xml.h:12 -msgid "Return Address Labels" -msgstr "Etiquetes d'adreça de retorn" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:32 -msgid "Round Labels" -msgstr "Etiquetes arroronides" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:34 -msgid "Shipping Labels" -msgstr "Etiquetes de facturació" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:36 -msgid "Small Round Labels" -msgstr "Etiquetes rodones petites" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:38 -msgid "Square Labels" -msgstr "Etiquetes quadrades" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:40 -msgid "Tent Cards" -msgstr "Targetes doblegades" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:42 -msgid "Video Tape Face Labels" -msgstr "Etiquetes de caràtula de cinta de vídeo" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:44 -msgid "Video Tape Spine Labels" -msgstr "Etiquetes de llom de cinta de vídeo" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:4 -msgid "Address labels" -msgstr "Etiquetes d'adreça" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:6 -msgid "Allround labels" -msgstr "Etiquetes d'ús general" - -#. =============================================================== -#: ../data/templates/avery-iso-templates.xml.h:10 -msgid "CD Booklet" -msgstr "Llibret de CD" - -#. =============================================================== -#: ../data/templates/avery-iso-templates.xml.h:12 -msgid "CD Inlet" -msgstr "Coberta interior de CD" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:18 -msgid "Diskette labels" -msgstr "Etiquetes de disquet" - -#. =============================================================== -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:20 -#: ../data/templates/misc-us-templates.xml.h:18 -#: ../data/templates/misc-iso-templates.xml.h:36 -#: ../data/templates/zweckform-iso-templates.xml.h:16 -msgid "Mailing Labels" -msgstr "Etiquetes de correu" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:22 -msgid "Mailing labels" -msgstr "Etiquetes de correu" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:24 -msgid "Mini Address Labels" -msgstr "Etiquetes d'adreça miniatura" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:26 -msgid "Shipping labels" -msgstr "Etiquetes de facturació" - -#. =================================================================== -#: ../data/templates/avery-other-templates.xml.h:2 -msgid "File Folder Labels" -msgstr "Etiquetes d'arxivador" - -#: ../data/templates/brother-other-templates.xml.h:1 -msgid "Multi Purpose Labels 17mm x 54mm" -msgstr "Etiquetes d'ús general 17 mm x 54 mm" - -#: ../data/templates/brother-other-templates.xml.h:2 -msgid "Shipping Labels 62mm x 100mm" -msgstr "Etiquetes de facturació 62 mm x 100 mm" - -#. -#. ********************************************************************* -#. ********************************************************************* -#. Labels for the Brother QL-500/550/650 PC Label Printers -#. -#. These templates work with the Brother Linux Printer CUPS Driver. It -#. is unknown if these work correctly with the foomatic print driver for -#. these printers. -#. -#. One difference from typical templates is that the template size is -#. not the actual media size - it is the size of the printable area, -#. which is smaller than the media size. This is because (at least with -#. the Brother driver) coordinates are relative the corner of this area. -#. -#. ********************************************************************* -#. ********************************************************************* -#. -#: ../data/templates/brother-other-templates.xml.h:20 -msgid "Standard Address Labels 29mm x 90mm" -msgstr "Etiquetes d'adreça estàndard 29 mm x 90 mm" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:2 -msgid "3.5in Diskette" -msgstr "Disquet de 3.5\\\"" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:6 -msgid "File Folder" -msgstr "Arxivador" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:8 -msgid "Hanging Folder" -msgstr "Carpeta penjant d'arxiu" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:10 -msgid "Large Address Labels" -msgstr "Etiquetes d'adreça grans" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:14 -msgid "Shipping Address Labels" -msgstr "Etiquetes d'adreça de facturació" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:2 -msgid "Business Card CD" -msgstr "CD de targeta de visita" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:6 -msgid "CD Template Rectangles" -msgstr "Rectangles de plantilla de CD" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:10 -msgid "CD/DVD Labels (Face Only)" -msgstr "Etiquetes de CD/DVD (només la caràtula)" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:12 -#: ../data/templates/misc-iso-templates.xml.h:18 -msgid "CD/DVD Labels (face only)" -msgstr "Etiquetes de CD/DVD (només la caràtula)" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:14 -msgid "Cassette Labels" -msgstr "Etiquetes de casset" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:16 -msgid "DLT Labels" -msgstr "Etiquetes per a cintes DLT" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:20 -msgid "Microtube labels" -msgstr "Etiquetes de microtubs" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:22 -msgid "Mini-CD Labels" -msgstr "Etiquetes de CD miniatura" - -#: ../data/templates/misc-us-templates.xml.h:23 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "Etiquetes PRO CD (2, només el llom)" - -#: ../data/templates/misc-us-templates.xml.h:24 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "Etiquetes PRO CD (2, només la caràtula)" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:26 -#: ../data/templates/misc-iso-templates.xml.h:42 -msgid "PRO CD Labels 2-up (face only)" -msgstr "Etiquetes PRO CD (2, només la caràtula)" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:28 -msgid "Slimline CD Case (rightside up)" -msgstr "Capsa de CD prima (cara amunt)" - -#: ../data/templates/misc-us-templates.xml.h:29 -msgid "Slimline CD Case (upside down)" -msgstr "Capsa de CD prima (cara avall)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:4 -#: ../data/templates/zweckform-iso-templates.xml.h:4 -msgid "Allround Labels" -msgstr "Etiquetes d'ús general" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:6 -msgid "Arch File Labels" -msgstr "Etiquetes d'arxivador" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:8 -msgid "Arch File Labels (large)" -msgstr "Etiquetes d'arxivador (grans)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:10 -msgid "Arch File Labels (small)" -msgstr "Etiquetes d'arxivador (petites)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:14 -msgid "CD Labels" -msgstr "Etiquetes de CD" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:20 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "Etiquetes CD/DVD amb format estàndard (només la caràtula)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:22 -msgid "Diskette Labels (face only)" -msgstr "Etiquetes de disquet (només la caràtula)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:24 -msgid "EPSON Photo Stickers 16" -msgstr "Fotografies adhesives d'EPSON (16)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:26 -msgid "Etiketten" -msgstr "Etiquetes" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:28 -msgid "Fridge Magnet Stickers" -msgstr "Enganxines d'imant de frigorífic" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:30 -msgid "General Labels" -msgstr "Etiquetes generals" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:32 -msgid "Inkjet/Laser Labels 70x37mm" -msgstr "Etiquetes per a impressió a raig de tinta/làser 70 x 37 mm" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:38 -msgid "Mailing Labels-2 columns" -msgstr "Etiquetes de correu - 2 columnes" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:40 -msgid "Mailing Labels-3 columns" -msgstr "Etiquetes de correu - 3 columnes" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:44 -#: ../data/templates/zweckform-iso-templates.xml.h:24 -msgid "Rectangular Labels" -msgstr "Etiquetes rectangulars" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:46 -msgid "Video Labels (face only)" -msgstr "Etiquetes de vídeo (només la caràtula)" - -#. =================================================================== -#: ../data/templates/misc-other-templates.xml.h:2 -msgid "Multi-Purpose Labels" -msgstr "Etiquetes d'ús general" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:10 -msgid "Correction and Cover-up Labels" -msgstr "Etiqueted de correcció i cobertura" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:12 -msgid "File Back Labels" -msgstr "Etiquetes de llom d'arxivador" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:14 -msgid "Lever Arch File Labels" -msgstr "Etiquetes d'arxivador" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:18 -msgid "Multi-purpose Stick+Lift Labels" -msgstr "Etiquetes d'ús general reenganxables «Stick+Lift»" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:20 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "Etiquetes de targeta QSL 70 mm x 50,8 mm" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:22 -msgid "Rectangular Copier Labels" -msgstr "Etiquetes de copiadora rectangulars" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:26 -msgid "Video Labels (back)" -msgstr "Etiquetes de vídeo (part posterior)" - -#: ../data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "Crea etiquetes, targetes de visita i caràtules de suports multimèdia" - -#: ../data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "Dissenyador d'etiquetes gLabels" - -#: ../data/mime/glabels.keys.in.h:1 ../data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "Fitxer de projecte del gLabels" - -#: ../barcode-0.98/compat/getopt.c:583 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "%s: l'opció «%s» és ambigua\n" - -#: ../barcode-0.98/compat/getopt.c:607 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "%s: l'opció «--%s» no admet cap argument\n" - -#: ../barcode-0.98/compat/getopt.c:612 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "%s: l'opció «%c%s» no permet cap argument\n" - -#: ../barcode-0.98/compat/getopt.c:629 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "%s: l'opció «%s» requereix un argumetn\n" - -#. --option -#: ../barcode-0.98/compat/getopt.c:658 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "%s: no es reconeix l'opció «--%s»\n" - -#. +option or -option -#: ../barcode-0.98/compat/getopt.c:662 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "%s: no es reconeix l'opció «%c%s»\n" - -#. 1003.2 specifies the format of this message. -#: ../barcode-0.98/compat/getopt.c:688 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "%s: l'opció --%c no és vàlida\n" - -#: ../barcode-0.98/compat/getopt.c:691 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "%s: l'opció --%c no és vàlida\n" - -#: ../barcode-0.98/compat/getopt.c:727 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: l'opció --%c requereix un argument\n" - - diff --git a/glabels2/po/cs.po b/glabels2/po/cs.po deleted file mode 100644 index 83b65caa..00000000 --- a/glabels2/po/cs.po +++ /dev/null @@ -1,2484 +0,0 @@ -# cs translation of Glabels. -# Copyright (C) 2005 THE Glabels'S COPYRIGHT HOLDER -# This file is distributed under the same license as the Glabels package. -# David Makovský (Yakeen) , 2005 -# Zbynek Mrkvicka , 2005 -# -msgid "" -msgstr "" -"Project-Id-Version: Glabels 2.0.2\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-01-22 11:49-0500\n" -"PO-Revision-Date: 2005-02-02 21:35+0100\n" -"Last-Translator: David Makovský (Yakeen) \n" -"Language-Team: cs \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit" - -#: src/glabels.c:116 -msgid "Could not initialize Bonobo!\n" -msgstr "Nepodařila se inicializace Bonobo serveru!\n" - -#: src/glabels-batch.c:52 -msgid "print this message" -msgstr "tisk této zprávy" - -#: src/glabels-batch.c:54 -msgid "print the version of glabels-batch being used" -msgstr "vypíše verzi glabels-batch, která je používána" - -#: src/glabels-batch.c:56 -msgid "set output filename (default=\"output.ps\")" -msgstr "nastavte jméno souboru výstupu (standartně=\"output.ps\")" - -#: src/glabels-batch.c:56 src/glabels-batch.c:70 -msgid "filename" -msgstr "název souboru" - -#: src/glabels-batch.c:58 -msgid "number of sheets (default=1)" -msgstr "počet stránek (standartně=1)" - -#: src/glabels-batch.c:58 -msgid "sheets" -msgstr "seÅ¡ity" - -#: src/glabels-batch.c:60 -msgid "number of copies (default=1)" -msgstr "počet kopií (standartní nastavení = 1)" - -#: src/glabels-batch.c:60 -msgid "copies" -msgstr "kopie" - -#: src/glabels-batch.c:62 -msgid "first label on first sheet (default=1)" -msgstr "první etiketa na prvním listu (standartně=1)" - -#: src/glabels-batch.c:62 -msgid "first" -msgstr "první" - -#: src/glabels-batch.c:64 src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "tisk obrysů (test zarovnávání tiskárny)" - -#: src/glabels-batch.c:66 src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "obrácený tisk (např. převrácený obrázek)" - -#: src/glabels-batch.c:68 src/print-dialog.c:351 -msgid "print crop marks" -msgstr "tisknout značky pro ořez" - -#: src/glabels-batch.c:70 -msgid "input file for merging" -msgstr "vstupní soubor pro sloučení" - -#: src/glabels-batch.c:107 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "" - -#: src/glabels-batch.c:127 -#, c-format -msgid "missing glabels file\n" -msgstr "chybí soubor programu glabels\n" - -#: src/glabels-batch.c:158 -#, c-format -msgid "cannot perform document merge with glabels file %s\n" -msgstr "" - -#: src/glabels-batch.c:182 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "nepodařilo se otevřít soubor programu glabels %s\n" - -#: src/window.c:244 -msgid "(none) - gLabels" -msgstr "(žádný) - gLabels" - -#: src/window.c:414 -msgid "(modified)" -msgstr "(modifikováno)" - -#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 -msgid "_Select Mode" -msgstr "Mód výběru" - -#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 -msgid "_Text" -msgstr "_Text" - -#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 -msgid "_Line" -msgstr "Čár_a" - -#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 -msgid "_Box" -msgstr "O_bdélník" - -#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 -msgid "_Ellipse" -msgstr "_Elipsa" - -#: src/stock.c:70 data/ui/glabels-ui.xml.h:146 -msgid "_Image" -msgstr "Obrá_zek" - -#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 -msgid "Bar_code" -msgstr "Čárový _kód" - -#: src/stock.c:72 -msgid "_Merge Properties" -msgstr "Vlastnosti sloučení" - -#: src/stock.c:73 -msgid "Object _Properties" -msgstr "Nastavení objektu" - -#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 -msgid "Bring to _Front" -msgstr "Vynést dopředu" - -#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 -msgid "Send to _Back" -msgstr "Poslat _dozadu" - -#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 -msgid "Rotate _Left" -msgstr "Otočit do_leva" - -#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 -msgid "Rotate _Right" -msgstr "Otočit do_prava" - -#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "Převrátit _vodorovně" - -#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "Převrátit _svisle" - -#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 -msgid "_Lefts" -msgstr "Nalevo" - -#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 -msgid "_Rights" -msgstr "Napravo" - -#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 -msgid "_Centers" -msgstr "_Nastřed" - -#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 -msgid "_Tops" -msgstr "Nahoru" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "Naspod" - -#: src/stock.c:85 -msgid "Centers" -msgstr "Nastřed" - -#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "Střed etikety" - -#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "Barva výplně" - -#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "Barva čáry" - -#: src/stock.c:90 src/stock.c:92 -msgid "Linked" -msgstr "Spojeno" - -#: src/stock.c:91 src/stock.c:93 -msgid "Not Linked" -msgstr "Nespojeno" - -#: src/ui-property-bar.c:345 src/object-editor.c:499 -msgid "Default" -msgstr "Výchozí" - -#: src/ui-property-bar.c:360 src/object-editor.c:512 -msgid "No fill" -msgstr "Bez výplně" - -#: src/ui-property-bar.c:375 src/object-editor.c:505 -msgid "No line" -msgstr "" - -#: src/ui-sidebar.c:180 -msgid "Object properties" -msgstr "Vlastnosti objektu" - -#: src/commands.c:385 -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 pro tvorbu etiket a vizitek v prostředí GNOME.\n" -" \n" -"Glabels je svobodný software, můžete s ním nakládat podle GPL licence verze " -"2, nebo jakoukoliv pozdější.\n" -" \n" -"Program je distribuován s nadějí, že bude nápomocen, ale je distribuován bez " -"ručení záruky, tak jak je uvedeno v GPL Licenci verze 2. Pro další detaily " -"si přečtěte tuto licenci.\n" - -#: src/commands.c:399 -msgid "See the file AUTHORS for additional credits," -msgstr "Prohlédněte si soubor AUTHORS pro dodatečné informace," - -#: src/commands.c:400 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "nebo navÅ¡tivte http://glabels.sourceforge.net/" - -#: src/commands.c:409 -msgid " " -msgstr "" - -#: src/commands.c:424 -msgid "glabels" -msgstr "glabels" - -#: src/file.c:100 -msgid "New Label or Card" -msgstr "Nová etiketa či vizitka" - -#: src/file.c:132 src/file.c:304 -msgid "Media Type" -msgstr "Typ média" - -#: src/file.c:138 src/file.c:310 -msgid "Label orientation" -msgstr "Orientace etikety" - -#: src/file.c:269 -msgid "Label properties" -msgstr "Vlastnosti etikety" - -#: src/file.c:452 src/file.c:870 -msgid "All files" -msgstr "VÅ¡echny soubory" - -#: src/file.c:457 src/file.c:875 -msgid "gLabels documents" -msgstr "Dokumenty gLabels" - -#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 -msgid "Empty file name selection" -msgstr "Prázdné pole jména souboru" - -#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 -msgid "Please select a file or supply a valid file name" -msgstr "Vyberte, prosím, soubor, nebo vypiÅ¡te platné jméno souboru" - -#: src/file.c:519 src/file.c:631 -msgid "File does not exist" -msgstr "Soubor neexistuje" - -#: src/file.c:563 data/ui/glabels-ui.xml.h:74 -msgid "Open" -msgstr "Otevřít" - -#: src/file.c:565 -msgid "Open label" -msgstr "Otevřít etiketu" - -#: src/file.c:707 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "nepodařilo se otevřít soubor \"%s\"" - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "Formát tohoto souboru není podporován" - -#: src/file.c:797 src/file.c:979 src/file.c:1174 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "Nepodařilo se uložit soubor \"%s\"" - -#: src/file.c:805 src/file.c:987 src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "Při ukládání se vyskytla chyba. Soubor nebyl uložen." - -#: src/file.c:848 src/file.c:1048 -#, c-format -msgid "Save \"%s\" as" -msgstr "Uložit \"%s\" jako" - -#: src/file.c:935 src/file.c:1131 -msgid "Please supply a valid file name" -msgstr "Prosím vepiÅ¡te platné jméno souboru" - -#: src/file.c:952 src/file.c:1147 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "Přepsat soubor \"%s\"?" - -#: src/file.c:960 src/file.c:1155 -msgid "File already exists." -msgstr "Soubor již existuje." - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "Uložit před zavřením změny v dokumentu \"%s\"?" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "VaÅ¡e změny budou ztraceny pokud je neuložíte." - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "Zavřít bez uložení" - -#. Should not happen -#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 -#: data/glade/object-editor.glade.h:37 -msgid "points" -msgstr "bodů" - -#: src/prefs.c:158 data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "palce" - -#: src/prefs.c:160 -msgid "mm" -msgstr "mm" - -#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 -msgid "gLabels Preferences" -msgstr "Nastavení programu gLabels" - -#. -#. * Submenu: Order -#. -#: src/view.c:3574 data/ui/glabels-ui.xml.h:154 -msgid "_Order" -msgstr "_Pořadí" - -#. -#. * Submenu: Rotate/Flip -#. -#: src/view.c:3595 data/ui/glabels-ui.xml.h:160 -msgid "_Rotate/Flip" -msgstr "_Rotace/Převrácení" - -#. -#. * Submenu: Align Horizontally -#. -#: src/view.c:3628 -msgid "Align _Horizontally" -msgstr "Zarovnat _vodorovně" - -#. -#. * Submenu: Align Vertically -#. -#: src/view.c:3667 -msgid "Align _Vertically" -msgstr "Zarovnat _svisle" - -#: src/view.c:3728 data/ui/glabels-ui.xml.h:137 -msgid "_Delete" -msgstr "_Smazat" - -#. Build editor. -#: src/view-box.c:224 -msgid "Box object properties" -msgstr "Vlastnosti obdélníku/čtverce" - -#. Build editor. -#: src/view-ellipse.c:224 -msgid "Ellipse object properties" -msgstr "Vlastnosti elipsy" - -#. Build editor. -#: src/view-line.c:224 -msgid "Line object properties" -msgstr "Vlastnosti čáry" - -#. Build editor. -#: src/view-image.c:223 -msgid "Image object properties" -msgstr "Vlastnosti obrázku" - -#. Build editor. -#: src/view-text.c:251 -msgid "Text object properties" -msgstr "Vlastnosti textu" - -#: src/view-text.c:563 data/glade/object-editor.glade.h:28 -msgid "Text" -msgstr "Text" - -#. Build editor. -#: src/view-barcode.c:210 -msgid "Barcode object properties" -msgstr "Vlastnosti čárového kódu" - -#: src/view-barcode.c:580 src/print.c:1089 -msgid "Invalid barcode data" -msgstr "Neplatná data čárového kódu" - -#: src/merge-properties-dialog.c:231 -msgid "Merge Properties" -msgstr "Nastavení sloučení" - -#. ---- Source section ---- -#: src/merge-properties-dialog.c:237 -msgid "Source" -msgstr "Zdroj" - -#: src/merge-properties-dialog.c:245 -msgid "Format:" -msgstr "Formát:" - -#. Location line -#: src/merge-properties-dialog.c:273 -msgid "Location:" -msgstr "Umístění:" - -#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 -msgid "Select merge-database source" -msgstr "Výběr databázového zdroje pro sloučení" - -#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 -msgid "N/A" -msgstr "Není k dispozici" - -#. ---- Sample Fields section ---- -#: src/merge-properties-dialog.c:300 -msgid "Record selection/preview:" -msgstr "Náhled na záznam výběru" - -#: src/merge-properties-dialog.c:326 -msgid "Select" -msgstr "Výběr" - -#: src/merge-properties-dialog.c:334 -msgid "Record/Field" -msgstr "Záznam/Pole" - -#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 -msgid "Data" -msgstr "Data" - -#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:81 -msgid "Print" -msgstr "Tisk" - -#: src/print-dialog.c:281 -msgid "_Job" -msgstr "Úloha" - -#: src/print-dialog.c:286 -msgid "P_rinter" -msgstr "_Tiskárna" - -#. ----------- Add simple-copies widget ------------ -#: src/print-dialog.c:314 -msgid "Copies" -msgstr "Kopie" - -#. ------- Add merge control widget ------------ -#: src/print-dialog.c:322 -msgid "Document merge control" -msgstr "Kontrola sloučení dokumentu" - -#. ----------- Add custom print options area ------------ -#: src/print-dialog.c:330 -msgid "Options" -msgstr "Možnosti" - -#: src/print-dialog.c:553 src/print-dialog.c:592 -msgid "Print preview" -msgstr "Náhled tisku" - -#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 -msgid "gLabels Template Designer" -msgstr "Návrhář Å¡ablon gLabels" - -#: src/bc.c:60 -msgid "POSTNET (any)" -msgstr "POSTNET (jakýkoli)" - -#: src/bc.c:63 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (pouze ZIP)" - -#: src/bc.c:66 -msgid "POSTNET-9 (ZIP+4)" -msgstr "" - -#: src/bc.c:69 -msgid "POSTNET-11 (DPBC)" -msgstr "" - -#: src/bc.c:72 -msgid "EAN (any)" -msgstr "EAN (jakýkoli)" - -#: src/bc.c:75 -msgid "EAN-8" -msgstr "" - -#: src/bc.c:78 -msgid "EAN-8 +2" -msgstr "" - -#: src/bc.c:81 -msgid "EAN-8 +5" -msgstr "" - -#: src/bc.c:84 -msgid "EAN-13" -msgstr "" - -#: src/bc.c:87 -msgid "EAN-13 +2" -msgstr "" - -#: src/bc.c:90 -msgid "EAN-13 +5" -msgstr "" - -#: src/bc.c:93 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A nebo UPC-E)" - -#: src/bc.c:96 -msgid "UPC-A" -msgstr "" - -#: src/bc.c:99 -msgid "UPC-A +2" -msgstr "" - -#: src/bc.c:102 -msgid "UPC-A +5" -msgstr "" - -#: src/bc.c:105 -msgid "UPC-E" -msgstr "" - -#: src/bc.c:108 -msgid "UPC-E +2" -msgstr "" - -#: src/bc.c:111 -msgid "UPC-E +5" -msgstr "" - -#: src/bc.c:114 -msgid "ISBN" -msgstr "" - -#: src/bc.c:117 -msgid "ISBN +5" -msgstr "" - -#: src/bc.c:120 -msgid "Code 39" -msgstr "" - -#: src/bc.c:123 -msgid "Code 128" -msgstr "" - -#: src/bc.c:126 -msgid "Code 128C" -msgstr "" - -#: src/bc.c:129 -msgid "Code 128B" -msgstr "" - -#: src/bc.c:132 -msgid "Interleaved 2 of 5" -msgstr "" - -#: src/bc.c:135 -msgid "Codabar" -msgstr "" - -#: src/bc.c:138 -msgid "MSI" -msgstr "" - -#: src/bc.c:141 -msgid "Plessey" -msgstr "" - -#: src/label.c:569 -msgid "Untitled" -msgstr "Nepojmenovaný" - -#: src/xml-label.c:176 src/xml-label.c:213 -msgid "xmlParseFile error" -msgstr "chyba (xmlParseFile)" - -#: src/xml-label.c:250 -msgid "No document root" -msgstr "" - -#: src/xml-label.c:264 -msgid "Importing from glabels 0.1 format" -msgstr "Importuji formát glabels verze 0.1" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "Importuji formát glabels verze 0.4" - -#: src/xml-label.c:279 -msgid "Importing from glabels 1.91 format" -msgstr "Importuji formát glabels verze 1.91" - -#: src/xml-label.c:282 -msgid "bad document, unknown glabels Namespace" -msgstr "" - -#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "" - -#: src/xml-label.c:348 src/xml-label-191.c:165 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "" - -#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "" - -#: src/xml-label.c:796 src/xml-label-191.c:605 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "" - -#: src/xml-label.c:962 libglabels/xml-template.c:535 -msgid "Utf8 conversion error." -msgstr "Chyba při konverzi UTF-8" - -#: src/xml-label.c:969 libglabels/xml-template.c:542 -msgid "Problem saving xml file." -msgstr "Problém s ukládáním dat do xml." - -#. This should always be an id, but just in case a name -#. slips by! -#: src/xml-label-191.c:680 libglabels/xml-template.c:199 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "" - -#: src/xml-label-191.c:690 libglabels/xml-template.c:209 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "" - -#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 -msgid "None" -msgstr "Žádný" - -#: src/merge-init.c:53 -msgid "Text file with comma delimeters (CSV)" -msgstr "Text se středníky jako oddělovači sloupců (CSV)" - -#: src/merge-init.c:60 -msgid "Text file with colon delimeters" -msgstr "Text s dvojtečkami jako oddělovači sloupců" - -#: src/merge-init.c:67 -msgid "Text file with tab delimeters" -msgstr "Text s tabulátory jako oddělovači sloupců" - -#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 -msgid "File:" -msgstr "Soubor:" - -#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 -msgid "Key:" -msgstr "Klíč:" - -#: src/wdgt-print-copies.c:179 -msgid "Sheets:" -msgstr "Stránky:" - -#: src/wdgt-print-copies.c:197 -msgid "Labels" -msgstr "Etikety" - -#: src/wdgt-print-copies.c:200 -msgid "from:" -msgstr "od:" - -#: src/wdgt-print-copies.c:207 -msgid "to:" -msgstr "komu:" - -#: src/wdgt-print-merge.c:178 -msgid "Start on label" -msgstr "Začít na etiketě" - -#: src/wdgt-print-merge.c:186 -msgid "on 1st sheet" -msgstr "na první stránce" - -#: src/wdgt-print-merge.c:195 -msgid "Copies:" -msgstr "Kopie:" - -#: src/wdgt-print-merge.c:201 -msgid "Collate" -msgstr "Shromáždit" - -#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 -msgid "Description:" -msgstr "Popis:" - -#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 -msgid "Page size:" -msgstr "Velikost stránky:" - -#: src/wdgt-media-select.c:290 -msgid "Label size:" -msgstr "Velikost etikety:" - -#: src/wdgt-media-select.c:301 -msgid "Layout:" -msgstr "Rozvržení:" - -#: src/wdgt-media-select.c:578 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d na stránku)" - -#: src/wdgt-media-select.c:582 -#, c-format -msgid "%d per sheet" -msgstr "%d na stránku" - -#: src/wdgt-media-select.c:614 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/wdgt-media-select.c:619 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s průměr" - -#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s průměr" - -#: src/wdgt-rotate-label.c:193 -msgid "Rotate" -msgstr "Rotovat" - -#. This is the default custom color -#: src/mygal/color-palette.c:396 -msgid "custom" -msgstr "vlastní" - -#. "Custom" color - we'll pop up a GnomeColorPicker -#: src/mygal/color-palette.c:438 -msgid "Custom Color:" -msgstr "Vlastní barva" - -#: src/mygal/color-palette.c:446 -msgid "Choose Custom Color" -msgstr "Vyberte vlastní barvu" - -#: src/mygal/color-palette.c:579 -msgid "black" -msgstr "černá" - -#: src/mygal/color-palette.c:580 -msgid "light brown" -msgstr "světle hnědá" - -#: src/mygal/color-palette.c:581 -msgid "brown gold" -msgstr "zlatohnědá" - -#: src/mygal/color-palette.c:582 -msgid "dark green #2" -msgstr "tmavě zelená #2" - -#: src/mygal/color-palette.c:583 -msgid "navy" -msgstr "námořnická modř" - -#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 -msgid "dark blue" -msgstr "tmavě modrá" - -#: src/mygal/color-palette.c:585 -msgid "purple #2" -msgstr "purpurová #2" - -#: src/mygal/color-palette.c:586 -msgid "very dark gray" -msgstr "velmi tmavě Å¡edá" - -#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 -msgid "dark red" -msgstr "tmavě červená" - -#: src/mygal/color-palette.c:590 -msgid "red-orange" -msgstr "červenooranžová" - -#: src/mygal/color-palette.c:591 -msgid "gold" -msgstr "zlatá" - -#: src/mygal/color-palette.c:592 -msgid "dark green" -msgstr "tmavě zelená" - -#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 -msgid "dull blue" -msgstr "mdlá modř" - -#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 -msgid "blue" -msgstr "modrá" - -#: src/mygal/color-palette.c:595 -msgid "dull purple" -msgstr "mdlý purpur" - -#: src/mygal/color-palette.c:596 -msgid "dark grey" -msgstr "tmavě Å¡edá" - -#: src/mygal/color-palette.c:599 -msgid "red" -msgstr "červená" - -#: src/mygal/color-palette.c:600 -msgid "orange" -msgstr "oranžová" - -#: src/mygal/color-palette.c:601 -msgid "lime" -msgstr "citrónová" - -#: src/mygal/color-palette.c:602 -msgid "dull green" -msgstr "mdlá zeleň" - -#: src/mygal/color-palette.c:603 -msgid "dull blue #2" -msgstr "mdlá modř #2" - -#: src/mygal/color-palette.c:604 -msgid "sky blue #2" -msgstr "nebeská modř #2" - -#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 -msgid "purple" -msgstr "purpurová" - -#: src/mygal/color-palette.c:606 -msgid "gray" -msgstr "Å¡edá" - -#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 -msgid "magenta" -msgstr "fialová" - -#: src/mygal/color-palette.c:610 -msgid "bright orange" -msgstr "jasně oranžová" - -#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 -msgid "yellow" -msgstr "žludá" - -#: src/mygal/color-palette.c:612 -msgid "green" -msgstr "zelená" - -#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 -msgid "cyan" -msgstr "azurová" - -#: src/mygal/color-palette.c:614 -msgid "bright blue" -msgstr "jasně modrá" - -#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 -msgid "red purple" -msgstr "červenofialová" - -#: src/mygal/color-palette.c:616 -msgid "light grey" -msgstr "světle Å¡edá" - -#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 -msgid "pink" -msgstr "růžová" - -#: src/mygal/color-palette.c:620 -msgid "light orange" -msgstr "světle oranžová" - -#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 -msgid "light yellow" -msgstr "světle žlutá" - -#: src/mygal/color-palette.c:622 -msgid "light green" -msgstr "světle zelená" - -#: src/mygal/color-palette.c:623 -msgid "light cyan" -msgstr "světle azurová" - -#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 -msgid "light blue" -msgstr "světle modrá" - -#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 -msgid "light purple" -msgstr "světle purpurová" - -#: src/mygal/color-palette.c:626 -msgid "white" -msgstr "bílá" - -#: src/mygal/color-palette.c:631 -msgid "purplish blue" -msgstr "fialovomodrá" - -#: src/mygal/color-palette.c:635 -msgid "dark purple" -msgstr "tmavě purpurová" - -#: src/mygal/color-palette.c:637 -msgid "sky blue" -msgstr "nebeská modř" - -#: libglabels/template.c:848 -#, c-format -msgid "Generic %s full page" -msgstr "" - -#: libglabels/template.c:897 -msgid "No template files found!" -msgstr "Nenalezeny Å¡ablony!" - -#. Create and append an "Other" entry. -#: libglabels/paper.c:67 -msgid "Other" -msgstr "Jiné" - -#: libglabels/paper.c:361 -msgid "No paper files found!" -msgstr "" - -#: data/ui/glabels-ui.xml.h:1 -msgid "About glabels" -msgstr "O programu glabels" - -#: data/ui/glabels-ui.xml.h:2 -msgid "About..." -msgstr "O programu" - -#: data/ui/glabels-ui.xml.h:3 -msgid "Align _Horizontal" -msgstr "Zarovnat _vodorovně" - -#: data/ui/glabels-ui.xml.h:4 -msgid "Align _Vertical" -msgstr "Zarovnat _svisle" - -#: data/ui/glabels-ui.xml.h:5 -msgid "Align objects to bottoms" -msgstr "Zarovnat objekty dolů" - -#: data/ui/glabels-ui.xml.h:6 -msgid "Align objects to horizontal centers" -msgstr "Zarovnat objekty vodorovně na střed" - -#: data/ui/glabels-ui.xml.h:7 -msgid "Align objects to left edges" -msgstr "Zarovnat objekty dle levého kraje" - -#: data/ui/glabels-ui.xml.h:8 -msgid "Align objects to right edges" -msgstr "Zarovnat objekty dle pravého kraje" - -#: data/ui/glabels-ui.xml.h:9 -msgid "Align objects to tops" -msgstr "Zarovnat objekty nahoru" - -#: data/ui/glabels-ui.xml.h:10 -msgid "Align objects to vertical centers" -msgstr "Zarovnat objekty svisle na střed" - -#: data/ui/glabels-ui.xml.h:12 -msgid "Bold" -msgstr "Tučně" - -#: data/ui/glabels-ui.xml.h:14 -msgid "Center align" -msgstr "Na střed" - -#: data/ui/glabels-ui.xml.h:15 -msgid "Center objects to horizontal label center" -msgstr "Vycentrovat objekty vodorovně na střed etikety" - -#: data/ui/glabels-ui.xml.h:16 -msgid "Center objects to vertical label center" -msgstr "Vycentrovat objekty svisle na střed etikety" - -#: data/ui/glabels-ui.xml.h:17 -msgid "Change the visibility of markup lines in the current window" -msgstr "Změnit viditelnost hraničních čar v okně" - -#: data/ui/glabels-ui.xml.h:18 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "Změnit viditelnost panelu kreslení v okně" - -#: data/ui/glabels-ui.xml.h:19 -msgid "Change the visibility of the grid in the current window" -msgstr "Změnit viditelnost mřížky v okně" - -#: data/ui/glabels-ui.xml.h:20 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "Změnit viditelnost hlavního panelu nástrojů v okně" - -#: data/ui/glabels-ui.xml.h:21 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "Změnit viditelnost panelu vlastností v okně" - -#: data/ui/glabels-ui.xml.h:22 -msgid "Close" -msgstr "Zavřít" - -#: data/ui/glabels-ui.xml.h:23 -msgid "Close the current file" -msgstr "Zavřít tento soubor" - -#: data/ui/glabels-ui.xml.h:24 -msgid "Configure the application" -msgstr "Konfigurovat aplikaci" - -#: data/ui/glabels-ui.xml.h:25 -msgid "Contents" -msgstr "Obsah" - -#: data/ui/glabels-ui.xml.h:26 -msgid "Copy" -msgstr "Kopírovat" - -#: data/ui/glabels-ui.xml.h:27 -msgid "Copy the selection" -msgstr "Kopírovat výběr" - -#: data/ui/glabels-ui.xml.h:28 -msgid "Create a custom template" -msgstr "Vytvořit vlastní Å¡ablonu" - -#: data/ui/glabels-ui.xml.h:29 -msgid "Create a new document" -msgstr "Vytvořit nový dokument" - -#: data/ui/glabels-ui.xml.h:30 -msgid "Create barcode object" -msgstr "Vložit čárový kód" - -#: data/ui/glabels-ui.xml.h:31 -msgid "Create box/rectangle object" -msgstr "Vytvořit čtverec/obdélník" - -#: data/ui/glabels-ui.xml.h:32 -msgid "Create ellipse/circle object" -msgstr "Vytvořit elipsu/kruh" - -#: data/ui/glabels-ui.xml.h:33 -msgid "Create image object" -msgstr "Vložit obrázek" - -#: data/ui/glabels-ui.xml.h:34 -msgid "Create line object" -msgstr "Vložit čáru" - -#: data/ui/glabels-ui.xml.h:35 -msgid "Create text object" -msgstr "Vložit text" - -#: data/ui/glabels-ui.xml.h:36 -msgid "Cu_t" -msgstr "_Vyjmout" - -#: data/ui/glabels-ui.xml.h:37 -msgid "Customize" -msgstr "Přizpůsobit" - -#: data/ui/glabels-ui.xml.h:38 -msgid "Customize Drawing Toolbar" -msgstr "Přizpůsobit panel kreslení" - -#: data/ui/glabels-ui.xml.h:39 -msgid "Customize Main Toolbar" -msgstr "Přizpůsobit hlavní panel" - -#: data/ui/glabels-ui.xml.h:40 -msgid "Customize Property Toolbar" -msgstr "Přizpůsobit panel vlastností" - -#: data/ui/glabels-ui.xml.h:41 -msgid "Customize toolbars" -msgstr "Přizpůsobit panely" - -#: data/ui/glabels-ui.xml.h:42 -msgid "Cut" -msgstr "Vyjmout" - -#: data/ui/glabels-ui.xml.h:43 -msgid "Cut the selection" -msgstr "Vyjmout výběr" - -#: data/ui/glabels-ui.xml.h:44 -msgid "Decrease magnification" -msgstr "ZmenÅ¡it" - -#: data/ui/glabels-ui.xml.h:45 -msgid "Delete" -msgstr "Smazat" - -#: data/ui/glabels-ui.xml.h:46 -msgid "Delete the selected objects" -msgstr "Smazat vybrané objekty" - -#: data/ui/glabels-ui.xml.h:47 -msgid "Drawing toolbar" -msgstr "Panl kreslení" - -#: data/ui/glabels-ui.xml.h:48 -msgid "Dump XML" -msgstr "Vypsat XML" - -#: data/ui/glabels-ui.xml.h:49 -msgid "Dump the UI Xml description" -msgstr "Vypsat popis UI v XML" - -#: data/ui/glabels-ui.xml.h:50 -msgid "Edit merge properties" -msgstr "Upravit vlastnosti sloučení" - -#: data/ui/glabels-ui.xml.h:54 -msgid "Flip object horizontally" -msgstr "Převrátit objekt vodorovně" - -#: data/ui/glabels-ui.xml.h:55 -msgid "Flip object vertically" -msgstr "Převrátit objekt svisle" - -#: data/ui/glabels-ui.xml.h:56 -msgid "Font name" -msgstr "Název fontu" - -#: data/ui/glabels-ui.xml.h:57 -msgid "Font selector" -msgstr "Výběr fontu" - -#: data/ui/glabels-ui.xml.h:58 -msgid "Font size" -msgstr "Velikost fontu" - -#: data/ui/glabels-ui.xml.h:59 -msgid "Icon and _Text" -msgstr "Ikony a text" - -#: data/ui/glabels-ui.xml.h:60 -msgid "Increase magnification" -msgstr "ZvětÅ¡it" - -#: data/ui/glabels-ui.xml.h:61 -msgid "Italic" -msgstr "Kurzíva" - -#: data/ui/glabels-ui.xml.h:63 -msgid "Left align" -msgstr "Nalevo" - -#: data/ui/glabels-ui.xml.h:65 -msgid "Line width" -msgstr "Šířka čáry" - -#: data/ui/glabels-ui.xml.h:66 -msgid "Lower object to bottom" -msgstr "Poslat objekt dozadu" - -#: data/ui/glabels-ui.xml.h:67 -msgid "M_arkup" -msgstr "Ohraničení" - -#: data/ui/glabels-ui.xml.h:68 -msgid "Main toolbar" -msgstr "Hlavní panel" - -#: data/ui/glabels-ui.xml.h:69 -msgid "Markup" -msgstr "Ohraničení" - -#: data/ui/glabels-ui.xml.h:70 -msgid "Modify document properties" -msgstr "Upravit vlastnosti dokumentu" - -#: data/ui/glabels-ui.xml.h:71 -msgid "New" -msgstr "Nový" - -#: data/ui/glabels-ui.xml.h:72 -msgid "Object property editor" -msgstr "Editor vlastností objektu" - -#: data/ui/glabels-ui.xml.h:73 -msgid "Only show icons in the main toolbar" -msgstr "Zobraz v hlavním panelu jen ikony" - -#: data/ui/glabels-ui.xml.h:75 -msgid "Open a file" -msgstr "Otevřít soubor" - -#: data/ui/glabels-ui.xml.h:76 -msgid "Open the glabels manual" -msgstr "Otevřít mauál programu" - -#: data/ui/glabels-ui.xml.h:77 -msgid "Paste" -msgstr "Vložit" - -#: data/ui/glabels-ui.xml.h:78 -msgid "Paste the clipboard" -msgstr "Vložit ze schránky" - -#: data/ui/glabels-ui.xml.h:79 -msgid "Pr_eferences..." -msgstr "_Nastavení" - -#: data/ui/glabels-ui.xml.h:80 -msgid "Preferences" -msgstr "Nastavení" - -#: data/ui/glabels-ui.xml.h:82 -msgid "Print the current file" -msgstr "Tisk tohoto souboru" - -#: data/ui/glabels-ui.xml.h:83 -msgid "Proper_ties..." -msgstr "Nas_tavení..." - -#: data/ui/glabels-ui.xml.h:84 -msgid "Properties" -msgstr "Nastavení" - -#: data/ui/glabels-ui.xml.h:85 -msgid "Property toolbar" -msgstr "Panel vlastností" - -#: data/ui/glabels-ui.xml.h:86 -msgid "Quit" -msgstr "Konec" - -#: data/ui/glabels-ui.xml.h:87 -msgid "Quit the program" -msgstr "Ukončit program" - -#: data/ui/glabels-ui.xml.h:88 -msgid "Raise object to top" -msgstr "Vynést objekt dopředu" - -#: data/ui/glabels-ui.xml.h:89 -msgid "Recent _Files" -msgstr "Otevřít nedávné" - -#: data/ui/glabels-ui.xml.h:90 -msgid "Redo" -msgstr "Znovu" - -#: data/ui/glabels-ui.xml.h:91 -msgid "Redo the undone action" -msgstr "Provést znovu vrácenou akci" - -#: data/ui/glabels-ui.xml.h:92 -msgid "Remove all selections" -msgstr "Odstranit vÅ¡echna označení" - -#: data/ui/glabels-ui.xml.h:94 -#, no-c-format -msgid "Restore scale to 100%" -msgstr "Vrátit měřítko na 100%" - -#: data/ui/glabels-ui.xml.h:95 -msgid "Right align" -msgstr "Napravo" - -#: data/ui/glabels-ui.xml.h:98 -msgid "Rotate object 90 clockwise" -msgstr "Otočit objekt o 90° po směru hodinových ručiček" - -#: data/ui/glabels-ui.xml.h:99 -msgid "Rotate object 90 counter-clockwise" -msgstr "Otočit objekt o 90° proti směru hodinových ručiček" - -#: data/ui/glabels-ui.xml.h:100 -msgid "Save" -msgstr "Uložit" - -#: data/ui/glabels-ui.xml.h:101 -msgid "Save As" -msgstr "Uložit jako" - -#: data/ui/glabels-ui.xml.h:102 -msgid "Save _As..." -msgstr "Uložit _jako..." - -#: data/ui/glabels-ui.xml.h:103 -msgid "Save the current file" -msgstr "Uložit tento soubor" - -#: data/ui/glabels-ui.xml.h:104 -msgid "Save the current file with a different name" -msgstr "Uložit tento soubor s jiným jménem" - -#: data/ui/glabels-ui.xml.h:105 -msgid "Select All" -msgstr "Vybrat vÅ¡e" - -#: data/ui/glabels-ui.xml.h:106 -msgid "Select _All" -msgstr "Vybr_at vÅ¡e" - -#: data/ui/glabels-ui.xml.h:107 -msgid "Select all objects" -msgstr "Vybrat vÅ¡echny objekty" - -#: data/ui/glabels-ui.xml.h:108 -msgid "Select, move and modify objects" -msgstr "Označení, posun a změna objektů" - -#: data/ui/glabels-ui.xml.h:110 -msgid "Set main toolbar button style according to desktop default" -msgstr "" -"Nastavit tlačítka na hlavním panelu stejně jako je základní nastavení " -"prostředí" - -#: data/ui/glabels-ui.xml.h:111 -msgid "Show _Tooltips" -msgstr "Ukazovat tipy" - -#: data/ui/glabels-ui.xml.h:112 -msgid "Show both icons and texts in the main toolbar" -msgstr "Zobrazit ikony a popisy v hlavní nástrojové liÅ¡tě" - -#: data/ui/glabels-ui.xml.h:113 -msgid "Show tooltips in the drawing toolbar" -msgstr "Ukazovat tipy v panelu kreslení" - -#: data/ui/glabels-ui.xml.h:114 -msgid "Show tooltips in the main toolbar" -msgstr "Ukazovat tipy v hlavním panelu" - -#: data/ui/glabels-ui.xml.h:115 -msgid "Show tooltips in the property toolbar" -msgstr "Ukazovat tipy v panelu vlastností" - -#: data/ui/glabels-ui.xml.h:116 -msgid "Template Designer" -msgstr "Návrhář Å¡ablon" - -#: data/ui/glabels-ui.xml.h:117 -msgid "Template _Designer..." -msgstr "Návrhář Å¡_ablon..." - -#: data/ui/glabels-ui.xml.h:118 -msgid "Text color" -msgstr "Barva textu" - -#: data/ui/glabels-ui.xml.h:119 -msgid "U_n-select All" -msgstr "Odz_načit vÅ¡e" - -#: data/ui/glabels-ui.xml.h:120 -msgid "Un-select All" -msgstr "Odznačit vÅ¡e" - -#: data/ui/glabels-ui.xml.h:121 -msgid "Undo" -msgstr "Zpět" - -#: data/ui/glabels-ui.xml.h:122 -msgid "Undo the last action" -msgstr "Vrátit o akci zpět" - -#: data/ui/glabels-ui.xml.h:123 -msgid "Zoom _1:1" -msgstr "ZvětÅ¡ení 1:1" - -#: data/ui/glabels-ui.xml.h:124 -msgid "Zoom _In" -msgstr "ZvětÅ¡it" - -#: data/ui/glabels-ui.xml.h:125 -msgid "Zoom _Out" -msgstr "ZmenÅ¡it" - -#: data/ui/glabels-ui.xml.h:126 -msgid "Zoom to _fit" -msgstr "Přizpůsobit velikosti" - -#: data/ui/glabels-ui.xml.h:127 -msgid "Zoom to fit window" -msgstr "Přizpůsobit velikosti okna" - -#: data/ui/glabels-ui.xml.h:128 -msgid "_About..." -msgstr "_O programu..." - -#: data/ui/glabels-ui.xml.h:129 -msgid "_Bottoms" -msgstr "Naspod" - -#: data/ui/glabels-ui.xml.h:132 -msgid "_Close" -msgstr "_Zavřít" - -#: data/ui/glabels-ui.xml.h:133 -msgid "_Contents" -msgstr "_Obsah" - -#: data/ui/glabels-ui.xml.h:134 -msgid "_Copy" -msgstr "_Kopírovat" - -#: data/ui/glabels-ui.xml.h:135 -msgid "_Create Object" -msgstr "_Vytvořit objekt" - -#: data/ui/glabels-ui.xml.h:136 -msgid "_Debug" -msgstr "_Debugování" - -#: data/ui/glabels-ui.xml.h:138 -msgid "_Desktop Default" -msgstr "Přednastavení prostředí" - -#: data/ui/glabels-ui.xml.h:139 -msgid "_Drawing Toolbar" -msgstr "Panel _kreslení" - -#: data/ui/glabels-ui.xml.h:140 -msgid "_Edit" -msgstr "_Upravit" - -#: data/ui/glabels-ui.xml.h:142 -msgid "_File" -msgstr "_Soubor" - -#: data/ui/glabels-ui.xml.h:143 -msgid "_Grid" -msgstr "_Mřížka" - -#: data/ui/glabels-ui.xml.h:144 -msgid "_Help" -msgstr "_Nápověda" - -#: data/ui/glabels-ui.xml.h:145 -msgid "_Icon" -msgstr "_Ikona" - -#: data/ui/glabels-ui.xml.h:149 -msgid "_Main Toolbar" -msgstr "_Hlavní panel" - -#: data/ui/glabels-ui.xml.h:150 -msgid "_Merge Properties..." -msgstr "Nastavení sloučení" - -#: data/ui/glabels-ui.xml.h:151 -msgid "_New" -msgstr "_Nový" - -#: data/ui/glabels-ui.xml.h:152 -msgid "_Objects" -msgstr "_Objekty" - -#: data/ui/glabels-ui.xml.h:153 -msgid "_Open..." -msgstr "_Otevřít" - -#: data/ui/glabels-ui.xml.h:155 -msgid "_Paste" -msgstr "Vl_ožit" - -#: data/ui/glabels-ui.xml.h:156 -msgid "_Print..." -msgstr "_Tisk..." - -#: data/ui/glabels-ui.xml.h:157 -msgid "_Property Toolbar" -msgstr "Panel _vlastností" - -#: data/ui/glabels-ui.xml.h:158 -msgid "_Quit" -msgstr "_Konec" - -#: data/ui/glabels-ui.xml.h:161 -msgid "_Save" -msgstr "_Uložit" - -#: data/ui/glabels-ui.xml.h:165 -msgid "_View" -msgstr "_Zobrazit" - -#: data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 -#: data/glade/template-designer.glade.h:5 -msgid "*" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:3 -msgid "Default page size" -msgstr "Výchozí velikost stránky" - -#: data/glade/prefs-dialog.glade.h:4 -msgid "Fill" -msgstr "Výplň" - -#: data/glade/prefs-dialog.glade.h:5 -msgid "Line" -msgstr "Čára" - -#: data/glade/prefs-dialog.glade.h:6 -msgid "Text" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:7 -msgid "Units" -msgstr "Jednotky" - -#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 -msgid "Alignment:" -msgstr "Zarovnání:" - -#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 -msgid "Color:" -msgstr "Barva:" - -#: data/glade/prefs-dialog.glade.h:10 -msgid "Font:" -msgstr "Font:" - -#: data/glade/prefs-dialog.glade.h:11 -msgid "ISO A4" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:12 -msgid "Inches" -msgstr "Palce" - -#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 -msgid "Line Spacing:" -msgstr "Řádkování:" - -#: data/glade/prefs-dialog.glade.h:14 -msgid "Locale" -msgstr "Místní zvyklosti" - -#: data/glade/prefs-dialog.glade.h:15 -msgid "Millimeters" -msgstr "Milimetry" - -#: data/glade/prefs-dialog.glade.h:16 -msgid "Object defaults" -msgstr "Výchozí hodnoty objektu" - -#: data/glade/prefs-dialog.glade.h:17 -msgid "Points" -msgstr "Body" - -#: data/glade/prefs-dialog.glade.h:18 -msgid "Select default properties for new objects." -msgstr "Vyberte výchozí nastavení pro nové objekty" - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "Zvolte specifické chování pro místní zvyklosti." - -#. Most popular (at top of list) -#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:29 -msgid "US Letter" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 -#: data/glade/template-designer.glade.h:72 -msgid "Width:" -msgstr "Šířka:" - -#: data/glade/object-editor.glade.h:2 -msgid "00000000000 00000" -msgstr "" - -#: data/glade/object-editor.glade.h:3 -msgid "Xxx object properties" -msgstr "Vlastnosti objektu xxx" - -#: data/glade/object-editor.glade.h:5 -msgid "Allow merge to automatically shrink text" -msgstr "Při sloučení povolit automatické smrÅ¡tění textu" - -#: data/glade/object-editor.glade.h:6 -msgid "Angle:" -msgstr "Úhel:" - -#: data/glade/object-editor.glade.h:7 -msgid "Checksum" -msgstr "Kontrolní součet" - -#: data/glade/object-editor.glade.h:10 -msgid "Family:" -msgstr "Rodina:" - -#: data/glade/object-editor.glade.h:12 -msgid "Fill" -msgstr "Výplň" - -#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 -msgid "Height:" -msgstr "Výška:" - -#: data/glade/object-editor.glade.h:14 -msgid "Image" -msgstr "Obrázek" - -#: data/glade/object-editor.glade.h:15 -msgid "Insert merge field" -msgstr "Vložit pole pro sloučení" - -#: data/glade/object-editor.glade.h:17 -msgid "Length:" -msgstr "Délka:" - -#: data/glade/object-editor.glade.h:18 -msgid "Line" -msgstr "Čára" - -#: data/glade/object-editor.glade.h:20 -msgid "Literal:" -msgstr "Písmena:" - -#: data/glade/object-editor.glade.h:21 -msgid "Load image" -msgstr "Načíst obrázek" - -#: data/glade/object-editor.glade.h:22 -msgid "Position" -msgstr "Pozice" - -#: data/glade/object-editor.glade.h:23 -msgid "Reset image size" -msgstr "Resetovat velikost obrázku" - -#: data/glade/object-editor.glade.h:24 -msgid "Size" -msgstr "Velikost" - -#: data/glade/object-editor.glade.h:25 -msgid "Size:" -msgstr "Velikost:" - -#: data/glade/object-editor.glade.h:26 -msgid "Style" -msgstr "Styl" - -#: data/glade/object-editor.glade.h:27 -msgid "Style:" -msgstr "Styl:" - -#: data/glade/object-editor.glade.h:30 -msgid "X:" -msgstr "X:" - -#: data/glade/object-editor.glade.h:31 -msgid "Y:" -msgstr "Y:" - -#: data/glade/object-editor.glade.h:32 -msgid "degrees" -msgstr "stupně" - -#: data/glade/object-editor.glade.h:33 -msgid "dialog1" -msgstr "" - -#: data/glade/object-editor.glade.h:34 -msgid "digits:" -msgstr "číslic:" - -#: data/glade/object-editor.glade.h:35 -msgid "format:" -msgstr "formát:" - -#: data/glade/template-designer.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/template-designer.glade.h:2 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(např. \"Adresní Å¡títky,\" \"Vizitky,\" ...)" - -#: data/glade/template-designer.glade.h:3 -msgid "(e.g., 8163A)" -msgstr "(např. 8163A)" - -#: data/glade/template-designer.glade.h:4 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(např. Avery, Acme, ...)" - -#: data/glade/template-designer.glade.h:6 -msgid "1. Outer radius:" -msgstr "1. Vnější poloměr:" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "1. Poloměr:" - -#: data/glade/template-designer.glade.h:8 -msgid "1. Width:" -msgstr "1. Šířka:" - -#: data/glade/template-designer.glade.h:9 -msgid "2. Height:" -msgstr "2. Výška:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "2. Vnitřní poloměr:" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "2. Odsazení (povolený přetisk):" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "3. Šířka výstřižku:" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "3. Okraj" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "3. Zaoblení (poloměr rohu):" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "4. Výška výstřižku:" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "4. Horizontální odsazení (povolený přetisk):" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "5. Vert. odsazení (povolený přetisk):" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "5. Odsazení (povolený přetisk):" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "6. Okraj" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "Značka/Výrobce:" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD (včetně vizitkových CD)" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"Gratulujeme!\n" -"\n" -"Dokončili jste návrh Å¡ablony gLabels.\n" -"Pokud si přejete návrh přijmout a uložit, klikněte na \"Použít\".\n" -"\n" -"Jinak klikněte na \"ZruÅ¡it\" pro zahození návrhu či na\n" -"\"Zpět\" pro další úpravy tohoto návrhu." - -#: data/glade/template-designer.glade.h:30 -msgid "Design Completed" -msgstr "Návrh byl dokončen" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "Vzdálenost od levého okraje (x0):" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "Vzdálenost od horního okraje (y0):" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "Vodorovná rozteč (dx):" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" -"Kolik rozvržení obsahuje vaÅ¡e Å¡ablona? \n" -"\n" -"Rozvržení je sada etiket nebo vizitek, které mohou být uspořádány na\n" -"jednoduché mřížce. VětÅ¡ina Å¡ablon potřebuje jedno rozvržení jako v\n" -"prvním příkladu. Druhý příklad ilustruje dvě rozvržení." - -#: data/glade/template-designer.glade.h:40 -msgid "Label Size (CD/DVD)" -msgstr "Velikost etikety (CD/DVD)" - -#: data/glade/template-designer.glade.h:41 -msgid "Label Size (Round)" -msgstr "Velikost etikety (oválná)" - -#: data/glade/template-designer.glade.h:42 -msgid "Label or Card Shape" -msgstr "Tvar etikety či vizitky" - -#: data/glade/template-designer.glade.h:43 -msgid "Label or Card Size (Rectangular)" -msgstr "Velikost etikety či vizitky (obdélníková)" - -#: data/glade/template-designer.glade.h:44 -msgid "Layout #1" -msgstr "Rozvržení #1" - -#: data/glade/template-designer.glade.h:45 -msgid "Layout #2" -msgstr "Rozvržení #2" - -#: data/glade/template-designer.glade.h:46 -msgid "Layout(s)" -msgstr "Rozvržení" - -#: data/glade/template-designer.glade.h:47 -msgid "Name and Description" -msgstr "Název a popis" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "Počet napříč (nx):" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "Počet dolů (ny):" - -#: data/glade/template-designer.glade.h:50 -msgid "Number of Layouts" -msgstr "Počet rozvržení" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "Počet rozvržení:" - -#: data/glade/template-designer.glade.h:52 -msgid "Page Size" -msgstr "Velikost stránky" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "Část #:" - -#: data/glade/template-designer.glade.h:55 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "" -"Vyplňte, prosím, následující informace o Å¡abloně." - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "Vyplňte, prosím, následující informaci o rozvržení." - -#: data/glade/template-designer.glade.h:57 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "" -"Vyplňte, prosím, následující parametry velikosti jedné etikety ve " -"vaší Å¡abloně." - -#: data/glade/template-designer.glade.h:58 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" -"Vyplňte, prosím, následující parametry velikosti jedné etikety nebo vizitky ve " -"vaší Å¡abloně." - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "Vyberte, prosím, základní tvar etiket nebo vizitek." - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "Vyberte, prosím, velikost stránky Å¡ablony." - -#: data/glade/template-designer.glade.h:61 -msgid "Print test sheet" -msgstr "Vytisknout testovací stránku" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "Obdélníkový nebo čtvercový (může mít zaoblené rohy)" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "Oválný" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"Å ablony, které potřebují\n" -"dvě rozvržení." - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"Å ablony, které potřebují\n" -"jedno rozvržení." - -#: data/glade/template-designer.glade.h:68 -msgid "Vertical pitch (dy):" -msgstr "Svislá rozteč (dy):" - -#: data/glade/template-designer.glade.h:69 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"Vítejte v Návrháři Å¡ablon programu gLabels.\n" -"\n" -"Tento dialog vám pomůže při vytváření vlastní Å¡ablony gLabels." - -#. Other ISO A series sizes -#: data/templates/paper-sizes.xml.h:2 -msgid "A0" -msgstr "" - -#: data/templates/paper-sizes.xml.h:3 -msgid "A1" -msgstr "" - -#: data/templates/paper-sizes.xml.h:4 -msgid "A10" -msgstr "" - -#: data/templates/paper-sizes.xml.h:5 -msgid "A2" -msgstr "" - -#: data/templates/paper-sizes.xml.h:6 -msgid "A3" -msgstr "" - -#: data/templates/paper-sizes.xml.h:7 -msgid "A4" -msgstr "" - -#: data/templates/paper-sizes.xml.h:8 -msgid "A5" -msgstr "" - -#: data/templates/paper-sizes.xml.h:9 -msgid "A6" -msgstr "" - -#: data/templates/paper-sizes.xml.h:10 -msgid "A7" -msgstr "" - -#: data/templates/paper-sizes.xml.h:11 -msgid "A8" -msgstr "" - -#: data/templates/paper-sizes.xml.h:12 -msgid "A9" -msgstr "" - -#. ISO B series sizes -#: data/templates/paper-sizes.xml.h:14 -msgid "B0" -msgstr "" - -#: data/templates/paper-sizes.xml.h:15 -msgid "B1" -msgstr "" - -#: data/templates/paper-sizes.xml.h:16 -msgid "B10" -msgstr "" - -#: data/templates/paper-sizes.xml.h:17 -msgid "B2" -msgstr "" - -#: data/templates/paper-sizes.xml.h:18 -msgid "B3" -msgstr "" - -#: data/templates/paper-sizes.xml.h:19 -msgid "B4" -msgstr "" - -#: data/templates/paper-sizes.xml.h:20 -msgid "B5" -msgstr "" - -#: data/templates/paper-sizes.xml.h:21 -msgid "B6" -msgstr "" - -#: data/templates/paper-sizes.xml.h:22 -msgid "B7" -msgstr "" - -#: data/templates/paper-sizes.xml.h:23 -msgid "B8" -msgstr "" - -#: data/templates/paper-sizes.xml.h:24 -msgid "B9" -msgstr "" - -#: data/templates/paper-sizes.xml.h:25 -msgid "US Executive" -msgstr "" - -#. Other US paper sizes -#: data/templates/paper-sizes.xml.h:27 -msgid "US Legal" -msgstr "" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:2 -#: data/templates/zweckform-iso-templates.xml.h:2 -msgid "Address Labels" -msgstr "Adresní etikety" - -#. =================================================================== -#. ============================================================ -#. =================================================================== -#. ====================================================== -#: data/templates/avery-us-templates.xml.h:4 -#: data/templates/avery-iso-templates.xml.h:4 -#: data/templates/zweckform-iso-templates.xml.h:6 -#: data/templates/misc-us-templates.xml.h:3 -#: data/templates/misc-iso-templates.xml.h:17 -msgid "Business Cards" -msgstr "Vizitky" - -#: data/templates/avery-us-templates.xml.h:5 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:7 -msgid "Diskette Labels" -msgstr "Disketové etikety" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:9 -msgid "Filing Labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:11 -msgid "Full Sheet Labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:13 -msgid "Large Round Labels" -msgstr "Velké oválné etikety" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:15 -msgid "Name Badge Labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:17 -msgid "Return Address Labels" -msgstr "Zpáteční adresa" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:19 -msgid "Shipping Labels" -msgstr "Dopravní etikety" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:21 -msgid "Small Round Labels" -msgstr "Malé oválné etikety" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:23 -msgid "Square Labels" -msgstr "Čtvercové etikety" - -#: data/templates/avery-us-templates.xml.h:24 -msgid "Video Tape Face Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:25 -msgid "Video Tape Spine Labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:2 -msgid "Address labels" -msgstr "Adresní etikety" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:6 -msgid "CD Booklet" -msgstr "" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:8 -msgid "CD Inlet" -msgstr "" - -#. =============================================================== -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:10 -#: data/templates/zweckform-iso-templates.xml.h:8 -#: data/templates/misc-us-templates.xml.h:5 -#: data/templates/misc-iso-templates.xml.h:21 -msgid "CD/DVD Labels" -msgstr "CD/DVD etikety" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:12 -msgid "Diskette labels" -msgstr "Disketové etikety" - -#. =============================================================== -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:14 -#: data/templates/zweckform-iso-templates.xml.h:14 -#: data/templates/misc-iso-templates.xml.h:35 -msgid "Mailing Labels" -msgstr "PoÅ¡tovní etikety" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:16 -msgid "Mailing labels" -msgstr "PoÅ¡tovní etikety" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:18 -msgid "Mini Address Labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:20 -msgid "Shipping labels" -msgstr "Dopravní etikety" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:4 -msgid "Allround Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:10 -msgid "Correction and Cover-up Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:12 -msgid "Lever Arch File Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:16 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:18 -msgid "Rectangular Copier Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:20 -#: data/templates/misc-iso-templates.xml.h:44 -msgid "Rectangular Labels" -msgstr "Obdélníkové etikety" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:22 -msgid "Video Labels (back)" -msgstr "Video etikety (zadní strana)" - -#: data/templates/misc-us-templates.xml.h:1 -msgid "Business Card CD" -msgstr "Vizitkové CD" - -#: data/templates/misc-us-templates.xml.h:4 -msgid "CD Template Rectangles" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:6 -msgid "CD/DVD Labels (Face Only)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:23 -msgid "CD/DVD Labels (face only)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:9 -msgid "Cassette Labels" -msgstr "Kazetové etikety" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:11 -msgid "DLT Labels" -msgstr "DLT etikety" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:13 -msgid "Microtube labels" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Mini-CD Labels" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:15 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:16 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:17 -#: data/templates/misc-iso-templates.xml.h:42 -msgid "PRO CD Labels 2-up (face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:18 -msgid "Slimline CD Case (rightside up)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:19 -msgid "Slimline CD Case (upside down)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:1 -msgid "Agipa 119488: Business Cards" -msgstr "Agipa 119488: Vizitky" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:3 -msgid "Allround Labels --24" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:5 -msgid "Allround Labels --44" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:7 -msgid "Allround Labels --64" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:9 -msgid "Allround Labels --65" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:11 -msgid "Arch File Labels" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Arch File Labels (large)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Arch File Labels (small)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:19 -msgid "CD Labels" -msgstr "CD etikety" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:25 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:27 -msgid "Diskette Labels (face only)" -msgstr "Disketové etikety (pouze předek)" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:29 -msgid "EPSON Photo Stickers 16" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:31 -msgid "Etiketten" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:33 -msgid "Fridge Magnet Stickers" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:37 -msgid "Mailing Labels --14" -msgstr "PoÅ¡tovní etikety --14" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:39 -msgid "Mailing Labels-2 columns" -msgstr "PoÅ¡tovní etikety-2 sloupce" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:41 -msgid "Mailing Labels-3 columns" -msgstr "PoÅ¡tovní etikety-3 sloupce" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:46 -msgid "Video Labels (face only)" -msgstr "Video etikety (pouze předek)" - -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "Vytvářejte etikety, vizitky a obaly médií" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "Návrhář etiket gLabels" - -#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "" - -#~ msgid "Only show icons in the drawing toolbar" -#~ msgstr "Zobrazv panelu kreslení jen ikony " - -#~ msgid "Set drawing toolbar button style according to desktop default" -#~ msgstr "" -#~ "Nastavit tlačítka na panelu kreslení stejně jako je základní nastavení " -#~ "prostředí" - -#, fuzzy -#~ msgid "Show both icons and texts in the drawing toolbar" -#~ msgstr "Ukazovat tipy v panelu kreslení" - -#~ msgid "Object _Properties..." -#~ msgstr "Možnosti objektu" - -#~ msgid "Display units" -#~ msgstr "Jednotky zobrazení" - -#~ msgid "Default page size" -#~ msgstr "Standartní velikost stránky" - -#~ msgid "Outline" -#~ msgstr "Obrys" - -#~ msgid "Edit line object properties" -#~ msgstr "Editace nastavení objektu řádky" - -#~ msgid "Edit text object properties" -#~ msgstr "Editace nastavení objektu text" - -#~ msgid "Edit text:" -#~ msgstr "Editace textu:" - -#~ msgid "Maintain current aspect ratio" -#~ msgstr "Udržet současný poměr stran" - -#~ msgid "Open %s" -#~ msgstr "Otevřít %s" diff --git a/glabels2/po/de.po b/glabels2/po/de.po deleted file mode 100644 index fb56d5df..00000000 --- a/glabels2/po/de.po +++ /dev/null @@ -1,2692 +0,0 @@ -# German translation of glabels. -# Copyright (C) 2001-2008 Jim Evins -# Marcus Bauer , 2001. -# Christian Neumair , 2002. -# Mario Blättermann , 2008, 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels HEAD\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-09-20 18:07+0200\n" -"PO-Revision-Date: 2009-09-20 18:09+0100\n" -"Last-Translator: Mario Blättermann \n" -"Language-Team: German \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../src/glabels.c:62 ../src/glabels-batch.c:67 -msgid "[FILE...]" -msgstr "[DATEI...]" - -#: ../src/glabels.c:79 -msgid "Launch gLabels label and business card designer." -msgstr "gLabels Etiketten- und Visitenkarten-Designer ausführen." - -#: ../src/glabels.c:87 ../src/glabels-batch.c:104 -#, c-format -msgid "" -"%s\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" -"%s\n" -"Rufen Sie %s --help« auf, um eine vollständige Liste der verfügbaren " -"Befehlszeilenoptionen zu sehen.\n" - -#: ../src/glabels-batch.c:51 -msgid "set output filename (default=\"output.pdf\")" -msgstr "Ausgabe-Dateiname festlegen (Vorgabe: »output.pdf«)" - -#: ../src/glabels-batch.c:51 ../src/glabels-batch.c:65 -msgid "filename" -msgstr "Dateiname" - -#: ../src/glabels-batch.c:53 -msgid "number of sheets (default=1)" -msgstr "Anzahl der Blätter (Vorgabe: 1)" - -#: ../src/glabels-batch.c:53 -msgid "sheets" -msgstr "Blätter" - -#: ../src/glabels-batch.c:55 -msgid "number of copies (default=1)" -msgstr "Anzahl der Kopien (Vorgabe: 1)" - -#: ../src/glabels-batch.c:55 -msgid "copies" -msgstr "Kopien" - -#: ../src/glabels-batch.c:57 -msgid "first label on first sheet (default=1)" -msgstr "Erstes Etikett auf dem ersten Blatt (Vorgabe: 1)" - -#: ../src/glabels-batch.c:57 -msgid "first" -msgstr "Erste" - -#: ../src/glabels-batch.c:59 -#: ../data/builder/print-op-dialog-custom-widget.builder.h:13 -msgid "print outlines (to test printer alignment)" -msgstr "Begrenzungen drucken (um Druckausrichtung zu testen)" - -#: ../src/glabels-batch.c:61 -#: ../data/builder/print-op-dialog-custom-widget.builder.h:12 -msgid "print in reverse (i.e. a mirror image)" -msgstr "Spiegelbildlich drucken" - -#: ../src/glabels-batch.c:63 -#: ../data/builder/print-op-dialog-custom-widget.builder.h:11 -msgid "print crop marks" -msgstr "Schnittmarken drucken" - -#: ../src/glabels-batch.c:65 -msgid "input file for merging" -msgstr "Eingabedatei zum Mischen" - -#: ../src/glabels-batch.c:96 -msgid "Print files created with gLabels." -msgstr "Mit gLabels erstellte Dateien drucken." - -#: ../src/glabels-batch.c:146 -#, c-format -msgid "cannot perform document merge with glabels file %s\n" -msgstr "" -"Dokumentverarbeitung kann mit gLabels-Datei %s nicht ausgeführt werden\n" - -#: ../src/glabels-batch.c:180 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "glabels-Datei %s kann nicht geöffnet werden\n" - -#: ../src/window.c:256 -msgid "(none) - gLabels" -msgstr "(Unbenannt) - gLabels" - -#: ../src/window.c:435 -msgid "(modified)" -msgstr "(geändert)" - -#: ../src/stock.c:70 -msgid "_Select Mode" -msgstr "Modus au_swählen" - -#: ../src/stock.c:71 -msgid "_Text" -msgstr "_Text" - -#: ../src/stock.c:72 -msgid "_Line" -msgstr "_Linie" - -#: ../src/stock.c:73 -msgid "_Box" -msgstr "_Rechteck" - -#: ../src/stock.c:74 -msgid "_Ellipse" -msgstr "_Ellipse" - -#: ../src/stock.c:75 -msgid "_Image" -msgstr "B_ild" - -#: ../src/stock.c:76 -msgid "Bar_code" -msgstr "Strich_code" - -#: ../src/stock.c:77 -msgid "_Merge Properties" -msgstr "_Mischeinstellungen" - -#: ../src/stock.c:78 -msgid "Object _Properties" -msgstr "Objektei_genschaften" - -#: ../src/stock.c:79 -msgid "Bring to _Front" -msgstr "Ganz nach _vorn" - -#: ../src/stock.c:80 -msgid "Send to _Back" -msgstr "Ganz nach _hinten" - -#: ../src/stock.c:81 -msgid "Rotate _Left" -msgstr "_Links drehen" - -#: ../src/stock.c:82 -msgid "Rotate _Right" -msgstr "_Rechts drehen" - -#: ../src/stock.c:83 -msgid "Flip _Horizontally" -msgstr "_Horizontal spiegeln" - -#: ../src/stock.c:84 -msgid "Flip _Vertically" -msgstr "_Vertikal spiegeln" - -#: ../src/stock.c:85 -msgid "_Lefts" -msgstr "_Links" - -#: ../src/stock.c:86 -msgid "_Rights" -msgstr "_Rechts" - -#: ../src/stock.c:87 -msgid "_Centers" -msgstr "_Mitte" - -#: ../src/stock.c:88 -msgid "_Tops" -msgstr "_Oben" - -#: ../src/stock.c:89 -msgid "Bottoms" -msgstr "Unten" - -#: ../src/stock.c:90 -msgid "Centers" -msgstr "Mitte" - -#: ../src/stock.c:91 ../src/stock.c:92 -msgid "Label Ce_nter" -msgstr "Etikett ze_ntrieren" - -#: ../src/stock.c:93 ../data/builder/property-bar.builder.h:3 -msgid "Fill color" -msgstr "Füllfarbe" - -#: ../src/stock.c:94 ../data/builder/property-bar.builder.h:7 -msgid "Line color" -msgstr "Linienfarbe" - -#: ../src/stock.c:95 ../src/stock.c:97 -msgid "Linked" -msgstr "Verknüpft" - -#: ../src/stock.c:96 ../src/stock.c:98 -msgid "Not Linked" -msgstr "Nicht verknüpft" - -#. Menu entries. -#: ../src/ui.c:88 -msgid "_File" -msgstr "_Datei" - -#: ../src/ui.c:89 -msgid "Open Recent _Files" -msgstr "_Zuletzt geöffnete Dateien" - -#: ../src/ui.c:90 -msgid "_Edit" -msgstr "_Bearbeiten" - -#: ../src/ui.c:91 -msgid "_View" -msgstr "_Ansicht" - -#: ../src/ui.c:92 -msgid "Customize Main Toolbar" -msgstr "Werkzeugleiste anpassen" - -#: ../src/ui.c:93 -msgid "Customize Drawing Toolbar" -msgstr "Zeichenwerkzeugleiste anpassen" - -#: ../src/ui.c:94 -msgid "Customize Properties Toolbar" -msgstr "Eigenschaften-Werkzeugleiste anpassen" - -#: ../src/ui.c:95 -msgid "_Objects" -msgstr "_Objekte" - -#: ../src/ui.c:96 -msgid "_Create" -msgstr "_Erzeugen" - -#: ../src/ui.c:97 -msgid "_Order" -msgstr "_Anordnung" - -#: ../src/ui.c:98 -msgid "_Rotate/Flip" -msgstr "D_rehen/Spiegeln" - -#: ../src/ui.c:99 -msgid "Align _Horizontal" -msgstr "_Horizontal" - -#: ../src/ui.c:100 -msgid "Align _Vertical" -msgstr "_Vertikal" - -#: ../src/ui.c:101 -msgid "_Help" -msgstr "_Hilfe" - -#. Popup entries. -#: ../src/ui.c:104 ../src/ui.c:105 -msgid "Context Menu" -msgstr "Kontextmenü" - -#: ../src/ui.c:110 -msgid "_New" -msgstr "_Neu" - -#: ../src/ui.c:112 -msgid "Create a new file" -msgstr "Eine neue Datei erstellen" - -#: ../src/ui.c:117 -msgid "_Open..." -msgstr "Ö_ffnen …" - -#: ../src/ui.c:119 -msgid "Open a file" -msgstr "Eine Datei öffnen" - -#: ../src/ui.c:124 -msgid "_Save" -msgstr "_Speichern" - -#: ../src/ui.c:126 -msgid "Save current file" -msgstr "Die aktuelle Datei speichern" - -#: ../src/ui.c:131 -msgid "Save _As..." -msgstr "Speichern _unter …" - -#: ../src/ui.c:133 -msgid "Save the current file to a different name" -msgstr "Die aktuelle Datei unter einem anderen Dateinamen speichern" - -#: ../src/ui.c:138 -msgid "_Print..." -msgstr "_Drucken …" - -#: ../src/ui.c:140 -msgid "Print the current file" -msgstr "Die aktuelle Datei drucken" - -#: ../src/ui.c:145 -msgid "Properties..." -msgstr "Einstellungen …" - -#: ../src/ui.c:147 -msgid "Modify document properties" -msgstr "Dokumenteigenschaften ändern" - -#: ../src/ui.c:152 -msgid "Template _Designer..." -msgstr "Vorlagen-_Designer …" - -#: ../src/ui.c:154 -msgid "Create a custom template" -msgstr "Eine neue benutzerdefinierte Vorlage erstellen" - -#: ../src/ui.c:159 -msgid "_Close" -msgstr "S_chließen" - -#: ../src/ui.c:161 -msgid "Close the current file" -msgstr "Die aktuelle Datei schließen" - -#: ../src/ui.c:166 -msgid "_Quit" -msgstr "_Beenden" - -#: ../src/ui.c:168 -msgid "Quit the program" -msgstr "Das Programm beenden" - -#: ../src/ui.c:175 -msgid "Cut" -msgstr "Ausschneiden" - -#: ../src/ui.c:177 -msgid "Cut the selection" -msgstr "Die Markierung ausschneiden" - -#: ../src/ui.c:182 -msgid "Copy" -msgstr "Kopieren" - -#: ../src/ui.c:184 -msgid "Copy the selection" -msgstr "Die Markierung kopieren" - -#: ../src/ui.c:189 -msgid "Paste" -msgstr "Einfügen" - -#: ../src/ui.c:191 -msgid "Paste the clipboard" -msgstr "Inhalt der Zwischenablage einfügen" - -#: ../src/ui.c:196 -msgid "Delete" -msgstr "Löschen" - -#: ../src/ui.c:198 -msgid "Delete the selected objects" -msgstr "Die markierten Objekte löschen" - -#: ../src/ui.c:203 -msgid "Select All" -msgstr "Alles markieren" - -#: ../src/ui.c:205 -msgid "Select all objects" -msgstr "Alle Objekte markieren" - -#: ../src/ui.c:210 -msgid "Un-select All" -msgstr "Alle Markierungen löschen" - -#: ../src/ui.c:212 -msgid "Remove all selections" -msgstr "Alle Auswahlen aufheben" - -#: ../src/ui.c:217 -msgid "Preferences" -msgstr "Einstellungen" - -#: ../src/ui.c:219 -msgid "Configure the application" -msgstr "Die Anwendung konfigurieren" - -#: ../src/ui.c:226 -msgid "Zoom in" -msgstr "Vergrößern" - -#: ../src/ui.c:228 -msgid "Increase magnification" -msgstr "Vergrößern" - -#: ../src/ui.c:233 -msgid "Zoom out" -msgstr "Verkleinern" - -#: ../src/ui.c:235 -msgid "Decrease magnification" -msgstr "Verkleinern" - -#: ../src/ui.c:240 -msgid "Zoom 1 to 1" -msgstr "Vergrößerung 1:1" - -#: ../src/ui.c:242 -msgid "Restore scale to 100%" -msgstr "Maßstab auf 100% wiederherstellen" - -#: ../src/ui.c:247 -msgid "Zoom to fit" -msgstr "Einpassen" - -#: ../src/ui.c:249 -msgid "Set scale to fit window" -msgstr "In Fenster einpassen" - -#: ../src/ui.c:256 -msgid "Select Mode" -msgstr "Modus auswählen" - -#: ../src/ui.c:258 -msgid "Select, move and modify objects" -msgstr "Objekte auswählen, bewegen, ändern" - -#: ../src/ui.c:263 ../src/view-text.c:501 -#: ../data/builder/object-editor.builder.h:31 -msgid "Text" -msgstr "Text" - -#: ../src/ui.c:265 -msgid "Create text object" -msgstr "Textobjekt erzeugen" - -#: ../src/ui.c:270 -msgid "Box" -msgstr "Rechteck" - -#: ../src/ui.c:272 -msgid "Create box/rectangle object" -msgstr "Rechteck-Objekt erzeugen" - -#: ../src/ui.c:277 ../data/builder/object-editor.builder.h:20 -msgid "Line" -msgstr "Linie" - -#: ../src/ui.c:279 -msgid "Create line object" -msgstr "Linienobjekt erzeugen" - -#: ../src/ui.c:284 -msgid "Ellipse" -msgstr "Ellipse" - -#: ../src/ui.c:286 -msgid "Create ellipse/circle object" -msgstr "Ellipsen- oder Kreisobjekt erzeugen" - -#: ../src/ui.c:291 ../data/builder/object-editor.builder.h:16 -msgid "Image" -msgstr "Bild" - -#: ../src/ui.c:293 -msgid "Create image object" -msgstr "Bildobjekt erzeugen" - -#: ../src/ui.c:298 -msgid "Barcode" -msgstr "Strichcode" - -#: ../src/ui.c:300 -msgid "Create barcode object" -msgstr "Strichcodeobjekt erzeugen" - -#: ../src/ui.c:305 -msgid "Bring to front" -msgstr "Ganz nach vorn" - -#: ../src/ui.c:307 -msgid "Raise object to top" -msgstr "Objekt im Ebenenstapel nach oben verschieben" - -#: ../src/ui.c:312 -msgid "Send to back" -msgstr "Ganz nach hinten" - -#: ../src/ui.c:314 -msgid "Lower object to bottom" -msgstr "Objekt im Ebenenstapel nach unten verschieben" - -#: ../src/ui.c:319 -msgid "Rotate left" -msgstr "Links drehen" - -#: ../src/ui.c:321 -msgid "Rotate object 90 degrees counter-clockwise" -msgstr "Objekt um 90 Grad gegen den Uhrzeigersinn drehen" - -#: ../src/ui.c:326 -msgid "Rotate right" -msgstr "Rechts drehen" - -#: ../src/ui.c:328 -msgid "Rotate object 90 degrees clockwise" -msgstr "Objekt um 90 Grad im Uhrzeigersinn drehen" - -#: ../src/ui.c:333 -msgid "Flip horizontally" -msgstr "Horizontal spiegeln" - -#: ../src/ui.c:335 -msgid "Flip object horizontally" -msgstr "Objekt horizontal spiegeln" - -#: ../src/ui.c:340 -msgid "Flip vertically" -msgstr "Vertikal spiegeln" - -#: ../src/ui.c:342 -msgid "Flip object vertically" -msgstr "Objekt vertikal spiegeln" - -#: ../src/ui.c:347 -msgid "Align left" -msgstr "Linksbündig" - -#: ../src/ui.c:349 -msgid "Align objects to left edges" -msgstr "Objekte am linken Rand anordnen" - -#: ../src/ui.c:354 -msgid "Align right" -msgstr "Rechtsbündig" - -#: ../src/ui.c:356 -msgid "Align objects to right edges" -msgstr "Objekte am rechten Rand anordnen" - -#: ../src/ui.c:361 -msgid "Align horizontal center" -msgstr "Horizontal mittig anordnen" - -#: ../src/ui.c:363 -msgid "Align objects to horizontal centers" -msgstr "Objekte an der horizontalen Mitte anordnen" - -#: ../src/ui.c:368 -msgid "Align tops" -msgstr "Oben bündig" - -#: ../src/ui.c:370 -msgid "Align objects to top edges" -msgstr "Objekte am oberen Rand anordnen" - -#: ../src/ui.c:375 -msgid "Align bottoms" -msgstr "Unten bündig" - -#: ../src/ui.c:377 -msgid "Align objects to bottom edges" -msgstr "Objekte am unteren Rand anordnen" - -#: ../src/ui.c:382 -msgid "Align vertical center" -msgstr "Vertikal mittig anordnen" - -#: ../src/ui.c:384 -msgid "Align objects to vertical centers" -msgstr "Objekte an der vertikalen Mitte anordnen" - -#: ../src/ui.c:389 -msgid "Center horizontally" -msgstr "Horizontal zentrieren" - -#: ../src/ui.c:391 -msgid "Center objects to horizontal label center" -msgstr "Objekte zur horizontalen Mitte des Etiketts zentrieren" - -#: ../src/ui.c:396 -msgid "Center vertically" -msgstr "Vertikal zentrieren" - -#: ../src/ui.c:398 -msgid "Center objects to vertical label center" -msgstr "Objekte zur vertikalen Mitte des Etiketts zentrieren" - -#: ../src/ui.c:403 -msgid "Merge properties" -msgstr "Mischeinstellungen" - -#: ../src/ui.c:405 -msgid "Edit merge properties" -msgstr "Mischeinstellungen bearbeiten" - -#: ../src/ui.c:412 -msgid "Contents" -msgstr "Inhalte" - -#: ../src/ui.c:414 -msgid "Open glabels manual" -msgstr "Das gLabels-Handbuch öffnen" - -#: ../src/ui.c:419 -msgid "About..." -msgstr "Info …" - -#: ../src/ui.c:421 -msgid "About glabels" -msgstr "Info zu gLabels" - -# CHECK -#: ../src/ui.c:431 -msgid "Property toolbar" -msgstr "Eigenschaften-Werkzeugleiste" - -#: ../src/ui.c:433 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "" -"Die Sichtbarkeit der Werkzeugleiste im aktuellen Fenster ein- oder ausschalten" - -#: ../src/ui.c:439 -msgid "Grid" -msgstr "Raster" - -#: ../src/ui.c:441 -msgid "Change the visibility of the grid in the current window" -msgstr "Die Sichtbarkeit des Rasters im aktuellen Fenster ein- oder ausschalten" - -#: ../src/ui.c:447 -msgid "Markup" -msgstr "Markierungen" - -#: ../src/ui.c:449 -msgid "Change the visibility of markup lines in the current window" -msgstr "Die Sichtbarkeit von Markierungslinien im aktuellen Fenster ändern" - -#: ../src/ui.c:460 -msgid "Main toolbar" -msgstr "Haupt-Werkzeugleiste" - -#: ../src/ui.c:462 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "" -"Die Sichtbarkeit der Haupt-Werkzeugleiste im aktuellen Fenster einschalten/" -"ausschalten" - -#: ../src/ui.c:468 -msgid "Drawing toolbar" -msgstr "Zeichenwerkzeugleiste" - -#: ../src/ui.c:470 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "" -"Die Sichtbarkeit der Zeichenwerkzeugleiste im aktuellen Fenster einschalten/" -"ausschalten" - -#: ../src/ui-property-bar.c:278 ../src/prefs-dialog.c:337 -#: ../src/object-editor-bc-page.c:90 ../src/object-editor-text-page.c:96 -#: ../src/object-editor-shadow-page.c:90 -msgid "Default" -msgstr "Standard" - -#: ../src/ui-property-bar.c:290 ../src/prefs-dialog.c:343 -#: ../src/object-editor-fill-page.c:78 -msgid "No Fill" -msgstr "Keine Füllung" - -#: ../src/ui-property-bar.c:302 ../src/prefs-dialog.c:340 -#: ../src/object-editor-line-page.c:78 -msgid "No Line" -msgstr "Keine Linie" - -#: ../src/ui-sidebar.c:154 -msgid "Object properties" -msgstr "Objekteigenschaften" - -#: ../src/ui-commands.c:1100 -msgid "Glabels includes contributions from:" -msgstr "Glabels entstand unter Mitwirkung von:" - -#: ../src/ui-commands.c:1106 -msgid "See the file AUTHORS for additional credits," -msgstr "Lesen die Datei AUTHORS für zusätzliche Danksagungen," - -#: ../src/ui-commands.c:1107 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "oder besuchen Sie http://glabels.sourceforge.net/" - -#: ../src/ui-commands.c:1119 -msgid "A label and business card creation program.\n" -msgstr "Eine Anwendung zum Erstellen von Etiketten und Visitenkarten.\n" - -#: ../src/ui-commands.c:1123 -msgid "translator-credits" -msgstr "" -"Marcus Bauer \n" -"Christian Neumair \n" -"Mario Blättermann " - -#: ../src/ui-commands.c:1126 -msgid "" -"gLabels is free software: you can redistribute it and/or modify\n" -"it under the terms of the GNU General Public License as published by\n" -"the Free Software Foundation, either version 3 of the License, or\n" -"(at your option) any later version.\n" -"\n" -"gLabels is distributed in the hope that it will be useful,\n" -"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" -"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" -"GNU General Public License for more details.\n" -msgstr "" -"Glabels ist freie Software; Sie können sie weiterverteilen und/oder ändern\n" -"unter den Bedingungen der GNU General Public License, veröffentlicht von\n" -"der Free Software Foundation, entweder Version 3 der Lizenz oder (optional)\n" -"jeder späteren Version.\n" -" \n" -"Dieses Programm wird verteilt in der Hoffnung, dass es nützlich ist, aber\n" -"OHNE JEDE GARANTIE; Weitere Details in der GNU General Public License.\n" - -#: ../src/ui-commands.c:1153 -msgid "glabels" -msgstr "glabels" - -#: ../src/file.c:86 -msgid "New Label or Card" -msgstr "Neues Etikett oder neue Karte" - -#: ../src/file.c:188 -msgid "Label properties" -msgstr "Etiketten-Eigenschaften" - -#: ../src/file.c:291 ../src/file.c:581 -msgid "All files" -msgstr "Alle Dateien" - -#: ../src/file.c:296 ../src/file.c:586 -msgid "gLabels documents" -msgstr "gLabels-Dokumente" - -#: ../src/file.c:343 ../src/file.c:644 -msgid "Empty file name selection" -msgstr "Auswahl des Dateinamens ist leer" - -#: ../src/file.c:346 ../src/file.c:362 -msgid "Please select a file or supply a valid file name" -msgstr "Bitte wählen Sie eine Datei oder geben Sie einen gültigen Dateinamen an" - -#: ../src/file.c:359 -msgid "File does not exist" -msgstr "Datei existiert nicht" - -#: ../src/file.c:434 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "Datei »%s« konnte nicht geöffnet werden" - -#: ../src/file.c:437 -msgid "Not a supported file format" -msgstr "Kein unterstütztes Dateiformat" - -#: ../src/file.c:515 ../src/file.c:694 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "Datei »%s« konnte nicht gespeichert werden" - -#: ../src/file.c:519 ../src/file.c:698 -msgid "Error encountered during save. The file is still not saved." -msgstr "Fehler während des Speicherns. Datei wurde noch nicht gespeichert." - -#: ../src/file.c:559 -#, c-format -msgid "Save \"%s\" as" -msgstr "»%s« speichern unter" - -#: ../src/file.c:647 -msgid "Please supply a valid file name" -msgstr "Bitte geben Sie einen gültigen Dateinamen an" - -#: ../src/file.c:668 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "Datei »%s« überschreiben?" - -#: ../src/file.c:672 -msgid "File already exists." -msgstr "Datei existiert bereits." - -#: ../src/file.c:768 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "Änderungen am Dokument »%s« vor dem Schließen speichern?" - -#: ../src/file.c:772 -msgid "Your changes will be lost if you don't save them." -msgstr "Nicht gespeicherte Änderungen gehen verloren, wenn Sie nicht speichern." - -#: ../src/file.c:775 -msgid "Close without saving" -msgstr "Schließen, ohne zu speichern" - -#. Should not happen -#: ../src/prefs.c:156 ../src/prefs.c:163 -#: ../data/builder/object-editor.builder.h:42 -#: ../data/builder/prefs-dialog.builder.h:22 -msgid "points" -msgstr "Punkte" - -#: ../src/prefs.c:158 ../data/builder/object-editor.builder.h:41 -#: ../data/builder/template-designer.builder.h:64 -msgid "inches" -msgstr "Zoll" - -#: ../src/prefs.c:160 -msgid "mm" -msgstr "mm" - -#: ../src/prefs-dialog.c:172 ../data/builder/prefs-dialog.builder.h:21 -msgid "gLabels Preferences" -msgstr "gLabels-Einstellungen" - -#. Build editor. -#: ../src/view-box.c:176 -msgid "Box object properties" -msgstr "Eigenschaften des Rechteck-Objekts" - -#. Build editor. -#: ../src/view-ellipse.c:178 -msgid "Ellipse object properties" -msgstr "Eigenschaften des Ellipsen-Objekts" - -#. Build editor. -#: ../src/view-line.c:176 -msgid "Line object properties" -msgstr "Eigenschaften des Linien-Objekts" - -#. Build editor. -#: ../src/view-image.c:176 -msgid "Image object properties" -msgstr "Eigenschaften des Bild-Objekts" - -#. Build editor. -#: ../src/view-text.c:180 -msgid "Text object properties" -msgstr "Eigenschaften des Text-Objekts" - -#. Build editor. -#: ../src/view-barcode.c:176 -msgid "Barcode object properties" -msgstr "Eigenschaften des Strichcode-Objekts" - -#: ../src/object-editor-image-page.c:269 -msgid "All Files" -msgstr "Alle Dateien" - -#: ../src/object-editor-image-page.c:274 -msgid "All Images" -msgstr "Alle Bilder" - -#: ../src/object-editor-image-page.c:289 -#, c-format -msgid "%s (*.%s)" -msgstr "%s (*.%s)" - -#: ../src/merge-properties-dialog.c:269 -msgid "Merge Properties" -msgstr "Mischeinstellungen" - -#: ../src/merge-properties-dialog.c:295 ../src/merge-properties-dialog.c:404 -msgid "Select merge-database source" -msgstr "Wählen Sie die einzumischende Datenquelle" - -#: ../src/merge-properties-dialog.c:304 ../src/merge-properties-dialog.c:424 -msgid "N/A" -msgstr "Nicht verfügbar" - -#: ../src/merge-properties-dialog.c:330 -msgid "Select" -msgstr "Markieren" - -#: ../src/merge-properties-dialog.c:338 -msgid "Record/Field" -msgstr "Feld" - -#: ../src/merge-properties-dialog.c:346 -#: ../data/builder/object-editor.builder.h:10 -msgid "Data" -msgstr "Wert" - -#: ../src/merge-properties-dialog.c:417 -msgid "Fixed" -msgstr "Fixiert" - -#. =================================================================== -#: ../src/print-op.c:203 -#: ../data/builder/print-op-dialog-custom-widget.builder.h:6 -#: ../templates/misc-iso-templates.xml.h:34 -msgid "Labels" -msgstr "Labels" - -#: ../src/template-designer.c:400 -msgid "gLabels Template Designer" -msgstr "gLabels Vorlagen-Designer" - -#: ../src/template-designer.c:455 -msgid "Welcome" -msgstr "Willkommen" - -#: ../src/template-designer.c:494 -msgid "Name and Description" -msgstr "Name und Beschreibung" - -#: ../src/template-designer.c:542 -msgid "Page Size" -msgstr "Seitenformat" - -#: ../src/template-designer.c:608 -msgid "Label or Card Shape" -msgstr "Form des neuen Etiketts oder der neuen Karte" - -#: ../src/template-designer.c:654 -msgid "Label or Card Size" -msgstr "Größe des neuen Etiketts oder der neuen Karte" - -#: ../src/template-designer.c:750 -msgid "Label Size (round)" -msgstr "Etikettengröße (rund)" - -#: ../src/template-designer.c:828 -msgid "Label Size (CD/DVD)" -msgstr "Etikettengröße (CD/DVD)" - -#: ../src/template-designer.c:916 -msgid "Number of Layouts" -msgstr "Anzahl der Layouts" - -#: ../src/template-designer.c:980 -msgid "Layout(s)" -msgstr "Layout(s)" - -#: ../src/template-designer.c:1085 -msgid "Design Completed" -msgstr "Design ist komplett" - -#: ../src/template-designer.c:1258 -msgid "" -"Brand and part# match an existing " -"template!" -msgstr "" -"Für diese Marke und Nummer wurde eine " -"Vorlage gefunden!" - -#: ../src/bc.c:65 -msgid "POSTNET (any)" -msgstr "POSTNET (allgemein)" - -#: ../src/bc.c:68 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (nur ZIP)" - -#: ../src/bc.c:71 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (ZIP+4)" - -#: ../src/bc.c:74 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: ../src/bc.c:77 -msgid "CEPNET" -msgstr "CEPNET" - -#: ../src/bc.c:80 -msgid "EAN (any)" -msgstr "EAN (any)" - -#: ../src/bc.c:83 -msgid "EAN-8" -msgstr "EAN-8" - -#: ../src/bc.c:86 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: ../src/bc.c:89 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: ../src/bc.c:92 -msgid "EAN-13" -msgstr "EAN-13" - -#: ../src/bc.c:95 -msgid "EAN-13 +2" -msgstr "EAN-13 +2" - -#: ../src/bc.c:98 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: ../src/bc.c:101 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A oder UPC-E)" - -#: ../src/bc.c:104 -msgid "UPC-A" -msgstr "UPC-A" - -#: ../src/bc.c:107 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: ../src/bc.c:110 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: ../src/bc.c:113 -msgid "UPC-E" -msgstr "UPC-E" - -#: ../src/bc.c:116 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: ../src/bc.c:119 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: ../src/bc.c:122 -msgid "ISBN" -msgstr "ISBN" - -#: ../src/bc.c:125 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: ../src/bc.c:128 -msgid "Code 39" -msgstr "Code 39" - -#: ../src/bc.c:131 -msgid "Code 128" -msgstr "Code 128" - -#: ../src/bc.c:134 -msgid "Code 128C" -msgstr "Code 128C" - -#: ../src/bc.c:137 -msgid "Code 128B" -msgstr "Code 128B" - -#: ../src/bc.c:140 -msgid "Interleaved 2 of 5" -msgstr "Interleaved 2 of 5" - -#: ../src/bc.c:143 -msgid "Codabar" -msgstr "Codabar" - -#: ../src/bc.c:146 -msgid "MSI" -msgstr "MSI" - -#: ../src/bc.c:149 -msgid "Plessey" -msgstr "Plessey" - -#: ../src/bc.c:152 -msgid "IEC16022 (DataMatrix)" -msgstr "IEC16022 (DataMatrix)" - -#: ../src/bc.c:155 -msgid "IEC18004 (QRCode)" -msgstr "IEC18004 (QRCode)" - -#: ../src/label.c:547 -msgid "Untitled" -msgstr "Unbenannt" - -#: ../src/label-barcode.c:435 -msgid "Barcode data empty" -msgstr "Strichcode-Daten sind leer" - -#: ../src/label-barcode.c:439 -msgid "Invalid barcode data" -msgstr "Ungültige Strichcode-Daten" - -#: ../src/xml-label.c:187 ../src/xml-label.c:225 -msgid "xmlParseFile error" -msgstr "Fehler: xmlParseFile error" - -#: ../src/xml-label.c:262 -msgid "No document root" -msgstr "Kein document root" - -#: ../src/xml-label.c:270 -msgid "Importing from glabels 0.1 format" -msgstr "Aus dem glabels 0.1-Format wird importiert" - -#: ../src/xml-label.c:279 -msgid "Importing from glabels 0.4 format" -msgstr "Aus dem glabels 0.4-Format wird importiert" - -#: ../src/xml-label.c:288 -#, c-format -msgid "Unknown glabels Namespace -- Using %s" -msgstr "Unbekannter glabels-Namensraum -- %s wird verwendet" - -#: ../src/xml-label.c:320 ../src/xml-label-04.c:75 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Fehlerhafter root node = »%s«" - -#: ../src/xml-label.c:357 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "Ungültiger Node im Dokument-Node = »%s«" - -#: ../src/xml-label.c:403 ../src/xml-label-04.c:123 -#, c-format -msgid "bad node = \"%s\"" -msgstr "fehlerhafter node = »%s«" - -#: ../src/xml-label.c:850 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "Ungültiger Node im Daten-Node = »%s«" - -#: ../src/xml-label.c:1092 ../libglabels/xml-template.c:664 -msgid "Utf8 conversion error." -msgstr "Fehler in der UTF8-Umwandlung." - -#: ../src/xml-label.c:1099 -msgid "Problem saving xml file." -msgstr "Problem beim Speichern der xml-Datei." - -#: ../src/merge.c:169 ../src/merge.c:210 ../src/merge.c:374 ../src/merge.c:377 -msgid "None" -msgstr "Keine" - -#: ../src/merge-init.c:57 -msgid "Text file with comma delimeters (CSV)" -msgstr "Textdatei mit Kommata als Trennern (CSV)" - -#: ../src/merge-init.c:64 -msgid "Text file with colon delimeters" -msgstr "Textdatei mit Semikola als Trennern" - -#: ../src/merge-init.c:71 -msgid "Text file with tab delimeters" -msgstr "Textdatei mit Tabulatoren als Trennern" - -#: ../src/merge-init.c:80 -msgid "Data from default Evolution Addressbook" -msgstr "Daten aus dem vorgegebenen Evolution-Adressbuch" - -#: ../src/merge-init.c:86 -msgid "Data from a file containing VCards" -msgstr "Daten aus einer Datei, die VCards enthält" - -#: ../src/merge-evolution.c:316 -msgid "Couldn't construct query" -msgstr "Abfrage konnte nicht erstellt werden" - -#: ../src/merge-evolution.c:322 ../src/merge-evolution.c:333 -msgid "Couldn't open addressbook." -msgstr "Adressbuch konnte nicht geöffnet werden" - -#: ../src/merge-evolution.c:348 -msgid "Couldn't list available fields." -msgstr "Verfügbare Felder konnten nicht aufgelistet werden." - -#: ../src/merge-evolution.c:384 -msgid "Couldn't get contacts." -msgstr "Kontakte konnten nicht geholt werden." - -#: ../src/color-combo.c:178 ../src/color-combo-button.c:198 -msgid "Default Color" -msgstr "Standardfarbe" - -#: ../src/color-combo-menu.c:83 -msgid "Dark Red" -msgstr "Dunkelrot" - -#: ../src/color-combo-menu.c:84 -msgid "Brown" -msgstr "Braun" - -#: ../src/color-combo-menu.c:85 -msgid "Dark Goldenrod" -msgstr "Dunkle Goldrute" - -#: ../src/color-combo-menu.c:86 -msgid "Dark Green" -msgstr "Dunkles Grün" - -#: ../src/color-combo-menu.c:87 -msgid "Dark Cyan" -msgstr "Dunkles Cyan-Blau" - -#: ../src/color-combo-menu.c:88 -msgid "Navy Blue" -msgstr "Marineblau" - -#: ../src/color-combo-menu.c:89 -msgid "Dark Violet" -msgstr "Dunkles Violett" - -#: ../src/color-combo-menu.c:91 -msgid "Red" -msgstr "Rot" - -#: ../src/color-combo-menu.c:92 -msgid "Orange" -msgstr "Orange" - -#: ../src/color-combo-menu.c:93 -msgid "Dark Yellow" -msgstr "Dunkles Gelb" - -#: ../src/color-combo-menu.c:94 -msgid "Medium green" -msgstr "Mittelgrün" - -#: ../src/color-combo-menu.c:95 -msgid "Turquoise" -msgstr "Türkis" - -#: ../src/color-combo-menu.c:96 -msgid "Blue" -msgstr "Blau" - -#: ../src/color-combo-menu.c:97 -msgid "Purple" -msgstr "Purpur" - -#: ../src/color-combo-menu.c:99 -msgid "Salmon" -msgstr "Lachs" - -#: ../src/color-combo-menu.c:100 -msgid "Gold" -msgstr "Gold" - -#: ../src/color-combo-menu.c:101 -msgid "Yellow" -msgstr "Gelb" - -#: ../src/color-combo-menu.c:102 -msgid "Green" -msgstr "Grün" - -#: ../src/color-combo-menu.c:103 -msgid "Cyan" -msgstr "Cyan-Blau" - -#: ../src/color-combo-menu.c:104 -msgid "SkyBlue" -msgstr "Himmelblau" - -#: ../src/color-combo-menu.c:105 -msgid "Violet" -msgstr "Violett" - -#: ../src/color-combo-menu.c:107 -msgid "Pink" -msgstr "Pink" - -#: ../src/color-combo-menu.c:108 -msgid "Khaki" -msgstr "Khaki" - -#: ../src/color-combo-menu.c:109 -msgid "Light Yellow" -msgstr "Helles Gelb" - -#: ../src/color-combo-menu.c:110 -msgid "Light Green" -msgstr "Helles Grün" - -#: ../src/color-combo-menu.c:111 -msgid "Light Cyan" -msgstr "Helles Cyan-Blau" - -#: ../src/color-combo-menu.c:112 -msgid "Slate Gray" -msgstr "Schiefergrau" - -#: ../src/color-combo-menu.c:113 -msgid "Thistle" -msgstr "Distel" - -#: ../src/color-combo-menu.c:115 -msgid "White" -msgstr "Weiß" - -#: ../src/color-combo-menu.c:116 -#, c-format -msgid "10% Gray" -msgstr "10% Grau" - -#: ../src/color-combo-menu.c:117 -#, c-format -msgid "25% Gray" -msgstr "25% Grau" - -#: ../src/color-combo-menu.c:118 -#, c-format -msgid "40% Gray" -msgstr "40% Grau" - -#: ../src/color-combo-menu.c:119 -#, c-format -msgid "50% Gray" -msgstr "50% Grau" - -#: ../src/color-combo-menu.c:120 -#, c-format -msgid "60% Gray" -msgstr "60% Grau" - -#: ../src/color-combo-menu.c:121 -msgid "Black" -msgstr "Schwarz" - -#: ../src/color-combo-menu.c:249 ../src/color-combo-menu.c:368 -msgid "Custom Color" -msgstr "Benutzerdefinierte Farbe" - -#: ../src/color-combo-menu.c:314 -#, c-format -msgid "Custom Color #%u" -msgstr "Benutzerdefinierte Farbe #%u" - -#: ../src/font-combo-menu.c:127 -msgid "Proportional fonts" -msgstr "Proportionale Schriften" - -#: ../src/font-combo-menu.c:142 -msgid "Fixed-width fonts" -msgstr "Dicktengleiche Schriften" - -#: ../src/font-combo-menu.c:157 -msgid "All fonts" -msgstr "Alle Schriften" - -#: ../src/wdgt-media-select.c:288 ../src/wdgt-media-select.c:292 -#: ../src/wdgt-media-select.c:297 ../src/wdgt-media-select.c:306 -#: ../src/wdgt-media-select.c:309 ../src/wdgt-media-select.c:403 -#: ../src/wdgt-media-select.c:616 ../src/wdgt-media-select.c:625 -msgid "Any" -msgstr "Beliebig" - -#: ../src/wdgt-media-select.c:651 -#, c-format -msgid "%d per sheet" -msgstr "%d pro Seite" - -#: ../src/wdgt-media-select.c:682 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: ../src/wdgt-media-select.c:687 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: ../src/wdgt-media-select.c:698 ../src/wdgt-media-select.c:712 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s Durchmesser" - -#: ../src/wdgt-media-select.c:702 ../src/wdgt-media-select.c:716 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s Durchmesser" - -#: ../src/wdgt-media-select.c:791 -msgid "No recent templates found." -msgstr "Keine zuletzt benutzten Vorlagen gefunden." - -#: ../src/wdgt-media-select.c:792 -msgid "Try selecting a template from the \"Search all templates\" page." -msgstr "" -"Bitte versuchen Sie, eine Vorlage in »Alle Vorlagen durchsuchen« auszuwählen." - -#: ../src/wdgt-media-select.c:872 -msgid "No match." -msgstr "Keine Treffer." - -#: ../src/wdgt-media-select.c:873 -msgid "Try selecting a different brand, page size or category." -msgstr "" -"Versuchen Sie eine andere Marke, Seitengröße oder Kategorie auszuwählen." - -#: ../src/critical-error-handler.c:70 -msgid "gLabels Fatal Error!" -msgstr "Schwerwiegender Fehler in gLabels!" - -#: ../src/warning-handler.c:69 -msgid "gLabels Error!" -msgstr "gLabels-Fehler!" - -#. Create and append an "Other" entry. -#: ../libglabels/db.c:109 -msgid "Other" -msgstr "Andere" - -#. Create and append a "User defined" entry. -#: ../libglabels/db.c:122 -msgid "User defined" -msgstr "Benutzerdefiniert" - -#: ../libglabels/db.c:473 -msgid "" -"Unable to locate paper size definitions. Libglabels may not be installed " -"correctly!" -msgstr "" -"Die Definitionen der Papiergrößen konnten nicht gefunden werden. Libglabels " -"ist möglicherweise nicht korrekt installiert!" - -#: ../libglabels/db.c:866 -msgid "" -"Unable to locate category definitions. Libglabels may not be installed " -"correctly!" -msgstr "" -"Es war nicht möglich, Kategorie-Definitionen zu finden. Libglabels könnte " -"möglicherweise nicht korrekt installiert sein!" - -#: ../libglabels/db.c:1450 -msgid "" -"Unable to locate any template files. Libglabels may not be installed " -"correctly!" -msgstr "" -"Es konnten keine Vorlagendateien gefunden werden. Möglicherweise ist " -"libglabels nicht korrekt installiert!" - -#: ../libglabels/db.c:1527 -#, c-format -msgid "Generic %s full page template" -msgstr "Allgemeine Ganzseitenvorlage %s" - -#: ../libglabels/xml-template.c:221 -msgid "Missing name or brand/part attributes." -msgstr "Name oder Attribute für Marke/Nummer fehlen." - -#. This should always be an id, but just in case a name -#. slips by! -#: ../libglabels/xml-template.c:238 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "Unbekannte Kennung der Seitengröße »%s«, wird als Name versucht" - -#: ../libglabels/xml-template.c:250 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "Unbekannte Kennung der Seitengröße oder Name »%s«" - -#: ../libglabels/xml-template.c:609 -msgid "" -"Missing required \"brand\" or \"part\" attribute, trying deprecated name." -msgstr "" -"Benötigte Attribute »brand« oder »part« fehlt, missbilligter Name wird " -"versucht. " - -#: ../libglabels/xml-template.c:619 -msgid "Name attribute also missing." -msgstr "Name des Attributs fehlt ebenfalls." - -#. -#. * Local Variables: -- emacs -#. * mode: C -- emacs -#. * c-basic-offset: 8 -- emacs -#. * tab-width: 8 -- emacs -#. * indent-tabs-mode: nil -- emacs -#. * End: -- emacs -#. -#: ../data/builder/merge-properties-dialog.builder.h:1 -msgid "Record selection/preview" -msgstr "Feldauswahl/Vorschau" - -#: ../data/builder/merge-properties-dialog.builder.h:2 -msgid "Source" -msgstr "Quelle" - -#: ../data/builder/merge-properties-dialog.builder.h:3 -msgid "Format:" -msgstr "Format:" - -#: ../data/builder/merge-properties-dialog.builder.h:4 -msgid "Location:" -msgstr "Ort:" - -#: ../data/builder/merge-properties-dialog.builder.h:5 -msgid "Select all" -msgstr "Alles markieren" - -#: ../data/builder/merge-properties-dialog.builder.h:6 -msgid "Unselect all" -msgstr "Markierung aufheben" - -#: ../data/builder/merge-properties-dialog.builder.h:7 -#: ../data/builder/object-editor.builder.h:38 -msgid "dialog1" -msgstr "dialog1" - -#: ../data/builder/new-label-dialog.builder.h:1 -msgid "Label orientation" -msgstr "Ausrichtung des Etiketts" - -#: ../data/builder/new-label-dialog.builder.h:2 -msgid "Media type" -msgstr "Medientyp" - -#: ../data/builder/object-editor.builder.h:2 -#, no-c-format -msgid "%" -msgstr "%" - -#: ../data/builder/object-editor.builder.h:3 -msgid "00000000000 00000" -msgstr "00000000000 00000" - -#: ../data/builder/object-editor.builder.h:4 -msgid "Xxx object properties" -msgstr "Xxx-Objekteigenschaften" - -#: ../data/builder/object-editor.builder.h:5 -#: ../data/builder/prefs-dialog.builder.h:7 -msgid "Alignment:" -msgstr "Ausrichtung:" - -#: ../data/builder/object-editor.builder.h:6 -msgid "Allow merge to automatically shrink text" -msgstr "Automatisches Anpassen der Textgröße erlauben" - -#: ../data/builder/object-editor.builder.h:7 -msgid "Angle:" -msgstr "Winkel:" - -#: ../data/builder/object-editor.builder.h:8 -msgid "Checksum" -msgstr "Prüfsumme" - -#: ../data/builder/object-editor.builder.h:9 -#: ../data/builder/prefs-dialog.builder.h:8 -msgid "Color:" -msgstr "Farbe:" - -#: ../data/builder/object-editor.builder.h:11 -msgid "Enable shadow" -msgstr "Schattierung aktivieren" - -#: ../data/builder/object-editor.builder.h:12 -msgid "Family:" -msgstr "Familie:" - -#: ../data/builder/object-editor.builder.h:13 -msgid "File:" -msgstr "Datei:" - -#: ../data/builder/object-editor.builder.h:14 -msgid "Fill" -msgstr "Füllen" - -#: ../data/builder/object-editor.builder.h:15 -#: ../data/builder/template-designer.builder.h:30 -msgid "Height:" -msgstr "Höhe" - -#: ../data/builder/object-editor.builder.h:17 -msgid "Insert merge field" -msgstr "Datenfeld einfügen" - -#: ../data/builder/object-editor.builder.h:18 -msgid "Key:" -msgstr "Schlüssel:" - -#: ../data/builder/object-editor.builder.h:19 -msgid "Length:" -msgstr "Länge:" - -#: ../data/builder/object-editor.builder.h:21 -#: ../data/builder/prefs-dialog.builder.h:12 -msgid "Line Spacing:" -msgstr "Zeilenabstand:" - -#: ../data/builder/object-editor.builder.h:22 -msgid "Literal:" -msgstr "Literale:" - -#: ../data/builder/object-editor.builder.h:23 -msgid "Opacity:" -msgstr "Transparenz:" - -#: ../data/builder/object-editor.builder.h:24 -msgid "Position" -msgstr "Position" - -#: ../data/builder/object-editor.builder.h:25 -msgid "Reset image size" -msgstr "Bildgröße zurücksetzen" - -#: ../data/builder/object-editor.builder.h:26 -msgid "Shadow" -msgstr "Schattierung" - -#: ../data/builder/object-editor.builder.h:27 -msgid "Size" -msgstr "Breite" - -#: ../data/builder/object-editor.builder.h:28 -msgid "Size:" -msgstr "Größe:" - -#: ../data/builder/object-editor.builder.h:29 -msgid "Style" -msgstr "Stil" - -#: ../data/builder/object-editor.builder.h:30 -msgid "Style:" -msgstr "Stil:" - -#: ../data/builder/object-editor.builder.h:32 -#: ../data/builder/prefs-dialog.builder.h:20 -#: ../data/builder/template-designer.builder.h:61 -msgid "Width:" -msgstr "Breite:" - -#: ../data/builder/object-editor.builder.h:33 -msgid "X Offset:" -msgstr "X-Versatz:" - -#: ../data/builder/object-editor.builder.h:34 -msgid "X:" -msgstr "X:" - -#: ../data/builder/object-editor.builder.h:35 -msgid "Y Offset:" -msgstr "Y-Versatz:" - -#: ../data/builder/object-editor.builder.h:36 -msgid "Y:" -msgstr "Y:" - -#: ../data/builder/object-editor.builder.h:37 -msgid "degrees" -msgstr "Grad" - -#: ../data/builder/object-editor.builder.h:39 -msgid "digits:" -msgstr "Zeichen:" - -#: ../data/builder/object-editor.builder.h:40 -msgid "format:" -msgstr "Format:" - -#: ../data/builder/prefs-dialog.builder.h:1 -msgid " " -msgstr " " - -#: ../data/builder/prefs-dialog.builder.h:2 -msgid "Default page size" -msgstr "Vorgegebene Seitengröße" - -#: ../data/builder/prefs-dialog.builder.h:3 -msgid "Fill" -msgstr "Füllung" - -#: ../data/builder/prefs-dialog.builder.h:4 -msgid "Line" -msgstr "Linie" - -#: ../data/builder/prefs-dialog.builder.h:5 -msgid "Text" -msgstr "Text" - -#: ../data/builder/prefs-dialog.builder.h:6 -msgid "Units" -msgstr "Einheiten" - -#: ../data/builder/prefs-dialog.builder.h:9 -msgid "Font:" -msgstr "Schrift:" - -#: ../data/builder/prefs-dialog.builder.h:10 -msgid "ISO A4" -msgstr "A4" - -#: ../data/builder/prefs-dialog.builder.h:11 -msgid "Inches" -msgstr "Zoll" - -#: ../data/builder/prefs-dialog.builder.h:13 -msgid "Locale" -msgstr "Spracheinstellung" - -#: ../data/builder/prefs-dialog.builder.h:14 -msgid "Millimeters" -msgstr "Millimeter" - -#: ../data/builder/prefs-dialog.builder.h:15 -msgid "Object defaults" -msgstr "Objekt-Vorgaben" - -#: ../data/builder/prefs-dialog.builder.h:16 -msgid "Points" -msgstr "Punkte" - -#: ../data/builder/prefs-dialog.builder.h:17 -msgid "Select default properties for new objects." -msgstr "Wählen Sie die vorgegebenen Eigenschaften für neue Objekte." - -#: ../data/builder/prefs-dialog.builder.h:18 -msgid "Select locale specific behavior." -msgstr "Wählen Sie hier Einstellungen gemäß Ihrer Sprache/Ihres Landes." - -#. Most popular (at top of list) -#: ../data/builder/prefs-dialog.builder.h:19 ../templates/paper-sizes.xml.h:29 -msgid "US Letter" -msgstr "US-Letter" - -#: ../data/builder/property-bar.builder.h:1 -msgid "Bold" -msgstr "Fett" - -#: ../data/builder/property-bar.builder.h:2 -msgid "Center align" -msgstr "Zentrieren" - -#: ../data/builder/property-bar.builder.h:4 -msgid "Font size" -msgstr "Schriftgröße" - -#: ../data/builder/property-bar.builder.h:5 -msgid "Italic" -msgstr "Kursiv" - -#: ../data/builder/property-bar.builder.h:6 -msgid "Left align" -msgstr "Linksbündig" - -#: ../data/builder/property-bar.builder.h:8 -msgid "Line width" -msgstr "Linienbreite" - -#: ../data/builder/property-bar.builder.h:9 -msgid "Right align" -msgstr "Rechtsbündig" - -#: ../data/builder/property-bar.builder.h:10 -msgid "Text color" -msgstr "Textfarbe" - -#: ../data/builder/template-designer.builder.h:1 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(z.B. »Adressaufkleber«, »Visitenkarten« …)" - -#: ../data/builder/template-designer.builder.h:2 -msgid "(e.g., 8163A)" -msgstr "(z.B., 8163A)" - -#: ../data/builder/template-designer.builder.h:3 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(z.B., Avery, Acme, ...)" - -#: ../data/builder/template-designer.builder.h:4 -msgid "1. Outer radius:" -msgstr "1. Äußerer Radius:" - -#: ../data/builder/template-designer.builder.h:5 -msgid "1. Radius:" -msgstr "1. Radius:" - -#: ../data/builder/template-designer.builder.h:6 -msgid "1. Width:" -msgstr "1. Breite:" - -#: ../data/builder/template-designer.builder.h:7 -msgid "2. Height:" -msgstr "2. Höhe:" - -#: ../data/builder/template-designer.builder.h:8 -msgid "2. Inner radius:" -msgstr "2. Innerer Radius:" - -#: ../data/builder/template-designer.builder.h:9 -msgid "2. Waste (overprint allowed):" -msgstr "2. Überstand (Bedrucken erlaubt):" - -#: ../data/builder/template-designer.builder.h:10 -msgid "3. Clipping width:" -msgstr "3. Innere Breite:" - -#: ../data/builder/template-designer.builder.h:11 -msgid "3. Margin" -msgstr "3. Ränder" - -#: ../data/builder/template-designer.builder.h:12 -msgid "3. Round (radius of corner):" -msgstr "3. Rundung (Radius der Ecken):" - -#: ../data/builder/template-designer.builder.h:13 -msgid "4. Clipping height:" -msgstr "4. Innere Höhe:" - -#: ../data/builder/template-designer.builder.h:14 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "4. Horiz. Überstand (Bedrucken erlaubt):" - -#: ../data/builder/template-designer.builder.h:15 -msgid "5. Vert. waste (overprint allowed):" -msgstr "3. Vert. Überstand (Bedrucken erlaubt):" - -#: ../data/builder/template-designer.builder.h:16 -msgid "5. Waste (overprint allowed):" -msgstr "5. Überstand (Bedrucken erlaubt):" - -#: ../data/builder/template-designer.builder.h:17 -msgid "6. Margin" -msgstr "6. Rand" - -#: ../data/builder/template-designer.builder.h:18 -msgid "Brand/Manufacturer:" -msgstr "Marke/Hersteller:" - -#: ../data/builder/template-designer.builder.h:19 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD (einschließlich Kreditkarten-CDs)" - -#: ../data/builder/template-designer.builder.h:20 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"Herzlichen Glückwunsch!\n" -"\n" -"Das Erzeugen der Vorlage ist abgeschlossen.\n" -"Falls Sie diese Vorlage akzeptieren und speichern wollen,\n" -"klicken Sie auf »Akzeptieren«.\n" -"\n" -"Anderenfalls klicken Sie auf »Abbrechen«, um die\n" -"Vorlage zu verwerfen, oder auf »Zurück«,\n" -"um die Vorlage erneut zu bearbeiten." - -#: ../data/builder/template-designer.builder.h:27 -msgid "Description:" -msgstr "Beschreibung:" - -#: ../data/builder/template-designer.builder.h:28 -msgid "Distance from left edge (x0):" -msgstr "Abstand vom linken Rand (x0):" - -#: ../data/builder/template-designer.builder.h:29 -msgid "Distance from top edge (y0):" -msgstr "Abstand vom oberen Rand (x0):" - -#: ../data/builder/template-designer.builder.h:31 -msgid "Horizontal pitch (dx):" -msgstr "Horizontaler Abstand (dx):" - -#: ../data/builder/template-designer.builder.h:32 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" -"Wie viele Layouts wird Ihre Vorlage enthalten?\n" -"\n" -"Ein Layout ist ein Satz von Etiketten oder Karten, die in einem einfachen " -"Raster\n" -"angeordnet sind. Die meisten Vorlagen verwenden nur ein Layout, wie im\n" -"ersten Beispiel. Das zweite Beispiel zeigt die Verwendung zweier Layouts." - -#: ../data/builder/template-designer.builder.h:37 -msgid "Layout #1" -msgstr "Layout #1" - -#: ../data/builder/template-designer.builder.h:38 -msgid "Layout #2" -msgstr "Layout #2" - -#: ../data/builder/template-designer.builder.h:39 -msgid "Number across (nx):" -msgstr "Anzahl horizontal (nx):" - -#: ../data/builder/template-designer.builder.h:40 -msgid "Number down (ny):" -msgstr "Anzahl vertikal (ny):" - -#: ../data/builder/template-designer.builder.h:41 -msgid "Number of layouts:" -msgstr "Anzahl der Layouts:" - -#: ../data/builder/template-designer.builder.h:42 -msgid "Page size:" -msgstr "Seitenformat:" - -#: ../data/builder/template-designer.builder.h:43 -msgid "Part #:" -msgstr "Nummer:" - -#: ../data/builder/template-designer.builder.h:44 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "" -"Bitte geben Sie die folgenden Identifizierungsinformationen über die Vorlage " -"an." - -#: ../data/builder/template-designer.builder.h:45 -msgid "Please enter the following layout information." -msgstr "Bitte geben Sie die folgenden Layout-Informationen ein." - -#: ../data/builder/template-designer.builder.h:46 -msgid "" -"Please enter the following size parameters of a single label in your template." -msgstr "" -"Bitte geben Sie die folgenden Größenwerte des einzelnen Etiketts in Ihrer " -"Vorlage an." - -#: ../data/builder/template-designer.builder.h:47 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" -"Bitte geben Sie die folgenden Größenwerte des einzelnen Etiketts oder der " -"einzelnen Karte in Ihrer Vorlage an." - -#: ../data/builder/template-designer.builder.h:48 -msgid "Please select the basic shape of the labels or cards." -msgstr "Bitte wählen Sie die Grundform der Etiketten oder Karten aus." - -#: ../data/builder/template-designer.builder.h:49 -msgid "Please select the page size of the template stationery." -msgstr "Bitte wählen Sie das Papierformat der Vorlage aus." - -#: ../data/builder/template-designer.builder.h:50 -msgid "Print test sheet" -msgstr "Textseite drucken" - -#: ../data/builder/template-designer.builder.h:51 -msgid "Rectangular or square (can have rounded corners)" -msgstr "Rechteckig oder quadratisch (auch mit abgerundeten Ecken)" - -#: ../data/builder/template-designer.builder.h:52 -msgid "Round" -msgstr "Rund" - -#: ../data/builder/template-designer.builder.h:53 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"Vorlagen benötigen\n" -"zwei Layouts." - -#: ../data/builder/template-designer.builder.h:55 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"Vorlagen benötigen nur\n" -"ein Layout." - -#: ../data/builder/template-designer.builder.h:57 -msgid "Vertical pitch (dy):" -msgstr "Vertikaler Abstand (dy):" - -#: ../data/builder/template-designer.builder.h:58 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"Willkommen zum gLabels Vorlagen-Designer.\n" -"\n" -"Dieser Dialog wird Sie beim Erstellen einer benutzerdefinierten\n" -"gLabels-Vorlage unterstützen." - -#: ../data/builder/template-designer.builder.h:62 -msgid "cd_size_page" -msgstr "cd_size_page" - -#: ../data/builder/template-designer.builder.h:63 -msgid "finish_page" -msgstr "finish_page" - -#: ../data/builder/template-designer.builder.h:65 -msgid "layout_page" -msgstr "layout_page" - -#: ../data/builder/template-designer.builder.h:66 -msgid "name_page" -msgstr "name_page" - -#: ../data/builder/template-designer.builder.h:67 -msgid "nlayouts_page" -msgstr "nlayouts_page" - -#: ../data/builder/template-designer.builder.h:68 -msgid "pg_size_page" -msgstr "pg_size_page" - -#: ../data/builder/template-designer.builder.h:69 -msgid "rect_size_page" -msgstr "rect_size_page" - -#: ../data/builder/template-designer.builder.h:70 -msgid "round_size_page" -msgstr "round_size_page" - -#: ../data/builder/template-designer.builder.h:71 -msgid "shape_page" -msgstr "shape_page" - -#: ../data/builder/template-designer.builder.h:72 -msgid "start_page" -msgstr "start_page" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:1 -msgid "Copies" -msgstr "Kopien" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:2 -msgid "Merge Control" -msgstr "Mischsteuerung" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:3 -msgid "Options" -msgstr "Optionen" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:4 -msgid "Collate" -msgstr "Zuordnen" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:5 -msgid "Copies:" -msgstr "Kopien:" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:7 -msgid "Sheets:" -msgstr "Seiten:" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:8 -msgid "Start on label" -msgstr "Start bei Etikett" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:9 -msgid "from:" -msgstr "von:" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:10 -msgid "on 1st sheet" -msgstr "auf erster Seite" - -#: ../data/builder/print-op-dialog-custom-widget.builder.h:14 -msgid "to:" -msgstr "bis:" - -#: ../data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "Erstellen von Etiketten, Visitenkarten und Medien-Covern" - -#: ../data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "gLabels Etiketten-Designer" - -#: ../data/mime/glabels.keys.in.h:1 ../data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "gLabels-Projektdatei" - -#. Other ISO A series sizes -#: ../templates/paper-sizes.xml.h:2 -msgid "A0" -msgstr "A0" - -#: ../templates/paper-sizes.xml.h:3 -msgid "A1" -msgstr "A1" - -#: ../templates/paper-sizes.xml.h:4 -msgid "A10" -msgstr "A10" - -#: ../templates/paper-sizes.xml.h:5 -msgid "A2" -msgstr "A2" - -#: ../templates/paper-sizes.xml.h:6 -msgid "A3" -msgstr "A3" - -#: ../templates/paper-sizes.xml.h:7 -msgid "A4" -msgstr "A4" - -#: ../templates/paper-sizes.xml.h:8 -msgid "A5" -msgstr "A5" - -#: ../templates/paper-sizes.xml.h:9 -msgid "A6" -msgstr "A6" - -#: ../templates/paper-sizes.xml.h:10 -msgid "A7" -msgstr "A7" - -#: ../templates/paper-sizes.xml.h:11 -msgid "A8" -msgstr "A8" - -#: ../templates/paper-sizes.xml.h:12 -msgid "A9" -msgstr "A9" - -#. ISO B series sizes -#: ../templates/paper-sizes.xml.h:14 -msgid "B0" -msgstr "B0" - -#: ../templates/paper-sizes.xml.h:15 -msgid "B1" -msgstr "B1" - -#: ../templates/paper-sizes.xml.h:16 -msgid "B10" -msgstr "B10" - -#: ../templates/paper-sizes.xml.h:17 -msgid "B2" -msgstr "B2" - -#: ../templates/paper-sizes.xml.h:18 -msgid "B3" -msgstr "B3" - -#: ../templates/paper-sizes.xml.h:19 -msgid "B4" -msgstr "B4" - -#: ../templates/paper-sizes.xml.h:20 -msgid "B5" -msgstr "B5" - -#: ../templates/paper-sizes.xml.h:21 -msgid "B6" -msgstr "B6" - -#: ../templates/paper-sizes.xml.h:22 -msgid "B7" -msgstr "B7" - -#: ../templates/paper-sizes.xml.h:23 -msgid "B8" -msgstr "B8" - -#: ../templates/paper-sizes.xml.h:24 -msgid "B9" -msgstr "B9" - -#: ../templates/paper-sizes.xml.h:25 -msgid "US Executive" -msgstr "US Executive" - -#. Other US paper sizes -#: ../templates/paper-sizes.xml.h:27 -msgid "US Legal" -msgstr "US Legal" - -#: ../templates/categories.xml.h:1 -msgid "Any card" -msgstr "Beliebige Karte" - -#: ../templates/categories.xml.h:2 -msgid "Any label" -msgstr "Alle Etiketten" - -#: ../templates/categories.xml.h:3 -msgid "Business cards" -msgstr "Visitenkarten" - -#: ../templates/categories.xml.h:4 -msgid "CD/DVD or other media" -msgstr "CD/DVD oder andere Medien" - -#: ../templates/categories.xml.h:5 -msgid "Mailing/shipping products" -msgstr "Post- und Versandprodukte" - -#: ../templates/categories.xml.h:6 -msgid "Rectangular labels" -msgstr "Rechteckige Etiketten" - -#: ../templates/categories.xml.h:7 -msgid "Round labels" -msgstr "Runde Etiketten" - -#: ../templates/categories.xml.h:8 -msgid "Square labels" -msgstr "Quadratische Etiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:2 -#: ../templates/avery-iso-templates.xml.h:2 -#: ../templates/dymo-other-templates.xml.h:4 -#: ../templates/misc-iso-templates.xml.h:2 -#: ../templates/zweckform-iso-templates.xml.h:2 -msgid "Address Labels" -msgstr "Adressaufkleber" - -#. =================================================================== -#. ============================================================ -#. =================================================================== -#. ******************************************************************** -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:4 -#: ../templates/avery-iso-templates.xml.h:8 -#: ../templates/misc-us-templates.xml.h:4 -#: ../templates/misc-iso-templates.xml.h:12 -#: ../templates/zweckform-iso-templates.xml.h:6 -msgid "Business Cards" -msgstr "Visitenkarten" - -#. =================================================================== -#. =============================================================== -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:6 -#: ../templates/avery-iso-templates.xml.h:14 -#: ../templates/misc-us-templates.xml.h:8 -#: ../templates/misc-iso-templates.xml.h:16 -#: ../templates/zweckform-iso-templates.xml.h:8 -msgid "CD/DVD Labels" -msgstr "CD/DVD-Etiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:8 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "CD/DVD-Etiketten (Medienaufkleber)" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:10 -msgid "CD/DVD Labels (Spine Labels)" -msgstr "CD/DVD-Etiketten (Spine Labels)" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:12 -#: ../templates/avery-iso-templates.xml.h:16 -msgid "Diskette Labels" -msgstr "Diskettenaufkleber" - -#. the LSK labels can be torn in half down the center -#: ../templates/avery-us-templates.xml.h:14 -msgid "Divider Labels" -msgstr "Etiketten für Trennblätter" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:16 -msgid "Filing Labels" -msgstr "Ordneretiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:18 -msgid "Full Sheet Labels" -msgstr "Ganzseitige Etiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:20 -msgid "ID Labels" -msgstr "Etiketten für Archivierungsordner" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:22 -msgid "Index Cards" -msgstr "Indexkarten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:24 -msgid "Large Round Labels" -msgstr "Große runde Etiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:26 -msgid "Name Badge Labels" -msgstr "Namensschild-Etiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:28 -msgid "Post cards" -msgstr "Postkarten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:30 -#: ../templates/dymo-other-templates.xml.h:12 -msgid "Return Address Labels" -msgstr "Rückantwort-Adressaufkleber" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:32 -#: ../templates/misc-us-templates.xml.h:28 -msgid "Round Labels" -msgstr "Runde Etiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:34 -msgid "Shipping Labels" -msgstr "Versandetiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:36 -msgid "Small Round Labels" -msgstr "Kleine runde Etiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:38 -msgid "Square Labels" -msgstr "Quadratische Etiketten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:40 -msgid "Tent Cards" -msgstr "Klappkarten" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:42 -msgid "Video Tape Face Labels" -msgstr "Etiketten für Videokassetten (Vorderseite)" - -#. =================================================================== -#: ../templates/avery-us-templates.xml.h:44 -msgid "Video Tape Spine Labels" -msgstr "Etiketten für Videokassetten (Rückseite)" - -#. =================================================================== -#: ../templates/avery-iso-templates.xml.h:4 -msgid "Address labels" -msgstr "Adressaufkleber" - -#. =================================================================== -#: ../templates/avery-iso-templates.xml.h:6 -msgid "Allround labels" -msgstr "Universal-Etiketten" - -#. =============================================================== -#: ../templates/avery-iso-templates.xml.h:10 -msgid "CD Booklet" -msgstr "CD-Einlegeheft" - -#. =============================================================== -#: ../templates/avery-iso-templates.xml.h:12 -msgid "CD Inlet" -msgstr "CD-Einleger" - -#. =================================================================== -#: ../templates/avery-iso-templates.xml.h:18 -msgid "Diskette labels" -msgstr "Diskettenaufkleber" - -#. =============================================================== -#. =================================================================== -#: ../templates/avery-iso-templates.xml.h:20 -#: ../templates/misc-us-templates.xml.h:18 -#: ../templates/misc-iso-templates.xml.h:36 -#: ../templates/zweckform-iso-templates.xml.h:16 -msgid "Mailing Labels" -msgstr "Adressaufkleber" - -#. =================================================================== -#: ../templates/avery-iso-templates.xml.h:22 -msgid "Mailing labels" -msgstr "Adressaufkleber" - -#. =================================================================== -#: ../templates/avery-iso-templates.xml.h:24 -msgid "Mini Address Labels" -msgstr "Mini-Adressaufkleber" - -#. =================================================================== -#: ../templates/avery-iso-templates.xml.h:26 -msgid "Mini Labels" -msgstr "Mini-Etiketten" - -#. =================================================================== -#: ../templates/avery-iso-templates.xml.h:28 -msgid "Shipping labels" -msgstr "Versandaufkleber" - -#. =================================================================== -#: ../templates/avery-other-templates.xml.h:2 -msgid "File Folder Labels" -msgstr "Aktenordner-Etiketten" - -#: ../templates/brother-other-templates.xml.h:1 -msgid "Multi Purpose Labels 17mm x 54mm" -msgstr "Mehrzwecketiketten 17mm x 54mm" - -#: ../templates/brother-other-templates.xml.h:2 -msgid "Shipping Labels 62mm x 100mm" -msgstr "Versandetiketten 62mm x 100mm" - -#. -#. ********************************************************************* -#. ********************************************************************* -#. Labels for the Brother QL-500/550/650 PC Label Printers -#. -#. These templates work with the Brother Linux Printer CUPS Driver. It -#. is unknown if these work correctly with the foomatic print driver for -#. these printers. -#. -#. One difference from typical templates is that the template size is -#. not the actual media size - it is the size of the printable area, -#. which is smaller than the media size. This is because (at least with -#. the Brother driver) coordinates are relative the corner of this area. -#. -#. ********************************************************************* -#. ********************************************************************* -#. -#: ../templates/brother-other-templates.xml.h:20 -msgid "Standard Address Labels 29mm x 90mm" -msgstr "Standard-Adressaufkleber 29mm x 90mm" - -#. =================================================================== -#: ../templates/dymo-other-templates.xml.h:2 -msgid "3.5in Diskette" -msgstr "3.5-Zoll- Diskette" - -#. =================================================================== -#: ../templates/dymo-other-templates.xml.h:6 -msgid "File Folder" -msgstr "Aktenordner" - -#. =================================================================== -#: ../templates/dymo-other-templates.xml.h:8 -msgid "Hanging Folder" -msgstr "Hängemappe" - -#. =================================================================== -#: ../templates/dymo-other-templates.xml.h:10 -msgid "Large Address Labels" -msgstr "Große Adressaufkleber" - -#. =================================================================== -#: ../templates/dymo-other-templates.xml.h:14 -msgid "Shipping Address Labels" -msgstr "Versand-Adressaufkleber" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:2 -msgid "Business Card CD" -msgstr "Visitenkarten-CD" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:6 -msgid "CD Template Rectangles" -msgstr "CD-Vorlagen (rechteckig)" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:10 -msgid "CD/DVD Labels (Face Only)" -msgstr "CD/DVD-Etiketten (nur Vorderseite)" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:12 -#: ../templates/misc-iso-templates.xml.h:18 -msgid "CD/DVD Labels (face only)" -msgstr "CD/DVD-Etiketten (nur Vorderseite)" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:14 -msgid "Cassette Labels" -msgstr "Kassettenaufkleber" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:16 -msgid "DLT Labels" -msgstr "DLT-Etiketten" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:20 -msgid "Microtube labels" -msgstr "Microtube-Etiketten" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:22 -msgid "Mini-CD Labels" -msgstr "Mini-CD-Etiketten" - -#: ../templates/misc-us-templates.xml.h:23 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "PRO-CD-Etiketten 2-up (nur CD-Spine)" - -#: ../templates/misc-us-templates.xml.h:24 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "PRO-CD-Etiketten 2-up (nur Vorderseite)" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:26 -#: ../templates/misc-iso-templates.xml.h:42 -msgid "PRO CD Labels 2-up (face only)" -msgstr "PRO-CD-Etiketten 2-up (nur Vorderseite)" - -#. =================================================================== -#: ../templates/misc-us-templates.xml.h:30 -msgid "Slimline CD Case (rightside up)" -msgstr "Slimline CD Case (normal)" - -#: ../templates/misc-us-templates.xml.h:31 -msgid "Slimline CD Case (upside down)" -msgstr "Slimline CD Case (umgekehrt)" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:4 -#: ../templates/zweckform-iso-templates.xml.h:4 -msgid "Allround Labels" -msgstr "Universal-Etiketten" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:6 -msgid "Arch File Labels" -msgstr "Etiketten für Archivierungsordner" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:8 -msgid "Arch File Labels (large)" -msgstr "Etiketten für Archivierungsordner (groß)" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:10 -msgid "Arch File Labels (small)" -msgstr "Etiketten für Archivierungsordner (klein)" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:14 -msgid "CD Labels" -msgstr "CD-Aufkleber" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:20 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "CD/DVD-Etiketten im Standardformat (nur Vorderseite)" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:22 -msgid "Diskette Labels (face only)" -msgstr "Diskettenaufkleber (nur Vorderseite)" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:24 -msgid "EPSON Photo Stickers 16" -msgstr "EPSON Photo Stickers 16" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:26 -msgid "Etiketten" -msgstr "Etiketten" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:28 -msgid "Fridge Magnet Stickers" -msgstr "Aufkleber für Kühlschrankmagnete" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:30 -msgid "General Labels" -msgstr "Allgemeine Etiketten" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:32 -msgid "Inkjet/Laser Labels 70x37mm" -msgstr "Inkjet/Laseretiketten 70x37mm" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:38 -msgid "Mailing Labels-2 columns" -msgstr "Adressaufkleber 2-spaltig" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:40 -msgid "Mailing Labels-3 columns" -msgstr "Adressaufkleber 3-spaltig" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:44 -#: ../templates/zweckform-iso-templates.xml.h:24 -msgid "Rectangular Labels" -msgstr "Rechteckige Etiketten" - -#. =================================================================== -#: ../templates/misc-iso-templates.xml.h:46 -msgid "Video Labels (face only)" -msgstr "Video-Etiketten (nur Vorderseite)" - -#. =================================================================== -#: ../templates/misc-other-templates.xml.h:2 -msgid "Multi-Purpose Labels" -msgstr "Mehrzweck-Etiketten" - -#. =================================================================== -#: ../templates/zweckform-iso-templates.xml.h:10 -msgid "Correction and Cover-up Labels" -msgstr "Korrektur- und Abdeckaufkleber" - -#. =================================================================== -#: ../templates/zweckform-iso-templates.xml.h:12 -msgid "File Back Labels" -msgstr "Ordnerrücken" - -#. =================================================================== -#: ../templates/zweckform-iso-templates.xml.h:14 -msgid "Lever Arch File Labels" -msgstr "Lever Etiketten für Archivierungsordner" - -#. =================================================================== -#: ../templates/zweckform-iso-templates.xml.h:18 -msgid "Multi-purpose Stick+Lift Labels" -msgstr "Mehrzweck-Stick+Lift-Aufkleber" - -#. =================================================================== -#: ../templates/zweckform-iso-templates.xml.h:20 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "QSL-Karten Etiketten 70mm x 50,8mm" - -#. =================================================================== -#: ../templates/zweckform-iso-templates.xml.h:22 -msgid "Rectangular Copier Labels" -msgstr "Rechteckige Kopieretiketten" - -#. =================================================================== -#: ../templates/zweckform-iso-templates.xml.h:26 -msgid "Video Labels (back)" -msgstr "Video-Etiketten (Rückseite)" - -#~ msgid "Brand:" -#~ msgstr "Marke:" - -#~ msgid "Category:" -#~ msgstr "Kategorie:" - -#~ msgid "Recent templates" -#~ msgstr "Zuletzt benutzte Vorlagen" - -#~ msgid "Search all templates" -#~ msgstr "Alle Vorlagen durchsuchen" - -#~ msgid "Normal" -#~ msgstr "Normal" - -#~ msgid "Rotated" -#~ msgstr "Gedreht" - -#~ msgid "Print control (Simple)" -#~ msgstr "Drucksteuerung (Einfach)" - -#~ msgid "Font family" -#~ msgstr "Schriftfamilie" - -#~ msgid "- gLabels label designer" -#~ msgstr "- gLabels Etiketten-Designer" - -#~ msgid "- batch process gLabels label files" -#~ msgstr "- Stapelverarbeitung von gLabels-Dateien" - -#~ msgid "Show tooltips" -#~ msgstr "Minihilfen anzeigen" diff --git a/glabels2/po/eo.po b/glabels2/po/eo.po deleted file mode 100644 index cda51cea..00000000 --- a/glabels2/po/eo.po +++ /dev/null @@ -1,2438 +0,0 @@ -# translation of eo.po to -# Italian translation of glabels. -# Copyright (C) 2003 THE glabels'S COPYRIGHT HOLDER -# This file is distributed under the same license as the glabels package. -# -# Esperanto special letters: ĉŝĝĥĵŭ -- 2244 -# Antonio C. Codazzi "la Filozofo" , 2007. -# -# -msgid "" -msgstr "" -"Project-Id-Version: eo\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-06-19 20:43-0400\n" -"PO-Revision-Date: 2007-06-06 16:48+0200\n" -"Last-Translator: Antonio C. Codazzi \n" -"Language-Team: Esperanto \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.0.2\n" - -#: src/glabels.c:116 -msgid "Could not initialize Bonobo!\n" -msgstr "Estas neeble prepari Bonobon!\n" - -#: src/glabels-batch.c:52 -msgid "print this message" -msgstr "presu tiun ĉi mesaĝon" - -#: src/glabels-batch.c:54 -msgid "print the version of glabels-batch being used" -msgstr "presu version de uzata staplo de glabels" - -#: src/glabels-batch.c:56 -msgid "set output filename (default=\"output.ps\")" -msgstr "agordu dosiernomon de eligo (defaÅ­lte \"output.ps\")" - -#: src/glabels-batch.c:56 src/glabels-batch.c:70 -msgid "filename" -msgstr "dosiernomo" - -#: src/glabels-batch.c:58 -msgid "number of sheets (default=1)" -msgstr "nombro da folioj (defaÅ­lte 1)" - -#: src/glabels-batch.c:58 -msgid "sheets" -msgstr "folioj" - -#: src/glabels-batch.c:60 -msgid "number of copies (default=1)" -msgstr "nombro da ekzempleroj (defaÅ­lte 1)" - -#: src/glabels-batch.c:60 -msgid "copies" -msgstr "ekzempleroj" - -#: src/glabels-batch.c:62 -msgid "first label on first sheet (default=1)" -msgstr "unua etikedo de unua folio (defaÅ­lte 1)" - -#: src/glabels-batch.c:62 -msgid "first" -msgstr "unua" - -#: src/glabels-batch.c:64 src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "presu konturojn (por testi alliniĝon de la printilo)" - -#: src/glabels-batch.c:66 src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "presu inverse (ekz. iun spegulitan bildon)" - -#: src/glabels-batch.c:68 src/print-dialog.c:351 -msgid "print crop marks" -msgstr "presu liniojn de tranĉo" - -#: src/glabels-batch.c:70 -msgid "input file for merging" -msgstr "eniga dosiero por kunfandi" - -#: src/glabels-batch.c:107 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[OPTION...] GLABELS_FILE..." - -#: src/glabels-batch.c:127 -#, c-format -msgid "missing glabels file\n" -msgstr "mankanta dosero de glabels\n" - -#: src/glabels-batch.c:158 -#, c-format -msgid "cannot perform document merge with glabels file %s\n" -msgstr "estas neeble kunfandi dokumentojn kun dosiero de glabels %s\n" - -#: src/glabels-batch.c:182 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "estas neeble malfermi dosieron de glabels %s\n" - -#: src/window.c:244 -msgid "(none) - gLabels" -msgstr "(nenio) - gLabels" - -#: src/window.c:414 -msgid "(modified)" -msgstr "(modifita)" - -#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 -msgid "_Select Mode" -msgstr "Modu_so de Elektado" - -#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 -msgid "_Text" -msgstr "_Teksto" - -#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 -msgid "_Line" -msgstr "_Linio" - -#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 -msgid "_Box" -msgstr "_Fako" - -#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 -msgid "_Ellipse" -msgstr "_Elipso" - -#: src/stock.c:70 data/ui/glabels-ui.xml.h:146 -msgid "_Image" -msgstr "_Bildo" - -#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 -msgid "Bar_code" -msgstr "Strek_kodo" - -#: src/stock.c:72 -msgid "_Merge Properties" -msgstr "Ecoj de Ku_nfando" - -#: src/stock.c:73 -msgid "Object _Properties" -msgstr "Ecoj de _Objekto" - -#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 -msgid "Bring to _Front" -msgstr "Portu _Fronten" - -#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 -msgid "Send to _Back" -msgstr "_Sendu MalantaÅ­en" - -#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 -msgid "Rotate _Left" -msgstr "Turnu _Maldekstren" - -#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 -msgid "Rotate _Right" -msgstr "Turnu _Dekstren" - -#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "Renversu _Horizontale" - -#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "Renversu _Vertikale" - -#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 -msgid "_Lefts" -msgstr "_Maldekstre" - -#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 -msgid "_Rights" -msgstr "_Dekstre" - -#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 -msgid "_Centers" -msgstr "_Centre" - -#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 -msgid "_Tops" -msgstr "_Supre" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "Sube" - -#: src/stock.c:85 -msgid "Centers" -msgstr "Centre" - -#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "Ce_ntrita Etikedo" - -#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "Koloro de plenigo" - -#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "Koloro de linio" - -#: src/stock.c:90 src/stock.c:92 -msgid "Linked" -msgstr "Kunligita" - -#: src/stock.c:91 src/stock.c:93 -msgid "Not Linked" -msgstr "Neniu Kunligo" - -#: src/ui-property-bar.c:345 src/object-editor.c:499 -msgid "Default" -msgstr "DefaÅ­lto" - -#: src/ui-property-bar.c:360 src/object-editor.c:512 -msgid "No fill" -msgstr "Neniu Plenigo" - -#: src/ui-property-bar.c:375 src/object-editor.c:505 -msgid "No line" -msgstr "Neniu Linio" - -#: src/ui-sidebar.c:180 -msgid "Object properties" -msgstr "Ecoj de objekto" - -#: src/commands.c:385 -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/commands.c:399 -msgid "See the file AUTHORS for additional credits," -msgstr "Vidigu la dosieron nomitan AUTHORS por pluaj informoj," - -#: src/commands.c:400 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "aÅ­ vizitu http://glabels.sourceforge.net/" - -#: src/commands.c:409 -msgid " " -msgstr " " - -#: src/commands.c:424 -msgid "glabels" -msgstr "glabels" - -#: src/file.c:100 -msgid "New Label or Card" -msgstr "Nova Etikedo aÅ­ Karto" - -#: src/file.c:132 src/file.c:304 -msgid "Media Type" -msgstr "Speco de plurmedio" - -#: src/file.c:138 src/file.c:310 -msgid "Label orientation" -msgstr "Orientado de etikedo" - -#: src/file.c:269 -msgid "Label properties" -msgstr "Ecoj de etikedo" - -#: src/file.c:452 src/file.c:870 -msgid "All files" -msgstr "Ĉiuj dosieroj" - -#: src/file.c:457 src/file.c:875 -msgid "gLabels documents" -msgstr "Dokumentoj de gLabels" - -#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 -msgid "Empty file name selection" -msgstr "Elektado de nomon de vakua dosiero" - -#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 -msgid "Please select a file or supply a valid file name" -msgstr "Bonvolu indiki dosieron aÅ­ validan dosiernomon" - -#: src/file.c:519 src/file.c:631 -msgid "File does not exist" -msgstr "la dosiero ne ekzistas" - -#: src/file.c:563 data/ui/glabels-ui.xml.h:74 -msgid "Open" -msgstr "Malfermu" - -#: src/file.c:565 -msgid "Open label" -msgstr "Malfermu etikedon" - -#: src/file.c:707 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "Estas neeble malfermi dosieron \"%s\"" - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "La formato de dosiero ne estas subtenita" - -#: src/file.c:797 src/file.c:979 src/file.c:1174 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "estas neeble konservi dosieron \"%s\"" - -#: src/file.c:805 src/file.c:987 src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "Eraro dum konservado. la dosiero ankoraÅ­ ne estas konservita." - -#: src/file.c:848 src/file.c:1048 -#, c-format -msgid "Save \"%s\" as" -msgstr "Konservu \"%s\" kiel" - -#: src/file.c:935 src/file.c:1131 -msgid "Please supply a valid file name" -msgstr "Bonvolu indiki validan dosiernomon" - -#: src/file.c:952 src/file.c:1147 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "Ĉu mi devas anstataÅ­igi dosieron \"%s\"?" - -#: src/file.c:960 src/file.c:1155 -msgid "File already exists." -msgstr "La dosiero jam ekzistas." - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "Ĉu mi devas konservi la modifojn de la dokumento \"%s\" antaÅ­ ol fermi?" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "La modifoj estos perditaj se oni ne konservas ilin." - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "fermu sen konservi" - -#. Should not happen -#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 -#: data/glade/object-editor.glade.h:37 -msgid "points" -msgstr "punktoj" - -#: src/prefs.c:158 data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "coloj" - -#: src/prefs.c:160 -msgid "mm" -msgstr "mm" - -#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 -msgid "gLabels Preferences" -msgstr "Agordoj de gLabels" - -#. -#. * Submenu: Order -#. -#: src/view.c:3574 data/ui/glabels-ui.xml.h:154 -msgid "_Order" -msgstr "_Ordo" - -#. -#. * Submenu: Rotate/Flip -#. -#: src/view.c:3595 data/ui/glabels-ui.xml.h:160 -msgid "_Rotate/Flip" -msgstr "_Rotacio/Renverso" - -#. -#. * Submenu: Align Horizontally -#. -#: src/view.c:3628 -msgid "Align _Horizontally" -msgstr "LaÅ­linnigu _Horizontale" - -#. -#. * Submenu: Align Vertically -#. -#: src/view.c:3667 -msgid "Align _Vertically" -msgstr "LaÅ­linnigu _Verticale" - -#: src/view.c:3728 data/ui/glabels-ui.xml.h:137 -msgid "_Delete" -msgstr "_Forigu" - -#. Build editor. -#: src/view-box.c:224 -msgid "Box object properties" -msgstr "Ecoj de Fako" - -#. Build editor. -#: src/view-ellipse.c:224 -msgid "Ellipse object properties" -msgstr "Ecoj de Elipso" - -#. Build editor. -#: src/view-line.c:224 -msgid "Line object properties" -msgstr "Ecoj de Linio" - -#. Build editor. -#: src/view-image.c:223 -msgid "Image object properties" -msgstr "Ecoj de Bildo" - -#. Build editor. -#: src/view-text.c:251 -msgid "Text object properties" -msgstr "Ecoj de Teksto" - -#: src/view-text.c:563 data/glade/object-editor.glade.h:28 -msgid "Text" -msgstr "Teksto" - -#. Build editor. -#: src/view-barcode.c:210 -msgid "Barcode object properties" -msgstr "Ecoj de Strekkodo" - -#: src/view-barcode.c:580 src/print.c:1089 -msgid "Invalid barcode data" -msgstr "Nevalida strekkodo" - -#: src/merge-properties-dialog.c:231 -msgid "Merge Properties" -msgstr "Ecoj de Kunfando" - -#. ---- Source section ---- -#: src/merge-properties-dialog.c:237 -msgid "Source" -msgstr "Fonto" - -#: src/merge-properties-dialog.c:245 -msgid "Format:" -msgstr "Formato:" - -#. Location line -#: src/merge-properties-dialog.c:273 -msgid "Location:" -msgstr "Lokiĝo:" - -#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 -msgid "Select merge-database source" -msgstr "Elektu fonton de kunfand-datumbazo" - -#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 -msgid "N/A" -msgstr "N/A" - -#. ---- Sample Fields section ---- -#: src/merge-properties-dialog.c:300 -msgid "Record selection/preview:" -msgstr "Elektado/AntaÅ­montro de rikordo:" - -#: src/merge-properties-dialog.c:326 -msgid "Select" -msgstr "Elektu" - -#: src/merge-properties-dialog.c:334 -msgid "Record/Field" -msgstr "Rikordo/Kampo" - -#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 -msgid "Data" -msgstr "Datumoj" - -#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:81 -msgid "Print" -msgstr "Presu" - -#: src/print-dialog.c:281 -msgid "_Job" -msgstr "_Laboro" - -#: src/print-dialog.c:286 -msgid "P_rinter" -msgstr "P_rintilo" - -#. ----------- Add simple-copies widget ------------ -#: src/print-dialog.c:314 -msgid "Copies" -msgstr "Ekzempleroj" - -#. ------- Add merge control widget ------------ -#: src/print-dialog.c:322 -msgid "Document merge control" -msgstr "Kontrolo de kunfando de dokumento" - -#. ----------- Add custom print options area ------------ -#: src/print-dialog.c:330 -msgid "Options" -msgstr "Opcioj" - -#: src/print-dialog.c:553 src/print-dialog.c:592 -msgid "Print preview" -msgstr "AntaÅ­montro de presado" - -#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 -msgid "gLabels Template Designer" -msgstr "Desegnilo de modeloj por gLabels" - -#: src/bc.c:60 -msgid "POSTNET (any)" -msgstr "POSTNET (iu ajn)" - -#: src/bc.c:63 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (nur ZIP/CAP)" - -#: src/bc.c:66 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (ZIP/CAP+4)" - -#: src/bc.c:69 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: src/bc.c:72 -msgid "EAN (any)" -msgstr "EAN (iu ajn)" - -#: src/bc.c:75 -msgid "EAN-8" -msgstr "EAN-8" - -#: src/bc.c:78 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: src/bc.c:81 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: src/bc.c:84 -msgid "EAN-13" -msgstr "EAN-13" - -#: src/bc.c:87 -msgid "EAN-13 +2" -msgstr "EAN-13 +2" - -#: src/bc.c:90 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: src/bc.c:93 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A aÅ­ UPC-E)" - -#: src/bc.c:96 -msgid "UPC-A" -msgstr "UPC-A" - -#: src/bc.c:99 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: src/bc.c:102 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: src/bc.c:105 -msgid "UPC-E" -msgstr "UPC-E" - -#: src/bc.c:108 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: src/bc.c:111 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: src/bc.c:114 -msgid "ISBN" -msgstr "ISBN" - -#: src/bc.c:117 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: src/bc.c:120 -msgid "Code 39" -msgstr "Kodo 39" - -#: src/bc.c:123 -msgid "Code 128" -msgstr "Kodo 128" - -#: src/bc.c:126 -msgid "Code 128C" -msgstr "Kodo 128C" - -#: src/bc.c:129 -msgid "Code 128B" -msgstr "Kodo 128B" - -#: src/bc.c:132 -msgid "Interleaved 2 of 5" -msgstr "Interleaved 2 of 5" - -#: src/bc.c:135 -msgid "Codabar" -msgstr "Codabar" - -#: src/bc.c:138 -msgid "MSI" -msgstr "MSI" - -#: src/bc.c:141 -msgid "Plessey" -msgstr "Plessey" - -#: src/label.c:569 -msgid "Untitled" -msgstr "Sen nomo" - -#: src/xml-label.c:176 src/xml-label.c:213 -msgid "xmlParseFile error" -msgstr "Eraro de xml-dosiero de sintaksa analizo" - -#: src/xml-label.c:250 -msgid "No document root" -msgstr "Neniu radika dokumento" - -#: src/xml-label.c:264 -msgid "Importing from glabels 0.1 format" -msgstr "Importante el formato de glabels 0.1" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "Importante el formato de glabels 0.4" - -#: src/xml-label.c:279 -msgid "Importing from glabels 1.91 format" -msgstr "Importante el formato de glabels 1.91" - -#: src/xml-label.c:282 -msgid "bad document, unknown glabels Namespace" -msgstr "Nekorekta dokumento, nekonata Nomospaco de glabels" - -#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Nekorekta radika nodo = \"%s\"" - -#: src/xml-label.c:348 src/xml-label-191.c:165 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "nekorekta nodo en nodo de Dokumeto = \"%s\"" - -#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "nekorekta nodo = \"%s\"" - -#: src/xml-label.c:796 src/xml-label-191.c:605 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "nekorekta nodo en nodo de Datumoj = \"%s\"" - -#: src/xml-label.c:962 libglabels/xml-template.c:535 -msgid "Utf8 conversion error." -msgstr "eraro de konvertado en Utf8." - -#: src/xml-label.c:969 libglabels/xml-template.c:542 -msgid "Problem saving xml file." -msgstr "Problemo laÅ­ konservo de xml-dosiero" - -#. This should always be an id, but just in case a name -#. slips by! -#: src/xml-label-191.c:680 libglabels/xml-template.c:199 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "Nekonata id \"%s\" de grando de paĝo, provante kiel nomo" - -#: src/xml-label-191.c:690 libglabels/xml-template.c:209 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "Nekonata id de (paĝo)grando aÅ­ de nomo \"%s\"" - -#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 -msgid "None" -msgstr "Nenio" - -#: src/merge-init.c:53 -msgid "Text file with comma delimeters (CSV)" -msgstr "Teksta dosiero kun komo kiel disigilo (CSV)" - -#: src/merge-init.c:60 -msgid "Text file with colon delimeters" -msgstr "Teksta dosiero kun komo kiel disigilo" - -#: src/merge-init.c:67 -msgid "Text file with tab delimeters" -msgstr "Teksta dosiero kun TAB kiel disigilo" - -#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 -msgid "File:" -msgstr "Dosiero:" - -#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 -msgid "Key:" -msgstr "Ŝlosilo:" - -#: src/wdgt-print-copies.c:179 -msgid "Sheets:" -msgstr "Folioj:" - -#: src/wdgt-print-copies.c:197 -msgid "Labels" -msgstr "Etikedoj" - -#: src/wdgt-print-copies.c:200 -msgid "from:" -msgstr "de:" - -#: src/wdgt-print-copies.c:207 -msgid "to:" -msgstr "ĝis:" - -#: src/wdgt-print-merge.c:178 -msgid "Start on label" -msgstr "Starto en etikedo" - -#: src/wdgt-print-merge.c:186 -msgid "on 1st sheet" -msgstr "en 1a folio" - -#: src/wdgt-print-merge.c:195 -msgid "Copies:" -msgstr "Ekzempleroj:" - -#: src/wdgt-print-merge.c:201 -msgid "Collate" -msgstr "LaÅ­kajere" - -#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 -msgid "Description:" -msgstr "Priskribo:" - -#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 -msgid "Page size:" -msgstr "Grando de paĝo:" - -#: src/wdgt-media-select.c:290 -msgid "Label size:" -msgstr "Grando de etikedo:" - -#: src/wdgt-media-select.c:301 -msgid "Layout:" -msgstr "Aspekto:" - -#: src/wdgt-media-select.c:578 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d por folio)" - -#: src/wdgt-media-select.c:582 -#, c-format -msgid "%d per sheet" -msgstr "%d por folio" - -#: src/wdgt-media-select.c:614 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/wdgt-media-select.c:619 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s diametro" - -#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s diametro" - -#: src/wdgt-rotate-label.c:193 -msgid "Rotate" -msgstr "Rotacio" - -#. This is the default custom color -#: src/mygal/color-palette.c:396 -msgid "custom" -msgstr "personigita" - -#. "Custom" color - we'll pop up a GnomeColorPicker -#: src/mygal/color-palette.c:438 -msgid "Custom Color:" -msgstr "Personigita Koloro:" - -#: src/mygal/color-palette.c:446 -msgid "Choose Custom Color" -msgstr "Elektu personigitan koloron" - -#: src/mygal/color-palette.c:579 -msgid "black" -msgstr "nigro" - -#: src/mygal/color-palette.c:580 -msgid "light brown" -msgstr "hela bruna koloro" - -#: src/mygal/color-palette.c:581 -msgid "brown gold" -msgstr "malhela oro" - -#: src/mygal/color-palette.c:582 -msgid "dark green #2" -msgstr "malhela verdo #2" - -#: src/mygal/color-palette.c:583 -msgid "navy" -msgstr "mararmea bluo" - -#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 -msgid "dark blue" -msgstr "malhela bluo" - -#: src/mygal/color-palette.c:585 -msgid "purple #2" -msgstr "viola koloro #2" - -#: src/mygal/color-palette.c:586 -msgid "very dark gray" -msgstr "tre malhela grizo" - -#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 -msgid "dark red" -msgstr "malhela ruĝo" - -#: src/mygal/color-palette.c:590 -msgid "red-orange" -msgstr "ruĝ-oranĝo" - -#: src/mygal/color-palette.c:591 -msgid "gold" -msgstr "oro" - -#: src/mygal/color-palette.c:592 -msgid "dark green" -msgstr "malhela verdo" - -#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 -msgid "dull blue" -msgstr "nebrila bluo" - -#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 -msgid "blue" -msgstr "bluo" - -#: src/mygal/color-palette.c:595 -msgid "dull purple" -msgstr "nebrila violo" - -#: src/mygal/color-palette.c:596 -msgid "dark grey" -msgstr "malhela grizo" - -#: src/mygal/color-palette.c:599 -msgid "red" -msgstr "ruĝo" - -#: src/mygal/color-palette.c:600 -msgid "orange" -msgstr "oranĝa koloro" - -#: src/mygal/color-palette.c:601 -msgid "lime" -msgstr "limeta koloro" - -#: src/mygal/color-palette.c:602 -msgid "dull green" -msgstr "nebrila verdo" - -#: src/mygal/color-palette.c:603 -msgid "dull blue #2" -msgstr "nebrila bluo #2" - -#: src/mygal/color-palette.c:604 -msgid "sky blue #2" -msgstr "ĉielbluo #2" - -#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 -msgid "purple" -msgstr "violo" - -#: src/mygal/color-palette.c:606 -msgid "gray" -msgstr "grizo" - -#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 -msgid "magenta" -msgstr "intense karmezina" - -#: src/mygal/color-palette.c:610 -msgid "bright orange" -msgstr "brila oranĝo" - -#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 -msgid "yellow" -msgstr "flavo" - -#: src/mygal/color-palette.c:612 -msgid "green" -msgstr "verdo" - -#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 -msgid "cyan" -msgstr "cejano" - -#: src/mygal/color-palette.c:614 -msgid "bright blue" -msgstr "brila bluo" - -#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 -msgid "red purple" -msgstr "ruĝ-violo" - -#: src/mygal/color-palette.c:616 -msgid "light grey" -msgstr "hela grizo" - -#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 -msgid "pink" -msgstr "rozkoloro" - -#: src/mygal/color-palette.c:620 -msgid "light orange" -msgstr "hela oranĝo" - -#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 -msgid "light yellow" -msgstr "hela flavo" - -#: src/mygal/color-palette.c:622 -msgid "light green" -msgstr "hela verdo" - -#: src/mygal/color-palette.c:623 -msgid "light cyan" -msgstr "hela cejano" - -#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 -msgid "light blue" -msgstr "hela bluo" - -#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 -msgid "light purple" -msgstr "hela violo" - -#: src/mygal/color-palette.c:626 -msgid "white" -msgstr "blanko" - -#: src/mygal/color-palette.c:631 -msgid "purplish blue" -msgstr "viol-bluo" - -#: src/mygal/color-palette.c:635 -msgid "dark purple" -msgstr "malhela violo" - -#: src/mygal/color-palette.c:637 -msgid "sky blue" -msgstr "ĉielbluo" - -#: libglabels/template.c:848 -#, c-format -msgid "Generic %s full page" -msgstr "Ĝenerala %s plena paĝo" - -#: libglabels/template.c:897 -msgid "No template files found!" -msgstr "Neniu modelo estis trovita!" - -#. Create and append an "Other" entry. -#: libglabels/paper.c:67 -msgid "Other" -msgstr "Aliaĵoj" - -#: libglabels/paper.c:361 -msgid "No paper files found!" -msgstr "Neniu papera dosiero estis trovita!!" - -#: data/ui/glabels-ui.xml.h:1 -msgid "About glabels" -msgstr "Pri glabels" - -#: data/ui/glabels-ui.xml.h:2 -msgid "About..." -msgstr "Pri..." - -#: data/ui/glabels-ui.xml.h:3 -msgid "Align _Horizontal" -msgstr "LaÅ­linnigu _Horizontale" - -#: data/ui/glabels-ui.xml.h:4 -msgid "Align _Vertical" -msgstr "LaÅ­linnigu _Verticale" - -#: data/ui/glabels-ui.xml.h:5 -msgid "Align objects to bottoms" -msgstr "LaÅ­linnigu objektojn sube" - -#: data/ui/glabels-ui.xml.h:6 -msgid "Align objects to horizontal centers" -msgstr "LaÅ­linnigu objektojn laÅ­ horizontala centro" - -#: data/ui/glabels-ui.xml.h:7 -msgid "Align objects to left edges" -msgstr "LaÅ­linnigu objektojn laÅ­ maldekstra rando" - -#: data/ui/glabels-ui.xml.h:8 -msgid "Align objects to right edges" -msgstr "LaÅ­linnigu objektojn laÅ­ dekstra rando" - -#: data/ui/glabels-ui.xml.h:9 -msgid "Align objects to tops" -msgstr "LaÅ­linnigu objektojn supre" - -#: data/ui/glabels-ui.xml.h:10 -msgid "Align objects to vertical centers" -msgstr "LaÅ­liniigu objektojn laÅ­ verticala centro" - -#: data/ui/glabels-ui.xml.h:12 -msgid "Bold" -msgstr "Dika" - -#: data/ui/glabels-ui.xml.h:14 -msgid "Center align" -msgstr "LaÅ­liniiĝu centre" - -#: data/ui/glabels-ui.xml.h:15 -msgid "Center objects to horizontal label center" -msgstr "Centrigu objektojn laÅ­ horizontala centro de etikedo" - -#: data/ui/glabels-ui.xml.h:16 -msgid "Center objects to vertical label center" -msgstr "Centrigu objektojn laÅ­ vertikala centro de etikedo" - -#: data/ui/glabels-ui.xml.h:17 -msgid "Change the visibility of markup lines in the current window" -msgstr "Ŝangu videblecon de linioj de demarkacio en nuna fenestro" - -#: data/ui/glabels-ui.xml.h:18 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "Ŝangu videblecon de la ilarstango de desegno en nuna fenestro" - -#: data/ui/glabels-ui.xml.h:19 -msgid "Change the visibility of the grid in the current window" -msgstr "Ŝangu videblecon de la krado en nuna fenestro" - -#: data/ui/glabels-ui.xml.h:20 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "Ŝangu videblecon de la ĉefa ilarstango en nuna fenestro" - -#: data/ui/glabels-ui.xml.h:21 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "Ŝangu videblecon de ilarstango de ecoj en nuna fenestro" - -#: data/ui/glabels-ui.xml.h:22 -msgid "Close" -msgstr "Fermu" - -#: data/ui/glabels-ui.xml.h:23 -msgid "Close the current file" -msgstr "Fermu la nunan dosieron" - -#: data/ui/glabels-ui.xml.h:24 -msgid "Configure the application" -msgstr "Agordu la programon" - -#: data/ui/glabels-ui.xml.h:25 -msgid "Contents" -msgstr "Entenoj" - -#: data/ui/glabels-ui.xml.h:26 -msgid "Copy" -msgstr "Kopiu" - -#: data/ui/glabels-ui.xml.h:27 -msgid "Copy the selection" -msgstr "Kopiu la elektaĵon" - -#: data/ui/glabels-ui.xml.h:28 -msgid "Create a custom template" -msgstr "Kreu personigitan modelon" - -#: data/ui/glabels-ui.xml.h:29 -msgid "Create a new document" -msgstr "Kreu novan dokumenton" - -#: data/ui/glabels-ui.xml.h:30 -msgid "Create barcode object" -msgstr "Keu strekkodan objekton" - -#: data/ui/glabels-ui.xml.h:31 -msgid "Create box/rectangle object" -msgstr "Kreu objekton de areo/rektangulo" - -#: data/ui/glabels-ui.xml.h:32 -msgid "Create ellipse/circle object" -msgstr "Kreu objekton de elipse/circlo" - -#: data/ui/glabels-ui.xml.h:33 -msgid "Create image object" -msgstr "Kreu bildan objekton" - -#: data/ui/glabels-ui.xml.h:34 -msgid "Create line object" -msgstr "Kreu linian objekton" - -#: data/ui/glabels-ui.xml.h:35 -msgid "Create text object" -msgstr "Kreu tekstan objekton" - -#: data/ui/glabels-ui.xml.h:36 -msgid "Cu_t" -msgstr "El_tondu" - -#: data/ui/glabels-ui.xml.h:37 -msgid "Customize" -msgstr "Personigu" - -#: data/ui/glabels-ui.xml.h:38 -msgid "Customize Drawing Toolbar" -msgstr "Personigu ilarstangon de desegno" - -#: data/ui/glabels-ui.xml.h:39 -msgid "Customize Main Toolbar" -msgstr "Personigu ĉefan ilarstangon" - -#: data/ui/glabels-ui.xml.h:40 -msgid "Customize Property Toolbar" -msgstr "Personigu ilarstangon de ecoj" - -#: data/ui/glabels-ui.xml.h:41 -msgid "Customize toolbars" -msgstr "Personigu ilarstangojn" - -#: data/ui/glabels-ui.xml.h:42 -msgid "Cut" -msgstr "Eltondu" - -#: data/ui/glabels-ui.xml.h:43 -msgid "Cut the selection" -msgstr "Eltondu elektaĵon" - -#: data/ui/glabels-ui.xml.h:44 -msgid "Decrease magnification" -msgstr "Malpliigu zomon" - -#: data/ui/glabels-ui.xml.h:45 -msgid "Delete" -msgstr "Forigu" - -#: data/ui/glabels-ui.xml.h:46 -msgid "Delete the selected objects" -msgstr "Forigu elektitajn objektojn" - -#: data/ui/glabels-ui.xml.h:47 -msgid "Drawing toolbar" -msgstr "Ilarstango de desegno" - -#: data/ui/glabels-ui.xml.h:48 -msgid "Dump XML" -msgstr "Ŝutu XML" - -#: data/ui/glabels-ui.xml.h:49 -msgid "Dump the UI Xml description" -msgstr "Ŝutu priskribon de UI xml" - -#: data/ui/glabels-ui.xml.h:50 -msgid "Edit merge properties" -msgstr "Redaktu ecojn de kunfando" - -#: data/ui/glabels-ui.xml.h:54 -msgid "Flip object horizontally" -msgstr "Renversu objekton horizontale" - -#: data/ui/glabels-ui.xml.h:55 -msgid "Flip object vertically" -msgstr "Renversu objekton vertikale" - -#: data/ui/glabels-ui.xml.h:56 -msgid "Font name" -msgstr "Nomo de tiparo" - -#: data/ui/glabels-ui.xml.h:57 -msgid "Font selector" -msgstr "Elektilo de tiparo" - -#: data/ui/glabels-ui.xml.h:58 -msgid "Font size" -msgstr "Tipargrando" - -#: data/ui/glabels-ui.xml.h:59 -msgid "Icon and _Text" -msgstr "Ikono kaj _Teksto" - -#: data/ui/glabels-ui.xml.h:60 -msgid "Increase magnification" -msgstr "Pliigu zomon" - -#: data/ui/glabels-ui.xml.h:61 -msgid "Italic" -msgstr "Kursivo" - -#: data/ui/glabels-ui.xml.h:63 -msgid "Left align" -msgstr "LaÅ­liniigu maldekstren" - -#: data/ui/glabels-ui.xml.h:65 -msgid "Line width" -msgstr "Larĝo de linio" - -#: data/ui/glabels-ui.xml.h:66 -msgid "Lower object to bottom" -msgstr "Subentiru objekton ĝis la fundo" - -#: data/ui/glabels-ui.xml.h:67 -msgid "M_arkup" -msgstr "M_arkado" - -#: data/ui/glabels-ui.xml.h:68 -msgid "Main toolbar" -msgstr "Ĉefa ilarstango" - -#: data/ui/glabels-ui.xml.h:69 -msgid "Markup" -msgstr "Markaĵoj" - -#: data/ui/glabels-ui.xml.h:70 -msgid "Modify document properties" -msgstr "Radaktu ecojn de dokumento" - -#: data/ui/glabels-ui.xml.h:71 -msgid "New" -msgstr "Nova" - -#: data/ui/glabels-ui.xml.h:72 -msgid "Object property editor" -msgstr "Redaktilo de ecoj por objekto" - -#: data/ui/glabels-ui.xml.h:73 -msgid "Only show icons in the main toolbar" -msgstr "Videbligu nur ikonojn en ĉefa ilarstango" - -#: data/ui/glabels-ui.xml.h:75 -msgid "Open a file" -msgstr "Malfermu iun dosieron" - -#: data/ui/glabels-ui.xml.h:76 -msgid "Open the glabels manual" -msgstr "Malfermu manlibron de glabels" - -#: data/ui/glabels-ui.xml.h:77 -msgid "Paste" -msgstr "Enmetu" - -#: data/ui/glabels-ui.xml.h:78 -msgid "Paste the clipboard" -msgstr "Enmetu la poŝon" - -#: data/ui/glabels-ui.xml.h:79 -msgid "Pr_eferences..." -msgstr "A_gordoj..." - -#: data/ui/glabels-ui.xml.h:80 -msgid "Preferences" -msgstr "Agordoj" - -#: data/ui/glabels-ui.xml.h:82 -msgid "Print the current file" -msgstr "Presu la nunan dosieron" - -#: data/ui/glabels-ui.xml.h:83 -msgid "Proper_ties..." -msgstr "E_coj..." - -#: data/ui/glabels-ui.xml.h:84 -msgid "Properties" -msgstr "Ecoj" - -#: data/ui/glabels-ui.xml.h:85 -msgid "Property toolbar" -msgstr "Ilarstango de ecoj" - -#: data/ui/glabels-ui.xml.h:86 -msgid "Quit" -msgstr "Eliro" - -#: data/ui/glabels-ui.xml.h:87 -msgid "Quit the program" -msgstr "Eliru el programo" - -#: data/ui/glabels-ui.xml.h:88 -msgid "Raise object to top" -msgstr "Suprentiru objekton ĝis la pinto" - -#: data/ui/glabels-ui.xml.h:89 -msgid "Recent _Files" -msgstr "Fre_ŝaj Dosieroj" - -#: data/ui/glabels-ui.xml.h:90 -msgid "Redo" -msgstr "Refaru" - -#: data/ui/glabels-ui.xml.h:91 -msgid "Redo the undone action" -msgstr "Refaru la lastan malfaritan agon" - -#: data/ui/glabels-ui.xml.h:92 -msgid "Remove all selections" -msgstr "Formovu ĉiujn elektaĵojn" - -#: data/ui/glabels-ui.xml.h:94 -#, no-c-format -msgid "Restore scale to 100%" -msgstr "Reen 100%" - -#: data/ui/glabels-ui.xml.h:95 -msgid "Right align" -msgstr "laÅ­liniigu dekstren" - -#: data/ui/glabels-ui.xml.h:98 -msgid "Rotate object 90 clockwise" -msgstr "Turnu la objekton je 90° dekstroĝire" - -#: data/ui/glabels-ui.xml.h:99 -msgid "Rotate object 90 counter-clockwise" -msgstr "Turnu la objekton je 90° kontraÅ­montrile" - -#: data/ui/glabels-ui.xml.h:100 -msgid "Save" -msgstr "Konservu" - -#: data/ui/glabels-ui.xml.h:101 -msgid "Save As" -msgstr "Konservu kiel" - -#: data/ui/glabels-ui.xml.h:102 -msgid "Save _As..." -msgstr "Konservu kiel..." - -#: data/ui/glabels-ui.xml.h:103 -msgid "Save the current file" -msgstr "Konservu la nunan dosieron" - -#: data/ui/glabels-ui.xml.h:104 -msgid "Save the current file with a different name" -msgstr "Konservu la nunan dosieron per alia nomo" - -#: data/ui/glabels-ui.xml.h:105 -msgid "Select All" -msgstr "Elektu Ĉion" - -#: data/ui/glabels-ui.xml.h:106 -msgid "Select _All" -msgstr "Elektu _Ĉion" - -#: data/ui/glabels-ui.xml.h:107 -msgid "Select all objects" -msgstr "Elektu ĉiujn objektojn" - -#: data/ui/glabels-ui.xml.h:108 -msgid "Select, move and modify objects" -msgstr "Elektu, movu kaj redaktu objektojn" - -#: data/ui/glabels-ui.xml.h:110 -msgid "Set main toolbar button style according to desktop default" -msgstr "Agordu butonstilon de ĉefa ilarstango laÅ­ defaÅ­lto de labortablo" - -#: data/ui/glabels-ui.xml.h:111 -msgid "Show _Tooltips" -msgstr "Mon_tru Sugestojn" - -#: data/ui/glabels-ui.xml.h:112 -msgid "Show both icons and texts in the main toolbar" -msgstr "Vidigu kaj ikonojn kaj tekstojn en la ĉefa ilarstango" - -#: data/ui/glabels-ui.xml.h:113 -msgid "Show tooltips in the drawing toolbar" -msgstr "Vidigu sugestojn en la ilarstango de desegno" - -#: data/ui/glabels-ui.xml.h:114 -msgid "Show tooltips in the main toolbar" -msgstr "Vidigu sugestojn en la ĉefa ilarstango" - -#: data/ui/glabels-ui.xml.h:115 -msgid "Show tooltips in the property toolbar" -msgstr "Vidigu sugestojn en la ilarstango de ecoj" - -#: data/ui/glabels-ui.xml.h:116 -msgid "Template Designer" -msgstr "Desegnilo de Modeloj" - -#: data/ui/glabels-ui.xml.h:117 -msgid "Template _Designer..." -msgstr "_Desegnilo de Modeloj..." - -#: data/ui/glabels-ui.xml.h:118 -msgid "Text color" -msgstr "Koloro de teksto" - -#: data/ui/glabels-ui.xml.h:119 -msgid "U_n-select All" -msgstr "Malelektu Ĉio_n" - -#: data/ui/glabels-ui.xml.h:120 -msgid "Un-select All" -msgstr "Malelektu Ĉion" - -#: data/ui/glabels-ui.xml.h:121 -msgid "Undo" -msgstr "Malfaru" - -#: data/ui/glabels-ui.xml.h:122 -msgid "Undo the last action" -msgstr "Nuligu lastan agon" - -#: data/ui/glabels-ui.xml.h:123 -msgid "Zoom _1:1" -msgstr "Zomo je _1:1" - -#: data/ui/glabels-ui.xml.h:124 -msgid "Zoom _In" -msgstr "_Zomo" - -#: data/ui/glabels-ui.xml.h:125 -msgid "Zoom _Out" -msgstr "_Malzomo" - -#: data/ui/glabels-ui.xml.h:126 -msgid "Zoom to _fit" -msgstr "Alĝustigu" - -#: data/ui/glabels-ui.xml.h:127 -msgid "Zoom to fit window" -msgstr "Alĝustigu al la fenestro" - -#: data/ui/glabels-ui.xml.h:128 -msgid "_About..." -msgstr "_Pri..." - -#: data/ui/glabels-ui.xml.h:129 -msgid "_Bottoms" -msgstr "Su_be" - -#: data/ui/glabels-ui.xml.h:132 -msgid "_Close" -msgstr "_Fermu" - -#: data/ui/glabels-ui.xml.h:133 -msgid "_Contents" -msgstr "_Entenoj" - -#: data/ui/glabels-ui.xml.h:134 -msgid "_Copy" -msgstr "_Kopiu" - -#: data/ui/glabels-ui.xml.h:135 -msgid "_Create Object" -msgstr "_Kreu Objekton" - -#: data/ui/glabels-ui.xml.h:136 -msgid "_Debug" -msgstr "_Sencimigo" - -#: data/ui/glabels-ui.xml.h:138 -msgid "_Desktop Default" -msgstr "DefaÅ­lto por Labortabulo" - -#: data/ui/glabels-ui.xml.h:139 -msgid "_Drawing Toolbar" -msgstr "Ilarstango de _Desegno" - -#: data/ui/glabels-ui.xml.h:140 -msgid "_Edit" -msgstr "R_edaktu" - -#: data/ui/glabels-ui.xml.h:142 -msgid "_File" -msgstr "_Dosiero" - -#: data/ui/glabels-ui.xml.h:143 -msgid "_Grid" -msgstr "_Krado" - -#: data/ui/glabels-ui.xml.h:144 -msgid "_Help" -msgstr "_Helpilo" - -#: data/ui/glabels-ui.xml.h:145 -msgid "_Icon" -msgstr "_Ikono" - -#: data/ui/glabels-ui.xml.h:149 -msgid "_Main Toolbar" -msgstr "_Ĉefa Ilarstango" - -#: data/ui/glabels-ui.xml.h:150 -msgid "_Merge Properties..." -msgstr "_Kunfandu Ecojn..." - -#: data/ui/glabels-ui.xml.h:151 -msgid "_New" -msgstr "_Nova" - -#: data/ui/glabels-ui.xml.h:152 -msgid "_Objects" -msgstr "_Objektoj" - -#: data/ui/glabels-ui.xml.h:153 -msgid "_Open..." -msgstr "M_alfermu..." - -#: data/ui/glabels-ui.xml.h:155 -msgid "_Paste" -msgstr "_Enmetu" - -#: data/ui/glabels-ui.xml.h:156 -msgid "_Print..." -msgstr "_Presu..." - -#: data/ui/glabels-ui.xml.h:157 -msgid "_Property Toolbar" -msgstr "Ilarstango de Eco_j" - -#: data/ui/glabels-ui.xml.h:158 -msgid "_Quit" -msgstr "_Eliro" - -#: data/ui/glabels-ui.xml.h:161 -msgid "_Save" -msgstr "_Konservu" - -#: data/ui/glabels-ui.xml.h:165 -msgid "_View" -msgstr "_Videbligo" - -#: data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr " " - -#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 -#: data/glade/template-designer.glade.h:5 -msgid "*" -msgstr "*" - -#: data/glade/prefs-dialog.glade.h:3 -msgid "Default page size" -msgstr "DefaÅ­lta grando de paĝo" - -#: data/glade/prefs-dialog.glade.h:4 -msgid "Fill" -msgstr "Plenigo" - -#: data/glade/prefs-dialog.glade.h:5 -msgid "Line" -msgstr "Linio" - -#: data/glade/prefs-dialog.glade.h:6 -msgid "Text" -msgstr "Teksto" - -#: data/glade/prefs-dialog.glade.h:7 -msgid "Units" -msgstr "Unitoj" - -#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 -msgid "Alignment:" -msgstr "Alliniĝo:" - -#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 -msgid "Color:" -msgstr "Koloro:" - -#: data/glade/prefs-dialog.glade.h:10 -msgid "Font:" -msgstr "Tiparo:" - -#: data/glade/prefs-dialog.glade.h:11 -msgid "ISO A4" -msgstr "ISO A4" - -#: data/glade/prefs-dialog.glade.h:12 -msgid "Inches" -msgstr "Coloj" - -#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 -msgid "Line Spacing:" -msgstr "Interspaco:" - -#: data/glade/prefs-dialog.glade.h:14 -msgid "Locale" -msgstr "Nacia" - -#: data/glade/prefs-dialog.glade.h:15 -msgid "Millimeters" -msgstr "Milimetroj" - -#: data/glade/prefs-dialog.glade.h:16 -msgid "Object defaults" -msgstr "DefaÅ­ltoj de objekto" - -#: data/glade/prefs-dialog.glade.h:17 -msgid "Points" -msgstr "Punktoj" - -#: data/glade/prefs-dialog.glade.h:18 -msgid "Select default properties for new objects." -msgstr "Elektu defaÅ­ltajn ecojn por novaj objektoj." - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "Elektu nacian specifan agmanieron." - -#. Most popular (at top of list) -#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:29 -msgid "US Letter" -msgstr "US·Letero" - -#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 -#: data/glade/template-designer.glade.h:72 -msgid "Width:" -msgstr "Larĝo:" - -#: data/glade/object-editor.glade.h:2 -msgid "00000000000 00000" -msgstr "00000000000 00000" - -#: data/glade/object-editor.glade.h:3 -msgid "Xxx object properties" -msgstr "Xxx ecoj de objekto" - -#: data/glade/object-editor.glade.h:5 -msgid "Allow merge to automatically shrink text" -msgstr "" - -#: data/glade/object-editor.glade.h:6 -msgid "Angle:" -msgstr "Angulo:" - -#: data/glade/object-editor.glade.h:7 -msgid "Checksum" -msgstr "Kontrolsumo" - -#: data/glade/object-editor.glade.h:10 -msgid "Family:" -msgstr "Familio:" - -#: data/glade/object-editor.glade.h:12 -msgid "Fill" -msgstr "Plenigo" - -#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 -msgid "Height:" -msgstr "Alto:" - -#: data/glade/object-editor.glade.h:14 -msgid "Image" -msgstr "Bildo" - -#: data/glade/object-editor.glade.h:15 -msgid "Insert merge field" -msgstr "Enigu campon de kunfando" - -#: data/glade/object-editor.glade.h:17 -msgid "Length:" -msgstr "Longo:" - -#: data/glade/object-editor.glade.h:18 -msgid "Line" -msgstr "Linio" - -#: data/glade/object-editor.glade.h:20 -msgid "Literal:" -msgstr "Literalo:" - -#: data/glade/object-editor.glade.h:21 -msgid "Load image" -msgstr "Ŝargu bildon" - -#: data/glade/object-editor.glade.h:22 -msgid "Position" -msgstr "Lokiĝo" - -#: data/glade/object-editor.glade.h:23 -msgid "Reset image size" -msgstr "Restarigu grandon de bildo" - -#: data/glade/object-editor.glade.h:24 -msgid "Size" -msgstr "Grando" - -#: data/glade/object-editor.glade.h:25 -msgid "Size:" -msgstr "Grando:" - -#: data/glade/object-editor.glade.h:26 -msgid "Style" -msgstr "Stilo" - -#: data/glade/object-editor.glade.h:27 -msgid "Style:" -msgstr "Stilo:" - -#: data/glade/object-editor.glade.h:30 -msgid "X:" -msgstr "X:" - -#: data/glade/object-editor.glade.h:31 -msgid "Y:" -msgstr "Y:" - -#: data/glade/object-editor.glade.h:32 -msgid "degrees" -msgstr "gradoj" - -#: data/glade/object-editor.glade.h:33 -msgid "dialog1" -msgstr "fenestr1" - -#: data/glade/object-editor.glade.h:34 -msgid "digits:" -msgstr "ciferoj:" - -#: data/glade/object-editor.glade.h:35 -msgid "format:" -msgstr "formato:" - -#: data/glade/template-designer.glade.h:1 -msgid " " -msgstr " " - -#: data/glade/template-designer.glade.h:2 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(es., \"Etichette di spedizione,\" \"Vizitkartoj,\" ...)" - -#: data/glade/template-designer.glade.h:3 -msgid "(e.g., 8163A)" -msgstr "(es. 8163A)" - -#: data/glade/template-designer.glade.h:4 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(es. Avery, Acme, ...)" - -#: data/glade/template-designer.glade.h:6 -msgid "1. Outer radius:" -msgstr "1. Ekstera radiuso:" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "1. Radiuso:" - -#: data/glade/template-designer.glade.h:8 -msgid "1. Width:" -msgstr "1. Larĝo:" - -#: data/glade/template-designer.glade.h:9 -msgid "2. Height:" -msgstr "2. Alto:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "2. Interna radiuso:" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "2. Forĵetaĵo (surskrivebla):" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "3. Marĝeno" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "3. Rondo (radiuso de angulo):" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "4. Horiz. forĵetaĵo (surskrivebla):" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "5. Vert. forĵetaĵo (surskrivebla):" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "5. Forĵetaĵo (surskrivebla):" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "6. Marĝeno" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "Marca/Produttore:" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "KD/DVD" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"Gratulojn!\n" -"\n" -"Vi finis Desegnilon de Modelojn por gLabels.\n" -"Se vi volas konservi tiun ĉi projekton, alklaku sur \"Apliku\".\n" -"\n" -"Male, alklaku sur \"Nuligu\" por nuligi\n" -"vian projekton tutan aÅ­ \"Retroen\" por ankoraÅ­ redakti tiun ĉi desegnon." - -#: data/glade/template-designer.glade.h:30 -msgid "Design Completed" -msgstr "Fino de Projektado" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "Distanco el maldekstra rando (x0):" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "Distanco el supra rando (y0):" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "Horizontala kvanto (dx):" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" - -#: data/glade/template-designer.glade.h:40 -msgid "Label Size (CD/DVD)" -msgstr "Grando de etikedo (KD/DVD)" - -#: data/glade/template-designer.glade.h:41 -msgid "Label Size (Round)" -msgstr "Grando de etikedo (Ronda)" - -#: data/glade/template-designer.glade.h:42 -msgid "Label or Card Shape" -msgstr "Formo de etikedo aÅ­ de karto" - -#: data/glade/template-designer.glade.h:43 -msgid "Label or Card Size (Rectangular)" -msgstr "Formo de etikedo aÅ­ de karto (Rektangula)" - -#: data/glade/template-designer.glade.h:44 -msgid "Layout #1" -msgstr "Aspekto #1" - -#: data/glade/template-designer.glade.h:45 -msgid "Layout #2" -msgstr "Aspekto #2" - -#: data/glade/template-designer.glade.h:46 -msgid "Layout(s)" -msgstr "Aspekto(j)" - -#: data/glade/template-designer.glade.h:47 -msgid "Name and Description" -msgstr "Nomo kaj Priskribo" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "Numero transverse (nx):" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "Numero sube (ny):" - -#: data/glade/template-designer.glade.h:50 -msgid "Number of Layouts" -msgstr "Nombro da Aspektoj" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "Nombro da aspektoj:" - -#: data/glade/template-designer.glade.h:52 -msgid "Page Size" -msgstr "Grando de paĝo" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "Parto #:" - -#: data/glade/template-designer.glade.h:55 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "" - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "Bonvolu enmeti menditajn informojn." - -#: data/glade/template-designer.glade.h:57 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "" -"Bonvolu enmeti menditajn parametrojn de grando por unu etikedo en " -"la modelo." - -#: data/glade/template-designer.glade.h:58 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" -"Bonvolu enmeti menditajn parametrojn de grando por unu etikedo aÅ­ karto en " -"la modelo." - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "" - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "Bonvolu elekti grandon de paĝo por modelo de skribvaroj." - -#: data/glade/template-designer.glade.h:61 -msgid "Print test sheet" -msgstr "Presu paĝon de elprovo" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "Rektangula aÅ­ kvadra (ankaÅ­ kun rondaj anguloj)" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "Ronda" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"Modeloj necesas\n" -"du aspektojn." - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"Modeloj necesas nur \n" -"unu aspekton." - -#: data/glade/template-designer.glade.h:68 -msgid "Vertical pitch (dy):" -msgstr "Vertikala kvanto (dy):" - -#: data/glade/template-designer.glade.h:69 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"Bonvenon! Tiu ĉi estas Desegnilo de Modeloj por gLabels.\n" -"\n" -"Tio helpos vin por krei personigitan modelon por gLabels." - -#. Other ISO A series sizes -#: data/templates/paper-sizes.xml.h:2 -msgid "A0" -msgstr "A0" - -#: data/templates/paper-sizes.xml.h:3 -msgid "A1" -msgstr "A1" - -#: data/templates/paper-sizes.xml.h:4 -msgid "A10" -msgstr "A10" - -#: data/templates/paper-sizes.xml.h:5 -msgid "A2" -msgstr "A2" - -#: data/templates/paper-sizes.xml.h:6 -msgid "A3" -msgstr "A3" - -#: data/templates/paper-sizes.xml.h:7 -msgid "A4" -msgstr "A4" - -#: data/templates/paper-sizes.xml.h:8 -msgid "A5" -msgstr "A5" - -#: data/templates/paper-sizes.xml.h:9 -msgid "A6" -msgstr "A6" - -#: data/templates/paper-sizes.xml.h:10 -msgid "A7" -msgstr "A7" - -#: data/templates/paper-sizes.xml.h:11 -msgid "A8" -msgstr "A8" - -#: data/templates/paper-sizes.xml.h:12 -msgid "A9" -msgstr "A9" - -#. ISO B series sizes -#: data/templates/paper-sizes.xml.h:14 -msgid "B0" -msgstr "B0" - -#: data/templates/paper-sizes.xml.h:15 -msgid "B1" -msgstr "B1" - -#: data/templates/paper-sizes.xml.h:16 -msgid "B10" -msgstr "B10" - -#: data/templates/paper-sizes.xml.h:17 -msgid "B2" -msgstr "B2" - -#: data/templates/paper-sizes.xml.h:18 -msgid "B3" -msgstr "B3" - -#: data/templates/paper-sizes.xml.h:19 -msgid "B4" -msgstr "B4" - -#: data/templates/paper-sizes.xml.h:20 -msgid "B5" -msgstr "B5" - -#: data/templates/paper-sizes.xml.h:21 -msgid "B6" -msgstr "B6" - -#: data/templates/paper-sizes.xml.h:22 -msgid "B7" -msgstr "B7" - -#: data/templates/paper-sizes.xml.h:23 -msgid "B8" -msgstr "B8" - -#: data/templates/paper-sizes.xml.h:24 -msgid "B9" -msgstr "B9" - -#: data/templates/paper-sizes.xml.h:25 -msgid "US Executive" -msgstr "US Executive" - -#. Other US paper sizes -#: data/templates/paper-sizes.xml.h:27 -msgid "US Legal" -msgstr "US Legal" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:2 -#: data/templates/zweckform-iso-templates.xml.h:2 -msgid "Address Labels" -msgstr "Etikedo por adreso" - -#. =================================================================== -#. ============================================================ -#. =================================================================== -#. ====================================================== -#: data/templates/avery-us-templates.xml.h:4 -#: data/templates/avery-iso-templates.xml.h:4 -#: data/templates/zweckform-iso-templates.xml.h:6 -#: data/templates/misc-us-templates.xml.h:3 -#: data/templates/misc-iso-templates.xml.h:17 -msgid "Business Cards" -msgstr "Vizitkartoj" - -#: data/templates/avery-us-templates.xml.h:5 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "Etikedoj por KD/DVD (Etikedoj por diskoj)" - -#: data/templates/avery-us-templates.xml.h:6 -msgid "CD/DVD Labels (Spine Labels)" -msgstr "Etikedoj por KD/DVD (Etikedoj por diskoj)" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:8 -msgid "Diskette Labels" -msgstr "Etikedoj por disketoj" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:10 -msgid "Filing Labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:12 -msgid "Full Sheet Labels" -msgstr "Paĝo plena da ekikedoj" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:14 -msgid "Large Round Labels" -msgstr "Grandaj rondigitaj etikedoj" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:16 -msgid "Name Badge Labels" -msgstr "Nomŝildetoj" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:18 -msgid "Return Address Labels" -msgstr "Etikedoj por adreso de sendinto" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:20 -msgid "Shipping Labels" -msgstr "Etikedoj por ekspedo" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:22 -msgid "Small Round Labels" -msgstr "Malgrandaj rondigitaj etikedoj" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:24 -msgid "Square Labels" -msgstr "Kvardaj etikedoj" - -#: data/templates/avery-us-templates.xml.h:25 -msgid "Video Tape Face Labels" -msgstr "Etikedoj por videokasedo (faco)" - -#: data/templates/avery-us-templates.xml.h:26 -msgid "Video Tape Spine Labels" -msgstr "Etikedoj por videokasedo (dorso)" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:2 -msgid "Address labels" -msgstr "Etikedoj por adreso" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:6 -msgid "CD Booklet" -msgstr "CD Booklet" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:8 -msgid "CD Inlet" -msgstr "CD Inlet" - -#. =============================================================== -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:10 -#: data/templates/zweckform-iso-templates.xml.h:8 -#: data/templates/misc-us-templates.xml.h:5 -#: data/templates/misc-iso-templates.xml.h:21 -msgid "CD/DVD Labels" -msgstr "Etikedoj por KD/DVD" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:12 -msgid "Diskette labels" -msgstr "Etikedoj por disketoj" - -#. =============================================================== -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:14 -#: data/templates/zweckform-iso-templates.xml.h:14 -#: data/templates/misc-iso-templates.xml.h:35 -msgid "Mailing Labels" -msgstr "Etikedoj por poŝto" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:16 -msgid "Mailing labels" -msgstr "Etikedoj por poŝto" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:18 -msgid "Mini Address Labels" -msgstr "Eta etikedoj por adreso" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:20 -msgid "Shipping labels" -msgstr "Etikedo por ekspedo" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:4 -msgid "Allround Labels" -msgstr "Plenrondaj etikedoj" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:10 -msgid "Correction and Cover-up Labels" -msgstr "Etikedoj por korektado kaj kovrado" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:12 -msgid "Lever Arch File Labels" -msgstr "Levilaj arkaj etikedoj por dosieroj" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:16 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "QSL-Karten Etiketten 70mm x 50,8mm" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:18 -msgid "Rectangular Copier Labels" -msgstr "Rektangulaj etikedoj por kopiado" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:20 -#: data/templates/misc-iso-templates.xml.h:44 -msgid "Rectangular Labels" -msgstr "Rektangulaj Etikedoj" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:22 -msgid "Video Labels (back)" -msgstr "Etikedo por Video (retro)" - -#: data/templates/misc-us-templates.xml.h:1 -msgid "Business Card CD" -msgstr "Vizitkarto KD" - -#: data/templates/misc-us-templates.xml.h:4 -msgid "CD Template Rectangles" -msgstr "Modelaj Rektanguloj por KD" - -#: data/templates/misc-us-templates.xml.h:6 -msgid "CD/DVD Labels (Face Only)" -msgstr "Etikedoj por KD/DVD (nur faco)" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:23 -msgid "CD/DVD Labels (face only)" -msgstr "Etikedoj por KD/DVD (nur faco)" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:9 -msgid "Cassette Labels" -msgstr "Etikedoj por kasedoj" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:11 -msgid "DLT Labels" -msgstr "Etikedoj DLT" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:13 -msgid "Microtube labels" -msgstr "Mikrotubaj etikedoj" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Mini-CD Labels" -msgstr "Etikedoj por Mini-KD" - -#: data/templates/misc-us-templates.xml.h:15 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "Etikedoj por PRO CD (nur KD-dorso)" - -#: data/templates/misc-us-templates.xml.h:16 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "Etikedoj por PRO CD (nur faco)" - -#: data/templates/misc-us-templates.xml.h:17 -#: data/templates/misc-iso-templates.xml.h:42 -msgid "PRO CD Labels 2-up (face only)" -msgstr "Etikedoj por PRO CD (nur faco)" - -#: data/templates/misc-us-templates.xml.h:18 -msgid "Slimline CD Case (rightside up)" -msgstr "Subtila KD-ujo (dekstrosupra)" - -#: data/templates/misc-us-templates.xml.h:19 -msgid "Slimline CD Case (upside down)" -msgstr "Subtila KD-ujo (kaposuba)" - -#: data/templates/misc-iso-templates.xml.h:1 -msgid "Agipa 119488: Business Cards" -msgstr "Agipa 119488: Vizitkartoj" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:3 -msgid "Allround Labels --24" -msgstr "Plenrondaj etikedoj --24" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:5 -msgid "Allround Labels --44" -msgstr "Plenrondaj etikedoj --44" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:7 -msgid "Allround Labels --64" -msgstr "Plenrondaj etikedoj --64" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:9 -msgid "Allround Labels --65" -msgstr "Plenrondaj etikedoj --65" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:11 -msgid "Arch File Labels" -msgstr "Arkaj etikedoj por dosieroj" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Arch File Labels (large)" -msgstr "Arkaj etikedoj por dosieroj (grandaj)" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Arch File Labels (small)" -msgstr "Arkaj etikedoj por dosieroj (etaj)" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:19 -msgid "CD Labels" -msgstr "Etikedoj por KD" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:25 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "Etikedoj kun standarta formato por KD/DVD (nur faco)" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:27 -msgid "Diskette Labels (face only)" -msgstr "Etikedoj por disketoj (nur faco)" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:29 -msgid "EPSON Photo Stickers 16" -msgstr "EPSON Photo Stickers 16" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:31 -msgid "Etiketten" -msgstr "Etiketten" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:33 -msgid "Fridge Magnet Stickers" -msgstr "Magnetaĵoj por fridujo" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:37 -msgid "Mailing Labels --14" -msgstr "Etikedo por poŝto --14" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:39 -msgid "Mailing Labels-2 columns" -msgstr "Etikedo por poŝto kun 2 kolumnoj" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:41 -msgid "Mailing Labels-3 columns" -msgstr "Etikedo por poŝto kun 3 kolumnoj" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:46 -msgid "Video Labels (face only)" -msgstr "Etikedoj por video (nur frontispico)" - -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "Kreu etikedojn, vizitkartojn kaj kovrilojn de plurmediaĵoj" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "gLabels Designer di etichetta" - -#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "Dosiero de Projekto de gLabels" - diff --git a/glabels2/po/es.po b/glabels2/po/es.po deleted file mode 100644 index 9dc7ad40..00000000 --- a/glabels2/po/es.po +++ /dev/null @@ -1,2565 +0,0 @@ -# Spanish translation of glabels. -# sergio rivadero , 2005. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 2.1.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-01-22 14:03-0500\n" -"PO-Revision-Date: 2005-02-12 12:19-0300\n" -"Last-Translator: sergio rivadero \n" -"Language-Team: Spanish/Spain \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels.c:116 -msgid "Could not initialize Bonobo!\n" -msgstr "No se puede inicializar Bonobo!\n" - -#: src/glabels-batch.c:52 -msgid "print this message" -msgstr "imprimir este mensaje" - -#: src/glabels-batch.c:54 -msgid "print the version of glabels-batch being used" -msgstr "imprimir la versión utilizada de glabels-batch" - -#: src/glabels-batch.c:56 -msgid "set output filename (default=\"output.ps\")" -msgstr "establecer nombre de archivo (predeterminado=\"output.ps\")" - -#: src/glabels-batch.c:56 src/glabels-batch.c:70 -msgid "filename" -msgstr "nombre de archivo" - -#: src/glabels-batch.c:58 -msgid "number of sheets (default=1)" -msgstr "número de hojas (predeterminado=1)" - -#: src/glabels-batch.c:58 -msgid "sheets" -msgstr "hojas" - -#: src/glabels-batch.c:60 -msgid "number of copies (default=1)" -msgstr "número de copias (predeterminado=1)" - -#: src/glabels-batch.c:60 -msgid "copies" -msgstr "copias" - -#: src/glabels-batch.c:62 -msgid "first label on first sheet (default=1)" -msgstr "primera etiqueta en primera hoja (predeterminado=1)" - -#: src/glabels-batch.c:62 -msgid "first" -msgstr "primero" - -#: src/glabels-batch.c:64 src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "imprimir un esbozo (para verificar la alineación de la impresora)" - -#: src/glabels-batch.c:66 src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "impresión invertida (imagen espejo)" - -#: src/glabels-batch.c:68 src/print-dialog.c:351 -msgid "print crop marks" -msgstr "imprimir marcas de corte" - -#: src/glabels-batch.c:70 -msgid "input file for merging" -msgstr "archivo de entrada para combinar" - -#: src/glabels-batch.c:107 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[OPCION...] archivo-glabels..." - -#: src/glabels-batch.c:127 -#, c-format -msgid "missing glabels file\n" -msgstr "archivo glabels perdido\n" - -#: src/glabels-batch.c:158 -#, c-format -msgid "cannot perform document merge with glabels file %s\n" -msgstr "No se puede combinar el archivo %s\n" - -#: src/glabels-batch.c:182 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "No se puede abrir el archivo %s\n" - -#: src/window.c:244 -msgid "(none) - gLabels" -msgstr "(sin nombre) - gLabels" - -#: src/window.c:414 -msgid "(modified)" -msgstr "(modificado)" - -#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 -msgid "_Select Mode" -msgstr "_Modo selección" - -#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 -msgid "_Text" -msgstr "_Texto" - -#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 -msgid "_Line" -msgstr "_Línea" - -#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 -msgid "_Box" -msgstr "_Rectangulo" - -#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 -msgid "_Ellipse" -msgstr "_Elipse" - -#: src/stock.c:70 data/ui/glabels-ui.xml.h:146 -msgid "_Image" -msgstr "_Imagen" - -#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 -msgid "Bar_code" -msgstr "_Código de barras" - -#: src/stock.c:72 -msgid "_Merge Properties" -msgstr "Propiedades de _fusión de datos" - -#: src/stock.c:73 -msgid "Object _Properties" -msgstr "Propiedades del objeto" - -#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 -msgid "Bring to _Front" -msgstr "Traer al _frente" - -#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 -msgid "Send to _Back" -msgstr "Enviar al f_ondo" - -#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 -msgid "Rotate _Left" -msgstr "Rotar a la _izquierda" - -#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 -msgid "Rotate _Right" -msgstr "Rotar a la _derecha" - -#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "Reflejar _horizontalmente" - -#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "Reflejar _verticalmente" - -#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 -msgid "_Lefts" -msgstr "A la _izquierda" - -#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 -msgid "_Rights" -msgstr "A la _derecha" - -#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 -msgid "_Centers" -msgstr "_Centrado" - -#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 -msgid "_Tops" -msgstr "_Superior" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "_Inferior" - -#: src/stock.c:85 -msgid "Centers" -msgstr "_Centrado" - -#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "Centro de la _etiqueta" - -#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "Color de relleno" - -#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "Color de línea" - -#: src/stock.c:90 src/stock.c:92 -msgid "Linked" -msgstr "Enlazado" - -#: src/stock.c:91 src/stock.c:93 -msgid "Not Linked" -msgstr "No enlazado" - -#: src/ui-property-bar.c:345 src/object-editor.c:587 -msgid "Default" -msgstr "Predeterminado" - -#: src/ui-property-bar.c:360 src/object-editor.c:600 -msgid "No fill" -msgstr "Sin relleno" - -#: src/ui-property-bar.c:375 src/object-editor.c:593 -msgid "No line" -msgstr "Sin línea" - -#: src/ui-sidebar.c:180 -msgid "Object properties" -msgstr "Propiedades del objeto" - -#: src/commands.c:385 -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 programa de creación de etiquetas y tarjetas para GNOME.\n" -" \n" -"Glabels es software libre; Puede modificarlo y redistribuirlo bajo los " -"términos de la Licencia Pública General de GNU tal como es publicada por la " -"Free Software Foundation; ya sea la versión 2 de dicha licencia, o (a su " -"opción) cualquier otra versión posterior.\n" -" \n" -"Este programa se distribuye con la esperanza que le será útil, pero SIN " -"NINGUNA GARANTÍA; Para más detalles vea la Licencia Pública General de GNU.\n" - -#: src/commands.c:399 -msgid "See the file AUTHORS for additional credits," -msgstr "Vea el archivo AUTHORS, " - -#: src/commands.c:400 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "o visite http://glabels.sourceforge.net/" - -#: src/commands.c:409 -msgid " " -msgstr " " - -#: src/commands.c:424 -msgid "glabels" -msgstr "glabels" - -#: src/file.c:100 -msgid "New Label or Card" -msgstr "Nueva etiqueta o tarjeta" - -#: src/file.c:132 src/file.c:304 -msgid "Media Type" -msgstr "Tipo de papel" - -#: src/file.c:138 src/file.c:310 -msgid "Label orientation" -msgstr "Orientación de la etiqueta" - -#: src/file.c:269 -msgid "Label properties" -msgstr "Propiedades de la etiqueta" - -#: src/file.c:452 src/file.c:870 -msgid "All files" -msgstr "Todos los archivos" - -#: src/file.c:457 src/file.c:875 -msgid "gLabels documents" -msgstr "Documentos glabels" - -#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 -msgid "Empty file name selection" -msgstr "Vaciar selección de nombre de archivo" - -#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 -msgid "Please select a file or supply a valid file name" -msgstr "Por favor seleccione un archivo o escriba un nombre de archivo válido" - -#: src/file.c:519 src/file.c:631 -msgid "File does not exist" -msgstr "Archivo no existe" - -#: src/file.c:563 data/ui/glabels-ui.xml.h:74 -msgid "Open" -msgstr "Abrir" - -#: src/file.c:565 -msgid "Open label" -msgstr "Abrir etiqueta" - -#: src/file.c:707 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "No se puede abrir el archivo \"%s\"" - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "Formato de archivo no soportado" - -#: src/file.c:797 src/file.c:979 src/file.c:1174 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "No se puede guardar el archivo \"%s\"" - -#: src/file.c:805 src/file.c:987 src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "Se encontró un error al guardar. El archivo aún no está guardado." - -#: src/file.c:848 src/file.c:1048 -#, c-format -msgid "Save \"%s\" as" -msgstr "Guardar como \"%s\"" - -#: src/file.c:935 src/file.c:1131 -msgid "Please supply a valid file name" -msgstr "Debe proporcionar un nombre de archivo válido" - -#: src/file.c:952 src/file.c:1147 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "Sobreescribir el archivo \"%s\"?" - -#: src/file.c:960 src/file.c:1155 -msgid "File already exists." -msgstr "El archivo ya existe." - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "Guardar cambios del documento \"%s\" antes de cerrar?" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "Sus cambios se perderán si no los guarda." - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "Cerrar sin guardar" - -#. Should not happen -#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 -#: data/glade/object-editor.glade.h:37 -msgid "points" -msgstr "puntos" - -#: src/prefs.c:158 data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "pulgadas" - -#: src/prefs.c:160 -msgid "mm" -msgstr "mm" - -#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 -msgid "gLabels Preferences" -msgstr "Preferencias de gLabels" - -#. -#. * Submenu: Order -#. -#: src/view.c:3574 data/ui/glabels-ui.xml.h:154 -msgid "_Order" -msgstr "Or_den" - -#. -#. * Submenu: Rotate/Flip -#. -#: src/view.c:3595 data/ui/glabels-ui.xml.h:160 -msgid "_Rotate/Flip" -msgstr "_Rotar/Reflejar" - -#. -#. * Submenu: Align Horizontally -#. -#: src/view.c:3628 -msgid "Align _Horizontally" -msgstr "Alinear _horizontalmente" - -#. -#. * Submenu: Align Vertically -#. -#: src/view.c:3667 -msgid "Align _Vertically" -msgstr "Alinear _verticalmente" - -#: src/view.c:3728 data/ui/glabels-ui.xml.h:137 -msgid "_Delete" -msgstr "_Borrar" - -#. Build editor. -#: src/view-box.c:236 -msgid "Box object properties" -msgstr "Propiedades del rectángulo" - -#. Build editor. -#: src/view-ellipse.c:236 -msgid "Ellipse object properties" -msgstr "Propiedades del elipse" - -#. Build editor. -#: src/view-line.c:229 -msgid "Line object properties" -msgstr "Propiedades de la línea" - -#. Build editor. -#: src/view-image.c:223 -msgid "Image object properties" -msgstr "Propiedades de la imagen" - -#. Build editor. -#: src/view-text.c:251 -msgid "Text object properties" -msgstr "Propiedades del texto" - -#: src/view-text.c:571 data/glade/object-editor.glade.h:28 -msgid "Text" -msgstr "Texto" - -#. Build editor. -#: src/view-barcode.c:210 -msgid "Barcode object properties" -msgstr "Propiedades del código de barras" - -#: src/view-barcode.c:594 src/print.c:1125 -msgid "Invalid barcode data" -msgstr "Datos de código de barras no válidos" - -#: src/merge-properties-dialog.c:231 -msgid "Merge Properties" -msgstr "Propiedades de combinación de datos" - -#. ---- Source section ---- -#: src/merge-properties-dialog.c:237 -msgid "Source" -msgstr "Fuente" - -#: src/merge-properties-dialog.c:245 -msgid "Format:" -msgstr "Formato:" - -#. Location line -#: src/merge-properties-dialog.c:273 -msgid "Location:" -msgstr "Ubicación:" - -#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 -msgid "Select merge-database source" -msgstr "Seleccione la fuente de datos para combinar" - -#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 -msgid "N/A" -msgstr "N/D" - -#. ---- Sample Fields section ---- -#: src/merge-properties-dialog.c:300 -msgid "Record selection/preview:" -msgstr "Selección de registros/Vista previa" - -#: src/merge-properties-dialog.c:326 -msgid "Select" -msgstr "Seleccionar" - -#: src/merge-properties-dialog.c:334 -msgid "Record/Field" -msgstr "Registro/Campo" - -#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 -msgid "Data" -msgstr "Datos" - -#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:81 -msgid "Print" -msgstr "Imprimir" - -#: src/print-dialog.c:281 -msgid "_Job" -msgstr "_Trabajo" - -#: src/print-dialog.c:286 -msgid "P_rinter" -msgstr "_Impresora" - -#. ----------- Add simple-copies widget ------------ -#: src/print-dialog.c:314 -msgid "Copies" -msgstr "Copias" - -#. ------- Add merge control widget ------------ -#: src/print-dialog.c:322 -msgid "Document merge control" -msgstr "Control de combinación de documentos" - -#. ----------- Add custom print options area ------------ -#: src/print-dialog.c:330 -msgid "Options" -msgstr "Opciones" - -#: src/print-dialog.c:553 src/print-dialog.c:592 -msgid "Print preview" -msgstr "Previsualizar la impresión" - -#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 -msgid "gLabels Template Designer" -msgstr "Diseñador de plantillas gLabels" - -#: src/bc.c:60 -msgid "POSTNET (any)" -msgstr "POSTNET (cualquiera)" - -#: src/bc.c:63 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (solo código postal)" - -#: src/bc.c:66 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (código postal+4)" - -#: src/bc.c:69 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: src/bc.c:72 -msgid "EAN (any)" -msgstr "EAN (cualquiera)" - -#: src/bc.c:75 -msgid "EAN-8" -msgstr "EAN-8" - -#: src/bc.c:78 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: src/bc.c:81 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: src/bc.c:84 -msgid "EAN-13" -msgstr "EAN-13" - -#: src/bc.c:87 -msgid "EAN-13 +2" -msgstr "EAN-13 2" - -#: src/bc.c:90 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: src/bc.c:93 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A o UPC-E)" - -#: src/bc.c:96 -msgid "UPC-A" -msgstr "UPC-A" - -#: src/bc.c:99 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: src/bc.c:102 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: src/bc.c:105 -msgid "UPC-E" -msgstr "UPC-E" - -#: src/bc.c:108 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: src/bc.c:111 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: src/bc.c:114 -msgid "ISBN" -msgstr "ISBN" - -#: src/bc.c:117 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: src/bc.c:120 -msgid "Code 39" -msgstr "Code 39" - -#: src/bc.c:123 -msgid "Code 128" -msgstr "Code 128" - -#: src/bc.c:126 -msgid "Code 128C" -msgstr "Code 128C" - -#: src/bc.c:129 -msgid "Code 128B" -msgstr "Code 128B" - -#: src/bc.c:132 -msgid "Interleaved 2 of 5" -msgstr "Intercalado 2 de 5" - -#: src/bc.c:135 -msgid "Codabar" -msgstr "Codabar" - -#: src/bc.c:138 -msgid "MSI" -msgstr "MSI" - -#: src/bc.c:141 -msgid "Plessey" -msgstr "Plessey" - -#: src/label.c:569 -msgid "Untitled" -msgstr "Sin título" - -#: src/xml-label.c:176 src/xml-label.c:213 -msgid "xmlParseFile error" -msgstr "error xmlParseFile" - -#: src/xml-label.c:250 -msgid "No document root" -msgstr "No hay documento raíz" - -#: src/xml-label.c:264 -msgid "Importing from glabels 0.1 format" -msgstr "Importando desde formato glabels 0.1" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "Importando desde formato glabels 0.4" - -#: src/xml-label.c:279 -msgid "Importing from glabels 1.91 format" -msgstr "Importando desde formato glabels 1.91" - -#: src/xml-label.c:282 -msgid "bad document, unknown glabels Namespace" -msgstr "documento de tipo erróneo, etiquetas glabels no encontradas" - -#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Nodo raíz erróneo = \"%s\"" - -#: src/xml-label.c:348 src/xml-label-191.c:165 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "Nodo erróneo en sección Document = \"%s\"" - -#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "Nodo erróneo = \"%s\"" - -#: src/xml-label.c:855 src/xml-label-191.c:624 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "Nodo erróneo en sección Data = \"%s\"" - -#: src/xml-label.c:1030 libglabels/xml-template.c:535 -msgid "Utf8 conversion error." -msgstr "Conversión UTF-8 errónea" - -#: src/xml-label.c:1037 libglabels/xml-template.c:542 -msgid "Problem saving xml file." -msgstr "Problemas al guardar archivo xml" - -#. This should always be an id, but just in case a name -#. slips by! -#: src/xml-label-191.c:699 libglabels/xml-template.c:199 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "Código \"%s\" de tamaño de página desconocido, intentando como nombre." - -#: src/xml-label-191.c:709 libglabels/xml-template.c:209 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "Código \"%s\" o nombre de página desconocido" - -#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 -msgid "None" -msgstr "Ninguno" - -#: src/merge-init.c:53 -msgid "Text file with comma delimeters (CSV)" -msgstr "Texto separado con comas" - -#: src/merge-init.c:60 -msgid "Text file with colon delimeters" -msgstr "Texto separado con dos puntos" - -#: src/merge-init.c:67 -msgid "Text file with tab delimeters" -msgstr "Texto separado con tabuladores" - -#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 -msgid "File:" -msgstr "Archivo:" - -#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 -msgid "Key:" -msgstr "Clave:" - -#: src/wdgt-print-copies.c:179 -msgid "Sheets:" -msgstr "Hojas:" - -#: src/wdgt-print-copies.c:197 -msgid "Labels" -msgstr "Etiquetas" - -#: src/wdgt-print-copies.c:200 -msgid "from:" -msgstr "desde:" - -#: src/wdgt-print-copies.c:207 -msgid "to:" -msgstr "hasta:" - -#: src/wdgt-print-merge.c:178 -msgid "Start on label" -msgstr "Comenzar en la etiqueta" - -#: src/wdgt-print-merge.c:186 -msgid "on 1st sheet" -msgstr "en la primera hoja" - -#: src/wdgt-print-merge.c:195 -msgid "Copies:" -msgstr "Copias:" - -#: src/wdgt-print-merge.c:201 -msgid "Collate" -msgstr "Intercalar" - -#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 -msgid "Description:" -msgstr "Descripción:" - -#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 -msgid "Page size:" -msgstr "Tamaño de la página:" - -#: src/wdgt-media-select.c:290 -msgid "Label size:" -msgstr "Tamaño de la etiqueta:" - -#: src/wdgt-media-select.c:301 -msgid "Layout:" -msgstr "Disposición:" - -#: src/wdgt-media-select.c:578 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d por hoja)" - -#: src/wdgt-media-select.c:582 -#, c-format -msgid "%d per sheet" -msgstr "%d por hoja" - -#: src/wdgt-media-select.c:614 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/wdgt-media-select.c:619 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 -#, c-format -msgid "%s %s diameter" -msgstr "Diámetro %s %s" - -#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 -#, c-format -msgid "%.5g %s diameter" -msgstr "Diámetro %.5g %s" - -#: src/wdgt-rotate-label.c:193 -msgid "Rotate" -msgstr "Rotar" - -#. This is the default custom color -#: src/mygal/color-palette.c:396 -msgid "custom" -msgstr "personalizado" - -#. "Custom" color - we'll pop up a GnomeColorPicker -#: src/mygal/color-palette.c:438 -msgid "Custom Color:" -msgstr "Color personalizado:" - -#: src/mygal/color-palette.c:446 -msgid "Choose Custom Color" -msgstr "Elegir color:" - -#: src/mygal/color-palette.c:579 -msgid "black" -msgstr "negro" - -#: src/mygal/color-palette.c:580 -msgid "light brown" -msgstr "marrón" - -#: src/mygal/color-palette.c:581 -msgid "brown gold" -msgstr "marrón oscuro" - -#: src/mygal/color-palette.c:582 -msgid "dark green #2" -msgstr "verde oscuro #2" - -#: src/mygal/color-palette.c:583 -msgid "navy" -msgstr "azul metalizado" - -#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 -msgid "dark blue" -msgstr "azul muy oscuro" - -#: src/mygal/color-palette.c:585 -msgid "purple #2" -msgstr "azul oscuro" - -#: src/mygal/color-palette.c:586 -msgid "very dark gray" -msgstr "verde muy oscuro" - -#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 -msgid "dark red" -msgstr "rojo oscuro" - -#: src/mygal/color-palette.c:590 -msgid "red-orange" -msgstr "anaranjado" - -#: src/mygal/color-palette.c:591 -msgid "gold" -msgstr "marrón claro" - -#: src/mygal/color-palette.c:592 -msgid "dark green" -msgstr "verde oscuro" - -#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 -msgid "dull blue" -msgstr "verde azulado" - -#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 -msgid "blue" -msgstr "azul" - -#: src/mygal/color-palette.c:595 -msgid "dull purple" -msgstr "violeta azulado" - -#: src/mygal/color-palette.c:596 -msgid "dark grey" -msgstr "gris oscuro" - -#: src/mygal/color-palette.c:599 -msgid "red" -msgstr "rojo" - -#: src/mygal/color-palette.c:600 -msgid "orange" -msgstr "naranja" - -#: src/mygal/color-palette.c:601 -msgid "lime" -msgstr "lima" - -#: src/mygal/color-palette.c:602 -msgid "dull green" -msgstr "verde opaco" - -#: src/mygal/color-palette.c:603 -msgid "dull blue #2" -msgstr "cyan" - -#: src/mygal/color-palette.c:604 -msgid "sky blue #2" -msgstr "celeste" - -#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 -msgid "purple" -msgstr "violeta" - -#: src/mygal/color-palette.c:606 -msgid "gray" -msgstr "gris" - -#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 -msgid "magenta" -msgstr "fucsia" - -#: src/mygal/color-palette.c:610 -msgid "bright orange" -msgstr "naranja claro" - -#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 -msgid "yellow" -msgstr "amarillo" - -#: src/mygal/color-palette.c:612 -msgid "green" -msgstr "verde" - -#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 -msgid "cyan" -msgstr "turquesa" - -#: src/mygal/color-palette.c:614 -msgid "bright blue" -msgstr "azul claro" - -#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 -msgid "red purple" -msgstr "borravino" - -#: src/mygal/color-palette.c:616 -msgid "light grey" -msgstr "gris claro" - -#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 -msgid "pink" -msgstr "rosa" - -#: src/mygal/color-palette.c:620 -msgid "light orange" -msgstr "naranja claro" - -#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 -msgid "light yellow" -msgstr "amarillo claro" - -#: src/mygal/color-palette.c:622 -msgid "light green" -msgstr "verde claro" - -#: src/mygal/color-palette.c:623 -msgid "light cyan" -msgstr "turquesa claro" - -#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 -msgid "light blue" -msgstr "celeste claro" - -#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 -msgid "light purple" -msgstr "violeta claro" - -#: src/mygal/color-palette.c:626 -msgid "white" -msgstr "blanco" - -#: src/mygal/color-palette.c:631 -msgid "purplish blue" -msgstr "azul purpurado" - -#: src/mygal/color-palette.c:635 -msgid "dark purple" -msgstr "violeta oscuro" - -#: src/mygal/color-palette.c:637 -msgid "sky blue" -msgstr "celeste" - -#: libglabels/template.c:848 -#, c-format -msgid "Generic %s full page" -msgstr "Página completa genérica %s" - -#: libglabels/template.c:897 -msgid "No template files found!" -msgstr "No se encontraron archivos de plantilla!" - -#. Create and append an "Other" entry. -#: libglabels/paper.c:67 -msgid "Other" -msgstr "Otros" - -#: libglabels/paper.c:361 -msgid "No paper files found!" -msgstr "No se encontró tipo de papel!" - -#: data/ui/glabels-ui.xml.h:1 -msgid "About glabels" -msgstr "Acerca de glabels" - -#: data/ui/glabels-ui.xml.h:2 -msgid "About..." -msgstr "Acerca de..." - -#: data/ui/glabels-ui.xml.h:3 -msgid "Align _Horizontal" -msgstr "Alineado _horizontal" - -#: data/ui/glabels-ui.xml.h:4 -msgid "Align _Vertical" -msgstr "Alineado _vertical" - -#: data/ui/glabels-ui.xml.h:5 -msgid "Align objects to bottoms" -msgstr "Alinear objetos por su parte inferior" - -#: data/ui/glabels-ui.xml.h:6 -msgid "Align objects to horizontal centers" -msgstr "Alinear objetos por su centro" - -#: data/ui/glabels-ui.xml.h:7 -msgid "Align objects to left edges" -msgstr "Alinear objetos por su lado izquierdo" - -#: data/ui/glabels-ui.xml.h:8 -msgid "Align objects to right edges" -msgstr "Alinear objetos por su lado derecho" - -#: data/ui/glabels-ui.xml.h:9 -msgid "Align objects to tops" -msgstr "Alinear objetos por su parte superior" - -#: data/ui/glabels-ui.xml.h:10 -msgid "Align objects to vertical centers" -msgstr "Alinear objetos por su centro" - -#: data/ui/glabels-ui.xml.h:12 -msgid "Bold" -msgstr "Negrita" - -#: data/ui/glabels-ui.xml.h:14 -msgid "Center align" -msgstr "Centrado" - -#: data/ui/glabels-ui.xml.h:15 -msgid "Center objects to horizontal label center" -msgstr "Centrar objetos con el centro horizontal de la etiqueta" - -#: data/ui/glabels-ui.xml.h:16 -msgid "Center objects to vertical label center" -msgstr "Centrar objetos con el centro vertical de la etiqueta" - -#: data/ui/glabels-ui.xml.h:17 -msgid "Change the visibility of markup lines in the current window" -msgstr "Cambiar la visibilidad de los márgenes" - -#: data/ui/glabels-ui.xml.h:18 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "Cambiar la visibilidad de la barra de dibujo" - -#: data/ui/glabels-ui.xml.h:19 -msgid "Change the visibility of the grid in the current window" -msgstr "Cambiar la visibilidad de la grilla" - -#: data/ui/glabels-ui.xml.h:20 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "Cambiar la visibilidad de la barra principal" - -#: data/ui/glabels-ui.xml.h:21 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "Cambiar la visibilidad de la barra de propiedades" - -#: data/ui/glabels-ui.xml.h:22 -msgid "Close" -msgstr "Cerrar" - -#: data/ui/glabels-ui.xml.h:23 -msgid "Close the current file" -msgstr "Guardar el archivo en uso" - -#: data/ui/glabels-ui.xml.h:24 -msgid "Configure the application" -msgstr "Configurar aplicación" - -#: data/ui/glabels-ui.xml.h:25 -msgid "Contents" -msgstr "Contenido" - -#: data/ui/glabels-ui.xml.h:26 -msgid "Copy" -msgstr "Copiar" - -#: data/ui/glabels-ui.xml.h:27 -msgid "Copy the selection" -msgstr "Copiar la selección" - -#: data/ui/glabels-ui.xml.h:28 -msgid "Create a custom template" -msgstr "Crear una plantilla personalizada" - -#: data/ui/glabels-ui.xml.h:29 -msgid "Create a new document" -msgstr "Crear un nuevo documento" - -#: data/ui/glabels-ui.xml.h:30 -msgid "Create barcode object" -msgstr "Crear un objeto código de barras" - -#: data/ui/glabels-ui.xml.h:31 -msgid "Create box/rectangle object" -msgstr "Crear un cuadrado o rectángulo" - -#: data/ui/glabels-ui.xml.h:32 -msgid "Create ellipse/circle object" -msgstr "Crear un círculo o elipse" - -#: data/ui/glabels-ui.xml.h:33 -msgid "Create image object" -msgstr "Crear una imagen" - -#: data/ui/glabels-ui.xml.h:34 -msgid "Create line object" -msgstr "Crear una línea" - -#: data/ui/glabels-ui.xml.h:35 -msgid "Create text object" -msgstr "Crear un cuadro de texto" - -#: data/ui/glabels-ui.xml.h:36 -msgid "Cu_t" -msgstr "Cor_tar" - -#: data/ui/glabels-ui.xml.h:37 -msgid "Customize" -msgstr "Personalizar" - -#: data/ui/glabels-ui.xml.h:38 -msgid "Customize Drawing Toolbar" -msgstr "Personalizar barra de dibujo" - -#: data/ui/glabels-ui.xml.h:39 -msgid "Customize Main Toolbar" -msgstr "Personalizar barra principal" - -#: data/ui/glabels-ui.xml.h:40 -msgid "Customize Property Toolbar" -msgstr "Personalizar barra de propiedades" - -#: data/ui/glabels-ui.xml.h:41 -msgid "Customize toolbars" -msgstr "Personalizar barras de herramientas" - -#: data/ui/glabels-ui.xml.h:42 -msgid "Cut" -msgstr "Cortar" - -#: data/ui/glabels-ui.xml.h:43 -msgid "Cut the selection" -msgstr "Cortar la selección" - -#: data/ui/glabels-ui.xml.h:44 -msgid "Decrease magnification" -msgstr "Reducir escala" - -#: data/ui/glabels-ui.xml.h:45 -msgid "Delete" -msgstr "Borrar" - -#: data/ui/glabels-ui.xml.h:46 -msgid "Delete the selected objects" -msgstr "Borrar los objetos seleccionados" - -#: data/ui/glabels-ui.xml.h:47 -msgid "Drawing toolbar" -msgstr "Barra de dibujo" - -#: data/ui/glabels-ui.xml.h:48 -msgid "Dump XML" -msgstr "Volcar XML" - -#: data/ui/glabels-ui.xml.h:49 -msgid "Dump the UI Xml description" -msgstr "Volcar la descripción UI XML" - -#: data/ui/glabels-ui.xml.h:50 -msgid "Edit merge properties" -msgstr "Editar propiedades de combinación de datos" - -#: data/ui/glabels-ui.xml.h:54 -msgid "Flip object horizontally" -msgstr "Reflejar objeto horizontalmente" - -#: data/ui/glabels-ui.xml.h:55 -msgid "Flip object vertically" -msgstr "Reflejar objeto verticalmente" - -#: data/ui/glabels-ui.xml.h:56 -msgid "Font name" -msgstr "Fuente" - -#: data/ui/glabels-ui.xml.h:57 -msgid "Font selector" -msgstr "Selección de fuentes" - -#: data/ui/glabels-ui.xml.h:58 -msgid "Font size" -msgstr "Tamaño de fuente" - -#: data/ui/glabels-ui.xml.h:59 -msgid "Icon and _Text" -msgstr "Icono y _texto" - -#: data/ui/glabels-ui.xml.h:60 -msgid "Increase magnification" -msgstr "Aumentar escala" - -#: data/ui/glabels-ui.xml.h:61 -msgid "Italic" -msgstr "Itálica" - -#: data/ui/glabels-ui.xml.h:63 -msgid "Left align" -msgstr "Alineación izquierda" - -#: data/ui/glabels-ui.xml.h:65 -msgid "Line width" -msgstr "Ancho de línea" - -#: data/ui/glabels-ui.xml.h:66 -msgid "Lower object to bottom" -msgstr "Llevar objeto al fondo" - -#: data/ui/glabels-ui.xml.h:67 -msgid "M_arkup" -msgstr "_Margen" - -#: data/ui/glabels-ui.xml.h:68 -msgid "Main toolbar" -msgstr "Barra principal" - -#: data/ui/glabels-ui.xml.h:69 -msgid "Markup" -msgstr "Margen" - -#: data/ui/glabels-ui.xml.h:70 -msgid "Modify document properties" -msgstr "Modificar las propiedades del documento" - -#: data/ui/glabels-ui.xml.h:71 -msgid "New" -msgstr "Nuevo" - -#: data/ui/glabels-ui.xml.h:72 -msgid "Object property editor" -msgstr "Editor de propiedades de objeto" - -#: data/ui/glabels-ui.xml.h:73 -msgid "Only show icons in the main toolbar" -msgstr "Sólo mostrar iconos en la barra principal" - -#: data/ui/glabels-ui.xml.h:75 -msgid "Open a file" -msgstr "Abrir un archivo" - -#: data/ui/glabels-ui.xml.h:76 -msgid "Open the glabels manual" -msgstr "Abrir el manual de glabels" - -#: data/ui/glabels-ui.xml.h:77 -msgid "Paste" -msgstr "Pegar" - -#: data/ui/glabels-ui.xml.h:78 -msgid "Paste the clipboard" -msgstr "Pegar desde portapapeles" - -#: data/ui/glabels-ui.xml.h:79 -msgid "Pr_eferences..." -msgstr "Pre_ferencias..." - -#: data/ui/glabels-ui.xml.h:80 -msgid "Preferences" -msgstr "Preferencias" - -#: data/ui/glabels-ui.xml.h:82 -msgid "Print the current file" -msgstr "Imprimir el archivo en uso" - -#: data/ui/glabels-ui.xml.h:83 -msgid "Proper_ties..." -msgstr "_Propiedades..." - -#: data/ui/glabels-ui.xml.h:84 -msgid "Properties" -msgstr "Propiedades" - -#: data/ui/glabels-ui.xml.h:85 -msgid "Property toolbar" -msgstr "Barra de propiedades" - -#: data/ui/glabels-ui.xml.h:86 -msgid "Quit" -msgstr "Salir" - -#: data/ui/glabels-ui.xml.h:87 -msgid "Quit the program" -msgstr "Salir del programa" - -#: data/ui/glabels-ui.xml.h:88 -msgid "Raise object to top" -msgstr "Traer al frente" - -#: data/ui/glabels-ui.xml.h:89 -msgid "Recent _Files" -msgstr "Archivos _recientes" - -#: data/ui/glabels-ui.xml.h:90 -msgid "Redo" -msgstr "Rehacer" - -#: data/ui/glabels-ui.xml.h:91 -msgid "Redo the undone action" -msgstr "Repetir la última acción" - -#: data/ui/glabels-ui.xml.h:92 -msgid "Remove all selections" -msgstr "Eliminar todas las selecciones" - -#: data/ui/glabels-ui.xml.h:94 -#, no-c-format -msgid "Restore scale to 100%" -msgstr "Restablecer escala al 100%" - -#: data/ui/glabels-ui.xml.h:95 -msgid "Right align" -msgstr "Alineación derecha" - -#: data/ui/glabels-ui.xml.h:98 -msgid "Rotate object 90 clockwise" -msgstr "Rotar 90 grados a la derecha" - -#: data/ui/glabels-ui.xml.h:99 -msgid "Rotate object 90 counter-clockwise" -msgstr "Rotar 90 grados a la izquierda" - -#: data/ui/glabels-ui.xml.h:100 -msgid "Save" -msgstr "Guardar" - -#: data/ui/glabels-ui.xml.h:101 -msgid "Save As" -msgstr "Guardar como" - -#: data/ui/glabels-ui.xml.h:102 -msgid "Save _As..." -msgstr "Guardar _como..." - -#: data/ui/glabels-ui.xml.h:103 -msgid "Save the current file" -msgstr "Guardar el archivo en uso" - -#: data/ui/glabels-ui.xml.h:104 -msgid "Save the current file with a different name" -msgstr "Guardar archivo con otro nombre" - -#: data/ui/glabels-ui.xml.h:105 -msgid "Select All" -msgstr "_Deseleccionar todo" - -#: data/ui/glabels-ui.xml.h:106 -msgid "Select _All" -msgstr "Seleccionar t_odo" - -#: data/ui/glabels-ui.xml.h:107 -msgid "Select all objects" -msgstr "Seleccionar todos los objetos" - -#: data/ui/glabels-ui.xml.h:108 -msgid "Select, move and modify objects" -msgstr "Seleccionar, mover y modificar objetos" - -#: data/ui/glabels-ui.xml.h:110 -msgid "Set main toolbar button style according to desktop default" -msgstr "" -"Establecer apariencia de la barra principal según estilo predeterminado del " -"escitorio" - -#: data/ui/glabels-ui.xml.h:111 -msgid "Show _Tooltips" -msgstr "Mostrar indicadores" - -#: data/ui/glabels-ui.xml.h:112 -msgid "Show both icons and texts in the main toolbar" -msgstr "Mostrar iconos y texto en la barra principal" - -#: data/ui/glabels-ui.xml.h:113 -msgid "Show tooltips in the drawing toolbar" -msgstr "Mostrar indicadores en la barra de dibujo" - -#: data/ui/glabels-ui.xml.h:114 -msgid "Show tooltips in the main toolbar" -msgstr "Mostrar indicadores en la barra principal" - -#: data/ui/glabels-ui.xml.h:115 -msgid "Show tooltips in the property toolbar" -msgstr "Mostrar indicadores en la barra de propiedades" - -#: data/ui/glabels-ui.xml.h:116 -msgid "Template Designer" -msgstr "Diseñador de plantillas" - -#: data/ui/glabels-ui.xml.h:117 -msgid "Template _Designer..." -msgstr "_Diseñador de plantillas" - -#: data/ui/glabels-ui.xml.h:118 -msgid "Text color" -msgstr "Color de texto" - -#: data/ui/glabels-ui.xml.h:119 -msgid "U_n-select All" -msgstr "_Deseleccionar todo" - -#: data/ui/glabels-ui.xml.h:120 -msgid "Un-select All" -msgstr "Deseleccionar todo" - -#: data/ui/glabels-ui.xml.h:121 -msgid "Undo" -msgstr "Deshacer" - -#: data/ui/glabels-ui.xml.h:122 -msgid "Undo the last action" -msgstr "Deshcar la última acción" - -#: data/ui/glabels-ui.xml.h:123 -msgid "Zoom _1:1" -msgstr "Escala _1:1" - -#: data/ui/glabels-ui.xml.h:124 -msgid "Zoom _In" -msgstr "_Ampliar" - -#: data/ui/glabels-ui.xml.h:125 -msgid "Zoom _Out" -msgstr "_Reducir" - -#: data/ui/glabels-ui.xml.h:126 -msgid "Zoom to _fit" -msgstr "A_justar" - -#: data/ui/glabels-ui.xml.h:127 -msgid "Zoom to fit window" -msgstr "Ampliar hasta ajustar" - -#: data/ui/glabels-ui.xml.h:128 -msgid "_About..." -msgstr "_Acerca de..." - -# REVISAR -#: data/ui/glabels-ui.xml.h:129 -msgid "_Bottoms" -msgstr "" - -#: data/ui/glabels-ui.xml.h:132 -msgid "_Close" -msgstr "_Cerrar" - -#: data/ui/glabels-ui.xml.h:133 -msgid "_Contents" -msgstr "_Contenido" - -#: data/ui/glabels-ui.xml.h:134 -msgid "_Copy" -msgstr "_Copiar" - -#: data/ui/glabels-ui.xml.h:135 -msgid "_Create Object" -msgstr "Crear _objeto" - -#: data/ui/glabels-ui.xml.h:136 -msgid "_Debug" -msgstr "_Depurar" - -#: data/ui/glabels-ui.xml.h:138 -msgid "_Desktop Default" -msgstr "_Predeterminado del escritorio" - -#: data/ui/glabels-ui.xml.h:139 -msgid "_Drawing Toolbar" -msgstr "Barra de dibujo" - -#: data/ui/glabels-ui.xml.h:140 -msgid "_Edit" -msgstr "_Editar" - -#: data/ui/glabels-ui.xml.h:142 -msgid "_File" -msgstr "_Archivo" - -#: data/ui/glabels-ui.xml.h:143 -msgid "_Grid" -msgstr "_Grilla" - -#: data/ui/glabels-ui.xml.h:144 -msgid "_Help" -msgstr "A_yuda" - -#: data/ui/glabels-ui.xml.h:145 -msgid "_Icon" -msgstr "_Icono" - -#: data/ui/glabels-ui.xml.h:149 -msgid "_Main Toolbar" -msgstr "Barra principal" - -#: data/ui/glabels-ui.xml.h:150 -msgid "_Merge Properties..." -msgstr "Propiedades de _combinación de datos" - -#: data/ui/glabels-ui.xml.h:151 -msgid "_New" -msgstr "_Nuevo" - -#: data/ui/glabels-ui.xml.h:152 -msgid "_Objects" -msgstr "_Objetos" - -#: data/ui/glabels-ui.xml.h:153 -msgid "_Open..." -msgstr "_Abrir..." - -#: data/ui/glabels-ui.xml.h:155 -msgid "_Paste" -msgstr "_Pegar" - -#: data/ui/glabels-ui.xml.h:156 -msgid "_Print..." -msgstr "_Imprimir" - -#: data/ui/glabels-ui.xml.h:157 -msgid "_Property Toolbar" -msgstr "Barra de propedades" - -#: data/ui/glabels-ui.xml.h:158 -msgid "_Quit" -msgstr "_Salir" - -#: data/ui/glabels-ui.xml.h:161 -msgid "_Save" -msgstr "_Guardar" - -#: data/ui/glabels-ui.xml.h:165 -msgid "_View" -msgstr "_Ver" - -#: data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr " " - -#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 -#: data/glade/template-designer.glade.h:5 -msgid "*" -msgstr "*" - -#: data/glade/prefs-dialog.glade.h:3 -msgid "Default page size" -msgstr "Tamaño de página predeterminado" - -#: data/glade/prefs-dialog.glade.h:4 -msgid "Fill" -msgstr "Relleno" - -#: data/glade/prefs-dialog.glade.h:5 -msgid "Line" -msgstr "Línea" - -#: data/glade/prefs-dialog.glade.h:6 -msgid "Text" -msgstr "Texto" - -#: data/glade/prefs-dialog.glade.h:7 -msgid "Units" -msgstr "Medidas" - -#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 -msgid "Alignment:" -msgstr "Alineación:" - -#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 -msgid "Color:" -msgstr "Color:" - -#: data/glade/prefs-dialog.glade.h:10 -msgid "Font:" -msgstr "Fuente:" - -#: data/glade/prefs-dialog.glade.h:11 -msgid "ISO A4" -msgstr "ISO A4" - -#: data/glade/prefs-dialog.glade.h:12 -msgid "Inches" -msgstr "Pulgadas" - -#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 -msgid "Line Spacing:" -msgstr "Espaciado:" - -#: data/glade/prefs-dialog.glade.h:14 -msgid "Locale" -msgstr "Documento" - -#: data/glade/prefs-dialog.glade.h:15 -msgid "Millimeters" -msgstr "Milímetros" - -#: data/glade/prefs-dialog.glade.h:16 -msgid "Object defaults" -msgstr "Objetos" - -#: data/glade/prefs-dialog.glade.h:17 -msgid "Points" -msgstr "Puntos" - -#: data/glade/prefs-dialog.glade.h:18 -msgid "Select default properties for new objects." -msgstr "Seleccione las propiedades predeterminadoas para los nuevos objetos." - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "Seleccione las propiedades del documento." - -#. Most popular (at top of list) -#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:29 -msgid "US Letter" -msgstr "Carta" - -#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 -#: data/glade/template-designer.glade.h:72 -msgid "Width:" -msgstr "Ancho:" - -#: data/glade/object-editor.glade.h:2 -msgid "00000000000 00000" -msgstr "00000000000 00000" - -#: data/glade/object-editor.glade.h:3 -msgid "Xxx object properties" -msgstr "" -"Propiedades de objecto xxx" - -#: data/glade/object-editor.glade.h:5 -msgid "Allow merge to automatically shrink text" -msgstr "Permitir ampliar texto automáticamente" - -#: data/glade/object-editor.glade.h:6 -msgid "Angle:" -msgstr "Ángulo:" - -#: data/glade/object-editor.glade.h:7 -msgid "Checksum" -msgstr "Verificación" - -#: data/glade/object-editor.glade.h:10 -msgid "Family:" -msgstr "Familia:" - -#: data/glade/object-editor.glade.h:12 -msgid "Fill" -msgstr "Relleno" - -#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 -msgid "Height:" -msgstr "Alto:" - -#: data/glade/object-editor.glade.h:14 -msgid "Image" -msgstr "Imagen" - -#: data/glade/object-editor.glade.h:15 -msgid "Insert merge field" -msgstr "Insertar campo para combinar" - -#: data/glade/object-editor.glade.h:17 -msgid "Length:" -msgstr "Longitud:" - -#: data/glade/object-editor.glade.h:18 -msgid "Line" -msgstr "Línea" - -#: data/glade/object-editor.glade.h:20 -msgid "Literal:" -msgstr "Literal:" - -#: data/glade/object-editor.glade.h:21 -msgid "Load image" -msgstr "Cargar imagen" - -#: data/glade/object-editor.glade.h:22 -msgid "Position" -msgstr "Posición" - -#: data/glade/object-editor.glade.h:23 -msgid "Reset image size" -msgstr "Restablecer el tamaño de la imagen" - -#: data/glade/object-editor.glade.h:24 -msgid "Size" -msgstr "Tamaño" - -#: data/glade/object-editor.glade.h:25 -msgid "Size:" -msgstr "Tamaño:" - -#: data/glade/object-editor.glade.h:26 -msgid "Style" -msgstr "Estilo" - -#: data/glade/object-editor.glade.h:27 -msgid "Style:" -msgstr "Estilo:" - -#: data/glade/object-editor.glade.h:30 -msgid "X:" -msgstr "X:" - -#: data/glade/object-editor.glade.h:31 -msgid "Y:" -msgstr "Y:" - -#: data/glade/object-editor.glade.h:32 -msgid "degrees" -msgstr "grados" - -#: data/glade/object-editor.glade.h:33 -msgid "dialog1" -msgstr "dialogo1" - -#: data/glade/object-editor.glade.h:34 -msgid "digits:" -msgstr "dígitos:" - -#: data/glade/object-editor.glade.h:35 -msgid "format:" -msgstr "Formato:" - -#: data/glade/template-designer.glade.h:1 -msgid " " -msgstr " " - -#: data/glade/template-designer.glade.h:2 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(por ej., \"Etiquetas para correo,\" \"Tarjetas de negocio,\" ...)" - -#: data/glade/template-designer.glade.h:3 -msgid "(e.g., 8163A)" -msgstr "(por ej., 8163A)" - -#: data/glade/template-designer.glade.h:4 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(por ej., Avery, Acme, ...)" - -#: data/glade/template-designer.glade.h:6 -msgid "1. Outer radius:" -msgstr "1. Radio externo:" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "1. Radio:" - -#: data/glade/template-designer.glade.h:8 -msgid "1. Width:" -msgstr "1. Ancho:" - -#: data/glade/template-designer.glade.h:9 -msgid "2. Height:" -msgstr "2. Alto:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "2. Radio interno:" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "2. Sobrante (sobreimpresión permitida):" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "3. Ancho de recorte:" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "3. Márgen" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "3. Redondez (radio de las esquinas)" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "4. Alto de recorte:" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "4. Sobrante horizontal (sobreimpresión permitida):" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "5. Sobrante vertical (sobreimpresión permitida):" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "5. Sobrante (sobreimpresión permitida):" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "6. Margen" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "Marca/Fabricante:" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD (incluyendo CD-tarjeta)" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"Fecilitaciones!\n" -" \n" -"Ha completado la plantilla.\n" -"Si desea guardar su diseño pulse en \"Aplicar\".\n" -" \n" -"Puede pulsar \"Cancelar\" para abandonar su diseño\n" -"o \"Atrás\" para volver a editarlo." - -#: data/glade/template-designer.glade.h:30 -msgid "Design Completed" -msgstr "Diseño completo" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "Distancia desde el borde izquierdo (x0):" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "Distancia desde el borde superior (y0):" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "Desplazamiento horizontal (dx):" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" -"¿Cuantas disposiciones tendrá su plantilla?\n" -"\n" -"Una disposición es un conjunto de etiquetas o tarjetas que se pueden ordenar " -"en una hoja.\n" -"La mayoría de las plantillas necesitan solo una disposición, como en el " -"primer ejemplo.\n" -"El segundo ejemplo muestra dos disposiciones." - -#: data/glade/template-designer.glade.h:40 -msgid "Label Size (CD/DVD)" -msgstr "Tamaño de etiqueta (CD/DVD)" - -#: data/glade/template-designer.glade.h:41 -msgid "Label Size (Round)" -msgstr "Tamaño de etiqueta (Redondeada):" - -#: data/glade/template-designer.glade.h:42 -msgid "Label or Card Shape" -msgstr "Forma de etiqueta o tarjeta" - -#: data/glade/template-designer.glade.h:43 -msgid "Label or Card Size (Rectangular)" -msgstr "Tamaño de etiqueta o tarjeta (rectangular)" - -#: data/glade/template-designer.glade.h:44 -msgid "Layout #1" -msgstr "Disposición 1:" - -#: data/glade/template-designer.glade.h:45 -msgid "Layout #2" -msgstr "Disposición 2:" - -#: data/glade/template-designer.glade.h:46 -msgid "Layout(s)" -msgstr "Disposicion(es):" - -#: data/glade/template-designer.glade.h:47 -msgid "Name and Description" -msgstr "Nombre y descripción:" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "Cantidad horizontal (nx):" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "Cantidad vertical (ny):" - -#: data/glade/template-designer.glade.h:50 -msgid "Number of Layouts" -msgstr "Cantidad de disposiciones" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "Cantidad de disposiciones:" - -#: data/glade/template-designer.glade.h:52 -msgid "Page Size" -msgstr "Tamaño de la página" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "Número de parte:" - -#: data/glade/template-designer.glade.h:55 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "" -"Por favor ingrese la siguiente información que identifique la plantilla." - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "Por favor ingrese la siguiente información sobre la disposición." - -#: data/glade/template-designer.glade.h:57 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "Por favor ingrese las medidas de cada etiqueta de su plantilla." - -#: data/glade/template-designer.glade.h:58 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" -"Por favor ingrese los siguientes parámetros de tamaño para cada etiqueta en " -"su plantilla." - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "Por favor seleccione la forma básica de las etiquetas o tarjetas." - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "Por favor seleccione el tamaño de la página para la plantilla." - -#: data/glade/template-designer.glade.h:61 -msgid "Print test sheet" -msgstr "Imprimir página de prueba" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "Rectangular o cuadrada (puede tener bordes redondeados)" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "Redonda" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"Plantillas que necesitan\n" -"dos disposiciones." - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"Plantillas que necesitan\n" -"una disposición." - -#: data/glade/template-designer.glade.h:68 -msgid "Vertical pitch (dy):" -msgstr "Desplazamiento vertical (dy):" - -#: data/glade/template-designer.glade.h:69 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"Bienvenido al diseñador de plantillas de gLabels.\n" -"\n" -"Este diálogo le asistirá en la creación de una plantilla personalizada." - -#. Other ISO A series sizes -#: data/templates/paper-sizes.xml.h:2 -msgid "A0" -msgstr "A0" - -#: data/templates/paper-sizes.xml.h:3 -msgid "A1" -msgstr "A1" - -#: data/templates/paper-sizes.xml.h:4 -msgid "A10" -msgstr "A10" - -#: data/templates/paper-sizes.xml.h:5 -msgid "A2" -msgstr "A2" - -#: data/templates/paper-sizes.xml.h:6 -msgid "A3" -msgstr "A3" - -#: data/templates/paper-sizes.xml.h:7 -msgid "A4" -msgstr "A4" - -#: data/templates/paper-sizes.xml.h:8 -msgid "A5" -msgstr "A5" - -#: data/templates/paper-sizes.xml.h:9 -msgid "A6" -msgstr "A6" - -#: data/templates/paper-sizes.xml.h:10 -msgid "A7" -msgstr "A7" - -#: data/templates/paper-sizes.xml.h:11 -msgid "A8" -msgstr "A8" - -#: data/templates/paper-sizes.xml.h:12 -msgid "A9" -msgstr "A9" - -#. ISO B series sizes -#: data/templates/paper-sizes.xml.h:14 -msgid "B0" -msgstr "B0" - -#: data/templates/paper-sizes.xml.h:15 -msgid "B1" -msgstr "B1" - -#: data/templates/paper-sizes.xml.h:16 -msgid "B10" -msgstr "B10" - -#: data/templates/paper-sizes.xml.h:17 -msgid "B2" -msgstr "B2" - -#: data/templates/paper-sizes.xml.h:18 -msgid "B3" -msgstr "B3" - -#: data/templates/paper-sizes.xml.h:19 -msgid "B4" -msgstr "B4" - -#: data/templates/paper-sizes.xml.h:20 -msgid "B5" -msgstr "B5" - -#: data/templates/paper-sizes.xml.h:21 -msgid "B6" -msgstr "B6" - -#: data/templates/paper-sizes.xml.h:22 -msgid "B7" -msgstr "B7" - -#: data/templates/paper-sizes.xml.h:23 -msgid "B8" -msgstr "B8" - -#: data/templates/paper-sizes.xml.h:24 -msgid "B9" -msgstr "B9" - -#: data/templates/paper-sizes.xml.h:25 -msgid "US Executive" -msgstr "Ejecutivo" - -#. Other US paper sizes -#: data/templates/paper-sizes.xml.h:27 -msgid "US Legal" -msgstr "Legal" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:2 -#: data/templates/zweckform-iso-templates.xml.h:2 -msgid "Address Labels" -msgstr "Etiquetas de dirección" - -#. =================================================================== -#. ============================================================ -#. =================================================================== -#. ====================================================== -#: data/templates/avery-us-templates.xml.h:4 -#: data/templates/avery-iso-templates.xml.h:4 -#: data/templates/zweckform-iso-templates.xml.h:6 -#: data/templates/misc-us-templates.xml.h:3 -#: data/templates/misc-iso-templates.xml.h:17 -msgid "Business Cards" -msgstr "Tarjetas de negocio" - -#: data/templates/avery-us-templates.xml.h:5 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "Etiquetas de CD/DVD" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:7 -msgid "Diskette Labels" -msgstr "Etiquetas de diskettes" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:9 -msgid "Filing Labels" -msgstr "Etiquetas para archivado" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:11 -msgid "Full Sheet Labels" -msgstr "Etiquetas de página completa" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:13 -msgid "Large Round Labels" -msgstr "Etiquetas redondeadas grandes" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:15 -msgid "Name Badge Labels" -msgstr "Etiquetas de distintivos" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:17 -msgid "Return Address Labels" -msgstr "Etiquetas de dirección de remitente" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:19 -msgid "Shipping Labels" -msgstr "Etiquetas de envío" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:21 -msgid "Small Round Labels" -msgstr "Etiquetas redondeadas pequeñas" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:23 -msgid "Square Labels" -msgstr "Etiquetas cuadradas" - -#: data/templates/avery-us-templates.xml.h:24 -msgid "Video Tape Face Labels" -msgstr "Etiquetas de video (frente)" - -#: data/templates/avery-us-templates.xml.h:25 -msgid "Video Tape Spine Labels" -msgstr "Etiquetas de video (lateral)" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:2 -msgid "Address labels" -msgstr "Etiquetas de dirección" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:6 -msgid "CD Booklet" -msgstr "Tapa de CD" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:8 -msgid "CD Inlet" -msgstr "Interior de CD" - -#. =============================================================== -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:10 -#: data/templates/zweckform-iso-templates.xml.h:8 -#: data/templates/misc-us-templates.xml.h:5 -#: data/templates/misc-iso-templates.xml.h:21 -msgid "CD/DVD Labels" -msgstr "Etiquetas de CD/DVD" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:12 -msgid "Diskette labels" -msgstr "Etiquetas de disquette" - -#. =============================================================== -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:14 -#: data/templates/zweckform-iso-templates.xml.h:14 -#: data/templates/misc-iso-templates.xml.h:35 -msgid "Mailing Labels" -msgstr "Etiquetas de correo" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:16 -msgid "Mailing labels" -msgstr "Etiquetas de correo" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:18 -msgid "Mini Address Labels" -msgstr "Etiquetas de dirección pequeñas" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:20 -msgid "Shipping labels" -msgstr "Etiquetas de envío" - -# REVISAR -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:4 -msgid "Allround Labels" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:10 -msgid "Correction and Cover-up Labels" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:12 -msgid "Lever Arch File Labels" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:16 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:18 -msgid "Rectangular Copier Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:20 -#: data/templates/misc-iso-templates.xml.h:44 -msgid "Rectangular Labels" -msgstr "Etiquetas rectangulares" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:22 -msgid "Video Labels (back)" -msgstr "Etiquetas de video (dorso)" - -#: data/templates/misc-us-templates.xml.h:1 -msgid "Business Card CD" -msgstr "CD-tarjeta" - -# REVISAR -#: data/templates/misc-us-templates.xml.h:4 -msgid "CD Template Rectangles" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:6 -msgid "CD/DVD Labels (Face Only)" -msgstr "Etiquetas CD/DVD (Sólo frente)" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:23 -msgid "CD/DVD Labels (face only)" -msgstr "Etiquetas CD/DVD (sólo frente)" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:9 -msgid "Cassette Labels" -msgstr "Etiquetas de casette" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:11 -msgid "DLT Labels" -msgstr "Etiquetas DLT" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:13 -msgid "Microtube labels" -msgstr "Etiquetas microtubo" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Mini-CD Labels" -msgstr "Etiquetas Mini-CD" - -# REVISAR -#: data/templates/misc-us-templates.xml.h:15 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "" - -# REVISAR -#: data/templates/misc-us-templates.xml.h:16 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "" - -# REVISAR -#: data/templates/misc-us-templates.xml.h:17 -#: data/templates/misc-iso-templates.xml.h:42 -msgid "PRO CD Labels 2-up (face only)" -msgstr "" - -# REVISAR -#: data/templates/misc-us-templates.xml.h:18 -msgid "Slimline CD Case (rightside up)" -msgstr "" - -# REVISAR -#: data/templates/misc-us-templates.xml.h:19 -msgid "Slimline CD Case (upside down)" -msgstr "" - -# REVISAR -#: data/templates/misc-iso-templates.xml.h:1 -msgid "Agipa 119488: Business Cards" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:3 -msgid "Allround Labels --24" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:5 -msgid "Allround Labels --44" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:7 -msgid "Allround Labels --64" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:9 -msgid "Allround Labels --65" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:11 -msgid "Arch File Labels" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Arch File Labels (large)" -msgstr "" - -# REVISAR -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Arch File Labels (small)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:19 -msgid "CD Labels" -msgstr "Etiquetas para CD" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:25 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "Etieuats CD/DVD Formato estándar (sólo frente)" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:27 -msgid "Diskette Labels (face only)" -msgstr "Etiquetas para disquette (sólo cara)" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:29 -msgid "EPSON Photo Stickers 16" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:31 -msgid "Etiketten" -msgstr "Etiketten" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:33 -msgid "Fridge Magnet Stickers" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:37 -msgid "Mailing Labels --14" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:39 -msgid "Mailing Labels-2 columns" -msgstr "Etiquetas de correo - 2 columnas" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:41 -msgid "Mailing Labels-3 columns" -msgstr "Etiquetas de correo - 3 columnas" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:46 -msgid "Video Labels (face only)" -msgstr "Etiqeutas de video (solo frente)" - -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "Crear etiquetas, tarjetas de negocios y portadas" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "Diseñador de etiquetas gLabels" - -#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "Archivo de projecto gLabels" - -#, fuzzy -#~ msgid "Object _Properties..." -#~ msgstr "Propiedades del texto" - -#~ msgid "Display units" -#~ msgstr "Mostrar unidades de medida" - -#~ msgid "Default page size" -#~ msgstr "Tamaño de página por omisión" - -#~ msgid "Outline" -#~ msgstr "Contorno" - -#~ msgid "Edit line object properties" -#~ msgstr "Modificar las propiedades del objeto línea" - -#~ msgid "Edit text object properties" -#~ msgstr "Modificar las propiedades del objeto texto" - -#~ msgid "Maintain current aspect ratio" -#~ msgstr "Mantener la proporción actual del aspecto" - -#, fuzzy -#~ msgid "Open %s" -#~ msgstr "Abrir" - -#~ msgid "Revert to saved copy of %s?" -#~ msgstr "¿ Recuperar la copia salvada de %s ?" - -#~ msgid "Unknown media type. Using default." -#~ msgstr "Tipo de papel desconocido. Utilizando el tipo por omisión." - -#~ msgid "" -#~ "``%s'' has been modified.\n" -#~ "\n" -#~ "Do you wish to save it?" -#~ msgstr "" -#~ "\"%s\" ha sido modificado.\n" -#~ "\n" -#~ "¿ Desea salvarlo ?" - -#~ msgid "Close / Save label as" -#~ msgstr "Cerrar / Salvar etiqueta como" - -#~ msgid "Label no longer valid!" -#~ msgstr "¡ La etiqueta ya no es válida !" - -#~ msgid "Error writing file" -#~ msgstr "Error salvando el archivo" - -#~ msgid "Edit properties..." -#~ msgstr "Modificar propiedades" - -#~ msgid "Appearance" -#~ msgstr "Apariencia" - -#~ msgid "Position/Size" -#~ msgstr "Posición/Tamaño" - -#~ msgid "Image format not currently supported" -#~ msgstr "Formato de imagen no soportado actualmente" - -#~ msgid "Barcode data" -#~ msgstr "Datos del código de barras" - -#~ msgid "%" -#~ msgstr "%" - -#~ msgid "Show text with barcode" -#~ msgstr "Mostrar texto con código de barras" - -#~ msgid "Fields" -#~ msgstr "Campos" - -#~ msgid "Column" -#~ msgstr "Columna" - -#~ msgid "Sample data" -#~ msgstr "Datos de ejemplo" - -#~ msgid "Make a new, empty label" -#~ msgstr "Crear una etiqueta vacía nueva" - -#~ msgid " New " -#~ msgstr "Nuevo" - -#~ msgid "New Label/Card" -#~ msgstr "Nueva tarjeta/etiqueta" - -#~ msgid " Open " -#~ msgstr " Abrir " - -#~ msgid " Save " -#~ msgstr " Guardar " - -#~ msgid " Print " -#~ msgstr " Imprimir " - -#~ msgid "Function is not implemented!" -#~ msgstr "¡ La funcionalidad no está aún implementada !" diff --git a/glabels2/po/fr.po b/glabels2/po/fr.po deleted file mode 100644 index 3ee3a6cc..00000000 --- a/glabels2/po/fr.po +++ /dev/null @@ -1,3508 +0,0 @@ -# French translation of glabels. -# Copyright (C) 2001 Jim Evins -# Olivier Berger -# Florent Morel , 2001, 2004 -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 2.0.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-26 10:07+0200\n" -"PO-Revision-Date: 2009-08-26 11:10+0200\n" -"Last-Translator: Claude Paroz \n" -"Language-Team: French \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../src/glabels.c:75 ../src/glabels-batch.c:70 -msgid "[FILE...]" -msgstr "[FICHIER...]" - -#: ../src/glabels.c:91 -msgid "- gLabels label designer" -msgstr "- créateur de patrons gLabels" - -#: ../src/glabels-batch.c:54 -msgid "set output filename (default=\"output.pdf\")" -msgstr "définit le fichier de sortie (défaut=\"output.pdf\")" - -#: ../src/glabels-batch.c:54 ../src/glabels-batch.c:68 -msgid "filename" -msgstr "nom de fichier" - -#: ../src/glabels-batch.c:56 -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:56 -msgid "sheets" -msgstr "feuilles" - -#: ../src/glabels-batch.c:58 -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:58 -msgid "copies" -msgstr "copies" - -#: ../src/glabels-batch.c:60 -msgid "first label on first sheet (default=1)" -msgstr "première étiquette sur la première page (défaut=1)" - -#: ../src/glabels-batch.c:60 -msgid "first" -msgstr "première" - -# src/print.c:180 -# src/print.c:180 -# src/print.c:196 -# src/print_dialog.c:152 -#: ../src/glabels-batch.c:62 ../data/glade/print-custom-widget.glade.h:6 -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:64 ../data/glade/print-custom-widget.glade.h:5 -msgid "print in reverse (i.e. a mirror image)" -msgstr "imprimer à l'envers (i.e. une image miroir)" - -#: ../src/glabels-batch.c:66 ../data/glade/print-custom-widget.glade.h:4 -msgid "print crop marks" -msgstr "imprimer les guides de coupe" - -#: ../src/glabels-batch.c:68 -msgid "input file for merging" -msgstr "fichier d'entrée pour la fusion" - -#: ../src/glabels-batch.c:96 -msgid "- batch process gLabels label files" -msgstr "- traitement par lots de fichiers d'étiquettes gLabels" - -# src/file.c:214 -# src/file.c:214 -# src/file.c:249 -# src/file.c:249 -#: ../src/glabels-batch.c:142 -#, c-format -msgid "cannot perform document merge with glabels file %s\n" -msgstr "" -"impossible d'effectuer une fusion de document avec le fichier glabels %s\n" - -# src/file.c:214 -# src/file.c:214 -# src/file.c:249 -# src/file.c:249 -#: ../src/glabels-batch.c:164 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "impossible d'ouvrir le fichier glabels %s\n" - -#: ../src/window.c:259 -msgid "(none) - gLabels" -msgstr "(vide) - gLabels" - -#: ../src/window.c:432 -msgid "(modified)" -msgstr "(modifié)" - -# 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/stock.c:72 -msgid "_Select Mode" -msgstr "Mode _sélection" - -# 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/stock.c:73 -msgid "_Text" -msgstr "_Texte" - -# 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 -#: ../src/stock.c:74 -msgid "_Line" -msgstr "_Ligne" - -# src/menu.c:103 -# src/menu.c:103 -#: ../src/stock.c:75 -msgid "_Box" -msgstr "_Boîte" - -# src/menu.c:109 -# src/menu.c:109 -#: ../src/stock.c:76 -msgid "_Ellipse" -msgstr "_Ellipse" - -# 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/stock.c:77 -msgid "_Image" -msgstr "_Image" - -# src/item_barcode.c:316 -# src/item_barcode.c:317 -# src/menu.c:116 -# src/menu.c:116 -#: ../src/stock.c:78 -msgid "Bar_code" -msgstr "_Code-barre" - -# 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/stock.c:79 -msgid "_Merge Properties" -msgstr "Propriétés de _fusion" - -# src/item_text.c:467 -# src/item_text.c:467 -# src/item_text.c:482 -# src/item_text.c:482 -#: ../src/stock.c:80 -msgid "Object _Properties" -msgstr "_Propriétés de l'objet" - -# 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/stock.c:81 -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/stock.c:82 -msgid "Send to _Back" -msgstr "_Reculer à l'arrière-plan" - -# src/rotate_select.c:187 -# src/rotate_select.c:187 -# src/rotate_select.c:167 -# src/rotate_select.c:169 -#: ../src/stock.c:83 -msgid "Rotate _Left" -msgstr "Rotation _gauche" - -# src/rotate_select.c:187 -# src/rotate_select.c:187 -# src/rotate_select.c:167 -# src/rotate_select.c:169 -#: ../src/stock.c:84 -msgid "Rotate _Right" -msgstr "Rotation _droite" - -#: ../src/stock.c:85 -msgid "Flip _Horizontally" -msgstr "Retourner _horizontalement" - -#: ../src/stock.c:86 -msgid "Flip _Vertically" -msgstr "Retourner _verticalement" - -#: ../src/stock.c:87 -msgid "_Lefts" -msgstr "_Gauches" - -#: ../src/stock.c:88 -msgid "_Rights" -msgstr "_Droites" - -#: ../src/stock.c:89 -msgid "_Centers" -msgstr "_Centres" - -# src/menu.c:157 -# src/menu.c:157 -#: ../src/stock.c:90 -msgid "_Tops" -msgstr "En _haut" - -#: ../src/stock.c:91 -msgid "Bottoms" -msgstr "En _bas" - -#: ../src/stock.c:92 -msgid "Centers" -msgstr "_Centré" - -#: ../src/stock.c:93 ../src/stock.c:94 -msgid "Label Ce_nter" -msgstr "Centre de l'étiquette" - -#: ../src/stock.c:95 ../data/glade/property-bar.glade.h:3 -msgid "Fill color" -msgstr "Couleur de remplissage" - -#: ../src/stock.c:96 ../data/glade/property-bar.glade.h:8 -msgid "Line color" -msgstr "Couleur de 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 -#: ../src/stock.c:97 ../src/stock.c:99 -msgid "Linked" -msgstr "Lié" - -# src/merge.c:80 -# src/merge.c:78 -#: ../src/stock.c:98 ../src/stock.c:100 -msgid "Not Linked" -msgstr "Non lié" - -# 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 -#. Menu entries. -#: ../src/ui.c:93 -msgid "_File" -msgstr "_Fichier" - -#: ../src/ui.c:94 -msgid "Open Recent _Files" -msgstr "_Fichiers récents" - -#: ../src/ui.c:95 -msgid "_Edit" -msgstr "É_dition" - -# src/menu.c:50 -# src/menu.c:50 -# src/menu.c:50 -# src/menu.c:50 -#: ../src/ui.c:96 -msgid "_View" -msgstr "_Affichage" - -#: ../src/ui.c:97 -msgid "Customize Main Toolbar" -msgstr "Personnaliser le barre d'outils principale" - -#: ../src/ui.c:98 -msgid "Customize Drawing Toolbar" -msgstr "Personnaliser la barre d'outils dessin" - -#: ../src/ui.c:99 -msgid "Customize Properties Toolbar" -msgstr "Personnaliser la barre d'outils de propriétés" - -#: ../src/ui.c:100 -msgid "_Objects" -msgstr "_Objets" - -#: ../src/ui.c:101 -msgid "_Create" -msgstr "_Créer" - -#: ../src/ui.c:102 -msgid "_Order" -msgstr "_Ordre" - -# src/rotate_select.c:187 -# src/rotate_select.c:187 -# src/rotate_select.c:167 -# src/rotate_select.c:169 -#: ../src/ui.c:103 -msgid "_Rotate/Flip" -msgstr "_Rotation/Renversement" - -#: ../src/ui.c:104 -msgid "Align _Horizontal" -msgstr "Aligner _horizontalement" - -#: ../src/ui.c:105 -msgid "Align _Vertical" -msgstr "Aligner _verticalement" - -#: ../src/ui.c:106 -msgid "_Help" -msgstr "Aid_e" - -#. Popup entries. -#: ../src/ui.c:109 ../src/ui.c:110 -msgid "Context Menu" -msgstr "Menu contextuel" - -# src/menu.c:50 -# src/menu.c:50 -# src/menu.c:50 -# src/menu.c:50 -#: ../src/ui.c:115 -msgid "_New" -msgstr "_Nouveau" - -# 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/ui.c:117 -msgid "Create a new file" -msgstr "Crée un nouveau document" - -# src/file.c:178 -# src/file.c:178 -# src/file.c:211 -# src/file.c:211 -#: ../src/ui.c:122 -msgid "_Open..." -msgstr "_Ouvrir..." - -# src/menu.c:140 -# src/menu.c:140 -# src/menu.c:170 -# src/menu.c:170 -#: ../src/ui.c:124 -msgid "Open a file" -msgstr "Ouvre un 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/ui.c:129 -msgid "_Save" -msgstr "_Enregistrer" - -# src/menu.c:142 -# src/menu.c:142 -# src/menu.c:172 -# src/menu.c:172 -#: ../src/ui.c:131 -msgid "Save current file" -msgstr "Enregistrer le fichier en cours" - -# 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/ui.c:136 -msgid "Save _As..." -msgstr "Enregistrer _sous..." - -#: ../src/ui.c:138 -msgid "Save the current file to a different name" -msgstr "Enregistre le fichier en cours avec un nom différent" - -# src/print.c:149 -# src/print.c:149 -# src/print.c:141 -# src/print_dialog.c:99 -#: ../src/ui.c:143 -msgid "_Print..." -msgstr "Im_primer..." - -# src/menu.c:145 -# src/menu.c:145 -# src/menu.c:175 -# src/menu.c:175 -#: ../src/ui.c:145 -msgid "Print the current file" -msgstr "Imprime le fichier en cours" - -# src/item_text.c:467 -# src/item_text.c:467 -# src/item_text.c:482 -# src/item_text.c:482 -#: ../src/ui.c:150 -msgid "Properties..." -msgstr "Propriétés..." - -# src/item_box.c:251 -# src/item_box.c:251 -# src/merge_properties.c:82 -# src/merge_properties.c:82 -#: ../src/ui.c:152 -msgid "Modify document properties" -msgstr "Modifier les propriétés du document" - -#: ../src/ui.c:157 -msgid "Template _Designer..." -msgstr "_Créateur de patrons..." - -# 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/ui.c:159 -msgid "Create a custom template" -msgstr "Créer un patron personnalisé" - -#: ../src/ui.c:164 -msgid "_Close" -msgstr "_Fermer" - -# src/menu.c:142 -# src/menu.c:142 -# src/menu.c:172 -# src/menu.c:172 -#: ../src/ui.c:166 -msgid "Close the current file" -msgstr "Ferme le fichier en cours" - -#: ../src/ui.c:171 -msgid "_Quit" -msgstr "_Quitter" - -#: ../src/ui.c:173 -msgid "Quit the program" -msgstr "Quitte le programme" - -#: ../src/ui.c:180 -msgid "Cut" -msgstr "Couper" - -#: ../src/ui.c:182 -msgid "Cut the selection" -msgstr "Coupe la sélection" - -#: ../src/ui.c:187 -msgid "Copy" -msgstr "Copier" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:86 -#: ../src/ui.c:189 -msgid "Copy the selection" -msgstr "Copie la sélection" - -#: ../src/ui.c:194 -msgid "Paste" -msgstr "Coller" - -#: ../src/ui.c:196 -msgid "Paste the clipboard" -msgstr "Colle le presse-papiers" - -# 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/ui.c:201 -msgid "Delete" -msgstr "Supprimer" - -# 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/ui.c:203 -msgid "Delete the selected objects" -msgstr "Supprime les objets sélectionnés" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:85 -# src/menu.c:85 -#: ../src/ui.c:208 -msgid "Select All" -msgstr "Tout 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/ui.c:210 -msgid "Select all objects" -msgstr "Sélectionne tous les objets" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:85 -# src/menu.c:85 -#: ../src/ui.c:215 -msgid "Un-select All" -msgstr "Désélectionner tout" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:86 -#: ../src/ui.c:217 -msgid "Remove all selections" -msgstr "Annule toutes les sélections" - -# src/preferences.c:92 -# src/prefs.c:101 -# src/prefs.c:92 -# src/prefs.c:86 -#: ../src/ui.c:222 -msgid "Preferences" -msgstr "Préférences" - -#: ../src/ui.c:224 -msgid "Configure the application" -msgstr "Configure le logiciel" - -# 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/ui.c:231 -msgid "Zoom in" -msgstr "Zoom avant" - -#: ../src/ui.c:233 -msgid "Increase magnification" -msgstr "Augmente l'agrandissement" - -# 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/ui.c:238 -msgid "Zoom out" -msgstr "Zoom arrière" - -#: ../src/ui.c:240 -msgid "Decrease magnification" -msgstr "Réduit l'agrandissement" - -# src/tools.c:90 -# src/tools.c:90 -# src/menu.c:127 -# src/menu.c:127 -#: ../src/ui.c:245 -msgid "Zoom 1 to 1" -msgstr "Zoom 1:1" - -#: ../src/ui.c:247 -msgid "Restore scale to 100%" -msgstr "Remet l'échelle à 100%" - -# 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/ui.c:252 -msgid "Zoom to fit" -msgstr "Adapter le zoom à la taille de la fenêtre" - -#: ../src/ui.c:254 -msgid "Set scale to fit window" -msgstr "Adapte l'échelle à la taille de la fenêtre" - -# 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/ui.c:261 -msgid "Select Mode" -msgstr "Mode sélection" - -# 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/ui.c:263 -msgid "Select, move and modify objects" -msgstr "Sélectionne, déplace et modifie les objets" - -# 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/ui.c:268 ../src/view-text.c:494 -#: ../data/glade/object-editor.glade.h:32 -msgid "Text" -msgstr "Texte" - -# 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/ui.c:270 -msgid "Create text object" -msgstr "Crée un objet texte" - -# src/menu.c:103 -# src/menu.c:103 -#: ../src/ui.c:275 -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/ui.c:277 -msgid "Create box/rectangle object" -msgstr "Crée un objet boîte/rectangle" - -# 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 -#: ../src/ui.c:282 ../data/glade/object-editor.glade.h:20 -msgid "Line" -msgstr "Ligne" - -# 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/ui.c:284 -msgid "Create line object" -msgstr "Crée un objet ligne" - -# src/menu.c:109 -# src/menu.c:109 -#: ../src/ui.c:289 -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/ui.c:291 -msgid "Create ellipse/circle object" -msgstr "Crée un objet ellipse/cercle" - -# 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/ui.c:296 ../data/glade/object-editor.glade.h:16 -msgid "Image" -msgstr "Image" - -# 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/ui.c:298 -msgid "Create image object" -msgstr "Crée un objet image" - -# src/item_barcode.c:316 -# src/item_barcode.c:317 -# src/menu.c:116 -# src/menu.c:116 -#: ../src/ui.c:303 -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/ui.c:305 -msgid "Create barcode object" -msgstr "Crée un objet code-barre" - -# 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/ui.c:310 -msgid "Bring to front" -msgstr "Avancer au premier plan" - -#: ../src/ui.c:312 -msgid "Raise object to top" -msgstr "Remonte l'objet au plus haut niveau" - -# 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/ui.c:317 -msgid "Send to back" -msgstr "Reculer à l'arrière-plan" - -#: ../src/ui.c:319 -msgid "Lower object to bottom" -msgstr "Descend l'objet à l'arrière-plan" - -# src/rotate_select.c:187 -# src/rotate_select.c:187 -# src/rotate_select.c:167 -# src/rotate_select.c:169 -#: ../src/ui.c:324 -msgid "Rotate left" -msgstr "Rotation gauche" - -#: ../src/ui.c:326 -msgid "Rotate object 90 degrees counter-clockwise" -msgstr "" -"Tourne l'objet de 90 degrés dans le sens inverse des aiguilles d'une montre" - -# src/rotate_select.c:187 -# src/rotate_select.c:187 -# src/rotate_select.c:167 -# src/rotate_select.c:169 -#: ../src/ui.c:331 -msgid "Rotate right" -msgstr "Rotation droite" - -#: ../src/ui.c:333 -msgid "Rotate object 90 degrees clockwise" -msgstr "Tourne l'objet de 90 degrés dans le sens des aiguilles d'une montre" - -#: ../src/ui.c:338 -msgid "Flip horizontally" -msgstr "Retourner horizontalement" - -#: ../src/ui.c:340 -msgid "Flip object horizontally" -msgstr "Retourne l'objet horizontalement" - -#: ../src/ui.c:345 -msgid "Flip vertically" -msgstr "Retourner verticalement" - -#: ../src/ui.c:347 -msgid "Flip object vertically" -msgstr "Retourne l'objet verticalement" - -# src/prop_text.c:277 -# src/prop_text.c:264 -# src/prop_text.c:248 -# src/prop_text.c:248 -#: ../src/ui.c:352 -msgid "Align left" -msgstr "Aligner à gauche" - -#: ../src/ui.c:354 -msgid "Align objects to left edges" -msgstr "Aligne les objets sur leur bordure gauche" - -#: ../src/ui.c:359 -msgid "Align right" -msgstr "Aligner à droite" - -#: ../src/ui.c:361 -msgid "Align objects to right edges" -msgstr "Aligne les objets sur leur bordure droite" - -#: ../src/ui.c:366 -msgid "Align horizontal center" -msgstr "Aligner centré horizontalement" - -#: ../src/ui.c:368 -msgid "Align objects to horizontal centers" -msgstr "Aligne horizontalement le centre des objets" - -#: ../src/ui.c:373 -msgid "Align tops" -msgstr "Aligner au sommet" - -#: ../src/ui.c:375 -msgid "Align objects to top edges" -msgstr "Aligne les objets d'après leur sommet" - -#: ../src/ui.c:380 -msgid "Align bottoms" -msgstr "Aligner à la base" - -#: ../src/ui.c:382 -msgid "Align objects to bottom edges" -msgstr "Aligne les objets d'après leur base" - -#: ../src/ui.c:387 -msgid "Align vertical center" -msgstr "Aligner centré verticalement" - -#: ../src/ui.c:389 -msgid "Align objects to vertical centers" -msgstr "Aligne verticalement le centre des objets" - -#: ../src/ui.c:394 -msgid "Center horizontally" -msgstr "Centrer horizontalement" - -#: ../src/ui.c:396 -msgid "Center objects to horizontal label center" -msgstr "Aligne les objets horizontalement au centre de l'étiquette" - -#: ../src/ui.c:401 -msgid "Center vertically" -msgstr "Centrer verticalement" - -#: ../src/ui.c:403 -msgid "Center objects to vertical label center" -msgstr "Aligne les objets verticalement au centre de l'étiquette" - -# 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/ui.c:408 -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/ui.c:410 -msgid "Edit merge properties" -msgstr "Édite les propriétés de fusion" - -#: ../src/ui.c:417 -msgid "Contents" -msgstr "Sommaire" - -# src/file.c:183 -# src/file.c:183 -# src/file.c:213 -# src/file.c:213 -#: ../src/ui.c:419 -msgid "Open glabels manual" -msgstr "Ouvre le manuel de glabels" - -#: ../src/ui.c:424 -msgid "About..." -msgstr "À propos..." - -#: ../src/ui.c:426 -msgid "About glabels" -msgstr "À propos de glabels" - -#: ../src/ui.c:436 -msgid "Property toolbar" -msgstr "Barre d'outils de propriétés" - -#: ../src/ui.c:438 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "" -"Afficher ou non la barre d'outils de propriétés dans la fenêtre actuelle" - -#: ../src/ui.c:444 ../src/ui.c:489 ../src/ui.c:497 -msgid "Show tooltips" -msgstr "Afficher les infos-bulles" - -#: ../src/ui.c:446 -msgid "Show tooltips for property toolbar" -msgstr "Afficher les info-bulles dans la barre d'outils de propriétés" - -#: ../src/ui.c:452 -msgid "Grid" -msgstr "Grille" - -#: ../src/ui.c:454 -msgid "Change the visibility of the grid in the current window" -msgstr "Afficher ou non la grille dans la fenêtre actuelle" - -# src/preferences.c:213 -#: ../src/ui.c:460 -msgid "Markup" -msgstr "Marges" - -#: ../src/ui.c:462 -msgid "Change the visibility of markup lines in the current window" -msgstr "Afficher ou non les lignes de marges dans la fenêtre actuelle" - -#: ../src/ui.c:473 -msgid "Main toolbar" -msgstr "Barre d'outils principale" - -#: ../src/ui.c:475 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "Afficher ou non la barre d'outils principale dans la fenêtre actuelle" - -#: ../src/ui.c:481 -msgid "Drawing toolbar" -msgstr "Barre d'outils dessin" - -#: ../src/ui.c:483 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "Afficher ou non la barre d'outils dessin dans la fenêtre actuelle" - -#: ../src/ui.c:491 -msgid "Show tooltips for main toolbar" -msgstr "Afficher les info-bulles dans la barre d'outils principale" - -#: ../src/ui.c:499 -msgid "Show tooltips for drawing toolbar" -msgstr "Afficher les info-bulles dans la barre d'outils de dessin" - -# 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/ui-property-bar.c:1232 ../src/object-editor.c:587 -#: ../src/object-editor.c:593 -msgid "Default" -msgstr "Par défaut" - -# src/merge.c:80 -# src/merge.c:78 -#: ../src/ui-property-bar.c:1239 ../src/object-editor.c:599 -msgid "No line" -msgstr "Pas de ligne" - -#: ../src/ui-property-bar.c:1247 ../src/object-editor.c:606 -msgid "No fill" -msgstr "Pas de remplissage" - -# src/item_text.c:467 -# src/item_text.c:467 -# src/item_text.c:482 -# src/item_text.c:482 -#: ../src/ui-sidebar.c:152 -msgid "Object properties" -msgstr "Propriétés de l'objet" - -#: ../src/ui-commands.c:1084 -msgid "Glabels includes contributions from:" -msgstr "Glabels contient des contributions de :" - -#: ../src/ui-commands.c:1090 -msgid "See the file AUTHORS for additional credits," -msgstr "Voir le fichier AUTHORS pour des remerciements supplémentaires," - -#: ../src/ui-commands.c:1091 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "ou visitez http://glabels.sourceforge.net/" - -#: ../src/ui-commands.c:1103 -msgid "A label and business card creation program.\n" -msgstr "Un logiciel de création de cartes de visite et d'étiquettes.\n" - -#: ../src/ui-commands.c:1107 -msgid "translator-credits" -msgstr "" -"Olivier Berger \n" -"Florent Morel , 2001, 2004\n" -"Claude Paroz , 2007" - -# src/menu.c:185 -# src/menu.c:185 -# src/menu.c:290 -# src/menu.c:290 -#: ../src/ui-commands.c:1110 -msgid "" -"Glabels is free software; you can redistribute it and/or modify it\n" -"under the terms of the GNU General Public License as published by\n" -"the Free Software Foundation; either version 2 of the License, or\n" -"(at your option) any later version.\n" -"\n" -"This program is distributed in the hope that it will be useful, but\n" -"WITHOUT ANY WARRANTY; without even the implied warranty of\n" -"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" -"the GNU General Public License for more details.\n" -msgstr "" -"Glabels 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étails, voir la Licence " -"Publique Générale GNU.\n" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#: ../src/ui-commands.c:1136 -msgid "glabels" -msgstr "glabels" - -# src/file.c:59 -# src/file.c:59 -# src/file.c:72 -# src/file.c:72 -#: ../src/file.c:91 -msgid "New Label or Card" -msgstr "Nouvelle étiquette ou carte" - -# src/item_text.c:467 -# src/item_text.c:467 -# src/item_text.c:482 -# src/item_text.c:482 -#: ../src/file.c:191 -msgid "Label properties" -msgstr "Propriétés de l'étiquette" - -#: ../src/file.c:292 ../src/file.c:578 -msgid "All files" -msgstr "Tous les fichiers" - -# src/preferences.c:92 -# src/prefs.c:101 -# src/prefs.c:92 -# src/prefs.c:86 -#: ../src/file.c:297 ../src/file.c:583 -msgid "gLabels documents" -msgstr "Documents gLabels" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:86 -#: ../src/file.c:343 ../src/file.c:640 -msgid "Empty file name selection" -msgstr "Nom de fichier sélectionné vide" - -#: ../src/file.c:346 ../src/file.c:362 -msgid "Please select a file or supply a valid file name" -msgstr "Sélectionnez un fichier ou donnez un nom de fichier valide" - -#: ../src/file.c:359 -msgid "File does not exist" -msgstr "Ce fichier n'existe pas" - -# src/file.c:214 -# src/file.c:214 -# src/file.c:249 -# src/file.c:249 -# c-format -#: ../src/file.c:433 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "Impossible d'ouvrir le fichier « %s »" - -#: ../src/file.c:436 -msgid "Not a supported file format" -msgstr "Format de fichier non pris en charge" - -# 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/file.c:513 ../src/file.c:690 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "Impossible d'enregistrer « %s »" - -#: ../src/file.c:517 ../src/file.c:694 -msgid "Error encountered during save. The file is still not saved." -msgstr "" -"Erreur rencontrée durant l'enregistrement. Le fichier n'est toujours pas " -"enregistré. " - -# src/file.c:278 -# src/file.c:278 -# src/file.c:316 -# src/file.c:316 -#: ../src/file.c:556 -#, c-format -msgid "Save \"%s\" as" -msgstr "Enregistrer « %s » sous" - -# 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/file.c:643 -msgid "Please supply a valid file name" -msgstr "Donnez un nom de fichier valide" - -#: ../src/file.c:664 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "Écraser le fichier « %s » ?" - -#: ../src/file.c:668 -msgid "File already exists." -msgstr "Ce fichier existe déjà." - -#: ../src/file.c:764 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "Enregistrer les changements du document « %s » avant de fermer ?" - -#: ../src/file.c:768 -msgid "Your changes will be lost if you don't save them." -msgstr "Vos changements seront perdus si vous ne les enregistrez pas." - -#: ../src/file.c:771 -msgid "Close without saving" -msgstr "Fermer sans enregistrer" - -# 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 -#. Should not happen -#: ../src/prefs.c:159 ../src/prefs.c:166 -#: ../data/glade/object-editor.glade.h:43 -#: ../data/glade/prefs-dialog.glade.h:22 -msgid "points" -msgstr "points" - -# src/item_line.c:271 -# src/prefs.c:465 -# src/prefs.c:447 -# src/prefs.c:450 -#: ../src/prefs.c:161 ../data/glade/object-editor.glade.h:42 -#: ../data/glade/template-designer.glade.h:64 -msgid "inches" -msgstr "pouces" - -# src/prefs.c:467 -# src/prefs.c:449 -# src/prefs.c:452 -#: ../src/prefs.c:163 -msgid "mm" -msgstr "mm" - -# src/preferences.c:92 -# src/prefs.c:101 -# src/prefs.c:92 -# src/prefs.c:86 -#: ../src/prefs-dialog.c:162 ../data/glade/prefs-dialog.glade.h:21 -msgid "gLabels Preferences" -msgstr "Préférences de gLabels" - -# src/item_box.c:251 -# src/item_box.c:251 -# src/item_box.c:235 -# src/item_box.c:235 -#. Build editor. -#: ../src/view-box.c:175 -msgid "Box object properties" -msgstr "Propriétés de l'objet boîte" - -# src/item_ellipse.c:256 -# src/item_ellipse.c:256 -# src/item_ellipse.c:237 -# src/item_ellipse.c:237 -#. Build editor. -#: ../src/view-ellipse.c:175 -msgid "Ellipse object properties" -msgstr "Propriétés de l'objet ellipse" - -# src/item_box.c:251 -# src/item_box.c:251 -# src/item_box.c:235 -# src/item_box.c:235 -#. Build editor. -#: ../src/view-line.c:174 -msgid "Line object properties" -msgstr "Propriétés de l'objet ligne" - -# src/item_image.c:272 -# src/item_image.c:272 -# src/item_image.c:257 -# src/item_image.c:257 -#. Build editor. -#: ../src/view-image.c:174 -msgid "Image object properties" -msgstr "Propriétés de l'objet image" - -# src/item_box.c:251 -# src/item_box.c:251 -# src/item_box.c:235 -# src/item_box.c:235 -#. Build editor. -#: ../src/view-text.c:178 -msgid "Text object properties" -msgstr "Propriétés de l'objet texte" - -# src/item_barcode.c:299 -# src/item_barcode.c:299 -# src/item_barcode.c:287 -# src/item_barcode.c:287 -#. Build editor. -#: ../src/view-barcode.c:174 -msgid "Barcode object properties" -msgstr "Propriétés de l'objet code-barre" - -#: ../src/object-editor-image-page.c:270 -msgid "All Files" -msgstr "Tous les fichiers" - -# 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/object-editor-image-page.c:275 -msgid "All Images" -msgstr "Toutes les images" - -#: ../src/object-editor-image-page.c:290 -#, c-format -msgid "%s (*.%s)" -msgstr "%s (*.%s)" - -# 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/merge-properties-dialog.c:263 -msgid "Merge Properties" -msgstr "Propriétés de fusion" - -# src/merge_ui_text.c:170 -# src/merge_ui_text.c:170 -#: ../src/merge-properties-dialog.c:289 ../src/merge-properties-dialog.c:397 -msgid "Select merge-database source" -msgstr "Sélection du fichier de données pour la fusion" - -# 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-properties-dialog.c:298 ../src/merge-properties-dialog.c:417 -msgid "N/A" -msgstr "Non défini" - -# 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/merge-properties-dialog.c:324 -msgid "Select" -msgstr "Sélectionner" - -#: ../src/merge-properties-dialog.c:332 -msgid "Record/Field" -msgstr "Enregistrements/Champs" - -# src/item_barcode.c:309 -# src/item_barcode.c:308 -# src/item_barcode.c:297 -# src/item_barcode.c:297 -#: ../src/merge-properties-dialog.c:340 ../data/glade/object-editor.glade.h:10 -msgid "Data" -msgstr "Données" - -# 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-dialog.c:410 -msgid "Fixed" -msgstr "Fixe" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. =================================================================== -#: ../src/print-op.c:237 ../src/wdgt-print-copies.c:171 -#: ../data/templates/misc-iso-templates.xml.h:34 -msgid "Labels" -msgstr "Étiquettes" - -#: ../src/template-designer.c:358 -msgid "gLabels Template Designer" -msgstr "Créateur de patrons gLabels" - -#: ../src/template-designer.c:419 -msgid "Welcome" -msgstr "Bienvenue" - -# src/media_select.c:216 -# src/media_select.c:242 -# src/media_select.c:222 -# src/media_select.c:222 -#: ../src/template-designer.c:463 -msgid "Name and Description" -msgstr "Nom et description" - -# src/media_select.c:221 -# src/media_select.c:247 -# src/media_select.c:227 -# src/media_select.c:227 -#: ../src/template-designer.c:516 -msgid "Page Size" -msgstr "Taille de page" - -# src/file.c:59 -# src/file.c:59 -# src/file.c:72 -# src/file.c:72 -#: ../src/template-designer.c:587 -msgid "Label or Card Shape" -msgstr "Forme de carte ou d'étiquette" - -# src/file.c:59 -# src/file.c:59 -# src/file.c:72 -# src/file.c:72 -#: ../src/template-designer.c:637 -msgid "Label or Card Size" -msgstr "Taille de carte ou d'étiquette" - -# src/media_select.c:226 -# src/media_select.c:252 -# src/media_select.c:232 -# src/media_select.c:232 -#: ../src/template-designer.c:737 -msgid "Label Size (round)" -msgstr "Taille d'étiquette (ronde)" - -#: ../src/template-designer.c:820 -msgid "Label Size (CD/DVD)" -msgstr "Taille d'étiquette (CD/DVD)" - -#: ../src/template-designer.c:913 -msgid "Number of Layouts" -msgstr "Nombre de dispositions" - -# src/media_select.c:231 -# src/media_select.c:257 -# src/media_select.c:237 -# src/media_select.c:237 -#: ../src/template-designer.c:976 -msgid "Layout(s)" -msgstr "Disposition(s) :" - -#: ../src/template-designer.c:1087 -msgid "Design Completed" -msgstr "Création terminée" - -#: ../src/template-designer.c:1253 -msgid "" -"Brand and part# match an existing " -"template!" -msgstr "" -"La marque et le numéro d'article " -"correspondent à un patron existant." - -#: ../src/bc.c:67 -msgid "POSTNET (any)" -msgstr "POSTNET (tous)" - -#: ../src/bc.c:70 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (seulement ZIP)" - -#: ../src/bc.c:73 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (ZIP+4)" - -#: ../src/bc.c:76 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: ../src/bc.c:79 -msgid "CEPNET" -msgstr "CEPNET" - -#: ../src/bc.c:82 -msgid "EAN (any)" -msgstr "EAN (tous)" - -#: ../src/bc.c:85 -msgid "EAN-8" -msgstr "EAN-8" - -#: ../src/bc.c:88 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: ../src/bc.c:91 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: ../src/bc.c:94 -msgid "EAN-13" -msgstr "EAN-13" - -#: ../src/bc.c:97 -msgid "EAN-13 +2" -msgstr "EAN-13 +2" - -#: ../src/bc.c:100 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: ../src/bc.c:103 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A ou UPC-E)" - -#: ../src/bc.c:106 -msgid "UPC-A" -msgstr "UPC-A" - -#: ../src/bc.c:109 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: ../src/bc.c:112 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: ../src/bc.c:115 -msgid "UPC-E" -msgstr "UPC-E" - -#: ../src/bc.c:118 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: ../src/bc.c:121 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: ../src/bc.c:124 -msgid "ISBN" -msgstr "ISBN" - -#: ../src/bc.c:127 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: ../src/bc.c:130 -msgid "Code 39" -msgstr "Code 39" - -#: ../src/bc.c:133 -msgid "Code 128" -msgstr "Code 128" - -#: ../src/bc.c:136 -msgid "Code 128C" -msgstr "Code 128C" - -#: ../src/bc.c:139 -msgid "Code 128B" -msgstr "Code 128B" - -#: ../src/bc.c:142 -msgid "Interleaved 2 of 5" -msgstr "Entrelacé 2 de 5" - -#: ../src/bc.c:145 -msgid "Codabar" -msgstr "Code-barre" - -#: ../src/bc.c:148 -msgid "MSI" -msgstr "MSI" - -#: ../src/bc.c:151 -msgid "Plessey" -msgstr "Plessey" - -#: ../src/bc.c:154 -msgid "IEC16022 (DataMatrix)" -msgstr "IEC16022 (DataMatrix)" - -#: ../src/label.c:531 -msgid "Untitled" -msgstr "Sans titre" - -# src/item_barcode.c:316 -# src/item_barcode.c:317 -# src/item_barcode.c:299 -# src/item_barcode.c:299 -#: ../src/label-barcode.c:426 -msgid "Barcode data empty" -msgstr "Données de code-barre vides" - -# 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/label-barcode.c:430 -msgid "Invalid barcode data" -msgstr "Données de code-barre invalides" - -# 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/xml-label.c:189 ../src/xml-label.c:226 -msgid "xmlParseFile error" -msgstr "erreur xmlParseFile" - -# src/label.c:243 -# src/label.c:244 -# src/label.c:225 -# src/label.c:223 -#: ../src/xml-label.c:262 -msgid "No document root" -msgstr "Pas de racine de document" - -#: ../src/xml-label.c:270 -msgid "Importing from glabels 0.1 format" -msgstr "Import depuis le format glabels 0.1" - -#: ../src/xml-label.c:279 -msgid "Importing from glabels 0.4 format" -msgstr "Import depuis le format glabels 0.4" - -# src/label.c:248 -# src/label.c:249 -# src/label.c:236 -# src/label.c:234 -#: ../src/xml-label.c:288 -#, c-format -msgid "Unknown glabels Namespace -- Using %s" -msgstr "Espace de nom glabels inconnu -- Utilisation de %s" - -# src/label.c:253 -# src/label.c:254 -# src/label.c:241 -# src/label.c:239 -#: ../src/xml-label.c:319 ../src/xml-label-04.c:79 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Mauvais noeud racine = \"%s\"" - -# src/label.c:253 -# src/label.c:254 -# src/label.c:241 -# src/label.c:239 -#: ../src/xml-label.c:356 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "Mauvais noeud racine = \"%s\"" - -# src/label.c:298 -# src/label.c:301 -# src/label.c:294 -# src/label.c:290 -#: ../src/xml-label.c:401 ../src/xml-label-04.c:127 -#, c-format -msgid "bad node = \"%s\"" -msgstr "mauvais noeud = \"%s\"" - -# src/label.c:298 -# src/label.c:301 -# src/label.c:294 -# src/label.c:290 -#: ../src/xml-label.c:840 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "mauvais noeud de données = \"%s\"" - -#: ../src/xml-label.c:1077 ../libglabels/xml-template.c:670 -msgid "Utf8 conversion error." -msgstr "Erreur de conversion Utf8" - -# src/label.c:487 -# src/label.c:493 -# src/label.c:589 -# src/label.c:587 -#: ../src/xml-label.c:1084 -msgid "Problem saving xml file." -msgstr "Problème de sauvegarde du fichier xml." - -# src/merge.c:80 -# src/merge.c:78 -#: ../src/merge.c:170 ../src/merge.c:211 ../src/merge.c:375 ../src/merge.c:378 -msgid "None" -msgstr "Aucun" - -# src/merge.c:98 -# src/merge.c:94 -#: ../src/merge-init.c:59 -msgid "Text file with comma delimeters (CSV)" -msgstr "Texte séparé par des virgules (CSV)" - -# src/merge.c:107 -# src/merge.c:102 -#: ../src/merge-init.c:66 -msgid "Text file with colon delimeters" -msgstr "Texte séparé par des deux-points" - -# src/merge.c:89 -# src/merge.c:86 -#: ../src/merge-init.c:73 -msgid "Text file with tab delimeters" -msgstr "Texte avec séparateurs de tabulation" - -#: ../src/merge-init.c:82 -msgid "Data from default Evolution Addressbook" -msgstr "Données du carnet d'adresses Evolution par défaut" - -#: ../src/merge-init.c:88 -msgid "Data from a file containing VCards" -msgstr "Données d'un fichier de VCards" - -#: ../src/merge-evolution.c:309 -msgid "Couldn't construct query" -msgstr "Impossible de construire la requête" - -# src/file.c:214 -# src/file.c:214 -# src/file.c:249 -# src/file.c:249 -# c-format -#: ../src/merge-evolution.c:315 ../src/merge-evolution.c:326 -msgid "Couldn't open addressbook." -msgstr "Impossible d'ouvrir le carnet d'adresses." - -# 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/merge-evolution.c:341 -msgid "Couldn't list available fields." -msgstr "Impossible d'énumérer les champs disponibles." - -#: ../src/merge-evolution.c:377 -msgid "Couldn't get contacts." -msgstr "Impossible d'obtenir les contacts." - -# src/print_copies.c:193 -# src/print_copies.c:193 -# src/print_copies.c:171 -# src/print_copies.c:170 -#: ../src/wdgt-print-copies.c:153 -msgid "Sheets:" -msgstr "Feuilles :" - -# src/print_copies.c:213 -# src/print_copies.c:213 -# src/print_copies.c:191 -# src/print_copies.c:190 -#: ../src/wdgt-print-copies.c:173 -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/wdgt-print-copies.c:178 -msgid "to:" -msgstr "à :" - -# src/print_copies_merge.c:197 -# src/print_merge.c:170 -#: ../src/wdgt-print-merge.c:154 -msgid "Start on label" -msgstr "Commencer par l'étiquette" - -# src/print_copies_merge.c:206 -# src/print_merge.c:179 -#: ../src/wdgt-print-merge.c:159 -msgid "on 1st sheet" -msgstr "en 1ère page" - -# src/print.c:153 -# src/print.c:153 -# src/print_copies_merge.c:173 -# src/print_merge.c:195 -#: ../src/wdgt-print-merge.c:168 -msgid "Copies:" -msgstr "Copies :" - -# src/rotate_select.c:187 -# src/rotate_select.c:187 -# src/print_copies_merge.c:186 -# src/print_merge.c:188 -#: ../src/wdgt-print-merge.c:173 -msgid "Collate" -msgstr "Assembler" - -#: ../src/wdgt-media-select.c:288 ../src/wdgt-media-select.c:292 -#: ../src/wdgt-media-select.c:297 ../src/wdgt-media-select.c:306 -#: ../src/wdgt-media-select.c:309 ../src/wdgt-media-select.c:402 -#: ../src/wdgt-media-select.c:609 ../src/wdgt-media-select.c:618 -msgid "Any" -msgstr "Tous" - -# src/media_select.c:515 -# src/media_select.c:481 -# src/media_select.c:353 -#: ../src/wdgt-media-select.c:643 -#, c-format -msgid "%d per sheet" -msgstr "%d par feuille" - -# src/media_select.c:522 -# src/media_select.c:488 -# src/media_select.c:367 -#: ../src/wdgt-media-select.c:673 -#, 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/wdgt-media-select.c:678 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: ../src/wdgt-media-select.c:689 ../src/wdgt-media-select.c:703 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s diamètre" - -#: ../src/wdgt-media-select.c:693 ../src/wdgt-media-select.c:707 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s diamètre" - -#: ../src/wdgt-media-select.c:781 -msgid "No recent templates found." -msgstr "Aucun patron récent trouvé." - -#: ../src/wdgt-media-select.c:782 -msgid "Try selecting a template from the \"Search all templates\" page." -msgstr "Essayez de sélectionner un patron dans l'onglet « Tous les patrons »." - -#: ../src/wdgt-media-select.c:861 -msgid "No match." -msgstr "Aucune correspondance." - -#: ../src/wdgt-media-select.c:862 -msgid "Try selecting a different brand, page size or category." -msgstr "" -"Essayez de sélectionner une marque, une taille de page ou une catégorie différente." - -# src/merge_ui_text.c:334 -# src/merge_ui_text.c:334 -#. This is the default custom color -#: ../src/mygal/color-palette.c:389 -msgid "custom" -msgstr "personnalisé" - -# 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 -#. "Custom" color - we'll pop up a GtkColorButton -#: ../src/mygal/color-palette.c:431 -msgid "Custom Color:" -msgstr "Couleur personnalisée :" - -#: ../src/mygal/color-palette.c:439 -msgid "Choose Custom Color" -msgstr "Choisir une couleur personnalisée" - -#: ../src/mygal/color-palette.c:572 -msgid "black" -msgstr "noir" - -#: ../src/mygal/color-palette.c:573 -msgid "light brown" -msgstr "brun clair" - -#: ../src/mygal/color-palette.c:574 -msgid "brown gold" -msgstr "brun jaune" - -#: ../src/mygal/color-palette.c:575 -msgid "dark green #2" -msgstr "vert foncé n°2" - -#: ../src/mygal/color-palette.c:576 -msgid "navy" -msgstr "bleu marine" - -#: ../src/mygal/color-palette.c:577 ../src/mygal/color-palette.c:633 -msgid "dark blue" -msgstr "bleu foncé" - -#: ../src/mygal/color-palette.c:578 -msgid "purple #2" -msgstr "violet n°2" - -#: ../src/mygal/color-palette.c:579 -msgid "very dark gray" -msgstr "gris très foncé" - -#: ../src/mygal/color-palette.c:582 ../src/mygal/color-palette.c:638 -msgid "dark red" -msgstr "rouge foncé" - -#: ../src/mygal/color-palette.c:583 -msgid "red-orange" -msgstr "rouge orange" - -#: ../src/mygal/color-palette.c:584 -msgid "gold" -msgstr "jaune" - -#: ../src/mygal/color-palette.c:585 -msgid "dark green" -msgstr "vert foncé" - -#: ../src/mygal/color-palette.c:586 ../src/mygal/color-palette.c:639 -msgid "dull blue" -msgstr "bleu pâle" - -#: ../src/mygal/color-palette.c:587 ../src/mygal/color-palette.c:640 -msgid "blue" -msgstr "bleu" - -#: ../src/mygal/color-palette.c:588 -msgid "dull purple" -msgstr "violet pâle" - -#: ../src/mygal/color-palette.c:589 -msgid "dark grey" -msgstr "gris foncé" - -#: ../src/mygal/color-palette.c:592 -msgid "red" -msgstr "rouge" - -#: ../src/mygal/color-palette.c:593 -msgid "orange" -msgstr "orange" - -#: ../src/mygal/color-palette.c:594 -msgid "lime" -msgstr "tilleul" - -#: ../src/mygal/color-palette.c:595 -msgid "dull green" -msgstr "vert pâle" - -#: ../src/mygal/color-palette.c:596 -msgid "dull blue #2" -msgstr "bleu pâle n°2" - -#: ../src/mygal/color-palette.c:597 -msgid "sky blue #2" -msgstr "bleu ciel n°2" - -#: ../src/mygal/color-palette.c:598 ../src/mygal/color-palette.c:637 -msgid "purple" -msgstr "violet" - -#: ../src/mygal/color-palette.c:599 -msgid "gray" -msgstr "gris" - -# 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/mygal/color-palette.c:602 ../src/mygal/color-palette.c:634 -msgid "magenta" -msgstr "magenta" - -#: ../src/mygal/color-palette.c:603 -msgid "bright orange" -msgstr "orange vif" - -#: ../src/mygal/color-palette.c:604 ../src/mygal/color-palette.c:635 -msgid "yellow" -msgstr "jaune" - -# src/prop_vector.c:245 -# src/prop_vector.c:224 -# src/prop_vector.c:224 -#: ../src/mygal/color-palette.c:605 -msgid "green" -msgstr "vert" - -#: ../src/mygal/color-palette.c:606 ../src/mygal/color-palette.c:636 -msgid "cyan" -msgstr "cyan" - -#: ../src/mygal/color-palette.c:607 -msgid "bright blue" -msgstr "bleu vif" - -#: ../src/mygal/color-palette.c:608 ../src/mygal/color-palette.c:625 -msgid "red purple" -msgstr "rouge violet" - -#: ../src/mygal/color-palette.c:609 -msgid "light grey" -msgstr "gris clair" - -#: ../src/mygal/color-palette.c:612 ../src/mygal/color-palette.c:629 -msgid "pink" -msgstr "rose" - -#: ../src/mygal/color-palette.c:613 -msgid "light orange" -msgstr "orange clair" - -#: ../src/mygal/color-palette.c:614 ../src/mygal/color-palette.c:626 -msgid "light yellow" -msgstr "jaune clair" - -#: ../src/mygal/color-palette.c:615 -msgid "light green" -msgstr "vert clair" - -#: ../src/mygal/color-palette.c:616 -msgid "light cyan" -msgstr "cyan clair" - -#: ../src/mygal/color-palette.c:617 ../src/mygal/color-palette.c:627 -msgid "light blue" -msgstr "bleu clair" - -#: ../src/mygal/color-palette.c:618 ../src/mygal/color-palette.c:631 -msgid "light purple" -msgstr "violet clair" - -#: ../src/mygal/color-palette.c:619 -msgid "white" -msgstr "blanc" - -#: ../src/mygal/color-palette.c:624 -msgid "purplish blue" -msgstr "bleu violacé" - -#: ../src/mygal/color-palette.c:628 -msgid "dark purple" -msgstr "violet foncé" - -#: ../src/mygal/color-palette.c:630 -msgid "sky blue" -msgstr "bleu ciel" - -#: ../src/critical-error-handler.c:73 -msgid "gLabels Fatal Error!" -msgstr "Erreur fatale de gLabels !" - -# src/preferences.c:92 -# src/prefs.c:101 -# src/prefs.c:92 -# src/prefs.c:86 -#: ../src/warning-handler.c:73 -msgid "gLabels Error!" -msgstr "Erreur de gLabels !" - -#. Create and append an "Other" entry. -#: ../libglabels/db.c:118 -msgid "Other" -msgstr "Autre" - -# src/prop_text_entry.c:196 -# src/prop_text_entry.c:196 -#. Create and append a "User defined" entry. -#: ../libglabels/db.c:131 -msgid "User defined" -msgstr "Défini par l'utilisateur" - -#: ../libglabels/db.c:482 -msgid "" -"Unable to locate paper size definitions. Libglabels may not be installed " -"correctly!" -msgstr "" -"Impossible de trouver les définitions de tailles de papier. Il se peut que " -"Libglabels ne soit pas correctement installé." - -#: ../libglabels/db.c:875 -msgid "" -"Unable to locate category definitions. Libglabels may not be installed " -"correctly!" -msgstr "" -"Impossible de trouver les définitions de catégorie. Il se peut que " -"Libglabels ne soit pas correctement installé." - -#: ../libglabels/db.c:1461 -msgid "" -"Unable to locate any template files. Libglabels may not be installed " -"correctly!" -msgstr "" -"Impossible de trouver les fichiers modèles. Il se peut que Libglabels ne " -"soit pas correctement installé." - -#: ../libglabels/db.c:1538 -#, c-format -msgid "Generic %s full page template" -msgstr "Patron générique de page entière %s" - -#: ../libglabels/xml-template.c:227 -msgid "Missing name or brand/part attributes." -msgstr "Attribut nom ou marque manquant." - -#. This should always be an id, but just in case a name -#. slips by! -#: ../libglabels/xml-template.c:244 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "Taille de papier avec id « %s » inconnue, essai avec le nom" - -#: ../libglabels/xml-template.c:256 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "Identifiant ou nom de taille de papier « %s » inconnu" - -#: ../libglabels/xml-template.c:615 -msgid "" -"Missing required \"brand\" or \"part\" attribute, trying deprecated name." -msgstr "" -"Attribut « brand » (marque) ou « part » (article) manquant, essai avec un " -"ancien nom." - -#: ../libglabels/xml-template.c:625 -msgid "Name attribute also missing." -msgstr "L'attribut nom manque également." - -#: ../data/glade/merge-properties-dialog.glade.h:1 -msgid "Record selection/preview" -msgstr "Sélection/Aperçu des enregistrements" - -# src/merge_properties.c:131 -# src/merge_properties.c:131 -#: ../data/glade/merge-properties-dialog.glade.h:2 -msgid "Source" -msgstr "Source" - -# src/prop_text.c:214 -# src/prop_text.c:199 -# src/merge_properties.c:143 -# src/merge_properties.c:143 -#: ../data/glade/merge-properties-dialog.glade.h:3 -msgid "Format:" -msgstr "Format :" - -# src/merge_properties.c:158 -# src/merge_properties.c:158 -#: ../data/glade/merge-properties-dialog.glade.h:4 -msgid "Location:" -msgstr "Emplacement :" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:85 -# src/menu.c:85 -#: ../data/glade/merge-properties-dialog.glade.h:5 -msgid "Select all" -msgstr "Tout sélectionner" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:85 -# src/menu.c:85 -#: ../data/glade/merge-properties-dialog.glade.h:6 -msgid "Unselect all" -msgstr "Désélectionner tout" - -#: ../data/glade/merge-properties-dialog.glade.h:7 -#: ../data/glade/object-editor.glade.h:39 -msgid "dialog1" -msgstr "dialog1" - -# src/file.c:98 -# src/file.c:98 -# src/file.c:109 -# src/file.c:109 -#: ../data/glade/new-label-dialog.glade.h:1 -msgid "Label orientation" -msgstr "Orientation de l'étiquette" - -# src/file.c:87 -# src/file.c:87 -# src/file.c:98 -# src/file.c:98 -#: ../data/glade/new-label-dialog.glade.h:2 -msgid "Media type" -msgstr "Type de média" - -# src/prop_bc.c:202 -# src/prop_bc.c:182 -# src/prop_bc.c:182 -#: ../data/glade/object-editor.glade.h:2 -#, no-c-format -msgid "%" -msgstr "%" - -#: ../data/glade/object-editor.glade.h:3 -msgid "00000000000 00000" -msgstr "00000000000 00000" - -#: ../data/glade/object-editor.glade.h:4 -msgid "Xxx object properties" -msgstr "Xxx Propriétés de l'objet" - -# src/prop_text.c:277 -# src/prop_text.c:264 -# src/prop_text.c:248 -# src/prop_text.c:248 -#: ../data/glade/object-editor.glade.h:5 ../data/glade/prefs-dialog.glade.h:7 -msgid "Alignment:" -msgstr "Alignement :" - -#: ../data/glade/object-editor.glade.h:6 -msgid "Allow merge to automatically shrink text" -msgstr "Permettre à la fusion de diminuer automatiquement la taille du texte" - -# src/prop_vector.c:207 -# src/prop_vector.c:228 -# src/prop_vector.c:207 -# src/prop_vector.c:207 -#: ../data/glade/object-editor.glade.h:7 -msgid "Angle:" -msgstr "Angle :" - -#: ../data/glade/object-editor.glade.h:8 -msgid "Checksum" -msgstr "Somme de contrôle" - -# 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 -#: ../data/glade/object-editor.glade.h:9 ../data/glade/prefs-dialog.glade.h:8 -msgid "Color:" -msgstr "Couleur :" - -#: ../data/glade/object-editor.glade.h:11 -msgid "Enable shadow" -msgstr "Activer l'ombrage" - -# 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 -#: ../data/glade/object-editor.glade.h:12 -msgid "Family:" -msgstr "Famille :" - -# 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 -#: ../data/glade/object-editor.glade.h:13 -msgid "File:" -msgstr "Fichier :" - -# 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 -#: ../data/glade/object-editor.glade.h:14 -msgid "Fill" -msgstr "Remplissage" - -# src/prop_size.c:220 -# src/prop_size.c:198 -# src/prop_size.c:198 -#: ../data/glade/object-editor.glade.h:15 -#: ../data/glade/template-designer.glade.h:30 -msgid "Height:" -msgstr "Hauteur :" - -# src/prop_text_entry.c:196 -# src/prop_text_entry.c:196 -#: ../data/glade/object-editor.glade.h:17 -msgid "Insert merge field" -msgstr "Insérer un champ de fusion" - -# src/prop_bc_data.c:196 src/prop_text_entry.c:180 -# src/prop_bc_data.c:196 src/prop_text_entry.c:180 -#: ../data/glade/object-editor.glade.h:18 -msgid "Key:" -msgstr "Clé :" - -# src/prop_vector.c:196 -# src/prop_vector.c:202 -# src/prop_vector.c:183 -# src/prop_vector.c:183 -#: ../data/glade/object-editor.glade.h:19 -msgid "Length:" -msgstr "Longueur :" - -#: ../data/glade/object-editor.glade.h:21 -#: ../data/glade/prefs-dialog.glade.h:12 -msgid "Line Spacing:" -msgstr "Espacement :" - -# src/prop_bc_data.c:176 -# src/prop_bc_data.c:176 -#: ../data/glade/object-editor.glade.h:22 -msgid "Literal:" -msgstr "Littéral :" - -#: ../data/glade/object-editor.glade.h:23 -msgid "Opacity:" -msgstr "Opacité :" - -# 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 -#: ../data/glade/object-editor.glade.h:24 -msgid "Position" -msgstr "Position" - -# src/item_image.c:341 -# src/item_image.c:340 -# src/item_image.c:342 -# src/item_image.c:342 -#: ../data/glade/object-editor.glade.h:25 -msgid "Reset image size" -msgstr "Restaurer la taille d'image" - -# src/menu.c:86 -# src/menu.c:86 -# src/menu.c:85 -# src/menu.c:85 -#: ../data/glade/object-editor.glade.h:26 -msgid "Select A File" -msgstr "Sélectionner un fichier" - -#: ../data/glade/object-editor.glade.h:27 -msgid "Shadow" -msgstr "Ombre" - -# 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 -#: ../data/glade/object-editor.glade.h:28 -msgid "Size" -msgstr "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 -#: ../data/glade/object-editor.glade.h:29 -msgid "Size:" -msgstr "Taille :" - -# src/item_barcode.c:347 -# src/item_barcode.c:353 -# src/item_barcode.c:330 -# src/item_barcode.c:330 -#: ../data/glade/object-editor.glade.h:30 -msgid "Style" -msgstr "Style" - -# src/item_barcode.c:347 -# src/item_barcode.c:353 -# src/item_barcode.c:330 -# src/item_barcode.c:330 -#: ../data/glade/object-editor.glade.h:31 -msgid "Style:" -msgstr "Style :" - -# 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 -#: ../data/glade/object-editor.glade.h:33 -#: ../data/glade/prefs-dialog.glade.h:20 -#: ../data/glade/template-designer.glade.h:61 -msgid "Width:" -msgstr "Largeur :" - -#: ../data/glade/object-editor.glade.h:34 -msgid "X Offset:" -msgstr "Décalage X :" - -# src/prop_position.c:192 -# src/prop_position.c:173 -# src/prop_position.c:173 -#: ../data/glade/object-editor.glade.h:35 -msgid "X:" -msgstr "X :" - -#: ../data/glade/object-editor.glade.h:36 -msgid "Y Offset:" -msgstr "Décalage Y :" - -# src/prop_position.c:212 -# src/prop_position.c:191 -# src/prop_position.c:191 -#: ../data/glade/object-editor.glade.h:37 -msgid "Y:" -msgstr "Y :" - -# src/prop_vector.c:245 -# src/prop_vector.c:224 -# src/prop_vector.c:224 -#: ../data/glade/object-editor.glade.h:38 -msgid "degrees" -msgstr "degrés" - -#: ../data/glade/object-editor.glade.h:40 -msgid "digits:" -msgstr "chiffres :" - -# src/prop_text.c:214 -# src/prop_text.c:199 -# src/merge_properties.c:143 -# src/merge_properties.c:143 -#: ../data/glade/object-editor.glade.h:41 -msgid "format:" -msgstr "format :" - -#: ../data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr " " - -#: ../data/glade/prefs-dialog.glade.h:2 -msgid "Default page size" -msgstr "Taille de page par défaut" - -#: ../data/glade/prefs-dialog.glade.h:3 -msgid "Fill" -msgstr "Remplissage" - -#: ../data/glade/prefs-dialog.glade.h:4 -msgid "Line" -msgstr "Ligne" - -#: ../data/glade/prefs-dialog.glade.h:5 -msgid "Text" -msgstr "Texte" - -#: ../data/glade/prefs-dialog.glade.h:6 -msgid "Units" -msgstr "Unités" - -# src/prop_text.c:214 -# src/prop_text.c:199 -# src/prop_text.c:181 -# src/prop_text.c:181 -#: ../data/glade/prefs-dialog.glade.h:9 -msgid "Font:" -msgstr "Police :" - -#: ../data/glade/prefs-dialog.glade.h:10 -msgid "ISO A4" -msgstr "ISO A4" - -# src/prefs.c:265 -# src/prefs.c:243 -# src/prefs.c:237 -#: ../data/glade/prefs-dialog.glade.h:11 -msgid "Inches" -msgstr "Pouces" - -# src/prop_bc.c:189 -# src/prop_bc.c:187 -# src/prop_bc.c:168 -# src/prop_bc.c:168 -#: ../data/glade/prefs-dialog.glade.h:13 -msgid "Locale" -msgstr "Localisation" - -# src/prefs.c:271 -# src/prefs.c:250 -# src/prefs.c:244 -#: ../data/glade/prefs-dialog.glade.h:14 -msgid "Millimeters" -msgstr "Millimètres" - -#: ../data/glade/prefs-dialog.glade.h:15 -msgid "Object defaults" -msgstr "Paramètres par défaut pour les objets" - -# src/print.c:149 -# src/prefs.c:259 -# src/prefs.c:237 -# src/prefs.c:231 -#: ../data/glade/prefs-dialog.glade.h:16 -msgid "Points" -msgstr "Points" - -#: ../data/glade/prefs-dialog.glade.h:17 -msgid "Select default properties for new objects." -msgstr "Sélectionner les propriétés par défaut pour les nouveaux objets." - -#: ../data/glade/prefs-dialog.glade.h:18 -msgid "Select locale specific behavior." -msgstr "Sélectionnez les paramètres de localisation" - -#. Most popular (at top of list) -#: ../data/glade/prefs-dialog.glade.h:19 -#: ../data/templates/paper-sizes.xml.h:29 -msgid "US Letter" -msgstr "Letter US" - -# src/print.c:171 -# src/print.c:171 -# src/print.c:186 -# src/print_dialog.c:141 -#: ../data/glade/print-custom-widget.glade.h:1 -msgid "Options" -msgstr "Options" - -#: ../data/glade/print-custom-widget.glade.h:2 -msgid "Print control (Merge)" -msgstr "Contrôle d'impression (fusion)" - -#: ../data/glade/print-custom-widget.glade.h:3 -msgid "Print control (Simple)" -msgstr "Contrôle d'impression (simple)" - -#: ../data/glade/property-bar.glade.h:1 -msgid "Bold" -msgstr "Gras" - -# 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 -#: ../data/glade/property-bar.glade.h:2 -msgid "Center align" -msgstr "Centrer" - -# src/mdi.c:482 -# src/mdi.c:488 -# src/mdi.c:459 -# src/mdi.c:459 -#: ../data/glade/property-bar.glade.h:4 -msgid "Font family" -msgstr "Famille de police" - -# src/mdi.c:482 -# src/mdi.c:488 -# src/mdi.c:459 -# src/mdi.c:459 -#: ../data/glade/property-bar.glade.h:5 -msgid "Font size" -msgstr "Taille de police" - -#: ../data/glade/property-bar.glade.h:6 -msgid "Italic" -msgstr "Italique" - -#: ../data/glade/property-bar.glade.h:7 -msgid "Left align" -msgstr "Aligner à gauche" - -#: ../data/glade/property-bar.glade.h:9 -msgid "Line width" -msgstr "Largeur de la ligne" - -#: ../data/glade/property-bar.glade.h:10 -msgid "Right align" -msgstr "Aligner à droite" - -#: ../data/glade/property-bar.glade.h:11 -msgid "Text Color" -msgstr "Couleur du texte" - -#: ../data/glade/property-bar.glade.h:12 -msgid "Text color" -msgstr "Couleur du texte" - -#: ../data/glade/template-designer.glade.h:1 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(ex : « Étiquettes de publipostage », « Cartes de visite », ...)" - -#: ../data/glade/template-designer.glade.h:2 -msgid "(e.g., 8163A)" -msgstr "(ex : 8163A)" - -#: ../data/glade/template-designer.glade.h:3 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(ex : Avery, Acme, ...)" - -#: ../data/glade/template-designer.glade.h:4 -msgid "1. Outer radius:" -msgstr "1. Rayon extérieur :" - -#: ../data/glade/template-designer.glade.h:5 -msgid "1. Radius:" -msgstr "1. Rayon :" - -# 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 -#: ../data/glade/template-designer.glade.h:6 -msgid "1. Width:" -msgstr "1. Largeur :" - -# src/prop_size.c:220 -# src/prop_size.c:198 -# src/prop_size.c:198 -#: ../data/glade/template-designer.glade.h:7 -msgid "2. Height:" -msgstr "2. Hauteur :" - -#: ../data/glade/template-designer.glade.h:8 -msgid "2. Inner radius:" -msgstr "2. Rayon Intérieur :" - -#: ../data/glade/template-designer.glade.h:9 -msgid "2. Waste (overprint allowed):" -msgstr "2. Déchet (impression en surcharge autorisée) :" - -#: ../data/glade/template-designer.glade.h:10 -msgid "3. Clipping width:" -msgstr "3. Largeur de rognure :" - -#: ../data/glade/template-designer.glade.h:11 -msgid "3. Margin" -msgstr "3. Marge" - -#: ../data/glade/template-designer.glade.h:12 -msgid "3. Round (radius of corner):" -msgstr "3. Arrondi (rayon du coin) :" - -#: ../data/glade/template-designer.glade.h:13 -msgid "4. Clipping height:" -msgstr "4. Hauteur de rognure :" - -#: ../data/glade/template-designer.glade.h:14 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "4. Déchet horiz. (impression en surcharge autorisée) :" - -#: ../data/glade/template-designer.glade.h:15 -msgid "5. Vert. waste (overprint allowed):" -msgstr "5. Déchet vert. (impression en surcharge autorisée) :" - -#: ../data/glade/template-designer.glade.h:16 -msgid "5. Waste (overprint allowed):" -msgstr "5. Déchet (impression en surcharge autorisée) :" - -#: ../data/glade/template-designer.glade.h:17 -msgid "6. Margin" -msgstr "6. Marge" - -#: ../data/glade/template-designer.glade.h:18 -msgid "Brand/Manufacturer:" -msgstr "Marque/Fabricant :" - -#: ../data/glade/template-designer.glade.h:19 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD (y compris CD au format carte de crédit)" - -#: ../data/glade/template-designer.glade.h:20 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"Félicitations !\n" -"Vous avez terminé la création d'un patron gLabels.\n" -"Si vous voulez accepter et sauver votre création, cliquez sur « Appliquer ».\n" -"\n" -"Dans le cas contraire, vous pouvez cliquer sur « Annuler » pour abandonner " -"votre création ou « Précédent » pour continuer d'éditer cette création." - -# src/media_select.c:216 -# src/media_select.c:242 -# src/media_select.c:222 -# src/media_select.c:222 -#: ../data/glade/template-designer.glade.h:27 -msgid "Description:" -msgstr "Description :" - -#: ../data/glade/template-designer.glade.h:28 -msgid "Distance from left edge (x0):" -msgstr "Distance par rapport au bord gauche (x0) :" - -#: ../data/glade/template-designer.glade.h:29 -msgid "Distance from top edge (y0):" -msgstr "Distance pas rapport au bord haut (y0) :" - -#: ../data/glade/template-designer.glade.h:31 -msgid "Horizontal pitch (dx):" -msgstr "Espacement horizontal (dx) :" - -#: ../data/glade/template-designer.glade.h:32 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" -"Combien de dispositions votre patron contiendra-t-il ?\n" -"\n" -"Une disposition est un ensemble d'étiquettes ou de cartes qui peuvent être " -"rangés sur une simple grille.\n" -"La plupart des patrons n'ont besoin que d'une disposition, comme pour le " -"premier exemple.\n" -"Le deuxième exemple illustre le cas où deux dispositions sont nécessaires." - -# src/media_select.c:231 -# src/media_select.c:257 -# src/media_select.c:237 -# src/media_select.c:237 -#: ../data/glade/template-designer.glade.h:37 -msgid "Layout #1" -msgstr "Disposition n°1" - -# src/media_select.c:231 -# src/media_select.c:257 -# src/media_select.c:237 -# src/media_select.c:237 -#: ../data/glade/template-designer.glade.h:38 -msgid "Layout #2" -msgstr "Disposition n°2" - -#: ../data/glade/template-designer.glade.h:39 -msgid "Number across (nx):" -msgstr "Nombre horizontalement (nx) :" - -#: ../data/glade/template-designer.glade.h:40 -msgid "Number down (ny):" -msgstr "Nombre verticalement (ny) :" - -#: ../data/glade/template-designer.glade.h:41 -msgid "Number of layouts:" -msgstr "Nombre de dispositions :" - -# src/media_select.c:221 -# src/media_select.c:247 -# src/media_select.c:227 -# src/media_select.c:227 -#: ../data/glade/template-designer.glade.h:42 -#: ../data/glade/wdgt-media-select.glade.h:3 -msgid "Page size:" -msgstr "Taille de page :" - -#: ../data/glade/template-designer.glade.h:43 -msgid "Part #:" -msgstr "N° Ref :" - -#: ../data/glade/template-designer.glade.h:44 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "Entrez les informations suivantes à propos du fabricant de papier." - -#: ../data/glade/template-designer.glade.h:45 -msgid "Please enter the following layout information." -msgstr "Entrez les informations suivantes sur la disposition." - -#: ../data/glade/template-designer.glade.h:46 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "Entrez les paramètres de taille suivants pour une étiquette." - -#: ../data/glade/template-designer.glade.h:47 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" -"Entrez les paramètres de taille suivant pour une carte ou une étiquette." - -#: ../data/glade/template-designer.glade.h:48 -msgid "Please select the basic shape of the labels or cards." -msgstr "Sélectionnez la forme de base des cartes ou des étiquettes." - -#: ../data/glade/template-designer.glade.h:49 -msgid "Please select the page size of the template stationery." -msgstr "Sélectionnez la taille du papier." - -# src/print_copies_merge.c:206 -# src/print_merge.c:179 -#: ../data/glade/template-designer.glade.h:50 -msgid "Print test sheet" -msgstr "Imprimer une page de tests" - -#: ../data/glade/template-designer.glade.h:51 -msgid "Rectangular or square (can have rounded corners)" -msgstr "Rectangulaire ou carré (éventuellement à bords arrondis)" - -#: ../data/glade/template-designer.glade.h:52 -msgid "Round" -msgstr "Rond" - -#: ../data/glade/template-designer.glade.h:53 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"Patron nécessitant\n" -"deux dispositions." - -#: ../data/glade/template-designer.glade.h:55 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"Patron nécessitant\n" -"une disposition." - -#: ../data/glade/template-designer.glade.h:57 -msgid "Vertical pitch (dy):" -msgstr "Espacement vertical (dy) :" - -#: ../data/glade/template-designer.glade.h:58 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"Bienvenue dans le créateur de patrons de gLabels.\n" -"Ce questionnaire va vous aider à créer un patron personnalisé pour glabels." - -#: ../data/glade/template-designer.glade.h:62 -msgid "cd_size_page" -msgstr "cd_size_page" - -#: ../data/glade/template-designer.glade.h:63 -msgid "finish_page" -msgstr "finish_page" - -#: ../data/glade/template-designer.glade.h:65 -msgid "layout_page" -msgstr "layout_page" - -#: ../data/glade/template-designer.glade.h:66 -msgid "name_page" -msgstr "name_page" - -#: ../data/glade/template-designer.glade.h:67 -msgid "nlayouts_page" -msgstr "nlayouts_page" - -#: ../data/glade/template-designer.glade.h:68 -msgid "pg_size_page" -msgstr "pg_size_page" - -#: ../data/glade/template-designer.glade.h:69 -msgid "rect_size_page" -msgstr "rect_size_page" - -#: ../data/glade/template-designer.glade.h:70 -msgid "round_size_page" -msgstr "round_size_page" - -#: ../data/glade/template-designer.glade.h:71 -msgid "shape_page" -msgstr "shape_page" - -#: ../data/glade/template-designer.glade.h:72 -msgid "start_page" -msgstr "start_page" - -#: ../data/glade/wdgt-media-select.glade.h:1 -msgid "Brand:" -msgstr "Marque :" - -#: ../data/glade/wdgt-media-select.glade.h:2 -msgid "Category:" -msgstr "Catégorie :" - -# src/tools.c:70 -# src/tools.c:70 -# src/menu.c:106 src/menu.c:197 -# src/menu.c:106 src/menu.c:197 -#: ../data/glade/wdgt-media-select.glade.h:4 -msgid "Recent templates" -msgstr "Patrons récents" - -#: ../data/glade/wdgt-media-select.glade.h:5 -msgid "Search all templates" -msgstr "Tous les patrons" - -# src/rotate_select.c:187 -# src/rotate_select.c:187 -# src/rotate_select.c:167 -# src/rotate_select.c:169 -#: ../data/glade/wdgt-rotate-label.glade.h:1 -msgid "Rotate" -msgstr "Rotation" - -#. Other ISO A series sizes -#: ../data/templates/paper-sizes.xml.h:2 -msgid "A0" -msgstr "A0" - -#: ../data/templates/paper-sizes.xml.h:3 -msgid "A1" -msgstr "A1" - -#: ../data/templates/paper-sizes.xml.h:4 -msgid "A10" -msgstr "A10" - -#: ../data/templates/paper-sizes.xml.h:5 -msgid "A2" -msgstr "A2" - -#: ../data/templates/paper-sizes.xml.h:6 -msgid "A3" -msgstr "A3" - -#: ../data/templates/paper-sizes.xml.h:7 -msgid "A4" -msgstr "A4" - -#: ../data/templates/paper-sizes.xml.h:8 -msgid "A5" -msgstr "A5" - -#: ../data/templates/paper-sizes.xml.h:9 -msgid "A6" -msgstr "A6" - -#: ../data/templates/paper-sizes.xml.h:10 -msgid "A7" -msgstr "A7" - -#: ../data/templates/paper-sizes.xml.h:11 -msgid "A8" -msgstr "A8" - -#: ../data/templates/paper-sizes.xml.h:12 -msgid "A9" -msgstr "A9" - -#. ISO B series sizes -#: ../data/templates/paper-sizes.xml.h:14 -msgid "B0" -msgstr "B0" - -#: ../data/templates/paper-sizes.xml.h:15 -msgid "B1" -msgstr "B1" - -#: ../data/templates/paper-sizes.xml.h:16 -msgid "B10" -msgstr "B10" - -#: ../data/templates/paper-sizes.xml.h:17 -msgid "B2" -msgstr "B2" - -#: ../data/templates/paper-sizes.xml.h:18 -msgid "B3" -msgstr "B3" - -#: ../data/templates/paper-sizes.xml.h:19 -msgid "B4" -msgstr "B4" - -#: ../data/templates/paper-sizes.xml.h:20 -msgid "B5" -msgstr "B5" - -#: ../data/templates/paper-sizes.xml.h:21 -msgid "B6" -msgstr "B6" - -#: ../data/templates/paper-sizes.xml.h:22 -msgid "B7" -msgstr "B7" - -#: ../data/templates/paper-sizes.xml.h:23 -msgid "B8" -msgstr "B8" - -#: ../data/templates/paper-sizes.xml.h:24 -msgid "B9" -msgstr "B9" - -#: ../data/templates/paper-sizes.xml.h:25 -msgid "US Executive" -msgstr "Exécutif US" - -#. Other US paper sizes -#: ../data/templates/paper-sizes.xml.h:27 -msgid "US Legal" -msgstr "Légal US" - -#: ../data/templates/categories.xml.h:1 -msgid "Any card" -msgstr "Toute carte" - -# src/file.c:183 -# src/file.c:183 -# src/file.c:213 -# src/file.c:213 -#: ../data/templates/categories.xml.h:2 -msgid "Any label" -msgstr "Toute étiquette" - -#: ../data/templates/categories.xml.h:3 -msgid "Business cards" -msgstr "Cartes de visite" - -#: ../data/templates/categories.xml.h:4 -msgid "CD/DVD or other media" -msgstr "CD/DVD ou autre support" - -#: ../data/templates/categories.xml.h:5 -msgid "Mailing/shipping products" -msgstr "Produits d'expédition" - -#: ../data/templates/categories.xml.h:6 -msgid "Rectangular labels" -msgstr "Étiquettes rectangulaires" - -#: ../data/templates/categories.xml.h:7 -msgid "Round labels" -msgstr "Étiquettes arrondies" - -# src/print_copies_merge.c:197 -# src/print_merge.c:170 -#: ../data/templates/categories.xml.h:8 -msgid "Square labels" -msgstr "Étiquettes carrées" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:2 -#: ../data/templates/avery-us-templates.xml.h:2 -#: ../data/templates/dymo-other-templates.xml.h:4 -#: ../data/templates/misc-iso-templates.xml.h:2 -#: ../data/templates/zweckform-iso-templates.xml.h:2 -msgid "Address Labels" -msgstr "Étiquettes d'adresses" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:4 -msgid "Address labels" -msgstr "Étiquettes d'adresses" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:6 -msgid "Allround labels" -msgstr "Étiquettes génériques" - -#. ============================================================ -#. =================================================================== -#. ******************************************************************** -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:8 -#: ../data/templates/avery-us-templates.xml.h:4 -#: ../data/templates/misc-iso-templates.xml.h:12 -#: ../data/templates/misc-us-templates.xml.h:4 -#: ../data/templates/zweckform-iso-templates.xml.h:6 -msgid "Business Cards" -msgstr "Cartes de visite" - -#. =============================================================== -#: ../data/templates/avery-iso-templates.xml.h:10 -msgid "CD Booklet" -msgstr "Livret de CD" - -#. =============================================================== -#: ../data/templates/avery-iso-templates.xml.h:12 -msgid "CD Inlet" -msgstr "Jaquette de CD" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. =============================================================== -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:14 -#: ../data/templates/avery-us-templates.xml.h:6 -#: ../data/templates/misc-iso-templates.xml.h:16 -#: ../data/templates/misc-us-templates.xml.h:8 -#: ../data/templates/zweckform-iso-templates.xml.h:8 -msgid "CD/DVD Labels" -msgstr "Étiquettes de CD/DVD" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:16 -#: ../data/templates/avery-us-templates.xml.h:12 -msgid "Diskette Labels" -msgstr "Étiquettes de disquette" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:18 -msgid "Diskette labels" -msgstr "Étiquettes de disquette" - -#. =============================================================== -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:20 -#: ../data/templates/misc-iso-templates.xml.h:36 -#: ../data/templates/misc-us-templates.xml.h:18 -#: ../data/templates/zweckform-iso-templates.xml.h:16 -msgid "Mailing Labels" -msgstr "Étiquettes de publipostage" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:22 -msgid "Mailing labels" -msgstr "Étiquettes de publipostage" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:24 -msgid "Mini Address Labels" -msgstr "Étiquettes de mini-adresse" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:26 -msgid "Mini Labels" -msgstr "Mini-étiquettes" - -# src/file.c:183 -# src/file.c:183 -# src/file.c:213 -# src/file.c:213 -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:28 -msgid "Shipping labels" -msgstr "Étiquettes postales" - -#. =================================================================== -#: ../data/templates/avery-other-templates.xml.h:2 -msgid "File Folder Labels" -msgstr "Étiquettes de dossier d'archives" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:8 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "Étiquettes de CD/DVD (étiquettes de disque)" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:10 -msgid "CD/DVD Labels (Spine Labels)" -msgstr "Étiquettes de CD/DVD (étiquettes de boîtier)" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. the LSK labels can be torn in half down the center -#: ../data/templates/avery-us-templates.xml.h:14 -msgid "Divider Labels" -msgstr "Étiquettes de division" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:16 -msgid "Filing Labels" -msgstr "Étiquettes pour dossiers" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:18 -msgid "Full Sheet Labels" -msgstr "Étiquettes pleine page" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:20 -msgid "ID Labels" -msgstr "Étiquettes d'identification" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:22 -msgid "Index Cards" -msgstr "Cartes d'index" - -# src/print_copies_merge.c:197 -# src/print_merge.c:170 -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:24 -msgid "Large Round Labels" -msgstr "Grandes étiquettes rondes" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:26 -msgid "Name Badge Labels" -msgstr "Étiquettes pour badges" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:28 -msgid "Post cards" -msgstr "Cartes postales" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:30 -#: ../data/templates/dymo-other-templates.xml.h:12 -msgid "Return Address Labels" -msgstr "Étiquettes d'adresse de retour" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:32 -#: ../data/templates/misc-us-templates.xml.h:28 -msgid "Round Labels" -msgstr "Étiquettes rondes" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:34 -msgid "Shipping Labels" -msgstr "Étiquettes postales" - -# src/print_copies_merge.c:197 -# src/print_merge.c:170 -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:36 -msgid "Small Round Labels" -msgstr "Petites étiquettes rondes" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:38 -msgid "Square Labels" -msgstr "Étiquettes carrées" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:40 -msgid "Tent Cards" -msgstr "Cartes chevalet" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:42 -msgid "Video Tape Face Labels" -msgstr "Étiquettes de face de cassette vidéo" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:44 -msgid "Video Tape Spine Labels" -msgstr "Étiquettes de dos de cassette vidéo" - -#: ../data/templates/brother-other-templates.xml.h:1 -msgid "Multi Purpose Labels 17mm x 54mm" -msgstr "Étiquettes multi usages 17x54 mm" - -#: ../data/templates/brother-other-templates.xml.h:2 -msgid "Shipping Labels 62mm x 100mm" -msgstr "Étiquettes postales 62x100 mm" - -#. -#. ********************************************************************* -#. ********************************************************************* -#. Labels for the Brother QL-500/550/650 PC Label Printers -#. -#. These templates work with the Brother Linux Printer CUPS Driver. It -#. is unknown if these work correctly with the foomatic print driver for -#. these printers. -#. -#. One difference from typical templates is that the template size is -#. not the actual media size - it is the size of the printable area, -#. which is smaller than the media size. This is because (at least with -#. the Brother driver) coordinates are relative the corner of this area. -#. -#. ********************************************************************* -#. ********************************************************************* -#. -#: ../data/templates/brother-other-templates.xml.h:20 -msgid "Standard Address Labels 29mm x 90mm" -msgstr "Étiquettes d'adresse standard 29x90 mm" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:2 -msgid "3.5in Diskette" -msgstr "Disquette 3,5 pouces" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:6 -msgid "File Folder" -msgstr "Dossier d'archives" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:8 -msgid "Hanging Folder" -msgstr "Dossier suspendu" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:10 -msgid "Large Address Labels" -msgstr "Grandes étiquettes d'adresses" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:14 -msgid "Shipping Address Labels" -msgstr "Étiquettes d'adresse postale" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:4 -#: ../data/templates/zweckform-iso-templates.xml.h:4 -msgid "Allround Labels" -msgstr "Étiquettes génériques" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:6 -msgid "Arch File Labels" -msgstr "Étiquettes de dossier d'archives" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:8 -msgid "Arch File Labels (large)" -msgstr "Étiquettes de dossier d'archives (grandes)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:10 -msgid "Arch File Labels (small)" -msgstr "Étiquettes de dossier d'archives (petites)" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:14 -msgid "CD Labels" -msgstr "Étiquettes de CD" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:18 -#: ../data/templates/misc-us-templates.xml.h:12 -msgid "CD/DVD Labels (face only)" -msgstr "Étiquettes de CD/DVD (face uniquement)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:20 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "Format standard d'étiquettes de CD/DVD (face uniquement)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:22 -msgid "Diskette Labels (face only)" -msgstr "Étiquettes de disquette (face uniquement)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:24 -msgid "EPSON Photo Stickers 16" -msgstr "Autocollants EPSON Photo 16" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:26 -msgid "Etiketten" -msgstr "Étiquettes" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:28 -msgid "Fridge Magnet Stickers" -msgstr "Autocollants magnétiques" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:30 -msgid "General Labels" -msgstr "Étiquettes générales" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:32 -msgid "Inkjet/Laser Labels 70x37mm" -msgstr "Étiquettes jet d'encre/laser 70x37 mm" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:38 -msgid "Mailing Labels-2 columns" -msgstr "Étiquettes de publipostage (2 colonnes)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:40 -msgid "Mailing Labels-3 columns" -msgstr "Étiquettes de publipostage (3 colonnes)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:42 -#: ../data/templates/misc-us-templates.xml.h:26 -msgid "PRO CD Labels 2-up (face only)" -msgstr "Étiquettes pour CD (2 ex, face uniquement)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:44 -#: ../data/templates/zweckform-iso-templates.xml.h:24 -msgid "Rectangular Labels" -msgstr "Étiquettes rectangulaires" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:46 -msgid "Video Labels (face only)" -msgstr "Étiquettes de vidéos (face uniquement)" - -#. =================================================================== -#: ../data/templates/misc-other-templates.xml.h:2 -msgid "Multi-Purpose Labels" -msgstr "Étiquettes multi-usages" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:2 -msgid "Business Card CD" -msgstr "CD carte de visite" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:6 -msgid "CD Template Rectangles" -msgstr "Modèle CD rectangle" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:10 -msgid "CD/DVD Labels (Face Only)" -msgstr "Étiquettes de CD/DVD (face uniquement)" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:14 -msgid "Cassette Labels" -msgstr "Étiquettes de cassette" - -# src/print_copies.c:210 -# src/print_copies.c:210 -# src/print_copies.c:188 -# src/print_copies.c:187 -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:16 -msgid "DLT Labels" -msgstr "Étiquettes DLT" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:20 -msgid "Microtube labels" -msgstr "Étiquettes microtube" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:22 -msgid "Mini-CD Labels" -msgstr "Étiquettes mini-CD" - -#: ../data/templates/misc-us-templates.xml.h:23 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "Étiquettes pour CD (2 ex, tranche uniquement)" - -#: ../data/templates/misc-us-templates.xml.h:24 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "Étiquettes pour CD (2 ex, face uniquement)" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:30 -msgid "Slimline CD Case (rightside up)" -msgstr "Boîtier CD mince (côté droit en haut)" - -#: ../data/templates/misc-us-templates.xml.h:31 -msgid "Slimline CD Case (upside down)" -msgstr "Boîtier CD mince (à l'envers)" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:10 -msgid "Correction and Cover-up Labels" -msgstr "Étiquettes de correction et de recouvrement" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:12 -msgid "File Back Labels" -msgstr "Étiquettes de dos de dossier" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:14 -msgid "Lever Arch File Labels" -msgstr "Étiquettes pour classeurs à levier" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:18 -msgid "Multi-purpose Stick+Lift Labels" -msgstr "Étiquettes enlevables multi-usages" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:20 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "Étiquettes de cartes QSL 70mm x 50,8mm" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:22 -msgid "Rectangular Copier Labels" -msgstr "Étiquettes rectangulaires pour copieur" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:26 -msgid "Video Labels (back)" -msgstr "Étiquettes vidéo (dos)" - -#: ../data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "Crée des étiquettes et des cartes de visite" - -#: ../data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "Créateur d'étiquettes gLabels" - -# src/item_text.c:467 -# src/item_text.c:467 -# src/item_text.c:482 -# src/item_text.c:482 -#: ../data/mime/glabels.keys.in.h:1 ../data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "Fichier de projet gLabels" - -#: ../barcode-0.98/compat/getopt.c:583 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "%s : l'option « %s » ambiguë\n" - -#: ../barcode-0.98/compat/getopt.c:607 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "%s : l'option « --%s » n'autorise pas d'argument\n" - -#: ../barcode-0.98/compat/getopt.c:612 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "%s : l'option « %c%s » n'autorise pas d'argument\n" - -#: ../barcode-0.98/compat/getopt.c:629 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "%s : l'option « %s » exige un argument\n" - -#. --option -#: ../barcode-0.98/compat/getopt.c:658 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "%s : option « --%s » inconnue\n" - -#. +option or -option -#: ../barcode-0.98/compat/getopt.c:662 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "%s : option « %c%s » inconnue\n" - -#. 1003.2 specifies the format of this message. -#: ../barcode-0.98/compat/getopt.c:688 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "%s : option -- %c non autorisée\n" - -#: ../barcode-0.98/compat/getopt.c:691 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "%s : option -- %c non valide\n" - -#: ../barcode-0.98/compat/getopt.c:727 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s : l'option exige un argument -- %c\n" diff --git a/glabels2/po/it.po b/glabels2/po/it.po deleted file mode 100644 index 09e23b7e..00000000 --- a/glabels2/po/it.po +++ /dev/null @@ -1,2427 +0,0 @@ -# translation of it.po to Italian -# Italian translation of glabels. -# Copyright (C) 2003 THE glabels'S COPYRIGHT HOLDER -# This file is distributed under the same license as the glabels package. -# Andrea , 2003. -# Daniele Medri , 2005. -# -# -msgid "" -msgstr "" -"Project-Id-Version: it\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-06-19 20:43-0400\n" -"PO-Revision-Date: 2005-06-27 09:34+0200\n" -"Last-Translator: Daniele Medri \n" -"Language-Team: Italian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit" - -#: src/glabels.c:116 -msgid "Could not initialize Bonobo!\n" -msgstr "Non è possibile inizializzare Bonobo!\n" - -#: src/glabels-batch.c:52 -msgid "print this message" -msgstr "stampa questo messaggio" - -#: src/glabels-batch.c:54 -msgid "print the version of glabels-batch being used" -msgstr "stampa la versione di glabels batch utilizzata" - -#: src/glabels-batch.c:56 -msgid "set output filename (default=\"output.ps\")" -msgstr "imposta il nome del file di output (default=\"output.ps\")" - -#: src/glabels-batch.c:56 src/glabels-batch.c:70 -msgid "filename" -msgstr "nome file" - -#: src/glabels-batch.c:58 -msgid "number of sheets (default=1)" -msgstr "numero di fogli (default=1)" - -#: src/glabels-batch.c:58 -msgid "sheets" -msgstr "fogli" - -#: src/glabels-batch.c:60 -msgid "number of copies (default=1)" -msgstr "numero di copie (default=1)" - -#: src/glabels-batch.c:60 -msgid "copies" -msgstr "copie" - -#: src/glabels-batch.c:62 -msgid "first label on first sheet (default=1)" -msgstr "prima etichetta del primo foglio (default=1)" - -#: src/glabels-batch.c:62 -msgid "first" -msgstr "primo" - -#: src/glabels-batch.c:64 src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "stampa bordi (per provare l'allineamento della stampante)" - -#: src/glabels-batch.c:66 src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "stampa al contrario (es. un'immagine riflessa)" - -#: src/glabels-batch.c:68 src/print-dialog.c:351 -msgid "print crop marks" -msgstr "stampa segni di taglio" - -#: src/glabels-batch.c:70 -msgid "input file for merging" -msgstr "file per la stampa unione" - -#: src/glabels-batch.c:107 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[OPTION...] GLABELS_FILE..." - -#: src/glabels-batch.c:127 -#, c-format -msgid "missing glabels file\n" -msgstr "file di glabels mancante\n" - -#: src/glabels-batch.c:158 -#, c-format -msgid "cannot perform document merge with glabels file %s\n" -msgstr "non è possibile unire i documenti con il file glabels %s\n" - -#: src/glabels-batch.c:182 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "non è possibile aprire il file glabels %s\n" - -#: src/window.c:244 -msgid "(none) - gLabels" -msgstr "(niente) - gLabels" - -#: src/window.c:414 -msgid "(modified)" -msgstr "(modificato)" - -#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 -msgid "_Select Mode" -msgstr "Modalità di _selezione" - -#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 -msgid "_Text" -msgstr "_Testo" - -#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 -msgid "_Line" -msgstr "_Linea" - -#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 -msgid "_Box" -msgstr "_Area" - -#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 -msgid "_Ellipse" -msgstr "_Ellisse" - -#: src/stock.c:70 data/ui/glabels-ui.xml.h:146 -msgid "_Image" -msgstr "_Immagine" - -#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 -msgid "Bar_code" -msgstr "_Codice a barre" - -#: src/stock.c:72 -msgid "_Merge Properties" -msgstr "Proprietà di _unione" - -#: src/stock.c:73 -msgid "Object _Properties" -msgstr "_Proprietà·Oggetto" - -#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 -msgid "Bring to _Front" -msgstr "Porta in _primo piano" - -#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 -msgid "Send to _Back" -msgstr "Porta in _secondo piano" - -#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 -msgid "Rotate _Left" -msgstr "Ruota a sinistra" - -#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 -msgid "Rotate _Right" -msgstr "Ruota a destra" - -#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "Capovolgi _orizzontalmente" - -#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "Capovolgi _verticalmente" - -#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 -msgid "_Lefts" -msgstr "_Sinistra" - -#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 -msgid "_Rights" -msgstr "_Destra" - -#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 -msgid "_Centers" -msgstr "_Centro" - -#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 -msgid "_Tops" -msgstr "_In alto" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "In basso" - -#: src/stock.c:85 -msgid "Centers" -msgstr "Centrato" - -#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "Etichetta ce_ntrata" - -#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "Colore di riempimento" - -#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "Colore Linea" - -#: src/stock.c:90 src/stock.c:92 -msgid "Linked" -msgstr "Collegato" - -#: src/stock.c:91 src/stock.c:93 -msgid "Not Linked" -msgstr "Nessun collegamento" - -#: src/ui-property-bar.c:345 src/object-editor.c:499 -msgid "Default" -msgstr "Predefinito" - -#: src/ui-property-bar.c:360 src/object-editor.c:512 -msgid "No fill" -msgstr "Nessun riempimento" - -#: src/ui-property-bar.c:375 src/object-editor.c:505 -msgid "No line" -msgstr "Nessuna linea" - -#: src/ui-sidebar.c:180 -msgid "Object properties" -msgstr "Proprietà oggetto" - -#: src/commands.c:385 -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/commands.c:399 -msgid "See the file AUTHORS for additional credits," -msgstr "Visualizza il file AUTHORS per informazioni aggiuntive." - -#: src/commands.c:400 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "oppure visita http://glabels.sourceforge.net/" - -#: src/commands.c:409 -msgid " " -msgstr " " - -#: src/commands.c:424 -msgid "glabels" -msgstr "glabels" - -#: src/file.c:100 -msgid "New Label or Card" -msgstr "Nuova etichetta o scheda" - -#: src/file.c:132 src/file.c:304 -msgid "Media Type" -msgstr "Tipo media" - -#: src/file.c:138 src/file.c:310 -msgid "Label orientation" -msgstr "Orientazione etichetta" - -#: src/file.c:269 -msgid "Label properties" -msgstr "Proprietà etichetta" - -#: src/file.c:452 src/file.c:870 -msgid "All files" -msgstr "Tutti i file" - -#: src/file.c:457 src/file.c:875 -msgid "gLabels documents" -msgstr "Documenti di gLabels" - -#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 -msgid "Empty file name selection" -msgstr "Selezione di un nome file vuoto" - -#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 -msgid "Please select a file or supply a valid file name" -msgstr "Per piacere, indica un file o un nome valido" - -#: src/file.c:519 src/file.c:631 -msgid "File does not exist" -msgstr "Il file non esiste" - -#: src/file.c:563 data/ui/glabels-ui.xml.h:74 -msgid "Open" -msgstr "Apri" - -#: src/file.c:565 -msgid "Open label" -msgstr "Apri etichetta" - -#: src/file.c:707 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "Non riesco ad aprire il file \"%s\"" - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "Non è un formato file supportato" - -#: src/file.c:797 src/file.c:979 src/file.c:1174 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "Non riesco a salvare il file \"%s\"" - -#: src/file.c:805 src/file.c:987 src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "" - -#: src/file.c:848 src/file.c:1048 -#, c-format -msgid "Save \"%s\" as" -msgstr "Salva \"%s\" come" - -#: src/file.c:935 src/file.c:1131 -msgid "Please supply a valid file name" -msgstr "Per piacere, indica un nome file valido" - -#: src/file.c:952 src/file.c:1147 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "Sovrascrivi il file \"%s\"?" - -#: src/file.c:960 src/file.c:1155 -msgid "File already exists." -msgstr "File già esistente." - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "Salva i cambiamenti al documento \"%s\" prima di chiudere?" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "I tuoi cambiamenti andranno persi se non salvi." - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "Chiudi senza salvare" - -#. Should not happen -#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 -#: data/glade/object-editor.glade.h:37 -msgid "points" -msgstr "punti" - -#: src/prefs.c:158 data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "pollici" - -#: src/prefs.c:160 -msgid "mm" -msgstr "mm" - -#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 -msgid "gLabels Preferences" -msgstr "Preferenze gLabels" - -#. -#. * Submenu: Order -#. -#: src/view.c:3574 data/ui/glabels-ui.xml.h:154 -msgid "_Order" -msgstr "_Ordine" - -#. -#. * Submenu: Rotate/Flip -#. -#: src/view.c:3595 data/ui/glabels-ui.xml.h:160 -msgid "_Rotate/Flip" -msgstr "_Ruota/capovolgi" - -#. -#. * Submenu: Align Horizontally -#. -#: src/view.c:3628 -msgid "Align _Horizontally" -msgstr "Allineamento _orizzontale" - -#. -#. * Submenu: Align Vertically -#. -#: src/view.c:3667 -msgid "Align _Vertically" -msgstr "Allineamento _verticale" - -#: src/view.c:3728 data/ui/glabels-ui.xml.h:137 -msgid "_Delete" -msgstr "Cancella" - -#. Build editor. -#: src/view-box.c:224 -msgid "Box object properties" -msgstr "Proprietà dell'oggetto area" - -#. Build editor. -#: src/view-ellipse.c:224 -msgid "Ellipse object properties" -msgstr "Proprietà dell'oggetto Ellisse" - -#. Build editor. -#: src/view-line.c:224 -msgid "Line object properties" -msgstr "Proprietà dell'oggetto Linea" - -#. Build editor. -#: src/view-image.c:223 -msgid "Image object properties" -msgstr "Proprietà dell'oggetto Immagine" - -#. Build editor. -#: src/view-text.c:251 -msgid "Text object properties" -msgstr "Proprietà dell'oggetto Testo" - -#: src/view-text.c:563 data/glade/object-editor.glade.h:28 -msgid "Text" -msgstr "Testo" - -#. Build editor. -#: src/view-barcode.c:210 -msgid "Barcode object properties" -msgstr "Proprietà dell'oggetto Codice a barre" - -#: src/view-barcode.c:580 src/print.c:1089 -msgid "Invalid barcode data" -msgstr "Codice a barre non valido" - -#: src/merge-properties-dialog.c:231 -msgid "Merge Properties" -msgstr "Proprietà di unione" - -#. ---- Source section ---- -#: src/merge-properties-dialog.c:237 -msgid "Source" -msgstr "Sorgente" - -#: src/merge-properties-dialog.c:245 -msgid "Format:" -msgstr "Formato:" - -#. Location line -#: src/merge-properties-dialog.c:273 -msgid "Location:" -msgstr "Posizione:" - -#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 -msgid "Select merge-database source" -msgstr "Seleziona sorgente unione-database" - -#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 -msgid "N/A" -msgstr "N/A" - -#. ---- Sample Fields section ---- -#: src/merge-properties-dialog.c:300 -msgid "Record selection/preview:" -msgstr "Selezione/anteprima record:" - -#: src/merge-properties-dialog.c:326 -msgid "Select" -msgstr "Seleziona" - -#: src/merge-properties-dialog.c:334 -msgid "Record/Field" -msgstr "Record/campo" - -#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 -msgid "Data" -msgstr "Dati" - -#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:81 -msgid "Print" -msgstr "Stampa" - -#: src/print-dialog.c:281 -msgid "_Job" -msgstr "Lavoro" - -#: src/print-dialog.c:286 -msgid "P_rinter" -msgstr "Stampante" - -#. ----------- Add simple-copies widget ------------ -#: src/print-dialog.c:314 -msgid "Copies" -msgstr "Copie" - -#. ------- Add merge control widget ------------ -#: src/print-dialog.c:322 -msgid "Document merge control" -msgstr "" - -#. ----------- Add custom print options area ------------ -#: src/print-dialog.c:330 -msgid "Options" -msgstr "Opzioni" - -#: src/print-dialog.c:553 src/print-dialog.c:592 -msgid "Print preview" -msgstr "Anteprima di stampa" - -#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 -msgid "gLabels Template Designer" -msgstr "Progettazione di modelli per gLabels" - -#: src/bc.c:60 -msgid "POSTNET (any)" -msgstr "POSTNET (qualsiasi)" - -#: src/bc.c:63 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (solo ZIP/CAP)" - -#: src/bc.c:66 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (ZIP/CAP+4)" - -#: src/bc.c:69 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: src/bc.c:72 -msgid "EAN (any)" -msgstr "EAN (qualsiasi)" - -#: src/bc.c:75 -msgid "EAN-8" -msgstr "EAN-8" - -#: src/bc.c:78 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: src/bc.c:81 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: src/bc.c:84 -msgid "EAN-13" -msgstr "EAN-13" - -#: src/bc.c:87 -msgid "EAN-13 +2" -msgstr "EAN-13 +2" - -#: src/bc.c:90 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: src/bc.c:93 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A o UPC-E)" - -#: src/bc.c:96 -msgid "UPC-A" -msgstr "UPC-A" - -#: src/bc.c:99 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: src/bc.c:102 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: src/bc.c:105 -msgid "UPC-E" -msgstr "UPC-E" - -#: src/bc.c:108 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: src/bc.c:111 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: src/bc.c:114 -msgid "ISBN" -msgstr "ISBN" - -#: src/bc.c:117 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: src/bc.c:120 -msgid "Code 39" -msgstr "Code 39" - -#: src/bc.c:123 -msgid "Code 128" -msgstr "Code 128" - -#: src/bc.c:126 -msgid "Code 128C" -msgstr "Code 128C" - -#: src/bc.c:129 -msgid "Code 128B" -msgstr "Code 128B" - -#: src/bc.c:132 -msgid "Interleaved 2 of 5" -msgstr "" - -#: src/bc.c:135 -msgid "Codabar" -msgstr "Codabar" - -#: src/bc.c:138 -msgid "MSI" -msgstr "MSI" - -#: src/bc.c:141 -msgid "Plessey" -msgstr "Plessey" - -#: src/label.c:569 -msgid "Untitled" -msgstr "Senza nome" - -#: src/xml-label.c:176 src/xml-label.c:213 -msgid "xmlParseFile error" -msgstr "" - -#: src/xml-label.c:250 -msgid "No document root" -msgstr "Nessun documento radice" - -#: src/xml-label.c:264 -msgid "Importing from glabels 0.1 format" -msgstr "" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "" - -#: src/xml-label.c:279 -msgid "Importing from glabels 1.91 format" -msgstr "" - -#: src/xml-label.c:282 -msgid "bad document, unknown glabels Namespace" -msgstr "" - -#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "" - -#: src/xml-label.c:348 src/xml-label-191.c:165 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "" - -#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "" - -#: src/xml-label.c:796 src/xml-label-191.c:605 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "" - -#: src/xml-label.c:962 libglabels/xml-template.c:535 -msgid "Utf8 conversion error." -msgstr "Conversione di errore Utf8." - -#: src/xml-label.c:969 libglabels/xml-template.c:542 -msgid "Problem saving xml file." -msgstr "Problema nel salvataggio del file xml" - -#. This should always be an id, but just in case a name -#. slips by! -#: src/xml-label-191.c:680 libglabels/xml-template.c:199 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "" - -#: src/xml-label-191.c:690 libglabels/xml-template.c:209 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "" - -#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 -msgid "None" -msgstr "Nessuno" - -#: src/merge-init.c:53 -msgid "Text file with comma delimeters (CSV)" -msgstr "" - -#: src/merge-init.c:60 -msgid "Text file with colon delimeters" -msgstr "" - -#: src/merge-init.c:67 -msgid "Text file with tab delimeters" -msgstr "" - -#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 -msgid "File:" -msgstr "File:" - -#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 -msgid "Key:" -msgstr "Chiave:" - -#: src/wdgt-print-copies.c:179 -msgid "Sheets:" -msgstr "Fogli:" - -#: src/wdgt-print-copies.c:197 -msgid "Labels" -msgstr "Etichette" - -#: src/wdgt-print-copies.c:200 -msgid "from:" -msgstr "da:" - -#: src/wdgt-print-copies.c:207 -msgid "to:" -msgstr "a:" - -#: src/wdgt-print-merge.c:178 -msgid "Start on label" -msgstr "" - -#: src/wdgt-print-merge.c:186 -msgid "on 1st sheet" -msgstr "nel 1° foglio" - -#: src/wdgt-print-merge.c:195 -msgid "Copies:" -msgstr "Copie:" - -#: src/wdgt-print-merge.c:201 -msgid "Collate" -msgstr "Fascicoli" - -#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 -msgid "Description:" -msgstr "Descrizione:" - -#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 -msgid "Page size:" -msgstr "Dimensioni·pagina:" - -#: src/wdgt-media-select.c:290 -msgid "Label size:" -msgstr "Dimensioni etichetta:" - -#: src/wdgt-media-select.c:301 -msgid "Layout:" -msgstr "Layout:" - -#: src/wdgt-media-select.c:578 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d per foglio)" - -#: src/wdgt-media-select.c:582 -#, c-format -msgid "%d per sheet" -msgstr "%d per foglio" - -#: src/wdgt-media-select.c:614 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/wdgt-media-select.c:619 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s diametro" - -#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s diametro" - -#: src/wdgt-rotate-label.c:193 -msgid "Rotate" -msgstr "Girare" - -#. This is the default custom color -#: src/mygal/color-palette.c:396 -msgid "custom" -msgstr "personalizzato" - -#. "Custom" color - we'll pop up a GnomeColorPicker -#: src/mygal/color-palette.c:438 -msgid "Custom Color:" -msgstr "Colore personalizzato:" - -#: src/mygal/color-palette.c:446 -msgid "Choose Custom Color" -msgstr "Scegli colore personalizzato" - -#: src/mygal/color-palette.c:579 -msgid "black" -msgstr "nero" - -#: src/mygal/color-palette.c:580 -msgid "light brown" -msgstr "Marrone chiaro" - -#: src/mygal/color-palette.c:581 -msgid "brown gold" -msgstr "" - -#: src/mygal/color-palette.c:582 -msgid "dark green #2" -msgstr "verde scuro #2" - -#: src/mygal/color-palette.c:583 -msgid "navy" -msgstr "" - -#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 -msgid "dark blue" -msgstr "blu scuro" - -#: src/mygal/color-palette.c:585 -msgid "purple #2" -msgstr "" - -#: src/mygal/color-palette.c:586 -msgid "very dark gray" -msgstr "" - -#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 -msgid "dark red" -msgstr "rosso scuro" - -#: src/mygal/color-palette.c:590 -msgid "red-orange" -msgstr "" - -#: src/mygal/color-palette.c:591 -msgid "gold" -msgstr "oro" - -#: src/mygal/color-palette.c:592 -msgid "dark green" -msgstr "verde scuro" - -#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 -msgid "dull blue" -msgstr "" - -#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 -msgid "blue" -msgstr "blu" - -#: src/mygal/color-palette.c:595 -msgid "dull purple" -msgstr "" - -#: src/mygal/color-palette.c:596 -msgid "dark grey" -msgstr "" - -#: src/mygal/color-palette.c:599 -msgid "red" -msgstr "rosso" - -#: src/mygal/color-palette.c:600 -msgid "orange" -msgstr "arancione" - -#: src/mygal/color-palette.c:601 -msgid "lime" -msgstr "tiglio" - -#: src/mygal/color-palette.c:602 -msgid "dull green" -msgstr "" - -#: src/mygal/color-palette.c:603 -msgid "dull blue #2" -msgstr "" - -#: src/mygal/color-palette.c:604 -msgid "sky blue #2" -msgstr "" - -#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 -msgid "purple" -msgstr "viola" - -#: src/mygal/color-palette.c:606 -msgid "gray" -msgstr "grigio" - -#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 -msgid "magenta" -msgstr "" - -#: src/mygal/color-palette.c:610 -msgid "bright orange" -msgstr "" - -#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 -msgid "yellow" -msgstr "giallo" - -#: src/mygal/color-palette.c:612 -msgid "green" -msgstr "verde" - -#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 -msgid "cyan" -msgstr "" - -#: src/mygal/color-palette.c:614 -msgid "bright blue" -msgstr "" - -#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 -msgid "red purple" -msgstr "" - -#: src/mygal/color-palette.c:616 -msgid "light grey" -msgstr "" - -#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 -msgid "pink" -msgstr "rosa" - -#: src/mygal/color-palette.c:620 -msgid "light orange" -msgstr "" - -#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 -msgid "light yellow" -msgstr "" - -#: src/mygal/color-palette.c:622 -msgid "light green" -msgstr "" - -#: src/mygal/color-palette.c:623 -msgid "light cyan" -msgstr "" - -#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 -msgid "light blue" -msgstr "blu chiaro" - -#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 -msgid "light purple" -msgstr "" - -#: src/mygal/color-palette.c:626 -msgid "white" -msgstr "bianco" - -#: src/mygal/color-palette.c:631 -msgid "purplish blue" -msgstr "" - -#: src/mygal/color-palette.c:635 -msgid "dark purple" -msgstr "" - -#: src/mygal/color-palette.c:637 -msgid "sky blue" -msgstr "" - -#: libglabels/template.c:848 -#, c-format -msgid "Generic %s full page" -msgstr "" - -#: libglabels/template.c:897 -msgid "No template files found!" -msgstr "Nessun modello trovato!" - -#. Create and append an "Other" entry. -#: libglabels/paper.c:67 -msgid "Other" -msgstr "Altro" - -#: libglabels/paper.c:361 -msgid "No paper files found!" -msgstr "Nessun file paper trovato!" - -#: data/ui/glabels-ui.xml.h:1 -msgid "About glabels" -msgstr "Informazioni su glabels" - -#: data/ui/glabels-ui.xml.h:2 -msgid "About..." -msgstr "Informazioni..." - -#: data/ui/glabels-ui.xml.h:3 -msgid "Align _Horizontal" -msgstr "Allineamento orizzontale" - -#: data/ui/glabels-ui.xml.h:4 -msgid "Align _Vertical" -msgstr "Allineamento _verticale" - -#: data/ui/glabels-ui.xml.h:5 -msgid "Align objects to bottoms" -msgstr "Allinea gli oggetti in basso" - -#: data/ui/glabels-ui.xml.h:6 -msgid "Align objects to horizontal centers" -msgstr "Allinea gli oggetti nel centro orizzontale" - -#: data/ui/glabels-ui.xml.h:7 -msgid "Align objects to left edges" -msgstr "" - -#: data/ui/glabels-ui.xml.h:8 -msgid "Align objects to right edges" -msgstr "" - -#: data/ui/glabels-ui.xml.h:9 -msgid "Align objects to tops" -msgstr "" - -#: data/ui/glabels-ui.xml.h:10 -msgid "Align objects to vertical centers" -msgstr "Allinea gli oggetti al centro verticale" - -#: data/ui/glabels-ui.xml.h:12 -msgid "Bold" -msgstr "Grassetto" - -#: data/ui/glabels-ui.xml.h:14 -msgid "Center align" -msgstr "Allineamento centrato" - -#: data/ui/glabels-ui.xml.h:15 -msgid "Center objects to horizontal label center" -msgstr "" - -#: data/ui/glabels-ui.xml.h:16 -msgid "Center objects to vertical label center" -msgstr "" - -#: data/ui/glabels-ui.xml.h:17 -msgid "Change the visibility of markup lines in the current window" -msgstr "" -"Cambia la visibilità delle linee di demarcazione nella finestra corrente" - -#: data/ui/glabels-ui.xml.h:18 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "Cambia la visibilità della barra degli strumenti di disegno nella finestra corrente" - -#: data/ui/glabels-ui.xml.h:19 -msgid "Change the visibility of the grid in the current window" -msgstr "Cambia la visibilità della griglia nella finestra corrente" - -#: data/ui/glabels-ui.xml.h:20 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "Cambia la visibilità della barra degli strumenti principale nella finestra corrente" - -#: data/ui/glabels-ui.xml.h:21 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "" -"Cambia la visibilità della barra degli strumenti principale nella finestra " -"corrente" - -#: data/ui/glabels-ui.xml.h:22 -msgid "Close" -msgstr "Chiudi" - -#: data/ui/glabels-ui.xml.h:23 -msgid "Close the current file" -msgstr "Chiudi il file corrente" - -#: data/ui/glabels-ui.xml.h:24 -msgid "Configure the application" -msgstr "Configura l'applicazione" - -#: data/ui/glabels-ui.xml.h:25 -msgid "Contents" -msgstr "Contenuti" - -#: data/ui/glabels-ui.xml.h:26 -msgid "Copy" -msgstr "Copia" - -#: data/ui/glabels-ui.xml.h:27 -msgid "Copy the selection" -msgstr "Copia la selezione" - -#: data/ui/glabels-ui.xml.h:28 -msgid "Create a custom template" -msgstr "Crea un modello personalizzato" - -#: data/ui/glabels-ui.xml.h:29 -msgid "Create a new document" -msgstr "Crea un nuovo documento" - -#: data/ui/glabels-ui.xml.h:30 -msgid "Create barcode object" -msgstr "Crea oggetto codice a barre" - -#: data/ui/glabels-ui.xml.h:31 -msgid "Create box/rectangle object" -msgstr "Crea oggetto area/rettangolo" - -#: data/ui/glabels-ui.xml.h:32 -msgid "Create ellipse/circle object" -msgstr "Crea oggetto ellisse/cerchio" - -#: data/ui/glabels-ui.xml.h:33 -msgid "Create image object" -msgstr "Crea oggetto immagine" - -#: data/ui/glabels-ui.xml.h:34 -msgid "Create line object" -msgstr "Crea oggetto linea" - -#: data/ui/glabels-ui.xml.h:35 -msgid "Create text object" -msgstr "Crea oggeto testo" - -#: data/ui/glabels-ui.xml.h:36 -msgid "Cu_t" -msgstr "_Taglia" - -#: data/ui/glabels-ui.xml.h:37 -msgid "Customize" -msgstr "Personalizza" - -#: data/ui/glabels-ui.xml.h:38 -msgid "Customize Drawing Toolbar" -msgstr "Personalizza la barra degli strumenti di disegno" - -#: data/ui/glabels-ui.xml.h:39 -msgid "Customize Main Toolbar" -msgstr "Personalizza la barra degli strumenti principale" - -#: data/ui/glabels-ui.xml.h:40 -msgid "Customize Property Toolbar" -msgstr "Personalizza barra degli strumenti proprietà" - -#: data/ui/glabels-ui.xml.h:41 -msgid "Customize toolbars" -msgstr "Personalizza·le·barre degli strumenti" - -#: data/ui/glabels-ui.xml.h:42 -msgid "Cut" -msgstr "Taglia" - -#: data/ui/glabels-ui.xml.h:43 -msgid "Cut the selection" -msgstr "Taglia la selezione" - -#: data/ui/glabels-ui.xml.h:44 -msgid "Decrease magnification" -msgstr "Decrementa ingrandimento" - -#: data/ui/glabels-ui.xml.h:45 -msgid "Delete" -msgstr "Cancella" - -#: data/ui/glabels-ui.xml.h:46 -msgid "Delete the selected objects" -msgstr "Cancella gli oggetti selezionati" - -#: data/ui/glabels-ui.xml.h:47 -msgid "Drawing toolbar" -msgstr "Barra degli strumenti di disegno" - -#: data/ui/glabels-ui.xml.h:48 -msgid "Dump XML" -msgstr "Scarica XML" - -#: data/ui/glabels-ui.xml.h:49 -msgid "Dump the UI Xml description" -msgstr "" - -#: data/ui/glabels-ui.xml.h:50 -msgid "Edit merge properties" -msgstr "Modifica proprietà di unione" - -#: data/ui/glabels-ui.xml.h:54 -msgid "Flip object horizontally" -msgstr "Capovolgi oggetto orizzontalmente" - -#: data/ui/glabels-ui.xml.h:55 -msgid "Flip object vertically" -msgstr "Capovolgi oggetto verticalmente" - -#: data/ui/glabels-ui.xml.h:56 -msgid "Font name" -msgstr "Nome font" - -#: data/ui/glabels-ui.xml.h:57 -msgid "Font selector" -msgstr "Selettore font" - -#: data/ui/glabels-ui.xml.h:58 -msgid "Font size" -msgstr "Dimesione·font" - -#: data/ui/glabels-ui.xml.h:59 -msgid "Icon and _Text" -msgstr "Icone e _Testo" - -#: data/ui/glabels-ui.xml.h:60 -msgid "Increase magnification" -msgstr "Incrementa ingradimento" - -#: data/ui/glabels-ui.xml.h:61 -msgid "Italic" -msgstr "Corsivo" - -#: data/ui/glabels-ui.xml.h:63 -msgid "Left align" -msgstr "Allinea·a·sinistra" - -#: data/ui/glabels-ui.xml.h:65 -msgid "Line width" -msgstr "Larghezza linea" - -#: data/ui/glabels-ui.xml.h:66 -msgid "Lower object to bottom" -msgstr "" - -#: data/ui/glabels-ui.xml.h:67 -msgid "M_arkup" -msgstr "" - -#: data/ui/glabels-ui.xml.h:68 -msgid "Main toolbar" -msgstr "Barra degli strumenti principale" - -#: data/ui/glabels-ui.xml.h:69 -msgid "Markup" -msgstr "Marcatori" - -#: data/ui/glabels-ui.xml.h:70 -msgid "Modify document properties" -msgstr "Modifica le proprietà del documento" - -#: data/ui/glabels-ui.xml.h:71 -msgid "New" -msgstr "Nuovo" - -#: data/ui/glabels-ui.xml.h:72 -msgid "Object property editor" -msgstr "Editor delle proprietà per l'oggetto" - -#: data/ui/glabels-ui.xml.h:73 -msgid "Only show icons in the main toolbar" -msgstr "Visualizza solo le icone nella barra degli strumenti principale" - -#: data/ui/glabels-ui.xml.h:75 -msgid "Open a file" -msgstr "Apri un file" - -#: data/ui/glabels-ui.xml.h:76 -msgid "Open the glabels manual" -msgstr "Apri il manuale di glabels" - -#: data/ui/glabels-ui.xml.h:77 -msgid "Paste" -msgstr "Incolla" - -#: data/ui/glabels-ui.xml.h:78 -msgid "Paste the clipboard" -msgstr "Incolla gli appunti" - -#: data/ui/glabels-ui.xml.h:79 -msgid "Pr_eferences..." -msgstr "Pr_eferenze..." - -#: data/ui/glabels-ui.xml.h:80 -msgid "Preferences" -msgstr "Preferenze" - -#: data/ui/glabels-ui.xml.h:82 -msgid "Print the current file" -msgstr "Stampa il file corrente" - -#: data/ui/glabels-ui.xml.h:83 -msgid "Proper_ties..." -msgstr "Proprie_tà..." - -#: data/ui/glabels-ui.xml.h:84 -msgid "Properties" -msgstr "Proprietà" - -#: data/ui/glabels-ui.xml.h:85 -msgid "Property toolbar" -msgstr "Proprietà della barra degli strumenti" - -#: data/ui/glabels-ui.xml.h:86 -msgid "Quit" -msgstr "Esci" - -#: data/ui/glabels-ui.xml.h:87 -msgid "Quit the program" -msgstr "Esci dal programma" - -#: data/ui/glabels-ui.xml.h:88 -msgid "Raise object to top" -msgstr "" - -#: data/ui/glabels-ui.xml.h:89 -msgid "Recent _Files" -msgstr "_File Recenti" - -#: data/ui/glabels-ui.xml.h:90 -msgid "Redo" -msgstr "Ripeti" - -#: data/ui/glabels-ui.xml.h:91 -msgid "Redo the undone action" -msgstr "" - -#: data/ui/glabels-ui.xml.h:92 -msgid "Remove all selections" -msgstr "Rimuovi tutte le selezioni" - -#: data/ui/glabels-ui.xml.h:94 -#, no-c-format -msgid "Restore scale to 100%" -msgstr "Ripristina la scala al 100%" - -#: data/ui/glabels-ui.xml.h:95 -msgid "Right align" -msgstr "Allineamento a destra" - -#: data/ui/glabels-ui.xml.h:98 -msgid "Rotate object 90 clockwise" -msgstr "Ruota l'oggetto di 90° in verso orario" - -#: data/ui/glabels-ui.xml.h:99 -msgid "Rotate object 90 counter-clockwise" -msgstr "Ruota l'oggetto di 90° in verso antiorario" - -#: data/ui/glabels-ui.xml.h:100 -msgid "Save" -msgstr "Salva" - -#: data/ui/glabels-ui.xml.h:101 -msgid "Save As" -msgstr "Salva con nome" - -#: data/ui/glabels-ui.xml.h:102 -msgid "Save _As..." -msgstr "Salva _con nome..." - -#: data/ui/glabels-ui.xml.h:103 -msgid "Save the current file" -msgstr "Salva il file corrente" - -#: data/ui/glabels-ui.xml.h:104 -msgid "Save the current file with a different name" -msgstr "Salva il file corrente con un nome differente" - -#: data/ui/glabels-ui.xml.h:105 -msgid "Select All" -msgstr "Seleziona tutto" - -#: data/ui/glabels-ui.xml.h:106 -msgid "Select _All" -msgstr "Seleziona tutto" - -#: data/ui/glabels-ui.xml.h:107 -msgid "Select all objects" -msgstr "Seleziona tutti gli oggetti" - -#: data/ui/glabels-ui.xml.h:108 -msgid "Select, move and modify objects" -msgstr "Seleziona, muovi e modifica oggetti" - -#: data/ui/glabels-ui.xml.h:110 -msgid "Set main toolbar button style according to desktop default" -msgstr "" - -#: data/ui/glabels-ui.xml.h:111 -msgid "Show _Tooltips" -msgstr "Mostra suggerimenti" - -#: data/ui/glabels-ui.xml.h:112 -msgid "Show both icons and texts in the main toolbar" -msgstr "Mostra icone e testo nella barra degli strumenti principale" - -#: data/ui/glabels-ui.xml.h:113 -msgid "Show tooltips in the drawing toolbar" -msgstr "Mostra suggerimenti nella barra degli strumenti di disegno" - -#: data/ui/glabels-ui.xml.h:114 -msgid "Show tooltips in the main toolbar" -msgstr "Mostra suggerimenti nella barra degli strumenti principale" - -#: data/ui/glabels-ui.xml.h:115 -msgid "Show tooltips in the property toolbar" -msgstr "Mostra suggerimenti nella barra degli strumenti principale" - -#: data/ui/glabels-ui.xml.h:116 -msgid "Template Designer" -msgstr "Progettazione modelli" - -#: data/ui/glabels-ui.xml.h:117 -msgid "Template _Designer..." -msgstr "" - -#: data/ui/glabels-ui.xml.h:118 -msgid "Text color" -msgstr "Colore testo" - -#: data/ui/glabels-ui.xml.h:119 -msgid "U_n-select All" -msgstr "Deseleziona tutto" - -#: data/ui/glabels-ui.xml.h:120 -msgid "Un-select All" -msgstr "Deseleziona·tutto" - -#: data/ui/glabels-ui.xml.h:121 -msgid "Undo" -msgstr "Annulla" - -#: data/ui/glabels-ui.xml.h:122 -msgid "Undo the last action" -msgstr "Annulla l'ultima azione" - -#: data/ui/glabels-ui.xml.h:123 -msgid "Zoom _1:1" -msgstr "Zoom _1:1" - -#: data/ui/glabels-ui.xml.h:124 -msgid "Zoom _In" -msgstr "Zoom _in avanti" - -#: data/ui/glabels-ui.xml.h:125 -msgid "Zoom _Out" -msgstr "Zo_om indietro" - -#: data/ui/glabels-ui.xml.h:126 -msgid "Zoom to _fit" -msgstr "Adatta" - -#: data/ui/glabels-ui.xml.h:127 -msgid "Zoom to fit window" -msgstr "Adatta alla finestra" - -#: data/ui/glabels-ui.xml.h:128 -msgid "_About..." -msgstr "Informazioni..." - -#: data/ui/glabels-ui.xml.h:129 -msgid "_Bottoms" -msgstr "In basso" - -#: data/ui/glabels-ui.xml.h:132 -msgid "_Close" -msgstr "_Chiudi" - -#: data/ui/glabels-ui.xml.h:133 -msgid "_Contents" -msgstr "_Contenuti" - -#: data/ui/glabels-ui.xml.h:134 -msgid "_Copy" -msgstr "_Copia" - -#: data/ui/glabels-ui.xml.h:135 -msgid "_Create Object" -msgstr "_Crea Oggetto" - -#: data/ui/glabels-ui.xml.h:136 -msgid "_Debug" -msgstr "_Debug" - -#: data/ui/glabels-ui.xml.h:138 -msgid "_Desktop Default" -msgstr "Predefinito del desktop" - -#: data/ui/glabels-ui.xml.h:139 -msgid "_Drawing Toolbar" -msgstr "Barra degli strumenti di disegno" - -#: data/ui/glabels-ui.xml.h:140 -msgid "_Edit" -msgstr "_Modifica" - -#: data/ui/glabels-ui.xml.h:142 -msgid "_File" -msgstr "_File" - -#: data/ui/glabels-ui.xml.h:143 -msgid "_Grid" -msgstr "_Griglia" - -#: data/ui/glabels-ui.xml.h:144 -msgid "_Help" -msgstr "_Aiuto" - -#: data/ui/glabels-ui.xml.h:145 -msgid "_Icon" -msgstr "_Icone" - -#: data/ui/glabels-ui.xml.h:149 -msgid "_Main Toolbar" -msgstr "Barra degli stru_menti principale" - -#: data/ui/glabels-ui.xml.h:150 -msgid "_Merge Properties..." -msgstr "Proprietà di unione..." - -#: data/ui/glabels-ui.xml.h:151 -msgid "_New" -msgstr "_Nuovo" - -#: data/ui/glabels-ui.xml.h:152 -msgid "_Objects" -msgstr "_Oggetti" - -#: data/ui/glabels-ui.xml.h:153 -msgid "_Open..." -msgstr "_Apri..." - -#: data/ui/glabels-ui.xml.h:155 -msgid "_Paste" -msgstr "Incolla" - -#: data/ui/glabels-ui.xml.h:156 -msgid "_Print..." -msgstr "Stampa..." - -#: data/ui/glabels-ui.xml.h:157 -msgid "_Property Toolbar" -msgstr "Barra degli strumenti _proprietà" - -#: data/ui/glabels-ui.xml.h:158 -msgid "_Quit" -msgstr "_Esci" - -#: data/ui/glabels-ui.xml.h:161 -msgid "_Save" -msgstr "_Salva" - -#: data/ui/glabels-ui.xml.h:165 -msgid "_View" -msgstr "_Visualizza" - -#: data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 -#: data/glade/template-designer.glade.h:5 -msgid "*" -msgstr "*" - -#: data/glade/prefs-dialog.glade.h:3 -msgid "Default page size" -msgstr "Dimensione pagina predefinita" - -#: data/glade/prefs-dialog.glade.h:4 -msgid "Fill" -msgstr "Riempimento" - -#: data/glade/prefs-dialog.glade.h:5 -msgid "Line" -msgstr "Linea" - -#: data/glade/prefs-dialog.glade.h:6 -msgid "Text" -msgstr "Testo" - -#: data/glade/prefs-dialog.glade.h:7 -msgid "Units" -msgstr "Unità" - -#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 -msgid "Alignment:" -msgstr "Allineamento:" - -#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 -msgid "Color:" -msgstr "Colore:" - -#: data/glade/prefs-dialog.glade.h:10 -msgid "Font:" -msgstr "Carattere:" - -#: data/glade/prefs-dialog.glade.h:11 -msgid "ISO A4" -msgstr "ISO A4" - -#: data/glade/prefs-dialog.glade.h:12 -msgid "Inches" -msgstr "Pollici" - -#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 -msgid "Line Spacing:" -msgstr "Spaziatura:" - -#: data/glade/prefs-dialog.glade.h:14 -msgid "Locale" -msgstr "Impostazioni nazionali" - -#: data/glade/prefs-dialog.glade.h:15 -msgid "Millimeters" -msgstr "Millimetri" - -#: data/glade/prefs-dialog.glade.h:16 -msgid "Object defaults" -msgstr "Proprietà oggetto" - -#: data/glade/prefs-dialog.glade.h:17 -msgid "Points" -msgstr "Punti" - -#: data/glade/prefs-dialog.glade.h:18 -msgid "Select default properties for new objects." -msgstr "Seleziona le proprietà predefinite per i nuovi oggetti." - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "" - -#. Most popular (at top of list) -#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:29 -msgid "US Letter" -msgstr "US·Letter" - -#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 -#: data/glade/template-designer.glade.h:72 -msgid "Width:" -msgstr "Larghezza:" - -#: data/glade/object-editor.glade.h:2 -msgid "00000000000 00000" -msgstr "" - -#: data/glade/object-editor.glade.h:3 -msgid "Xxx object properties" -msgstr "" - -#: data/glade/object-editor.glade.h:5 -msgid "Allow merge to automatically shrink text" -msgstr "" - -#: data/glade/object-editor.glade.h:6 -msgid "Angle:" -msgstr "Angolo:" - -#: data/glade/object-editor.glade.h:7 -msgid "Checksum" -msgstr "Checksum" - -#: data/glade/object-editor.glade.h:10 -msgid "Family:" -msgstr "Famiglia:" - -#: data/glade/object-editor.glade.h:12 -msgid "Fill" -msgstr "Riempimento" - -#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 -msgid "Height:" -msgstr "Altezza:" - -#: data/glade/object-editor.glade.h:14 -msgid "Image" -msgstr "Immagine" - -#: data/glade/object-editor.glade.h:15 -msgid "Insert merge field" -msgstr "Inserisci campo unione" - -#: data/glade/object-editor.glade.h:17 -msgid "Length:" -msgstr "Lunghezza:" - -#: data/glade/object-editor.glade.h:18 -msgid "Line" -msgstr "Linea" - -#: data/glade/object-editor.glade.h:20 -msgid "Literal:" -msgstr "Letterale:" - -#: data/glade/object-editor.glade.h:21 -msgid "Load image" -msgstr "Carica immagine" - -#: data/glade/object-editor.glade.h:22 -msgid "Position" -msgstr "Posizione" - -#: data/glade/object-editor.glade.h:23 -msgid "Reset image size" -msgstr "Ripristina dimensioni immagine" - -#: data/glade/object-editor.glade.h:24 -msgid "Size" -msgstr "Dimensioni" - -#: data/glade/object-editor.glade.h:25 -msgid "Size:" -msgstr "Dimensione:" - -#: data/glade/object-editor.glade.h:26 -msgid "Style" -msgstr "Stile" - -#: data/glade/object-editor.glade.h:27 -msgid "Style:" -msgstr "Stile:" - -#: data/glade/object-editor.glade.h:30 -msgid "X:" -msgstr "X:" - -#: data/glade/object-editor.glade.h:31 -msgid "Y:" -msgstr "Y:" - -#: data/glade/object-editor.glade.h:32 -msgid "degrees" -msgstr "gradi" - -#: data/glade/object-editor.glade.h:33 -msgid "dialog1" -msgstr "" - -#: data/glade/object-editor.glade.h:34 -msgid "digits:" -msgstr "cifre:" - -#: data/glade/object-editor.glade.h:35 -msgid "format:" -msgstr "formato:" - -#: data/glade/template-designer.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/template-designer.glade.h:2 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(es., \"Etichette di spedizione,\" \"Biglietti da visita,\" ...)" - -#: data/glade/template-designer.glade.h:3 -msgid "(e.g., 8163A)" -msgstr "(es. 8163A)" - -#: data/glade/template-designer.glade.h:4 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(es. Avery, Acme, ...)" - -#: data/glade/template-designer.glade.h:6 -msgid "1. Outer radius:" -msgstr "1. raggio esterno:" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "Raggio:" - -#: data/glade/template-designer.glade.h:8 -msgid "1. Width:" -msgstr "1. Larghezza:" - -#: data/glade/template-designer.glade.h:9 -msgid "2. Height:" -msgstr "2. Altezza:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "2. raggio interno:" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "3. Margine" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "6. Margine" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "Marca/Produttore:" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD (inclusa copertina dei ringraziamenti)" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "Congratulazioni!\n" -"\n" -"Hai completato il gLabels Template Designer.\n" -"Se vuoi salvare il tuo progetto fai clic su \"Applica\".\n" -"\n" -"In caso contrario, fai clic su \"Cancella\" per abbandonare\n" -"il tuo progetto o \"Indietro\" per continuare la progettazione." - -#: data/glade/template-designer.glade.h:30 -msgid "Design Completed" -msgstr "Progettazione completata" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "Distanza dal bordo sinistro (x0):" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "Distanza dal bordo in alto (y0):" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" - -#: data/glade/template-designer.glade.h:40 -msgid "Label Size (CD/DVD)" -msgstr "Dimensione etichetta (CD/DVD)" - -#: data/glade/template-designer.glade.h:41 -msgid "Label Size (Round)" -msgstr "Dimensioni etichetta" - -#: data/glade/template-designer.glade.h:42 -msgid "Label or Card Shape" -msgstr "Forma dell'etichetta o della scheda" - -#: data/glade/template-designer.glade.h:43 -msgid "Label or Card Size (Rectangular)" -msgstr "" - -#: data/glade/template-designer.glade.h:44 -msgid "Layout #1" -msgstr "Layout #1" - -#: data/glade/template-designer.glade.h:45 -msgid "Layout #2" -msgstr "Layout #2" - -#: data/glade/template-designer.glade.h:46 -msgid "Layout(s)" -msgstr "Layout" - -#: data/glade/template-designer.glade.h:47 -msgid "Name and Description" -msgstr "Nome e descrizione" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "" - -#: data/glade/template-designer.glade.h:50 -msgid "Number of Layouts" -msgstr "Numero di layout" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "Numero di layout:" - -#: data/glade/template-designer.glade.h:52 -msgid "Page Size" -msgstr "Dimensione pagina" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "Parte #:" - -#: data/glade/template-designer.glade.h:55 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "" - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "Per piacere, inserisci le seguenti informazioni." - -#: data/glade/template-designer.glade.h:57 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "" - -#: data/glade/template-designer.glade.h:58 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "" - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "" - -#: data/glade/template-designer.glade.h:61 -msgid "Print test sheet" -msgstr "Stampa foglio di prova" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "Rotonda" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" - -#: data/glade/template-designer.glade.h:68 -msgid "Vertical pitch (dy):" -msgstr "" - -#: data/glade/template-designer.glade.h:69 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" - -#. Other ISO A series sizes -#: data/templates/paper-sizes.xml.h:2 -msgid "A0" -msgstr "A0" - -#: data/templates/paper-sizes.xml.h:3 -msgid "A1" -msgstr "A1" - -#: data/templates/paper-sizes.xml.h:4 -msgid "A10" -msgstr "A10" - -#: data/templates/paper-sizes.xml.h:5 -msgid "A2" -msgstr "A2" - -#: data/templates/paper-sizes.xml.h:6 -msgid "A3" -msgstr "A3" - -#: data/templates/paper-sizes.xml.h:7 -msgid "A4" -msgstr "A4" - -#: data/templates/paper-sizes.xml.h:8 -msgid "A5" -msgstr "A5" - -#: data/templates/paper-sizes.xml.h:9 -msgid "A6" -msgstr "A6" - -#: data/templates/paper-sizes.xml.h:10 -msgid "A7" -msgstr "A7" - -#: data/templates/paper-sizes.xml.h:11 -msgid "A8" -msgstr "A8" - -#: data/templates/paper-sizes.xml.h:12 -msgid "A9" -msgstr "A9" - -#. ISO B series sizes -#: data/templates/paper-sizes.xml.h:14 -msgid "B0" -msgstr "B0" - -#: data/templates/paper-sizes.xml.h:15 -msgid "B1" -msgstr "B1" - -#: data/templates/paper-sizes.xml.h:16 -msgid "B10" -msgstr "B10" - -#: data/templates/paper-sizes.xml.h:17 -msgid "B2" -msgstr "B2" - -#: data/templates/paper-sizes.xml.h:18 -msgid "B3" -msgstr "B3" - -#: data/templates/paper-sizes.xml.h:19 -msgid "B4" -msgstr "B4" - -#: data/templates/paper-sizes.xml.h:20 -msgid "B5" -msgstr "B5" - -#: data/templates/paper-sizes.xml.h:21 -msgid "B6" -msgstr "B6" - -#: data/templates/paper-sizes.xml.h:22 -msgid "B7" -msgstr "B7" - -#: data/templates/paper-sizes.xml.h:23 -msgid "B8" -msgstr "B8" - -#: data/templates/paper-sizes.xml.h:24 -msgid "B9" -msgstr "B9" - -#: data/templates/paper-sizes.xml.h:25 -msgid "US Executive" -msgstr "US Executive" - -#. Other US paper sizes -#: data/templates/paper-sizes.xml.h:27 -msgid "US Legal" -msgstr "US Legale" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:2 -#: data/templates/zweckform-iso-templates.xml.h:2 -msgid "Address Labels" -msgstr "Etichette di indirizzo" - -#. =================================================================== -#. ============================================================ -#. =================================================================== -#. ====================================================== -#: data/templates/avery-us-templates.xml.h:4 -#: data/templates/avery-iso-templates.xml.h:4 -#: data/templates/zweckform-iso-templates.xml.h:6 -#: data/templates/misc-us-templates.xml.h:3 -#: data/templates/misc-iso-templates.xml.h:17 -msgid "Business Cards" -msgstr "Biglietti da visita" - -#: data/templates/avery-us-templates.xml.h:5 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "Etichette CD/DVD (Etichette Dischi)" - -#: data/templates/avery-us-templates.xml.h:6 -msgid "CD/DVD Labels (Spine Labels)" -msgstr "Etichette CD/DVD (Etichette dischi)" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:8 -msgid "Diskette Labels" -msgstr "Etichette per floppy" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:10 -msgid "Filing Labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:12 -msgid "Full Sheet Labels" -msgstr "Pagina piena di etichette" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:14 -msgid "Large Round Labels" -msgstr "Etichetta con bordi arrotondati" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:16 -msgid "Name Badge Labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:18 -msgid "Return Address Labels" -msgstr "Etichette con indirizzo del mittente" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:20 -msgid "Shipping Labels" -msgstr "Etichette di spedizione" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:22 -msgid "Small Round Labels" -msgstr "Etichette piccole con bordi arrotondati" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:24 -msgid "Square Labels" -msgstr "Etichette quadrate" - -#: data/templates/avery-us-templates.xml.h:25 -msgid "Video Tape Face Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:26 -msgid "Video Tape Spine Labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:2 -msgid "Address labels" -msgstr "Etichette per indirizzo" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:6 -msgid "CD Booklet" -msgstr "CD Booklet" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:8 -msgid "CD Inlet" -msgstr "CD Inlet" - -#. =============================================================== -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:10 -#: data/templates/zweckform-iso-templates.xml.h:8 -#: data/templates/misc-us-templates.xml.h:5 -#: data/templates/misc-iso-templates.xml.h:21 -msgid "CD/DVD Labels" -msgstr "Etichette CD/DVD" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:12 -msgid "Diskette labels" -msgstr "" - -#. =============================================================== -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:14 -#: data/templates/zweckform-iso-templates.xml.h:14 -#: data/templates/misc-iso-templates.xml.h:35 -msgid "Mailing Labels" -msgstr "Etichette di spedizione" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:16 -msgid "Mailing labels" -msgstr "" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:18 -msgid "Mini Address Labels" -msgstr "Etichette Mini-indirizzo" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:20 -msgid "Shipping labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:4 -msgid "Allround Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:10 -msgid "Correction and Cover-up Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:12 -msgid "Lever Arch File Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:16 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:18 -msgid "Rectangular Copier Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:20 -#: data/templates/misc-iso-templates.xml.h:44 -msgid "Rectangular Labels" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:22 -msgid "Video Labels (back)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:1 -msgid "Business Card CD" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:4 -msgid "CD Template Rectangles" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:6 -msgid "CD/DVD Labels (Face Only)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:23 -msgid "CD/DVD Labels (face only)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:9 -msgid "Cassette Labels" -msgstr "Etichette per cassette" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:11 -msgid "DLT Labels" -msgstr "Etichette DLT" - -#. =================================================================== -#: data/templates/misc-us-templates.xml.h:13 -msgid "Microtube labels" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Mini-CD Labels" -msgstr "Etichette Mini-CD" - -#: data/templates/misc-us-templates.xml.h:15 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:16 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:17 -#: data/templates/misc-iso-templates.xml.h:42 -msgid "PRO CD Labels 2-up (face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:18 -msgid "Slimline CD Case (rightside up)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:19 -msgid "Slimline CD Case (upside down)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:1 -msgid "Agipa 119488: Business Cards" -msgstr "Agipa 119488: biglietti da visita" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:3 -msgid "Allround Labels --24" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:5 -msgid "Allround Labels --44" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:7 -msgid "Allround Labels --64" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:9 -msgid "Allround Labels --65" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:11 -msgid "Arch File Labels" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Arch File Labels (large)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Arch File Labels (small)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:19 -msgid "CD Labels" -msgstr "Etichette CD" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:25 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:27 -msgid "Diskette Labels (face only)" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:29 -msgid "EPSON Photo Stickers 16" -msgstr "EPSON Photo Stickers 16" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:31 -msgid "Etiketten" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:33 -msgid "Fridge Magnet Stickers" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:37 -msgid "Mailing Labels --14" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:39 -msgid "Mailing Labels-2 columns" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:41 -msgid "Mailing Labels-3 columns" -msgstr "" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:46 -msgid "Video Labels (face only)" -msgstr "Etichette video (solo frontespizio)" - -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "Crea etichette, biglietti da visita e copertine" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "gLabels Designer di etichetta" - -#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "File di progetto di gLabels" - diff --git a/glabels2/po/ja.po b/glabels2/po/ja.po deleted file mode 100644 index 08b6b3d1..00000000 --- a/glabels2/po/ja.po +++ /dev/null @@ -1,2457 +0,0 @@ -# glabels ja.po -# Copyright (C) 2001-2004 Free Software Foundation, Inc. -# Takeshi Aihana , 2001-2004. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 2.0.0\n" -"POT-Creation-Date: 2004-08-15 18:13-0400\n" -"PO-Revision-Date: 2004-08-11 08:44+0900\n" -"Last-Translator: Takeshi AIHANA \n" -"Language-Team: Japanese \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels.c:55 -msgid "Show view debugging messages." -msgstr "表示のデバッグ・メッセージを表示する" - -#: src/glabels.c:58 -msgid "Show item debugging messages." -msgstr "アイテムのデバッグ・メッセージを表示する" - -#: src/glabels.c:61 -msgid "Show printing debugging messages." -msgstr "印刷のデバッグ・メッセージを表示する" - -#: src/glabels.c:64 -msgid "Show prefs debugging messages." -msgstr "設定のデバッグ・メッセージを表示する" - -#: src/glabels.c:67 -msgid "Show file debugging messages." -msgstr "ファイルのデバッグ・メッセージを表示する" - -#: src/glabels.c:70 -msgid "Show document debugging messages." -msgstr "ドキュメントのデバッグ・メッセージを表示する" - -#: src/glabels.c:73 -msgid "Show template debugging messages." -msgstr "テンプレートのデバッグ・メッセージを表示する" - -#: src/glabels.c:76 -msgid "Show paper debugging messages." -msgstr "設定の用紙のデバッグ・メッセージを表示する" - -#: src/glabels.c:79 -msgid "Show xml debugging messages." -msgstr "XML のデバッグ・メッセージを表示する" - -#: src/glabels.c:82 -msgid "Show document merge debugging messages." -msgstr "ドキュメント結合のデバッグ・メッセージを表示する" - -#: src/glabels.c:85 -msgid "Show commands debugging messages." -msgstr "コマンドのデバッグ・メッセージを表示する" - -#: src/glabels.c:88 -msgid "Show undo debugging messages." -msgstr "Undo のデバッグ・メッセージを表示する" - -#: src/glabels.c:91 -msgid "Show recent debugging messages." -msgstr "最近開いたファイルのデバッグ・メッセージを表示する" - -#: src/glabels.c:94 -msgid "Show window debugging messages." -msgstr "ウィンドウのデバッグ・メッセージを表示する" - -#: src/glabels.c:97 -msgid "Show ui debugging messages." -msgstr "GUI のデバッグ・メッセージを表示する" - -#: src/glabels.c:100 -msgid "Show property_bar debugging messages." -msgstr "設定バーのデバッグ・メッセージを表示する" - -#: src/glabels.c:103 -msgid "Show media select widget debugging messages." -msgstr "メディア選択ウィジットのデバッグ・メッセージを表示する" - -#: src/glabels.c:106 -msgid "Show mini preview widget debugging messages." -msgstr "プレビュー・ウィジットのデバッグ・メッセージを表示する" - -#: src/glabels.c:109 -msgid "Show pixbuf cache debugging messages." -msgstr "pixbuf cache のデバッグ・メッセージを表示する" - -#: src/glabels.c:112 -msgid "Show widget debugging messages." -msgstr "ウィジットのデバッグ・メッセージを表示する" - -#: src/glabels.c:115 -msgid "Show object editor debugging messages." -msgstr "オブジェクト・エディタのデバッグメッセージを表示する" - -#: src/glabels.c:118 -msgid "Turn on all debugging messages." -msgstr "全てのデバッグ・メッセージを表示する" - -#: src/glabels.c:187 -msgid "Could not initialize Bonobo!\n" -msgstr "Bonobo を初期化することができませんでした!\n" - -#: src/glabels-batch.c:48 -msgid "print this message" -msgstr "このメッセージを表示する" - -#: src/glabels-batch.c:50 -msgid "print the version of glabels-batch being used" -msgstr "使用している gLabel のバージョンを表示する" - -#: src/glabels-batch.c:52 -msgid "set output filename (default=\"output.ps\")" -msgstr "出力するファイル名を指定する (デフォルト = \"output.ps\")" - -#: src/glabels-batch.c:52 -msgid "filename" -msgstr "ファイル名" - -#: src/glabels-batch.c:54 -msgid "number of sheets (default=1)" -msgstr "用紙の数 (デフォルト = 1)" - -#: src/glabels-batch.c:54 -msgid "sheets" -msgstr "用紙の数" - -#: src/glabels-batch.c:56 -msgid "number of copies (default=1)" -msgstr "コピーの数 (デフォルト = 1)" - -#: src/glabels-batch.c:56 -msgid "copies" -msgstr "コピーの数" - -#: src/glabels-batch.c:58 src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "アウトラインを印刷する (印刷時の配置を確認するため)" - -#: src/glabels-batch.c:60 src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "(画像をミラーするように) 反転して印刷する" - -#: src/glabels-batch.c:96 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[オプション...] ファイル名..." - -#: src/glabels-batch.c:116 -#, c-format -msgid "missing glabels file\n" -msgstr "gLabel で使用するファイルがありません\n" - -#: src/glabels-batch.c:157 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "gLabel で使用するファイル %s が開けません\n" - -#: src/window.c:244 -msgid "(none) - gLabels" -msgstr "(なし) - gLabels" - -#: src/window.c:414 -msgid "(modified)" -msgstr "(変更済み)" - -#: src/stock.c:65 data/ui/glabels-ui.xml.h:165 -msgid "_Select Mode" -msgstr "選択モード(_S)" - -#: src/stock.c:66 data/ui/glabels-ui.xml.h:166 -msgid "_Text" -msgstr "文字(_T)" - -#: src/stock.c:67 data/ui/glabels-ui.xml.h:151 -msgid "_Line" -msgstr "直線(_L)" - -#: src/stock.c:68 data/ui/glabels-ui.xml.h:133 -msgid "_Box" -msgstr "矩形(_B)" - -#: src/stock.c:69 data/ui/glabels-ui.xml.h:144 -msgid "_Ellipse" -msgstr "楕円(_E)" - -#: src/stock.c:70 data/ui/glabels-ui.xml.h:149 -msgid "_Image" -msgstr "画像(_I)" - -#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 -msgid "Bar_code" -msgstr "バーコード(_C)" - -#: src/stock.c:72 -msgid "_Merge Properties" -msgstr "結合プロパティ(_M)" - -#: src/stock.c:73 -msgid "Object _Properties" -msgstr "オブジェクトのプロパティ(_P)" - -#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 -msgid "Bring to _Front" -msgstr "前に持ってくる(_F)" - -#: src/stock.c:75 data/ui/glabels-ui.xml.h:110 -msgid "Send to _Back" -msgstr "後ろにまわす(_B)" - -#: src/stock.c:76 data/ui/glabels-ui.xml.h:97 -msgid "Rotate _Left" -msgstr "左に回転(_L)" - -#: src/stock.c:77 data/ui/glabels-ui.xml.h:98 -msgid "Rotate _Right" -msgstr "右に回転(_R)" - -#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "水平方向にフリップ(_H)" - -#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "垂直方向にフリップ(_V)" - -#: src/stock.c:80 data/ui/glabels-ui.xml.h:150 -msgid "_Lefts" -msgstr "左端(_L)" - -#: src/stock.c:81 data/ui/glabels-ui.xml.h:162 -msgid "_Rights" -msgstr "右端(_R)" - -#: src/stock.c:82 data/ui/glabels-ui.xml.h:134 -msgid "_Centers" -msgstr "中央(_C)" - -#: src/stock.c:83 data/ui/glabels-ui.xml.h:167 -msgid "_Tops" -msgstr "上端(_T)" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "下部" - -#: src/stock.c:85 -msgid "Centers" -msgstr "中央" - -#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "ラベルの中心(_N)" - -#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "色で塗りつぶします" - -#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "線の色を選択します" - -#: src/stock.c:90 src/stock.c:92 -msgid "Linked" -msgstr "結合済" - -#: src/stock.c:91 src/stock.c:93 -msgid "Not Linked" -msgstr "結合なし" - -#: src/ui-property-bar.c:345 src/object-editor.c:499 -msgid "Default" -msgstr "デフォルト" - -#: src/ui-property-bar.c:360 src/object-editor.c:512 -msgid "No fill" -msgstr "塗りつぶさない" - -#: src/ui-property-bar.c:375 src/object-editor.c:505 -msgid "No line" -msgstr "線を消す" - -#: src/ui-sidebar.c:180 -msgid "Object properties" -msgstr "オブジェクトのプロパティ" - -#: src/commands.c:385 -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/commands.c:399 -msgid "See the file AUTHORS for additional credits," -msgstr "補足のクレジットについては AUTHORS ファイルをご覧になるか、" - -#: src/commands.c:400 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "または http://glabels.sourceforge.net/ を訪れてみて下さい。" - -#: src/commands.c:409 -msgid " " -msgstr " " - -#: src/commands.c:424 -msgid "glabels" -msgstr "gLabels" - -#: src/file.c:100 -msgid "New Label or Card" -msgstr "新規ラベルまたはカード" - -#: src/file.c:132 src/file.c:304 -msgid "Media Type" -msgstr "メディアの種類" - -#: src/file.c:138 src/file.c:310 -msgid "Label orientation" -msgstr "ラベルの向き" - -#: src/file.c:269 -msgid "Label properties" -msgstr "ラベルのプロパティ" - -#: src/file.c:452 src/file.c:870 -msgid "All files" -msgstr "全てのファイル" - -#: src/file.c:457 src/file.c:875 -msgid "gLabels documents" -msgstr "gLabels のドキュメント" - -#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 -msgid "Empty file name selection" -msgstr "ファイル名の入力欄が空です" - -#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 -msgid "Please select a file or supply a valid file name" -msgstr "既存のファイルを選択するか、または正しいファイル名を指定して下さい。" - -#: src/file.c:519 src/file.c:631 -msgid "File does not exist" -msgstr "ファイルがありません。" - -#: src/file.c:563 data/ui/glabels-ui.xml.h:75 -msgid "Open" -msgstr "開く" - -#: src/file.c:565 -msgid "Open label" -msgstr "ラベルを開きます" - -#: src/file.c:707 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "ファイル \"%s\" が開けませんでした" - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "サポートしていないファイル形式です。" - -#: src/file.c:797 src/file.c:979 src/file.c:1174 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "ファイル \"%s\" を保存できませんでした" - -#: src/file.c:805 src/file.c:987 src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "データ保存中にエラーが発生しました。データはまだ保存されていません。" - -#: src/file.c:848 src/file.c:1048 -#, c-format -msgid "Save \"%s\" as" -msgstr "\"%s\" に名前を付けて保存" - -#: src/file.c:935 src/file.c:1131 -msgid "Please supply a valid file name" -msgstr "正しいファイル名を指定して下さい" - -#: src/file.c:952 src/file.c:1147 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "ファイル \"%s\" に上書きしますか?" - -#: src/file.c:960 src/file.c:1155 -msgid "File already exists." -msgstr "ファイルが既に存在します。" - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "終了する前にドキュメント \"%s\" に対する変更を保存しますか?" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "保存しないと変更したデータを失うことになります。" - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "保存せずに閉じる" - -#. Should not happen -#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 -#: data/glade/object-editor.glade.h:37 -msgid "points" -msgstr "ポイント" - -#: src/prefs.c:158 data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "[インチ]" - -#: src/prefs.c:160 -msgid "mm" -msgstr "[ミリ]" - -#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 -msgid "gLabels Preferences" -msgstr "gLabels の設定" - -#. -#. * Submenu: Order -#. -#: src/view.c:3570 data/ui/glabels-ui.xml.h:157 -msgid "_Order" -msgstr "順序(_O)" - -#. -#. * Submenu: Rotate/Flip -#. -#: src/view.c:3591 data/ui/glabels-ui.xml.h:163 -msgid "_Rotate/Flip" -msgstr "回転/フリップ(_R)" - -#. -#. * Submenu: Align Horizontally -#. -#: src/view.c:3624 -msgid "Align _Horizontally" -msgstr "水平方向に配置(_H)" - -#. -#. * Submenu: Align Vertically -#. -#: src/view.c:3663 -msgid "Align _Vertically" -msgstr "垂直方向に配置(_V)" - -#: src/view.c:3724 data/ui/glabels-ui.xml.h:140 -msgid "_Delete" -msgstr "削除(_D)" - -#. Build editor. -#: src/view-box.c:223 -msgid "Box object properties" -msgstr "矩形オブジェクトのプロパティ" - -#. Build editor. -#: src/view-ellipse.c:223 -msgid "Ellipse object properties" -msgstr "楕円オブジェクトのプロパティ" - -#. Build editor. -#: src/view-line.c:223 -msgid "Line object properties" -msgstr "直線オブジェクトのプロパティ" - -#. Build editor. -#: src/view-image.c:222 -msgid "Image object properties" -msgstr "画像オブジェクトのプロパティ" - -#. Build editor. -#: src/view-text.c:250 -msgid "Text object properties" -msgstr "文字オブジェクトのプロパティ" - -#: src/view-text.c:562 data/glade/object-editor.glade.h:28 -msgid "Text" -msgstr "文字" - -#. Build editor. -#: src/view-barcode.c:209 -msgid "Barcode object properties" -msgstr "バーコード・オブジェクトのプロパティ" - -#: src/view-barcode.c:579 src/print.c:1088 -msgid "Invalid barcode data" -msgstr "おかしなバーコード・データ" - -#: src/merge-properties-dialog.c:231 -msgid "Merge Properties" -msgstr "結合プロパティ" - -#. ---- Source section ---- -#: src/merge-properties-dialog.c:237 -msgid "Source" -msgstr "ソース" - -#: src/merge-properties-dialog.c:245 -msgid "Format:" -msgstr "書式:" - -#. Location line -#: src/merge-properties-dialog.c:273 -msgid "Location:" -msgstr "場所:" - -#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 -msgid "Select merge-database source" -msgstr "結合データベース・ソースの選択" - -#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 -msgid "N/A" -msgstr "N/A" - -#. ---- Sample Fields section ---- -#: src/merge-properties-dialog.c:300 -msgid "Record selection/preview:" -msgstr "選択範囲/プレビューの記録:" - -#: src/merge-properties-dialog.c:326 -msgid "Select" -msgstr "選択" - -#: src/merge-properties-dialog.c:334 -msgid "Record/Field" -msgstr "レコード/フィールド" - -#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 -msgid "Data" -msgstr "データ" - -#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:82 -msgid "Print" -msgstr "印刷" - -#: src/print-dialog.c:281 -msgid "_Job" -msgstr "ジョブ(_J)" - -#: src/print-dialog.c:286 -msgid "P_rinter" -msgstr "プリンタ(_R)" - -#. ----------- Add simple-copies widget ------------ -#: src/print-dialog.c:314 -msgid "Copies" -msgstr "コピー" - -#. ------- Add merge control widget ------------ -#: src/print-dialog.c:322 -msgid "Document merge control" -msgstr "ドキュメントをコントロールにマージする" - -#. ----------- Add custom print options area ------------ -#: src/print-dialog.c:330 -msgid "Options" -msgstr "オプション" - -#: src/print-dialog.c:351 -msgid "print crop marks" -msgstr "端のマークを揃えて印刷する" - -#: src/print-dialog.c:553 src/print-dialog.c:592 -msgid "Print preview" -msgstr "印刷プレビュー" - -#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 -msgid "gLabels Template Designer" -msgstr "gLabels テンプレート・デザイナ" - -#: src/bc.c:60 -msgid "POSTNET (any)" -msgstr "POSTNET (何でも)" - -#: src/bc.c:63 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (ZIP のみ)" - -#: src/bc.c:66 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (ZIP+4)" - -#: src/bc.c:69 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: src/bc.c:72 -msgid "EAN (any)" -msgstr "EAN (何でも)" - -#: src/bc.c:75 -msgid "EAN-8" -msgstr "EAN-8" - -#: src/bc.c:78 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: src/bc.c:81 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: src/bc.c:84 -msgid "EAN-13" -msgstr "EAN-13" - -#: src/bc.c:87 -msgid "EAN-13 +2" -msgstr "EAN-13 +2" - -#: src/bc.c:90 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: src/bc.c:93 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A または UPC-E)" - -#: src/bc.c:96 -msgid "UPC-A" -msgstr "UPC-A" - -#: src/bc.c:99 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: src/bc.c:102 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: src/bc.c:105 -msgid "UPC-E" -msgstr "UPC-E" - -#: src/bc.c:108 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: src/bc.c:111 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: src/bc.c:114 -msgid "ISBN" -msgstr "ISBN" - -#: src/bc.c:117 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: src/bc.c:120 -msgid "Code 39" -msgstr "Code 39" - -#: src/bc.c:123 -msgid "Code 128" -msgstr "Code 128" - -#: src/bc.c:126 -msgid "Code 128C" -msgstr "Code 128C" - -#: src/bc.c:129 -msgid "Code 128B" -msgstr "Code 128B" - -#: src/bc.c:132 -msgid "Interleaved 2 of 5" -msgstr "綴じ込み 2/5" - -#: src/bc.c:135 -msgid "Codabar" -msgstr "Codabar" - -#: src/bc.c:138 -msgid "MSI" -msgstr "MSI" - -#: src/bc.c:141 -msgid "Plessey" -msgstr "Plessey" - -#: src/label.c:569 -msgid "Untitled" -msgstr "タイトルなし" - -#: src/xml-label.c:176 src/xml-label.c:213 -msgid "xmlParseFile error" -msgstr "xmlParseFile エラー" - -#: src/xml-label.c:250 -msgid "No document root" -msgstr "root ドキュメントではありません" - -#: src/xml-label.c:264 -msgid "Importing from glabels 0.1 format" -msgstr "gLabels 0.1 形式からインポートする" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "gLabels 0.4 形式からインポートする" - -#: src/xml-label.c:279 -msgid "Importing from glabels 1.91 format" -msgstr "gLabels 1.91 形式からインポートする" - -#: src/xml-label.c:282 -msgid "bad document, unknown glabels Namespace" -msgstr "ドキュメントの種類が間違っています。Glabels 名前空間が見つかりません。" - -#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "おかしな root のノード = \"%s\"" - -#: src/xml-label.c:348 src/xml-label-191.c:165 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "Document ノードにおかしな root のノード = \"%s\"" - -#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "おかしなノード = \"%s\"" - -#: src/xml-label.c:796 src/xml-label-191.c:605 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "Data ノードにおかしなノード = \"%s\"" - -#: src/xml-label.c:962 libglabels/xml-template.c:535 -msgid "Utf8 conversion error." -msgstr "Utf8 変換エラーです。" - -#: src/xml-label.c:969 libglabels/xml-template.c:542 -msgid "Problem saving xml file." -msgstr "XML ファイルの保存で問題があります" - -#. This should always be an id, but just in case a name -#. slips by! -#: src/xml-label-191.c:680 libglabels/xml-template.c:199 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "不明なページ・サイズの ID \"%s\" です。名前として扱います。" - -#: src/xml-label-191.c:690 libglabels/xml-template.c:209 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "不明なページ・サイズの ID または名前 \"%s\" です。" - -#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 -msgid "None" -msgstr "なし" - -#: src/merge-init.c:53 -msgid "Text file with comma delimeters (CSV)" -msgstr "コンマで区切ったテキスト・ファイル (CSV)" - -#: src/merge-init.c:60 -msgid "Text file with colon delimeters" -msgstr "コロンで区切ったテキスト・ファイル" - -#: src/merge-init.c:67 -msgid "Text file with tab delimeters" -msgstr "タブで区切ったテキスト・ファイル" - -#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 -msgid "File:" -msgstr "ファイル:" - -#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 -msgid "Key:" -msgstr "キー:" - -#: src/wdgt-print-copies.c:179 -msgid "Sheets:" -msgstr "用紙:" - -#: src/wdgt-print-copies.c:197 -msgid "Labels" -msgstr "ラベル" - -#: src/wdgt-print-copies.c:200 -msgid "from:" -msgstr "開始:" - -#: src/wdgt-print-copies.c:207 -msgid "to:" -msgstr "終了:" - -#: src/wdgt-print-merge.c:178 -msgid "Start on label" -msgstr "ラベルの開始" - -#: src/wdgt-print-merge.c:186 -msgid "on 1st sheet" -msgstr "(最初のシート)" - -#: src/wdgt-print-merge.c:195 -msgid "Copies:" -msgstr "コピー:" - -#: src/wdgt-print-merge.c:201 -msgid "Collate" -msgstr "製本" - -#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 -msgid "Description:" -msgstr "説明:" - -#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 -msgid "Page size:" -msgstr "用紙のサイズ:" - -#: src/wdgt-media-select.c:290 -msgid "Label size:" -msgstr "ラベルのサイズ:" - -#: src/wdgt-media-select.c:301 -msgid "Layout:" -msgstr "レイアウト:" - -#: src/wdgt-media-select.c:578 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d 個/シート)" - -#: src/wdgt-media-select.c:582 -#, c-format -msgid "%d per sheet" -msgstr "%d /シート" - -#: src/wdgt-media-select.c:614 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/wdgt-media-select.c:619 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s 倍率" - -#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s 倍率" - -#: src/wdgt-rotate-label.c:193 -msgid "Rotate" -msgstr "回転させる" - -#. This is the default custom color -#: src/mygal/color-palette.c:396 -msgid "custom" -msgstr "カスタム" - -#. "Custom" color - we'll pop up a GnomeColorPicker -#: src/mygal/color-palette.c:438 -msgid "Custom Color:" -msgstr "カスタム色:" - -#: src/mygal/color-palette.c:446 -msgid "Choose Custom Color" -msgstr "カスタム・カラーの選択" - -#: src/mygal/color-palette.c:579 -msgid "black" -msgstr "黒" - -#: src/mygal/color-palette.c:580 -msgid "light brown" -msgstr "淡い茶" - -#: src/mygal/color-palette.c:581 -msgid "brown gold" -msgstr "茶銀" - -#: src/mygal/color-palette.c:582 -msgid "dark green #2" -msgstr "暗い緑 #2" - -#: src/mygal/color-palette.c:583 -msgid "navy" -msgstr "ネービー" - -#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 -msgid "dark blue" -msgstr "暗い青" - -#: src/mygal/color-palette.c:585 -msgid "purple #2" -msgstr "ç´« #2" - -#: src/mygal/color-palette.c:586 -msgid "very dark gray" -msgstr "とても暗い灰" - -#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 -msgid "dark red" -msgstr "暗い赤" - -#: src/mygal/color-palette.c:590 -msgid "red-orange" -msgstr "赤みの橙" - -#: src/mygal/color-palette.c:591 -msgid "gold" -msgstr "金" - -#: src/mygal/color-palette.c:592 -msgid "dark green" -msgstr "暗い緑" - -#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 -msgid "dull blue" -msgstr "くすんだ青" - -#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 -msgid "blue" -msgstr "青" - -#: src/mygal/color-palette.c:595 -msgid "dull purple" -msgstr "くすんだ紫" - -#: src/mygal/color-palette.c:596 -msgid "dark grey" -msgstr "暗い灰" - -#: src/mygal/color-palette.c:599 -msgid "red" -msgstr "赤" - -#: src/mygal/color-palette.c:600 -msgid "orange" -msgstr "橙" - -#: src/mygal/color-palette.c:601 -msgid "lime" -msgstr "ライム" - -#: src/mygal/color-palette.c:602 -msgid "dull green" -msgstr "くすんだ緑" - -#: src/mygal/color-palette.c:603 -msgid "dull blue #2" -msgstr "くすんだ青 #2" - -#: src/mygal/color-palette.c:604 -msgid "sky blue #2" -msgstr "スカイブルー #2" - -#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 -msgid "purple" -msgstr "ç´«" - -#: src/mygal/color-palette.c:606 -msgid "gray" -msgstr "灰" - -#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 -msgid "magenta" -msgstr "マゼンタ" - -#: src/mygal/color-palette.c:610 -msgid "bright orange" -msgstr "明るい橙" - -#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 -msgid "yellow" -msgstr "黄" - -#: src/mygal/color-palette.c:612 -msgid "green" -msgstr "緑" - -#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 -msgid "cyan" -msgstr "シアン" - -#: src/mygal/color-palette.c:614 -msgid "bright blue" -msgstr "明るい青" - -#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 -msgid "red purple" -msgstr "赤紫" - -#: src/mygal/color-palette.c:616 -msgid "light grey" -msgstr "淡い灰" - -#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 -msgid "pink" -msgstr "ピンク" - -#: src/mygal/color-palette.c:620 -msgid "light orange" -msgstr "淡い橙" - -#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 -msgid "light yellow" -msgstr "淡い黄" - -#: src/mygal/color-palette.c:622 -msgid "light green" -msgstr "淡い緑" - -#: src/mygal/color-palette.c:623 -msgid "light cyan" -msgstr "淡いシアン" - -#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 -msgid "light blue" -msgstr "淡い青" - -#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 -msgid "light purple" -msgstr "淡い紫" - -#: src/mygal/color-palette.c:626 -msgid "white" -msgstr "白" - -#: src/mygal/color-palette.c:631 -msgid "purplish blue" -msgstr "紫みの青" - -#: src/mygal/color-palette.c:635 -msgid "dark purple" -msgstr "暗い紫" - -#: src/mygal/color-palette.c:637 -msgid "sky blue" -msgstr "スカイブルー" - -#: libglabels/template.c:848 -#, c-format -msgid "Generic %s full page" -msgstr "Generic %s フル・ページ" - -#: libglabels/template.c:897 -msgid "No template files found!" -msgstr "テンプレート・ファイルが見つかりません!" - -#. Create and append an "Other" entry. -#: libglabels/paper.c:67 -msgid "Other" -msgstr "その他" - -#: libglabels/paper.c:361 -msgid "No paper files found!" -msgstr "用紙ふぃあるが見つかりません!" - -#: data/ui/glabels-ui.xml.h:1 -msgid "About glabels" -msgstr "gLabels について" - -#: data/ui/glabels-ui.xml.h:2 -msgid "About..." -msgstr "情報..." - -#: data/ui/glabels-ui.xml.h:3 -msgid "Align _Horizontal" -msgstr "水平方向に配置(_H)" - -#: data/ui/glabels-ui.xml.h:4 -msgid "Align _Vertical" -msgstr "垂直方向に配置(_V)" - -#: data/ui/glabels-ui.xml.h:5 -msgid "Align objects to bottoms" -msgstr "オブジェクトを下端に配置します" - -#: data/ui/glabels-ui.xml.h:6 -msgid "Align objects to horizontal centers" -msgstr "オブジェクトを水平方向の中心に配置します" - -#: data/ui/glabels-ui.xml.h:7 -msgid "Align objects to left edges" -msgstr "オブジェクトを左端に配置します" - -#: data/ui/glabels-ui.xml.h:8 -msgid "Align objects to right edges" -msgstr "オブジェクトを右端に配置します" - -#: data/ui/glabels-ui.xml.h:9 -msgid "Align objects to tops" -msgstr "オブジェクトを上端に配置します" - -#: data/ui/glabels-ui.xml.h:10 -msgid "Align objects to vertical centers" -msgstr "オブジェクトを垂直方向の中心に配置します" - -#: data/ui/glabels-ui.xml.h:12 -msgid "Bold" -msgstr "文字を太字にします" - -#: data/ui/glabels-ui.xml.h:14 -msgid "Center align" -msgstr "中央に揃えます" - -#: data/ui/glabels-ui.xml.h:15 -msgid "Center objects to horizontal label center" -msgstr "オブジェクトをラベルの中心に水平移動します" - -#: data/ui/glabels-ui.xml.h:16 -msgid "Center objects to vertical label center" -msgstr "オブジェクトをラベルの中心に垂直移動します" - -#: data/ui/glabels-ui.xml.h:17 -msgid "Change the visibility of markup lines in the current window" -msgstr "ラベルの外枠線の表示/非表示を変更します" - -#: data/ui/glabels-ui.xml.h:18 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "ツールバーの表示/非表示を変更します" - -#: data/ui/glabels-ui.xml.h:19 -msgid "Change the visibility of the grid in the current window" -msgstr "ラベルのグリッド (格子線) の表示/非表示を変更します" - -#: data/ui/glabels-ui.xml.h:20 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "メイン・ツールバーの表示/非表示を変更します" - -#: data/ui/glabels-ui.xml.h:21 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "プロパティ・ツールバーの表示/非表示を変更します" - -#: data/ui/glabels-ui.xml.h:22 -msgid "Close" -msgstr "閉じる" - -#: data/ui/glabels-ui.xml.h:23 -msgid "Close the current file" -msgstr "このファイルを閉じます" - -#: data/ui/glabels-ui.xml.h:24 -msgid "Configure the application" -msgstr "gLabel の設定を変更します" - -#: data/ui/glabels-ui.xml.h:25 -msgid "Contents" -msgstr "目次" - -#: data/ui/glabels-ui.xml.h:26 -msgid "Copy" -msgstr "コピー" - -#: data/ui/glabels-ui.xml.h:27 -msgid "Copy the selection" -msgstr "選択範囲をコピーします" - -#: data/ui/glabels-ui.xml.h:28 -msgid "Create a custom template" -msgstr "カスタム・テンプレートを生成します" - -#: data/ui/glabels-ui.xml.h:29 -msgid "Create a new document" -msgstr "新しいドキュメントを作成します" - -#: data/ui/glabels-ui.xml.h:30 -msgid "Create barcode object" -msgstr "バーコード・オブジェクトを作成します" - -#: data/ui/glabels-ui.xml.h:31 -msgid "Create box/rectangle object" -msgstr "四角/三角のオブジェクトを作成します" - -#: data/ui/glabels-ui.xml.h:32 -msgid "Create ellipse/circle object" -msgstr "楕円/円オブジェクトを作成します" - -#: data/ui/glabels-ui.xml.h:33 -msgid "Create image object" -msgstr "画像オブジェクトを作成します" - -#: data/ui/glabels-ui.xml.h:34 -msgid "Create line object" -msgstr "直線オブジェクトを作成します" - -#: data/ui/glabels-ui.xml.h:35 -msgid "Create text object" -msgstr "文字オブジェクトを作成します" - -#: data/ui/glabels-ui.xml.h:36 -msgid "Cu_t" -msgstr "切り取り(_T)" - -#: data/ui/glabels-ui.xml.h:37 -msgid "Customize" -msgstr "カスタマイズ" - -#: data/ui/glabels-ui.xml.h:38 -msgid "Customize Drawing Toolbar" -msgstr "ツールバー" - -#: data/ui/glabels-ui.xml.h:39 -msgid "Customize Main Toolbar" -msgstr "メイン・ツールバー" - -#: data/ui/glabels-ui.xml.h:40 -msgid "Customize Property Toolbar" -msgstr "プロパティ・ツールバー" - -#: data/ui/glabels-ui.xml.h:41 -msgid "Customize toolbars" -msgstr "ツールバーのカスタマイズ" - -#: data/ui/glabels-ui.xml.h:42 -msgid "Cut" -msgstr "切り取り" - -#: data/ui/glabels-ui.xml.h:43 -msgid "Cut the selection" -msgstr "選択範囲を切り取ります" - -#: data/ui/glabels-ui.xml.h:44 -msgid "Decrease magnification" -msgstr "拡大率を下げます" - -#: data/ui/glabels-ui.xml.h:45 -msgid "Delete" -msgstr "削除" - -#: data/ui/glabels-ui.xml.h:46 -msgid "Delete the selected objects" -msgstr "選択したオブジェクトを削除します" - -#: data/ui/glabels-ui.xml.h:47 -msgid "Drawing toolbar" -msgstr "ツールバーの表示方法" - -#: data/ui/glabels-ui.xml.h:48 -msgid "Dump XML" -msgstr "XML のダンプ" - -#: data/ui/glabels-ui.xml.h:49 -msgid "Dump the UI Xml description" -msgstr "GUI の XML 記述をダンプ表示します" - -#: data/ui/glabels-ui.xml.h:50 -msgid "Edit merge properties" -msgstr "結合プロパティを編集します" - -#: data/ui/glabels-ui.xml.h:54 -msgid "Flip object horizontally" -msgstr "オブジェクトを水平方向にひっくり返します" - -#: data/ui/glabels-ui.xml.h:55 -msgid "Flip object vertically" -msgstr "オブジェクトを垂直方向にひっくり返します" - -#: data/ui/glabels-ui.xml.h:56 -msgid "Font name" -msgstr "フォント名です" - -#: data/ui/glabels-ui.xml.h:57 -msgid "Font selector" -msgstr "フォント・セレクタ" - -#: data/ui/glabels-ui.xml.h:58 -msgid "Font size" -msgstr "フォント・サイズです" - -#: data/ui/glabels-ui.xml.h:59 -msgid "Icon and _Text" -msgstr "アイコンとラベル(_T)" - -#: data/ui/glabels-ui.xml.h:60 -msgid "Increase magnification" -msgstr "拡大率を上げます" - -#: data/ui/glabels-ui.xml.h:61 -msgid "Italic" -msgstr "文字を斜体にします" - -#: data/ui/glabels-ui.xml.h:63 -msgid "Left align" -msgstr "左に寄せませす" - -#: data/ui/glabels-ui.xml.h:65 -msgid "Line width" -msgstr "線の幅を選択します" - -#: data/ui/glabels-ui.xml.h:66 -msgid "Lower object to bottom" -msgstr "オブジェクトを後ろに回します" - -#: data/ui/glabels-ui.xml.h:67 -msgid "M_arkup" -msgstr "マークアップ(_A)" - -#: data/ui/glabels-ui.xml.h:68 -msgid "Main toolbar" -msgstr "メイン・ツールバー" - -#: data/ui/glabels-ui.xml.h:69 -msgid "Markup" -msgstr "マークアップ" - -#: data/ui/glabels-ui.xml.h:70 -msgid "Modify document properties" -msgstr "ドキュメントのプロパティを修正します" - -#: data/ui/glabels-ui.xml.h:71 -msgid "New" -msgstr "新規" - -#: data/ui/glabels-ui.xml.h:72 -msgid "Object property editor" -msgstr "オブジェクト・プロパティのエディタ" - -#: data/ui/glabels-ui.xml.h:73 -msgid "Only show icons in the drawing toolbar" -msgstr "ツールバーの中にアイコンのみ表示します" - -#: data/ui/glabels-ui.xml.h:74 -msgid "Only show icons in the main toolbar" -msgstr "メイン・ツールバーの中にアイコンのみ表示します" - -#: data/ui/glabels-ui.xml.h:76 -msgid "Open a file" -msgstr "ファイルを開きます" - -#: data/ui/glabels-ui.xml.h:77 -msgid "Open the glabels manual" -msgstr "gLabeles のマニュアルを開きます" - -#: data/ui/glabels-ui.xml.h:78 -msgid "Paste" -msgstr "貼り付け" - -#: data/ui/glabels-ui.xml.h:79 -msgid "Paste the clipboard" -msgstr "クリップボードの内容を貼り付けます" - -#: data/ui/glabels-ui.xml.h:80 -msgid "Pr_eferences..." -msgstr "設定(_E)..." - -#: data/ui/glabels-ui.xml.h:81 -msgid "Preferences" -msgstr "gLabel の設定" - -#: data/ui/glabels-ui.xml.h:83 -msgid "Print the current file" -msgstr "このファイルを印刷します" - -#: data/ui/glabels-ui.xml.h:84 -msgid "Proper_ties..." -msgstr "プロパティ(_T)..." - -#: data/ui/glabels-ui.xml.h:85 -msgid "Properties" -msgstr "プロパティ" - -#: data/ui/glabels-ui.xml.h:86 -msgid "Property toolbar" -msgstr "プロパティのツールバー" - -#: data/ui/glabels-ui.xml.h:87 -msgid "Quit" -msgstr "終了" - -#: data/ui/glabels-ui.xml.h:88 -msgid "Quit the program" -msgstr "gLabels を終了します" - -#: data/ui/glabels-ui.xml.h:89 -msgid "Raise object to top" -msgstr "オブジェクトを前に持ってきます" - -#: data/ui/glabels-ui.xml.h:90 -msgid "Recent _Files" -msgstr "最近開いたファイル(_F)" - -#: data/ui/glabels-ui.xml.h:91 -msgid "Redo" -msgstr "やり直し" - -#: data/ui/glabels-ui.xml.h:92 -msgid "Redo the undone action" -msgstr "完了していない操作をやり直します" - -#: data/ui/glabels-ui.xml.h:93 -msgid "Remove all selections" -msgstr "選択範囲を解除します" - -#: data/ui/glabels-ui.xml.h:95 -#, no-c-format -msgid "Restore scale to 100%" -msgstr "拡大率を 100% に戻します" - -#: data/ui/glabels-ui.xml.h:96 -msgid "Right align" -msgstr "右に寄せます" - -#: data/ui/glabels-ui.xml.h:99 -msgid "Rotate object 90 clockwise" -msgstr "オブジェクトを時計回りに 90°回転させます" - -#: data/ui/glabels-ui.xml.h:100 -msgid "Rotate object 90 counter-clockwise" -msgstr "オブジェクトを反時計回りに 90°回転させます" - -#: data/ui/glabels-ui.xml.h:101 -msgid "Save" -msgstr "保存" - -#: data/ui/glabels-ui.xml.h:102 -msgid "Save As" -msgstr "名前を付けて保存" - -#: data/ui/glabels-ui.xml.h:103 -msgid "Save _As..." -msgstr "別名で保存(_A)..." - -#: data/ui/glabels-ui.xml.h:104 -msgid "Save the current file" -msgstr "このファイルを保存します" - -#: data/ui/glabels-ui.xml.h:105 -msgid "Save the current file with a different name" -msgstr "このデータに別の名前を付けて保存します" - -#: data/ui/glabels-ui.xml.h:106 -msgid "Select All" -msgstr "全て選択" - -#: data/ui/glabels-ui.xml.h:107 -msgid "Select _All" -msgstr "全て選択(_A)" - -#: data/ui/glabels-ui.xml.h:108 -msgid "Select all objects" -msgstr "全てのオブジェクトを選択します" - -#: data/ui/glabels-ui.xml.h:109 -msgid "Select, move and modify objects" -msgstr "オブジェクトの選択、移動、編集を行います" - -#: data/ui/glabels-ui.xml.h:111 -msgid "Set drawing toolbar button style according to desktop default" -msgstr "デスクトップの設定に従ってツールバーを表示します" - -#: data/ui/glabels-ui.xml.h:112 -msgid "Set main toolbar button style according to desktop default" -msgstr "デスクトップの設定に従ってメイン・ツールバーを表示します" - -#: data/ui/glabels-ui.xml.h:113 -msgid "Show _Tooltips" -msgstr "ツールチップの表示(_T)" - -#: data/ui/glabels-ui.xml.h:114 -msgid "Show both icons and texts in the drawing toolbar" -msgstr "ツールバーにアイコンとラベルの両方を表示します" - -#: data/ui/glabels-ui.xml.h:115 -msgid "Show both icons and texts in the main toolbar" -msgstr "メイン・ツールバーにアイコンとラベルの両方を表示します" - -#: data/ui/glabels-ui.xml.h:116 -msgid "Show tooltips in the drawing toolbar" -msgstr "ツールバーにツールチップを表示します" - -#: data/ui/glabels-ui.xml.h:117 -msgid "Show tooltips in the main toolbar" -msgstr "メイン・ツールバーにツールチップを表示します" - -#: data/ui/glabels-ui.xml.h:118 -msgid "Show tooltips in the property toolbar" -msgstr "プロパティ・ツールバーにツールチップを表示します" - -#: data/ui/glabels-ui.xml.h:119 -msgid "Template Designer" -msgstr "テンプレート・デザイナ" - -#: data/ui/glabels-ui.xml.h:120 -msgid "Template _Designer..." -msgstr "テンプレート・デザイナ(_D)..." - -#: data/ui/glabels-ui.xml.h:121 -msgid "Text color" -msgstr "文字の色を選択します" - -#: data/ui/glabels-ui.xml.h:122 -msgid "U_n-select All" -msgstr "全て選択解除(_N)" - -#: data/ui/glabels-ui.xml.h:123 -msgid "Un-select All" -msgstr "全て選択解除" - -#: data/ui/glabels-ui.xml.h:124 -msgid "Undo" -msgstr "元に戻す" - -#: data/ui/glabels-ui.xml.h:125 -msgid "Undo the last action" -msgstr "最後の操作を取り消します" - -#: data/ui/glabels-ui.xml.h:126 -msgid "Zoom _1:1" -msgstr "拡大率 1:1(_1)" - -#: data/ui/glabels-ui.xml.h:127 -msgid "Zoom _In" -msgstr "拡大(_I)" - -#: data/ui/glabels-ui.xml.h:128 -msgid "Zoom _Out" -msgstr "縮小(_O)" - -#: data/ui/glabels-ui.xml.h:129 -msgid "Zoom to _fit" -msgstr "ウィンドウにあわせる(_F)" - -#: data/ui/glabels-ui.xml.h:130 -msgid "Zoom to fit window" -msgstr "ウィンドウのサイズに合わせます" - -#: data/ui/glabels-ui.xml.h:131 -msgid "_About..." -msgstr "情報(_A)..." - -#: data/ui/glabels-ui.xml.h:132 -msgid "_Bottoms" -msgstr "下部(_B)" - -#: data/ui/glabels-ui.xml.h:135 -msgid "_Close" -msgstr "閉じる(_C)" - -#: data/ui/glabels-ui.xml.h:136 -msgid "_Contents" -msgstr "目次(_C)" - -#: data/ui/glabels-ui.xml.h:137 -msgid "_Copy" -msgstr "複写(_C)" - -#: data/ui/glabels-ui.xml.h:138 -msgid "_Create Object" -msgstr "オブジェクトの生成(_C)" - -#: data/ui/glabels-ui.xml.h:139 -msgid "_Debug" -msgstr "デバッグ(_D)" - -#: data/ui/glabels-ui.xml.h:141 -msgid "_Desktop Default" -msgstr "デスクトップ設定(_D)" - -#: data/ui/glabels-ui.xml.h:142 -msgid "_Drawing Toolbar" -msgstr "ツールバー(_D)" - -#: data/ui/glabels-ui.xml.h:143 -msgid "_Edit" -msgstr "編集(_E)" - -#: data/ui/glabels-ui.xml.h:145 -msgid "_File" -msgstr "ファイル(_F)" - -#: data/ui/glabels-ui.xml.h:146 -msgid "_Grid" -msgstr "グリッド(_G)" - -#: data/ui/glabels-ui.xml.h:147 -msgid "_Help" -msgstr "ヘルプ(_H)" - -#: data/ui/glabels-ui.xml.h:148 -msgid "_Icon" -msgstr "アイコン(_I)" - -#: data/ui/glabels-ui.xml.h:152 -msgid "_Main Toolbar" -msgstr "メイン・ツールバー(_M)" - -#: data/ui/glabels-ui.xml.h:153 -msgid "_Merge Properties..." -msgstr "結合プロパティ(_M)..." - -#: data/ui/glabels-ui.xml.h:154 -msgid "_New" -msgstr "新規(_N)" - -#: data/ui/glabels-ui.xml.h:155 -msgid "_Objects" -msgstr "オブジェクト(_O)" - -#: data/ui/glabels-ui.xml.h:156 -msgid "_Open..." -msgstr "開く(_O)..." - -#: data/ui/glabels-ui.xml.h:158 -msgid "_Paste" -msgstr "貼り付け(_P)" - -#: data/ui/glabels-ui.xml.h:159 -msgid "_Print..." -msgstr "印刷(_P)..." - -#: data/ui/glabels-ui.xml.h:160 -msgid "_Property Toolbar" -msgstr "プロパティ・ツールバー(_P)" - -#: data/ui/glabels-ui.xml.h:161 -msgid "_Quit" -msgstr "終了(_Q)" - -#: data/ui/glabels-ui.xml.h:164 -msgid "_Save" -msgstr "保存(_S)" - -#: data/ui/glabels-ui.xml.h:168 -msgid "_View" -msgstr "表示(_V)" - -#: data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr " " - -#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 -#: data/glade/template-designer.glade.h:5 -msgid "*" -msgstr "*" - -#: data/glade/prefs-dialog.glade.h:3 -msgid "Default page size" -msgstr "ページ・サイズの初期値" - -#: data/glade/prefs-dialog.glade.h:4 -msgid "Fill" -msgstr "塗りつぶし" - -#: data/glade/prefs-dialog.glade.h:5 -msgid "Line" -msgstr "線" - -#: data/glade/prefs-dialog.glade.h:6 -msgid "Text" -msgstr "文字" - -#: data/glade/prefs-dialog.glade.h:7 -msgid "Units" -msgstr "単位" - -#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 -msgid "Alignment:" -msgstr "位置:" - -#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 -msgid "Color:" -msgstr "色:" - -#: data/glade/prefs-dialog.glade.h:10 -msgid "Font:" -msgstr "フォント:" - -#: data/glade/prefs-dialog.glade.h:11 -msgid "ISO A4" -msgstr "ISO A4 版" - -#: data/glade/prefs-dialog.glade.h:12 -msgid "Inches" -msgstr "インチ" - -#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 -msgid "Line Spacing:" -msgstr "行間:" - -#: data/glade/prefs-dialog.glade.h:14 -msgid "Locale" -msgstr "ローケル" - -#: data/glade/prefs-dialog.glade.h:15 -msgid "Millimeters" -msgstr "ミリ" - -#: data/glade/prefs-dialog.glade.h:16 -msgid "Object defaults" -msgstr "オブジェクトのデフォルト" - -#: data/glade/prefs-dialog.glade.h:17 -msgid "Points" -msgstr "ポイント" - -#: data/glade/prefs-dialog.glade.h:18 -msgid "Select default properties for new objects." -msgstr "新規に作成するオブジェクトのデフォルト値を選択して下さい。" - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "利用する言語 (ロケール) に依存する動作を選択して下さい。" - -#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:25 -msgid "US Letter" -msgstr "US レター" - -#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 -#: data/glade/template-designer.glade.h:72 -msgid "Width:" -msgstr "幅:" - -#: data/glade/object-editor.glade.h:2 -msgid "00000000000 00000" -msgstr "00000000000 00000" - -#: data/glade/object-editor.glade.h:3 -msgid "Xxx object properties" -msgstr "" -"Xxx オブジェクトのプロパティ" - -#: data/glade/object-editor.glade.h:5 -msgid "Allow merge to automatically shrink text" -msgstr "自動的に文字を小さくして結合できるようにする" - -#: data/glade/object-editor.glade.h:6 -msgid "Angle:" -msgstr "角度:" - -#: data/glade/object-editor.glade.h:7 -msgid "Checksum" -msgstr "チェックサム" - -#: data/glade/object-editor.glade.h:10 -msgid "Family:" -msgstr "ファミリ:" - -#: data/glade/object-editor.glade.h:12 -msgid "Fill" -msgstr "塗りつぶし" - -#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 -msgid "Height:" -msgstr "高さ:" - -#: data/glade/object-editor.glade.h:14 -msgid "Image" -msgstr "画像" - -#: data/glade/object-editor.glade.h:15 -msgid "Insert merge field" -msgstr "結合フィールドの挿入" - -#: data/glade/object-editor.glade.h:17 -msgid "Length:" -msgstr "長さ:" - -#: data/glade/object-editor.glade.h:18 -msgid "Line" -msgstr "直線" - -#: data/glade/object-editor.glade.h:20 -msgid "Literal:" -msgstr "リテラル:" - -#: data/glade/object-editor.glade.h:21 -msgid "Load image" -msgstr "画像の読み込み" - -#: data/glade/object-editor.glade.h:22 -msgid "Position" -msgstr "位置" - -#: data/glade/object-editor.glade.h:23 -msgid "Reset image size" -msgstr "画像サイズのリセット" - -#: data/glade/object-editor.glade.h:24 -msgid "Size" -msgstr "サイズ" - -#: data/glade/object-editor.glade.h:25 -msgid "Size:" -msgstr "サイズ:" - -#: data/glade/object-editor.glade.h:26 -msgid "Style" -msgstr "スタイル" - -#: data/glade/object-editor.glade.h:27 -msgid "Style:" -msgstr "スタイル:" - -#: data/glade/object-editor.glade.h:30 -msgid "X:" -msgstr "X:" - -#: data/glade/object-editor.glade.h:31 -msgid "Y:" -msgstr "Y:" - -#: data/glade/object-editor.glade.h:32 -msgid "degrees" -msgstr "度" - -#: data/glade/object-editor.glade.h:33 -msgid "dialog1" -msgstr "dialog1" - -#: data/glade/object-editor.glade.h:34 -msgid "digits:" -msgstr "桁数:" - -#: data/glade/object-editor.glade.h:35 -msgid "format:" -msgstr "書式:" - -#: data/glade/template-designer.glade.h:1 -msgid " " -msgstr " " - -#: data/glade/template-designer.glade.h:2 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(例: \"封筒のラベル\", \"名刺\", ...)" - -#: data/glade/template-designer.glade.h:3 -msgid "(e.g., 8163A)" -msgstr "(例: 8163A)" - -#: data/glade/template-designer.glade.h:4 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(例: Avery, Acme, ...)" - -#: data/glade/template-designer.glade.h:6 -msgid "1. Outer radius:" -msgstr "1. 外径:" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "1. 半径:" - -#: data/glade/template-designer.glade.h:8 -msgid "1. Width:" -msgstr "1. 幅:" - -#: data/glade/template-designer.glade.h:9 -msgid "2. Height:" -msgstr "2. 高さ:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "2. インナーの半径:" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "2. 余分な部分 (重ね刷り可):" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "3. クリッピングの幅:" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "3. 余白" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "3. コーナー (角度):" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "4. クリッピングの高さ:" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "4. 水平方向の余分な部分 (重ね刷り可):" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "5. 垂直方向の余分な部分 (重ね刷り可):" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "5. 余分な部分 (重ね刷り可):" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "6. 余白" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "ブランド/製造元:" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD の形 (含むクレジット・カード CD)" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"おめでとうございます!\n" -"\n" -"gLabels テンプレートの生成が完了しました。\n" -"このデザインを採用し保存する場合は、[適用] をクリックして下さい。\n" -"\n" -"[キャンセル] をクリックするとデザインを破棄することができます。\n" -"または [戻る] をクリックするとやり直すことが可能です。" - -#: data/glade/template-designer.glade.h:30 -msgid "Design Completed" -msgstr "デザインが完了しました" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "左上隅からの距離 (x0):" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "左上隅からの距離 (y0):" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "水平方向のピッチ (dx):" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" -"何個のラベルをテンプレートの中に作成しますか?\n" -"\n" -"レイアウトはラベルまたはカードの集まりで、それらを格子状に配置することができ" -"ます。\n" -"最初のサンプルのように、ほとんどのテンプレートではレイアウトは一つで十分で" -"す。\n" -"二番目のサンプルでは、二つのレイアウトが必要な場合を図にしたものです。" - -#: data/glade/template-designer.glade.h:40 -msgid "Label Size (CD/DVD)" -msgstr "ラベルのサイズ (CD/DVD)" - -#: data/glade/template-designer.glade.h:41 -msgid "Label Size (Round)" -msgstr "ラベルのサイズ (円)" - -#: data/glade/template-designer.glade.h:42 -msgid "Label or Card Shape" -msgstr "ラベルまたはカードの形状" - -#: data/glade/template-designer.glade.h:43 -msgid "Label or Card Size (Rectangular)" -msgstr "ラベルまたはカードのサイズ (長方形)" - -#: data/glade/template-designer.glade.h:44 -msgid "Layout #1" -msgstr "レイアウト #1:" - -#: data/glade/template-designer.glade.h:45 -msgid "Layout #2" -msgstr "レイアウト #2:" - -#: data/glade/template-designer.glade.h:46 -msgid "Layout(s)" -msgstr "レイアウト" - -#: data/glade/template-designer.glade.h:47 -msgid "Name and Description" -msgstr "名前と説明" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "横方向の数 (nx):" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "縦方向の数 (ny):" - -#: data/glade/template-designer.glade.h:50 -msgid "Number of Layouts" -msgstr "レイアウトの数" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "レイアウトの数:" - -#: data/glade/template-designer.glade.h:52 -msgid "Page Size" -msgstr "用紙のサイズ" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "パート番号" - -#: data/glade/template-designer.glade.h:55 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "テンプレートの識別情報を入力して下さい。" - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "レイアウト情報を入力して下さい。" - -#: data/glade/template-designer.glade.h:57 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "テンプレートのラベル単体のサイズをそれぞれ入力して下さい。" - -#: data/glade/template-designer.glade.h:58 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "テンプレートのラベルまたはカード単体のサイズをそれぞれ入力して下さい。" - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "ラベルまたはカードの基本的な形状を選択して下さい。" - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "テンプレート用紙のサイズを選択して下さい。" - -#: data/glade/template-designer.glade.h:61 -msgid "Print test sheet" -msgstr "用紙のテスト印刷" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "長方形または正方形 (コーナーを丸くすることも可)" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "円" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"レイアウトが二つ必要な\n" -"テンプレート" - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"レイアウトが一つだけで\n" -"十分なレイアウト" - -#: data/glade/template-designer.glade.h:68 -msgid "Vertical pitch (dy):" -msgstr "垂直方向のピッチ (dy):" - -#: data/glade/template-designer.glade.h:69 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"gLabels のテンプレート・デザイナへようこそ。\n" -"\n" -"このデザイナでは gLabels のカスタム・テンプレートの作成をお手伝いします。" - -#: data/templates/paper-sizes.xml.h:1 -msgid "A0" -msgstr "A0版" - -#: data/templates/paper-sizes.xml.h:2 -msgid "A1" -msgstr "A1版" - -#: data/templates/paper-sizes.xml.h:3 -msgid "A10" -msgstr "A10版" - -#: data/templates/paper-sizes.xml.h:4 -msgid "A2" -msgstr "A2版" - -#: data/templates/paper-sizes.xml.h:5 -msgid "A3" -msgstr "A3版" - -#: data/templates/paper-sizes.xml.h:6 -msgid "A4" -msgstr "A4版" - -#: data/templates/paper-sizes.xml.h:7 -msgid "A5" -msgstr "A5版" - -#: data/templates/paper-sizes.xml.h:8 -msgid "A6" -msgstr "A6版" - -#: data/templates/paper-sizes.xml.h:9 -msgid "A7" -msgstr "A7版" - -#: data/templates/paper-sizes.xml.h:10 -msgid "A8" -msgstr "A8版" - -#: data/templates/paper-sizes.xml.h:11 -msgid "A9" -msgstr "A9版" - -#: data/templates/paper-sizes.xml.h:12 -msgid "B0" -msgstr "B0版" - -#: data/templates/paper-sizes.xml.h:13 -msgid "B1" -msgstr "B1版" - -#: data/templates/paper-sizes.xml.h:14 -msgid "B10" -msgstr "B10版" - -#: data/templates/paper-sizes.xml.h:15 -msgid "B2" -msgstr "B2版" - -#: data/templates/paper-sizes.xml.h:16 -msgid "B3" -msgstr "B3版" - -#: data/templates/paper-sizes.xml.h:17 -msgid "B4" -msgstr "B4版" - -#: data/templates/paper-sizes.xml.h:18 -msgid "B5" -msgstr "B5版" - -#: data/templates/paper-sizes.xml.h:19 -msgid "B6" -msgstr "B6版" - -#: data/templates/paper-sizes.xml.h:20 -msgid "B7" -msgstr "B7版" - -#: data/templates/paper-sizes.xml.h:21 -msgid "B8" -msgstr "B8版" - -#: data/templates/paper-sizes.xml.h:22 -msgid "B9" -msgstr "B9版" - -#: data/templates/paper-sizes.xml.h:23 -msgid "US Executive" -msgstr "US エグゼクティブ" - -#: data/templates/paper-sizes.xml.h:24 -msgid "US Legal" -msgstr "US リーガル" - -#: data/templates/avery-us-templates.xml.h:1 -#: data/templates/zweckform-iso-templates.xml.h:1 -msgid "Address Labels" -msgstr "宛名のラベル" - -#: data/templates/avery-us-templates.xml.h:2 -#: data/templates/avery-iso-templates.xml.h:2 -#: data/templates/zweckform-iso-templates.xml.h:3 -#: data/templates/misc-us-templates.xml.h:2 -#: data/templates/misc-iso-templates.xml.h:9 -msgid "Business Cards" -msgstr "名刺" - -#: data/templates/avery-us-templates.xml.h:3 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "CD/DVD のラベル (Disc ラベル)" - -#: data/templates/avery-us-templates.xml.h:4 -msgid "Diskette Labels" -msgstr "フロッピーのラベル" - -#: data/templates/avery-us-templates.xml.h:5 -msgid "Filing Labels" -msgstr "ファイル・バインダーのラベル" - -#: data/templates/avery-us-templates.xml.h:6 -msgid "Full Sheet Labels" -msgstr "全用紙のラベル" - -#: data/templates/avery-us-templates.xml.h:7 -msgid "Large Round Labels" -msgstr "大きな矩形のラベル" - -#: data/templates/avery-us-templates.xml.h:8 -msgid "Name Badge Labels" -msgstr "名前つきバッジのラベル" - -#: data/templates/avery-us-templates.xml.h:9 -msgid "Return Address Labels" -msgstr "返信用宛名のラベル" - -#: data/templates/avery-us-templates.xml.h:10 -msgid "Shipping Labels" -msgstr "出荷ラベル" - -#: data/templates/avery-us-templates.xml.h:11 -msgid "Small Round Labels" -msgstr "小さな矩形のラベル" - -#: data/templates/avery-us-templates.xml.h:12 -msgid "Square Labels" -msgstr "矩形のラベル" - -#: data/templates/avery-us-templates.xml.h:13 -msgid "Video Tape Face Labels" -msgstr "ビデオ・テープの表面ラベル" - -#: data/templates/avery-us-templates.xml.h:14 -msgid "Video Tape Spine Labels" -msgstr "ビデオ・テープの背面ラベル" - -#: data/templates/avery-iso-templates.xml.h:1 -msgid "Address labels" -msgstr "宛名のラベル" - -#: data/templates/avery-iso-templates.xml.h:3 -msgid "CD Booklet" -msgstr "CD の小冊子" - -#: data/templates/avery-iso-templates.xml.h:4 -msgid "CD Inlet" -msgstr "CD のインレット" - -#: data/templates/avery-iso-templates.xml.h:5 -#: data/templates/zweckform-iso-templates.xml.h:4 -#: data/templates/misc-us-templates.xml.h:4 -#: data/templates/misc-iso-templates.xml.h:10 -msgid "CD/DVD Labels" -msgstr "CD/DVD のラベル" - -#: data/templates/avery-iso-templates.xml.h:6 -msgid "Diskette labels" -msgstr "フロッピーのラベル" - -#: data/templates/avery-iso-templates.xml.h:7 -#: data/templates/zweckform-iso-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:17 -msgid "Mailing Labels" -msgstr "封筒のラベル" - -#: data/templates/avery-iso-templates.xml.h:8 -msgid "Mailing labels" -msgstr "封筒のラベル" - -#: data/templates/avery-iso-templates.xml.h:9 -msgid "Mini Address Labels" -msgstr "小さな宛名のラベル" - -#: data/templates/avery-iso-templates.xml.h:10 -msgid "Shipping labels" -msgstr "出荷ラベル" - -#: data/templates/zweckform-iso-templates.xml.h:2 -msgid "Allround Labels" -msgstr "汎用的なラベル" - -#: data/templates/zweckform-iso-templates.xml.h:5 -msgid "Correction and Cover-up Labels" -msgstr "コレクションとカバーのラベル" - -#: data/templates/zweckform-iso-templates.xml.h:6 -msgid "Lever Arch File Labels" -msgstr "レバー・アーチ・ファイルのラベル" - -#: data/templates/zweckform-iso-templates.xml.h:8 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "QSL-Karten Etiketten (70mm x 50.8mm)" - -#: data/templates/zweckform-iso-templates.xml.h:9 -msgid "Rectangular Copier Labels" -msgstr "長方形のコピー機のラベル" - -#: data/templates/zweckform-iso-templates.xml.h:10 -#: data/templates/misc-iso-templates.xml.h:22 -msgid "Rectangular Labels" -msgstr "長方形のラベル" - -#: data/templates/zweckform-iso-templates.xml.h:11 -msgid "Video Labels (back)" -msgstr "ビデオのラベル (裏側)" - -#: data/templates/misc-us-templates.xml.h:1 -msgid "Business Card CD" -msgstr "名刺 CD" - -#: data/templates/misc-us-templates.xml.h:3 -msgid "CD Template Rectangles" -msgstr "CD テンプレート (長方形)" - -#: data/templates/misc-us-templates.xml.h:5 -msgid "CD/DVD Labels (Face Only)" -msgstr "CD/DVD のラベル (外側のみ)" - -#: data/templates/misc-us-templates.xml.h:6 -#: data/templates/misc-iso-templates.xml.h:11 -msgid "CD/DVD Labels (face only)" -msgstr "CD/DVD のラベル (外側のみ)" - -#: data/templates/misc-us-templates.xml.h:7 -msgid "DLT Labels" -msgstr "DLT のラベル" - -#: data/templates/misc-us-templates.xml.h:8 -msgid "Microtube labels" -msgstr "マイクロチューブのラベル" - -#: data/templates/misc-us-templates.xml.h:9 -msgid "Mini-CD Labels" -msgstr "ミニ CD のラベル" - -#: data/templates/misc-us-templates.xml.h:10 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "PRO CD のラベル二枚 (CD 格納ケースのみ)" - -#: data/templates/misc-us-templates.xml.h:11 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "PRO CD ラベル二枚 (外側のみ)" - -#: data/templates/misc-us-templates.xml.h:12 -#: data/templates/misc-iso-templates.xml.h:21 -msgid "PRO CD Labels 2-up (face only)" -msgstr "PRO CD ラベル二枚 (外側のみ)" - -#: data/templates/misc-us-templates.xml.h:13 -msgid "Slimline CD Case (rightside up)" -msgstr "薄い CD フォルダ (右側)" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Slimline CD Case (upside down)" -msgstr "薄い CD フォルダ (上側)" - -#: data/templates/misc-iso-templates.xml.h:1 -msgid "Agipa 119488: Business Cards" -msgstr "Agipa 119488: 名刺" - -#: data/templates/misc-iso-templates.xml.h:2 -msgid "Allround Labels --24" -msgstr "汎用的なラベル --24" - -#: data/templates/misc-iso-templates.xml.h:3 -msgid "Allround Labels --44" -msgstr "汎用的なラベル --44" - -#: data/templates/misc-iso-templates.xml.h:4 -msgid "Allround Labels --64" -msgstr "汎用的なラベル --64" - -#: data/templates/misc-iso-templates.xml.h:5 -msgid "Allround Labels --65" -msgstr "汎用的なラベル --65" - -#: data/templates/misc-iso-templates.xml.h:6 -msgid "Arch File Labels" -msgstr "アーチ・ファイルのラベル" - -#: data/templates/misc-iso-templates.xml.h:7 -msgid "Arch File Labels (large)" -msgstr "アーチ・ファイルのラベル (大)" - -#: data/templates/misc-iso-templates.xml.h:8 -msgid "Arch File Labels (small)" -msgstr "アーチ・ファイルのラベル (小)" - -#: data/templates/misc-iso-templates.xml.h:12 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "CD/DVD のラベル標準書式 (外側のみ)" - -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Diskette Labels (face only)" -msgstr "フロッピーのラベル (外側のみ)" - -#: data/templates/misc-iso-templates.xml.h:14 -msgid "EPSON Photo Stickers 16" -msgstr "EPSON フォト・ステッカー 16" - -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Etiketten" -msgstr "Etiketten" - -#: data/templates/misc-iso-templates.xml.h:16 -msgid "Fridge Magnet Stickers" -msgstr "冷蔵庫に貼る磁気ステッカ" - -#: data/templates/misc-iso-templates.xml.h:18 -msgid "Mailing Labels --14" -msgstr "封筒のラベル --14" - -#: data/templates/misc-iso-templates.xml.h:19 -msgid "Mailing Labels-2 columns" -msgstr "封筒のラベル (二列)" - -#: data/templates/misc-iso-templates.xml.h:20 -msgid "Mailing Labels-3 columns" -msgstr "封筒のラベル (三列)" - -#: data/templates/misc-iso-templates.xml.h:23 -msgid "Video Labels (face only)" -msgstr "ビデオのラベル (外側のみ)" - -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "ラベルや名刺、メディアのカバーを生成します" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "gLabels ラベル・デザイナ" - -#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "gLabels のプロジェクト・ファイル" diff --git a/glabels2/po/ko.po b/glabels2/po/ko.po deleted file mode 100644 index f908f70a..00000000 --- a/glabels2/po/ko.po +++ /dev/null @@ -1,2543 +0,0 @@ -# gLabels 한국어 번역 파일입니다. -# -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 2.3. pre0svn\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2004-08-15 18:13-0400\n" -"PO-Revision-Date: 2008-02-26 10:59+0900\n" -"Last-Translator: YunSeok Choi \n" -"Language-Team: none\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels.c:55 -msgid "Show view debugging messages." -msgstr "보기의 디버깅 메시지를 보이기" - -#: src/glabels.c:58 -msgid "Show item debugging messages." -msgstr "아이템 디버깅 메시지를 보이기" - -#: src/glabels.c:61 -msgid "Show printing debugging messages." -msgstr "인쇄 디버깅 메시지를 보이기" - -#: src/glabels.c:64 -msgid "Show prefs debugging messages." -msgstr "Prefs 디버깅 메시지를 보이기" - -#: src/glabels.c:67 -msgid "Show file debugging messages." -msgstr "파일 디버깅 메시지를 보이기" - -#: src/glabels.c:70 -msgid "Show document debugging messages." -msgstr "문서 디버깅 메시지를 보이기" - -#: src/glabels.c:73 -msgid "Show template debugging messages." -msgstr "Template 디버깅 메시지를 보이기" - -#: src/glabels.c:76 -msgid "Show paper debugging messages." -msgstr "Paper 디버깅 메시지를 보이기" - -#: src/glabels.c:79 -msgid "Show xml debugging messages." -msgstr "XML 디버깅 메시지를 보이기" - -#: src/glabels.c:82 -msgid "Show document merge debugging messages." -msgstr "Document 여백 디버깅 메시지를 보이기" - -#: src/glabels.c:85 -msgid "Show commands debugging messages." -msgstr "Command 디버깅 메시지를 보이기" - -#: src/glabels.c:88 -msgid "Show undo debugging messages." -msgstr "Undo 디버깅 메시지를 보이기" - -#: src/glabels.c:91 -msgid "Show recent debugging messages." -msgstr "최근의 디버깅 메시지를 보이기" - -#: src/glabels.c:94 -msgid "Show window debugging messages." -msgstr "윈도우 디버깅 메시지를 보이기" - -#: src/glabels.c:97 -msgid "Show ui debugging messages." -msgstr "GUI 디버깅 메시지를 보이기" - -#: src/glabels.c:100 -msgid "Show property_bar debugging messages." -msgstr "속성도구 디버깅 메시지를 보이기" - -#: src/glabels.c:103 -msgid "Show media select widget debugging messages." -msgstr "선택 제품 미디어 디버깅 메시지를 보이기" - -#: src/glabels.c:106 -msgid "Show mini preview widget debugging messages." -msgstr "제품 작게 미리보기 디버깅 메시지를 보이기" - -#: src/glabels.c:109 -msgid "Show pixbuf cache debugging messages." -msgstr "pixbuf cache 디버깅 메시지를 보이기" - -#: src/glabels.c:112 -msgid "Show widget debugging messages." -msgstr "제품 디버깅 메시지를 보이기" - -#: src/glabels.c:115 -msgid "Show object editor debugging messages." -msgstr "개채 편집기 디버깅 메시지를 보이기" - -#: src/glabels.c:118 -msgid "Turn on all debugging messages." -msgstr "모든 디버깅 메시지 켜기" - -#: src/glabels.c:187 -msgid "Could not initialize Bonobo!\n" -msgstr "Bonobo 초기화 할 수 없음!\n" - -#: src/glabels-batch.c:48 -msgid "print this message" -msgstr "이 메시지를 인쇄" - -#: src/glabels-batch.c:50 -msgid "print the version of glabels-batch being used" -msgstr "gLabel-batch 버전 인쇄" - -#: src/glabels-batch.c:52 -msgid "set output filename (default=\"output.ps\")" -msgstr "출력 파일이름 지정 (기본 = \"output.ps\")" - -#: src/glabels-batch.c:52 -msgid "filename" -msgstr "파일이름" - -#: src/glabels-batch.c:54 -msgid "number of sheets (default=1)" -msgstr "용지 수(기본= 1)" - -#: src/glabels-batch.c:54 -msgid "sheets" -msgstr "용지" - -#: src/glabels-batch.c:56 -msgid "number of copies (default=1)" -msgstr "복사 수(기본= 1)" - -#: src/glabels-batch.c:56 -msgid "copies" -msgstr "복사" - -#: src/glabels-batch.c:58 -#: src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "외곽선 인쇄 (프린터 정렬 테스트)" - -#: src/glabels-batch.c:60 -#: src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "거꾸로 인쇄 (거울 효과)" - -#: src/glabels-batch.c:96 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[옵션...] gLabels 파일..." - -#: src/glabels-batch.c:116 -#, c-format -msgid "missing glabels file\n" -msgstr "gLabel 파일이 보이지 않음\n" - -#: src/glabels-batch.c:157 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "gLabel 파일 %s 을(를) 열 수 없습니다.\n" - -#: src/window.c:244 -msgid "(none) - gLabels" -msgstr "(없음) - gLabels" - -#: src/window.c:414 -msgid "(modified)" -msgstr "(수정됨)" - -#: src/stock.c:65 -#: data/ui/glabels-ui.xml.h:165 -msgid "_Select Mode" -msgstr "모드 선택(_S)" - -#: src/stock.c:66 -#: data/ui/glabels-ui.xml.h:166 -msgid "_Text" -msgstr "글자(_T)" - -#: src/stock.c:67 -#: data/ui/glabels-ui.xml.h:151 -msgid "_Line" -msgstr "선(_L)" - -#: src/stock.c:68 -#: data/ui/glabels-ui.xml.h:133 -msgid "_Box" -msgstr "사각형(_B)" - -#: src/stock.c:69 -#: data/ui/glabels-ui.xml.h:144 -msgid "_Ellipse" -msgstr "타원(_E)" - -#: src/stock.c:70 -#: data/ui/glabels-ui.xml.h:149 -msgid "_Image" -msgstr "그림(_I)" - -#: src/stock.c:71 -#: data/ui/glabels-ui.xml.h:11 -msgid "Bar_code" -msgstr "바코드(_C)" - -#: src/stock.c:72 -msgid "_Merge Properties" -msgstr "여백 속성(_M)" - -#: src/stock.c:73 -msgid "Object _Properties" -msgstr "항목 속성(_P)" - -#: src/stock.c:74 -#: data/ui/glabels-ui.xml.h:13 -msgid "Bring to _Front" -msgstr "앞으로 내기(_F)" - -#: src/stock.c:75 -#: data/ui/glabels-ui.xml.h:110 -msgid "Send to _Back" -msgstr "뒤로 보내기(_B)" - -#: src/stock.c:76 -#: data/ui/glabels-ui.xml.h:97 -msgid "Rotate _Left" -msgstr "왼쪽으로 회전(_L)" - -#: src/stock.c:77 -#: data/ui/glabels-ui.xml.h:98 -msgid "Rotate _Right" -msgstr "오른쪽으로 회전(_R)" - -#: src/stock.c:78 -#: data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "수직 뒤집기(_H)" - -#: src/stock.c:79 -#: data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "수평 뒤집기(_V)" - -#: src/stock.c:80 -#: data/ui/glabels-ui.xml.h:150 -msgid "_Lefts" -msgstr "좌측(_L)" - -#: src/stock.c:81 -#: data/ui/glabels-ui.xml.h:162 -msgid "_Rights" -msgstr "우측(_R)" - -#: src/stock.c:82 -#: data/ui/glabels-ui.xml.h:134 -msgid "_Centers" -msgstr "중앙(_C)" - -#: src/stock.c:83 -#: data/ui/glabels-ui.xml.h:167 -msgid "_Tops" -msgstr "상위(_T)" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "하위" - -#: src/stock.c:85 -msgid "Centers" -msgstr "중앙" - -#: src/stock.c:86 -#: src/stock.c:87 -#: data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "라벨 중앙(_N)" - -#: src/stock.c:88 -#: data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "색 채우기" - -#: src/stock.c:89 -#: data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "선 색상" - -#: src/stock.c:90 -#: src/stock.c:92 -msgid "Linked" -msgstr "연결" - -#: src/stock.c:91 -#: src/stock.c:93 -msgid "Not Linked" -msgstr "연결되지 않음" - -#: src/ui-property-bar.c:345 -#: src/object-editor.c:499 -msgid "Default" -msgstr "기본" - -#: src/ui-property-bar.c:360 -#: src/object-editor.c:512 -msgid "No fill" -msgstr "채우기 없음" - -#: src/ui-property-bar.c:375 -#: src/object-editor.c:505 -msgid "No line" -msgstr "선 없음" - -#: src/ui-sidebar.c:180 -msgid "Object properties" -msgstr "항목 속성" - -#: src/commands.c:385 -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 에서 Labelê³¼ 명함을 제작하는 프로그램입니다.\n" -"\n" -"Glabels는 자유소프트웨어 입니다; 여러분은 이 프로그램을 GNU(General Public License)에 따라 자유롭게 수정 배포 할 수 있습니다. 이 프로그램은 GNU의 Ver.2 를 따르고 있습니다. \n" -"\n" -"이 프로그램은 어떠한 저작권료 없이 사용되어 질 수 있습니다.(번역주 : 번역자는 GNU를 깊이 알지 못합니다. 이 부분의 번역에 지적하고픈 부분이 있다면 번역 자료와 함께 연락주십시오. xein@naver.com)\n" - -#: src/commands.c:399 -msgid "See the file AUTHORS for additional credits," -msgstr "참여 제작자 AUTHORS 파일을 보세요." - -#: src/commands.c:400 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "또는 이곳을 방문 하세요. http://glabels.sourceforge.net/" - -#: src/commands.c:409 -msgid " " -msgstr " " - -#: src/commands.c:424 -msgid "glabels" -msgstr "gLabels" - -#: src/file.c:100 -msgid "New Label or Card" -msgstr "새 라벨 또는 카드" - -#: src/file.c:132 -#: src/file.c:304 -msgid "Media Type" -msgstr "매체 형식" - -#: src/file.c:138 -#: src/file.c:310 -msgid "Label orientation" -msgstr "라벨의 방향" - -#: src/file.c:269 -msgid "Label properties" -msgstr "라벨 속성" - -#: src/file.c:452 -#: src/file.c:870 -msgid "All files" -msgstr "모든 파일" - -#: src/file.c:457 -#: src/file.c:875 -msgid "gLabels documents" -msgstr "gLabels 문서" - -#: src/file.c:505 -#: src/file.c:617 -#: src/file.c:934 -#: src/file.c:1130 -msgid "Empty file name selection" -msgstr "비어있는 파일 이름" - -#: src/file.c:506 -#: src/file.c:520 -#: src/file.c:618 -#: src/file.c:632 -msgid "Please select a file or supply a valid file name" -msgstr "지원하는 파일을 선택하세요." - -#: src/file.c:519 -#: src/file.c:631 -msgid "File does not exist" -msgstr "파일이 없습니다." - -#: src/file.c:563 -#: data/ui/glabels-ui.xml.h:75 -msgid "Open" -msgstr "열기" - -#: src/file.c:565 -msgid "Open label" -msgstr "라벨 열기" - -#: src/file.c:707 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "\"%s\" 파일을 열 수 없습니다." - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "지원되지 않는 파일 형식" - -#: src/file.c:797 -#: src/file.c:979 -#: src/file.c:1174 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "\"%s\" 파일을 저장할 수 없습니다." - -#: src/file.c:805 -#: src/file.c:987 -#: src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "저장하는데 오류가 발생했습니다. 파일을 저장하지 못했습니다." - -#: src/file.c:848 -#: src/file.c:1048 -#, c-format -msgid "Save \"%s\" as" -msgstr "\"%s\" 이름으로 저장" - -#: src/file.c:935 -#: src/file.c:1131 -msgid "Please supply a valid file name" -msgstr "유효한 파일이름이 필요합니다." - -#: src/file.c:952 -#: src/file.c:1147 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "\"%s\"파일이름으로 덮어쓰시겠습니까?" - -#: src/file.c:960 -#: src/file.c:1155 -msgid "File already exists." -msgstr "파일이름이 존재합니다." - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "닫기전에 바뀐부분을 \"%s\"이름으로 저장하시겠습니까?" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "저장하지 않으면, 바뀐부분을 잃어버리게 됩니다." - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "저장없이 닫기" - -#. Should not happen -#: src/prefs.c:156 -#: src/prefs.c:163 -#: data/glade/prefs-dialog.glade.h:23 -#: data/glade/object-editor.glade.h:37 -msgid "points" -msgstr "포인트" - -#: src/prefs.c:158 -#: data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "[인치]" - -#: src/prefs.c:160 -msgid "mm" -msgstr "[밀리미터]" - -#: src/prefs-dialog.c:248 -#: data/glade/prefs-dialog.glade.h:22 -msgid "gLabels Preferences" -msgstr "gLabels 환경설정" - -#. -#. * Submenu: Order -#. -#: src/view.c:3570 -#: data/ui/glabels-ui.xml.h:157 -msgid "_Order" -msgstr "순서(_O)" - -#. -#. * Submenu: Rotate/Flip -#. -#: src/view.c:3591 -#: data/ui/glabels-ui.xml.h:163 -msgid "_Rotate/Flip" -msgstr "회전/뒤집기(_R)" - -#. -#. * Submenu: Align Horizontally -#. -#: src/view.c:3624 -msgid "Align _Horizontally" -msgstr "가로로 정렬(_H)" - -#. -#. * Submenu: Align Vertically -#. -#: src/view.c:3663 -msgid "Align _Vertically" -msgstr "세로로 정렬(_V)" - -#: src/view.c:3724 -#: data/ui/glabels-ui.xml.h:140 -msgid "_Delete" -msgstr "삭제(_D)" - -#. Build editor. -#: src/view-box.c:223 -msgid "Box object properties" -msgstr "사각형 개체 속성" - -#. Build editor. -#: src/view-ellipse.c:223 -msgid "Ellipse object properties" -msgstr "타원 개체 속성" - -#. Build editor. -#: src/view-line.c:223 -msgid "Line object properties" -msgstr "선 개체 속성" - -#. Build editor. -#: src/view-image.c:222 -msgid "Image object properties" -msgstr "그림 개체 속성" - -#. Build editor. -#: src/view-text.c:250 -msgid "Text object properties" -msgstr "글자 개체 속성" - -#: src/view-text.c:562 -#: data/glade/object-editor.glade.h:28 -msgid "Text" -msgstr "글자" - -#. Build editor. -#: src/view-barcode.c:209 -msgid "Barcode object properties" -msgstr "바코드 개체 속성" - -#: src/view-barcode.c:579 -#: src/print.c:1088 -msgid "Invalid barcode data" -msgstr "잘못된 바코드 데이터" - -#: src/merge-properties-dialog.c:231 -msgid "Merge Properties" -msgstr "여백 속성" - -#. ---- Source section ---- -#: src/merge-properties-dialog.c:237 -msgid "Source" -msgstr "소스" - -#: src/merge-properties-dialog.c:245 -msgid "Format:" -msgstr "서식:" - -#. Location line -#: src/merge-properties-dialog.c:273 -msgid "Location:" -msgstr "장소:" - -#: src/merge-properties-dialog.c:282 -#: src/merge-properties-dialog.c:393 -msgid "Select merge-database source" -msgstr "병합 데이터베이스 소스 선택" - -#: src/merge-properties-dialog.c:289 -#: src/merge-properties-dialog.c:404 -msgid "N/A" -msgstr "N/A" - -#. ---- Sample Fields section ---- -#: src/merge-properties-dialog.c:300 -msgid "Record selection/preview:" -msgstr "선택 기록/미리보기:" - -#: src/merge-properties-dialog.c:326 -msgid "Select" -msgstr "선택" - -#: src/merge-properties-dialog.c:334 -msgid "Record/Field" -msgstr "기록/범위" - -#: src/merge-properties-dialog.c:342 -#: data/glade/object-editor.glade.h:9 -msgid "Data" -msgstr "데이터" - -#: src/print-dialog.c:266 -#: data/ui/glabels-ui.xml.h:82 -msgid "Print" -msgstr "인쇄" - -#: src/print-dialog.c:281 -msgid "_Job" -msgstr "작업(_J)" - -#: src/print-dialog.c:286 -msgid "P_rinter" -msgstr "프린터(_R)" - -#. ----------- Add simple-copies widget ------------ -#: src/print-dialog.c:314 -msgid "Copies" -msgstr "매수" - -#. ------- Add merge control widget ------------ -#: src/print-dialog.c:322 -msgid "Document merge control" -msgstr "문서 여백 제어" - -#. ----------- Add custom print options area ------------ -#: src/print-dialog.c:330 -msgid "Options" -msgstr "옵션" - -#: src/print-dialog.c:351 -msgid "print crop marks" -msgstr "자르기 표시 인쇄" - -#: src/print-dialog.c:553 -#: src/print-dialog.c:592 -msgid "Print preview" -msgstr "인쇄 미리보기" - -#: src/template-designer.c:409 -#: data/glade/template-designer.glade.h:73 -msgid "gLabels Template Designer" -msgstr "gLabels 서식 디자이너" - -#: src/bc.c:60 -msgid "POSTNET (any)" -msgstr "POSTNET (임의)" - -#: src/bc.c:63 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (ZIP만)" - -#: src/bc.c:66 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (ZIP+4)" - -#: src/bc.c:69 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: src/bc.c:72 -msgid "EAN (any)" -msgstr "EAN (임의)" - -#: src/bc.c:75 -msgid "EAN-8" -msgstr "EAN-8" - -#: src/bc.c:78 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: src/bc.c:81 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: src/bc.c:84 -msgid "EAN-13" -msgstr "EAN-13" - -#: src/bc.c:87 -msgid "EAN-13 +2" -msgstr "EAN-13 +2" - -#: src/bc.c:90 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: src/bc.c:93 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A 또는 UPC-E)" - -#: src/bc.c:96 -msgid "UPC-A" -msgstr "UPC-A" - -#: src/bc.c:99 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: src/bc.c:102 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: src/bc.c:105 -msgid "UPC-E" -msgstr "UPC-E" - -#: src/bc.c:108 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: src/bc.c:111 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: src/bc.c:114 -msgid "ISBN" -msgstr "ISBN" - -#: src/bc.c:117 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: src/bc.c:120 -msgid "Code 39" -msgstr "Code 39" - -#: src/bc.c:123 -msgid "Code 128" -msgstr "Code 128" - -#: src/bc.c:126 -msgid "Code 128C" -msgstr "Code 128C" - -#: src/bc.c:129 -msgid "Code 128B" -msgstr "Code 128B" - -#: src/bc.c:132 -msgid "Interleaved 2 of 5" -msgstr "Interleaved 2 of 5" - -#: src/bc.c:135 -msgid "Codabar" -msgstr "Codabar" - -#: src/bc.c:138 -msgid "MSI" -msgstr "MSI" - -#: src/bc.c:141 -msgid "Plessey" -msgstr "Plessey" - -#: src/label.c:569 -msgid "Untitled" -msgstr "제목없음" - -#: src/xml-label.c:176 -#: src/xml-label.c:213 -msgid "xmlParseFile error" -msgstr "xmlParse파일 오류" - -#: src/xml-label.c:250 -msgid "No document root" -msgstr "root 문서가 아님" - -#: src/xml-label.c:264 -msgid "Importing from glabels 0.1 format" -msgstr "gLabels 0.1로 부터 가져오기" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "gLabels 0.4로 부터 가져오기" - -#: src/xml-label.c:279 -msgid "Importing from glabels 1.91 format" -msgstr "gLabels 1.91로 부터 가져오기" - -#: src/xml-label.c:282 -msgid "bad document, unknown glabels Namespace" -msgstr "잘못된 문서, 알 수 없는 Glabels 이름공간" - -#: src/xml-label.c:311 -#: src/xml-label-04.c:75 -#: src/xml-label-191.c:131 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "잘못된 Root 노드 = \"%s\"" - -#: src/xml-label.c:348 -#: src/xml-label-191.c:165 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "문서 노드 내의 잘못된 노드 = \"%s\"" - -#: src/xml-label.c:393 -#: src/xml-label-04.c:123 -#: src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "잘못된 노드 = \"%s\"" - -#: src/xml-label.c:796 -#: src/xml-label-191.c:605 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "데이터 노드 내의 잘못된 노드 = \"%s\"" - -#: src/xml-label.c:962 -#: libglabels/xml-template.c:535 -msgid "Utf8 conversion error." -msgstr "Utf8 변환 에러" - -#: src/xml-label.c:969 -#: libglabels/xml-template.c:542 -msgid "Problem saving xml file." -msgstr "XML 파일 저장에 문제가 있습니다." - -#. This should always be an id, but just in case a name -#. slips by! -#: src/xml-label-191.c:680 -#: libglabels/xml-template.c:199 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "알 수 없는 용지 크기 ID \"%s\"。名前として扱います。" - -#: src/xml-label-191.c:690 -#: libglabels/xml-template.c:209 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "알 수 없는 용지 크기 ID 또는 이름 \"%s\"" - -#: src/merge.c:172 -#: src/merge.c:213 -#: src/merge.c:399 -#: src/merge.c:402 -msgid "None" -msgstr "없음" - -#: src/merge-init.c:53 -msgid "Text file with comma delimeters (CSV)" -msgstr "콤마로 구분된 텍스트파일(CSV)" - -#: src/merge-init.c:60 -msgid "Text file with colon delimeters" -msgstr "콜론으로 구분된 텍스트 파일" - -#: src/merge-init.c:67 -msgid "Text file with tab delimeters" -msgstr "텝으로 구분된 텍스트 파일" - -#: src/wdgt-image-select.c:201 -#: data/glade/object-editor.glade.h:11 -msgid "File:" -msgstr "파일:" - -#: src/wdgt-image-select.c:245 -#: data/glade/object-editor.glade.h:16 -msgid "Key:" -msgstr "키:" - -#: src/wdgt-print-copies.c:179 -msgid "Sheets:" -msgstr "용지:" - -#: src/wdgt-print-copies.c:197 -msgid "Labels" -msgstr "라벨" - -#: src/wdgt-print-copies.c:200 -msgid "from:" -msgstr "부터:" - -#: src/wdgt-print-copies.c:207 -msgid "to:" -msgstr "에게:" - -#: src/wdgt-print-merge.c:178 -msgid "Start on label" -msgstr "라벨의 시작" - -#: src/wdgt-print-merge.c:186 -msgid "on 1st sheet" -msgstr "첫번째 용지에서" - -#: src/wdgt-print-merge.c:195 -msgid "Copies:" -msgstr "매수:" - -#: src/wdgt-print-merge.c:201 -msgid "Collate" -msgstr "제본" - -#: src/wdgt-media-select.c:269 -#: data/glade/template-designer.glade.h:29 -msgid "Description:" -msgstr "설명:" - -#: src/wdgt-media-select.c:279 -#: data/glade/template-designer.glade.h:53 -msgid "Page size:" -msgstr "용지 크기:" - -#: src/wdgt-media-select.c:290 -msgid "Label size:" -msgstr "라벨 크기:" - -#: src/wdgt-media-select.c:301 -msgid "Layout:" -msgstr "배치:" - -#: src/wdgt-media-select.c:578 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (용지의 %d)" - -#: src/wdgt-media-select.c:582 -#, c-format -msgid "%d per sheet" -msgstr "용지의 %d" - -#: src/wdgt-media-select.c:614 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/wdgt-media-select.c:619 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/wdgt-media-select.c:630 -#: src/wdgt-media-select.c:644 -#, c-format -msgid "%s %s diameter" -msgstr "지름 %s %s" - -#: src/wdgt-media-select.c:634 -#: src/wdgt-media-select.c:648 -#, c-format -msgid "%.5g %s diameter" -msgstr "지름 %.5g %s" - -#: src/wdgt-rotate-label.c:193 -msgid "Rotate" -msgstr "회전" - -#. This is the default custom color -#: src/mygal/color-palette.c:396 -msgid "custom" -msgstr "임의의" - -#. "Custom" color - we'll pop up a GnomeColorPicker -#: src/mygal/color-palette.c:438 -msgid "Custom Color:" -msgstr "임의의 색상:" - -#: src/mygal/color-palette.c:446 -msgid "Choose Custom Color" -msgstr "임의의 색상 선택" - -#: src/mygal/color-palette.c:579 -msgid "black" -msgstr "검은색" - -#: src/mygal/color-palette.c:580 -msgid "light brown" -msgstr "밝은 갈색" - -#: src/mygal/color-palette.c:581 -msgid "brown gold" -msgstr "고동색" - -#: src/mygal/color-palette.c:582 -msgid "dark green #2" -msgstr "어두운 녹색 #2" - -#: src/mygal/color-palette.c:583 -msgid "navy" -msgstr "남색" - -#: src/mygal/color-palette.c:584 -#: src/mygal/color-palette.c:640 -msgid "dark blue" -msgstr "어두운 파랑색" - -#: src/mygal/color-palette.c:585 -msgid "purple #2" -msgstr "자주색 #2" - -#: src/mygal/color-palette.c:586 -msgid "very dark gray" -msgstr "매우 어두운 회색" - -#: src/mygal/color-palette.c:589 -#: src/mygal/color-palette.c:645 -msgid "dark red" -msgstr "어두운 빨강색" - -#: src/mygal/color-palette.c:590 -msgid "red-orange" -msgstr "적오렌지색" - -#: src/mygal/color-palette.c:591 -msgid "gold" -msgstr "금색" - -#: src/mygal/color-palette.c:592 -msgid "dark green" -msgstr "어두운 녹색" - -#: src/mygal/color-palette.c:593 -#: src/mygal/color-palette.c:646 -msgid "dull blue" -msgstr "탁한 파랑색" - -#: src/mygal/color-palette.c:594 -#: src/mygal/color-palette.c:647 -msgid "blue" -msgstr "파랑색" - -#: src/mygal/color-palette.c:595 -msgid "dull purple" -msgstr "탁한 자주색" - -#: src/mygal/color-palette.c:596 -msgid "dark grey" -msgstr "어두운 회색" - -#: src/mygal/color-palette.c:599 -msgid "red" -msgstr "빨강색" - -#: src/mygal/color-palette.c:600 -msgid "orange" -msgstr "오렌지색" - -#: src/mygal/color-palette.c:601 -msgid "lime" -msgstr "라임색" - -#: src/mygal/color-palette.c:602 -msgid "dull green" -msgstr "탁한 녹색" - -#: src/mygal/color-palette.c:603 -msgid "dull blue #2" -msgstr "탁한 파랑색#2" - -#: src/mygal/color-palette.c:604 -msgid "sky blue #2" -msgstr "하늘색 #2" - -#: src/mygal/color-palette.c:605 -#: src/mygal/color-palette.c:644 -msgid "purple" -msgstr "자주색" - -#: src/mygal/color-palette.c:606 -msgid "gray" -msgstr "회색" - -#: src/mygal/color-palette.c:609 -#: src/mygal/color-palette.c:641 -msgid "magenta" -msgstr "마젠타색" - -#: src/mygal/color-palette.c:610 -msgid "bright orange" -msgstr "밝은 오렌지색" - -#: src/mygal/color-palette.c:611 -#: src/mygal/color-palette.c:642 -msgid "yellow" -msgstr "노랑색" - -#: src/mygal/color-palette.c:612 -msgid "green" -msgstr "녹색" - -#: src/mygal/color-palette.c:613 -#: src/mygal/color-palette.c:643 -msgid "cyan" -msgstr "청록색" - -#: src/mygal/color-palette.c:614 -msgid "bright blue" -msgstr "밝은 파랑색" - -#: src/mygal/color-palette.c:615 -#: src/mygal/color-palette.c:632 -msgid "red purple" -msgstr "빨간 자주색" - -#: src/mygal/color-palette.c:616 -msgid "light grey" -msgstr "가벼운 회색" - -#: src/mygal/color-palette.c:619 -#: src/mygal/color-palette.c:636 -msgid "pink" -msgstr "분홍색" - -#: src/mygal/color-palette.c:620 -msgid "light orange" -msgstr "가벼운 오렌지색" - -#: src/mygal/color-palette.c:621 -#: src/mygal/color-palette.c:633 -msgid "light yellow" -msgstr "가벼운 노랑색" - -#: src/mygal/color-palette.c:622 -msgid "light green" -msgstr "가벼운 녹색" - -#: src/mygal/color-palette.c:623 -msgid "light cyan" -msgstr "가벼운 청록색" - -#: src/mygal/color-palette.c:624 -#: src/mygal/color-palette.c:634 -msgid "light blue" -msgstr "가벼운 바랑색" - -#: src/mygal/color-palette.c:625 -#: src/mygal/color-palette.c:638 -msgid "light purple" -msgstr "가벼운 자주색" - -#: src/mygal/color-palette.c:626 -msgid "white" -msgstr "흰색" - -#: src/mygal/color-palette.c:631 -msgid "purplish blue" -msgstr "자주빛 파랑색" - -#: src/mygal/color-palette.c:635 -msgid "dark purple" -msgstr "어두운 자주색" - -#: src/mygal/color-palette.c:637 -msgid "sky blue" -msgstr "하늘색" - -#: libglabels/template.c:848 -#, c-format -msgid "Generic %s full page" -msgstr "Generic %s 전면에 걸친" - -#: libglabels/template.c:897 -msgid "No template files found!" -msgstr "서식파일을 찾을 수 없음!" - -#. Create and append an "Other" entry. -#: libglabels/paper.c:67 -msgid "Other" -msgstr "직접지정" - -#: libglabels/paper.c:361 -msgid "No paper files found!" -msgstr "용지 파일을 찾을 수 없음!" - -#: data/ui/glabels-ui.xml.h:1 -msgid "About glabels" -msgstr "gLabels에 대해" - -#: data/ui/glabels-ui.xml.h:2 -msgid "About..." -msgstr "정보..." - -#: data/ui/glabels-ui.xml.h:3 -msgid "Align _Horizontal" -msgstr "세로로 정렬(_H)" - -#: data/ui/glabels-ui.xml.h:4 -msgid "Align _Vertical" -msgstr "가로로 정렬(_V)" - -#: data/ui/glabels-ui.xml.h:5 -msgid "Align objects to bottoms" -msgstr "개체 아래로 정렬" - -#: data/ui/glabels-ui.xml.h:6 -msgid "Align objects to horizontal centers" -msgstr "개체 세로 중앙으로 정렬" - -#: data/ui/glabels-ui.xml.h:7 -msgid "Align objects to left edges" -msgstr "개체 좌측 가장자리로 정렬" - -#: data/ui/glabels-ui.xml.h:8 -msgid "Align objects to right edges" -msgstr "개체 우측 가장자리로 정렬" - -#: data/ui/glabels-ui.xml.h:9 -msgid "Align objects to tops" -msgstr "개체 상위로 정렬" - -#: data/ui/glabels-ui.xml.h:10 -msgid "Align objects to vertical centers" -msgstr "개체 수평 중앙으로 정렬" - -#: data/ui/glabels-ui.xml.h:12 -msgid "Bold" -msgstr "굵게" - -#: data/ui/glabels-ui.xml.h:14 -msgid "Center align" -msgstr "중앙 정렬" - -#: data/ui/glabels-ui.xml.h:15 -msgid "Center objects to horizontal label center" -msgstr "중앙 개체를 수직라벨 중앙으로" - -#: data/ui/glabels-ui.xml.h:16 -msgid "Center objects to vertical label center" -msgstr "중앙 개체를 수평라벨 중상으로" - -#: data/ui/glabels-ui.xml.h:17 -msgid "Change the visibility of markup lines in the current window" -msgstr "현재 윈도우의 보이는 마크업 선 변경" - -#: data/ui/glabels-ui.xml.h:18 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "현재 윈도우의 보이는 그리기 도구 변경" - -#: data/ui/glabels-ui.xml.h:19 -msgid "Change the visibility of the grid in the current window" -msgstr "현재 윈도우의 보이는 그리드 변경" - -#: data/ui/glabels-ui.xml.h:20 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "현재 윈도우의 보이는 주 도구 변경" - -#: data/ui/glabels-ui.xml.h:21 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "현재 윈도우의 보이는 속성 도구 변경" - -#: data/ui/glabels-ui.xml.h:22 -msgid "Close" -msgstr "닫기" - -#: data/ui/glabels-ui.xml.h:23 -msgid "Close the current file" -msgstr "현재 파일을 닫기" - -#: data/ui/glabels-ui.xml.h:24 -msgid "Configure the application" -msgstr "gLabel 구성" - -#: data/ui/glabels-ui.xml.h:25 -msgid "Contents" -msgstr "목차" - -#: data/ui/glabels-ui.xml.h:26 -msgid "Copy" -msgstr "복사" - -#: data/ui/glabels-ui.xml.h:27 -msgid "Copy the selection" -msgstr "선택 복사" - -#: data/ui/glabels-ui.xml.h:28 -msgid "Create a custom template" -msgstr "임의의 서식 만들기" - -#: data/ui/glabels-ui.xml.h:29 -msgid "Create a new document" -msgstr "새로운 문서 만들기" - -#: data/ui/glabels-ui.xml.h:30 -msgid "Create barcode object" -msgstr "바코드 개체 만들기" - -#: data/ui/glabels-ui.xml.h:31 -msgid "Create box/rectangle object" -msgstr "사각형/직사각형 개체 만들기" - -#: data/ui/glabels-ui.xml.h:32 -msgid "Create ellipse/circle object" -msgstr "타원/원형 개체 만들기" - -#: data/ui/glabels-ui.xml.h:33 -msgid "Create image object" -msgstr "그림 개체 만들기" - -#: data/ui/glabels-ui.xml.h:34 -msgid "Create line object" -msgstr "선 개체 만들기" - -#: data/ui/glabels-ui.xml.h:35 -msgid "Create text object" -msgstr "글자 개체 만들기" - -#: data/ui/glabels-ui.xml.h:36 -msgid "Cu_t" -msgstr "자르기(_T)" - -#: data/ui/glabels-ui.xml.h:37 -msgid "Customize" -msgstr "커스터마이즈" - -#: data/ui/glabels-ui.xml.h:38 -msgid "Customize Drawing Toolbar" -msgstr "그리기 도구 커스터마이즈" - -#: data/ui/glabels-ui.xml.h:39 -msgid "Customize Main Toolbar" -msgstr "주 도구 커스터마이즈" - -#: data/ui/glabels-ui.xml.h:40 -msgid "Customize Property Toolbar" -msgstr "속성 도구 커스터마이즈" - -#: data/ui/glabels-ui.xml.h:41 -msgid "Customize toolbars" -msgstr "도구 커스터마이즈" - -#: data/ui/glabels-ui.xml.h:42 -msgid "Cut" -msgstr "잘라내기" - -#: data/ui/glabels-ui.xml.h:43 -msgid "Cut the selection" -msgstr "선택한것 잘라내기" - -#: data/ui/glabels-ui.xml.h:44 -msgid "Decrease magnification" -msgstr "확대 감소" - -#: data/ui/glabels-ui.xml.h:45 -msgid "Delete" -msgstr "삭제" - -#: data/ui/glabels-ui.xml.h:46 -msgid "Delete the selected objects" -msgstr "선택한 개체 삭제" - -#: data/ui/glabels-ui.xml.h:47 -msgid "Drawing toolbar" -msgstr "그리기 도구" - -#: data/ui/glabels-ui.xml.h:48 -msgid "Dump XML" -msgstr "XML 덤프" - -#: data/ui/glabels-ui.xml.h:49 -msgid "Dump the GUI Xml description" -msgstr "GUI의 XML설명 덤프" - -#: data/ui/glabels-ui.xml.h:50 -msgid "Edit merge properties" -msgstr "여백 속성 편집" - -#: data/ui/glabels-ui.xml.h:54 -msgid "Flip object horizontally" -msgstr "수직 개체 뒤집기" - -#: data/ui/glabels-ui.xml.h:55 -msgid "Flip object vertically" -msgstr "수평 개체 뒤집기" - -#: data/ui/glabels-ui.xml.h:56 -msgid "Font name" -msgstr "글꼴" - -#: data/ui/glabels-ui.xml.h:57 -msgid "Font selector" -msgstr "글꼴 선택기" - -#: data/ui/glabels-ui.xml.h:58 -msgid "Font size" -msgstr "글꼴 크기" - -#: data/ui/glabels-ui.xml.h:59 -msgid "Icon and _Text" -msgstr "아이콘과 글자(_T)" - -#: data/ui/glabels-ui.xml.h:60 -msgid "Increase magnification" -msgstr "상승 확대" - -#: data/ui/glabels-ui.xml.h:61 -msgid "Italic" -msgstr "이탤릭" - -#: data/ui/glabels-ui.xml.h:63 -msgid "Left align" -msgstr "왼쪽 정렬" - -#: data/ui/glabels-ui.xml.h:65 -msgid "Line width" -msgstr "선 넓이" - -#: data/ui/glabels-ui.xml.h:66 -msgid "Lower object to bottom" -msgstr "개체를 하단으로 내리기" - -#: data/ui/glabels-ui.xml.h:67 -msgid "M_arkup" -msgstr "마크업(_A)" - -#: data/ui/glabels-ui.xml.h:68 -msgid "Main toolbar" -msgstr "주 도구" - -#: data/ui/glabels-ui.xml.h:69 -msgid "Markup" -msgstr "마크업" - -#: data/ui/glabels-ui.xml.h:70 -msgid "Modify document properties" -msgstr "문서 속성 고치기" - -#: data/ui/glabels-ui.xml.h:71 -msgid "New" -msgstr "새로 만들기" - -#: data/ui/glabels-ui.xml.h:72 -msgid "Object property editor" -msgstr "항목 속성 편집기" - -#: data/ui/glabels-ui.xml.h:73 -msgid "Only show icons in the drawing toolbar" -msgstr "그리기 도구에서 아이콘만 보이기" - -#: data/ui/glabels-ui.xml.h:74 -msgid "Only show icons in the main toolbar" -msgstr "주 도구에서 아이콘만 보이기" - -#: data/ui/glabels-ui.xml.h:76 -msgid "Open a file" -msgstr "파일 열기" - -#: data/ui/glabels-ui.xml.h:77 -msgid "Open the glabels manual" -msgstr "gLabeles 메뉴얼 열기" - -#: data/ui/glabels-ui.xml.h:78 -msgid "Paste" -msgstr "붙이기" - -#: data/ui/glabels-ui.xml.h:79 -msgid "Paste the clipboard" -msgstr "클립보드에 붙이기" - -#: data/ui/glabels-ui.xml.h:80 -msgid "Pr_eferences..." -msgstr "속성(_E)..." - -#: data/ui/glabels-ui.xml.h:81 -msgid "Preferences" -msgstr "설정" - -#: data/ui/glabels-ui.xml.h:83 -msgid "Print the current file" -msgstr "현재 파일을 인쇄" - -#: data/ui/glabels-ui.xml.h:84 -msgid "Proper_ties..." -msgstr "속성(_T)..." - -#: data/ui/glabels-ui.xml.h:85 -msgid "Properties" -msgstr "속성" - -#: data/ui/glabels-ui.xml.h:86 -msgid "Property toolbar" -msgstr "속성 도구" - -#: data/ui/glabels-ui.xml.h:87 -msgid "Quit" -msgstr "종료" - -#: data/ui/glabels-ui.xml.h:88 -msgid "Quit the program" -msgstr "gLabels을 종료" - -#: data/ui/glabels-ui.xml.h:89 -msgid "Raise object to top" -msgstr "개체를 상위로 올리기" - -#: data/ui/glabels-ui.xml.h:90 -msgid "Recent _Files" -msgstr "최근의 파일(_F)" - -#: data/ui/glabels-ui.xml.h:91 -msgid "Redo" -msgstr "재실행" - -#: data/ui/glabels-ui.xml.h:92 -msgid "Redo the undone action" -msgstr "재실행 할것 없음" - -#: data/ui/glabels-ui.xml.h:93 -msgid "Remove all selections" -msgstr "모든 선택사항 삭제" - -#: data/ui/glabels-ui.xml.h:95 -#, no-c-format -msgid "Restore scale to 100%" -msgstr "100%크기로 복구" - -#: data/ui/glabels-ui.xml.h:96 -msgid "Right align" -msgstr "오른쪽으로 정렬" - -#: data/ui/glabels-ui.xml.h:99 -msgid "Rotate object 90 clockwise" -msgstr "90° 시계방향으로 회전" - -#: data/ui/glabels-ui.xml.h:100 -msgid "Rotate object 90 counter-clockwise" -msgstr "90° 반시계방향으로 회전" - -#: data/ui/glabels-ui.xml.h:101 -msgid "Save" -msgstr "저장" - -#: data/ui/glabels-ui.xml.h:102 -msgid "Save As" -msgstr "다른 이름으로 저장" - -#: data/ui/glabels-ui.xml.h:103 -msgid "Save _As..." -msgstr "다른 이름으로 저장(_A)..." - -#: data/ui/glabels-ui.xml.h:104 -msgid "Save the current file" -msgstr "현재 파일이름으로 저장" - -#: data/ui/glabels-ui.xml.h:105 -msgid "Save the current file with a different name" -msgstr "현재파일을 다른이름으로 저장" - -#: data/ui/glabels-ui.xml.h:106 -msgid "Select All" -msgstr "모두 선택" - -#: data/ui/glabels-ui.xml.h:107 -msgid "Select _All" -msgstr "모두 선택(_A)" - -#: data/ui/glabels-ui.xml.h:108 -msgid "Select all objects" -msgstr "모든 개체 선택" - -#: data/ui/glabels-ui.xml.h:109 -msgid "Select, move and modify objects" -msgstr "선택, 개체 이동과 수정" - -#: data/ui/glabels-ui.xml.h:111 -msgid "Set drawing toolbar button style according to desktop default" -msgstr "기본 데스크탑 모양에 따라 그리기 도구 버튼 모양을 지정" - -#: data/ui/glabels-ui.xml.h:112 -msgid "Set main toolbar button style according to desktop default" -msgstr "기본 데스크탑 모양에 따라 주 도구 버튼 모양을 지정" - -#: data/ui/glabels-ui.xml.h:113 -msgid "Show _Tooltips" -msgstr "팁 보기(_T)" - -#: data/ui/glabels-ui.xml.h:114 -msgid "Show both icons and texts in the drawing toolbar" -msgstr "그리기 도구에 아이콘과 글자 보이기" - -#: data/ui/glabels-ui.xml.h:115 -msgid "Show both icons and texts in the main toolbar" -msgstr "주 도구에 아이콘 ê³¼ 글자 보이기" - -#: data/ui/glabels-ui.xml.h:116 -msgid "Show tooltips in the drawing toolbar" -msgstr "그리기 도구에 팁 보이기" - -#: data/ui/glabels-ui.xml.h:117 -msgid "Show tooltips in the main toolbar" -msgstr "주 도구에 팁 보이기" - -#: data/ui/glabels-ui.xml.h:118 -msgid "Show tooltips in the property toolbar" -msgstr "속성 도구에 팁 보이기" - -#: data/ui/glabels-ui.xml.h:119 -msgid "Template Designer" -msgstr "서식 디자이너" - -#: data/ui/glabels-ui.xml.h:120 -msgid "Template _Designer..." -msgstr "서식 디자이너(_D)..." - -#: data/ui/glabels-ui.xml.h:121 -msgid "Text color" -msgstr "글자 색상" - -#: data/ui/glabels-ui.xml.h:122 -msgid "U_n-select All" -msgstr "모든 선택 해제(_N)" - -#: data/ui/glabels-ui.xml.h:123 -msgid "Un-select All" -msgstr "모든 선택 해제" - -#: data/ui/glabels-ui.xml.h:124 -msgid "Undo" -msgstr "되돌리기" - -#: data/ui/glabels-ui.xml.h:125 -msgid "Undo the last action" -msgstr "마지막 동작으로 되돌리기" - -#: data/ui/glabels-ui.xml.h:126 -msgid "Zoom _1:1" -msgstr "1:1로 확대(_1)" - -#: data/ui/glabels-ui.xml.h:127 -msgid "Zoom _In" -msgstr "확대(_I)" - -#: data/ui/glabels-ui.xml.h:128 -msgid "Zoom _Out" -msgstr "축소(_O)" - -#: data/ui/glabels-ui.xml.h:129 -msgid "Zoom to _fit" -msgstr "맞춰서 확대(_F)" - -#: data/ui/glabels-ui.xml.h:130 -msgid "Zoom to fit window" -msgstr "윈도우에 맞춰서 확대" - -#: data/ui/glabels-ui.xml.h:131 -msgid "_About..." -msgstr "...에 대해(_A)" - -#: data/ui/glabels-ui.xml.h:132 -msgid "_Bottoms" -msgstr "아래(_B)" - -#: data/ui/glabels-ui.xml.h:135 -msgid "_Close" -msgstr "닫기(_C)" - -#: data/ui/glabels-ui.xml.h:136 -msgid "_Contents" -msgstr "목차(_C)" - -#: data/ui/glabels-ui.xml.h:137 -msgid "_Copy" -msgstr "복사(_C)" - -#: data/ui/glabels-ui.xml.h:138 -msgid "_Create Object" -msgstr "항목 만들기(_C)" - -#: data/ui/glabels-ui.xml.h:139 -msgid "_Debug" -msgstr "디버그(_D)" - -#: data/ui/glabels-ui.xml.h:141 -msgid "_Desktop Default" -msgstr "기본 데스크탑(_D)" - -#: data/ui/glabels-ui.xml.h:142 -msgid "_Drawing Toolbar" -msgstr "그리기 도구(_D)" - -#: data/ui/glabels-ui.xml.h:143 -msgid "_Edit" -msgstr "편집(_E)" - -#: data/ui/glabels-ui.xml.h:145 -msgid "_File" -msgstr "파일(_F)" - -#: data/ui/glabels-ui.xml.h:146 -msgid "_Grid" -msgstr "그리드(_G)" - -#: data/ui/glabels-ui.xml.h:147 -msgid "_Help" -msgstr "도움말(_H)" - -#: data/ui/glabels-ui.xml.h:148 -msgid "_Icon" -msgstr "아이콘(_I)" - -#: data/ui/glabels-ui.xml.h:152 -msgid "_Main Toolbar" -msgstr "주 도구(_M)" - -#: data/ui/glabels-ui.xml.h:153 -msgid "_Merge Properties..." -msgstr "여백 속성(_M)..." - -#: data/ui/glabels-ui.xml.h:154 -msgid "_New" -msgstr "새로 만들기(_N)" - -#: data/ui/glabels-ui.xml.h:155 -msgid "_Objects" -msgstr "항목(_O)" - -#: data/ui/glabels-ui.xml.h:156 -msgid "_Open..." -msgstr "열기(_O)..." - -#: data/ui/glabels-ui.xml.h:158 -msgid "_Paste" -msgstr "붙이기(_P)" - -#: data/ui/glabels-ui.xml.h:159 -msgid "_Print..." -msgstr "인쇄(_P)..." - -#: data/ui/glabels-ui.xml.h:160 -msgid "_Property Toolbar" -msgstr "속성 도구(_P)" - -#: data/ui/glabels-ui.xml.h:161 -msgid "_Quit" -msgstr "종료(_Q)" - -#: data/ui/glabels-ui.xml.h:164 -msgid "_Save" -msgstr "저장(_S)" - -#: data/ui/glabels-ui.xml.h:168 -msgid "_View" -msgstr "보기(_V)" - -#: data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr " " - -#: data/glade/prefs-dialog.glade.h:2 -#: data/glade/object-editor.glade.h:1 -#: data/glade/template-designer.glade.h:5 -msgid "*" -msgstr "*" - -#: data/glade/prefs-dialog.glade.h:3 -msgid "Default page size" -msgstr "기본 용지 크기" - -#: data/glade/prefs-dialog.glade.h:4 -msgid "Fill" -msgstr "채우기" - -#: data/glade/prefs-dialog.glade.h:5 -msgid "Line" -msgstr "선" - -#: data/glade/prefs-dialog.glade.h:6 -msgid "Text" -msgstr "글자" - -#: data/glade/prefs-dialog.glade.h:7 -msgid "Units" -msgstr "유닛" - -#: data/glade/prefs-dialog.glade.h:8 -#: data/glade/object-editor.glade.h:4 -msgid "Alignment:" -msgstr "위치:" - -#: data/glade/prefs-dialog.glade.h:9 -#: data/glade/object-editor.glade.h:8 -msgid "Color:" -msgstr "색상:" - -#: data/glade/prefs-dialog.glade.h:10 -msgid "Font:" -msgstr "글꼴:" - -#: data/glade/prefs-dialog.glade.h:11 -msgid "ISO A4" -msgstr "ISO A4 용지" - -#: data/glade/prefs-dialog.glade.h:12 -msgid "Inches" -msgstr "인치" - -#: data/glade/prefs-dialog.glade.h:13 -#: data/glade/object-editor.glade.h:19 -msgid "Line Spacing:" -msgstr "행간:" - -#: data/glade/prefs-dialog.glade.h:14 -msgid "Locale" -msgstr "로케일" - -#: data/glade/prefs-dialog.glade.h:15 -msgid "Millimeters" -msgstr "밀리미터" - -#: data/glade/prefs-dialog.glade.h:16 -msgid "Object defaults" -msgstr "기본 항목" - -#: data/glade/prefs-dialog.glade.h:17 -msgid "Points" -msgstr "포인트" - -#: data/glade/prefs-dialog.glade.h:18 -msgid "Select default properties for new objects." -msgstr "새 개체의 기본 속성을 선택" - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "구체적인 로케일을 선택" - -#: data/glade/prefs-dialog.glade.h:20 -#: data/templates/paper-sizes.xml.h:25 -msgid "US Letter" -msgstr "US Letter" - -#: data/glade/prefs-dialog.glade.h:21 -#: data/glade/object-editor.glade.h:29 -#: data/glade/template-designer.glade.h:72 -msgid "Width:" -msgstr "넓이:" - -#: data/glade/object-editor.glade.h:2 -msgid "00000000000 00000" -msgstr "00000000000 00000" - -#: data/glade/object-editor.glade.h:3 -msgid "Xxx object properties" -msgstr "Xxx 개체 속성" - -#: data/glade/object-editor.glade.h:5 -msgid "Allow merge to automatically shrink text" -msgstr "자동으로 축소한 글자에 병합" - -#: data/glade/object-editor.glade.h:6 -msgid "Angle:" -msgstr "각도:" - -#: data/glade/object-editor.glade.h:7 -msgid "Checksum" -msgstr "체크섬" - -#: data/glade/object-editor.glade.h:10 -msgid "Family:" -msgstr "패밀리:" - -#: data/glade/object-editor.glade.h:12 -msgid "Fill" -msgstr "채우기" - -#: data/glade/object-editor.glade.h:13 -#: data/glade/template-designer.glade.h:33 -msgid "Height:" -msgstr "높이:" - -#: data/glade/object-editor.glade.h:14 -msgid "Image" -msgstr "그림" - -#: data/glade/object-editor.glade.h:15 -msgid "Insert merge field" -msgstr "병합 필드 삽입" - -#: data/glade/object-editor.glade.h:17 -msgid "Length:" -msgstr "길이:" - -#: data/glade/object-editor.glade.h:18 -msgid "Line" -msgstr "선" - -#: data/glade/object-editor.glade.h:20 -msgid "Literal:" -msgstr "Literal:" - -#: data/glade/object-editor.glade.h:21 -msgid "Load image" -msgstr "그림 불러옴" - -#: data/glade/object-editor.glade.h:22 -msgid "Position" -msgstr "위치" - -#: data/glade/object-editor.glade.h:23 -msgid "Reset image size" -msgstr "그림크기 재설정" - -#: data/glade/object-editor.glade.h:24 -msgid "Size" -msgstr "크기" - -#: data/glade/object-editor.glade.h:25 -msgid "Size:" -msgstr "크기:" - -#: data/glade/object-editor.glade.h:26 -msgid "Style" -msgstr "모양" - -#: data/glade/object-editor.glade.h:27 -msgid "Style:" -msgstr "모양:" - -#: data/glade/object-editor.glade.h:30 -msgid "X:" -msgstr "X:" - -#: data/glade/object-editor.glade.h:31 -msgid "Y:" -msgstr "Y:" - -#: data/glade/object-editor.glade.h:32 -msgid "degrees" -msgstr "degrees" - -#: data/glade/object-editor.glade.h:33 -msgid "dialog1" -msgstr "dialog1" - -#: data/glade/object-editor.glade.h:34 -msgid "digits:" -msgstr "digits:" - -#: data/glade/object-editor.glade.h:35 -msgid "format:" -msgstr "서식:" - -#: data/glade/template-designer.glade.h:1 -msgid " " -msgstr " " - -#: data/glade/template-designer.glade.h:2 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(예: \"주소라벨\", \"명함\", ...)" - -#: data/glade/template-designer.glade.h:3 -msgid "(e.g., 8163A)" -msgstr "(예: 8163A)" - -#: data/glade/template-designer.glade.h:4 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(예: Avery, Acme, ...)" - -#: data/glade/template-designer.glade.h:6 -msgid "1. Outer radius:" -msgstr "1. 바깥 반지름:" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "1. 반지름:" - -#: data/glade/template-designer.glade.h:8 -msgid "1. Width:" -msgstr "1. 넓이:" - -#: data/glade/template-designer.glade.h:9 -msgid "2. Height:" -msgstr "2. 높이:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "2. 안쪽 반지름:" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "2. 여백 (겹친 인쇄 허용):" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "3. 오려내기 넓이:" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "3. 여백" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "3. 둥글기 (귀퉁이 각도):" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "4. 오려내기 높이:" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "4. 좌우 여백 (겹친 인쇄 허용):" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "5. 아래위 여백 (겹친 인쇄 허용):" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "5. 여백 (겹친 인쇄 허용):" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "6. 라벨 내 여백" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "상표/제조업체:" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD (credit card CD 포함)" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"축하드립니다!\n" -"\n" -"gLabels 서식문서 디자이너로 서식 만들기를 마쳤습니다.\n" -"새로 만든 서식을 저장하기 원한다면 \"적용\" 을 누르세요.\n" -"\n" -"\"취소\"를 누르면 만든것을 버리게 됩니다.\n" -"또는 \"뒤로\"를 선택하여 만든것을 편집 할 수 있습니다." - -#: data/glade/template-designer.glade.h:30 -msgid "Design Completed" -msgstr "서식 디자인 완료됨" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "왼쪽 가장자리 부터 (x0):" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "위쪽 가장자리 부터 (y0):" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "수평 pitch (dx):" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" -"서식을 얼마나 포함합니까?\n" -"\n" -"레이아웃 서식 개수 지정을 통해 두개 이내의 레이아웃을 만들 수 있습니다.\n" -"보통은 아래 첫번째 예제처럼 한개의 레이아웃을 필요로 하지만,\n" -"어떤것은 두번째 예제처럼 두개의 레이아웃을 필요로 하는것도 있습니다." - -#: data/glade/template-designer.glade.h:40 -msgid "Label Size (CD/DVD)" -msgstr "라벨 크기(CD/DVD)" - -#: data/glade/template-designer.glade.h:41 -msgid "Label Size (Round)" -msgstr "라벨 크기 (둥글기)" - -#: data/glade/template-designer.glade.h:42 -msgid "Label or Card Shape" -msgstr "라벨 또는 카드 외형" - -#: data/glade/template-designer.glade.h:43 -msgid "Label or Card Size (Rectangular)" -msgstr "라벨 또는 카드 크기(직사각형)" - -#: data/glade/template-designer.glade.h:44 -msgid "Layout #1" -msgstr "레이아웃 #1:" - -#: data/glade/template-designer.glade.h:45 -msgid "Layout #2" -msgstr "레이아웃 #2:" - -#: data/glade/template-designer.glade.h:46 -msgid "Layout(s)" -msgstr "레이아웃" - -#: data/glade/template-designer.glade.h:47 -msgid "Name and Description" -msgstr "이름과 설명" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "가로 개수 (nx):" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "세로 개수 (ny):" - -#: data/glade/template-designer.glade.h:50 -msgid "Number of Layouts" -msgstr "레이아웃 선택" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "레이아웃 선택:" - -#: data/glade/template-designer.glade.h:52 -msgid "Page Size" -msgstr "용지 크기" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "라벨분류:" - -#: data/glade/template-designer.glade.h:55 -msgid "Please enter the following identifying information about the template stationery." -msgstr "입력 상자에 기본 서식 정보를 입력하세요." - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "레이아웃 정보를 입력하세요." - -#: data/glade/template-designer.glade.h:57 -msgid "Please enter the following size parameters of a single label in your template." -msgstr "라벨서식의 치수를 입력하세요." - -#: data/glade/template-designer.glade.h:58 -msgid "Please enter the following size parameters of a single label or card in your template." -msgstr "라벨서식 또는 카드서식의 치수를 입력하세요." - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "라벨 또는 카드의 기본 형태를 선택하세요." - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "서식 용지의 크기 선택" - -#: data/glade/template-designer.glade.h:61 -msgid "Print test sheet" -msgstr "용지 테스트 인쇄" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "직사각형 또는 정사각형(마무리를 둥글게 만들 수 있음)" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "둥근형" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"2. 두개의 레이아웃\n" -"서식 필요" - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"1. 한개의 레이아웃\n" -"서식 필요" - -#: data/glade/template-designer.glade.h:68 -msgid "Vertical pitch (dy):" -msgstr "수직 pitch (dy):" - -#: data/glade/template-designer.glade.h:69 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"gLabels 서식 제작기에 어서오세요.\n" -"\n" -"차근차근 gLabels의 사용자 서식을 쉽게 만들 수 있게 도와드립니다. " - -#: data/templates/paper-sizes.xml.h:1 -msgid "A0" -msgstr "A0용지" - -#: data/templates/paper-sizes.xml.h:2 -msgid "A1" -msgstr "A1용지" - -#: data/templates/paper-sizes.xml.h:3 -msgid "A10" -msgstr "A10용지" - -#: data/templates/paper-sizes.xml.h:4 -msgid "A2" -msgstr "A2용지" - -#: data/templates/paper-sizes.xml.h:5 -msgid "A3" -msgstr "A3용지" - -#: data/templates/paper-sizes.xml.h:6 -msgid "A4" -msgstr "A4용지" - -#: data/templates/paper-sizes.xml.h:7 -msgid "A5" -msgstr "A5용지" - -#: data/templates/paper-sizes.xml.h:8 -msgid "A6" -msgstr "A6용지" - -#: data/templates/paper-sizes.xml.h:9 -msgid "A7" -msgstr "A7용지" - -#: data/templates/paper-sizes.xml.h:10 -msgid "A8" -msgstr "A8용지" - -#: data/templates/paper-sizes.xml.h:11 -msgid "A9" -msgstr "A9용지" - -#: data/templates/paper-sizes.xml.h:12 -msgid "B0" -msgstr "B0용지" - -#: data/templates/paper-sizes.xml.h:13 -msgid "B1" -msgstr "B1용지" - -#: data/templates/paper-sizes.xml.h:14 -msgid "B10" -msgstr "B10용지" - -#: data/templates/paper-sizes.xml.h:15 -msgid "B2" -msgstr "B2용지" - -#: data/templates/paper-sizes.xml.h:16 -msgid "B3" -msgstr "B3용지" - -#: data/templates/paper-sizes.xml.h:17 -msgid "B4" -msgstr "B4용지" - -#: data/templates/paper-sizes.xml.h:18 -msgid "B5" -msgstr "B5용지" - -#: data/templates/paper-sizes.xml.h:19 -msgid "B6" -msgstr "B6용지" - -#: data/templates/paper-sizes.xml.h:20 -msgid "B7" -msgstr "B7용지" - -#: data/templates/paper-sizes.xml.h:21 -msgid "B8" -msgstr "B8용지" - -#: data/templates/paper-sizes.xml.h:22 -msgid "B9" -msgstr "B9용지" - -#: data/templates/paper-sizes.xml.h:23 -msgid "US Executive" -msgstr "US Executive" - -#: data/templates/paper-sizes.xml.h:24 -msgid "US Legal" -msgstr "US Legal" - -#: data/templates/avery-us-templates.xml.h:1 -#: data/templates/zweckform-iso-templates.xml.h:1 -msgid "Address Labels" -msgstr "주소 라벨" - -#: data/templates/avery-us-templates.xml.h:2 -#: data/templates/avery-iso-templates.xml.h:2 -#: data/templates/zweckform-iso-templates.xml.h:3 -#: data/templates/misc-us-templates.xml.h:2 -#: data/templates/misc-iso-templates.xml.h:9 -msgid "Business Cards" -msgstr "명함" - -#: data/templates/avery-us-templates.xml.h:3 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "CD/DVD 라벨 (Disc 라벨)" - -#: data/templates/avery-us-templates.xml.h:4 -msgid "Diskette Labels" -msgstr "디스크 라벨" - -#: data/templates/avery-us-templates.xml.h:5 -msgid "Filing Labels" -msgstr "출원 라벨" - -#: data/templates/avery-us-templates.xml.h:6 -msgid "Full Sheet Labels" -msgstr "Full Sheet 라벨" - -#: data/templates/avery-us-templates.xml.h:7 -msgid "Large Round Labels" -msgstr "큰 원형 라벨" - -#: data/templates/avery-us-templates.xml.h:8 -msgid "Name Badge Labels" -msgstr "Name Badge 라벨" - -#: data/templates/avery-us-templates.xml.h:9 -msgid "Return Address Labels" -msgstr "반송 주소용 라벨" - -#: data/templates/avery-us-templates.xml.h:10 -msgid "Shipping Labels" -msgstr "출하 라벨" - -#: data/templates/avery-us-templates.xml.h:11 -msgid "Small Round Labels" -msgstr "작은 원형 라벨" - -#: data/templates/avery-us-templates.xml.h:12 -msgid "Square Labels" -msgstr "구형 라벨" - -#: data/templates/avery-us-templates.xml.h:13 -msgid "Video Tape Face Labels" -msgstr "비디오 테입 앞면 라벨" - -#: data/templates/avery-us-templates.xml.h:14 -msgid "Video Tape Spine Labels" -msgstr "비디오 테입 옆면 라벨" - -#: data/templates/avery-iso-templates.xml.h:1 -msgid "Address labels" -msgstr "주소 라벨" - -#: data/templates/avery-iso-templates.xml.h:3 -msgid "CD Booklet" -msgstr "CD Booklet" - -#: data/templates/avery-iso-templates.xml.h:4 -msgid "CD Inlet" -msgstr "CD Inlet" - -#: data/templates/avery-iso-templates.xml.h:5 -#: data/templates/zweckform-iso-templates.xml.h:4 -#: data/templates/misc-us-templates.xml.h:4 -#: data/templates/misc-iso-templates.xml.h:10 -msgid "CD/DVD Labels" -msgstr "CD/DVD 라벨" - -#: data/templates/avery-iso-templates.xml.h:6 -msgid "Diskette labels" -msgstr "디스크 라벨" - -#: data/templates/avery-iso-templates.xml.h:7 -#: data/templates/zweckform-iso-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:17 -msgid "Mailing Labels" -msgstr "봉투 라벨" - -#: data/templates/avery-iso-templates.xml.h:8 -msgid "Mailing labels" -msgstr "봉투 라벨" - -#: data/templates/avery-iso-templates.xml.h:9 -msgid "Mini Address Labels" -msgstr "작은 주소라벨" - -#: data/templates/avery-iso-templates.xml.h:10 -msgid "Shipping labels" -msgstr "출하 라벨" - -#: data/templates/zweckform-iso-templates.xml.h:2 -msgid "Allround Labels" -msgstr "Allround 라벨" - -#: data/templates/zweckform-iso-templates.xml.h:5 -msgid "Correction and Cover-up Labels" -msgstr "수집 ê³¼ Cover-up 라벨" - -#: data/templates/zweckform-iso-templates.xml.h:6 -msgid "Lever Arch File Labels" -msgstr "Lever Arch 파일 라벨" - -#: data/templates/zweckform-iso-templates.xml.h:8 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "QSL-Karten Etiketten (70mm x 50.8mm)" - -#: data/templates/zweckform-iso-templates.xml.h:9 -msgid "Rectangular Copier Labels" -msgstr "분류표기 라벨" - -#: data/templates/zweckform-iso-templates.xml.h:10 -#: data/templates/misc-iso-templates.xml.h:22 -msgid "Rectangular Labels" -msgstr "직사각형 라벨" - -#: data/templates/zweckform-iso-templates.xml.h:11 -msgid "Video Labels (back)" -msgstr "비디오 라벨 (뒤)" - -#: data/templates/misc-us-templates.xml.h:1 -msgid "Business Card CD" -msgstr "명함 CD" - -#: data/templates/misc-us-templates.xml.h:3 -msgid "CD Template Rectangles" -msgstr "CD 서식 (직사각형)" - -#: data/templates/misc-us-templates.xml.h:5 -msgid "CD/DVD Labels (Face Only)" -msgstr "CD/DVD 라벨 (표지만)" - -#: data/templates/misc-us-templates.xml.h:6 -#: data/templates/misc-iso-templates.xml.h:11 -msgid "CD/DVD Labels (face only)" -msgstr "CD/DVD 라벨 (표지만)" - -#: data/templates/misc-us-templates.xml.h:7 -msgid "DLT Labels" -msgstr "DLT 라벨" - -#: data/templates/misc-us-templates.xml.h:8 -msgid "Microtube labels" -msgstr "Microtube 라벨" - -#: data/templates/misc-us-templates.xml.h:9 -msgid "Mini-CD Labels" -msgstr "Mini-CD 라벨" - -#: data/templates/misc-us-templates.xml.h:10 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "PRO CD 라벨 2-up (CD 세로표지 전용)" - -#: data/templates/misc-us-templates.xml.h:11 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "PRO CD 라벨 2-up (표지만)" - -#: data/templates/misc-us-templates.xml.h:12 -#: data/templates/misc-iso-templates.xml.h:21 -msgid "PRO CD Labels 2-up (face only)" -msgstr "PRO CD 라벨 2-up (표지만)" - -#: data/templates/misc-us-templates.xml.h:13 -msgid "Slimline CD Case (rightside up)" -msgstr "Slimline CD 케이스 (우측옆)" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Slimline CD Case (upside down)" -msgstr "Slimline CD 케이스(상위)" - -#: data/templates/misc-iso-templates.xml.h:1 -msgid "Agipa 119488: Business Cards" -msgstr "Agipa 119488: 명함" - -#: data/templates/misc-iso-templates.xml.h:2 -msgid "Allround Labels --24" -msgstr "Allround 라벨 --24" - -#: data/templates/misc-iso-templates.xml.h:3 -msgid "Allround Labels --44" -msgstr "Allround 라벨 --44" - -#: data/templates/misc-iso-templates.xml.h:4 -msgid "Allround Labels --64" -msgstr "Allround 라벨 --64" - -#: data/templates/misc-iso-templates.xml.h:5 -msgid "Allround Labels --65" -msgstr "Allround 라벨 --65" - -#: data/templates/misc-iso-templates.xml.h:6 -msgid "Arch File Labels" -msgstr "Arch 파일 라벨" - -#: data/templates/misc-iso-templates.xml.h:7 -msgid "Arch File Labels (large)" -msgstr "Arch 파일 라벨 (큰것)" - -#: data/templates/misc-iso-templates.xml.h:8 -msgid "Arch File Labels (small)" -msgstr "Arch 파일 라벨 (작은것)" - -#: data/templates/misc-iso-templates.xml.h:12 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "기본 CD/DVD 라벨 (표지만)" - -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Diskette Labels (face only)" -msgstr "디스켓 라벨 (표지만)" - -#: data/templates/misc-iso-templates.xml.h:14 -msgid "EPSON Photo Stickers 16" -msgstr "EPSON 포토 스티커 16" - -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Etiketten" -msgstr "Etiketten" - -#: data/templates/misc-iso-templates.xml.h:16 -msgid "Fridge Magnet Stickers" -msgstr "Fridge Magnet 스티커" - -#: data/templates/misc-iso-templates.xml.h:18 -msgid "Mailing Labels --14" -msgstr "봉투 라벨 --14" - -#: data/templates/misc-iso-templates.xml.h:19 -msgid "Mailing Labels-2 columns" -msgstr "주소 라벨 (2형)" - -#: data/templates/misc-iso-templates.xml.h:20 -msgid "Mailing Labels-3 columns" -msgstr "주소라벨 (3형)" - -#: data/templates/misc-iso-templates.xml.h:23 -msgid "Video Labels (face only)" -msgstr "비디오 라벨 (표지만)" - -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "라벨, 명함 그리고 미디어 커버 만들기" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "gLabels 라벨 디자이너" - -#: data/mime/glabels.keys.in.h:1 -#: data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "gLabels 프로젝트 파일" - diff --git a/glabels2/po/pl.po b/glabels2/po/pl.po deleted file mode 100644 index d67a9065..00000000 --- a/glabels2/po/pl.po +++ /dev/null @@ -1,2650 +0,0 @@ -# Polish translation for gLabels -# Copyright (C) 2002 Free Software Foundation, Inc. -# Arkadiusz Lipiec , 2002. -# -msgid "" -msgstr "" -"Project-Id-Version: gLabels\n" -"POT-Creation-Date: 2004-08-08 00:43-0400\n" -"PO-Revision-Date: 2002-07-23 11:43+0100\n" -"Last-Translator: Arkadiusz Lipiec \n" -"Language-Team: Polish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-2\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels.c:55 -msgid "Show view debugging messages." -msgstr "" - -#: src/glabels.c:58 -msgid "Show item debugging messages." -msgstr "" - -#: src/glabels.c:61 -msgid "Show printing debugging messages." -msgstr "" - -#: src/glabels.c:64 -msgid "Show prefs debugging messages." -msgstr "" - -#: src/glabels.c:67 -msgid "Show file debugging messages." -msgstr "" - -#: src/glabels.c:70 -msgid "Show document debugging messages." -msgstr "" - -#: src/glabels.c:73 -msgid "Show template debugging messages." -msgstr "" - -#: src/glabels.c:76 -msgid "Show paper debugging messages." -msgstr "" - -#: src/glabels.c:79 -msgid "Show xml debugging messages." -msgstr "" - -#: src/glabels.c:82 -msgid "Show document merge debugging messages." -msgstr "" - -#: src/glabels.c:85 -msgid "Show commands debugging messages." -msgstr "" - -#: src/glabels.c:88 -msgid "Show undo debugging messages." -msgstr "" - -#: src/glabels.c:91 -msgid "Show recent debugging messages." -msgstr "" - -#: src/glabels.c:94 -msgid "Show window debugging messages." -msgstr "" - -#: src/glabels.c:97 -msgid "Show ui debugging messages." -msgstr "" - -#: src/glabels.c:100 -msgid "Show property_bar debugging messages." -msgstr "" - -#: src/glabels.c:103 -msgid "Show media select widget debugging messages." -msgstr "" - -#: src/glabels.c:106 -msgid "Show mini preview widget debugging messages." -msgstr "" - -#: src/glabels.c:109 -msgid "Show pixbuf cache debugging messages." -msgstr "" - -#: src/glabels.c:112 -msgid "Show widget debugging messages." -msgstr "" - -#: src/glabels.c:115 -msgid "Show object editor debugging messages." -msgstr "" - -#: src/glabels.c:118 -msgid "Turn on all debugging messages." -msgstr "" - -#: src/glabels.c:187 -msgid "Could not initialize Bonobo!\n" -msgstr "" - -#: src/glabels-batch.c:48 -msgid "print this message" -msgstr "wy¶wietla ten komunikat" - -#: src/glabels-batch.c:50 -msgid "print the version of glabels-batch being used" -msgstr "wy¶wietla aktualnie u¿ywan± wersjê glabel-batch" - -#: src/glabels-batch.c:52 -msgid "set output filename (default=\"output.ps\")" -msgstr "okre¶l nazwê pliku wyj¶ciowego (domy¶lnie=\"output.ps\")" - -#: src/glabels-batch.c:52 -msgid "filename" -msgstr "nazwa pliku" - -#: src/glabels-batch.c:54 -msgid "number of sheets (default=1)" -msgstr "liczba arkuszy (domy¶lnie=1)" - -#: src/glabels-batch.c:54 -msgid "sheets" -msgstr "arkusz(e/y)" - -#: src/glabels-batch.c:56 -msgid "number of copies (default=1)" -msgstr "liczba kopii (domy¶lnie=1)" - -#: src/glabels-batch.c:56 -msgid "copies" -msgstr "kopi(a/e/i)" - -#: src/glabels-batch.c:58 src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "drukowanie ramek (w celu przetestowania wyrównania)" - -#: src/glabels-batch.c:60 src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "drukowanie odwrócone (np. odbicie zwierciadlane)" - -#: src/glabels-batch.c:96 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[OPCJA...] PLIK_GLABELS..." - -#: src/glabels-batch.c:116 -msgid "missing glabels file\n" -msgstr "brak pliku glabels\n" - -#: src/glabels-batch.c:157 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "nie mo¿na otworzyæ pliku glabels o nazwie %s\n" - -#: src/window.c:244 -msgid "(none) - gLabels" -msgstr "" - -#: src/window.c:414 -msgid "(modified)" -msgstr "" - -#: src/stock.c:65 data/ui/glabels-ui.xml.h:165 -#, fuzzy -msgid "_Select Mode" -msgstr "Wybierz" - -#: src/stock.c:66 data/ui/glabels-ui.xml.h:166 -#, fuzzy -msgid "_Text" -msgstr "Tekst" - -#: src/stock.c:67 data/ui/glabels-ui.xml.h:151 -#, fuzzy -msgid "_Line" -msgstr "Linia" - -#: src/stock.c:68 data/ui/glabels-ui.xml.h:133 -#, fuzzy -msgid "_Box" -msgstr "Skrzynka" - -#: src/stock.c:69 data/ui/glabels-ui.xml.h:144 -#, fuzzy -msgid "_Ellipse" -msgstr "Elipsa" - -#: src/stock.c:70 data/ui/glabels-ui.xml.h:149 -#, fuzzy -msgid "_Image" -msgstr "Obraz" - -#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 -#, fuzzy -msgid "Bar_code" -msgstr "Kod paskowy" - -#: src/stock.c:72 -#, fuzzy -msgid "_Merge Properties" -msgstr "W³a¶ciwo¶ci z³±czania" - -#: src/stock.c:73 -#, fuzzy -msgid "Object _Properties" -msgstr "W³a¶ciwo¶ci tekstu" - -#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 -#, fuzzy -msgid "Bring to _Front" -msgstr "Przesun na wierzch" - -#: src/stock.c:75 data/ui/glabels-ui.xml.h:110 -#, fuzzy -msgid "Send to _Back" -msgstr "Przesuñ w dó³" - -#: src/stock.c:76 data/ui/glabels-ui.xml.h:97 -#, fuzzy -msgid "Rotate _Left" -msgstr "Obróæ" - -#: src/stock.c:77 data/ui/glabels-ui.xml.h:98 -#, fuzzy -msgid "Rotate _Right" -msgstr "Obróæ" - -#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "" - -#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "" - -#: src/stock.c:80 data/ui/glabels-ui.xml.h:150 -msgid "_Lefts" -msgstr "" - -#: src/stock.c:81 data/ui/glabels-ui.xml.h:162 -msgid "_Rights" -msgstr "" - -#: src/stock.c:82 data/ui/glabels-ui.xml.h:134 -msgid "_Centers" -msgstr "" - -#: src/stock.c:83 data/ui/glabels-ui.xml.h:167 -#, fuzzy -msgid "_Tops" -msgstr "_Narzêdzia" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "" - -#: src/stock.c:85 -msgid "Centers" -msgstr "" - -#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "" - -#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "" - -#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "" - -#: src/stock.c:90 src/stock.c:92 -#, fuzzy -msgid "Linked" -msgstr "Linia" - -#: src/stock.c:91 src/stock.c:93 -#, fuzzy -msgid "Not Linked" -msgstr "Brak" - -#: src/ui-property-bar.c:345 src/object-editor.c:499 -#, fuzzy -msgid "Default" -msgstr "Usuñ" - -#: src/ui-property-bar.c:360 src/object-editor.c:512 -msgid "No fill" -msgstr "" - -#: src/ui-property-bar.c:375 src/object-editor.c:505 -#, fuzzy -msgid "No line" -msgstr "Brak" - -#: src/ui-sidebar.c:180 -#, fuzzy -msgid "Object properties" -msgstr "W³a¶ciwo¶ci tekstu" - -#: src/commands.c:385 -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/commands.c:399 -msgid "See the file AUTHORS for additional credits," -msgstr "" - -#: src/commands.c:400 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "" - -#: src/commands.c:409 -msgid " " -msgstr "" - -#: src/commands.c:424 -#, fuzzy -msgid "glabels" -msgstr "Etykiety" - -#: src/file.c:100 -msgid "New Label or Card" -msgstr "Nowa etykieta lub karta" - -#: src/file.c:132 src/file.c:304 -msgid "Media Type" -msgstr "Typ no¶nika" - -#: src/file.c:138 src/file.c:310 -msgid "Label orientation" -msgstr "U³o¿enie etykiety" - -#: src/file.c:269 -#, fuzzy -msgid "Label properties" -msgstr "W³a¶ciwo¶ci tekstu" - -#: src/file.c:452 src/file.c:870 -msgid "All files" -msgstr "" - -#: src/file.c:457 src/file.c:875 -#, fuzzy -msgid "gLabels documents" -msgstr "Glabels: Preferencje" - -#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 -#, fuzzy -msgid "Empty file name selection" -msgstr "Usuwa wszelkie zaznaczenia" - -#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 -msgid "Please select a file or supply a valid file name" -msgstr "" - -#: src/file.c:519 src/file.c:631 -msgid "File does not exist" -msgstr "" - -#: src/file.c:563 data/ui/glabels-ui.xml.h:75 -msgid "Open" -msgstr "Otwórz" - -#: src/file.c:565 -msgid "Open label" -msgstr "Otwórz etykietê" - -#: src/file.c:707 -#, fuzzy, c-format -msgid "Could not open file \"%s\"" -msgstr "Nie mo¿na otworzyæ pliku" - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "" - -#: src/file.c:797 src/file.c:979 src/file.c:1174 -#, fuzzy, c-format -msgid "Could not save file \"%s\"" -msgstr "Nie mo¿na zapisaæ pliku" - -#: src/file.c:805 src/file.c:987 src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "" - -#: src/file.c:848 src/file.c:1048 -#, fuzzy, c-format -msgid "Save \"%s\" as" -msgstr "Zapisz etykietê jako" - -#: src/file.c:935 src/file.c:1131 -#, fuzzy -msgid "Please supply a valid file name" -msgstr "Nale¿y podaæ nazwê pliku" - -#: src/file.c:952 src/file.c:1147 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "" - -#: src/file.c:960 src/file.c:1155 -msgid "File already exists." -msgstr "" - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "" - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "" - -#. Should not happen -#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 -#: data/glade/object-editor.glade.h:37 -msgid "points" -msgstr "punkty(-ów)" - -#: src/prefs.c:158 data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "cali" - -#: src/prefs.c:160 -msgid "mm" -msgstr "mm" - -#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 -#, fuzzy -msgid "gLabels Preferences" -msgstr "Glabels: Preferencje" - -#. -#. * Submenu: Order -#. -#: src/view.c:3570 data/ui/glabels-ui.xml.h:157 -msgid "_Order" -msgstr "" - -#. -#. * Submenu: Rotate/Flip -#. -#: src/view.c:3591 data/ui/glabels-ui.xml.h:163 -#, fuzzy -msgid "_Rotate/Flip" -msgstr "Obróæ" - -#. -#. * Submenu: Align Horizontally -#. -#: src/view.c:3624 -msgid "Align _Horizontally" -msgstr "" - -#. -#. * Submenu: Align Vertically -#. -#: src/view.c:3663 -msgid "Align _Vertically" -msgstr "" - -#: src/view.c:3724 data/ui/glabels-ui.xml.h:140 -#, fuzzy -msgid "_Delete" -msgstr "Usuñ" - -#. Build editor. -#: src/view-box.c:223 -#, fuzzy -msgid "Box object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci skrzynki" - -#. Build editor. -#: src/view-ellipse.c:223 -#, fuzzy -msgid "Ellipse object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci elipsy" - -#. Build editor. -#: src/view-line.c:223 -#, fuzzy -msgid "Line object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci skrzynki" - -#. Build editor. -#: src/view-image.c:222 -#, fuzzy -msgid "Image object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci obrazu" - -#. Build editor. -#: src/view-text.c:250 -#, fuzzy -msgid "Text object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci skrzynki" - -#: src/view-text.c:562 data/glade/object-editor.glade.h:28 -msgid "Text" -msgstr "Tekst" - -#. Build editor. -#: src/view-barcode.c:209 -#, fuzzy -msgid "Barcode object properties" -msgstr "Modyfikacja w³a¶ciwo¶ci kodu paskowego" - -#: src/view-barcode.c:579 src/print.c:1088 -#, fuzzy -msgid "Invalid barcode data" -msgstr "Niepoprawny kod paskowy" - -#: src/merge-properties-dialog.c:231 -#, fuzzy -msgid "Merge Properties" -msgstr "W³a¶ciwo¶ci z³±czania" - -#. ---- Source section ---- -#: src/merge-properties-dialog.c:237 -msgid "Source" -msgstr "¬ród³o" - -#: src/merge-properties-dialog.c:245 -msgid "Format:" -msgstr "Format:" - -#. Location line -#: src/merge-properties-dialog.c:273 -msgid "Location:" -msgstr "Po³o¿enie:" - -#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 -msgid "Select merge-database source" -msgstr "Wybierz ¼ród³o bazy danych z³±czania " - -#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 -msgid "N/A" -msgstr "N/A" - -#. ---- Sample Fields section ---- -#: src/merge-properties-dialog.c:300 -msgid "Record selection/preview:" -msgstr "" - -#: src/merge-properties-dialog.c:326 -msgid "Select" -msgstr "Wybierz" - -#: src/merge-properties-dialog.c:334 -msgid "Record/Field" -msgstr "" - -#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 -msgid "Data" -msgstr "Dane" - -#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:82 -msgid "Print" -msgstr "Wydrukuj" - -#: src/print-dialog.c:281 -msgid "_Job" -msgstr "" - -#: src/print-dialog.c:286 -#, fuzzy -msgid "P_rinter" -msgstr "Wydrukuj" - -#. ----------- Add simple-copies widget ------------ -#: src/print-dialog.c:314 -msgid "Copies" -msgstr "Kopie" - -#. ------- Add merge control widget ------------ -#: src/print-dialog.c:322 -msgid "Document merge control" -msgstr "Kontrola z³±czania dokumentów" - -#. ----------- Add custom print options area ------------ -#: src/print-dialog.c:330 -msgid "Options" -msgstr "Opcje" - -#: src/print-dialog.c:351 -msgid "print crop marks" -msgstr "" - -#: src/print-dialog.c:553 src/print-dialog.c:592 -msgid "Print preview" -msgstr "Podgl±d wydruku" - -#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 -msgid "gLabels Template Designer" -msgstr "" - -#: src/bc.c:60 -msgid "POSTNET (any)" -msgstr "" - -#: src/bc.c:63 -msgid "POSTNET-5 (ZIP only)" -msgstr "" - -#: src/bc.c:66 -msgid "POSTNET-9 (ZIP+4)" -msgstr "" - -#: src/bc.c:69 -msgid "POSTNET-11 (DPBC)" -msgstr "" - -#: src/bc.c:72 -msgid "EAN (any)" -msgstr "" - -#: src/bc.c:75 -msgid "EAN-8" -msgstr "" - -#: src/bc.c:78 -msgid "EAN-8 +2" -msgstr "" - -#: src/bc.c:81 -msgid "EAN-8 +5" -msgstr "" - -#: src/bc.c:84 -msgid "EAN-13" -msgstr "" - -#: src/bc.c:87 -msgid "EAN-13 +2" -msgstr "" - -#: src/bc.c:90 -msgid "EAN-13 +5" -msgstr "" - -#: src/bc.c:93 -msgid "UPC (UPC-A or UPC-E)" -msgstr "" - -#: src/bc.c:96 -msgid "UPC-A" -msgstr "" - -#: src/bc.c:99 -msgid "UPC-A +2" -msgstr "" - -#: src/bc.c:102 -msgid "UPC-A +5" -msgstr "" - -#: src/bc.c:105 -msgid "UPC-E" -msgstr "" - -#: src/bc.c:108 -msgid "UPC-E +2" -msgstr "" - -#: src/bc.c:111 -msgid "UPC-E +5" -msgstr "" - -#: src/bc.c:114 -msgid "ISBN" -msgstr "" - -#: src/bc.c:117 -msgid "ISBN +5" -msgstr "" - -#: src/bc.c:120 -msgid "Code 39" -msgstr "" - -#: src/bc.c:123 -msgid "Code 128" -msgstr "" - -#: src/bc.c:126 -msgid "Code 128C" -msgstr "" - -#: src/bc.c:129 -msgid "Code 128B" -msgstr "" - -#: src/bc.c:132 -msgid "Interleaved 2 of 5" -msgstr "" - -#: src/bc.c:135 -msgid "Codabar" -msgstr "" - -#: src/bc.c:138 -msgid "MSI" -msgstr "" - -#: src/bc.c:141 -msgid "Plessey" -msgstr "" - -#: src/label.c:569 -msgid "Untitled" -msgstr "" - -#: src/xml-label.c:176 src/xml-label.c:213 -msgid "xmlParseFile error" -msgstr "b³±d przetwarzania pliku xml" - -#: src/xml-label.c:250 -msgid "No document root" -msgstr "Brak g³ównego dokumentu" - -#: src/xml-label.c:264 -msgid "Importing from glabels 0.1 format" -msgstr "" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "" - -#: src/xml-label.c:279 -msgid "Importing from glabels 1.91 format" -msgstr "" - -#: src/xml-label.c:282 -#, fuzzy -msgid "bad document, unknown glabels Namespace" -msgstr "" -"dokument jest niepoprawnego typu, nie odnaleziono przestrzeni nazw glabels" - -#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Niepoprawny wêze³ g³ówny = \"%s\"" - -#: src/xml-label.c:348 src/xml-label-191.c:165 -#, fuzzy, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "Niepoprawny wêze³ g³ówny = \"%s\"" - -#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "niepoprawny wêze³ = \"%s\"" - -#: src/xml-label.c:796 src/xml-label-191.c:605 -#, fuzzy, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "niepoprawny wêze³ = \"%s\"" - -#: src/xml-label.c:962 libglabels/xml-template.c:528 -msgid "Utf8 conversion error." -msgstr "" - -#: src/xml-label.c:969 libglabels/xml-template.c:535 -msgid "Problem saving xml file." -msgstr "Problem podczas zapisu pliku xml." - -#. This should always be an id, but just in case a name -#. slips by! -#: src/xml-label-191.c:680 libglabels/xml-template.c:192 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "" - -#: src/xml-label-191.c:690 libglabels/xml-template.c:202 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "" - -#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 -msgid "None" -msgstr "Brak" - -#: src/merge-init.c:53 -#, fuzzy -msgid "Text file with comma delimeters (CSV)" -msgstr "Tekst oddzielony przecinkami (CSV)" - -#: src/merge-init.c:60 -#, fuzzy -msgid "Text file with colon delimeters" -msgstr "Tekst oddzielany dwukropkami" - -#: src/merge-init.c:67 -#, fuzzy -msgid "Text file with tab delimeters" -msgstr "Tekst oddzielony tabulacjami" - -#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 -#, fuzzy -msgid "File:" -msgstr "Wype³nienie" - -#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 -msgid "Key:" -msgstr "Klucz:" - -#: src/wdgt-print-copies.c:179 -msgid "Sheets:" -msgstr "Arkusze:" - -#: src/wdgt-print-copies.c:197 -msgid "Labels" -msgstr "Etykiety" - -#: src/wdgt-print-copies.c:200 -msgid "from:" -msgstr "od:" - -#: src/wdgt-print-copies.c:207 -msgid "to:" -msgstr "do:" - -#: src/wdgt-print-merge.c:178 -msgid "Start on label" -msgstr "Rozpocznij od etykiety" - -#: src/wdgt-print-merge.c:186 -msgid "on 1st sheet" -msgstr "na pierwszym arkuszu" - -#: src/wdgt-print-merge.c:195 -msgid "Copies:" -msgstr "Kopie:" - -#: src/wdgt-print-merge.c:201 -msgid "Collate" -msgstr "Uk³adanie" - -#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 -msgid "Description:" -msgstr "Opis:" - -#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 -msgid "Page size:" -msgstr "Rozmiar strony:" - -#: src/wdgt-media-select.c:290 -msgid "Label size:" -msgstr "Rozmiar etykiety:" - -#: src/wdgt-media-select.c:301 -msgid "Layout:" -msgstr "Wygl±d:" - -#: src/wdgt-media-select.c:578 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d na arkusz)" - -#: src/wdgt-media-select.c:582 -#, fuzzy, c-format -msgid "%d per sheet" -msgstr "%d x %d (%d na arkusz)" - -#: src/wdgt-media-select.c:614 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/wdgt-media-select.c:619 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 -#, c-format -msgid "%s %s diameter" -msgstr "" - -#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 -#, c-format -msgid "%.5g %s diameter" -msgstr "" - -#: src/wdgt-rotate-label.c:193 -msgid "Rotate" -msgstr "Obróæ" - -#. This is the default custom color -#: src/mygal/color-palette.c:396 -#, fuzzy -msgid "custom" -msgstr "W³asny klucz pola" - -#. "Custom" color - we'll pop up a GnomeColorPicker -#: src/mygal/color-palette.c:438 -#, fuzzy -msgid "Custom Color:" -msgstr "Kolor:" - -#: src/mygal/color-palette.c:446 -msgid "Choose Custom Color" -msgstr "" - -#: src/mygal/color-palette.c:579 -msgid "black" -msgstr "" - -#: src/mygal/color-palette.c:580 -msgid "light brown" -msgstr "" - -#: src/mygal/color-palette.c:581 -msgid "brown gold" -msgstr "" - -#: src/mygal/color-palette.c:582 -msgid "dark green #2" -msgstr "" - -#: src/mygal/color-palette.c:583 -msgid "navy" -msgstr "" - -#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 -msgid "dark blue" -msgstr "" - -#: src/mygal/color-palette.c:585 -msgid "purple #2" -msgstr "" - -#: src/mygal/color-palette.c:586 -msgid "very dark gray" -msgstr "" - -#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 -msgid "dark red" -msgstr "" - -#: src/mygal/color-palette.c:590 -msgid "red-orange" -msgstr "" - -#: src/mygal/color-palette.c:591 -msgid "gold" -msgstr "" - -#: src/mygal/color-palette.c:592 -msgid "dark green" -msgstr "" - -#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 -msgid "dull blue" -msgstr "" - -#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 -msgid "blue" -msgstr "" - -#: src/mygal/color-palette.c:595 -msgid "dull purple" -msgstr "" - -#: src/mygal/color-palette.c:596 -msgid "dark grey" -msgstr "" - -#: src/mygal/color-palette.c:599 -msgid "red" -msgstr "" - -#: src/mygal/color-palette.c:600 -msgid "orange" -msgstr "" - -#: src/mygal/color-palette.c:601 -msgid "lime" -msgstr "" - -#: src/mygal/color-palette.c:602 -msgid "dull green" -msgstr "" - -#: src/mygal/color-palette.c:603 -msgid "dull blue #2" -msgstr "" - -#: src/mygal/color-palette.c:604 -msgid "sky blue #2" -msgstr "" - -#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 -msgid "purple" -msgstr "" - -#: src/mygal/color-palette.c:606 -msgid "gray" -msgstr "" - -#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 -#, fuzzy -msgid "magenta" -msgstr "Obraz" - -#: src/mygal/color-palette.c:610 -msgid "bright orange" -msgstr "" - -#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 -msgid "yellow" -msgstr "" - -#: src/mygal/color-palette.c:612 -#, fuzzy -msgid "green" -msgstr "stopni(e)" - -#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 -msgid "cyan" -msgstr "" - -#: src/mygal/color-palette.c:614 -msgid "bright blue" -msgstr "" - -#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 -msgid "red purple" -msgstr "" - -#: src/mygal/color-palette.c:616 -msgid "light grey" -msgstr "" - -#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 -msgid "pink" -msgstr "" - -#: src/mygal/color-palette.c:620 -msgid "light orange" -msgstr "" - -#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 -msgid "light yellow" -msgstr "" - -#: src/mygal/color-palette.c:622 -msgid "light green" -msgstr "" - -#: src/mygal/color-palette.c:623 -msgid "light cyan" -msgstr "" - -#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 -msgid "light blue" -msgstr "" - -#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 -msgid "light purple" -msgstr "" - -#: src/mygal/color-palette.c:626 -msgid "white" -msgstr "" - -#: src/mygal/color-palette.c:631 -msgid "purplish blue" -msgstr "" - -#: src/mygal/color-palette.c:635 -msgid "dark purple" -msgstr "" - -#: src/mygal/color-palette.c:637 -msgid "sky blue" -msgstr "" - -#: libglabels/template.c:848 -#, c-format -msgid "Generic %s full page" -msgstr "" - -#: libglabels/template.c:897 -msgid "No template files found!" -msgstr "Nie znaleziono pliku szablonu!" - -#. Create and append an "Other" entry. -#: libglabels/paper.c:67 -msgid "Other" -msgstr "" - -#: libglabels/paper.c:361 -#, fuzzy -msgid "No paper files found!" -msgstr "Nie znaleziono pliku szablonu!" - -#: data/ui/glabels-ui.xml.h:1 -msgid "About glabels" -msgstr "" - -#: data/ui/glabels-ui.xml.h:2 -msgid "About..." -msgstr "" - -#: data/ui/glabels-ui.xml.h:3 -msgid "Align _Horizontal" -msgstr "" - -#: data/ui/glabels-ui.xml.h:4 -msgid "Align _Vertical" -msgstr "" - -#: data/ui/glabels-ui.xml.h:5 -msgid "Align objects to bottoms" -msgstr "" - -#: data/ui/glabels-ui.xml.h:6 -msgid "Align objects to horizontal centers" -msgstr "" - -#: data/ui/glabels-ui.xml.h:7 -msgid "Align objects to left edges" -msgstr "" - -#: data/ui/glabels-ui.xml.h:8 -msgid "Align objects to right edges" -msgstr "" - -#: data/ui/glabels-ui.xml.h:9 -msgid "Align objects to tops" -msgstr "" - -#: data/ui/glabels-ui.xml.h:10 -msgid "Align objects to vertical centers" -msgstr "" - -#: data/ui/glabels-ui.xml.h:12 -msgid "Bold" -msgstr "" - -#: data/ui/glabels-ui.xml.h:14 -#, fuzzy -msgid "Center align" -msgstr "Ogólne" - -#: data/ui/glabels-ui.xml.h:15 -msgid "Center objects to horizontal label center" -msgstr "" - -#: data/ui/glabels-ui.xml.h:16 -msgid "Center objects to vertical label center" -msgstr "" - -#: data/ui/glabels-ui.xml.h:17 -msgid "Change the visibility of markup lines in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:18 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:19 -msgid "Change the visibility of the grid in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:20 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:21 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:22 -msgid "Close" -msgstr "" - -#: data/ui/glabels-ui.xml.h:23 -#, fuzzy -msgid "Close the current file" -msgstr "Zapisuje bie¿±cy plik" - -#: data/ui/glabels-ui.xml.h:24 -msgid "Configure the application" -msgstr "" - -#: data/ui/glabels-ui.xml.h:25 -msgid "Contents" -msgstr "" - -#: data/ui/glabels-ui.xml.h:26 -msgid "Copy" -msgstr "" - -#: data/ui/glabels-ui.xml.h:27 -#, fuzzy -msgid "Copy the selection" -msgstr "Usuwa wszelkie zaznaczenia" - -#: data/ui/glabels-ui.xml.h:28 -#, fuzzy -msgid "Create a custom template" -msgstr "Tworzy liniê" - -#: data/ui/glabels-ui.xml.h:29 -#, fuzzy -msgid "Create a new document" -msgstr "Tworzy liniê" - -#: data/ui/glabels-ui.xml.h:30 -msgid "Create barcode object" -msgstr "Tworzy kod paskowy" - -#: data/ui/glabels-ui.xml.h:31 -msgid "Create box/rectangle object" -msgstr "Tworzy skrzynkê/prostok±t" - -#: data/ui/glabels-ui.xml.h:32 -msgid "Create ellipse/circle object" -msgstr "Tworzy elipsê/okr±g" - -#: data/ui/glabels-ui.xml.h:33 -msgid "Create image object" -msgstr "Tworzy obraz" - -#: data/ui/glabels-ui.xml.h:34 -msgid "Create line object" -msgstr "Tworzy liniê" - -#: data/ui/glabels-ui.xml.h:35 -msgid "Create text object" -msgstr "Tworzy obiekt tekstowy" - -#: data/ui/glabels-ui.xml.h:36 -msgid "Cu_t" -msgstr "" - -#: data/ui/glabels-ui.xml.h:37 -#, fuzzy -msgid "Customize" -msgstr "W³asny klucz pola" - -#: data/ui/glabels-ui.xml.h:38 -msgid "Customize Drawing Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:39 -msgid "Customize Main Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:40 -msgid "Customize Property Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:41 -msgid "Customize toolbars" -msgstr "" - -#: data/ui/glabels-ui.xml.h:42 -msgid "Cut" -msgstr "" - -#: data/ui/glabels-ui.xml.h:43 -msgid "Cut the selection" -msgstr "" - -#: data/ui/glabels-ui.xml.h:44 -msgid "Decrease magnification" -msgstr "" - -#: data/ui/glabels-ui.xml.h:45 -msgid "Delete" -msgstr "Usuñ" - -#: data/ui/glabels-ui.xml.h:46 -#, fuzzy -msgid "Delete the selected objects" -msgstr "Tworzy obiekt tekstowy" - -#: data/ui/glabels-ui.xml.h:47 -msgid "Drawing toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:48 -msgid "Dump XML" -msgstr "" - -#: data/ui/glabels-ui.xml.h:49 -msgid "Dump the UI Xml description" -msgstr "" - -#: data/ui/glabels-ui.xml.h:50 -msgid "Edit merge properties" -msgstr "Modyfikuje w³a¶ciwo¶ci z³±czania" - -#: data/ui/glabels-ui.xml.h:54 -msgid "Flip object horizontally" -msgstr "" - -#: data/ui/glabels-ui.xml.h:55 -msgid "Flip object vertically" -msgstr "" - -#: data/ui/glabels-ui.xml.h:56 -#, fuzzy -msgid "Font name" -msgstr "Nie zapisuj" - -#: data/ui/glabels-ui.xml.h:57 -#, fuzzy -msgid "Font selector" -msgstr "Usuwa wszelkie zaznaczenia" - -#: data/ui/glabels-ui.xml.h:58 -#, fuzzy -msgid "Font size" -msgstr "Nie zapisuj" - -#: data/ui/glabels-ui.xml.h:59 -msgid "Icon and _Text" -msgstr "" - -#: data/ui/glabels-ui.xml.h:60 -msgid "Increase magnification" -msgstr "" - -#: data/ui/glabels-ui.xml.h:61 -msgid "Italic" -msgstr "" - -#: data/ui/glabels-ui.xml.h:63 -msgid "Left align" -msgstr "" - -#: data/ui/glabels-ui.xml.h:65 -msgid "Line width" -msgstr "" - -#: data/ui/glabels-ui.xml.h:66 -msgid "Lower object to bottom" -msgstr "" - -#: data/ui/glabels-ui.xml.h:67 -msgid "M_arkup" -msgstr "" - -#: data/ui/glabels-ui.xml.h:68 -msgid "Main toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:69 -msgid "Markup" -msgstr "" - -#: data/ui/glabels-ui.xml.h:70 -#, fuzzy -msgid "Modify document properties" -msgstr "Modyfikacja w³a¶ciwo¶ci z³±czania dokumentów" - -#: data/ui/glabels-ui.xml.h:71 -#, fuzzy -msgid "New" -msgstr "_Nowa" - -#: data/ui/glabels-ui.xml.h:72 -#, fuzzy -msgid "Object property editor" -msgstr "W³a¶ciwo¶ci tekstu" - -#: data/ui/glabels-ui.xml.h:73 -msgid "Only show icons in the drawing toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:74 -msgid "Only show icons in the main toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:76 -msgid "Open a file" -msgstr "Otwiera plik" - -#: data/ui/glabels-ui.xml.h:77 -#, fuzzy -msgid "Open the glabels manual" -msgstr "Otwórz etykietê" - -#: data/ui/glabels-ui.xml.h:78 -msgid "Paste" -msgstr "" - -#: data/ui/glabels-ui.xml.h:79 -msgid "Paste the clipboard" -msgstr "" - -#: data/ui/glabels-ui.xml.h:80 -#, fuzzy -msgid "Pr_eferences..." -msgstr "Glabels: Preferencje" - -#: data/ui/glabels-ui.xml.h:81 -#, fuzzy -msgid "Preferences" -msgstr "Glabels: Preferencje" - -#: data/ui/glabels-ui.xml.h:83 -#, fuzzy -msgid "Print the current file" -msgstr "Drukuje bie¿±cy plik" - -#: data/ui/glabels-ui.xml.h:84 -#, fuzzy -msgid "Proper_ties..." -msgstr "W³a¶ciwo¶ci tekstu" - -#: data/ui/glabels-ui.xml.h:85 -#, fuzzy -msgid "Properties" -msgstr "W³a¶ciwo¶ci tekstu" - -#: data/ui/glabels-ui.xml.h:86 -msgid "Property toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:87 -msgid "Quit" -msgstr "" - -#: data/ui/glabels-ui.xml.h:88 -msgid "Quit the program" -msgstr "" - -#: data/ui/glabels-ui.xml.h:89 -msgid "Raise object to top" -msgstr "" - -#: data/ui/glabels-ui.xml.h:90 -msgid "Recent _Files" -msgstr "" - -#: data/ui/glabels-ui.xml.h:91 -msgid "Redo" -msgstr "" - -#: data/ui/glabels-ui.xml.h:92 -msgid "Redo the undone action" -msgstr "" - -#: data/ui/glabels-ui.xml.h:93 -msgid "Remove all selections" -msgstr "Usuwa wszelkie zaznaczenia" - -#: data/ui/glabels-ui.xml.h:95 -#, no-c-format -msgid "Restore scale to 100%" -msgstr "" - -#: data/ui/glabels-ui.xml.h:96 -msgid "Right align" -msgstr "" - -#: data/ui/glabels-ui.xml.h:99 -msgid "Rotate object 90 clockwise" -msgstr "" - -#: data/ui/glabels-ui.xml.h:100 -msgid "Rotate object 90 counter-clockwise" -msgstr "" - -#: data/ui/glabels-ui.xml.h:101 -#, fuzzy -msgid "Save" -msgstr "Zapisz jako" - -#: data/ui/glabels-ui.xml.h:102 -msgid "Save As" -msgstr "Zapisz jako" - -#: data/ui/glabels-ui.xml.h:103 -#, fuzzy -msgid "Save _As..." -msgstr "Zapisz jako" - -#: data/ui/glabels-ui.xml.h:104 -#, fuzzy -msgid "Save the current file" -msgstr "Zapisuje bie¿±cy plik" - -#: data/ui/glabels-ui.xml.h:105 -msgid "Save the current file with a different name" -msgstr "" - -#: data/ui/glabels-ui.xml.h:106 -#, fuzzy -msgid "Select All" -msgstr "O_dznacz wszystko" - -#: data/ui/glabels-ui.xml.h:107 -#, fuzzy -msgid "Select _All" -msgstr "O_dznacz wszystko" - -#: data/ui/glabels-ui.xml.h:108 -#, fuzzy -msgid "Select all objects" -msgstr "Wybierz, przeno¶ i modyfikuj obiekty" - -#: data/ui/glabels-ui.xml.h:109 -msgid "Select, move and modify objects" -msgstr "Wybierz, przeno¶ i modyfikuj obiekty" - -#: data/ui/glabels-ui.xml.h:111 -msgid "Set drawing toolbar button style according to desktop default" -msgstr "" - -#: data/ui/glabels-ui.xml.h:112 -msgid "Set main toolbar button style according to desktop default" -msgstr "" - -#: data/ui/glabels-ui.xml.h:113 -msgid "Show _Tooltips" -msgstr "" - -#: data/ui/glabels-ui.xml.h:114 -msgid "Show both icons and texts in the drawing toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:115 -msgid "Show both icons and texts in the main toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:116 -msgid "Show tooltips in the drawing toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:117 -msgid "Show tooltips in the main toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:118 -msgid "Show tooltips in the property toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:119 -msgid "Template Designer" -msgstr "" - -#: data/ui/glabels-ui.xml.h:120 -msgid "Template _Designer..." -msgstr "" - -#: data/ui/glabels-ui.xml.h:121 -msgid "Text color" -msgstr "" - -#: data/ui/glabels-ui.xml.h:122 -#, fuzzy -msgid "U_n-select All" -msgstr "O_dznacz wszystko" - -#: data/ui/glabels-ui.xml.h:123 -#, fuzzy -msgid "Un-select All" -msgstr "O_dznacz wszystko" - -#: data/ui/glabels-ui.xml.h:124 -msgid "Undo" -msgstr "" - -#: data/ui/glabels-ui.xml.h:125 -msgid "Undo the last action" -msgstr "" - -#: data/ui/glabels-ui.xml.h:126 -#, fuzzy -msgid "Zoom _1:1" -msgstr "Powiêkszenie 1:1" - -#: data/ui/glabels-ui.xml.h:127 -#, fuzzy -msgid "Zoom _In" -msgstr "Powiêksz" - -#: data/ui/glabels-ui.xml.h:128 -#, fuzzy -msgid "Zoom _Out" -msgstr "Pomniejsz" - -#: data/ui/glabels-ui.xml.h:129 -#, fuzzy -msgid "Zoom to _fit" -msgstr "Powiêksza 1:1" - -#: data/ui/glabels-ui.xml.h:130 -msgid "Zoom to fit window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:131 -msgid "_About..." -msgstr "" - -#: data/ui/glabels-ui.xml.h:132 -msgid "_Bottoms" -msgstr "" - -#: data/ui/glabels-ui.xml.h:135 -msgid "_Close" -msgstr "" - -#: data/ui/glabels-ui.xml.h:136 -msgid "_Contents" -msgstr "" - -#: data/ui/glabels-ui.xml.h:137 -msgid "_Copy" -msgstr "" - -#: data/ui/glabels-ui.xml.h:138 -#, fuzzy -msgid "_Create Object" -msgstr "Tworzy obiekt tekstowy" - -#: data/ui/glabels-ui.xml.h:139 -msgid "_Debug" -msgstr "" - -#: data/ui/glabels-ui.xml.h:141 -msgid "_Desktop Default" -msgstr "" - -#: data/ui/glabels-ui.xml.h:142 -msgid "_Drawing Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:143 -msgid "_Edit" -msgstr "" - -#: data/ui/glabels-ui.xml.h:145 -#, fuzzy -msgid "_File" -msgstr "Wype³nienie" - -#: data/ui/glabels-ui.xml.h:146 -msgid "_Grid" -msgstr "" - -#: data/ui/glabels-ui.xml.h:147 -msgid "_Help" -msgstr "" - -#: data/ui/glabels-ui.xml.h:148 -msgid "_Icon" -msgstr "" - -#: data/ui/glabels-ui.xml.h:152 -msgid "_Main Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:153 -#, fuzzy -msgid "_Merge Properties..." -msgstr "W³a¶ciwo¶ci z³±czania" - -#: data/ui/glabels-ui.xml.h:154 -msgid "_New" -msgstr "_Nowa" - -#: data/ui/glabels-ui.xml.h:155 -msgid "_Objects" -msgstr "" - -#: data/ui/glabels-ui.xml.h:156 -#, fuzzy -msgid "_Open..." -msgstr "Otwórz" - -#: data/ui/glabels-ui.xml.h:158 -msgid "_Paste" -msgstr "" - -#: data/ui/glabels-ui.xml.h:159 -#, fuzzy -msgid "_Print..." -msgstr "Wydrukuj" - -#: data/ui/glabels-ui.xml.h:160 -msgid "_Property Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:161 -msgid "_Quit" -msgstr "" - -#: data/ui/glabels-ui.xml.h:164 -#, fuzzy -msgid "_Save" -msgstr "Zapisz jako" - -#: data/ui/glabels-ui.xml.h:168 -#, fuzzy -msgid "_View" -msgstr "_Nowa" - -#: data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 -#: data/glade/template-designer.glade.h:5 -msgid "*" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:3 -msgid "Default page size" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:4 -msgid "Fill" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:5 -msgid "Line" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:6 -msgid "Text" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:7 -msgid "Units" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 -msgid "Alignment:" -msgstr "Wyrównanie:" - -#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 -msgid "Color:" -msgstr "Kolor:" - -#: data/glade/prefs-dialog.glade.h:10 -msgid "Font:" -msgstr "Czcionka:" - -#: data/glade/prefs-dialog.glade.h:11 -msgid "ISO A4" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:12 -msgid "Inches" -msgstr "Cale" - -#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 -msgid "Line Spacing:" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:14 -#, fuzzy -msgid "Locale" -msgstr "Skala" - -#: data/glade/prefs-dialog.glade.h:15 -msgid "Millimeters" -msgstr "Milimetry" - -#: data/glade/prefs-dialog.glade.h:16 -msgid "Object defaults" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:17 -msgid "Points" -msgstr "Punkty" - -#: data/glade/prefs-dialog.glade.h:18 -msgid "Select default properties for new objects." -msgstr "" - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "" - -#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:25 -msgid "US Letter" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 -#: data/glade/template-designer.glade.h:72 -msgid "Width:" -msgstr "Szeroko¶æ:" - -#: data/glade/object-editor.glade.h:2 -msgid "00000000000 00000" -msgstr "" - -#: data/glade/object-editor.glade.h:3 -msgid "Xxx object properties" -msgstr "" - -#: data/glade/object-editor.glade.h:5 -msgid "Allow merge to automatically shrink text" -msgstr "" - -#: data/glade/object-editor.glade.h:6 -msgid "Angle:" -msgstr "K±t" - -#: data/glade/object-editor.glade.h:7 -msgid "Checksum" -msgstr "" - -#: data/glade/object-editor.glade.h:10 -#, fuzzy -msgid "Family:" -msgstr "Wype³nienie" - -#: data/glade/object-editor.glade.h:12 -msgid "Fill" -msgstr "Wype³nienie" - -#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 -msgid "Height:" -msgstr "Wysoko¶æ:" - -#: data/glade/object-editor.glade.h:14 -msgid "Image" -msgstr "Obraz" - -#: data/glade/object-editor.glade.h:15 -msgid "Insert merge field" -msgstr "Wstaw pole z³±czenia" - -#: data/glade/object-editor.glade.h:17 -msgid "Length:" -msgstr "D³ugo¶æ:" - -#: data/glade/object-editor.glade.h:18 -msgid "Line" -msgstr "Linia" - -#: data/glade/object-editor.glade.h:20 -msgid "Literal:" -msgstr "Litera³:" - -#: data/glade/object-editor.glade.h:21 -msgid "Load image" -msgstr "" - -#: data/glade/object-editor.glade.h:22 -msgid "Position" -msgstr "Pozycja" - -#: data/glade/object-editor.glade.h:23 -msgid "Reset image size" -msgstr "Wyzeruj rozmiar obrazu" - -#: data/glade/object-editor.glade.h:24 -msgid "Size" -msgstr "Rozmiar" - -#: data/glade/object-editor.glade.h:25 -#, fuzzy -msgid "Size:" -msgstr "Rozmiar" - -#: data/glade/object-editor.glade.h:26 -#, fuzzy -msgid "Style" -msgstr "Styl" - -#: data/glade/object-editor.glade.h:27 -#, fuzzy -msgid "Style:" -msgstr "Styl" - -#: data/glade/object-editor.glade.h:30 -msgid "X:" -msgstr "X:" - -#: data/glade/object-editor.glade.h:31 -msgid "Y:" -msgstr "Y:" - -#: data/glade/object-editor.glade.h:32 -msgid "degrees" -msgstr "stopni(e)" - -#: data/glade/object-editor.glade.h:33 -msgid "dialog1" -msgstr "" - -#: data/glade/object-editor.glade.h:34 -msgid "digits:" -msgstr "" - -#: data/glade/object-editor.glade.h:35 -#, fuzzy -msgid "format:" -msgstr "Format:" - -#: data/glade/template-designer.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/template-designer.glade.h:2 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "" - -#: data/glade/template-designer.glade.h:3 -msgid "(e.g., 8163A)" -msgstr "" - -#: data/glade/template-designer.glade.h:4 -msgid "(e.g., Avery, Acme, ...)" -msgstr "" - -#: data/glade/template-designer.glade.h:6 -msgid "1. Outer radius:" -msgstr "" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "" - -#: data/glade/template-designer.glade.h:8 -#, fuzzy -msgid "1. Width:" -msgstr "Szeroko¶æ:" - -#: data/glade/template-designer.glade.h:9 -#, fuzzy -msgid "2. Height:" -msgstr "Wysoko¶æ:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" - -#: data/glade/template-designer.glade.h:30 -msgid "Design Completed" -msgstr "" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" - -#: data/glade/template-designer.glade.h:40 -msgid "Label Size (CD/DVD)" -msgstr "" - -#: data/glade/template-designer.glade.h:41 -#, fuzzy -msgid "Label Size (Round)" -msgstr "Rozmiar etykiety:" - -#: data/glade/template-designer.glade.h:42 -#, fuzzy -msgid "Label or Card Shape" -msgstr "Nowa etykieta lub karta" - -#: data/glade/template-designer.glade.h:43 -msgid "Label or Card Size (Rectangular)" -msgstr "" - -#: data/glade/template-designer.glade.h:44 -#, fuzzy -msgid "Layout #1" -msgstr "Wygl±d:" - -#: data/glade/template-designer.glade.h:45 -#, fuzzy -msgid "Layout #2" -msgstr "Wygl±d:" - -#: data/glade/template-designer.glade.h:46 -#, fuzzy -msgid "Layout(s)" -msgstr "Wygl±d:" - -#: data/glade/template-designer.glade.h:47 -#, fuzzy -msgid "Name and Description" -msgstr "Opis:" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "" - -#: data/glade/template-designer.glade.h:50 -msgid "Number of Layouts" -msgstr "" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "" - -#: data/glade/template-designer.glade.h:52 -#, fuzzy -msgid "Page Size" -msgstr "Rozmiar strony:" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "" - -#: data/glade/template-designer.glade.h:55 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "" - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "" - -#: data/glade/template-designer.glade.h:57 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "" - -#: data/glade/template-designer.glade.h:58 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "" - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "" - -#: data/glade/template-designer.glade.h:61 -#, fuzzy -msgid "Print test sheet" -msgstr "na pierwszym arkuszu" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" - -#: data/glade/template-designer.glade.h:68 -msgid "Vertical pitch (dy):" -msgstr "" - -#: data/glade/template-designer.glade.h:69 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" - -#: data/templates/paper-sizes.xml.h:1 -msgid "A0" -msgstr "" - -#: data/templates/paper-sizes.xml.h:2 -msgid "A1" -msgstr "" - -#: data/templates/paper-sizes.xml.h:3 -msgid "A10" -msgstr "" - -#: data/templates/paper-sizes.xml.h:4 -msgid "A2" -msgstr "" - -#: data/templates/paper-sizes.xml.h:5 -msgid "A3" -msgstr "" - -#: data/templates/paper-sizes.xml.h:6 -msgid "A4" -msgstr "" - -#: data/templates/paper-sizes.xml.h:7 -msgid "A5" -msgstr "" - -#: data/templates/paper-sizes.xml.h:8 -msgid "A6" -msgstr "" - -#: data/templates/paper-sizes.xml.h:9 -msgid "A7" -msgstr "" - -#: data/templates/paper-sizes.xml.h:10 -msgid "A8" -msgstr "" - -#: data/templates/paper-sizes.xml.h:11 -msgid "A9" -msgstr "" - -#: data/templates/paper-sizes.xml.h:12 -msgid "B0" -msgstr "" - -#: data/templates/paper-sizes.xml.h:13 -msgid "B1" -msgstr "" - -#: data/templates/paper-sizes.xml.h:14 -msgid "B10" -msgstr "" - -#: data/templates/paper-sizes.xml.h:15 -msgid "B2" -msgstr "" - -#: data/templates/paper-sizes.xml.h:16 -msgid "B3" -msgstr "" - -#: data/templates/paper-sizes.xml.h:17 -msgid "B4" -msgstr "" - -#: data/templates/paper-sizes.xml.h:18 -msgid "B5" -msgstr "" - -#: data/templates/paper-sizes.xml.h:19 -msgid "B6" -msgstr "" - -#: data/templates/paper-sizes.xml.h:20 -msgid "B7" -msgstr "" - -#: data/templates/paper-sizes.xml.h:21 -msgid "B8" -msgstr "" - -#: data/templates/paper-sizes.xml.h:22 -msgid "B9" -msgstr "" - -#: data/templates/paper-sizes.xml.h:23 -msgid "US Executive" -msgstr "" - -#: data/templates/paper-sizes.xml.h:24 -msgid "US Legal" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:1 -#: data/templates/zweckform-iso-templates.xml.h:1 -msgid "Address Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:2 -#: data/templates/avery-iso-templates.xml.h:2 -#: data/templates/zweckform-iso-templates.xml.h:3 -#: data/templates/misc-us-templates.xml.h:2 -#: data/templates/misc-iso-templates.xml.h:9 -msgid "Business Cards" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:3 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:4 -msgid "Diskette Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:5 -#, fuzzy -msgid "Filing Labels" -msgstr "Etykiety" - -#: data/templates/avery-us-templates.xml.h:6 -msgid "Full Sheet Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:7 -#, fuzzy -msgid "Large Round Labels" -msgstr "Rozpocznij od etykiety" - -#: data/templates/avery-us-templates.xml.h:8 -msgid "Name Badge Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:9 -msgid "Return Address Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:10 -msgid "Shipping Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:11 -#, fuzzy -msgid "Small Round Labels" -msgstr "Rozpocznij od etykiety" - -#: data/templates/avery-us-templates.xml.h:12 -#, fuzzy -msgid "Square Labels" -msgstr "Etykiety" - -#: data/templates/avery-us-templates.xml.h:13 -msgid "Video Tape Face Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:14 -msgid "Video Tape Spine Labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:1 -msgid "Address labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:3 -msgid "CD Booklet" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:4 -msgid "CD Inlet" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:5 -#: data/templates/zweckform-iso-templates.xml.h:4 -#: data/templates/misc-us-templates.xml.h:4 -#: data/templates/misc-iso-templates.xml.h:10 -#, fuzzy -msgid "CD/DVD Labels" -msgstr "Etykiety" - -#: data/templates/avery-iso-templates.xml.h:6 -msgid "Diskette labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:7 -#: data/templates/zweckform-iso-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:17 -msgid "Mailing Labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:8 -#, fuzzy -msgid "Mailing labels" -msgstr "Etykiety" - -#: data/templates/avery-iso-templates.xml.h:9 -msgid "Mini Address Labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:10 -#, fuzzy -msgid "Shipping labels" -msgstr "Otwórz etykietê" - -#: data/templates/zweckform-iso-templates.xml.h:2 -msgid "Allround Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:5 -msgid "Correction and Cover-up Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:6 -msgid "Lever Arch File Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:8 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:9 -msgid "Rectangular Copier Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:10 -#: data/templates/misc-iso-templates.xml.h:22 -msgid "Rectangular Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:11 -msgid "Video Labels (back)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:1 -msgid "Business Card CD" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:3 -msgid "CD Template Rectangles" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:5 -msgid "CD/DVD Labels (Face Only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:6 -#: data/templates/misc-iso-templates.xml.h:11 -msgid "CD/DVD Labels (face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:7 -#, fuzzy -msgid "DLT Labels" -msgstr "Etykiety" - -#: data/templates/misc-us-templates.xml.h:8 -msgid "Microtube labels" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:9 -msgid "Mini-CD Labels" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:10 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:11 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:12 -#: data/templates/misc-iso-templates.xml.h:21 -msgid "PRO CD Labels 2-up (face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:13 -msgid "Slimline CD Case (rightside up)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Slimline CD Case (upside down)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:1 -msgid "Agipa 119488: Business Cards" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:2 -msgid "Allround Labels --24" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:3 -msgid "Allround Labels --44" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:4 -msgid "Allround Labels --64" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:5 -msgid "Allround Labels --65" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:6 -msgid "Arch File Labels" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:7 -msgid "Arch File Labels (large)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:8 -msgid "Arch File Labels (small)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:12 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Diskette Labels (face only)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:14 -msgid "EPSON Photo Stickers 16" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Etiketten" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:16 -msgid "Fridge Magnet Stickers" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:18 -msgid "Mailing Labels --14" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:19 -msgid "Mailing Labels-2 columns" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:20 -msgid "Mailing Labels-3 columns" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:23 -msgid "Video Labels (face only)" -msgstr "" - -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers." -msgstr "" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "" - -#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 -#, fuzzy -msgid "gLabels Project File" -msgstr "W³a¶ciwo¶ci tekstu" - -#, fuzzy -#~ msgid "Object _Properties..." -#~ msgstr "W³a¶ciwo¶ci tekstu" - -#~ msgid "Display units" -#~ msgstr "Jednostki wy¶wietlania" - -#~ msgid "Default page size" -#~ msgstr "Domy¶lny rozmiar strony" - -#~ msgid "Outline" -#~ msgstr "Ramka" - -#~ msgid "Edit line object properties" -#~ msgstr "Modyfikacja w³a¶ciwo¶ci linii" - -#~ msgid "Edit text object properties" -#~ msgstr "Modyfikacja w³a¶ciowo¶ci tekstu" - -#~ msgid "Maintain current aspect ratio" -#~ msgstr "Utrzymywanie aktualnych proporcji" - -#, fuzzy -#~ msgid "CD Labels" -#~ msgstr "Etykiety" - -#, fuzzy -#~ msgid "Open %s" -#~ msgstr "Otwórz" - -#~ msgid "Revert to saved copy of %s?" -#~ msgstr "Przywróciæ zapisan± kopiê pliku %s?" - -#~ msgid "Unknown media type. Using default." -#~ msgstr "Nieznany typ no¶nika. U¿yto warto¶ci domy¶lnych." - -#~ msgid "" -#~ "``%s'' has been modified.\n" -#~ "\n" -#~ "Do you wish to save it?" -#~ msgstr "" -#~ "Plik \"%s\" zosta³ zmodyfikowany.\n" -#~ "\n" -#~ "Czy chcesz go zapisaæ?" - -#~ msgid "Close / Save label as" -#~ msgstr "Zamyka / Zapisuje etykietê jako" - -#~ msgid "Label no longer valid!" -#~ msgstr "Etykieta nie jest ju¿ poprawna!" - -#~ msgid "Error writing file" -#~ msgstr "B³±d podczas zapisu pliku" - -#~ msgid "Edit properties..." -#~ msgstr "Modyfikuj w³a¶ciwo¶ci..." - -#~ msgid "Appearance" -#~ msgstr "Wygl±d" - -#~ msgid "Position/Size" -#~ msgstr "Pozycja/Rozmiar" - -#~ msgid "Image format not currently supported" -#~ msgstr "Format obrazu aktualnie nie jest obs³ugiwany" - -#~ msgid "Barcode data" -#~ msgstr "Dane kodu paskowego" - -#~ msgid "%" -#~ msgstr "%" - -#~ msgid "Show text with barcode" -#~ msgstr "Wy¶wietlanie tekstu z kodem paskowym" - -#~ msgid "Fields" -#~ msgstr "Pola" - -#~ msgid "Column" -#~ msgstr "Kolumna" - -#~ msgid "Sample data" -#~ msgstr "Próbne dane" - -#~ msgid "Make a new, empty label" -#~ msgstr "Tworzy now±, pust± etykietê" - -#~ msgid " New " -#~ msgstr " Nowa " - -#~ msgid "New Label/Card" -#~ msgstr "Nowa Etykieta/Karta" - -#~ msgid " Open " -#~ msgstr " Otwórz " - -#~ msgid " Save " -#~ msgstr " Zapisz " - -#~ msgid " Print " -#~ msgstr " Wydrukuj " - -#~ msgid "Function is not implemented!" -#~ msgstr "Funkcja nie jest zaimplementowana!" diff --git a/glabels2/po/pt_BR.po b/glabels2/po/pt_BR.po deleted file mode 100644 index 2c1568eb..00000000 --- a/glabels2/po/pt_BR.po +++ /dev/null @@ -1,2624 +0,0 @@ -# Brazilian Portuguese translation of Glabels. -# Copyright (C) 2001 Jim Evins -# Paulo R. Ormenese , 2001. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 1.91.0\n" -"POT-Creation-Date: 2004-08-08 00:43-0400\n" -"PO-Revision-Date: 2003-01-03 23:15-0300\n" -"Last-Translator: Paulo R. Ormenese \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.c:55 -msgid "Show view debugging messages." -msgstr "Exibe mensagens de depuração de visualização." - -#: src/glabels.c:58 -msgid "Show item debugging messages." -msgstr "Exibe mensagens de depuração de item." - -#: src/glabels.c:61 -msgid "Show printing debugging messages." -msgstr "Exibe mensagens de depuração de impressão." - -#: src/glabels.c:64 -msgid "Show prefs debugging messages." -msgstr "Exibe mensagens de depuração de preferências." - -#: src/glabels.c:67 -msgid "Show file debugging messages." -msgstr "Exibe mensagens de depuração de arquivo." - -#: src/glabels.c:70 -msgid "Show document debugging messages." -msgstr "Exibe mensagens de depuração de documeto." - -#: src/glabels.c:73 -msgid "Show template debugging messages." -msgstr "Exibe mensagens de depuração de modelo." - -#: src/glabels.c:76 -#, fuzzy -msgid "Show paper debugging messages." -msgstr "Exibe mensagens de depuração de preferências." - -#: src/glabels.c:79 -msgid "Show xml debugging messages." -msgstr "Exibe mensagens de depuração de xml." - -#: src/glabels.c:82 -msgid "Show document merge debugging messages." -msgstr "Exibe mensagens de depuração de fusão de documento." - -#: src/glabels.c:85 -msgid "Show commands debugging messages." -msgstr "Exibe mensagens de depuração de comandos." - -#: src/glabels.c:88 -msgid "Show undo debugging messages." -msgstr "Exibe mensagens de depuração de desfazer." - -#: src/glabels.c:91 -msgid "Show recent debugging messages." -msgstr "Exibe mensagens de depuração de recentes" - -#: src/glabels.c:94 -msgid "Show window debugging messages." -msgstr "Exibe mensagens de depuração de janela." - -#: src/glabels.c:97 -msgid "Show ui debugging messages." -msgstr "Exibe mensagens de depuração de ui." - -#: src/glabels.c:100 -#, fuzzy -msgid "Show property_bar debugging messages." -msgstr "Exibe mensagens de depuração de preferências." - -#: src/glabels.c:103 -msgid "Show media select widget debugging messages." -msgstr "Exibe mensagens de depuração de widget de seleção de mídia." - -#: src/glabels.c:106 -msgid "Show mini preview widget debugging messages." -msgstr "Exibe mensagens de depuração de widget de mini previsão." - -#: src/glabels.c:109 -#, fuzzy -msgid "Show pixbuf cache debugging messages." -msgstr "Exibe mensagens de depuração de visualização." - -#: src/glabels.c:112 -msgid "Show widget debugging messages." -msgstr "Exibe mensagens de depuração de widget." - -#: src/glabels.c:115 -#, fuzzy -msgid "Show object editor debugging messages." -msgstr "Exibe mensagens de depuração de recentes" - -#: src/glabels.c:118 -msgid "Turn on all debugging messages." -msgstr "Ativa todas as mensagens de depuração." - -#: src/glabels.c:187 -msgid "Could not initialize Bonobo!\n" -msgstr "Impossível inicializar Bonobo!\n" - -#: src/glabels-batch.c:48 -msgid "print this message" -msgstr "mostra esta mensagem" - -#: src/glabels-batch.c:50 -msgid "print the version of glabels-batch being used" -msgstr "mostra a versão de glabels-batch que está sendo usada" - -#: src/glabels-batch.c:52 -msgid "set output filename (default=\"output.ps\")" -msgstr "define o nome do arquivo de saída (padrão=\"output.ps\")" - -#: src/glabels-batch.c:52 -msgid "filename" -msgstr "nome_de_arquivo" - -#: src/glabels-batch.c:54 -msgid "number of sheets (default=1)" -msgstr "número de páginas (padrão=1)" - -#: src/glabels-batch.c:54 -msgid "sheets" -msgstr "páginas" - -#: src/glabels-batch.c:56 -msgid "number of copies (default=1)" -msgstr "número de cópias (padrão=1)" - -#: src/glabels-batch.c:56 -msgid "copies" -msgstr "cópias" - -#: src/glabels-batch.c:58 src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "imprimir contornos (testar alinhamento da impressora)" - -#: src/glabels-batch.c:60 src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "imprimir ao contrário (como uma imagem de espelho)" - -#: src/glabels-batch.c:96 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[OPÇÃO...] ARQUIVO_GLABELS..." - -#: src/glabels-batch.c:116 -msgid "missing glabels file\n" -msgstr "faltando arquivo glabels\n" - -#: src/glabels-batch.c:157 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "impossível abrir o arquivo glabels %s\n" - -#: src/window.c:244 -msgid "(none) - gLabels" -msgstr "(sem nome) - gLabels" - -#: src/window.c:414 -msgid "(modified)" -msgstr "(modificado)" - -#: src/stock.c:65 data/ui/glabels-ui.xml.h:165 -msgid "_Select Mode" -msgstr "_Selecionar Modo" - -#: src/stock.c:66 data/ui/glabels-ui.xml.h:166 -msgid "_Text" -msgstr "_Texto" - -#: src/stock.c:67 data/ui/glabels-ui.xml.h:151 -msgid "_Line" -msgstr "_Linha" - -#: src/stock.c:68 data/ui/glabels-ui.xml.h:133 -msgid "_Box" -msgstr "_Caixa" - -#: src/stock.c:69 data/ui/glabels-ui.xml.h:144 -msgid "_Ellipse" -msgstr "_Elipse" - -#: src/stock.c:70 data/ui/glabels-ui.xml.h:149 -msgid "_Image" -msgstr "_Imagem" - -#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 -msgid "Bar_code" -msgstr "_Código barras" - -#: src/stock.c:72 -msgid "_Merge Properties" -msgstr "Propriedades de _Fusão" - -#: src/stock.c:73 -msgid "Object _Properties" -msgstr "_Propriedades de Objeto" - -#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 -msgid "Bring to _Front" -msgstr "Trazer para _Frente" - -#: src/stock.c:75 data/ui/glabels-ui.xml.h:110 -msgid "Send to _Back" -msgstr "Enviar para _trás" - -#: src/stock.c:76 data/ui/glabels-ui.xml.h:97 -msgid "Rotate _Left" -msgstr "Girar _Esquerda" - -#: src/stock.c:77 data/ui/glabels-ui.xml.h:98 -msgid "Rotate _Right" -msgstr "Girar _Direita" - -#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "Refletir _Horizontalmente" - -#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "Refletir _Verticalmente" - -#: src/stock.c:80 data/ui/glabels-ui.xml.h:150 -msgid "_Lefts" -msgstr "_Esquerdas" - -#: src/stock.c:81 data/ui/glabels-ui.xml.h:162 -msgid "_Rights" -msgstr "_Direitas" - -#: src/stock.c:82 data/ui/glabels-ui.xml.h:134 -msgid "_Centers" -msgstr "C_entros" - -#: src/stock.c:83 data/ui/glabels-ui.xml.h:167 -msgid "_Tops" -msgstr "_Topos" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "Bases" - -#: src/stock.c:85 -msgid "Centers" -msgstr "Centros" - -#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "Ce_ntro Etiqueta" - -#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "" - -#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "" - -#: src/stock.c:90 src/stock.c:92 -#, fuzzy -msgid "Linked" -msgstr "Linha" - -#: src/stock.c:91 src/stock.c:93 -#, fuzzy -msgid "Not Linked" -msgstr "Nenhum" - -#: src/ui-property-bar.c:345 src/object-editor.c:499 -#, fuzzy -msgid "Default" -msgstr "Apagar" - -#: src/ui-property-bar.c:360 src/object-editor.c:512 -msgid "No fill" -msgstr "" - -#: src/ui-property-bar.c:375 src/object-editor.c:505 -#, fuzzy -msgid "No line" -msgstr "Nenhum" - -#: src/ui-sidebar.c:180 -#, fuzzy -msgid "Object properties" -msgstr "_Propriedades de Objeto" - -#: src/commands.c:385 -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/commands.c:399 -msgid "See the file AUTHORS for additional credits," -msgstr "Veja o arquivo AUTHORS para ver créditos adicionais," - -#: src/commands.c:400 -#, fuzzy -msgid "or visit http://glabels.sourceforge.net/" -msgstr "ou visite http://snaught.com/glabels" - -#: src/commands.c:409 -msgid " " -msgstr "" - -#: src/commands.c:424 -msgid "glabels" -msgstr "glabels" - -#: src/file.c:100 -msgid "New Label or Card" -msgstr "Nova Etiqueta ou Cartão" - -#: src/file.c:132 src/file.c:304 -msgid "Media Type" -msgstr "Tipo de mídia" - -#: src/file.c:138 src/file.c:310 -msgid "Label orientation" -msgstr "Orientação da etiqueta" - -#: src/file.c:269 -#, fuzzy -msgid "Label properties" -msgstr "_Propriedades de Objeto" - -#: src/file.c:452 src/file.c:870 -msgid "All files" -msgstr "" - -#: src/file.c:457 src/file.c:875 -#, fuzzy -msgid "gLabels documents" -msgstr "Preferências do gLabels" - -#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 -msgid "Empty file name selection" -msgstr "Seleção de nome de arquivo vazia" - -#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 -msgid "Please select a file or supply a valid file name" -msgstr "Por favor, selecione um arquivo ou forneça um nome de arquivo válido" - -#: src/file.c:519 src/file.c:631 -msgid "File does not exist" -msgstr "Arquivo inexistente" - -#: src/file.c:563 data/ui/glabels-ui.xml.h:75 -msgid "Open" -msgstr "Abrir" - -#: src/file.c:565 -msgid "Open label" -msgstr "Abrir etiqueta" - -#: src/file.c:707 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "Impossível abrir o arquivo \"%s\"" - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "Formato de arquivo não suportado" - -#: src/file.c:797 src/file.c:979 src/file.c:1174 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "Impossível salvar o arquivo \"%s\"" - -#: src/file.c:805 src/file.c:987 src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "Erro encontrado ao salvar. O arquivo ainda não foi salvo." - -#: src/file.c:848 src/file.c:1048 -#, c-format -msgid "Save \"%s\" as" -msgstr "Salvar \"%s\" como" - -#: src/file.c:935 src/file.c:1131 -msgid "Please supply a valid file name" -msgstr "Por favor, forneça um nome de arquivo válido" - -#: src/file.c:952 src/file.c:1147 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "Sobrescrever o arquivo \"%s\"?" - -#: src/file.c:960 src/file.c:1155 -msgid "File already exists." -msgstr "O arquivo já existe." - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "Salvar modificações no documento \"%s\" antes de fechar?" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "Suas modificações serão perdidas se você não salvá-las." - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "Fechar sem salvar" - -#. Should not happen -#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 -#: data/glade/object-editor.glade.h:37 -msgid "points" -msgstr "pontos" - -#: src/prefs.c:158 data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "poleg." - -#: src/prefs.c:160 -msgid "mm" -msgstr "mm" - -#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 -msgid "gLabels Preferences" -msgstr "Preferências do gLabels" - -#. -#. * Submenu: Order -#. -#: src/view.c:3570 data/ui/glabels-ui.xml.h:157 -msgid "_Order" -msgstr "_Ordenar" - -#. -#. * Submenu: Rotate/Flip -#. -#: src/view.c:3591 data/ui/glabels-ui.xml.h:163 -msgid "_Rotate/Flip" -msgstr "_Girar/Refletir" - -#. -#. * Submenu: Align Horizontally -#. -#: src/view.c:3624 -msgid "Align _Horizontally" -msgstr "Alinhar _Horizontalmente" - -#. -#. * Submenu: Align Vertically -#. -#: src/view.c:3663 -msgid "Align _Vertically" -msgstr "Alinhar _Verticalmente" - -#: src/view.c:3724 data/ui/glabels-ui.xml.h:140 -msgid "_Delete" -msgstr "_Apagar" - -#. Build editor. -#: src/view-box.c:223 -#, fuzzy -msgid "Box object properties" -msgstr "Editar propriedades do objeto caixa" - -#. Build editor. -#: src/view-ellipse.c:223 -#, fuzzy -msgid "Ellipse object properties" -msgstr "Editar propriedades do objeto elipse" - -#. Build editor. -#: src/view-line.c:223 -#, fuzzy -msgid "Line object properties" -msgstr "Edita propriedades do objeto" - -#. Build editor. -#: src/view-image.c:222 -#, fuzzy -msgid "Image object properties" -msgstr "Editar propriedades do objeto imagem" - -#. Build editor. -#: src/view-text.c:250 -#, fuzzy -msgid "Text object properties" -msgstr "Edita propriedades do objeto" - -#: src/view-text.c:562 data/glade/object-editor.glade.h:28 -msgid "Text" -msgstr "Texto" - -#. Build editor. -#: src/view-barcode.c:209 -#, fuzzy -msgid "Barcode object properties" -msgstr "Editar propriedades do objeto código de barras" - -#: src/view-barcode.c:579 src/print.c:1088 -#, fuzzy -msgid "Invalid barcode data" -msgstr "Código de barras inválido" - -#: src/merge-properties-dialog.c:231 -msgid "Merge Properties" -msgstr "Propriedades de Fusão" - -#. ---- Source section ---- -#: src/merge-properties-dialog.c:237 -msgid "Source" -msgstr "Fonte" - -#: src/merge-properties-dialog.c:245 -msgid "Format:" -msgstr "Formato:" - -#. Location line -#: src/merge-properties-dialog.c:273 -msgid "Location:" -msgstr "Localização" - -#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 -msgid "Select merge-database source" -msgstr "Selecione a fonte da base de dados da fusão" - -#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 -msgid "N/A" -msgstr "Não definido" - -#. ---- Sample Fields section ---- -#: src/merge-properties-dialog.c:300 -msgid "Record selection/preview:" -msgstr "Seleção/previsão de registro:" - -#: src/merge-properties-dialog.c:326 -msgid "Select" -msgstr "Selecionar" - -#: src/merge-properties-dialog.c:334 -msgid "Record/Field" -msgstr "Registro/Campo" - -#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 -msgid "Data" -msgstr "Dado" - -#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:82 -msgid "Print" -msgstr "Imprimir" - -#: src/print-dialog.c:281 -msgid "_Job" -msgstr "_Trabalho" - -#: src/print-dialog.c:286 -msgid "P_rinter" -msgstr "Imp_ressora" - -#. ----------- Add simple-copies widget ------------ -#: src/print-dialog.c:314 -msgid "Copies" -msgstr "Cópias" - -#. ------- Add merge control widget ------------ -#: src/print-dialog.c:322 -msgid "Document merge control" -msgstr "Controle de fusão do documento" - -#. ----------- Add custom print options area ------------ -#: src/print-dialog.c:330 -msgid "Options" -msgstr "Opções" - -#: src/print-dialog.c:351 -msgid "print crop marks" -msgstr "" - -#: src/print-dialog.c:553 src/print-dialog.c:592 -msgid "Print preview" -msgstr "Visualizar impressão" - -#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 -msgid "gLabels Template Designer" -msgstr "" - -#: src/bc.c:60 -msgid "POSTNET (any)" -msgstr "" - -#: src/bc.c:63 -msgid "POSTNET-5 (ZIP only)" -msgstr "" - -#: src/bc.c:66 -msgid "POSTNET-9 (ZIP+4)" -msgstr "" - -#: src/bc.c:69 -msgid "POSTNET-11 (DPBC)" -msgstr "" - -#: src/bc.c:72 -msgid "EAN (any)" -msgstr "" - -#: src/bc.c:75 -msgid "EAN-8" -msgstr "" - -#: src/bc.c:78 -msgid "EAN-8 +2" -msgstr "" - -#: src/bc.c:81 -msgid "EAN-8 +5" -msgstr "" - -#: src/bc.c:84 -msgid "EAN-13" -msgstr "" - -#: src/bc.c:87 -msgid "EAN-13 +2" -msgstr "" - -#: src/bc.c:90 -msgid "EAN-13 +5" -msgstr "" - -#: src/bc.c:93 -msgid "UPC (UPC-A or UPC-E)" -msgstr "" - -#: src/bc.c:96 -msgid "UPC-A" -msgstr "" - -#: src/bc.c:99 -msgid "UPC-A +2" -msgstr "" - -#: src/bc.c:102 -msgid "UPC-A +5" -msgstr "" - -#: src/bc.c:105 -msgid "UPC-E" -msgstr "" - -#: src/bc.c:108 -msgid "UPC-E +2" -msgstr "" - -#: src/bc.c:111 -msgid "UPC-E +5" -msgstr "" - -#: src/bc.c:114 -msgid "ISBN" -msgstr "" - -#: src/bc.c:117 -msgid "ISBN +5" -msgstr "" - -#: src/bc.c:120 -msgid "Code 39" -msgstr "" - -#: src/bc.c:123 -msgid "Code 128" -msgstr "" - -#: src/bc.c:126 -msgid "Code 128C" -msgstr "" - -#: src/bc.c:129 -msgid "Code 128B" -msgstr "" - -#: src/bc.c:132 -msgid "Interleaved 2 of 5" -msgstr "" - -#: src/bc.c:135 -msgid "Codabar" -msgstr "" - -#: src/bc.c:138 -msgid "MSI" -msgstr "" - -#: src/bc.c:141 -msgid "Plessey" -msgstr "" - -#: src/label.c:569 -msgid "Untitled" -msgstr "Sem_título" - -#: src/xml-label.c:176 src/xml-label.c:213 -msgid "xmlParseFile error" -msgstr "erro: xmlParseFile" - -#: src/xml-label.c:250 -msgid "No document root" -msgstr "Sem raiz do documento" - -#: src/xml-label.c:264 -msgid "Importing from glabels 0.1 format" -msgstr "Importando do formato do glabels 0.1" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "Importando do formato do glabels 0.4" - -#: src/xml-label.c:279 -#, fuzzy -msgid "Importing from glabels 1.91 format" -msgstr "Importando do formato do glabels 0.1" - -#: src/xml-label.c:282 -msgid "bad document, unknown glabels Namespace" -msgstr "documento ruim, espaço de nome glabels não encontrado" - -#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Nó raiz ruim = \"%s\"" - -#: src/xml-label.c:348 src/xml-label-191.c:165 -#, fuzzy, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "Nó raiz ruim = \"%s\"" - -#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "nó ruim = \"%s\"" - -#: src/xml-label.c:796 src/xml-label-191.c:605 -#, fuzzy, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "nó ruim = \"%s\"" - -#: src/xml-label.c:962 libglabels/xml-template.c:528 -msgid "Utf8 conversion error." -msgstr "" - -#: src/xml-label.c:969 libglabels/xml-template.c:535 -msgid "Problem saving xml file." -msgstr "Problema salvando arquivo xml." - -#. This should always be an id, but just in case a name -#. slips by! -#: src/xml-label-191.c:680 libglabels/xml-template.c:192 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "" - -#: src/xml-label-191.c:690 libglabels/xml-template.c:202 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "" - -#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 -msgid "None" -msgstr "Nenhum" - -#: src/merge-init.c:53 -msgid "Text file with comma delimeters (CSV)" -msgstr "Arquivo texto separado com vírgulas (CSV)" - -#: src/merge-init.c:60 -msgid "Text file with colon delimeters" -msgstr "Arquivo texto separado com dois pontos" - -#: src/merge-init.c:67 -msgid "Text file with tab delimeters" -msgstr "Arquivo texto separado com tab" - -#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 -msgid "File:" -msgstr "Arquivo:" - -#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 -msgid "Key:" -msgstr "Chave:" - -#: src/wdgt-print-copies.c:179 -msgid "Sheets:" -msgstr "Páginas:" - -#: src/wdgt-print-copies.c:197 -msgid "Labels" -msgstr "Etiquetas" - -#: src/wdgt-print-copies.c:200 -msgid "from:" -msgstr "de:" - -#: src/wdgt-print-copies.c:207 -msgid "to:" -msgstr "até:" - -#: src/wdgt-print-merge.c:178 -msgid "Start on label" -msgstr "Iniciar na etiqueta" - -#: src/wdgt-print-merge.c:186 -msgid "on 1st sheet" -msgstr "na primeira folha" - -#: src/wdgt-print-merge.c:195 -msgid "Copies:" -msgstr "Cópias:" - -#: src/wdgt-print-merge.c:201 -msgid "Collate" -msgstr "Ordenar" - -#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 -msgid "Description:" -msgstr "Descrição:" - -#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 -msgid "Page size:" -msgstr "Tamanho da página:" - -#: src/wdgt-media-select.c:290 -msgid "Label size:" -msgstr "Tamanho da etiqueta:" - -#: src/wdgt-media-select.c:301 -msgid "Layout:" -msgstr "Disposição:" - -#: src/wdgt-media-select.c:578 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (%d por página)" - -#: src/wdgt-media-select.c:582 -#, c-format -msgid "%d per sheet" -msgstr "%d por página" - -#: src/wdgt-media-select.c:614 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/wdgt-media-select.c:619 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s diâmetro" - -#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s diâmetro" - -#: src/wdgt-rotate-label.c:193 -msgid "Rotate" -msgstr "Girar" - -#. This is the default custom color -#: src/mygal/color-palette.c:396 -#, fuzzy -msgid "custom" -msgstr "Personalizar" - -#. "Custom" color - we'll pop up a GnomeColorPicker -#: src/mygal/color-palette.c:438 -#, fuzzy -msgid "Custom Color:" -msgstr "Personaliza barras de ferramentas" - -#: src/mygal/color-palette.c:446 -msgid "Choose Custom Color" -msgstr "" - -#: src/mygal/color-palette.c:579 -msgid "black" -msgstr "" - -#: src/mygal/color-palette.c:580 -msgid "light brown" -msgstr "" - -#: src/mygal/color-palette.c:581 -msgid "brown gold" -msgstr "" - -#: src/mygal/color-palette.c:582 -msgid "dark green #2" -msgstr "" - -#: src/mygal/color-palette.c:583 -msgid "navy" -msgstr "" - -#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 -msgid "dark blue" -msgstr "" - -#: src/mygal/color-palette.c:585 -msgid "purple #2" -msgstr "" - -#: src/mygal/color-palette.c:586 -msgid "very dark gray" -msgstr "" - -#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 -msgid "dark red" -msgstr "" - -#: src/mygal/color-palette.c:590 -msgid "red-orange" -msgstr "" - -#: src/mygal/color-palette.c:591 -msgid "gold" -msgstr "" - -#: src/mygal/color-palette.c:592 -msgid "dark green" -msgstr "" - -#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 -msgid "dull blue" -msgstr "" - -#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 -msgid "blue" -msgstr "" - -#: src/mygal/color-palette.c:595 -msgid "dull purple" -msgstr "" - -#: src/mygal/color-palette.c:596 -msgid "dark grey" -msgstr "" - -#: src/mygal/color-palette.c:599 -msgid "red" -msgstr "" - -#: src/mygal/color-palette.c:600 -msgid "orange" -msgstr "" - -#: src/mygal/color-palette.c:601 -msgid "lime" -msgstr "" - -#: src/mygal/color-palette.c:602 -msgid "dull green" -msgstr "" - -#: src/mygal/color-palette.c:603 -msgid "dull blue #2" -msgstr "" - -#: src/mygal/color-palette.c:604 -msgid "sky blue #2" -msgstr "" - -#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 -msgid "purple" -msgstr "" - -#: src/mygal/color-palette.c:606 -msgid "gray" -msgstr "" - -#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 -#, fuzzy -msgid "magenta" -msgstr "Imagem" - -#: src/mygal/color-palette.c:610 -msgid "bright orange" -msgstr "" - -#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 -msgid "yellow" -msgstr "" - -#: src/mygal/color-palette.c:612 -#, fuzzy -msgid "green" -msgstr "graus" - -#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 -msgid "cyan" -msgstr "" - -#: src/mygal/color-palette.c:614 -msgid "bright blue" -msgstr "" - -#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 -msgid "red purple" -msgstr "" - -#: src/mygal/color-palette.c:616 -msgid "light grey" -msgstr "" - -#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 -msgid "pink" -msgstr "" - -#: src/mygal/color-palette.c:620 -msgid "light orange" -msgstr "" - -#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 -msgid "light yellow" -msgstr "" - -#: src/mygal/color-palette.c:622 -msgid "light green" -msgstr "" - -#: src/mygal/color-palette.c:623 -msgid "light cyan" -msgstr "" - -#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 -msgid "light blue" -msgstr "" - -#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 -msgid "light purple" -msgstr "" - -#: src/mygal/color-palette.c:626 -msgid "white" -msgstr "" - -#: src/mygal/color-palette.c:631 -msgid "purplish blue" -msgstr "" - -#: src/mygal/color-palette.c:635 -msgid "dark purple" -msgstr "" - -#: src/mygal/color-palette.c:637 -msgid "sky blue" -msgstr "" - -#: libglabels/template.c:848 -#, c-format -msgid "Generic %s full page" -msgstr "Página completa %s genérico" - -#: libglabels/template.c:897 -msgid "No template files found!" -msgstr "Nenhum arquivo modelo encontrado!" - -#. Create and append an "Other" entry. -#: libglabels/paper.c:67 -msgid "Other" -msgstr "" - -#: libglabels/paper.c:361 -#, fuzzy -msgid "No paper files found!" -msgstr "Nenhum arquivo modelo encontrado!" - -#: data/ui/glabels-ui.xml.h:1 -msgid "About glabels" -msgstr "Sobre glabels" - -#: data/ui/glabels-ui.xml.h:2 -msgid "About..." -msgstr "Sobre..." - -#: data/ui/glabels-ui.xml.h:3 -msgid "Align _Horizontal" -msgstr "Alinhar _Horizontal" - -#: data/ui/glabels-ui.xml.h:4 -msgid "Align _Vertical" -msgstr "Alinhar _Vertical" - -#: data/ui/glabels-ui.xml.h:5 -msgid "Align objects to bottoms" -msgstr "Alinha objetos pelas bases" - -#: data/ui/glabels-ui.xml.h:6 -msgid "Align objects to horizontal centers" -msgstr "Alinha objetos pelos centros horizontais" - -#: data/ui/glabels-ui.xml.h:7 -msgid "Align objects to left edges" -msgstr "Alinha objetos pelas bordas esquerdas" - -#: data/ui/glabels-ui.xml.h:8 -msgid "Align objects to right edges" -msgstr "Alinha objetos pelas bordas direitas" - -#: data/ui/glabels-ui.xml.h:9 -msgid "Align objects to tops" -msgstr "Alinha objetos pelos topos" - -#: data/ui/glabels-ui.xml.h:10 -msgid "Align objects to vertical centers" -msgstr "Alinha objetos pelos centros verticais" - -#: data/ui/glabels-ui.xml.h:12 -msgid "Bold" -msgstr "" - -#: data/ui/glabels-ui.xml.h:14 -#, fuzzy -msgid "Center align" -msgstr "Centros" - -#: data/ui/glabels-ui.xml.h:15 -msgid "Center objects to horizontal label center" -msgstr "Centra objetos no centro horizontal da etiqueta" - -#: data/ui/glabels-ui.xml.h:16 -msgid "Center objects to vertical label center" -msgstr "Centra objetos no centro vertical da etiqueta" - -#: data/ui/glabels-ui.xml.h:17 -msgid "Change the visibility of markup lines in the current window" -msgstr "Muda a visibilidade das linhas de marcação na janela atual" - -#: data/ui/glabels-ui.xml.h:18 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "Muda a visibilidade da barra de ferramentas de desenho na janela atual" - -#: data/ui/glabels-ui.xml.h:19 -msgid "Change the visibility of the grid in the current window" -msgstr "Muda a visibilidade da grade na janela atual" - -#: data/ui/glabels-ui.xml.h:20 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "Muda a visibilidade da barra de ferramentas principal na janela atual" - -#: data/ui/glabels-ui.xml.h:21 -#, fuzzy -msgid "Change the visibility of the property toolbar in the current window" -msgstr "Muda a visibilidade da barra de ferramentas principal na janela atual" - -#: data/ui/glabels-ui.xml.h:22 -msgid "Close" -msgstr "Fechar" - -#: data/ui/glabels-ui.xml.h:23 -msgid "Close the current file" -msgstr "Fechar o arquivo atual" - -#: data/ui/glabels-ui.xml.h:24 -msgid "Configure the application" -msgstr "Configurar a aplicação" - -#: data/ui/glabels-ui.xml.h:25 -msgid "Contents" -msgstr "Conteúdo" - -#: data/ui/glabels-ui.xml.h:26 -msgid "Copy" -msgstr "Copiar" - -#: data/ui/glabels-ui.xml.h:27 -msgid "Copy the selection" -msgstr "Copia a seleção" - -#: data/ui/glabels-ui.xml.h:28 -#, fuzzy -msgid "Create a custom template" -msgstr "Cria um novo documento" - -#: data/ui/glabels-ui.xml.h:29 -msgid "Create a new document" -msgstr "Cria um novo documento" - -#: data/ui/glabels-ui.xml.h:30 -msgid "Create barcode object" -msgstr "Criar objeto código de barras" - -#: data/ui/glabels-ui.xml.h:31 -msgid "Create box/rectangle object" -msgstr "Criar objeto caixa/retângulo" - -#: data/ui/glabels-ui.xml.h:32 -msgid "Create ellipse/circle object" -msgstr "Criar objeto elipse/círculo" - -#: data/ui/glabels-ui.xml.h:33 -msgid "Create image object" -msgstr "Criar objeto imagem" - -#: data/ui/glabels-ui.xml.h:34 -msgid "Create line object" -msgstr "Criar objeto linha" - -#: data/ui/glabels-ui.xml.h:35 -msgid "Create text object" -msgstr "Criar objeto texto" - -#: data/ui/glabels-ui.xml.h:36 -msgid "Cu_t" -msgstr "Cor_tar" - -#: data/ui/glabels-ui.xml.h:37 -msgid "Customize" -msgstr "Personalizar" - -#: data/ui/glabels-ui.xml.h:38 -msgid "Customize Drawing Toolbar" -msgstr "Personaliza barra de ferramentas de desenho" - -#: data/ui/glabels-ui.xml.h:39 -msgid "Customize Main Toolbar" -msgstr "Personaliza barra de ferramentas principal" - -#: data/ui/glabels-ui.xml.h:40 -#, fuzzy -msgid "Customize Property Toolbar" -msgstr "Personaliza barras de ferramentas" - -#: data/ui/glabels-ui.xml.h:41 -msgid "Customize toolbars" -msgstr "Personaliza barras de ferramentas" - -#: data/ui/glabels-ui.xml.h:42 -msgid "Cut" -msgstr "Cortar" - -#: data/ui/glabels-ui.xml.h:43 -msgid "Cut the selection" -msgstr "Corta a seleção" - -#: data/ui/glabels-ui.xml.h:44 -msgid "Decrease magnification" -msgstr "Diminuir aumento" - -#: data/ui/glabels-ui.xml.h:45 -msgid "Delete" -msgstr "Apagar" - -#: data/ui/glabels-ui.xml.h:46 -msgid "Delete the selected objects" -msgstr "Apaga os objetos selecionados" - -#: data/ui/glabels-ui.xml.h:47 -msgid "Drawing toolbar" -msgstr "Barra de ferramentas de desenho" - -#: data/ui/glabels-ui.xml.h:48 -msgid "Dump XML" -msgstr "Descarregar XML" - -#: data/ui/glabels-ui.xml.h:49 -msgid "Dump the UI Xml description" -msgstr "Descarrega a descrição da UI Xml" - -#: data/ui/glabels-ui.xml.h:50 -msgid "Edit merge properties" -msgstr "Editar propriedades de fusão" - -#: data/ui/glabels-ui.xml.h:54 -msgid "Flip object horizontally" -msgstr "Reflete objeto horizontalmente" - -#: data/ui/glabels-ui.xml.h:55 -msgid "Flip object vertically" -msgstr "Reflete objeto verticalmente" - -#: data/ui/glabels-ui.xml.h:56 -#, fuzzy -msgid "Font name" -msgstr "Não salve" - -#: data/ui/glabels-ui.xml.h:57 -#, fuzzy -msgid "Font selector" -msgstr "Copia a seleção" - -#: data/ui/glabels-ui.xml.h:58 -#, fuzzy -msgid "Font size" -msgstr "Não salve" - -#: data/ui/glabels-ui.xml.h:59 -msgid "Icon and _Text" -msgstr "Ícone e _Texto" - -#: data/ui/glabels-ui.xml.h:60 -msgid "Increase magnification" -msgstr "Aumentar aumento" - -#: data/ui/glabels-ui.xml.h:61 -msgid "Italic" -msgstr "" - -#: data/ui/glabels-ui.xml.h:63 -msgid "Left align" -msgstr "" - -#: data/ui/glabels-ui.xml.h:65 -msgid "Line width" -msgstr "" - -#: data/ui/glabels-ui.xml.h:66 -msgid "Lower object to bottom" -msgstr "Abaixa objeto à base" - -#: data/ui/glabels-ui.xml.h:67 -msgid "M_arkup" -msgstr "M_arcação" - -#: data/ui/glabels-ui.xml.h:68 -msgid "Main toolbar" -msgstr "Barra de ferramentas principal" - -#: data/ui/glabels-ui.xml.h:69 -msgid "Markup" -msgstr "Marcação" - -#: data/ui/glabels-ui.xml.h:70 -#, fuzzy -msgid "Modify document properties" -msgstr "Editar propriedades de fusão do documento" - -#: data/ui/glabels-ui.xml.h:71 -msgid "New" -msgstr "Novo" - -#: data/ui/glabels-ui.xml.h:72 -#, fuzzy -msgid "Object property editor" -msgstr "_Propriedades de Objeto" - -#: data/ui/glabels-ui.xml.h:73 -msgid "Only show icons in the drawing toolbar" -msgstr "Exibe somente ícones na barra de ferramentas de desenho" - -#: data/ui/glabels-ui.xml.h:74 -msgid "Only show icons in the main toolbar" -msgstr "Exibe somente ícones na barra de ferramentas principal" - -#: data/ui/glabels-ui.xml.h:76 -msgid "Open a file" -msgstr "Abrir um arquivo" - -#: data/ui/glabels-ui.xml.h:77 -msgid "Open the glabels manual" -msgstr "Abre o manual do glabels" - -#: data/ui/glabels-ui.xml.h:78 -msgid "Paste" -msgstr "Colar" - -#: data/ui/glabels-ui.xml.h:79 -msgid "Paste the clipboard" -msgstr "Cola a área de transferência" - -#: data/ui/glabels-ui.xml.h:80 -msgid "Pr_eferences..." -msgstr "Pr_eferências..." - -#: data/ui/glabels-ui.xml.h:81 -msgid "Preferences" -msgstr "Preferências" - -#: data/ui/glabels-ui.xml.h:83 -msgid "Print the current file" -msgstr "Imprime o arquivo atual" - -#: data/ui/glabels-ui.xml.h:84 -#, fuzzy -msgid "Proper_ties..." -msgstr "Propriedades" - -#: data/ui/glabels-ui.xml.h:85 -msgid "Properties" -msgstr "Propriedades" - -#: data/ui/glabels-ui.xml.h:86 -msgid "Property toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:87 -msgid "Quit" -msgstr "Sair" - -#: data/ui/glabels-ui.xml.h:88 -msgid "Quit the program" -msgstr "Sai do programa" - -#: data/ui/glabels-ui.xml.h:89 -msgid "Raise object to top" -msgstr "Sobe objetos ao topo" - -#: data/ui/glabels-ui.xml.h:90 -msgid "Recent _Files" -msgstr "_Arquivos recentes" - -#: data/ui/glabels-ui.xml.h:91 -msgid "Redo" -msgstr "Refazer" - -#: data/ui/glabels-ui.xml.h:92 -msgid "Redo the undone action" -msgstr "Refaz a ação desfeita" - -#: data/ui/glabels-ui.xml.h:93 -msgid "Remove all selections" -msgstr "Remover todas as seleções" - -#: data/ui/glabels-ui.xml.h:95 -#, no-c-format -msgid "Restore scale to 100%" -msgstr "Restaura escala para 100%" - -#: data/ui/glabels-ui.xml.h:96 -msgid "Right align" -msgstr "" - -#: data/ui/glabels-ui.xml.h:99 -msgid "Rotate object 90 clockwise" -msgstr "Gira objeto 90 sentido horário" - -#: data/ui/glabels-ui.xml.h:100 -msgid "Rotate object 90 counter-clockwise" -msgstr "Gira objeto 90 sentido anti-horário" - -#: data/ui/glabels-ui.xml.h:101 -msgid "Save" -msgstr "Salvar" - -#: data/ui/glabels-ui.xml.h:102 -msgid "Save As" -msgstr "Salvar como" - -#: data/ui/glabels-ui.xml.h:103 -msgid "Save _As..." -msgstr "Salvar _como..." - -#: data/ui/glabels-ui.xml.h:104 -msgid "Save the current file" -msgstr "Salva o arquivo atual" - -#: data/ui/glabels-ui.xml.h:105 -msgid "Save the current file with a different name" -msgstr "Salva o arquivo atual com um nome diferente" - -#: data/ui/glabels-ui.xml.h:106 -msgid "Select All" -msgstr "Selecionar Tudo" - -#: data/ui/glabels-ui.xml.h:107 -msgid "Select _All" -msgstr "Selecionar _Tudo" - -#: data/ui/glabels-ui.xml.h:108 -msgid "Select all objects" -msgstr "Seleciona todos os objetos" - -#: data/ui/glabels-ui.xml.h:109 -msgid "Select, move and modify objects" -msgstr "Seleciona, movimenta e modifica objetos" - -#: data/ui/glabels-ui.xml.h:111 -msgid "Set drawing toolbar button style according to desktop default" -msgstr "" -"Define estilo de botão da barra de ferramentas de desenho de acordo com " -"padrão do desktop" - -#: data/ui/glabels-ui.xml.h:112 -msgid "Set main toolbar button style according to desktop default" -msgstr "" -"Define estilo de botão da barra de ferramentas principal de acordo com " -"padrão do desktop" - -#: data/ui/glabels-ui.xml.h:113 -msgid "Show _Tooltips" -msgstr "Exibir _Dicas" - -#: data/ui/glabels-ui.xml.h:114 -#, fuzzy -msgid "Show both icons and texts in the drawing toolbar" -msgstr "Exibe dicas na barra de ferramentas de desenho" - -#: data/ui/glabels-ui.xml.h:115 -#, fuzzy -msgid "Show both icons and texts in the main toolbar" -msgstr "Exibe dicas na barra de ferramentas principal" - -#: data/ui/glabels-ui.xml.h:116 -msgid "Show tooltips in the drawing toolbar" -msgstr "Exibe dicas na barra de ferramentas de desenho" - -#: data/ui/glabels-ui.xml.h:117 -msgid "Show tooltips in the main toolbar" -msgstr "Exibe dicas na barra de ferramentas principal" - -#: data/ui/glabels-ui.xml.h:118 -#, fuzzy -msgid "Show tooltips in the property toolbar" -msgstr "Exibe dicas na barra de ferramentas principal" - -#: data/ui/glabels-ui.xml.h:119 -msgid "Template Designer" -msgstr "" - -#: data/ui/glabels-ui.xml.h:120 -msgid "Template _Designer..." -msgstr "" - -#: data/ui/glabels-ui.xml.h:121 -msgid "Text color" -msgstr "" - -#: data/ui/glabels-ui.xml.h:122 -msgid "U_n-select All" -msgstr "D_esmarcar Tudo" - -#: data/ui/glabels-ui.xml.h:123 -msgid "Un-select All" -msgstr "Desmarcar Tudo" - -#: data/ui/glabels-ui.xml.h:124 -msgid "Undo" -msgstr "Desfazer" - -#: data/ui/glabels-ui.xml.h:125 -msgid "Undo the last action" -msgstr "Desfaz a última ação" - -#: data/ui/glabels-ui.xml.h:126 -msgid "Zoom _1:1" -msgstr "Zoom _1:1" - -#: data/ui/glabels-ui.xml.h:127 -msgid "Zoom _In" -msgstr "M_ais Zoom" - -#: data/ui/glabels-ui.xml.h:128 -msgid "Zoom _Out" -msgstr "M_enos Zoom" - -#: data/ui/glabels-ui.xml.h:129 -#, fuzzy -msgid "Zoom to _fit" -msgstr "Zoom para 1:1" - -#: data/ui/glabels-ui.xml.h:130 -msgid "Zoom to fit window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:131 -msgid "_About..." -msgstr "_Sobre..." - -#: data/ui/glabels-ui.xml.h:132 -msgid "_Bottoms" -msgstr "_Bases" - -#: data/ui/glabels-ui.xml.h:135 -msgid "_Close" -msgstr "_Fechar" - -#: data/ui/glabels-ui.xml.h:136 -msgid "_Contents" -msgstr "_Conteúdo" - -#: data/ui/glabels-ui.xml.h:137 -msgid "_Copy" -msgstr "_Copiar" - -#: data/ui/glabels-ui.xml.h:138 -msgid "_Create Object" -msgstr "_Criar Objeto" - -#: data/ui/glabels-ui.xml.h:139 -msgid "_Debug" -msgstr "_Depurar" - -#: data/ui/glabels-ui.xml.h:141 -msgid "_Desktop Default" -msgstr "Padrão _Desktop" - -#: data/ui/glabels-ui.xml.h:142 -msgid "_Drawing Toolbar" -msgstr "Barra de _Desenho" - -#: data/ui/glabels-ui.xml.h:143 -msgid "_Edit" -msgstr "_Editar" - -#: data/ui/glabels-ui.xml.h:145 -msgid "_File" -msgstr "_Arquivo" - -#: data/ui/glabels-ui.xml.h:146 -msgid "_Grid" -msgstr "_Grade" - -#: data/ui/glabels-ui.xml.h:147 -msgid "_Help" -msgstr "A_juda" - -#: data/ui/glabels-ui.xml.h:148 -msgid "_Icon" -msgstr "_Ícone" - -#: data/ui/glabels-ui.xml.h:152 -msgid "_Main Toolbar" -msgstr "Barra _Principal" - -#: data/ui/glabels-ui.xml.h:153 -msgid "_Merge Properties..." -msgstr "Propriedades de _Fusão..." - -#: data/ui/glabels-ui.xml.h:154 -msgid "_New" -msgstr "_Novo" - -#: data/ui/glabels-ui.xml.h:155 -msgid "_Objects" -msgstr "_Objetos" - -#: data/ui/glabels-ui.xml.h:156 -msgid "_Open..." -msgstr "_Abrir..." - -#: data/ui/glabels-ui.xml.h:158 -msgid "_Paste" -msgstr "_Colar" - -#: data/ui/glabels-ui.xml.h:159 -msgid "_Print..." -msgstr "Im_primir..." - -#: data/ui/glabels-ui.xml.h:160 -#, fuzzy -msgid "_Property Toolbar" -msgstr "Barra de _Desenho" - -#: data/ui/glabels-ui.xml.h:161 -msgid "_Quit" -msgstr "_Sair" - -#: data/ui/glabels-ui.xml.h:164 -msgid "_Save" -msgstr "_Salvar" - -#: data/ui/glabels-ui.xml.h:168 -msgid "_View" -msgstr "_Visualizar" - -#: data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 -#: data/glade/template-designer.glade.h:5 -msgid "*" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:3 -msgid "Default page size" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:4 -msgid "Fill" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:5 -msgid "Line" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:6 -msgid "Text" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:7 -msgid "Units" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 -msgid "Alignment:" -msgstr "Alinhamento:" - -#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 -msgid "Color:" -msgstr "Cor:" - -#: data/glade/prefs-dialog.glade.h:10 -msgid "Font:" -msgstr "Fonte:" - -#: data/glade/prefs-dialog.glade.h:11 -msgid "ISO A4" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:12 -msgid "Inches" -msgstr "Polegadas" - -#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 -msgid "Line Spacing:" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:14 -msgid "Locale" -msgstr "Local" - -#: data/glade/prefs-dialog.glade.h:15 -msgid "Millimeters" -msgstr "Milímetros" - -#: data/glade/prefs-dialog.glade.h:16 -msgid "Object defaults" -msgstr "Padrões do objeto" - -#: data/glade/prefs-dialog.glade.h:17 -msgid "Points" -msgstr "Pontos" - -#: data/glade/prefs-dialog.glade.h:18 -msgid "Select default properties for new objects." -msgstr "Selecione as propriedades padrões para novos objetos." - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "Selecione comportamento específico do local." - -#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:25 -msgid "US Letter" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 -#: data/glade/template-designer.glade.h:72 -msgid "Width:" -msgstr "Largura:" - -#: data/glade/object-editor.glade.h:2 -msgid "00000000000 00000" -msgstr "" - -#: data/glade/object-editor.glade.h:3 -msgid "Xxx object properties" -msgstr "" - -#: data/glade/object-editor.glade.h:5 -msgid "Allow merge to automatically shrink text" -msgstr "" - -#: data/glade/object-editor.glade.h:6 -msgid "Angle:" -msgstr "Ângulo:" - -#: data/glade/object-editor.glade.h:7 -msgid "Checksum" -msgstr "" - -#: data/glade/object-editor.glade.h:10 -#, fuzzy -msgid "Family:" -msgstr "Arquivo:" - -#: data/glade/object-editor.glade.h:12 -msgid "Fill" -msgstr "Preencher" - -#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 -msgid "Height:" -msgstr "Altura:" - -#: data/glade/object-editor.glade.h:14 -msgid "Image" -msgstr "Imagem" - -#: data/glade/object-editor.glade.h:15 -msgid "Insert merge field" -msgstr "Inserir campo de fusão" - -#: data/glade/object-editor.glade.h:17 -msgid "Length:" -msgstr "Comprimento:" - -#: data/glade/object-editor.glade.h:18 -msgid "Line" -msgstr "Linha" - -#: data/glade/object-editor.glade.h:20 -msgid "Literal:" -msgstr "Literal:" - -#: data/glade/object-editor.glade.h:21 -msgid "Load image" -msgstr "" - -#: data/glade/object-editor.glade.h:22 -msgid "Position" -msgstr "Posição" - -#: data/glade/object-editor.glade.h:23 -msgid "Reset image size" -msgstr "Redefinir tamanho da imagem" - -#: data/glade/object-editor.glade.h:24 -msgid "Size" -msgstr "Tamanho" - -#: data/glade/object-editor.glade.h:25 -#, fuzzy -msgid "Size:" -msgstr "Tamanho" - -#: data/glade/object-editor.glade.h:26 -#, fuzzy -msgid "Style" -msgstr "Estilo:" - -#: data/glade/object-editor.glade.h:27 -msgid "Style:" -msgstr "Estilo:" - -#: data/glade/object-editor.glade.h:30 -msgid "X:" -msgstr "X:" - -#: data/glade/object-editor.glade.h:31 -msgid "Y:" -msgstr "Y:" - -#: data/glade/object-editor.glade.h:32 -msgid "degrees" -msgstr "graus" - -#: data/glade/object-editor.glade.h:33 -msgid "dialog1" -msgstr "" - -#: data/glade/object-editor.glade.h:34 -msgid "digits:" -msgstr "" - -#: data/glade/object-editor.glade.h:35 -#, fuzzy -msgid "format:" -msgstr "Formato:" - -#: data/glade/template-designer.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/template-designer.glade.h:2 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "" - -#: data/glade/template-designer.glade.h:3 -msgid "(e.g., 8163A)" -msgstr "" - -#: data/glade/template-designer.glade.h:4 -msgid "(e.g., Avery, Acme, ...)" -msgstr "" - -#: data/glade/template-designer.glade.h:6 -msgid "1. Outer radius:" -msgstr "" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "" - -#: data/glade/template-designer.glade.h:8 -#, fuzzy -msgid "1. Width:" -msgstr "Largura:" - -#: data/glade/template-designer.glade.h:9 -#, fuzzy -msgid "2. Height:" -msgstr "Altura:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" - -#: data/glade/template-designer.glade.h:30 -msgid "Design Completed" -msgstr "" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" - -#: data/glade/template-designer.glade.h:40 -msgid "Label Size (CD/DVD)" -msgstr "" - -#: data/glade/template-designer.glade.h:41 -#, fuzzy -msgid "Label Size (Round)" -msgstr "Tamanho da etiqueta:" - -#: data/glade/template-designer.glade.h:42 -#, fuzzy -msgid "Label or Card Shape" -msgstr "Nova Etiqueta ou Cartão" - -#: data/glade/template-designer.glade.h:43 -msgid "Label or Card Size (Rectangular)" -msgstr "" - -#: data/glade/template-designer.glade.h:44 -#, fuzzy -msgid "Layout #1" -msgstr "Disposição:" - -#: data/glade/template-designer.glade.h:45 -#, fuzzy -msgid "Layout #2" -msgstr "Disposição:" - -#: data/glade/template-designer.glade.h:46 -#, fuzzy -msgid "Layout(s)" -msgstr "Disposição:" - -#: data/glade/template-designer.glade.h:47 -#, fuzzy -msgid "Name and Description" -msgstr "Descrição:" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "" - -#: data/glade/template-designer.glade.h:50 -msgid "Number of Layouts" -msgstr "" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "" - -#: data/glade/template-designer.glade.h:52 -#, fuzzy -msgid "Page Size" -msgstr "Tamanho da página:" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "" - -#: data/glade/template-designer.glade.h:55 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "" - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "" - -#: data/glade/template-designer.glade.h:57 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "" - -#: data/glade/template-designer.glade.h:58 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "" - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "" - -#: data/glade/template-designer.glade.h:61 -#, fuzzy -msgid "Print test sheet" -msgstr "na primeira folha" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" - -#: data/glade/template-designer.glade.h:68 -msgid "Vertical pitch (dy):" -msgstr "" - -#: data/glade/template-designer.glade.h:69 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" - -#: data/templates/paper-sizes.xml.h:1 -msgid "A0" -msgstr "" - -#: data/templates/paper-sizes.xml.h:2 -msgid "A1" -msgstr "" - -#: data/templates/paper-sizes.xml.h:3 -msgid "A10" -msgstr "" - -#: data/templates/paper-sizes.xml.h:4 -msgid "A2" -msgstr "" - -#: data/templates/paper-sizes.xml.h:5 -msgid "A3" -msgstr "" - -#: data/templates/paper-sizes.xml.h:6 -msgid "A4" -msgstr "" - -#: data/templates/paper-sizes.xml.h:7 -msgid "A5" -msgstr "" - -#: data/templates/paper-sizes.xml.h:8 -msgid "A6" -msgstr "" - -#: data/templates/paper-sizes.xml.h:9 -msgid "A7" -msgstr "" - -#: data/templates/paper-sizes.xml.h:10 -msgid "A8" -msgstr "" - -#: data/templates/paper-sizes.xml.h:11 -msgid "A9" -msgstr "" - -#: data/templates/paper-sizes.xml.h:12 -msgid "B0" -msgstr "" - -#: data/templates/paper-sizes.xml.h:13 -msgid "B1" -msgstr "" - -#: data/templates/paper-sizes.xml.h:14 -msgid "B10" -msgstr "" - -#: data/templates/paper-sizes.xml.h:15 -msgid "B2" -msgstr "" - -#: data/templates/paper-sizes.xml.h:16 -msgid "B3" -msgstr "" - -#: data/templates/paper-sizes.xml.h:17 -msgid "B4" -msgstr "" - -#: data/templates/paper-sizes.xml.h:18 -msgid "B5" -msgstr "" - -#: data/templates/paper-sizes.xml.h:19 -msgid "B6" -msgstr "" - -#: data/templates/paper-sizes.xml.h:20 -msgid "B7" -msgstr "" - -#: data/templates/paper-sizes.xml.h:21 -msgid "B8" -msgstr "" - -#: data/templates/paper-sizes.xml.h:22 -msgid "B9" -msgstr "" - -#: data/templates/paper-sizes.xml.h:23 -msgid "US Executive" -msgstr "" - -#: data/templates/paper-sizes.xml.h:24 -msgid "US Legal" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:1 -#: data/templates/zweckform-iso-templates.xml.h:1 -msgid "Address Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:2 -#: data/templates/avery-iso-templates.xml.h:2 -#: data/templates/zweckform-iso-templates.xml.h:3 -#: data/templates/misc-us-templates.xml.h:2 -#: data/templates/misc-iso-templates.xml.h:9 -msgid "Business Cards" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:3 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:4 -msgid "Diskette Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:5 -#, fuzzy -msgid "Filing Labels" -msgstr "Etiquetas" - -#: data/templates/avery-us-templates.xml.h:6 -msgid "Full Sheet Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:7 -#, fuzzy -msgid "Large Round Labels" -msgstr "Iniciar na etiqueta" - -#: data/templates/avery-us-templates.xml.h:8 -msgid "Name Badge Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:9 -msgid "Return Address Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:10 -msgid "Shipping Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:11 -#, fuzzy -msgid "Small Round Labels" -msgstr "Iniciar na etiqueta" - -#: data/templates/avery-us-templates.xml.h:12 -#, fuzzy -msgid "Square Labels" -msgstr "Etiquetas" - -#: data/templates/avery-us-templates.xml.h:13 -msgid "Video Tape Face Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:14 -msgid "Video Tape Spine Labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:1 -msgid "Address labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:3 -msgid "CD Booklet" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:4 -msgid "CD Inlet" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:5 -#: data/templates/zweckform-iso-templates.xml.h:4 -#: data/templates/misc-us-templates.xml.h:4 -#: data/templates/misc-iso-templates.xml.h:10 -#, fuzzy -msgid "CD/DVD Labels" -msgstr "Etiquetas" - -#: data/templates/avery-iso-templates.xml.h:6 -#, fuzzy -msgid "Diskette labels" -msgstr "Sobre glabels" - -#: data/templates/avery-iso-templates.xml.h:7 -#: data/templates/zweckform-iso-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:17 -msgid "Mailing Labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:8 -#, fuzzy -msgid "Mailing labels" -msgstr "glabels" - -#: data/templates/avery-iso-templates.xml.h:9 -msgid "Mini Address Labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:10 -#, fuzzy -msgid "Shipping labels" -msgstr "Abrir etiqueta" - -#: data/templates/zweckform-iso-templates.xml.h:2 -#, fuzzy -msgid "Allround Labels" -msgstr "Sobre glabels" - -#: data/templates/zweckform-iso-templates.xml.h:5 -msgid "Correction and Cover-up Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:6 -msgid "Lever Arch File Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:8 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:9 -msgid "Rectangular Copier Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:10 -#: data/templates/misc-iso-templates.xml.h:22 -msgid "Rectangular Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:11 -msgid "Video Labels (back)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:1 -msgid "Business Card CD" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:3 -msgid "CD Template Rectangles" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:5 -msgid "CD/DVD Labels (Face Only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:6 -#: data/templates/misc-iso-templates.xml.h:11 -msgid "CD/DVD Labels (face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:7 -#, fuzzy -msgid "DLT Labels" -msgstr "Etiquetas" - -#: data/templates/misc-us-templates.xml.h:8 -#, fuzzy -msgid "Microtube labels" -msgstr "Sobre glabels" - -#: data/templates/misc-us-templates.xml.h:9 -msgid "Mini-CD Labels" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:10 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:11 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:12 -#: data/templates/misc-iso-templates.xml.h:21 -msgid "PRO CD Labels 2-up (face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:13 -msgid "Slimline CD Case (rightside up)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Slimline CD Case (upside down)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:1 -msgid "Agipa 119488: Business Cards" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:2 -msgid "Allround Labels --24" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:3 -msgid "Allround Labels --44" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:4 -msgid "Allround Labels --64" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:5 -msgid "Allround Labels --65" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:6 -msgid "Arch File Labels" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:7 -msgid "Arch File Labels (large)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:8 -msgid "Arch File Labels (small)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:12 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Diskette Labels (face only)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:14 -msgid "EPSON Photo Stickers 16" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Etiketten" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:16 -msgid "Fridge Magnet Stickers" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:18 -msgid "Mailing Labels --14" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:19 -msgid "Mailing Labels-2 columns" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:20 -msgid "Mailing Labels-3 columns" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:23 -msgid "Video Labels (face only)" -msgstr "" - -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers." -msgstr "" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "" - -#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 -#, fuzzy -msgid "gLabels Project File" -msgstr "_Propriedades de Objeto" - -#~ msgid "Object _Properties..." -#~ msgstr "_Propriedades do Objeto..." - -#~ msgid "Display units" -#~ msgstr "Exibir unidades" - -#~ msgid "Default page size" -#~ msgstr "Tamanho de página padrão" - -#~ msgid "Outline" -#~ msgstr "Contorno" - -#~ msgid "Edit line object properties" -#~ msgstr "Editar propriedades do objeto linha" - -#~ msgid "Edit text object properties" -#~ msgstr "Editar propriedades do objeto texto" - -#~ msgid "Edit text:" -#~ msgstr "Editar texto:" - -#~ msgid "Maintain current aspect ratio" -#~ msgstr "Manter taxa de aspecto atual" - -#, fuzzy -#~ msgid "CD Labels" -#~ msgstr "Etiquetas" - -#~ msgid "Open %s" -#~ msgstr "Abrir %s" - -#~ msgid "Scale:" -#~ msgstr "Escala:" - -#~ msgid "%" -#~ msgstr "%" - -#~ msgid "Show text with barcode" -#~ msgstr "Exibir texto com código de barras" - -#~ msgid "Edit properties..." -#~ msgstr "Editar propriedades..." - -#~ msgid "Fields" -#~ msgstr "Campos" - -#~ msgid "Column" -#~ msgstr "Coluna" - -#~ msgid "Custom field key" -#~ msgstr "Chave do campo específico" - -#~ msgid "Sample data" -#~ msgstr "Dado de amostra" - -#~ msgid "Revert to saved copy of %s?" -#~ msgstr "Reverter para a cópia gravada de %s?" - -#~ msgid "Unknown media type. Using default." -#~ msgstr "Tipo de mídia desconhecido. Usando padrão." - -#~ msgid "" -#~ "``%s'' has been modified.\n" -#~ "\n" -#~ "Do you wish to save it?" -#~ msgstr "" -#~ "``%s'' foi modificado.\n" -#~ "\n" -#~ "Deseja salvá-lo?" - -#~ msgid "Close / Save label as" -#~ msgstr "Fechar / Salvar etiqueta como" - -#~ msgid "Label no longer valid!" -#~ msgstr "Etiqueta não é mais válida" - -#~ msgid "Error writing file" -#~ msgstr "Erro gravando o arquivo" - -#~ msgid "Appearance" -#~ msgstr "Aparência" - -#~ msgid "Position/Size" -#~ msgstr "Posição/Tamanho" - -#~ msgid "Image format not currently supported" -#~ msgstr "Formato de imagem não suportado atualmente" - -#~ msgid "Barcode data" -#~ msgstr "Dado do Código de Barras:" - -#~ msgid "General" -#~ msgstr "Geral" - -#~ msgid "Make a new, empty label" -#~ msgstr "Criar uma etiqueta nova, vazia" - -#~ msgid " New " -#~ msgstr " Novo " - -#~ msgid "New Label/Card" -#~ msgstr "Nova Etiqueta/Cartão" - -#~ msgid " Open " -#~ msgstr " Abrir " - -#~ msgid " Save " -#~ msgstr " Salvar " - -#~ msgid " Print " -#~ msgstr " Imprimir " - -#~ msgid "Function is not implemented!" -#~ msgstr "Função não está implementada!" - -#~ msgid "Function is not yet implemented!" -#~ msgstr "Função ainda não implementada!" diff --git a/glabels2/po/ru.po b/glabels2/po/ru.po deleted file mode 100644 index ff02c9e8..00000000 --- a/glabels2/po/ru.po +++ /dev/null @@ -1,3011 +0,0 @@ -# Russian translation of glabels. -# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -# Vitaly Lipatov , 2002, 2003, 2004, 2005. -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 2.3.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-29 00:34+0400\n" -"PO-Revision-Date: 2009-07-29 19:58+0400\n" -"Last-Translator: Alexandre Prokoudine \n" -"Language-Team: Russian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.10\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#: ../src/glabels.c:66 ../src/glabels-batch.c:69 -msgid "[FILE...]" -msgstr "[ФАЙЛ...]" - -#: ../src/glabels.c:83 -#, fuzzy -msgid "Launch gLabels label and business card designer." -msgstr "Программа для создания этикеток и визитных карточек\n" - -#: ../src/glabels.c:91 ../src/glabels-batch.c:105 -#, c-format -msgid "" -"%s\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" - -#: ../src/glabels-batch.c:53 -msgid "set output filename (default=\"output.pdf\")" -msgstr "Установить название выходного файла (по умолчанию — \"output.ps\"" - -#: ../src/glabels-batch.c:53 ../src/glabels-batch.c:67 -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 -msgid "first label on first sheet (default=1)" -msgstr "первая этикетка на первой странице (по умолчанию = 1)" - -#: ../src/glabels-batch.c:59 -msgid "first" -msgstr "первое" - -#: ../src/glabels-batch.c:61 ../data/builder/print-custom-widget.glade.h:6 -msgid "print outlines (to test printer alignment)" -msgstr "Печатать контуры этикеток (для тестирования выравнивания)" - -#: ../src/glabels-batch.c:63 ../data/builder/print-custom-widget.glade.h:5 -msgid "print in reverse (i.e. a mirror image)" -msgstr "Печатать зеркальное отображение" - -#: ../src/glabels-batch.c:65 ../data/builder/print-custom-widget.glade.h:4 -msgid "print crop marks" -msgstr "Печатать метки под обрез" - -#: ../src/glabels-batch.c:67 -msgid "input file for merging" -msgstr "Входной файл для заполнения полей" - -#: ../src/glabels-batch.c:97 -msgid "Print files created with gLabels." -msgstr "Напечатать созданные в gLabels файлы." - -#: ../src/glabels-batch.c:147 -#, c-format -msgid "cannot perform document merge with glabels file %s\n" -msgstr "Не удалось выполнить заполнение полей документа файлом gLabels %s\n" - -#: ../src/glabels-batch.c:169 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "Не удалось открыть файл %s\n" - -#: ../src/window.c:259 -msgid "(none) - gLabels" -msgstr "(нет открытых макетов) - gLabels" - -#: ../src/window.c:432 -msgid "(modified)" -msgstr "(изменено)" - -#: ../src/stock.c:72 -msgid "_Select Mode" -msgstr "_Режим выделения" - -#: ../src/stock.c:73 -msgid "_Text" -msgstr "_Текст" - -#: ../src/stock.c:74 -msgid "_Line" -msgstr "_Линия" - -#: ../src/stock.c:75 -msgid "_Box" -msgstr "_Прямоугольник" - -#: ../src/stock.c:76 -msgid "_Ellipse" -msgstr "_Эллипс" - -#: ../src/stock.c:77 -msgid "_Image" -msgstr "_Изображение" - -#: ../src/stock.c:78 -msgid "Bar_code" -msgstr "_Штрих-код" - -#: ../src/stock.c:79 -msgid "_Merge Properties" -msgstr "Заполнение полей данными" - -#: ../src/stock.c:80 -msgid "Object _Properties" -msgstr "_Свойства объекта" - -#: ../src/stock.c:81 -msgid "Bring to _Front" -msgstr "На _передний план" - -#: ../src/stock.c:82 -msgid "Send to _Back" -msgstr "На _задний план" - -#: ../src/stock.c:83 -msgid "Rotate _Left" -msgstr "Повернуть на_лево" - -#: ../src/stock.c:84 -msgid "Rotate _Right" -msgstr "Повернуть на_право" - -#: ../src/stock.c:85 -msgid "Flip _Horizontally" -msgstr "Отразить _горизонтально" - -#: ../src/stock.c:86 -msgid "Flip _Vertically" -msgstr "Отразить _вертикально" - -#: ../src/stock.c:87 -msgid "_Lefts" -msgstr "С_лева" - -#: ../src/stock.c:88 -msgid "_Rights" -msgstr "С_права" - -#: ../src/stock.c:89 -msgid "_Centers" -msgstr "По _центру" - -#: ../src/stock.c:90 -msgid "_Tops" -msgstr "По _верху" - -#: ../src/stock.c:91 -msgid "Bottoms" -msgstr "По низу" - -#: ../src/stock.c:92 -msgid "Centers" -msgstr "По центру" - -#: ../src/stock.c:93 ../src/stock.c:94 -msgid "Label Ce_nter" -msgstr "_Центр этикетки" - -#: ../src/stock.c:95 ../data/builder/property-bar.glade.h:3 -msgid "Fill color" -msgstr "Цвет заливки" - -#: ../src/stock.c:96 ../data/builder/property-bar.glade.h:8 -msgid "Line color" -msgstr "Цвет линии" - -#: ../src/stock.c:97 ../src/stock.c:99 -msgid "Linked" -msgstr "Прикреплено" - -#: ../src/stock.c:98 ../src/stock.c:100 -msgid "Not Linked" -msgstr "Не прикреплено" - -#. Menu entries. -#: ../src/ui.c:93 -msgid "_File" -msgstr "_Файл" - -#: ../src/ui.c:94 -msgid "Open Recent _Files" -msgstr "Н_едавние файлы" - -#: ../src/ui.c:95 -msgid "_Edit" -msgstr "_Правка" - -#: ../src/ui.c:96 -msgid "_View" -msgstr "_Вид" - -#: ../src/ui.c:97 -msgid "Customize Main Toolbar" -msgstr "Панель инструментов" - -#: ../src/ui.c:98 -msgid "Customize Drawing Toolbar" -msgstr "Панель рисования" - -#: ../src/ui.c:99 -msgid "Customize Properties Toolbar" -msgstr "Панель свойств" - -#: ../src/ui.c:100 -msgid "_Objects" -msgstr "_Объекты" - -#: ../src/ui.c:101 -msgid "_Create" -msgstr "_Добавить" - -#: ../src/ui.c:102 -msgid "_Order" -msgstr "_Порядок" - -#: ../src/ui.c:103 -msgid "_Rotate/Flip" -msgstr "П_овернуть/Отразить" - -#: ../src/ui.c:104 -msgid "Align _Horizontal" -msgstr "Выровнять по _горизонтали" - -#: ../src/ui.c:105 -msgid "Align _Vertical" -msgstr "Выровнять по _вертикали" - -#: ../src/ui.c:106 -msgid "_Help" -msgstr "_Справка" - -#. Popup entries. -#: ../src/ui.c:109 ../src/ui.c:110 -msgid "Context Menu" -msgstr "Контекстное меню" - -#: ../src/ui.c:115 -msgid "_New" -msgstr "_Создать" - -#: ../src/ui.c:117 -msgid "Create a new file" -msgstr "Создать новый документ" - -#: ../src/ui.c:122 -msgid "_Open..." -msgstr "_Открыть..." - -#: ../src/ui.c:124 -msgid "Open a file" -msgstr "Открыть документ" - -#: ../src/ui.c:129 -msgid "_Save" -msgstr "_Сохранить" - -#: ../src/ui.c:131 -msgid "Save current file" -msgstr "Сохранить текущий документ" - -#: ../src/ui.c:136 -msgid "Save _As..." -msgstr "Сохранить _как..." - -#: ../src/ui.c:138 -msgid "Save the current file to a different name" -msgstr "Сохранить текущий документ под другим именем" - -#: ../src/ui.c:143 -msgid "_Print..." -msgstr "_Напечатать..." - -#: ../src/ui.c:145 -msgid "Print the current file" -msgstr "Напечатать текущий файл" - -#: ../src/ui.c:150 -msgid "Properties..." -msgstr "Свойства..." - -#: ../src/ui.c:152 -msgid "Modify document properties" -msgstr "Изменить свойства документа" - -#: ../src/ui.c:157 -msgid "Template _Designer..." -msgstr "Дизайнер _шаблонов..." - -#: ../src/ui.c:159 -msgid "Create a custom template" -msgstr "Создать свой шаблон" - -#: ../src/ui.c:164 -msgid "_Close" -msgstr "_Закрыть" - -#: ../src/ui.c:166 -msgid "Close the current file" -msgstr "Закрыть текущий файл" - -#: ../src/ui.c:171 -msgid "_Quit" -msgstr "В_ыход" - -#: ../src/ui.c:173 -msgid "Quit the program" -msgstr "Завершить работу с программой" - -#: ../src/ui.c:180 -msgid "Cut" -msgstr "Вырезать" - -#: ../src/ui.c:182 -msgid "Cut the selection" -msgstr "Вырезать выделенное" - -#: ../src/ui.c:187 -msgid "Copy" -msgstr "Копировать" - -#: ../src/ui.c:189 -msgid "Copy the selection" -msgstr "Скопировать выделенное" - -#: ../src/ui.c:194 -msgid "Paste" -msgstr "Вставить" - -#: ../src/ui.c:196 -msgid "Paste the clipboard" -msgstr "Вставить из буфера" - -#: ../src/ui.c:201 -msgid "Delete" -msgstr "Удалить" - -#: ../src/ui.c:203 -msgid "Delete the selected objects" -msgstr "Удалить выбранные объекты" - -#: ../src/ui.c:208 -msgid "Select All" -msgstr "Выделить все" - -#: ../src/ui.c:210 -msgid "Select all objects" -msgstr "Выделить все объекты" - -#: ../src/ui.c:215 -msgid "Un-select All" -msgstr "Снять выделение" - -#: ../src/ui.c:217 -msgid "Remove all selections" -msgstr "Снять выделение со всех объектов" - -#: ../src/ui.c:222 -msgid "Preferences" -msgstr "Параметры" - -#: ../src/ui.c:224 -msgid "Configure the application" -msgstr "Настроить программу" - -#: ../src/ui.c:231 -msgid "Zoom in" -msgstr "Приблизить" - -#: ../src/ui.c:233 -msgid "Increase magnification" -msgstr "Уменьшить масштаб" - -#: ../src/ui.c:238 -msgid "Zoom out" -msgstr "Отдалить" - -#: ../src/ui.c:240 -msgid "Decrease magnification" -msgstr "Увеличить масштаб" - -#: ../src/ui.c:245 -msgid "Zoom 1 to 1" -msgstr "Масштаб 1:1" - -#: ../src/ui.c:247 -msgid "Restore scale to 100%" -msgstr "Восстановить масштаб 1:1" - -#: ../src/ui.c:252 -msgid "Zoom to fit" -msgstr "Уместить целиком в окне" - -#: ../src/ui.c:254 -msgid "Set scale to fit window" -msgstr "Изменить масштаб, чтобы изображение было видно полностью" - -#: ../src/ui.c:261 -msgid "Select Mode" -msgstr "Режим выбора" - -#: ../src/ui.c:263 -msgid "Select, move and modify objects" -msgstr "Выбрать, переместить или изменить объекты" - -#: ../src/ui.c:268 ../src/view-text.c:494 -#: ../data/builder/object-editor.glade.h:32 -msgid "Text" -msgstr "Текст" - -#: ../src/ui.c:270 -msgid "Create text object" -msgstr "Добавить текст" - -#: ../src/ui.c:275 -msgid "Box" -msgstr "Прямоугольник" - -#: ../src/ui.c:277 -msgid "Create box/rectangle object" -msgstr "Добавить прямоугольник" - -#: ../src/ui.c:282 ../data/builder/object-editor.glade.h:20 -msgid "Line" -msgstr "Обводка" - -#: ../src/ui.c:284 -msgid "Create line object" -msgstr "Добавить линию" - -#: ../src/ui.c:289 -msgid "Ellipse" -msgstr "Эллипс" - -#: ../src/ui.c:291 -msgid "Create ellipse/circle object" -msgstr "Добавить эллипс/круг" - -#: ../src/ui.c:296 ../data/builder/object-editor.glade.h:16 -msgid "Image" -msgstr "Изображение" - -#: ../src/ui.c:298 -msgid "Create image object" -msgstr "Добавить растровое изображение" - -#: ../src/ui.c:303 -msgid "Barcode" -msgstr "Штрих-код" - -#: ../src/ui.c:305 -msgid "Create barcode object" -msgstr "Добавить штрих-код" - -#: ../src/ui.c:310 -msgid "Bring to front" -msgstr "На передний план" - -#: ../src/ui.c:312 -msgid "Raise object to top" -msgstr "Переместить объект на передний план" - -#: ../src/ui.c:317 -msgid "Send to back" -msgstr "На задний план" - -#: ../src/ui.c:319 -msgid "Lower object to bottom" -msgstr "Переместить объект на задний план" - -#: ../src/ui.c:324 -msgid "Rotate left" -msgstr "Повернуть влево" - -#: ../src/ui.c:326 -msgid "Rotate object 90 degrees counter-clockwise" -msgstr "Повернуть объект на 90 градусов против часовой стрелки" - -#: ../src/ui.c:331 -msgid "Rotate right" -msgstr "Повернуть вправо" - -#: ../src/ui.c:333 -msgid "Rotate object 90 degrees clockwise" -msgstr "Повернуть объект на 90 градусов по часовой стрелке" - -#: ../src/ui.c:338 -msgid "Flip horizontally" -msgstr "Отразить горизонтально" - -#: ../src/ui.c:340 -msgid "Flip object horizontally" -msgstr "Отразить объект горизонтально" - -#: ../src/ui.c:345 -msgid "Flip vertically" -msgstr "Отразить вертикально" - -#: ../src/ui.c:347 -msgid "Flip object vertically" -msgstr "Отразить объект вертикально" - -#: ../src/ui.c:352 -msgid "Align left" -msgstr "Выровнять по левому краю" - -#: ../src/ui.c:354 -msgid "Align objects to left edges" -msgstr "Выровнять объекты по левому краю" - -#: ../src/ui.c:359 -msgid "Align right" -msgstr "Выровнять по правому краю" - -#: ../src/ui.c:361 -msgid "Align objects to right edges" -msgstr "Выровнять объекты по правому краю" - -#: ../src/ui.c:366 -msgid "Align horizontal center" -msgstr "Выровнять по горизонтальным центрам" - -#: ../src/ui.c:368 -msgid "Align objects to horizontal centers" -msgstr "Выровнять объекты по горизонтальным центрам" - -#: ../src/ui.c:373 -msgid "Align tops" -msgstr "Выровнять по верхнему краю" - -#: ../src/ui.c:375 -msgid "Align objects to top edges" -msgstr "Выровнять объекты по верхним краям" - -#: ../src/ui.c:380 -msgid "Align bottoms" -msgstr "Выровнять по нижнему краю" - -#: ../src/ui.c:382 -msgid "Align objects to bottom edges" -msgstr "Выровнять объекты по нижним краям" - -#: ../src/ui.c:387 -msgid "Align vertical center" -msgstr "Выровнять по вертикальным центрам" - -#: ../src/ui.c:389 -msgid "Align objects to vertical centers" -msgstr "Выровнять объекты по вертикальным центрам" - -#: ../src/ui.c:394 -msgid "Center horizontally" -msgstr "Отцентрировать по горизонтали" - -#: ../src/ui.c:396 -msgid "Center objects to horizontal label center" -msgstr "Центрировать объекты по центру горизонтальной метки" - -#: ../src/ui.c:401 -msgid "Center vertically" -msgstr "Отцентрировать по вертикали" - -#: ../src/ui.c:403 -msgid "Center objects to vertical label center" -msgstr "Центрировать объекты по центру вертикальной метки" - -#: ../src/ui.c:408 -msgid "Merge properties" -msgstr "Заполнить поля данными" - -#: ../src/ui.c:410 -msgid "Edit merge properties" -msgstr "Изменить параметры заполнения полей данными" - -#: ../src/ui.c:417 -msgid "Contents" -msgstr "Содержание" - -#: ../src/ui.c:419 -msgid "Open glabels manual" -msgstr "Показать справку по gLabels" - -#: ../src/ui.c:424 -msgid "About..." -msgstr "О программе..." - -#: ../src/ui.c:426 -msgid "About glabels" -msgstr "О gLabels" - -#: ../src/ui.c:436 -msgid "Property toolbar" -msgstr "Панель свойств" - -#: ../src/ui.c:438 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "Изменить видимость панели свойств в текущем окне" - -#: ../src/ui.c:444 -msgid "Grid" -msgstr "Сетка" - -#: ../src/ui.c:446 -msgid "Change the visibility of the grid in the current window" -msgstr "Изменить видимость сетки в текущем окне" - -#: ../src/ui.c:452 -msgid "Markup" -msgstr "Разметка" - -#: ../src/ui.c:454 -msgid "Change the visibility of markup lines in the current window" -msgstr "Изменить видимость линии разметки в текущем окне" - -#: ../src/ui.c:465 -msgid "Main toolbar" -msgstr "Показывать панель инструментов" - -#: ../src/ui.c:467 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "Изменить видимость главной панели инструментов в текущем окне" - -#: ../src/ui.c:473 -msgid "Drawing toolbar" -msgstr "Панель рисования" - -#: ../src/ui.c:475 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "Изменить видимость панели инструментов для рисования в текущем окне" - -#: ../src/ui-property-bar.c:279 ../src/prefs-dialog.c:328 -#: ../src/object-editor-bc-page.c:93 ../src/object-editor-text-page.c:93 -#: ../src/object-editor-shadow-page.c:93 -msgid "Default" -msgstr "По умолчанию" - -#: ../src/ui-property-bar.c:291 ../src/prefs-dialog.c:334 -#: ../src/object-editor-fill-page.c:79 -msgid "No Fill" -msgstr "Без заливки" - -#: ../src/ui-property-bar.c:303 ../src/prefs-dialog.c:331 -#: ../src/object-editor-line-page.c:81 -msgid "No Line" -msgstr "Без обводки" - -#: ../src/ui-sidebar.c:152 -msgid "Object properties" -msgstr "Свойства объекта" - -#: ../src/ui-commands.c:1064 -msgid "Glabels includes contributions from:" -msgstr "В разработке gLabels поучаствовали:" - -#: ../src/ui-commands.c:1070 -msgid "See the file AUTHORS for additional credits," -msgstr "" -"Подробная информация об участниках\n" -"изложена в файле AUTHORS, а также" - -#: ../src/ui-commands.c:1071 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "на сайте http://glabels.sourceforge.net/" - -#: ../src/ui-commands.c:1083 -msgid "A label and business card creation program.\n" -msgstr "Программа для создания этикетов и визитных карточек.\n" - -#: ../src/ui-commands.c:1087 -msgid "translator-credits" -msgstr "" -"Виталий Липатов , 2002-2005\n" -"Александр Прокудин , 2008" - -#: ../src/ui-commands.c:1090 -msgid "" -"Glabels is free software; you can redistribute it and/or modify it\n" -"under the terms of the GNU General Public License as published by\n" -"the Free Software Foundation; either version 2 of the License, or\n" -"(at your option) any later version.\n" -"\n" -"This program is distributed in the hope that it will be useful, but\n" -"WITHOUT ANY WARRANTY; without even the implied warranty of\n" -"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" -"the GNU General Public License for more details.\n" -msgstr "" -"Glabels является свободным программным обеспечением;\n" -"вы вправе распространять её и/или модифицировать в соответствии\n" -"с условиями версии 2 либо по вашему выбору более поздней\n" -"версии Стандартной Общественной Лицензии GNU, \n" -"опубликованной Free Software Foundation.\n" -" \n" -"Мы распространяем данную программу в надежде на то, что она\n" -"будет вам полезной, однако НЕ ПРЕДОСТАВЛЯЕМ НА НЕЁ НИКАКИХ\n" -"ГАРАНТИЙ, в том числе ГАРАНТИИ ТОВАРНОГО СОСТОЯНИЯ ПРИ\n" -"ПРОДАЖЕ И ПРИГОДНОСТИ ДЛЯ ИСПОЛЬЗОВАНИЯ В КОНКРЕТНЫХ\n" -"ЦЕЛЯХ. Для получения более подробной информации ознакомьтесь\n" -"со Стандартной Общественной Лицензией GNU.\n" - -#: ../src/ui-commands.c:1116 -msgid "glabels" -msgstr "glabels" - -#: ../src/file.c:91 -msgid "New Label or Card" -msgstr "Новая этикетка или визитка" - -#: ../src/file.c:191 -msgid "Label properties" -msgstr "Свойства этикетки" - -#: ../src/file.c:292 ../src/file.c:578 -msgid "All files" -msgstr "Все файлы" - -#: ../src/file.c:297 ../src/file.c:583 -msgid "gLabels documents" -msgstr "Документы gLabels" - -#: ../src/file.c:343 ../src/file.c:640 -msgid "Empty file name selection" -msgstr "Пустой выбор файла" - -#: ../src/file.c:346 ../src/file.c:362 -msgid "Please select a file or supply a valid file name" -msgstr "Выберите файл или введите корректное название файла" - -#: ../src/file.c:359 -msgid "File does not exist" -msgstr "Файл не существует" - -#: ../src/file.c:433 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "Невозможно открыть файл \"%s\"" - -#: ../src/file.c:436 -msgid "Not a supported file format" -msgstr "Файл неподдерживаемого формата" - -#: ../src/file.c:513 ../src/file.c:690 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "Невозможно сохранить файл \"%s\"" - -#: ../src/file.c:517 ../src/file.c:694 -msgid "Error encountered during save. The file is still not saved." -msgstr "Произошла ошибка при сохранении файла. Файл всё ещё не сохранён." - -#: ../src/file.c:556 -#, c-format -msgid "Save \"%s\" as" -msgstr "Сохранить \"%s\" как" - -#: ../src/file.c:643 -msgid "Please supply a valid file name" -msgstr "Укажите корректное название файла" - -#: ../src/file.c:664 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "Перезаписать файл \"%s\"?" - -#: ../src/file.c:668 -msgid "File already exists." -msgstr "Файл уже существует." - -#: ../src/file.c:764 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "Сохранить изменения в документе \"%s\" перед закрытием?" - -#: ../src/file.c:768 -msgid "Your changes will be lost if you don't save them." -msgstr "Все изменения будут потеряны, если вы их не сохраните." - -#: ../src/file.c:771 -msgid "Close without saving" -msgstr "Закрыть без сохранения" - -#. Should not happen -#: ../src/prefs.c:159 ../src/prefs.c:166 -#: ../data/builder/object-editor.glade.h:43 -#: ../data/builder/prefs-dialog.glade.h:22 -msgid "points" -msgstr "пунктов" - -#: ../src/prefs.c:161 ../data/builder/object-editor.glade.h:42 -#: ../data/builder/template-designer.glade.h:64 -msgid "inches" -msgstr "дюймов" - -#: ../src/prefs.c:163 -msgid "mm" -msgstr "мм" - -#: ../src/prefs-dialog.c:167 ../data/builder/prefs-dialog.glade.h:21 -msgid "gLabels Preferences" -msgstr "Параметры gLabels" - -#. Build editor. -#: ../src/view-box.c:175 -msgid "Box object properties" -msgstr "Свойства прямоугольника" - -#. Build editor. -#: ../src/view-ellipse.c:175 -msgid "Ellipse object properties" -msgstr "Свойства эллипса" - -#. Build editor. -#: ../src/view-line.c:174 -msgid "Line object properties" -msgstr "Свойство линии" - -#. Build editor. -#: ../src/view-image.c:174 -msgid "Image object properties" -msgstr "Свойства изображения" - -#. Build editor. -#: ../src/view-text.c:178 -msgid "Text object properties" -msgstr "Свойства текста" - -#. Build editor. -#: ../src/view-barcode.c:174 -msgid "Barcode object properties" -msgstr "Свойства объекта типа штрих-код" - -#: ../src/object-editor-image-page.c:267 -msgid "All Files" -msgstr "Все файлы" - -#: ../src/object-editor-image-page.c:272 -msgid "All Images" -msgstr "Все изображения" - -#: ../src/object-editor-image-page.c:287 -#, c-format -msgid "%s (*.%s)" -msgstr "%s (*.%s)" - -#: ../src/merge-properties-dialog.c:271 -msgid "Merge Properties" -msgstr "Параметры заполнения данными" - -#: ../src/merge-properties-dialog.c:297 ../src/merge-properties-dialog.c:405 -msgid "Select merge-database source" -msgstr "Выбрать источник данных для заполнения данными" - -#: ../src/merge-properties-dialog.c:306 ../src/merge-properties-dialog.c:425 -msgid "N/A" -msgstr "Н/Д" - -#: ../src/merge-properties-dialog.c:332 -msgid "Select" -msgstr "Выбрано" - -#: ../src/merge-properties-dialog.c:340 -msgid "Record/Field" -msgstr "Запись/Поле" - -#: ../src/merge-properties-dialog.c:348 -#: ../data/builder/object-editor.glade.h:10 -msgid "Data" -msgstr "Данные" - -#: ../src/merge-properties-dialog.c:418 -msgid "Fixed" -msgstr "" - -#. =================================================================== -#: ../src/print-op.c:242 ../src/wdgt-print-copies.c:171 -#: ../data/templates/misc-iso-templates.xml.h:34 -msgid "Labels" -msgstr "Этикетки" - -#: ../src/template-designer.c:411 -msgid "gLabels Template Designer" -msgstr "Дизайнер шаблонов gLabels" - -#: ../src/template-designer.c:481 -msgid "Welcome" -msgstr "Добро пожаловать" - -#: ../src/template-designer.c:534 -msgid "Name and Description" -msgstr "Название и описание" - -#: ../src/template-designer.c:595 -msgid "Page Size" -msgstr "Формат страницы" - -#: ../src/template-designer.c:675 -msgid "Label or Card Shape" -msgstr "Форма этикетки или визитки" - -#: ../src/template-designer.c:735 -#, fuzzy -msgid "Label or Card Size" -msgstr "Форма этикетки или визитки" - -#: ../src/template-designer.c:844 -#, fuzzy -msgid "Label Size (round)" -msgstr "Размер метки (диаметр)" - -#: ../src/template-designer.c:935 -msgid "Label Size (CD/DVD)" -msgstr "Размер метки (CD/DVD)" - -#: ../src/template-designer.c:1036 -msgid "Number of Layouts" -msgstr "Количество форм" - -#: ../src/template-designer.c:1110 -msgid "Layout(s)" -msgstr "Формы" - -#: ../src/template-designer.c:1229 -msgid "Design Completed" -msgstr "Оформление завершено" - -#: ../src/template-designer.c:1396 -msgid "" -"Brand and part# match an existing " -"template!" -msgstr "" - -#: ../src/bc.c:68 -msgid "POSTNET (any)" -msgstr "POSTNET (любой)" - -#: ../src/bc.c:71 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (только почтовый индекс)" - -#: ../src/bc.c:74 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (ZIP+4)" - -#: ../src/bc.c:77 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: ../src/bc.c:80 -msgid "CEPNET" -msgstr "CEPNET" - -#: ../src/bc.c:83 -msgid "EAN (any)" -msgstr "EAN (любой)" - -#: ../src/bc.c:86 -msgid "EAN-8" -msgstr "EAN-8" - -#: ../src/bc.c:89 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: ../src/bc.c:92 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: ../src/bc.c:95 -msgid "EAN-13" -msgstr "EAN-13" - -#: ../src/bc.c:98 -msgid "EAN-13 +2" -msgstr "EAN-13 +2" - -#: ../src/bc.c:101 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: ../src/bc.c:104 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A or UPC-E)" - -#: ../src/bc.c:107 -msgid "UPC-A" -msgstr "UPC-A" - -#: ../src/bc.c:110 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: ../src/bc.c:113 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: ../src/bc.c:116 -msgid "UPC-E" -msgstr "UPC-E" - -#: ../src/bc.c:119 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: ../src/bc.c:122 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: ../src/bc.c:125 -msgid "ISBN" -msgstr "ISBN" - -#: ../src/bc.c:128 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: ../src/bc.c:131 -msgid "Code 39" -msgstr "Code 39" - -#: ../src/bc.c:134 -msgid "Code 128" -msgstr "Code 128" - -#: ../src/bc.c:137 -msgid "Code 128C" -msgstr "Code 128C" - -#: ../src/bc.c:140 -msgid "Code 128B" -msgstr "Code 128B" - -#: ../src/bc.c:143 -msgid "Interleaved 2 of 5" -msgstr "Interleaved 2 of 5" - -#: ../src/bc.c:146 -msgid "Codabar" -msgstr "Codabar" - -#: ../src/bc.c:149 -msgid "MSI" -msgstr "MSI" - -#: ../src/bc.c:152 -msgid "Plessey" -msgstr "Plessey" - -#: ../src/bc.c:155 -msgid "IEC16022 (DataMatrix)" -msgstr "IEC16022 (DataMatrix)" - -#: ../src/bc.c:158 -msgid "IEC18004 (QRCode)" -msgstr "IEC18004 (QRCode)" - -#: ../src/label.c:531 -msgid "Untitled" -msgstr "Без названия" - -#: ../src/label-barcode.c:426 -msgid "Barcode data empty" -msgstr "Данные штрих-кода не введены" - -#: ../src/label-barcode.c:430 -msgid "Invalid barcode data" -msgstr "Неверные данные штрих-кода" - -#: ../src/xml-label.c:189 ../src/xml-label.c:226 -msgid "xmlParseFile error" -msgstr "Ошибка при разборе файла XML" - -#: ../src/xml-label.c:262 -msgid "No document root" -msgstr "Нет корня документа" - -#: ../src/xml-label.c:270 -msgid "Importing from glabels 0.1 format" -msgstr "Выполняется импорт из файла gLabels версии 0.1" - -#: ../src/xml-label.c:279 -msgid "Importing from glabels 0.4 format" -msgstr "Выполняется импорт из файла gLabels версии 0.4" - -#: ../src/xml-label.c:288 -#, fuzzy, c-format -msgid "Unknown glabels Namespace -- Using %s" -msgstr "документ неверного типа, неизвестное пространство имён glabels" - -#: ../src/xml-label.c:319 ../src/xml-label-04.c:79 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "Неверный корневой узел = \"%s\"" - -#: ../src/xml-label.c:356 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "Неверный узел в узле документа= \"%s\"" - -#: ../src/xml-label.c:401 ../src/xml-label-04.c:127 -#, c-format -msgid "bad node = \"%s\"" -msgstr "неверный узел = \"%s\"" - -#: ../src/xml-label.c:840 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "неверный узел в узле данных= \"%s\"" - -#: ../src/xml-label.c:1077 ../libglabels/xml-template.c:670 -msgid "Utf8 conversion error." -msgstr "Ошибка преобразования UTF8." - -#: ../src/xml-label.c:1084 -msgid "Problem saving xml file." -msgstr "Неполадки при сохранении файла XML." - -#: ../src/merge.c:170 ../src/merge.c:211 ../src/merge.c:375 ../src/merge.c:378 -msgid "None" -msgstr "Нет" - -#: ../src/merge-init.c:59 -msgid "Text file with comma delimeters (CSV)" -msgstr "Текст с разделителем «запятая» (CSV)" - -#: ../src/merge-init.c:66 -msgid "Text file with colon delimeters" -msgstr "Текст с разделителем «двоеточие»" - -#: ../src/merge-init.c:73 -msgid "Text file with tab delimeters" -msgstr "Текст с разделителем «символ табуляции»" - -#: ../src/merge-init.c:82 -msgid "Data from default Evolution Addressbook" -msgstr "Данные из используемой по умолчанию адресной книги Evolution" - -#: ../src/merge-init.c:88 -msgid "Data from a file containing VCards" -msgstr "Данные из файла, содержащего VCard" - -#: ../src/merge-evolution.c:309 -msgid "Couldn't construct query" -msgstr "Не удалось сформировать запрос." - -#: ../src/merge-evolution.c:315 ../src/merge-evolution.c:326 -msgid "Couldn't open addressbook." -msgstr "Не удалось открыть адресную книгу." - -#: ../src/merge-evolution.c:341 -msgid "Couldn't list available fields." -msgstr "Не удалось перечислить доступные поля." - -#: ../src/merge-evolution.c:377 -msgid "Couldn't get contacts." -msgstr "Не удалось получить контактные данные." - -#: ../src/color-combo.c:210 -msgid "Default Color" -msgstr "Цвет по умолчанию" - -#: ../src/color-combo-menu.c:86 -msgid "Dark Red" -msgstr "Тёмно-красный" - -#: ../src/color-combo-menu.c:87 -msgid "Brown" -msgstr "Коричневый" - -#: ../src/color-combo-menu.c:88 -msgid "Dark Goldenrod" -msgstr "Темный золотарник" - -#: ../src/color-combo-menu.c:89 -msgid "Dark Green" -msgstr "Тёмно-зелёный" - -#: ../src/color-combo-menu.c:90 -msgid "Dark Cyan" -msgstr "Темно-циановый" - -#: ../src/color-combo-menu.c:91 -msgid "Navy Blue" -msgstr "Тёмно-синий" - -#: ../src/color-combo-menu.c:92 -msgid "Dark Violet" -msgstr "Тёмно-фиолетовый" - -#: ../src/color-combo-menu.c:94 -msgid "Red" -msgstr "Красный" - -#: ../src/color-combo-menu.c:95 -msgid "Orange" -msgstr "Оранжевый" - -#: ../src/color-combo-menu.c:96 -msgid "Dark Yellow" -msgstr "Темно-желтый" - -#: ../src/color-combo-menu.c:97 -msgid "Medium green" -msgstr "Тускло-зелёный" - -#: ../src/color-combo-menu.c:98 -msgid "Turquoise" -msgstr "Бирюзовый" - -#: ../src/color-combo-menu.c:99 -msgid "Blue" -msgstr "Синий" - -#: ../src/color-combo-menu.c:100 -msgid "Purple" -msgstr "Пурпурный" - -#: ../src/color-combo-menu.c:102 -msgid "Salmon" -msgstr "Сомон" - -#: ../src/color-combo-menu.c:103 -msgid "Gold" -msgstr "Золотой" - -#: ../src/color-combo-menu.c:104 -msgid "Yellow" -msgstr "Жёлтый" - -#: ../src/color-combo-menu.c:105 -msgid "Green" -msgstr "Зелёный" - -#: ../src/color-combo-menu.c:106 -msgid "Cyan" -msgstr "Циановый" - -#: ../src/color-combo-menu.c:107 -msgid "SkyBlue" -msgstr "Небесно-синий" - -#: ../src/color-combo-menu.c:108 -msgid "Violet" -msgstr "Фиолетовый" - -#: ../src/color-combo-menu.c:110 -msgid "Pink" -msgstr "Розовый" - -#: ../src/color-combo-menu.c:111 -msgid "Khaki" -msgstr "Хаки" - -#: ../src/color-combo-menu.c:112 -msgid "Light Yellow" -msgstr "Светло-жёлтый" - -#: ../src/color-combo-menu.c:113 -msgid "Light Green" -msgstr "Светло-зелёный" - -#: ../src/color-combo-menu.c:114 -msgid "Light Cyan" -msgstr "Светло-циановый" - -#: ../src/color-combo-menu.c:115 -msgid "Slate Gray" -msgstr "Аспидно-серый" - -#: ../src/color-combo-menu.c:116 -msgid "Thistle" -msgstr "Чертополох" - -#: ../src/color-combo-menu.c:118 -msgid "White" -msgstr "Белый" - -#: ../src/color-combo-menu.c:119 -#, c-format -msgid "10% Gray" -msgstr "10% серый" - -#: ../src/color-combo-menu.c:120 -#, c-format -msgid "25% Gray" -msgstr "25% серый" - -#: ../src/color-combo-menu.c:121 -#, c-format -msgid "40% Gray" -msgstr "40% серый" - -#: ../src/color-combo-menu.c:122 -#, c-format -msgid "50% Gray" -msgstr "50% серый" - -#: ../src/color-combo-menu.c:123 -#, c-format -msgid "60% Gray" -msgstr "60% серый" - -#: ../src/color-combo-menu.c:124 -msgid "Black" -msgstr "Чёрный" - -#: ../src/color-combo-menu.c:252 ../src/color-combo-menu.c:369 -msgid "Custom Color" -msgstr "Заказной цвет:" - -#: ../src/color-combo-menu.c:317 -#, c-format -msgid "Custom Color #%u" -msgstr "Заказной цвет #%u" - -#: ../src/wdgt-print-copies.c:153 -msgid "Sheets:" -msgstr "Листов:" - -#: ../src/wdgt-print-copies.c:173 -msgid "from:" -msgstr "с:" - -#: ../src/wdgt-print-copies.c:179 -msgid "to:" -msgstr "по:" - -#: ../src/wdgt-print-merge.c:154 -msgid "Start on label" -msgstr "Начать с этикетки" - -#: ../src/wdgt-print-merge.c:161 -msgid "on 1st sheet" -msgstr "на первом листе" - -#: ../src/wdgt-print-merge.c:170 -msgid "Copies:" -msgstr "Копий:" - -#: ../src/wdgt-print-merge.c:176 -msgid "Collate" -msgstr "Собирать" - -#: ../src/wdgt-media-select.c:290 ../src/wdgt-media-select.c:294 -#: ../src/wdgt-media-select.c:299 ../src/wdgt-media-select.c:308 -#: ../src/wdgt-media-select.c:311 ../src/wdgt-media-select.c:404 -#: ../src/wdgt-media-select.c:611 ../src/wdgt-media-select.c:620 -msgid "Any" -msgstr "Любой вариант" - -#: ../src/wdgt-media-select.c:645 -#, c-format -msgid "%d per sheet" -msgstr "%d на лист" - -#: ../src/wdgt-media-select.c:675 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: ../src/wdgt-media-select.c:680 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: ../src/wdgt-media-select.c:691 ../src/wdgt-media-select.c:705 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s диаметр" - -#: ../src/wdgt-media-select.c:695 ../src/wdgt-media-select.c:709 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s диаметр" - -#: ../src/wdgt-media-select.c:783 -msgid "No recent templates found." -msgstr "Недавно открывавшихся шаблонов не обнаружено." - -#: ../src/wdgt-media-select.c:784 -msgid "Try selecting a template from the \"Search all templates\" page." -msgstr "Попробуйте выбрать шаблон на вкладке «Поиск по шаблонам»." - -#: ../src/wdgt-media-select.c:863 -msgid "No match." -msgstr "Нет совпадений." - -#: ../src/wdgt-media-select.c:864 -msgid "Try selecting a different brand, page size or category." -msgstr "Попробуйте выбрать другую марку, формат страницы или категорию" - -#: ../src/wdgt-rotate-label.c:129 -msgid "Normal" -msgstr "Обычное" - -#: ../src/wdgt-rotate-label.c:130 -msgid "Rotated" -msgstr "С поворотом" - -#: ../src/critical-error-handler.c:73 -msgid "gLabels Fatal Error!" -msgstr "Фатальная ошибка gLabels!" - -#: ../src/warning-handler.c:73 -msgid "gLabels Error!" -msgstr "Ошибка gLabels!" - -#. Create and append an "Other" entry. -#: ../libglabels/db.c:118 -msgid "Other" -msgstr "Другой" - -#. Create and append a "User defined" entry. -#: ../libglabels/db.c:131 -msgid "User defined" -msgstr "Определено пользователем" - -#: ../libglabels/db.c:482 -msgid "" -"Unable to locate paper size definitions. Libglabels may not be installed " -"correctly!" -msgstr "" - -#: ../libglabels/db.c:875 -msgid "" -"Unable to locate category definitions. Libglabels may not be installed " -"correctly!" -msgstr "" - -#: ../libglabels/db.c:1461 -msgid "" -"Unable to locate any template files. Libglabels may not be installed " -"correctly!" -msgstr "" - -#: ../libglabels/db.c:1538 -#, fuzzy, c-format -msgid "Generic %s full page template" -msgstr "Основная %s полная страница" - -#: ../libglabels/xml-template.c:227 -msgid "Missing name or brand/part attributes." -msgstr "" - -#. This should always be an id, but just in case a name -#. slips by! -#: ../libglabels/xml-template.c:244 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "" -"Неизвестный идентификатор размера страницы \"%s\", пробуем как название" - -#: ../libglabels/xml-template.c:256 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "Неизвестный идентификатор размера страницы или название \"%s\"" - -#: ../libglabels/xml-template.c:615 -msgid "" -"Missing required \"brand\" or \"part\" attribute, trying deprecated name." -msgstr "" - -#: ../libglabels/xml-template.c:625 -msgid "Name attribute also missing." -msgstr "Атрибут имени также отсутствует." - -#: ../data/builder/merge-properties-dialog.glade.h:1 -msgid "Record selection/preview" -msgstr "Просмотр и выбор записей" - -#: ../data/builder/merge-properties-dialog.glade.h:2 -msgid "Source" -msgstr "Источник" - -#: ../data/builder/merge-properties-dialog.glade.h:3 -msgid "Format:" -msgstr "Формат:" - -#: ../data/builder/merge-properties-dialog.glade.h:4 -msgid "Location:" -msgstr "Расположение:" - -#: ../data/builder/merge-properties-dialog.glade.h:5 -msgid "Select all" -msgstr "Выделить всё" - -#: ../data/builder/merge-properties-dialog.glade.h:6 -msgid "Unselect all" -msgstr "Снять выделение" - -#: ../data/builder/merge-properties-dialog.glade.h:7 -#: ../data/builder/object-editor.glade.h:39 -msgid "dialog1" -msgstr "dialog1" - -#: ../data/builder/new-label-dialog.glade.h:1 -msgid "Label orientation" -msgstr "Расположение этикетки" - -#: ../data/builder/new-label-dialog.glade.h:2 -msgid "Media type" -msgstr "Тип носителя" - -#: ../data/builder/object-editor.glade.h:2 -#, no-c-format -msgid "%" -msgstr "%" - -#: ../data/builder/object-editor.glade.h:3 -msgid "00000000000 00000" -msgstr "00000000000 00000" - -#: ../data/builder/object-editor.glade.h:4 -msgid "Xxx object properties" -msgstr "Xxx свойства объекта" - -#: ../data/builder/object-editor.glade.h:5 -#: ../data/builder/prefs-dialog.glade.h:7 -msgid "Alignment:" -msgstr "Выключка:" - -#: ../data/builder/object-editor.glade.h:6 -msgid "Allow merge to automatically shrink text" -msgstr "При заполнении данными текст обрезаем" - -#: ../data/builder/object-editor.glade.h:7 -msgid "Angle:" -msgstr "Угол:" - -#: ../data/builder/object-editor.glade.h:8 -msgid "Checksum" -msgstr "Контрольная сумма" - -#: ../data/builder/object-editor.glade.h:9 -#: ../data/builder/prefs-dialog.glade.h:8 -msgid "Color:" -msgstr "Цвет:" - -#: ../data/builder/object-editor.glade.h:11 -msgid "Enable shadow" -msgstr "Отбрасывать тень" - -#: ../data/builder/object-editor.glade.h:12 -msgid "Family:" -msgstr "Семейство:" - -#: ../data/builder/object-editor.glade.h:13 -msgid "File:" -msgstr "Файл:" - -#: ../data/builder/object-editor.glade.h:14 -msgid "Fill" -msgstr "Заливка" - -#: ../data/builder/object-editor.glade.h:15 -#: ../data/builder/template-designer.glade.h:30 -msgid "Height:" -msgstr "Высота:" - -#: ../data/builder/object-editor.glade.h:17 -msgid "Insert merge field" -msgstr "Вставить объединительное поле" - -#: ../data/builder/object-editor.glade.h:18 -msgid "Key:" -msgstr "Ключ:" - -#: ../data/builder/object-editor.glade.h:19 -msgid "Length:" -msgstr "Длина:" - -#: ../data/builder/object-editor.glade.h:21 -#: ../data/builder/prefs-dialog.glade.h:12 -msgid "Line Spacing:" -msgstr "Между строк:" - -#: ../data/builder/object-editor.glade.h:22 -msgid "Literal:" -msgstr "Код:" - -#: ../data/builder/object-editor.glade.h:23 -msgid "Opacity:" -msgstr "Непрозрачность:" - -#: ../data/builder/object-editor.glade.h:24 -msgid "Position" -msgstr "Расположение" - -#: ../data/builder/object-editor.glade.h:25 -msgid "Reset image size" -msgstr "Установить размер изображения по умолчанию" - -#: ../data/builder/object-editor.glade.h:26 -msgid "Select A File" -msgstr "Выберите файл" - -#: ../data/builder/object-editor.glade.h:27 -msgid "Shadow" -msgstr "Тень" - -#: ../data/builder/object-editor.glade.h:28 -msgid "Size" -msgstr "Размер" - -#: ../data/builder/object-editor.glade.h:29 -msgid "Size:" -msgstr "Размер:" - -#: ../data/builder/object-editor.glade.h:30 -msgid "Style" -msgstr "Стиль" - -#: ../data/builder/object-editor.glade.h:31 -msgid "Style:" -msgstr "Стиль:" - -#: ../data/builder/object-editor.glade.h:33 -#: ../data/builder/prefs-dialog.glade.h:20 -#: ../data/builder/template-designer.glade.h:61 -msgid "Width:" -msgstr "Ширина:" - -#: ../data/builder/object-editor.glade.h:34 -msgid "X Offset:" -msgstr "Смещение по X:" - -#: ../data/builder/object-editor.glade.h:35 -msgid "X:" -msgstr "X:" - -#: ../data/builder/object-editor.glade.h:36 -msgid "Y Offset:" -msgstr "Смещение по Y:" - -#: ../data/builder/object-editor.glade.h:37 -msgid "Y:" -msgstr "Y:" - -#: ../data/builder/object-editor.glade.h:38 -msgid "degrees" -msgstr "градусов" - -#: ../data/builder/object-editor.glade.h:40 -msgid "digits:" -msgstr "Цифр:" - -#: ../data/builder/object-editor.glade.h:41 -msgid "format:" -msgstr "Формат:" - -#: ../data/builder/prefs-dialog.glade.h:1 -msgid " " -msgstr " " - -#: ../data/builder/prefs-dialog.glade.h:2 -msgid "Default page size" -msgstr "Размер страницы по умолчанию" - -#: ../data/builder/prefs-dialog.glade.h:3 -msgid "Fill" -msgstr "Заливка" - -#: ../data/builder/prefs-dialog.glade.h:4 -msgid "Line" -msgstr "Обводка" - -#: ../data/builder/prefs-dialog.glade.h:5 -msgid "Text" -msgstr "Текст" - -#: ../data/builder/prefs-dialog.glade.h:6 -msgid "Units" -msgstr "Единицы измерения" - -#: ../data/builder/prefs-dialog.glade.h:9 -msgid "Font:" -msgstr "Шрифт:" - -#: ../data/builder/prefs-dialog.glade.h:10 -msgid "ISO A4" -msgstr "ISO A4" - -#: ../data/builder/prefs-dialog.glade.h:11 -msgid "Inches" -msgstr "Дюймы" - -#: ../data/builder/prefs-dialog.glade.h:13 -msgid "Locale" -msgstr "Местные параметры" - -#: ../data/builder/prefs-dialog.glade.h:14 -msgid "Millimeters" -msgstr "Миллиметры" - -#: ../data/builder/prefs-dialog.glade.h:15 -msgid "Object defaults" -msgstr "Свойства объектов по умолчанию" - -#: ../data/builder/prefs-dialog.glade.h:16 -msgid "Points" -msgstr "Пункты" - -#: ../data/builder/prefs-dialog.glade.h:17 -msgid "Select default properties for new objects." -msgstr "Укажите используемые по умолчанию свойства новых объектов " - -#: ../data/builder/prefs-dialog.glade.h:18 -msgid "Select locale specific behavior." -msgstr "Укажите местные параметры" - -#. Most popular (at top of list) -#: ../data/builder/prefs-dialog.glade.h:19 -#: ../data/templates/paper-sizes.xml.h:29 -msgid "US Letter" -msgstr "US Letter" - -#: ../data/builder/print-custom-widget.glade.h:1 -msgid "Options" -msgstr "Параметры" - -#: ../data/builder/print-custom-widget.glade.h:2 -msgid "Print control (Merge)" -msgstr "Управление печатью (объединение)" - -#: ../data/builder/print-custom-widget.glade.h:3 -msgid "Print control (Simple)" -msgstr "Управление печатью (простая)" - -#: ../data/builder/property-bar.glade.h:1 -msgid "Bold" -msgstr "Жирный" - -#: ../data/builder/property-bar.glade.h:2 -msgid "Center align" -msgstr "Выровнять по центру" - -#: ../data/builder/property-bar.glade.h:4 -msgid "Font family" -msgstr "Гарнитура" - -#: ../data/builder/property-bar.glade.h:5 -msgid "Font size" -msgstr "Размер шрифта" - -#: ../data/builder/property-bar.glade.h:6 -msgid "Italic" -msgstr "Курсив" - -#: ../data/builder/property-bar.glade.h:7 -msgid "Left align" -msgstr "Выровнять слева" - -#: ../data/builder/property-bar.glade.h:9 -msgid "Line width" -msgstr "Толщина линии" - -#: ../data/builder/property-bar.glade.h:10 -msgid "Right align" -msgstr "Выровнять справа" - -#: ../data/builder/property-bar.glade.h:11 -msgid "Text Color" -msgstr "Цвет текста" - -#: ../data/builder/template-designer.glade.h:1 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(например, «Почтовые этикетки,» «Визитные карточки,» ...)" - -#: ../data/builder/template-designer.glade.h:2 -msgid "(e.g., 8163A)" -msgstr "(например, 8163A)" - -#: ../data/builder/template-designer.glade.h:3 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(например, Avery, Acme, ...)" - -#: ../data/builder/template-designer.glade.h:4 -msgid "1. Outer radius:" -msgstr "1. Наружный радиус:" - -#: ../data/builder/template-designer.glade.h:5 -msgid "1. Radius:" -msgstr "1. Радиус:" - -#: ../data/builder/template-designer.glade.h:6 -msgid "1. Width:" -msgstr "1. Ширина:" - -#: ../data/builder/template-designer.glade.h:7 -msgid "2. Height:" -msgstr "2. Высота:" - -#: ../data/builder/template-designer.glade.h:8 -msgid "2. Inner radius:" -msgstr "2. Внутренний радиус:" - -#: ../data/builder/template-designer.glade.h:9 -msgid "2. Waste (overprint allowed):" -msgstr "2. Пустое поле (на нём можно будет печать):" - -#: ../data/builder/template-designer.glade.h:10 -msgid "3. Clipping width:" -msgstr "3. Ширина для обрезки:" - -#: ../data/builder/template-designer.glade.h:11 -msgid "3. Margin" -msgstr "3. Поле" - -#: ../data/builder/template-designer.glade.h:12 -msgid "3. Round (radius of corner):" -msgstr "3. Закругление (радиус вершины):" - -#: ../data/builder/template-designer.glade.h:13 -msgid "4. Clipping height:" -msgstr "4. Высота обрезки:" - -#: ../data/builder/template-designer.glade.h:14 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "4. Пустое гориз. пространство (может быть заполнено):" - -#: ../data/builder/template-designer.glade.h:15 -msgid "5. Vert. waste (overprint allowed):" -msgstr "5. Пустое верт. пространство (может быть заполнено):" - -#: ../data/builder/template-designer.glade.h:16 -msgid "5. Waste (overprint allowed):" -msgstr "5. Пустое пространство (может быть заполнено):" - -#: ../data/builder/template-designer.glade.h:17 -msgid "6. Margin" -msgstr "6. Поле" - -#: ../data/builder/template-designer.glade.h:18 -msgid "Brand/Manufacturer:" -msgstr "Производитель или торговая марка:" - -#: ../data/builder/template-designer.glade.h:19 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD (включая CD размером с визитку)" - -#: ../data/builder/template-designer.glade.h:20 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"Поздравляем!\n" -"\n" -"Вы завершили создание шаблона в gLabels.\n" -"Для сохранения результата нажмите кнопку «Применить».\n" -"\n" -"Вы также можете нажать кнопку «Отменить», чтобы не сохранять,\n" -"либо кнопку «Назад», чтобы продолжить редактирование." - -#: ../data/builder/template-designer.glade.h:27 -msgid "Description:" -msgstr "Описание:" - -#: ../data/builder/template-designer.glade.h:28 -msgid "Distance from left edge (x0):" -msgstr "Расстояние от левого угла (x0):" - -#: ../data/builder/template-designer.glade.h:29 -msgid "Distance from top edge (y0):" -msgstr "Расстояние от верхнего угла (y0)" - -#: ../data/builder/template-designer.glade.h:31 -msgid "Horizontal pitch (dx):" -msgstr "Интервал по горизонтали (dx):" - -#: ../data/builder/template-designer.glade.h:32 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" -"Сколько макетов будет содержать шаблон? \n" -"\n" -"Макет — это набор этикеток или визиток, которые могут быть распределены по " -"простой сетке.\n" -"Большинству шаблонов требуется только один макет, как в первом примере.\n" -"Второй пример иллюстрирует случай, когда необходимо применять два макета." - -#: ../data/builder/template-designer.glade.h:37 -msgid "Layout #1" -msgstr "Макет №1" - -#: ../data/builder/template-designer.glade.h:38 -msgid "Layout #2" -msgstr "Макет №2" - -#: ../data/builder/template-designer.glade.h:39 -msgid "Number across (nx):" -msgstr "По горизонтали (nx):" - -#: ../data/builder/template-designer.glade.h:40 -msgid "Number down (ny):" -msgstr "По вертикали (ny):" - -#: ../data/builder/template-designer.glade.h:41 -msgid "Number of layouts:" -msgstr "Количество макетов:" - -#: ../data/builder/template-designer.glade.h:42 -#: ../data/builder/wdgt-media-select.glade.h:3 -msgid "Page size:" -msgstr "Формат страницы:" - -#: ../data/builder/template-designer.glade.h:43 -msgid "Part #:" -msgstr "Часть №:" - -#: ../data/builder/template-designer.glade.h:44 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "Укажите следующую идентификационную информацию для бланка." - -#: ../data/builder/template-designer.glade.h:45 -msgid "Please enter the following layout information." -msgstr "Введите следующую информацию об оформлении." - -#: ../data/builder/template-designer.glade.h:46 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "Введите геометрические размеры одиночной этикетки в вашем шаблоне." - -#: ../data/builder/template-designer.glade.h:47 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" -"Введите геометрические размеры одиночной этикетки или визитки в вашем " -"шаблоне." - -#: ../data/builder/template-designer.glade.h:48 -msgid "Please select the basic shape of the labels or cards." -msgstr "Выберите основную фигуру этикетки или карточки." - -#: ../data/builder/template-designer.glade.h:49 -msgid "Please select the page size of the template stationery." -msgstr "Выберите размер страницы для шаблона." - -#: ../data/builder/template-designer.glade.h:50 -msgid "Print test sheet" -msgstr "Напечатать тестовую страницу" - -#: ../data/builder/template-designer.glade.h:51 -msgid "Rectangular or square (can have rounded corners)" -msgstr "Прямоугольник или квадрат (может иметь скруглённые края)" - -#: ../data/builder/template-designer.glade.h:52 -msgid "Round" -msgstr "Круг" - -#: ../data/builder/template-designer.glade.h:53 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"Для данного шаблона\n" -"требуется две формы." - -#: ../data/builder/template-designer.glade.h:55 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"Для данного шаблона требуется\n" -"только одна форма." - -#: ../data/builder/template-designer.glade.h:57 -msgid "Vertical pitch (dy):" -msgstr "Интервал по вертикали (dy):" - -#: ../data/builder/template-designer.glade.h:58 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"Добро пожаловать в Дизайнер шаблонов gLabels.\n" -"\n" -"Этот диалог будет сопровождать вас в создании вашего собственного шаблона " -"gLabels." - -#: ../data/builder/template-designer.glade.h:62 -msgid "cd_size_page" -msgstr "" - -#: ../data/builder/template-designer.glade.h:63 -msgid "finish_page" -msgstr "" - -#: ../data/builder/template-designer.glade.h:65 -msgid "layout_page" -msgstr "" - -#: ../data/builder/template-designer.glade.h:66 -msgid "name_page" -msgstr "" - -#: ../data/builder/template-designer.glade.h:67 -msgid "nlayouts_page" -msgstr "" - -#: ../data/builder/template-designer.glade.h:68 -msgid "pg_size_page" -msgstr "" - -#: ../data/builder/template-designer.glade.h:69 -msgid "rect_size_page" -msgstr "" - -#: ../data/builder/template-designer.glade.h:70 -msgid "round_size_page" -msgstr "" - -#: ../data/builder/template-designer.glade.h:71 -msgid "shape_page" -msgstr "" - -#: ../data/builder/template-designer.glade.h:72 -msgid "start_page" -msgstr "" - -#: ../data/builder/wdgt-media-select.glade.h:1 -msgid "Brand:" -msgstr "Марка:" - -#: ../data/builder/wdgt-media-select.glade.h:2 -msgid "Category:" -msgstr "Категория:" - -#: ../data/builder/wdgt-media-select.glade.h:4 -msgid "Recent templates" -msgstr "Недавние шаблоны" - -#: ../data/builder/wdgt-media-select.glade.h:5 -msgid "Search all templates" -msgstr "Поиск по шаблонам" - -#. Other ISO A series sizes -#: ../data/templates/paper-sizes.xml.h:2 -msgid "A0" -msgstr "A0" - -#: ../data/templates/paper-sizes.xml.h:3 -msgid "A1" -msgstr "A1" - -#: ../data/templates/paper-sizes.xml.h:4 -msgid "A10" -msgstr "A10" - -#: ../data/templates/paper-sizes.xml.h:5 -msgid "A2" -msgstr "A2" - -#: ../data/templates/paper-sizes.xml.h:6 -msgid "A3" -msgstr "A3" - -#: ../data/templates/paper-sizes.xml.h:7 -msgid "A4" -msgstr "A4" - -#: ../data/templates/paper-sizes.xml.h:8 -msgid "A5" -msgstr "A5" - -#: ../data/templates/paper-sizes.xml.h:9 -msgid "A6" -msgstr "A6" - -#: ../data/templates/paper-sizes.xml.h:10 -msgid "A7" -msgstr "A7" - -#: ../data/templates/paper-sizes.xml.h:11 -msgid "A8" -msgstr "A8" - -#: ../data/templates/paper-sizes.xml.h:12 -msgid "A9" -msgstr "A9" - -#. ISO B series sizes -#: ../data/templates/paper-sizes.xml.h:14 -msgid "B0" -msgstr "B0" - -#: ../data/templates/paper-sizes.xml.h:15 -msgid "B1" -msgstr "B1" - -#: ../data/templates/paper-sizes.xml.h:16 -msgid "B10" -msgstr "B10" - -#: ../data/templates/paper-sizes.xml.h:17 -msgid "B2" -msgstr "B2" - -#: ../data/templates/paper-sizes.xml.h:18 -msgid "B3" -msgstr "B3" - -#: ../data/templates/paper-sizes.xml.h:19 -msgid "B4" -msgstr "B4" - -#: ../data/templates/paper-sizes.xml.h:20 -msgid "B5" -msgstr "B5" - -#: ../data/templates/paper-sizes.xml.h:21 -msgid "B6" -msgstr "B6" - -#: ../data/templates/paper-sizes.xml.h:22 -msgid "B7" -msgstr "B7" - -#: ../data/templates/paper-sizes.xml.h:23 -msgid "B8" -msgstr "B8" - -#: ../data/templates/paper-sizes.xml.h:24 -msgid "B9" -msgstr "B9" - -#: ../data/templates/paper-sizes.xml.h:25 -msgid "US Executive" -msgstr "US Executive" - -#. Other US paper sizes -#: ../data/templates/paper-sizes.xml.h:27 -msgid "US Legal" -msgstr "US Legal" - -#: ../data/templates/categories.xml.h:1 -msgid "Any card" -msgstr "Любые карточки" - -#: ../data/templates/categories.xml.h:2 -msgid "Any label" -msgstr "Любые этикетки" - -#: ../data/templates/categories.xml.h:3 -msgid "Business cards" -msgstr "Визитные карточки" - -#: ../data/templates/categories.xml.h:4 -msgid "CD/DVD or other media" -msgstr "CD/DVD и прочие носители" - -#: ../data/templates/categories.xml.h:5 -msgid "Mailing/shipping products" -msgstr "Корреспонденция" - -#: ../data/templates/categories.xml.h:6 -msgid "Rectangular labels" -msgstr "Прямоугольные этикетки" - -#: ../data/templates/categories.xml.h:7 -msgid "Round labels" -msgstr "Круглые этикетки" - -#: ../data/templates/categories.xml.h:8 -msgid "Square labels" -msgstr "Квадратные этикетки" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:2 -#: ../data/templates/avery-iso-templates.xml.h:2 -#: ../data/templates/dymo-other-templates.xml.h:4 -#: ../data/templates/misc-iso-templates.xml.h:2 -#: ../data/templates/zweckform-iso-templates.xml.h:2 -msgid "Address Labels" -msgstr "Этикетка с адресом" - -#. =================================================================== -#. ============================================================ -#. =================================================================== -#. ******************************************************************** -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:4 -#: ../data/templates/avery-iso-templates.xml.h:8 -#: ../data/templates/misc-us-templates.xml.h:4 -#: ../data/templates/misc-iso-templates.xml.h:12 -#: ../data/templates/zweckform-iso-templates.xml.h:6 -msgid "Business Cards" -msgstr "Визитные карточки" - -#. =================================================================== -#. =============================================================== -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:6 -#: ../data/templates/avery-iso-templates.xml.h:14 -#: ../data/templates/misc-us-templates.xml.h:8 -#: ../data/templates/misc-iso-templates.xml.h:16 -#: ../data/templates/zweckform-iso-templates.xml.h:8 -msgid "CD/DVD Labels" -msgstr "Этикетки для CD/DVD" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:8 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "Наклейки для CD/DVD (наклейки на диск)" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:10 -msgid "CD/DVD Labels (Spine Labels)" -msgstr "Наклейки на CD/DVD" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:12 -#: ../data/templates/avery-iso-templates.xml.h:16 -msgid "Diskette Labels" -msgstr "Наклейки на дискеты" - -#. the LSK labels can be torn in half down the center -#: ../data/templates/avery-us-templates.xml.h:14 -#, fuzzy -msgid "Divider Labels" -msgstr "Этикетки для CD" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:16 -msgid "Filing Labels" -msgstr "Заполняемые этикетки" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:18 -msgid "Full Sheet Labels" -msgstr "Этикетки на всю страницу" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:20 -msgid "ID Labels" -msgstr "Идентификационные этикетки" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:22 -#, fuzzy -msgid "Index Cards" -msgstr "Визитные карточки" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:24 -msgid "Large Round Labels" -msgstr "Этикетки с большим закруглением" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:26 -msgid "Name Badge Labels" -msgstr "Именной бейджик" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:28 -msgid "Post cards" -msgstr "Почтовые открытки" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:30 -#: ../data/templates/dymo-other-templates.xml.h:12 -msgid "Return Address Labels" -msgstr "Наклейка для обратного адреса" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:32 -#: ../data/templates/misc-us-templates.xml.h:28 -msgid "Round Labels" -msgstr "Круглые этикетки" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:34 -msgid "Shipping Labels" -msgstr "Ценники" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:36 -msgid "Small Round Labels" -msgstr "Маленькие круглые этикетки" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:38 -msgid "Square Labels" -msgstr "Прямоугольные этикетки" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:40 -msgid "Tent Cards" -msgstr "" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:42 -msgid "Video Tape Face Labels" -msgstr "Лицевые наклейки на видеокассету" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:44 -msgid "Video Tape Spine Labels" -msgstr "Торцевые наклейки на видеокассету" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:4 -msgid "Address labels" -msgstr "Адресные наклейки" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:6 -#, fuzzy -msgid "Allround labels" -msgstr "Маленькие круглые этикетки" - -#. =============================================================== -#: ../data/templates/avery-iso-templates.xml.h:10 -msgid "CD Booklet" -msgstr "Вкладыш в CD" - -#. =============================================================== -#: ../data/templates/avery-iso-templates.xml.h:12 -msgid "CD Inlet" -msgstr "Буклет для CD" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:18 -msgid "Diskette labels" -msgstr "Наклейки на дискеты" - -#. =============================================================== -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:20 -#: ../data/templates/misc-us-templates.xml.h:18 -#: ../data/templates/misc-iso-templates.xml.h:36 -#: ../data/templates/zweckform-iso-templates.xml.h:16 -msgid "Mailing Labels" -msgstr "Почтовые этикетки" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:22 -msgid "Mailing labels" -msgstr "Почтовые наклейки" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:24 -msgid "Mini Address Labels" -msgstr "Маленькие наклейки с адресом" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:26 -#, fuzzy -msgid "Mini Labels" -msgstr "Этикетки для Мини-CD" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:28 -msgid "Shipping labels" -msgstr "Ценники" - -#. =================================================================== -#: ../data/templates/avery-other-templates.xml.h:2 -msgid "File Folder Labels" -msgstr "Наклейки для папок" - -#: ../data/templates/brother-other-templates.xml.h:1 -msgid "Multi Purpose Labels 17mm x 54mm" -msgstr "" - -#: ../data/templates/brother-other-templates.xml.h:2 -#, fuzzy -msgid "Shipping Labels 62mm x 100mm" -msgstr "Ценники" - -#. -#. ********************************************************************* -#. ********************************************************************* -#. Labels for the Brother QL-500/550/650 PC Label Printers -#. -#. These templates work with the Brother Linux Printer CUPS Driver. It -#. is unknown if these work correctly with the foomatic print driver for -#. these printers. -#. -#. One difference from typical templates is that the template size is -#. not the actual media size - it is the size of the printable area, -#. which is smaller than the media size. This is because (at least with -#. the Brother driver) coordinates are relative the corner of this area. -#. -#. ********************************************************************* -#. ********************************************************************* -#. -#: ../data/templates/brother-other-templates.xml.h:20 -#, fuzzy -msgid "Standard Address Labels 29mm x 90mm" -msgstr "Этикетка с адресом" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:2 -msgid "3.5in Diskette" -msgstr "Дискета 3,5 дюйма" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:6 -msgid "File Folder" -msgstr "Папка для файлов" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:8 -msgid "Hanging Folder" -msgstr "" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:10 -msgid "Large Address Labels" -msgstr "Большие наклейки с адресом" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:14 -#, fuzzy -msgid "Shipping Address Labels" -msgstr "Маленькие наклейки с адресом" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:2 -msgid "Business Card CD" -msgstr "Визитная карточка на CD" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:6 -msgid "CD Template Rectangles" -msgstr "Прямоугольный шаблон для CD" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:10 -msgid "CD/DVD Labels (Face Only)" -msgstr "Наклейки для CD/DVD (лицевая сторона)" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:12 -#: ../data/templates/misc-iso-templates.xml.h:18 -msgid "CD/DVD Labels (face only)" -msgstr "Вкладыши CD/DVD (лицевая сторона)" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:14 -msgid "Cassette Labels" -msgstr "Наклейки на кассеты" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:16 -msgid "DLT Labels" -msgstr "Этикетки на DLT" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:20 -msgid "Microtube labels" -msgstr "Этикетки для Microtube" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:22 -msgid "Mini-CD Labels" -msgstr "Этикетки для Мини-CD" - -#: ../data/templates/misc-us-templates.xml.h:23 -#, fuzzy -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "CD CD" - -#: ../data/templates/misc-us-templates.xml.h:24 -#, fuzzy -msgid "PRO CD Labels 2-up (Face only)" -msgstr "CD" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:26 -#: ../data/templates/misc-iso-templates.xml.h:42 -#, fuzzy -msgid "PRO CD Labels 2-up (face only)" -msgstr "CD" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:30 -msgid "Slimline CD Case (rightside up)" -msgstr "Тонкие коробки для CD (правая сторона вверху)" - -#: ../data/templates/misc-us-templates.xml.h:31 -msgid "Slimline CD Case (upside down)" -msgstr "Тонкие коробки для CD (кверх ногами)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:4 -#: ../data/templates/zweckform-iso-templates.xml.h:4 -msgid "Allround Labels" -msgstr "" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:6 -#, fuzzy -msgid "Arch File Labels" -msgstr "Файл" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:8 -#, fuzzy -msgid "Arch File Labels (large)" -msgstr "Файл большой" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:10 -#, fuzzy -msgid "Arch File Labels (small)" -msgstr "Файл маленький" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:14 -msgid "CD Labels" -msgstr "Этикетки для CD" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:20 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "Наклейки стандартного формата для CD/DVD (лицевая сторона)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:22 -msgid "Diskette Labels (face only)" -msgstr "Наклейки для дискет (лицевая сторона)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:24 -msgid "EPSON Photo Stickers 16" -msgstr "EPSON Photo Stickers 16" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:26 -msgid "Etiketten" -msgstr "Этикетки" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:28 -msgid "Fridge Magnet Stickers" -msgstr "Магнитные стикеры для холодильника" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:30 -msgid "General Labels" -msgstr "Этикетки общего назначения" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:32 -msgid "Inkjet/Laser Labels 70x37mm" -msgstr "" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:38 -msgid "Mailing Labels-2 columns" -msgstr "" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:40 -msgid "Mailing Labels-3 columns" -msgstr "" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:44 -#: ../data/templates/zweckform-iso-templates.xml.h:24 -msgid "Rectangular Labels" -msgstr "Прямоугольные метки" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:46 -msgid "Video Labels (face only)" -msgstr "Наклейки на видеокассеты (лицевая сторона)" - -#. =================================================================== -#: ../data/templates/misc-other-templates.xml.h:2 -#, fuzzy -msgid "Multi-Purpose Labels" -msgstr "Этикетки для Microtube" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:10 -msgid "Correction and Cover-up Labels" -msgstr "Исправляющие и покрывающие метки" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:12 -#, fuzzy -msgid "File Back Labels" -msgstr "Заполняемые этикетки" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:14 -#, fuzzy -msgid "Lever Arch File Labels" -msgstr "Файл" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:18 -msgid "Multi-purpose Stick+Lift Labels" -msgstr "" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:20 -#, fuzzy -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "x" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:22 -msgid "Rectangular Copier Labels" -msgstr "" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:26 -msgid "Video Labels (back)" -msgstr "Видеонаклейки (оборотная сторона)" - -#: ../data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "Создание этикеток, визитных карточек и вкладышей для дисков" - -#: ../data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "Дизайнер этикеток gLabels" - -#: ../data/mime/glabels.keys.in.h:1 ../data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "Файл проекта gLabels" - -#: ../barcode-0.98/compat/getopt.c:583 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: ../barcode-0.98/compat/getopt.c:607 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: ../barcode-0.98/compat/getopt.c:612 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: ../barcode-0.98/compat/getopt.c:629 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#. --option -#: ../barcode-0.98/compat/getopt.c:658 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "%s: неизвестный ключ `--%s'\n" - -#. +option or -option -#: ../barcode-0.98/compat/getopt.c:662 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "%s: неизвестный ключ `%c%s'\n" - -#. 1003.2 specifies the format of this message. -#: ../barcode-0.98/compat/getopt.c:688 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: ../barcode-0.98/compat/getopt.c:691 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "%s: некорректный ключ -- %c\n" - -#: ../barcode-0.98/compat/getopt.c:727 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: ключу необходим аргумент -- %c\n" - -#~ msgid "- gLabels label designer" -#~ msgstr "— дизайнер этикеток gLabels" - -#~ msgid "- batch process gLabels label files" -#~ msgstr "— пакетная обработка файлов этикеток gLabels" - -#~ msgid "Show tooltips" -#~ msgstr "Показывать подсказки" - -#~ msgid "Show tooltips for property toolbar" -#~ msgstr "Показывать подсказки на панели свойств" - -#~ msgid "Show tooltips for main toolbar" -#~ msgstr "Показывать подсказки в главной панели инструментов" - -#~ msgid "Show tooltips for drawing toolbar" -#~ msgstr "Показывать подсказки в панели рисования" - -#~ msgid "custom" -#~ msgstr "выборочно" - -#~ msgid "Choose Custom Color" -#~ msgstr "Выберите пользовательский цвет" - -#~ msgid "light brown" -#~ msgstr "светло-коричневый" - -#~ msgid "brown gold" -#~ msgstr "золотой коричневый" - -#~ msgid "dark green #2" -#~ msgstr "чёрно-зелёный №2" - -#~ msgid "navy" -#~ msgstr "морской" - -#~ msgid "purple #2" -#~ msgstr "пурпурный №2" - -#~ msgid "very dark gray" -#~ msgstr "очень тёмно-серый" - -#~ msgid "red-orange" -#~ msgstr "красно-оранжевый" - -#~ msgid "dull blue" -#~ msgstr "тускло-синий" - -#~ msgid "dull purple" -#~ msgstr "тускло-пурпурный" - -#~ msgid "dark grey" -#~ msgstr "тёмно-серый" - -#~ msgid "red" -#~ msgstr "красный" - -#~ msgid "lime" -#~ msgstr "лимонный" - -#~ msgid "dull blue #2" -#~ msgstr "тускло-синий №2" - -#~ msgid "sky blue #2" -#~ msgstr "небесно-синий №2" - -#~ msgid "gray" -#~ msgstr "серый" - -#~ msgid "magenta" -#~ msgstr "малиновый" - -#~ msgid "bright orange" -#~ msgstr "ярко-оранжевый" - -#~ msgid "bright blue" -#~ msgstr "ярко-синий" - -#~ msgid "red purple" -#~ msgstr "красно-пурпурный" - -#~ msgid "light grey" -#~ msgstr "светло-серый" - -#~ msgid "light orange" -#~ msgstr "светло-оранжевый" - -#~ msgid "light blue" -#~ msgstr "светло-синий" - -#~ msgid "light purple" -#~ msgstr "светло-пурпурный" - -#~ msgid "purplish blue" -#~ msgstr "пурпурно-синий" - -#~ msgid "dark purple" -#~ msgstr "тёмно-пурпурный" - -#~ msgid "Text color" -#~ msgstr "Цвет текста" - -#~ msgid " " -#~ msgstr " " - -#~ msgid " " -#~ msgstr " " - -#~ msgid "Could not initialize Bonobo!\n" -#~ msgstr "Невозможно инициализировать Bonobo!\n" - -#~ msgid "print this message" -#~ msgstr "напечатать это сообщение" - -#~ msgid "print the version of glabels-batch being used" -#~ msgstr "выводит версию используемого glabels-batch" - -#~ msgid "[OPTION...] GLABELS_FILE..." -#~ msgstr "[ПАРАМЕТРЫ...] файл_glabels..." - -#~ msgid "missing glabels file\n" -#~ msgstr "не указан файл glabels\n" - -#~ msgid "Open" -#~ msgstr "Открыть" - -#~ msgid "Align _Horizontally" -#~ msgstr "Выровнять _горизонтально" - -#~ msgid "Align _Vertically" -#~ msgstr "Выровнять _вертикально" - -#~ msgid "_Delete" -#~ msgstr "У_далить" - -#~ msgid "Print" -#~ msgstr "Напечатать" - -#~ msgid "_Job" -#~ msgstr "_Задание" - -#~ msgid "P_rinter" -#~ msgstr "П_ринтер" - -#~ msgid "Copies" -#~ msgstr "Копий" - -#~ msgid "Document merge control" -#~ msgstr "Управление объединением" - -#~ msgid "Print preview" -#~ msgstr "Просмотреть" - -#~ msgid "Importing from glabels 1.91 format" -#~ msgstr "Импортируем из формата glabels версии 1.91" - -#~ msgid "Label size:" -#~ msgstr "Размер этикетки:" - -#~ msgid "Layout:" -#~ msgstr "Формат:" - -#~ msgid "%d x %d (%d per sheet)" -#~ msgstr "%d x %d (%d на лист)" - -#~ msgid "No paper files found!" -#~ msgstr "Не найдены файлы описания бумаги!" - -#~ msgid "Close" -#~ msgstr "Закрыть" - -#~ msgid "Cu_t" -#~ msgstr "_Вырезать" - -#~ msgid "Customize" -#~ msgstr "Настроить" - -#~ msgid "Customize toolbars" -#~ msgstr "Настроить панель инструментов" - -#~ msgid "Dump XML" -#~ msgstr "Дамп XML" - -#~ msgid "Dump the UI Xml description" -#~ msgstr "Дамп XML-описания UI" - -#~ msgid "Font selector" -#~ msgstr "Выбор шрифта" - -#~ msgid "Icon and _Text" -#~ msgstr "Пиктограмма и _Текст" - -#~ msgid "M_arkup" -#~ msgstr "_Разметка" - -#~ msgid "New" -#~ msgstr "Создать" - -#~ msgid "Object property editor" -#~ msgstr "Редактор свойств объекта" - -#~ msgid "Only show icons in the main toolbar" -#~ msgstr "Показывать только картинки в главной панели инструментов" - -#~ msgid "Pr_eferences..." -#~ msgstr "_Настроить..." - -#~ msgid "Properties" -#~ msgstr "Свойства" - -#~ msgid "Quit" -#~ msgstr "Выйти" - -#~ msgid "Redo the undone action" -#~ msgstr "Повторить отменённое действие" - -#~ msgid "Save" -#~ msgstr "Сохранить" - -#~ msgid "Save As" -#~ msgstr "Сохранить как" - -#~ msgid "Select _All" -#~ msgstr "Выбрать вс_ё" - -#~ msgid "Set main toolbar button style according to desktop default" -#~ msgstr "" -#~ "Установить стиль кнопок главной панели инструментов согласно настройкам " -#~ "рабочего стола" - -#~ msgid "Show both icons and texts in the main toolbar" -#~ msgstr "Показывать и пиктограммы и текст в главной панели инструментов" - -#~ msgid "Template Designer" -#~ msgstr "Дизайнер шаблонов" - -#~ msgid "U_n-select All" -#~ msgstr "_Снять выделение со всего" - -#~ msgid "Undo" -#~ msgstr "Отменить" - -#~ msgid "Undo the last action" -#~ msgstr "Отменить последнее действие" - -#~ msgid "_About..." -#~ msgstr "_О программе..." - -#~ msgid "_Bottoms" -#~ msgstr "По _низу" - -#~ msgid "_Contents" -#~ msgstr "_Содержание справки" - -#~ msgid "_Copy" -#~ msgstr "_Запомнить" - -#~ msgid "_Create Object" -#~ msgstr "_Создать объект" - -#~ msgid "_Debug" -#~ msgstr "_Отладка" - -#~ msgid "_Desktop Default" -#~ msgstr "_Согласно настройкам рабочего стола" - -#~ msgid "_Drawing Toolbar" -#~ msgstr "Показывать панель _рисования" - -#~ msgid "_Icon" -#~ msgstr "_Пиктограмма" - -#~ msgid "_Main Toolbar" -#~ msgstr "Показывать панель _инструментов" - -#~ msgid "_Merge Properties..." -#~ msgstr "_Свойства объединения..." - -#~ msgid "_Paste" -#~ msgstr "Вст_авить" - -#~ msgid "_Property Toolbar" -#~ msgstr "Показывать панель с_войств" - -#~ msgid "*" -#~ msgstr "*" - -#~ msgid "Load image" -#~ msgstr "Загрузить изображение" - -#~ msgid "Label or Card Size (Rectangular)" -#~ msgstr "Развер этикетки или визитки (прямоугольник)" diff --git a/glabels2/po/zh_CN.po b/glabels2/po/zh_CN.po deleted file mode 100644 index af9acb41..00000000 --- a/glabels2/po/zh_CN.po +++ /dev/null @@ -1,2670 +0,0 @@ -# German translation of glabels. -# Copyright (C) 2001-2008 Jim Evins -# -msgid "" -msgstr "" -"Project-Id-Version: glabels\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-17 14:09+0800\n" -"PO-Revision-Date: 2009-05-19 20:16-0400\n" -"Last-Translator: Careon \n" -"Language-Team: Careon \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Chinese\n" -"X-Poedit-Country: CHINA\n" -"X-Poedit-SourceCharset: utf-8\n" -#: ../src/glabels.c:66 ../src/glabels-batch.c:69 -msgid "[FILE...]" -msgstr "[文件...]" - -#: ../src/glabels.c:83 -msgid "Launch gLabels label and business card designer." -msgstr "启动gLabels标签和名片设计软件。" - -#: ../src/glabels.c:91 ../src/glabels-batch.c:105 -#, c-format -msgid "" -"%s\n" -"Run '%s --help' to see a full list of available command line options.\n" -msgstr "" -"%s\n" -"运行'%s --help'来查看可用的命令参数。\n" - -#: ../src/glabels-batch.c:53 -msgid "set output filename (default=\"output.pdf\")" -msgstr "输出文件名(默认值=\"output.pdf\")" - -#: src/glabels-batch.c:56 src/glabels-batch.c:70 -msgid "filename" -msgstr "文件名" - -#: src/glabels-batch.c:54 -msgid "number of sheets (default=1)" -msgstr "每页数量(默认值=1)" - -#: src/glabels-batch.c:54 -msgid "sheets" -msgstr "数量" - -#: src/glabels-batch.c:56 -msgid "number of copies (default=1)" -msgstr "副本数量(默认值=1)" - -#: src/glabels-batch.c:56 -msgid "copies" -msgstr "副本" - -#: ../src/glabels-batch.c:59 -msgid "first label on first sheet (default=1)" -msgstr "第1页的第1个标签 (默认值=1)" - -#: ../src/glabels-batch.c:59 -msgid "first" -msgstr "第1个" - -#: src/glabels-batch.c:64 src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "打印外框线(用于校正打印机)" - -#: src/glabels-batch.c:66 src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "反转打印 (例如对称)" - -#: ../src/glabels-batch.c:65 ../data/builder/print-custom-widget.glade.h:4 -msgid "print crop marks" -msgstr "打印裁剪标记" - -#: ../src/glabels-batch.c:67 -msgid "input file for merging" -msgstr "输入要插入的文件名" - -#: ../src/glabels-batch.c:97 -msgid "Print files created with gLabels." -msgstr "打印gLabels文件。" - -#: ../src/glabels-batch.c:147 -#, c-format -msgid "cannot perform document merge with glabels file %s\n" -msgstr "" -"无法合并glabels文件%s \n" - -#: ../src/glabels-batch.c:169 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "无法打开glabels文件 %s\n" - -#: ../src/window.c:259 -msgid "(none) - gLabels" -msgstr "(无) - gLabels" - -#: src/window.c:414 -msgid "(modified)" -msgstr "(已修改)" - -#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 -msgid "_Select Mode" -msgstr "选择模式(_S)" - -#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 -msgid "_Text" -msgstr "文字(_T)" - -#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 -msgid "_Line" -msgstr "线条(_L)" - -#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 -msgid "_Box" -msgstr "矩形(_B)" - -#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 -msgid "_Ellipse" -msgstr "椭圆(_E)" - -#: src/stock.c:70 -msgid "_Image" -msgstr "图片(_I)" - -#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 -msgid "Bar_code" -msgstr "条形码(_C)" - -#: src/stock.c:72 -msgid "_Merge Properties" -msgstr "合并属性(_M)" - -#: src/stock.c:73 -msgid "Object _Properties" -msgstr "对象属性(_P)" - -#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 -msgid "Bring to _Front" -msgstr "移到上层(_F)" - -#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 -msgid "Send to _Back" -msgstr "移到下层(_B)" - -#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 -msgid "Rotate _Left" -msgstr "向左旋转(_L)" - -#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 -msgid "Rotate _Right" -msgstr "向右旋转(_R)" - -#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "水平翻转(_H)" - -#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "垂直翻转(_V)" - -#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 -msgid "_Lefts" -msgstr "靠左(_L)" - -#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 -msgid "_Rights" -msgstr "靠右(_R)" - -#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 -msgid "_Centers" -msgstr "居中(_C)" - -#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 -msgid "_Tops" -msgstr "顶部(_T)" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "底部" - -#: src/stock.c:85 -msgid "Centers" -msgstr "居中" - -#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "标签中心(_N)" - -#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "填充色" - -#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "线条颜色" - -#: src/stock.c:90 src/stock.c:92 -msgid "Linked" -msgstr "相连" - -#: src/stock.c:91 src/stock.c:93 -msgid "Not Linked" -msgstr "不相连" - -#. Menu entries. -#: ../src/ui.c:93 -msgid "_File" -msgstr "文件(_F)" - -#: ../src/ui.c:94 -msgid "Open Recent _Files" -msgstr "打开最近的文件(_F)" - -#: ../src/ui.c:95 -msgid "_Edit" -msgstr "编辑(_E)" - -#: ../src/ui.c:96 -msgid "_View" -msgstr "查看(_V)" - -#: ../src/ui.c:97 -msgid "Customize Main Toolbar" -msgstr "自定义主工具栏" - -#: ../src/ui.c:98 -msgid "Customize Drawing Toolbar" -msgstr "自定义绘图栏" - -#: ../src/ui.c:99 -msgid "Customize Properties Toolbar" -msgstr "自定义属性栏" - -#: ../src/ui.c:100 -msgid "_Objects" -msgstr "对象(_O)" - -#: ../src/ui.c:101 -msgid "_Create" -msgstr "新建(_C)" - -#: ../src/ui.c:102 -msgid "_Order" -msgstr "排序(_O)" - -#: ../src/ui.c:103 -msgid "_Rotate/Flip" -msgstr "旋转/翻转(_R)" - -#: ../src/ui.c:104 -msgid "Align _Horizontal" -msgstr "水平对齐(_H)" - -#: ../src/ui.c:105 -msgid "Align _Vertical" -msgstr "垂直对齐(_V)" - -#: ../src/ui.c:106 -msgid "_Help" -msgstr "帮助(_H)" - -#. Popup entries. -#: ../src/ui.c:109 ../src/ui.c:110 -msgid "Context Menu" -msgstr "右键菜单" - -#: ../src/ui.c:115 -msgid "_New" -msgstr "新建(_N)" - -#: ../src/ui.c:117 -msgid "Create a new file" -msgstr "新建文件" - -#: ../src/ui.c:122 -msgid "_Open..." -msgstr "打开(_O)..." - -#: ../src/ui.c:124 -msgid "Open a file" -msgstr "打开文件" - -#: ../src/ui.c:129 -msgid "_Save" -msgstr "保存(_S)" - -#: ../src/ui.c:131 -msgid "Save current file" -msgstr "保存当前文件" - -#: ../src/ui.c:136 -msgid "Save _As..." -msgstr "另存为(_A)..." - -#: ../src/ui.c:138 -msgid "Save the current file to a different name" -msgstr "保存当前文件为其它文件名" - -#: ../src/ui.c:143 -msgid "_Print..." -msgstr "打印(_P)..." - -#: ../src/ui.c:145 -msgid "Print the current file" -msgstr "打印当前文件" - -#: ../src/ui.c:150 -msgid "Properties..." -msgstr "属性..." - -#: ../src/ui.c:152 -msgid "Modify document properties" -msgstr "修改文档属性" - -#: ../src/ui.c:157 -msgid "Template _Designer..." -msgstr "模板设计工具(_D)..." - -#: ../src/ui.c:159 -msgid "Create a custom template" -msgstr "新建一个模板" - -#: ../src/ui.c:164 -msgid "_Close" -msgstr "关闭(_C)" - -#: ../src/ui.c:166 -msgid "Close the current file" -msgstr "关闭当前文件" - -#: ../src/ui.c:171 -msgid "_Quit" -msgstr "退出(_Q)" - -#: ../src/ui.c:173 -msgid "Quit the program" -msgstr "退出程序" - -#: ../src/ui.c:180 -msgid "Cut" -msgstr "剪切" - -#: ../src/ui.c:182 -msgid "Cut the selection" -msgstr "剪切选中的内容" - -#: ../src/ui.c:187 -msgid "Copy" -msgstr "复制" - -#: ../src/ui.c:189 -msgid "Copy the selection" -msgstr "复制选中的内容" - -#: ../src/ui.c:194 -msgid "Paste" -msgstr "粘贴" - -#: ../src/ui.c:196 -msgid "Paste the clipboard" -msgstr "粘贴到剪贴板" - -#: ../src/ui.c:201 -msgid "Delete" -msgstr "删除" - -#: ../src/ui.c:203 -msgid "Delete the selected objects" -msgstr "删除选中的对象" - -#: ../src/ui.c:208 -msgid "Select All" -msgstr "全选" - -#: ../src/ui.c:210 -msgid "Select all objects" -msgstr "选中全部对象" - -#: ../src/ui.c:215 -msgid "Un-select All" -msgstr "取消全选" - -#: ../src/ui.c:217 -msgid "Remove all selections" -msgstr "删除全部选中的内容" - -#: ../src/ui.c:222 -msgid "Preferences" -msgstr "参数" - -#: ../src/ui.c:224 -msgid "Configure the application" -msgstr "对程序进行设置" - -#: ../src/ui.c:231 -msgid "Zoom in" -msgstr "放大" - -#: ../src/ui.c:233 -msgid "Increase magnification" -msgstr "放大" - -#: ../src/ui.c:238 -msgid "Zoom out" -msgstr "缩小" - -#: ../src/ui.c:240 -msgid "Decrease magnification" -msgstr "缩小" - -#: ../src/ui.c:245 -msgid "Zoom 1 to 1" -msgstr "1:1 缩放" - -#: ../src/ui.c:247 -msgid "Restore scale to 100%" -msgstr "缩放到实际大小的 100% " - -#: ../src/ui.c:252 -msgid "Zoom to fit" -msgstr "最佳比例" - -#: ../src/ui.c:254 -msgid "Set scale to fit window" -msgstr "缩放到适合窗口" - -#: ../src/ui.c:261 -msgid "Select Mode" -msgstr "模式选择" - -#: ../src/ui.c:263 -msgid "Select, move and modify objects" -msgstr "选择,移动或删除对象" - -#: ../src/ui.c:268 ../src/view-text.c:494 -#: ../data/builder/object-editor.glade.h:32 -msgid "Text" -msgstr "文字" - -#: ../src/ui.c:270 -msgid "Create text object" -msgstr "新建文字对象" - -#: ../src/ui.c:275 -msgid "Box" -msgstr "矩形" - -#: ../src/ui.c:277 -msgid "Create box/rectangle object" -msgstr "新建矩形对象" - -#: ../src/ui.c:282 ../data/builder/object-editor.glade.h:20 -msgid "Line" -msgstr "线条" - -#: ../src/ui.c:284 -msgid "Create line object" -msgstr "新建线条对象" - -#: ../src/ui.c:289 -msgid "Ellipse" -msgstr "椭圆" - -#: ../src/ui.c:291 -msgid "Create ellipse/circle object" -msgstr "新建 椭圆/圆 对象" - -#: ../src/ui.c:296 ../data/builder/object-editor.glade.h:16 -msgid "Image" -msgstr "图片" - -#: ../src/ui.c:298 -msgid "Create image object" -msgstr "新建图片对象" - -#: ../src/ui.c:303 -msgid "Barcode" -msgstr "条形码" - -#: ../src/ui.c:305 -msgid "Create barcode object" -msgstr "新建条形码" - -#: ../src/ui.c:310 -msgid "Bring to front" -msgstr "移到上层" - -#: ../src/ui.c:312 -msgid "Raise object to top" -msgstr "移到最顶端" - -#: ../src/ui.c:317 -msgid "Send to back" -msgstr "移到下层" - -#: ../src/ui.c:319 -msgid "Lower object to bottom" -msgstr "把下层对象移到最底层" - -#: ../src/ui.c:324 -msgid "Rotate left" -msgstr "向左旋转" - -#: ../src/ui.c:326 -msgid "Rotate object 90 degrees counter-clockwise" -msgstr "向左旋转90度" - -#: ../src/ui.c:331 -msgid "Rotate right" -msgstr "向右旋转" - -#: ../src/ui.c:333 -msgid "Rotate object 90 degrees clockwise" -msgstr "向右旋转90度" - -#: ../src/ui.c:338 -msgid "Flip horizontally" -msgstr "水平翻转" - -#: ../src/ui.c:340 -msgid "Flip object horizontally" -msgstr "水平翻转对象" - -#: ../src/ui.c:345 -msgid "Flip vertically" -msgstr "垂直翻转" - -#: ../src/ui.c:347 -msgid "Flip object vertically" -msgstr "垂直翻转对象" - -#: ../src/ui.c:352 -msgid "Align left" -msgstr "左对齐" - -#: ../src/ui.c:354 -msgid "Align objects to left edges" -msgstr "多个对象与左边界对齐" - -#: ../src/ui.c:359 -msgid "Align right" -msgstr "右对齐" - -#: ../src/ui.c:361 -msgid "Align objects to right edges" -msgstr "多个对象与左边界对齐" - -#: ../src/ui.c:366 -msgid "Align horizontal center" -msgstr "水平中心共线" - -#: ../src/ui.c:368 -msgid "Align objects to horizontal centers" -msgstr "多个对象的水平中心共线" - -#: ../src/ui.c:373 -msgid "Align tops" -msgstr "顶端对齐" - -#: ../src/ui.c:375 -msgid "Align objects to top edges" -msgstr "多个对象与上边界对齐" - -#: ../src/ui.c:380 -msgid "Align bottoms" -msgstr "底部对齐" - -#: ../src/ui.c:382 -msgid "Align objects to bottom edges" -msgstr "多个对象与下边界对齐" - -#: ../src/ui.c:387 -msgid "Align vertical center" -msgstr "垂直中心共线" - -#: ../src/ui.c:389 -msgid "Align objects to vertical centers" -msgstr "多个对象的垂直中心共线" - -#: ../src/ui.c:394 -msgid "Center horizontally" -msgstr "水平居中" - -#: ../src/ui.c:396 -msgid "Center objects to horizontal label center" -msgstr "对象中心与水平中心重合" - -#: ../src/ui.c:401 -msgid "Center vertically" -msgstr "垂直居中" - -#: ../src/ui.c:403 -msgid "Center objects to vertical label center" -msgstr "对象中心与垂直中心重合" - -#: ../src/ui.c:408 -msgid "Merge properties" -msgstr "合并属性" - -#: ../src/ui.c:410 -msgid "Edit merge properties" -msgstr "编辑合并属性" - -#: ../src/ui.c:417 -msgid "Contents" -msgstr "内容" - -#: ../src/ui.c:419 -msgid "Open glabels manual" -msgstr "打开glabels帮助手册" - -#: ../src/ui.c:424 -msgid "About..." -msgstr "关于..." - -#: ../src/ui.c:426 -msgid "About glabels" -msgstr "关于glabels" - -# CHECK -#: ../src/ui.c:436 -msgid "Property toolbar" -msgstr "属性栏" - -#: ../src/ui.c:438 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "改变当前窗口中属性栏的可视性" - -#: ../src/ui.c:444 -msgid "Grid" -msgstr "单元格" - -#: ../src/ui.c:446 -msgid "Change the visibility of the grid in the current window" -msgstr "改变当前窗口中单元格的可视性" - -#: ../src/ui.c:452 -msgid "Markup" -msgstr "标记" - -#: ../src/ui.c:454 -msgid "Change the visibility of markup lines in the current window" -msgstr "改变当前窗口中标记线条的可视性" - -#: ../src/ui.c:465 -msgid "Main toolbar" -msgstr "主工具栏" - -#: ../src/ui.c:467 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "改变当前窗口中主工具栏的可视性" - -#: ../src/ui.c:473 -msgid "Drawing toolbar" -msgstr "绘图栏" - -#: ../src/ui.c:475 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "改变当前窗口中绘图栏的可视性" - -#: ../src/ui-property-bar.c:279 ../src/prefs-dialog.c:328 -#: ../src/object-editor-bc-page.c:93 ../src/object-editor-text-page.c:93 -#: ../src/object-editor-shadow-page.c:93 -msgid "Default" -msgstr "默认值" - -#: ../src/ui-property-bar.c:291 ../src/prefs-dialog.c:334 -#: ../src/object-editor-fill-page.c:79 -msgid "No Fill" -msgstr "没有填充" - -#: ../src/ui-property-bar.c:303 ../src/prefs-dialog.c:331 -#: ../src/object-editor-line-page.c:81 -msgid "No Line" -msgstr "没有线条" - -#: ../src/ui-sidebar.c:152 -msgid "Object properties" -msgstr "对象属性" - -#: ../src/ui-commands.c:1064 -msgid "Glabels includes contributions from:" -msgstr "Glabels 包括的发布内容来自:" - -#: ../src/ui-commands.c:1070 -msgid "See the file AUTHORS for additional credits," -msgstr "查看AUTHORS文件来获得更多信息," - -#: ../src/ui-commands.c:1071 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "或者访问 http://glabels.sourceforge.net/" - -#: ../src/ui-commands.c:1083 -msgid "A label and business card creation program.\n" -msgstr "一个标签和名片设计程序。\n" - -#: ../src/ui-commands.c:1087 -msgid "translator-credits" -msgstr "" -"Marcus Bauer \n" -"Christian Neumair \n" -"Mario Blättermann \n" -"Careone " - -#: ../src/ui-commands.c:1090 -msgid "" -"Glabels is free software; you can redistribute it and/or modify it\n" -"under the terms of the GNU General Public License as published by\n" -"the Free Software Foundation; either version 2 of the License, or\n" -"(at your option) any later version.\n" -"\n" -"This program is distributed in the hope that it will be useful, but\n" -"WITHOUT ANY WARRANTY; without even the implied warranty of\n" -"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" -"the GNU General Public License for more details.\n" -msgstr "" -"Glabels is free software; you can redistribute it and/or modify it\n" -"under the terms of the GNU General Public License as published by\n" -"the Free Software Foundation; either version 2 of the License, or\n" -"(at your option) any later version.\n" -"\n" -"This program is distributed in the hope that it will be useful, but\n" -"WITHOUT ANY WARRANTY; without even the implied warranty of\n" -"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" -"the GNU General Public License for more details.\n" - -#: ../src/ui-commands.c:1116 -msgid "glabels" -msgstr "glabels" - -#: ../src/file.c:91 -msgid "New Label or Card" -msgstr "新建标签或名片" - -#: ../src/file.c:191 -msgid "Label properties" -msgstr "标签属性" - -#: ../src/file.c:292 ../src/file.c:578 -msgid "All files" -msgstr "全部文件" - -#: ../src/file.c:297 ../src/file.c:583 -msgid "gLabels documents" -msgstr "gLabels文件(.glabels)" - -#: ../src/file.c:343 ../src/file.c:640 -msgid "Empty file name selection" -msgstr "没有选择文件" - -#: ../src/file.c:346 ../src/file.c:362 -msgid "Please select a file or supply a valid file name" -msgstr "请选择文件,或输入文件名" - -#: src/file.c:519 src/file.c:631 -msgid "File does not exist" -msgstr "文件不存在" - -#: ../src/file.c:433 -#, c-format -msgid "Could not open file \"%s\"" -msgstr "无法打开文件 \"%s\"" - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "不支持的文件格式" - -#: ../src/file.c:513 ../src/file.c:690 -#, c-format -msgid "Could not save file \"%s\"" -msgstr "无法保存文件 \"%s\"" - -#: src/file.c:805 src/file.c:987 src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "保存时出错。文件没有保存。" - -#: ../src/file.c:556 -#, c-format -msgid "Save \"%s\" as" -msgstr " \"%s\" 另存为" - -#: src/file.c:935 src/file.c:1131 -msgid "Please supply a valid file name" -msgstr "请输入文件名" - -#: ../src/file.c:664 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "覆盖文件 \"%s\"?" - -#: src/file.c:960 src/file.c:1155 -msgid "File already exists." -msgstr "已有同名文件。" - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "在关闭前先保存文件 \"%s\"?" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "如果不保存,所做的更改会丢失。" - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "关闭(不保存)" - -#. Should not happen -#: ../src/prefs.c:159 ../src/prefs.c:166 -#: ../data/builder/object-editor.glade.h:43 -#: ../data/builder/prefs-dialog.glade.h:22 -msgid "points" -msgstr "像素" - -#: src/prefs.c:158 data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "英寸" - -#: src/prefs.c:160 -msgid "mm" -msgstr "mm" - -#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 -msgid "gLabels Preferences" -msgstr "gLabels参数" - -#. Build editor. -#: ../src/view-box.c:175 -msgid "Box object properties" -msgstr "矩形属性" - -#. Build editor. -#: src/view-ellipse.c:224 -msgid "Ellipse object properties" -msgstr "椭圆属性" - -#. Build editor. -#: src/view-line.c:224 -msgid "Line object properties" -msgstr "线条属性" - -#. Build editor. -#: src/view-image.c:223 -msgid "Image object properties" -msgstr "图片属性" - -#. Build editor. -#: src/view-text.c:251 -msgid "Text object properties" -msgstr "文字属性" - -#. Build editor. -#: ../src/view-barcode.c:174 -msgid "Barcode object properties" -msgstr "条形码属性" - -#: ../src/object-editor-image-page.c:267 -msgid "All Files" -msgstr "全部文件" - -#: ../src/object-editor-image-page.c:272 -msgid "All Images" -msgstr "全部图片" - -#: ../src/object-editor-image-page.c:287 -#, c-format -msgid "%s (*.%s)" -msgstr "%s (*.%s)" - -#: ../src/merge-properties-dialog.c:271 -msgid "Merge Properties" -msgstr "合并属性" - -#: ../src/merge-properties-dialog.c:297 ../src/merge-properties-dialog.c:405 -msgid "Select merge-database source" -msgstr "选择要插入的数据" - -#: ../src/merge-properties-dialog.c:306 ../src/merge-properties-dialog.c:425 -msgid "N/A" -msgstr "无" - -#: ../src/merge-properties-dialog.c:332 -msgid "Select" -msgstr "选择" - -#: ../src/merge-properties-dialog.c:340 -msgid "Record/Field" -msgstr "记录/区域" - -#: ../src/merge-properties-dialog.c:348 -#: ../data/builder/object-editor.glade.h:10 -msgid "Data" -msgstr "数据" - -#: ../src/merge-properties-dialog.c:418 -msgid "Fixed" -msgstr "固定值" - -#. =================================================================== -#: ../src/print-op.c:242 ../src/wdgt-print-copies.c:171 -#: ../data/templates/misc-iso-templates.xml.h:34 -msgid "Labels" -msgstr "标签" - -#: ../src/template-designer.c:411 -msgid "gLabels Template Designer" -msgstr "gLabels 模板设计工具r" - -#: ../src/template-designer.c:481 -msgid "Welcome" -msgstr "欢迎" - -#: ../src/template-designer.c:534 -msgid "Name and Description" -msgstr "名称和说明" - -#: ../src/template-designer.c:595 -msgid "Page Size" -msgstr "纸张尺寸" - -#: ../src/template-designer.c:675 -msgid "Label or Card Shape" -msgstr "标签或名片形状" - -#: ../src/template-designer.c:735 -msgid "Label or Card Size" -msgstr "标签或名片尺寸" - -#: ../src/template-designer.c:844 -msgid "Label Size (round)" -msgstr "标签尺寸(圆形)" - -#: ../src/template-designer.c:935 -msgid "Label Size (CD/DVD)" -msgstr "标签尺寸(CD/DVD)" - -#: ../src/template-designer.c:1036 -msgid "Number of Layouts" -msgstr "布局个数" - -#: ../src/template-designer.c:1110 -msgid "Layout(s)" -msgstr "布局" - -#: ../src/template-designer.c:1229 -msgid "Design Completed" -msgstr "设计完成" - -#: ../src/template-designer.c:1396 -msgid "" -"Brand and part# match an existing " -"template!" -msgstr "" -"模板中已有的品牌和规格" - -#: ../src/bc.c:67 -msgid "POSTNET (any)" -msgstr "POSTNET (通用)" - -#: ../src/bc.c:70 -msgid "POSTNET-5 (ZIP only)" -msgstr "POSTNET-5 (用于邮编)" - -#: ../src/bc.c:73 -msgid "POSTNET-9 (ZIP+4)" -msgstr "POSTNET-9 (ZIP+4)" - -#: ../src/bc.c:76 -msgid "POSTNET-11 (DPBC)" -msgstr "POSTNET-11 (DPBC)" - -#: ../src/bc.c:79 -msgid "CEPNET" -msgstr "CEPNET" - -#: ../src/bc.c:82 -msgid "EAN (any)" -msgstr "EAN (通用)" - -#: ../src/bc.c:85 -msgid "EAN-8" -msgstr "EAN-8" - -#: ../src/bc.c:88 -msgid "EAN-8 +2" -msgstr "EAN-8 +2" - -#: ../src/bc.c:91 -msgid "EAN-8 +5" -msgstr "EAN-8 +5" - -#: ../src/bc.c:94 -msgid "EAN-13" -msgstr "EAN-13" - -#: ../src/bc.c:97 -msgid "EAN-13 +2" -msgstr "EAN-13 +2" - -#: ../src/bc.c:100 -msgid "EAN-13 +5" -msgstr "EAN-13 +5" - -#: ../src/bc.c:103 -msgid "UPC (UPC-A or UPC-E)" -msgstr "UPC (UPC-A 或者 UPC-E)" - -#: ../src/bc.c:106 -msgid "UPC-A" -msgstr "UPC-A" - -#: ../src/bc.c:109 -msgid "UPC-A +2" -msgstr "UPC-A +2" - -#: ../src/bc.c:112 -msgid "UPC-A +5" -msgstr "UPC-A +5" - -#: ../src/bc.c:115 -msgid "UPC-E" -msgstr "UPC-E" - -#: ../src/bc.c:118 -msgid "UPC-E +2" -msgstr "UPC-E +2" - -#: ../src/bc.c:121 -msgid "UPC-E +5" -msgstr "UPC-E +5" - -#: ../src/bc.c:124 -msgid "ISBN" -msgstr "ISBN" - -#: ../src/bc.c:127 -msgid "ISBN +5" -msgstr "ISBN +5" - -#: ../src/bc.c:130 -msgid "Code 39" -msgstr "Code 39" - -#: ../src/bc.c:133 -msgid "Code 128" -msgstr "Code 128" - -#: ../src/bc.c:136 -msgid "Code 128C" -msgstr "Code 128C" - -#: ../src/bc.c:139 -msgid "Code 128B" -msgstr "Code 128B" - -#: ../src/bc.c:142 -msgid "Interleaved 2 of 5" -msgstr "Interleaved 2 of 5" - -#: ../src/bc.c:145 -msgid "Codabar" -msgstr "Codabar" - -#: ../src/bc.c:148 -msgid "MSI" -msgstr "MSI" - -#: ../src/bc.c:151 -msgid "Plessey" -msgstr "Plessey" - -#: ../src/bc.c:154 -msgid "IEC16022 (DataMatrix)" -msgstr "IEC16022 (DataMatrix)" - -#: ../src/label.c:531 -msgid "Untitled" -msgstr "未命名" - -#: ../src/label-barcode.c:426 -msgid "Barcode data empty" -msgstr "空条形码数据" - -#: ../src/label-barcode.c:430 -msgid "Invalid barcode data" -msgstr "条形码数据无效" - -#: ../src/xml-label.c:189 ../src/xml-label.c:226 -msgid "xmlParseFile error" -msgstr "xml文件语法错误" - -#: ../src/xml-label.c:262 -msgid "No document root" -msgstr "没有文档根" - -#: ../src/xml-label.c:270 -msgid "Importing from glabels 0.1 format" -msgstr "导入glabels 0.1格式" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "导入glabels 0.4格式" - -#: ../src/xml-label.c:288 -#, c-format -msgid "Unknown glabels Namespace -- Using %s" -msgstr "未知的glabels文件名称 -- 使用 %s" - -#: ../src/xml-label.c:319 ../src/xml-label-04.c:79 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "错误的根地址 = \"%s\"" - -#: ../src/xml-label.c:356 -#, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "文档地址内有错误点 = \"%s\"" - -#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "错误点 = \"%s\"" - -#: src/xml-label.c:796 src/xml-label-191.c:605 -#, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "数据地址内有错误点 = \"%s\"" - -#: src/xml-label.c:962 libglabels/xml-template.c:535 -msgid "Utf8 conversion error." -msgstr "UTF-8编码转换错误。" - -#: src/xml-label.c:969 libglabels/xml-template.c:542 -msgid "Problem saving xml file." -msgstr "保存xml文件时出错。" - -#: ../src/merge.c:170 ../src/merge.c:211 ../src/merge.c:375 ../src/merge.c:378 -msgid "None" -msgstr "无" - -#: ../src/merge-init.c:59 -msgid "Text file with comma delimeters (CSV)" -msgstr "用逗号分隔的文本文件 (CSV)" - -#: src/merge-init.c:60 -msgid "Text file with colon delimeters" -msgstr "用冒号分隔的文本文件 (CSV)" - -#: src/merge-init.c:67 -msgid "Text file with tab delimeters" -msgstr "用制表符分隔的文本文件 (CSV)" - -#: ../src/merge-init.c:82 -msgid "Data from default Evolution Addressbook" -msgstr "从Evolution导出的通迅录" - -#: ../src/merge-init.c:88 -msgid "Data from a file containing VCards" -msgstr "从VCards文件导出的数据" - -#: ../src/merge-evolution.c:309 -msgid "Couldn't construct query" -msgstr "不能查询数据组" - -#: ../src/merge-evolution.c:315 ../src/merge-evolution.c:326 -msgid "Couldn't open addressbook." -msgstr "不能打开通迅录" - -#: ../src/merge-evolution.c:341 -msgid "Couldn't list available fields." -msgstr "无法显示有效区域。" - -#: ../src/merge-evolution.c:377 -msgid "Couldn't get contacts." -msgstr "无法读取通迅录信息。" - -#: ../src/color-combo.c:210 -msgid "Default Color" -msgstr "默认颜色" - -#: ../src/color-combo-menu.c:86 -msgid "Dark Red" -msgstr "暗红" - -#: ../src/color-combo-menu.c:87 -msgid "Brown" -msgstr "棕色" - -#: ../src/color-combo-menu.c:88 -msgid "Dark Goldenrod" -msgstr "暗黄" - -#: ../src/color-combo-menu.c:89 -msgid "Dark Green" -msgstr "暗绿" - -#: ../src/color-combo-menu.c:90 -msgid "Dark Cyan" -msgstr "暗品红" - -#: ../src/color-combo-menu.c:91 -msgid "Navy Blue" -msgstr "海水蓝" - -#: ../src/color-combo-menu.c:92 -msgid "Dark Violet" -msgstr "紫黑" - -#: ../src/color-combo-menu.c:94 -msgid "Red" -msgstr "红色" - -#: ../src/color-combo-menu.c:95 -msgid "Orange" -msgstr "桔红" - -#: ../src/color-combo-menu.c:96 -msgid "Dark Yellow" -msgstr "暗黄" - -#: ../src/color-combo-menu.c:97 -msgid "Medium green" -msgstr "中等绿" - -#: ../src/color-combo-menu.c:98 -msgid "Turquoise" -msgstr "蓝绿" - -#: ../src/color-combo-menu.c:99 -msgid "Blue" -msgstr "蓝色" - -#: ../src/color-combo-menu.c:100 -msgid "Purple" -msgstr "紫红" - -#: ../src/color-combo-menu.c:102 -msgid "Salmon" -msgstr "马哈鱼色" - -#: ../src/color-combo-menu.c:103 -msgid "Gold" -msgstr "金黄" - -#: ../src/color-combo-menu.c:104 -msgid "Yellow" -msgstr "黄色" - -#: ../src/color-combo-menu.c:105 -msgid "Green" -msgstr "绿色" - -#: ../src/color-combo-menu.c:106 -msgid "Cyan" -msgstr "蓝绿色" - -#: ../src/color-combo-menu.c:107 -msgid "SkyBlue" -msgstr "天空蓝" - -#: ../src/color-combo-menu.c:108 -msgid "Violet" -msgstr "紫色" - -#: ../src/color-combo-menu.c:110 -msgid "Pink" -msgstr "粉红" - -#: ../src/color-combo-menu.c:111 -msgid "Khaki" -msgstr "浅棕黄色" - -#: ../src/color-combo-menu.c:112 -msgid "Light Yellow" -msgstr "浅黄" - -#: ../src/color-combo-menu.c:113 -msgid "Light Green" -msgstr "浅绿" - -#: ../src/color-combo-menu.c:114 -msgid "Light Cyan" -msgstr "浅品红色" - -#: ../src/color-combo-menu.c:115 -msgid "Slate Gray" -msgstr "石灰白" - -#: ../src/color-combo-menu.c:116 -msgid "Thistle" -msgstr "" - -#: ../src/color-combo-menu.c:118 -msgid "White" -msgstr "白色" - -#: ../src/color-combo-menu.c:119 -#, c-format -msgid "10% Gray" -msgstr "10% 灰色" - -#: ../src/color-combo-menu.c:120 -#, c-format -msgid "25% Gray" -msgstr "25% 灰色" - -#: ../src/color-combo-menu.c:121 -#, c-format -msgid "40% Gray" -msgstr "40% 灰色" - -#: ../src/color-combo-menu.c:122 -#, c-format -msgid "50% Gray" -msgstr "50% 灰色" - -#: ../src/color-combo-menu.c:123 -#, c-format -msgid "60% Gray" -msgstr "60% 灰色" - -#: ../src/color-combo-menu.c:124 -msgid "Black" -msgstr "黑色" - -#: ../src/color-combo-menu.c:252 ../src/color-combo-menu.c:369 -msgid "Custom Color" -msgstr "自定义颜色" - -#: ../src/color-combo-menu.c:317 -#, c-format -msgid "Custom Color #%u" -msgstr "自定义颜色 #%u" - -#: ../src/wdgt-print-copies.c:153 -msgid "Sheets:" -msgstr "页码:" - -#: ../src/wdgt-print-copies.c:173 -msgid "from:" -msgstr "从:" - -#: ../src/wdgt-print-copies.c:179 -msgid "to:" -msgstr "到:" - -#: ../src/wdgt-print-merge.c:154 -msgid "Start on label" -msgstr "启动后直接打开标签" - -#: ../src/wdgt-print-merge.c:161 -msgid "on 1st sheet" -msgstr "在第1页" - -#: ../src/wdgt-print-merge.c:170 -msgid "Copies:" -msgstr "副本" - -#: ../src/wdgt-print-merge.c:176 -msgid "Collate" -msgstr "集合" - -#: ../src/wdgt-media-select.c:290 ../src/wdgt-media-select.c:294 -#: ../src/wdgt-media-select.c:299 ../src/wdgt-media-select.c:308 -#: ../src/wdgt-media-select.c:311 ../src/wdgt-media-select.c:404 -#: ../src/wdgt-media-select.c:611 ../src/wdgt-media-select.c:620 -msgid "Any" -msgstr "通用" - -#: ../src/wdgt-media-select.c:645 -#, c-format -msgid "%d per sheet" -msgstr "每页 %d" - -#: ../src/wdgt-media-select.c:675 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: ../src/wdgt-media-select.c:680 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: ../src/wdgt-media-select.c:691 ../src/wdgt-media-select.c:705 -#, c-format -msgid "%s %s diameter" -msgstr "%s %s 直径" - -#: ../src/wdgt-media-select.c:695 ../src/wdgt-media-select.c:709 -#, c-format -msgid "%.5g %s diameter" -msgstr "%.5g %s 直径" - -#: ../src/wdgt-media-select.c:783 -msgid "No recent templates found." -msgstr "最近没有使用模板。" - -#: ../src/wdgt-media-select.c:784 -msgid "Try selecting a template from the \"Search all templates\" page." -msgstr "请从 \"查找全部模板\" 页面中选择一个模板。" - -#: ../src/wdgt-media-select.c:863 -msgid "No match." -msgstr "不相符。" - -#: ../src/wdgt-media-select.c:864 -msgid "Try selecting a different brand, page size or category." -msgstr "请选择其它品牌,纸张尺寸或类型。" - -#: ../src/wdgt-rotate-label.c:129 -msgid "Normal" -msgstr "正常" - -#: ../src/wdgt-rotate-label.c:130 -msgid "Rotated" -msgstr "旋转" - -#: ../src/critical-error-handler.c:73 -msgid "gLabels Fatal Error!" -msgstr "gLabels出现严重错误!" - -#: ../src/warning-handler.c:73 -msgid "gLabels Error!" -msgstr "gLabels错误!" - -#. Create and append an "Other" entry. -#: ../libglabels/db.c:118 -msgid "Other" -msgstr "其它" - -#. Create and append a "User defined" entry. -#: ../libglabels/db.c:131 -msgid "User defined" -msgstr "自定义的" - -#: ../libglabels/db.c:482 -msgid "" -"Unable to locate paper size definitions. Libglabels may not be installed " -"correctly!" -msgstr "找不到纸张尺寸定义文件。可能是glabels的库文件没有正确安装。" - -#: ../libglabels/db.c:875 -msgid "" -"Unable to locate category definitions. Libglabels may not be installed " -"correctly!" -msgstr "" -"找不到类型定义文件。可能是glabels的库文件没有正确安装。" - -#: ../libglabels/db.c:1461 -msgid "" -"Unable to locate any template files. Libglabels may not be installed " -"correctly!" -msgstr "" -"找不到模板文件。可能是glabels的库文件没有正确安装。" - -#: ../libglabels/db.c:1538 -#, c-format -msgid "Generic %s full page template" -msgstr "普通的整页模板 %s" - -#: ../libglabels/xml-template.c:227 -msgid "Missing name or brand/part attributes." -msgstr "名称或品牌/规格 属性不完整。" - -#. This should always be an id, but just in case a name -#. slips by! -#: ../libglabels/xml-template.c:244 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "未知的纸张大小id \"%s\",请试着用纸张规格" - -#: src/xml-label-191.c:690 libglabels/xml-template.c:209 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "未知的纸张大小id或规格 \"%s\"" - -#: ../libglabels/xml-template.c:615 -msgid "" -"Missing required \"brand\" or \"part\" attribute, trying deprecated name." -msgstr "" -"\"品牌\" 或者 \"规格\" 属性不完整,请尝试改变字母大小写。" - -#: ../libglabels/xml-template.c:625 -msgid "Name attribute also missing." -msgstr "名称属性也不完整。" - -#: ../data/builder/merge-properties-dialog.glade.h:1 -msgid "Record selection/preview" -msgstr "记录选择/预览" - -#: ../data/builder/merge-properties-dialog.glade.h:2 -msgid "Source" -msgstr "来源" - -#: ../data/builder/merge-properties-dialog.glade.h:3 -msgid "Format:" -msgstr "格式:" - -#: ../data/builder/merge-properties-dialog.glade.h:4 -msgid "Location:" -msgstr "位置:" - -#: ../data/builder/merge-properties-dialog.glade.h:5 -msgid "Select all" -msgstr "全选" - -#: ../data/builder/merge-properties-dialog.glade.h:6 -msgid "Unselect all" -msgstr "取消全选" - -#: ../data/builder/merge-properties-dialog.glade.h:7 -#: ../data/builder/object-editor.glade.h:39 -msgid "dialog1" -msgstr "对话框1" - -#: ../data/builder/new-label-dialog.glade.h:1 -msgid "Label orientation" -msgstr "标签方向" - -#: ../data/builder/new-label-dialog.glade.h:2 -msgid "Media type" -msgstr "介质类型" - -#: ../data/builder/object-editor.glade.h:2 -#, no-c-format -msgid "%" -msgstr "%" - -#: ../data/builder/object-editor.glade.h:3 -msgid "00000000000 00000" -msgstr "00000000000 00000" - -#: ../data/builder/object-editor.glade.h:4 -msgid "Xxx object properties" -msgstr "Xxx对象属性" - -#: ../data/builder/object-editor.glade.h:5 -#: ../data/builder/prefs-dialog.glade.h:7 -msgid "Alignment:" -msgstr "对齐:" - -#: ../data/builder/object-editor.glade.h:6 -msgid "Allow merge to automatically shrink text" -msgstr "自动调整和缩放文字" - -#: ../data/builder/object-editor.glade.h:7 -msgid "Angle:" -msgstr "角度:" - -#: ../data/builder/object-editor.glade.h:8 -msgid "Checksum" -msgstr "校验值" - -#: ../data/builder/object-editor.glade.h:9 -#: ../data/builder/prefs-dialog.glade.h:8 -msgid "Color:" -msgstr "颜色:" - -#: ../data/builder/object-editor.glade.h:11 -msgid "Enable shadow" -msgstr "使用阴影" - -#: ../data/builder/object-editor.glade.h:12 -msgid "Family:" -msgstr "系列:" - -#: ../data/builder/object-editor.glade.h:13 -msgid "File:" -msgstr "文件:" - -#: ../data/builder/object-editor.glade.h:14 -msgid "Fill" -msgstr "填充" - -#: ../data/builder/object-editor.glade.h:15 -#: ../data/builder/template-designer.glade.h:30 -msgid "Height:" -msgstr "高度:" - -#: ../data/builder/object-editor.glade.h:17 -msgid "Insert merge field" -msgstr "插入合并区域" - -#: ../data/builder/object-editor.glade.h:18 -msgid "Key:" -msgstr "键值:" - -#: ../data/builder/object-editor.glade.h:19 -msgid "Length:" -msgstr "长度:" - -#: ../data/builder/object-editor.glade.h:21 -#: ../data/builder/prefs-dialog.glade.h:12 -msgid "Line Spacing:" -msgstr "线条间隔:" - -#: ../data/builder/object-editor.glade.h:22 -msgid "Literal:" -msgstr "文字:" - -#: ../data/builder/object-editor.glade.h:23 -msgid "Opacity:" -msgstr "不透明:" - -#: ../data/builder/object-editor.glade.h:24 -msgid "Position" -msgstr "位置" - -#: ../data/builder/object-editor.glade.h:25 -msgid "Reset image size" -msgstr "恢复图片大小" - -#: ../data/builder/object-editor.glade.h:26 -msgid "Select A File" -msgstr "选择一个文件" - -#: ../data/builder/object-editor.glade.h:27 -msgid "Shadow" -msgstr "阴影" - -#: ../data/builder/object-editor.glade.h:28 -msgid "Size" -msgstr "尺寸" - -#: ../data/builder/object-editor.glade.h:29 -msgid "Size:" -msgstr "尺寸:" - -#: ../data/builder/object-editor.glade.h:30 -msgid "Style" -msgstr "规格" - -#: ../data/builder/object-editor.glade.h:31 -msgid "Style:" -msgstr "规格:" - -#: ../data/builder/object-editor.glade.h:33 -#: ../data/builder/prefs-dialog.glade.h:20 -#: ../data/builder/template-designer.glade.h:61 -msgid "Width:" -msgstr "宽度:" - -#: ../data/builder/object-editor.glade.h:34 -msgid "X Offset:" -msgstr "X 偏移量:" - -#: ../data/builder/object-editor.glade.h:35 -msgid "X:" -msgstr "X:" - -#: ../data/builder/object-editor.glade.h:36 -msgid "Y Offset:" -msgstr "Y 偏移量:" - -#: ../data/builder/object-editor.glade.h:37 -msgid "Y:" -msgstr "Y:" - -#: ../data/builder/object-editor.glade.h:38 -msgid "degrees" -msgstr "度数" - -#: ../data/builder/object-editor.glade.h:40 -msgid "digits:" -msgstr "数字位数:" - -#: ../data/builder/object-editor.glade.h:41 -msgid "format:" -msgstr "格式:" - -#: ../data/builder/prefs-dialog.glade.h:1 -msgid " " -msgstr " " - -#: ../data/builder/prefs-dialog.glade.h:2 -msgid "Default page size" -msgstr "默认纸张尺寸" - -#: ../data/builder/prefs-dialog.glade.h:3 -msgid "Fill" -msgstr "填充" - -#: ../data/builder/prefs-dialog.glade.h:4 -msgid "Line" -msgstr "线条" - -#: ../data/builder/prefs-dialog.glade.h:5 -msgid "Text" -msgstr "文字" - -#: ../data/builder/prefs-dialog.glade.h:6 -msgid "Units" -msgstr "单位" - -#: ../data/builder/prefs-dialog.glade.h:9 -msgid "Font:" -msgstr "字体:" - -#: ../data/builder/prefs-dialog.glade.h:10 -msgid "ISO A4" -msgstr "" - -#: ../data/builder/prefs-dialog.glade.h:11 -msgid "Inches" -msgstr "英寸" - -#: ../data/builder/prefs-dialog.glade.h:13 -msgid "Locale" -msgstr "本地化" - -#: ../data/builder/prefs-dialog.glade.h:14 -msgid "Millimeters" -msgstr "毫米" - -#: ../data/builder/prefs-dialog.glade.h:15 -msgid "Object defaults" -msgstr "对象默认值" - -#: ../data/builder/prefs-dialog.glade.h:16 -msgid "Points" -msgstr "像素" - -#: ../data/builder/prefs-dialog.glade.h:17 -msgid "Select default properties for new objects." -msgstr "为新对象选择默认属性" - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "本地化设置" - -#. Most popular (at top of list) -#: ../data/builder/prefs-dialog.glade.h:19 -#: ../data/templates/paper-sizes.xml.h:29 -msgid "US Letter" -msgstr "美国信封" - -#: ../data/builder/print-custom-widget.glade.h:1 -msgid "Options" -msgstr "选项" - -#: ../data/builder/print-custom-widget.glade.h:2 -msgid "Print control (Merge)" -msgstr "打印控制(合并)" - -#: ../data/builder/print-custom-widget.glade.h:3 -msgid "Print control (Simple)" -msgstr "打印控制(简单)" - -#: ../data/builder/property-bar.glade.h:1 -msgid "Bold" -msgstr "粗体" - -#: ../data/builder/property-bar.glade.h:2 -msgid "Center align" -msgstr "中心对齐" - -#: ../data/builder/property-bar.glade.h:4 -msgid "Font family" -msgstr "字体系列" - -#: ../data/builder/property-bar.glade.h:5 -msgid "Font size" -msgstr "字体大小" - -#: ../data/builder/property-bar.glade.h:6 -msgid "Italic" -msgstr "斜体" - -#: ../data/builder/property-bar.glade.h:7 -msgid "Left align" -msgstr "左对齐" - -#: ../data/builder/property-bar.glade.h:9 -msgid "Line width" -msgstr "线宽" - -#: ../data/builder/property-bar.glade.h:10 -msgid "Right align" -msgstr "右对齐" - -#: ../data/builder/property-bar.glade.h:11 -msgid "Text Color" -msgstr "文字颜色" - -#: ../data/builder/template-designer.glade.h:1 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "(例如:信封标签,名片...)" - -#: ../data/builder/template-designer.glade.h:2 -msgid "(e.g., 8163A)" -msgstr "(例如:8163A)" - -#: ../data/builder/template-designer.glade.h:3 -msgid "(e.g., Avery, Acme, ...)" -msgstr "(例如:Avery, Acme, ...)" - -#: ../data/builder/template-designer.glade.h:4 -msgid "1. Outer radius:" -msgstr "1. 外半径:" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "1. 半径:" - -#: data/glade/template-designer.glade.h:8 -msgid "1. Width:" -msgstr "1. 宽度:" - -#: data/glade/template-designer.glade.h:9 -msgid "2. Height:" -msgstr "2. 高度:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "2. 内半径:" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "2. 余量(允许叠印):" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "3. 限宽:" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "3. 页边" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "3. 环绕 (半径):" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "4. 限高:" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "4. 水平余量(允许叠印):" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "5. 垂直余量(允许叠印):" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "5. 余量(允许叠印):" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "6. 页边" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "品牌/制造商:" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "CD/DVD (包括信用卡CD)" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" -"祝贺你!\n" -"\n" -"模板设计已完成。\n" -"点击 \"应用\"来进行确认和保存。\n" -"\n" -"否则请点击 \"取消\" 来放弃设计,\n" -"或者点击 \"后退\" 继续设计。" - -#: ../data/builder/template-designer.glade.h:27 -msgid "Description:" -msgstr "说明:" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "到左边界的距离 (x0):" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "到上边界的距离 (y0):" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "水平栅距 (dx):" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" -"模板包含多少个布局? \n" -"\n" -"“层” 可以把多个标签或名片方便地排列到一个简单的小格子里。\n" -"绝大多数模板只需要1个布局,如第1个例子所示。\n" -"第2个图例说明了需要2个布局的例子。" - -#: ../data/builder/template-designer.glade.h:37 -msgid "Layout #1" -msgstr "布局 #1" - -#: data/glade/template-designer.glade.h:45 -msgid "Layout #2" -msgstr "布局 #2" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "数字交叉 (nx):" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "数字向下 (ny):" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "布局个数:" - -#: data/glade/template-designer.glade.h:52 -msgid "Page size:" -msgstr "纸张大小" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "规格 #:" - -#: ../data/builder/template-designer.glade.h:44 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "请输入模板的备注信息。" - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "请输入下面的布局数据。" - -#: data/glade/template-designer.glade.h:57 -msgid "" -"Please enter the following size parameters of a single label in your template." -msgstr "请在模板里输入单个标签的尺寸数据。" - -#: ../data/builder/template-designer.glade.h:47 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" -"请在模板里输入单个标签或名片的尺寸数据。" - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "请选择标签或名片的基本形状。" - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "请选择模板所采用的纸张大小。" - -#: data/glade/template-designer.glade.h:61 -msgid "Print test sheet" -msgstr "打印测试页" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "长方形或正方形(可以倒圆角)" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "圆形" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" -"模板需要\n" -"2个布局 " - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" -"模板需要\n" -"1个布局 " - -#: ../data/builder/template-designer.glade.h:57 -msgid "Vertical pitch (dy):" -msgstr "垂直栅距 (dy):" - -#: ../data/builder/template-designer.glade.h:58 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" -"欢迎使用 gLabels 模板设计工具。\n" -"\n" -"请参照下面的步骤来制作一个你需要的 gLabels 模板。" - -#: ../data/builder/template-designer.glade.h:62 -msgid "cd_size_page" -msgstr "光盘尺寸" - -#: ../data/builder/template-designer.glade.h:63 -msgid "finish_page" -msgstr "完成" - -#: ../data/builder/template-designer.glade.h:65 -msgid "layout_page" -msgstr "布局" - -#: ../data/builder/template-designer.glade.h:66 -msgid "name_page" -msgstr "名称" - -#: ../data/builder/template-designer.glade.h:67 -msgid "nlayouts_page" -msgstr "多层布局" - -#: ../data/builder/template-designer.glade.h:68 -msgid "pg_size_page" -msgstr "纸张大小" - -#: ../data/builder/template-designer.glade.h:69 -msgid "rect_size_page" -msgstr "矩形尺寸" - -#: ../data/builder/template-designer.glade.h:70 -msgid "round_size_page" -msgstr "圆形尺寸" - -#: ../data/builder/template-designer.glade.h:71 -msgid "shape_page" -msgstr "形状" - -#: ../data/builder/template-designer.glade.h:72 -msgid "start_page" -msgstr "起始页" - -#: ../data/builder/wdgt-media-select.glade.h:1 -msgid "Brand:" -msgstr "品牌:" - -#: ../data/builder/wdgt-media-select.glade.h:2 -msgid "Category:" -msgstr "类型:" - -#: ../data/builder/wdgt-media-select.glade.h:4 -msgid "Recent templates" -msgstr "最近的模板" - -#: ../data/builder/wdgt-media-select.glade.h:5 -msgid "Search all templates" -msgstr "查找全部模板" - -#. Other ISO A series sizes -#: ../data/templates/paper-sizes.xml.h:2 -msgid "A0" -msgstr "A0" - -#: ../data/templates/paper-sizes.xml.h:3 -msgid "A1" -msgstr "A1" - -#: ../data/templates/paper-sizes.xml.h:4 -msgid "A10" -msgstr "A10" - -#: ../data/templates/paper-sizes.xml.h:5 -msgid "A2" -msgstr "A2" - -#: ../data/templates/paper-sizes.xml.h:6 -msgid "A3" -msgstr "A3" - -#: ../data/templates/paper-sizes.xml.h:7 -msgid "A4" -msgstr "A4" - -#: ../data/templates/paper-sizes.xml.h:8 -msgid "A5" -msgstr "A5" - -#: ../data/templates/paper-sizes.xml.h:9 -msgid "A6" -msgstr "A6" - -#: ../data/templates/paper-sizes.xml.h:10 -msgid "A7" -msgstr "A7" - -#: ../data/templates/paper-sizes.xml.h:11 -msgid "A8" -msgstr "A8" - -#: ../data/templates/paper-sizes.xml.h:12 -msgid "A9" -msgstr "A9" - -#. ISO B series sizes -#: ../data/templates/paper-sizes.xml.h:14 -msgid "B0" -msgstr "B0" - -#: ../data/templates/paper-sizes.xml.h:15 -msgid "B1" -msgstr "B1" - -#: ../data/templates/paper-sizes.xml.h:16 -msgid "B10" -msgstr "B10" - -#: ../data/templates/paper-sizes.xml.h:17 -msgid "B2" -msgstr "B2" - -#: ../data/templates/paper-sizes.xml.h:18 -msgid "B3" -msgstr "B3" - -#: ../data/templates/paper-sizes.xml.h:19 -msgid "B4" -msgstr "B4" - -#: ../data/templates/paper-sizes.xml.h:20 -msgid "B5" -msgstr "B5" - -#: ../data/templates/paper-sizes.xml.h:21 -msgid "B6" -msgstr "B6" - -#: ../data/templates/paper-sizes.xml.h:22 -msgid "B7" -msgstr "B7" - -#: ../data/templates/paper-sizes.xml.h:23 -msgid "B8" -msgstr "B8" - -#: ../data/templates/paper-sizes.xml.h:24 -msgid "B9" -msgstr "B9" -#: data/templates/paper-sizes.xml.h:25 -msgid "US Executive" -msgstr "美国常用" - -#. Other US paper sizes -#: data/templates/paper-sizes.xml.h:27 -msgid "US Legal" -msgstr "美国国标" - -#: ../data/templates/categories.xml.h:1 -msgid "Any card" -msgstr "通用名片" - -#: ../data/templates/categories.xml.h:2 -msgid "Any label" -msgstr "通用标签" - -#: ../data/templates/categories.xml.h:3 -msgid "Business cards" -msgstr "名片" - -#: ../data/templates/categories.xml.h:4 -msgid "CD/DVD or other media" -msgstr "CD/DVD 或其它光盘" - -#: ../data/templates/categories.xml.h:5 -msgid "Mailing/shipping products" -msgstr "信件/快递包裹" - -#: ../data/templates/categories.xml.h:6 -msgid "Rectangular labels" -msgstr "长方形标签" - -#: ../data/templates/categories.xml.h:7 -msgid "Round labels" -msgstr "圆形标签" - -#: ../data/templates/categories.xml.h:8 -msgid "Square labels" -msgstr "正方形标签" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:2 -#: ../data/templates/avery-iso-templates.xml.h:2 -#: ../data/templates/dymo-other-templates.xml.h:4 -#: ../data/templates/misc-iso-templates.xml.h:2 -#: ../data/templates/zweckform-iso-templates.xml.h:2 -msgid "Address Labels" -msgstr "通迅录标签" - -#. =================================================================== -#. ============================================================ -#. =================================================================== -#. ******************************************************************** -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:4 -#: ../data/templates/avery-iso-templates.xml.h:8 -#: ../data/templates/misc-us-templates.xml.h:4 -#: ../data/templates/misc-iso-templates.xml.h:12 -#: ../data/templates/zweckform-iso-templates.xml.h:6 -msgid "Business Cards" -msgstr "名片" - -#. =================================================================== -#. =============================================================== -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:6 -#: ../data/templates/avery-iso-templates.xml.h:14 -#: ../data/templates/misc-us-templates.xml.h:8 -#: ../data/templates/misc-iso-templates.xml.h:16 -#: ../data/templates/zweckform-iso-templates.xml.h:8 -msgid "CD/DVD Labels" -msgstr "CD/DVD 光盘标签" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:8 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "CD/DVD 光盘标签(光盘盘面)" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:10 -msgid "CD/DVD Labels (Spine Labels)" -msgstr "CD/DVD 光盘标签(光盘盒内衬纸)" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:12 -#: ../data/templates/avery-iso-templates.xml.h:16 -msgid "Diskette Labels" -msgstr "软盘标签" - -#. the LSK labels can be torn in half down the center -#: ../data/templates/avery-us-templates.xml.h:14 -msgid "Divider Labels" -msgstr "分隔标签" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:9 -msgid "Filing Labels" -msgstr "档案标签" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:11 -msgid "Full Sheet Labels" -msgstr "整页标签" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:20 -msgid "ID Labels" -msgstr "编号卡片" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:22 -msgid "Index Cards" -msgstr "索引卡片" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:24 -msgid "Large Round Labels" -msgstr "大圆标签" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:15 -msgid "Name Badge Labels" -msgstr "铭牌标签" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:28 -msgid "Post cards" -msgstr "贺卡/明信片" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:17 -msgid "Return Address Labels" -msgstr "退回地址标签" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:32 -msgid "Round Labels" -msgstr "圆标签" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:34 -msgid "Shipping Labels" -msgstr "物流标签" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:21 -msgid "Small Round Labels" -msgstr "小圆标签" - -#. =================================================================== -#: data/templates/avery-us-templates.xml.h:23 -msgid "Square Labels" -msgstr "正方形标签" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:40 -msgid "Tent Cards" -msgstr "夹纸条" - -#. =================================================================== -#: ../data/templates/avery-us-templates.xml.h:42 -msgid "Video Tape Face Labels" -msgstr "录像带正面标签" - -#: data/templates/avery-us-templates.xml.h:25 -msgid "Video Tape Spine Labels" -msgstr "录像带背面标签" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:2 -msgid "Address labels" -msgstr "通迅录标签" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:6 -msgid "Allround labels" -msgstr "通用标签" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:6 -msgid "CD Booklet" -msgstr "CD集标签" - -#. =============================================================== -#: data/templates/avery-iso-templates.xml.h:8 -msgid "CD Inlet" -msgstr "CD单盒" - -#. =================================================================== -#: ../data/templates/avery-iso-templates.xml.h:18 -msgid "Diskette labels" -msgstr "软盘标签" - -#. =============================================================== -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:14 -#: data/templates/zweckform-iso-templates.xml.h:14 -#: data/templates/misc-iso-templates.xml.h:35 -msgid "Mailing Labels" -msgstr "信封标签" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:16 -msgid "Mailing labels" -msgstr "信封标签" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:18 -msgid "Mini Address Labels" -msgstr "地址标签" - -#. =================================================================== -#: data/templates/avery-iso-templates.xml.h:20 -msgid "Shipping labels" -msgstr "物流标签" - -#. =================================================================== -#: ../data/templates/avery-other-templates.xml.h:2 -msgid "File Folder Labels" -msgstr "文件夹标签" - -#: ../data/templates/brother-other-templates.xml.h:1 -msgid "Multi Purpose Labels 17mm x 54mm" -msgstr "多用途标签 17mm x 54mm" - -#: ../data/templates/brother-other-templates.xml.h:2 -msgid "Shipping Labels 62mm x 100mm" -msgstr "物流标签 62mm x 100mm" - -#. -#. ********************************************************************* -#. ********************************************************************* -#. Labels for the Brother QL-500/550/650 PC Label Printers -#. -#. These templates work with the Brother Linux Printer CUPS Driver. It -#. is unknown if these work correctly with the foomatic print driver for -#. these printers. -#. -#. One difference from typical templates is that the template size is -#. not the actual media size - it is the size of the printable area, -#. which is smaller than the media size. This is because (at least with -#. the Brother driver) coordinates are relative the corner of this area. -#. -#. ********************************************************************* -#. ********************************************************************* -#. -#: ../data/templates/brother-other-templates.xml.h:20 -msgid "Standard Address Labels 29mm x 90mm" -msgstr "标准通迅录 29mm x 90mm" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:2 -msgid "3.5in Diskette" -msgstr "3.5英寸软盘" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:6 -msgid "File Folder" -msgstr "文件夹" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:8 -msgid "Hanging Folder" -msgstr "挂起的公文夹" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:10 -msgid "Large Address Labels" -msgstr "大地址标签" - -#. =================================================================== -#: ../data/templates/dymo-other-templates.xml.h:14 -msgid "Shipping Address Labels" -msgstr "物流地址标签" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:2 -msgid "Business Card CD" -msgstr "名片CD" - -#. =================================================================== -#: ../data/templates/misc-us-templates.xml.h:6 -msgid "CD Template Rectangles" -msgstr "CD方盒 (方形外包装)" -msgid "CD/DVD Labels (Face Only)" -msgstr "CD/DVD光盘贴纸(盘面)" - - -#: data/templates/misc-us-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:23 -msgid "CD/DVD Labels (face only)" -msgstr "CD/DVD光盘贴纸(盘面)" - - -#: data/templates/misc-us-templates.xml.h:9 -msgid "Cassette Labels" -msgstr "磁带盒标签" - - -#: data/templates/misc-us-templates.xml.h:11 -msgid "DLT Labels" -msgstr "DLT标签" - - -#: data/templates/misc-us-templates.xml.h:13 -msgid "Microtube labels" -msgstr "细管标签" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Mini-CD Labels" -msgstr "微型CD的标签" - -#: data/templates/misc-us-templates.xml.h:15 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "超级CD标签 2-向上(光盘盘面)" - -#: data/templates/misc-us-templates.xml.h:16 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "超级CD标签 2-向上(封面)" - -#: data/templates/misc-us-templates.xml.h:17 -#: data/templates/misc-iso-templates.xml.h:42 -msgid "PRO CD Labels 2-up (face only)" -msgstr "超级CD标签 2-向上(封面)" - -#: data/templates/misc-us-templates.xml.h:13 -msgid "Slimline CD Case (rightside up)" -msgstr "CD收集盒(右侧在上)" - -#: data/templates/misc-us-templates.xml.h:19 -msgid "Slimline CD Case (upside down)" -msgstr "CD收集盒(盖子在下)" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:4 -#: ../data/templates/zweckform-iso-templates.xml.h:4 -msgid "Allround Labels" -msgstr "通用标签" - -#: data/templates/misc-iso-templates.xml.h:11 -msgid "Arch File Labels" -msgstr "档案标签" - -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Arch File Labels (large)" -msgstr "档案标签(大)" - -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Arch File Labels (small)" -msgstr "档案标签(小)" - -#: data/templates/misc-iso-templates.xml.h:19 -msgid "CD Labels" -msgstr "CD标签" - -#: data/templates/misc-iso-templates.xml.h:25 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "CD/DVD光盘贴纸标准格式(正面)" - -#: data/templates/misc-iso-templates.xml.h:27 -msgid "Diskette Labels (face only)" -msgstr "软盘标签 (封面)" - -#: data/templates/misc-iso-templates.xml.h:29 -msgid "EPSON Photo Stickers 16" -msgstr "爱普生(EPSON)相片纸" - -#: data/templates/misc-iso-templates.xml.h:31 -msgid "Etiketten" -msgstr "包装标签" - -#: data/templates/misc-iso-templates.xml.h:33 -msgid "Fridge Magnet Stickers" -msgstr "冰箱贴纸" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:30 -msgid "General Labels" -msgstr "通用标签" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:32 -msgid "Inkjet/Laser Labels 70x37mm" -msgstr "喷墨/激光打印纸 70x37mm" - -#. =================================================================== -#: data/templates/misc-iso-templates.xml.h:37 -msgid "Mailing Labels --14" -msgstr "信封标签 --14" - -#: data/templates/misc-iso-templates.xml.h:39 -msgid "Mailing Labels-2 columns" -msgstr "信封标签-2栏" - -#: data/templates/misc-iso-templates.xml.h:41 -msgid "Mailing Labels-3 columns" -msgstr "信封标签-3栏" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:44 -#: ../data/templates/zweckform-iso-templates.xml.h:24 -msgid "Rectangular Labels" -msgstr "长方形标签" - -#. =================================================================== -#: ../data/templates/misc-iso-templates.xml.h:46 -msgid "Video Labels (face only)" -msgstr "录像带标签(正面)" - -#. =================================================================== -#: ../data/templates/misc-other-templates.xml.h:2 -msgid "Multi-Purpose Labels" -msgstr "多用途标签" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:10 -msgid "Correction and Cover-up Labels" -msgstr "改错贴纸标签" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:12 -msgid "File Back Labels" -msgstr "文件备案标签" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:14 -msgid "Lever Arch File Labels" -msgstr "装订档案标签" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:18 -msgid "Multi-purpose Stick+Lift Labels" -msgstr "多用途 易事贴" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:20 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "" - -#. =================================================================== -#: data/templates/zweckform-iso-templates.xml.h:18 -msgid "Rectangular Copier Labels" -msgstr "长方形复写标签" - -#. =================================================================== -#: ../data/templates/zweckform-iso-templates.xml.h:26 -msgid "Video Labels (back)" -msgstr "录像带标签(背面)" - -#. =================================================================== -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers" -msgstr "制作标签,名片和光盘盒封面" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "gLabels标签设计工具" - -#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 -msgid "gLabels Project File" -msgstr "gLabels工程文件" - -#: ../barcode-0.98/compat/getopt.c:583 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "%s: 选项 `%s' 有歧义\n" - -#: ../barcode-0.98/compat/getopt.c:607 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "%s: 选项 `--%s' 不支持附加参数\n" - -#: ../barcode-0.98/compat/getopt.c:612 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "%s: 选项 `%c%s' 不支持附加参数\n" - -#: ../barcode-0.98/compat/getopt.c:629 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "%s: 选项 `%s' 需要附加参数\n" - -#. --option -#: ../barcode-0.98/compat/getopt.c:658 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "%s: 未知的选项 '--%s'\n" - -#. +option or -option -#: ../barcode-0.98/compat/getopt.c:662 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "%s: 未知的选项 `%c%s'\n" - -#. 1003.2 specifies the format of this message. -#: ../barcode-0.98/compat/getopt.c:688 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "%s: 非法的选项 -- %c\n" - -#: ../barcode-0.98/compat/getopt.c:691 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "%s: 无效的选项 -- %c\n" - -#: ../barcode-0.98/compat/getopt.c:727 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "%s: 选项需要附加参数 -- %c\n" \ No newline at end of file diff --git a/glabels2/po/zh_TW.Big5.po b/glabels2/po/zh_TW.Big5.po deleted file mode 100644 index 485e1ccc..00000000 --- a/glabels2/po/zh_TW.Big5.po +++ /dev/null @@ -1,2650 +0,0 @@ -# Traditional Chinese Translation for glabels -# Copyright (C) 2002 Free Software Foundation, Inc. -# Shell Hung , 2002 -# -msgid "" -msgstr "" -"Project-Id-Version: glabels 0.4.4\n" -"POT-Creation-Date: 2004-08-08 00:43-0400\n" -"PO-Revision-Date: 2002-07-14 18:30+0800\n" -"Last-Translator: Shell Hung \n" -"Language-Team: zh-l10n \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=big5\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/glabels.c:55 -msgid "Show view debugging messages." -msgstr "" - -#: src/glabels.c:58 -msgid "Show item debugging messages." -msgstr "" - -#: src/glabels.c:61 -msgid "Show printing debugging messages." -msgstr "" - -#: src/glabels.c:64 -msgid "Show prefs debugging messages." -msgstr "" - -#: src/glabels.c:67 -msgid "Show file debugging messages." -msgstr "" - -#: src/glabels.c:70 -msgid "Show document debugging messages." -msgstr "" - -#: src/glabels.c:73 -msgid "Show template debugging messages." -msgstr "" - -#: src/glabels.c:76 -msgid "Show paper debugging messages." -msgstr "" - -#: src/glabels.c:79 -msgid "Show xml debugging messages." -msgstr "" - -#: src/glabels.c:82 -msgid "Show document merge debugging messages." -msgstr "" - -#: src/glabels.c:85 -msgid "Show commands debugging messages." -msgstr "" - -#: src/glabels.c:88 -msgid "Show undo debugging messages." -msgstr "" - -#: src/glabels.c:91 -msgid "Show recent debugging messages." -msgstr "" - -#: src/glabels.c:94 -msgid "Show window debugging messages." -msgstr "" - -#: src/glabels.c:97 -msgid "Show ui debugging messages." -msgstr "" - -#: src/glabels.c:100 -msgid "Show property_bar debugging messages." -msgstr "" - -#: src/glabels.c:103 -msgid "Show media select widget debugging messages." -msgstr "" - -#: src/glabels.c:106 -msgid "Show mini preview widget debugging messages." -msgstr "" - -#: src/glabels.c:109 -msgid "Show pixbuf cache debugging messages." -msgstr "" - -#: src/glabels.c:112 -msgid "Show widget debugging messages." -msgstr "" - -#: src/glabels.c:115 -msgid "Show object editor debugging messages." -msgstr "" - -#: src/glabels.c:118 -msgid "Turn on all debugging messages." -msgstr "" - -#: src/glabels.c:187 -msgid "Could not initialize Bonobo!\n" -msgstr "" - -#: src/glabels-batch.c:48 -msgid "print this message" -msgstr "¦C¦L³o­Ó°T®§" - -#: src/glabels-batch.c:50 -msgid "print the version of glabels-batch being used" -msgstr "¦C¦L¥X glabels-batch ªºª©¥»¸ê°T" - -#: src/glabels-batch.c:52 -msgid "set output filename (default=\"output.ps\")" -msgstr "³]©w¿é¥XÀɦWºÙ (¹w³]¬°\"output.ps\")" - -#: src/glabels-batch.c:52 -msgid "filename" -msgstr "ÀɮצWºÙ" - -#: src/glabels-batch.c:54 -msgid "number of sheets (default=1)" -msgstr "¯È±i¼Æ¥Ø (¹w³]¬° 1)" - -#: src/glabels-batch.c:54 -msgid "sheets" -msgstr "¯È±i" - -#: src/glabels-batch.c:56 -msgid "number of copies (default=1)" -msgstr "¥÷¼Æ (¹w³]¬° 1)" - -#: src/glabels-batch.c:56 -msgid "copies" -msgstr "¥÷¼Æ" - -#: src/glabels-batch.c:58 src/print-dialog.c:336 -msgid "print outlines (to test printer alignment)" -msgstr "¦L¥X¥~Ãä (´ú¸Õ¥´¦L¾÷°Ñ¼Æ)" - -#: src/glabels-batch.c:60 src/print-dialog.c:344 -msgid "print in reverse (i.e. a mirror image)" -msgstr "¤Ï¤è¦V¦C¦L (¦p­Ë¦V¼v¹³)" - -#: src/glabels-batch.c:96 -msgid "[OPTION...] GLABELS_FILE..." -msgstr "[¿ï¶µ...] GLABELS_FILE..." - -#: src/glabels-batch.c:116 -msgid "missing glabels file\n" -msgstr "¨S¦³¿é¤J glabels ªºÀÉ®×\n" - -#: src/glabels-batch.c:157 -#, c-format -msgid "cannot open glabels file %s\n" -msgstr "¶}±ÒÀÉ®×¥¢±Ñ %s\n" - -#: src/window.c:244 -msgid "(none) - gLabels" -msgstr "" - -#: src/window.c:414 -msgid "(modified)" -msgstr "" - -#: src/stock.c:65 data/ui/glabels-ui.xml.h:165 -#, fuzzy -msgid "_Select Mode" -msgstr "¿ï¾Ü" - -#: src/stock.c:66 data/ui/glabels-ui.xml.h:166 -#, fuzzy -msgid "_Text" -msgstr "¤å¦r" - -#: src/stock.c:67 data/ui/glabels-ui.xml.h:151 -#, fuzzy -msgid "_Line" -msgstr "½u" - -#: src/stock.c:68 data/ui/glabels-ui.xml.h:133 -#, fuzzy -msgid "_Box" -msgstr "²°¤l" - -#: src/stock.c:69 data/ui/glabels-ui.xml.h:144 -#, fuzzy -msgid "_Ellipse" -msgstr "¾ò¶ê§Î" - -#: src/stock.c:70 data/ui/glabels-ui.xml.h:149 -#, fuzzy -msgid "_Image" -msgstr "¹Ï¹³" - -#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 -#, fuzzy -msgid "Bar_code" -msgstr "¼Æ½X±ø" - -#: src/stock.c:72 -#, fuzzy -msgid "_Merge Properties" -msgstr "¦X¨Ö³]©w" - -#: src/stock.c:73 -#, fuzzy -msgid "Object _Properties" -msgstr "¤å¦r¼Ë»ª" - -#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 -#, fuzzy -msgid "Bring to _Front" -msgstr "±a¥X¨ì«e­±" - -#: src/stock.c:75 data/ui/glabels-ui.xml.h:110 -#, fuzzy -msgid "Send to _Back" -msgstr "©ñ¦b³Ì©³" - -#: src/stock.c:76 data/ui/glabels-ui.xml.h:97 -#, fuzzy -msgid "Rotate _Left" -msgstr "±ÛÂà" - -#: src/stock.c:77 data/ui/glabels-ui.xml.h:98 -#, fuzzy -msgid "Rotate _Right" -msgstr "±ÛÂà" - -#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 -msgid "Flip _Horizontally" -msgstr "" - -#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 -msgid "Flip _Vertically" -msgstr "" - -#: src/stock.c:80 data/ui/glabels-ui.xml.h:150 -msgid "_Lefts" -msgstr "" - -#: src/stock.c:81 data/ui/glabels-ui.xml.h:162 -msgid "_Rights" -msgstr "" - -#: src/stock.c:82 data/ui/glabels-ui.xml.h:134 -msgid "_Centers" -msgstr "" - -#: src/stock.c:83 data/ui/glabels-ui.xml.h:167 -#, fuzzy -msgid "_Tops" -msgstr "¤u¨ã (&_T)" - -#: src/stock.c:84 -msgid "Bottoms" -msgstr "" - -#: src/stock.c:85 -msgid "Centers" -msgstr "" - -#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 -msgid "Label Ce_nter" -msgstr "" - -#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 -msgid "Fill color" -msgstr "" - -#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 -msgid "Line color" -msgstr "" - -#: src/stock.c:90 src/stock.c:92 -#, fuzzy -msgid "Linked" -msgstr "½u" - -#: src/stock.c:91 src/stock.c:93 -#, fuzzy -msgid "Not Linked" -msgstr "¨S¦³" - -#: src/ui-property-bar.c:345 src/object-editor.c:499 -#, fuzzy -msgid "Default" -msgstr "§R°£" - -#: src/ui-property-bar.c:360 src/object-editor.c:512 -msgid "No fill" -msgstr "" - -#: src/ui-property-bar.c:375 src/object-editor.c:505 -#, fuzzy -msgid "No line" -msgstr "¨S¦³" - -#: src/ui-sidebar.c:180 -#, fuzzy -msgid "Object properties" -msgstr "¤å¦r¼Ë»ª" - -#: src/commands.c:385 -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/commands.c:399 -msgid "See the file AUTHORS for additional credits," -msgstr "" - -#: src/commands.c:400 -msgid "or visit http://glabels.sourceforge.net/" -msgstr "" - -#: src/commands.c:409 -msgid " " -msgstr "" - -#: src/commands.c:424 -#, fuzzy -msgid "glabels" -msgstr "¼Ðñ" - -#: src/file.c:100 -msgid "New Label or Card" -msgstr "·s¼W¼Ðñ©Î¥d" - -#: src/file.c:132 src/file.c:304 -msgid "Media Type" -msgstr "´CÅéºØÃþ" - -#: src/file.c:138 src/file.c:310 -msgid "Label orientation" -msgstr "¼Ðñ¤è¦V" - -#: src/file.c:269 -#, fuzzy -msgid "Label properties" -msgstr "¤å¦r¼Ë»ª" - -#: src/file.c:452 src/file.c:870 -msgid "All files" -msgstr "" - -#: src/file.c:457 src/file.c:875 -#, fuzzy -msgid "gLabels documents" -msgstr "Glabels: ³]©w­È" - -#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 -#, fuzzy -msgid "Empty file name selection" -msgstr "²¾°£©Ò¦³¿ï¾Ü¶µ" - -#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 -msgid "Please select a file or supply a valid file name" -msgstr "" - -#: src/file.c:519 src/file.c:631 -msgid "File does not exist" -msgstr "" - -#: src/file.c:563 data/ui/glabels-ui.xml.h:75 -msgid "Open" -msgstr "¶}±Ò" - -#: src/file.c:565 -msgid "Open label" -msgstr "¶}±Ò¼Ðñ" - -#: src/file.c:707 -#, fuzzy, c-format -msgid "Could not open file \"%s\"" -msgstr "¶}±ÒÀÉ®×¥¢±Ñ" - -#: src/file.c:715 -msgid "Not a supported file format" -msgstr "" - -#: src/file.c:797 src/file.c:979 src/file.c:1174 -#, fuzzy, c-format -msgid "Could not save file \"%s\"" -msgstr "¤£¯àÀx¦sÀÉ®×" - -#: src/file.c:805 src/file.c:987 src/file.c:1182 -msgid "Error encountered during save. The file is still not saved." -msgstr "" - -#: src/file.c:848 src/file.c:1048 -#, fuzzy, c-format -msgid "Save \"%s\" as" -msgstr "Àx¦s¼Ðñ¬°..." - -#: src/file.c:935 src/file.c:1131 -#, fuzzy -msgid "Please supply a valid file name" -msgstr "½Ð¥²»Ý¿é¤JÀɮצWºÙ" - -#: src/file.c:952 src/file.c:1147 -#, c-format -msgid "Overwrite file \"%s\"?" -msgstr "" - -#: src/file.c:960 src/file.c:1155 -msgid "File already exists." -msgstr "" - -#: src/file.c:1271 -#, c-format -msgid "Save changes to document \"%s\" before closing?" -msgstr "" - -#: src/file.c:1279 -msgid "Your changes will be lost if you don't save them." -msgstr "" - -#: src/file.c:1282 -msgid "Close without saving" -msgstr "" - -#. Should not happen -#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 -#: data/glade/object-editor.glade.h:37 -msgid "points" -msgstr "ÂI" - -#: src/prefs.c:158 data/glade/object-editor.glade.h:36 -#: data/glade/template-designer.glade.h:74 -msgid "inches" -msgstr "­^¤o" - -#: src/prefs.c:160 -msgid "mm" -msgstr "mm" - -#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 -#, fuzzy -msgid "gLabels Preferences" -msgstr "Glabels: ³]©w­È" - -#. -#. * Submenu: Order -#. -#: src/view.c:3570 data/ui/glabels-ui.xml.h:157 -msgid "_Order" -msgstr "" - -#. -#. * Submenu: Rotate/Flip -#. -#: src/view.c:3591 data/ui/glabels-ui.xml.h:163 -#, fuzzy -msgid "_Rotate/Flip" -msgstr "±ÛÂà" - -#. -#. * Submenu: Align Horizontally -#. -#: src/view.c:3624 -msgid "Align _Horizontally" -msgstr "" - -#. -#. * Submenu: Align Vertically -#. -#: src/view.c:3663 -msgid "Align _Vertically" -msgstr "" - -#: src/view.c:3724 data/ui/glabels-ui.xml.h:140 -#, fuzzy -msgid "_Delete" -msgstr "§R°£" - -#. Build editor. -#: src/view-box.c:223 -#, fuzzy -msgid "Box object properties" -msgstr "­×§ï¤è¶ôª«¥ó³]©w" - -#. Build editor. -#: src/view-ellipse.c:223 -#, fuzzy -msgid "Ellipse object properties" -msgstr "­×§ï¾ò¶êª«¥ó³]©w" - -#. Build editor. -#: src/view-line.c:223 -#, fuzzy -msgid "Line object properties" -msgstr "­×§ï¤è¶ôª«¥ó³]©w" - -#. Build editor. -#: src/view-image.c:222 -#, fuzzy -msgid "Image object properties" -msgstr "­×§ï¹Ï¹³ª«¥ó³]©w" - -#. Build editor. -#: src/view-text.c:250 -#, fuzzy -msgid "Text object properties" -msgstr "­×§ï¤è¶ôª«¥ó³]©w" - -#: src/view-text.c:562 data/glade/object-editor.glade.h:28 -msgid "Text" -msgstr "¤å¦r" - -#. Build editor. -#: src/view-barcode.c:209 -#, fuzzy -msgid "Barcode object properties" -msgstr "­×§ï¼Æ½X±øª«¥ó³]©w" - -#: src/view-barcode.c:579 src/print.c:1088 -#, fuzzy -msgid "Invalid barcode data" -msgstr "¤£¥¿½Tªº¼Æ½X±ø" - -#: src/merge-properties-dialog.c:231 -#, fuzzy -msgid "Merge Properties" -msgstr "¦X¨Ö³]©w" - -#. ---- Source section ---- -#: src/merge-properties-dialog.c:237 -msgid "Source" -msgstr "¨Ó·½ÀÉ" - -#: src/merge-properties-dialog.c:245 -msgid "Format:" -msgstr "®æ¦¡:" - -#. Location line -#: src/merge-properties-dialog.c:273 -msgid "Location:" -msgstr "¦ì¸m:" - -#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 -msgid "Select merge-database source" -msgstr "¿ï¾Ü¦X¨Ö¸ê®Æ®w¨Ó·½" - -#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 -msgid "N/A" -msgstr "N/A" - -#. ---- Sample Fields section ---- -#: src/merge-properties-dialog.c:300 -msgid "Record selection/preview:" -msgstr "" - -#: src/merge-properties-dialog.c:326 -msgid "Select" -msgstr "¿ï¾Ü" - -#: src/merge-properties-dialog.c:334 -msgid "Record/Field" -msgstr "" - -#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 -msgid "Data" -msgstr "¸ê®Æ" - -#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:82 -msgid "Print" -msgstr "¦C¦L" - -#: src/print-dialog.c:281 -msgid "_Job" -msgstr "" - -#: src/print-dialog.c:286 -#, fuzzy -msgid "P_rinter" -msgstr "¦C¦L" - -#. ----------- Add simple-copies widget ------------ -#: src/print-dialog.c:314 -msgid "Copies" -msgstr "¥÷¼Æ" - -#. ------- Add merge control widget ------------ -#: src/print-dialog.c:322 -msgid "Document merge control" -msgstr "¤å¥ó¦X¨Ö±±¨î" - -#. ----------- Add custom print options area ------------ -#: src/print-dialog.c:330 -msgid "Options" -msgstr "³]©w" - -#: src/print-dialog.c:351 -msgid "print crop marks" -msgstr "" - -#: src/print-dialog.c:553 src/print-dialog.c:592 -msgid "Print preview" -msgstr "¹wÄý¦C¦L" - -#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 -msgid "gLabels Template Designer" -msgstr "" - -#: src/bc.c:60 -msgid "POSTNET (any)" -msgstr "" - -#: src/bc.c:63 -msgid "POSTNET-5 (ZIP only)" -msgstr "" - -#: src/bc.c:66 -msgid "POSTNET-9 (ZIP+4)" -msgstr "" - -#: src/bc.c:69 -msgid "POSTNET-11 (DPBC)" -msgstr "" - -#: src/bc.c:72 -msgid "EAN (any)" -msgstr "" - -#: src/bc.c:75 -msgid "EAN-8" -msgstr "" - -#: src/bc.c:78 -msgid "EAN-8 +2" -msgstr "" - -#: src/bc.c:81 -msgid "EAN-8 +5" -msgstr "" - -#: src/bc.c:84 -msgid "EAN-13" -msgstr "" - -#: src/bc.c:87 -msgid "EAN-13 +2" -msgstr "" - -#: src/bc.c:90 -msgid "EAN-13 +5" -msgstr "" - -#: src/bc.c:93 -msgid "UPC (UPC-A or UPC-E)" -msgstr "" - -#: src/bc.c:96 -msgid "UPC-A" -msgstr "" - -#: src/bc.c:99 -msgid "UPC-A +2" -msgstr "" - -#: src/bc.c:102 -msgid "UPC-A +5" -msgstr "" - -#: src/bc.c:105 -msgid "UPC-E" -msgstr "" - -#: src/bc.c:108 -msgid "UPC-E +2" -msgstr "" - -#: src/bc.c:111 -msgid "UPC-E +5" -msgstr "" - -#: src/bc.c:114 -msgid "ISBN" -msgstr "" - -#: src/bc.c:117 -msgid "ISBN +5" -msgstr "" - -#: src/bc.c:120 -msgid "Code 39" -msgstr "" - -#: src/bc.c:123 -msgid "Code 128" -msgstr "" - -#: src/bc.c:126 -msgid "Code 128C" -msgstr "" - -#: src/bc.c:129 -msgid "Code 128B" -msgstr "" - -#: src/bc.c:132 -msgid "Interleaved 2 of 5" -msgstr "" - -#: src/bc.c:135 -msgid "Codabar" -msgstr "" - -#: src/bc.c:138 -msgid "MSI" -msgstr "" - -#: src/bc.c:141 -msgid "Plessey" -msgstr "" - -#: src/label.c:569 -msgid "Untitled" -msgstr "" - -#: src/xml-label.c:176 src/xml-label.c:213 -msgid "xmlParseFile error" -msgstr "xmlParseFile ¿ù»~" - -#: src/xml-label.c:250 -msgid "No document root" -msgstr "¨S¦³¤å¥ó©lºÝ" - -#: src/xml-label.c:264 -msgid "Importing from glabels 0.1 format" -msgstr "" - -#: src/xml-label.c:272 -msgid "Importing from glabels 0.4 format" -msgstr "" - -#: src/xml-label.c:279 -msgid "Importing from glabels 1.91 format" -msgstr "" - -#: src/xml-label.c:282 -#, fuzzy -msgid "bad document, unknown glabels Namespace" -msgstr "¤£¥¿½Tªº¤å¥óºØÃþ, §ä¤£¨ì glabels ®æ¦¡" - -#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 -#, c-format -msgid "Bad root node = \"%s\"" -msgstr "¿ù»~ªº°ò½X = \"%s\"" - -#: src/xml-label.c:348 src/xml-label-191.c:165 -#, fuzzy, c-format -msgid "bad node in Document node = \"%s\"" -msgstr "¿ù»~ªº°ò½X = \"%s\"" - -#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 -#, c-format -msgid "bad node = \"%s\"" -msgstr "¿ù»~ªº¸`ÂI = \"%s\"" - -#: src/xml-label.c:796 src/xml-label-191.c:605 -#, fuzzy, c-format -msgid "bad node in Data node = \"%s\"" -msgstr "¿ù»~ªº¸`ÂI = \"%s\"" - -#: src/xml-label.c:962 libglabels/xml-template.c:528 -msgid "Utf8 conversion error." -msgstr "" - -#: src/xml-label.c:969 libglabels/xml-template.c:535 -msgid "Problem saving xml file." -msgstr "Àx¦s XML Àɮ׮ɵo¥Í¿ù»~." - -#. This should always be an id, but just in case a name -#. slips by! -#: src/xml-label-191.c:680 libglabels/xml-template.c:192 -#, c-format -msgid "Unknown page size id \"%s\", trying as name" -msgstr "" - -#: src/xml-label-191.c:690 libglabels/xml-template.c:202 -#, c-format -msgid "Unknown page size id or name \"%s\"" -msgstr "" - -#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 -msgid "None" -msgstr "¨S¦³" - -#: src/merge-init.c:53 -#, fuzzy -msgid "Text file with comma delimeters (CSV)" -msgstr "¥H³r¸¹¤À®æ (CSV)" - -#: src/merge-init.c:60 -#, fuzzy -msgid "Text file with colon delimeters" -msgstr "¥H«_¸¹¤À®æ" - -#: src/merge-init.c:67 -#, fuzzy -msgid "Text file with tab delimeters" -msgstr "¥H [TAB] ¬°¤À®æ" - -#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 -#, fuzzy -msgid "File:" -msgstr "¶ñº¡" - -#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 -msgid "Key:" -msgstr "¸ê®Æ­È:" - -#: src/wdgt-print-copies.c:179 -msgid "Sheets:" -msgstr "¯È±i:" - -#: src/wdgt-print-copies.c:197 -msgid "Labels" -msgstr "¼Ðñ" - -#: src/wdgt-print-copies.c:200 -msgid "from:" -msgstr "¥Ñ:" - -#: src/wdgt-print-copies.c:207 -msgid "to:" -msgstr "¨ì:" - -#: src/wdgt-print-merge.c:178 -msgid "Start on label" -msgstr "¥Ñ¸Tñ¶}¯Å" - -#: src/wdgt-print-merge.c:186 -msgid "on 1st sheet" -msgstr "¦b­º±i¯È" - -#: src/wdgt-print-merge.c:195 -msgid "Copies:" -msgstr "¥÷¼Æ:" - -#: src/wdgt-print-merge.c:201 -msgid "Collate" -msgstr "®Õ¹ï" - -#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 -msgid "Description:" -msgstr "´y­z:" - -#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 -msgid "Page size:" -msgstr "¯È±i¤j¤p:" - -#: src/wdgt-media-select.c:290 -msgid "Label size:" -msgstr "¼Ðñ¤j¤p:" - -#: src/wdgt-media-select.c:301 -msgid "Layout:" -msgstr "ª©­±:" - -#: src/wdgt-media-select.c:578 -#, c-format -msgid "%d x %d (%d per sheet)" -msgstr "%d x %d (¨C­¶ %d)" - -#: src/wdgt-media-select.c:582 -#, fuzzy, c-format -msgid "%d per sheet" -msgstr "%d x %d (¨C­¶ %d)" - -#: src/wdgt-media-select.c:614 -#, c-format -msgid "%s x %s %s" -msgstr "%s x %s %s" - -#: src/wdgt-media-select.c:619 -#, c-format -msgid "%.5g x %.5g %s" -msgstr "%.5g x %.5g %s" - -#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 -#, c-format -msgid "%s %s diameter" -msgstr "" - -#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 -#, c-format -msgid "%.5g %s diameter" -msgstr "" - -#: src/wdgt-rotate-label.c:193 -msgid "Rotate" -msgstr "±ÛÂà" - -#. This is the default custom color -#: src/mygal/color-palette.c:396 -#, fuzzy -msgid "custom" -msgstr "¦Û­qÄæ¦ìÆ_" - -#. "Custom" color - we'll pop up a GnomeColorPicker -#: src/mygal/color-palette.c:438 -#, fuzzy -msgid "Custom Color:" -msgstr "ÃC¦â:" - -#: src/mygal/color-palette.c:446 -msgid "Choose Custom Color" -msgstr "" - -#: src/mygal/color-palette.c:579 -msgid "black" -msgstr "" - -#: src/mygal/color-palette.c:580 -msgid "light brown" -msgstr "" - -#: src/mygal/color-palette.c:581 -msgid "brown gold" -msgstr "" - -#: src/mygal/color-palette.c:582 -msgid "dark green #2" -msgstr "" - -#: src/mygal/color-palette.c:583 -msgid "navy" -msgstr "" - -#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 -msgid "dark blue" -msgstr "" - -#: src/mygal/color-palette.c:585 -msgid "purple #2" -msgstr "" - -#: src/mygal/color-palette.c:586 -msgid "very dark gray" -msgstr "" - -#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 -msgid "dark red" -msgstr "" - -#: src/mygal/color-palette.c:590 -msgid "red-orange" -msgstr "" - -#: src/mygal/color-palette.c:591 -msgid "gold" -msgstr "" - -#: src/mygal/color-palette.c:592 -msgid "dark green" -msgstr "" - -#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 -msgid "dull blue" -msgstr "" - -#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 -msgid "blue" -msgstr "" - -#: src/mygal/color-palette.c:595 -msgid "dull purple" -msgstr "" - -#: src/mygal/color-palette.c:596 -msgid "dark grey" -msgstr "" - -#: src/mygal/color-palette.c:599 -msgid "red" -msgstr "" - -#: src/mygal/color-palette.c:600 -msgid "orange" -msgstr "" - -#: src/mygal/color-palette.c:601 -msgid "lime" -msgstr "" - -#: src/mygal/color-palette.c:602 -msgid "dull green" -msgstr "" - -#: src/mygal/color-palette.c:603 -msgid "dull blue #2" -msgstr "" - -#: src/mygal/color-palette.c:604 -msgid "sky blue #2" -msgstr "" - -#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 -msgid "purple" -msgstr "" - -#: src/mygal/color-palette.c:606 -msgid "gray" -msgstr "" - -#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 -#, fuzzy -msgid "magenta" -msgstr "¹Ï¹³" - -#: src/mygal/color-palette.c:610 -msgid "bright orange" -msgstr "" - -#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 -msgid "yellow" -msgstr "" - -#: src/mygal/color-palette.c:612 -#, fuzzy -msgid "green" -msgstr "«×¼Æ" - -#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 -msgid "cyan" -msgstr "" - -#: src/mygal/color-palette.c:614 -msgid "bright blue" -msgstr "" - -#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 -msgid "red purple" -msgstr "" - -#: src/mygal/color-palette.c:616 -msgid "light grey" -msgstr "" - -#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 -msgid "pink" -msgstr "" - -#: src/mygal/color-palette.c:620 -msgid "light orange" -msgstr "" - -#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 -msgid "light yellow" -msgstr "" - -#: src/mygal/color-palette.c:622 -msgid "light green" -msgstr "" - -#: src/mygal/color-palette.c:623 -msgid "light cyan" -msgstr "" - -#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 -msgid "light blue" -msgstr "" - -#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 -msgid "light purple" -msgstr "" - -#: src/mygal/color-palette.c:626 -msgid "white" -msgstr "" - -#: src/mygal/color-palette.c:631 -msgid "purplish blue" -msgstr "" - -#: src/mygal/color-palette.c:635 -msgid "dark purple" -msgstr "" - -#: src/mygal/color-palette.c:637 -msgid "sky blue" -msgstr "" - -#: libglabels/template.c:848 -#, c-format -msgid "Generic %s full page" -msgstr "" - -#: libglabels/template.c:897 -msgid "No template files found!" -msgstr "§ä¤£¨ì¼Ëª©ÀÉ®× !" - -#. Create and append an "Other" entry. -#: libglabels/paper.c:67 -msgid "Other" -msgstr "" - -#: libglabels/paper.c:361 -#, fuzzy -msgid "No paper files found!" -msgstr "§ä¤£¨ì¼Ëª©ÀÉ®× !" - -#: data/ui/glabels-ui.xml.h:1 -msgid "About glabels" -msgstr "" - -#: data/ui/glabels-ui.xml.h:2 -msgid "About..." -msgstr "" - -#: data/ui/glabels-ui.xml.h:3 -msgid "Align _Horizontal" -msgstr "" - -#: data/ui/glabels-ui.xml.h:4 -msgid "Align _Vertical" -msgstr "" - -#: data/ui/glabels-ui.xml.h:5 -msgid "Align objects to bottoms" -msgstr "" - -#: data/ui/glabels-ui.xml.h:6 -msgid "Align objects to horizontal centers" -msgstr "" - -#: data/ui/glabels-ui.xml.h:7 -msgid "Align objects to left edges" -msgstr "" - -#: data/ui/glabels-ui.xml.h:8 -msgid "Align objects to right edges" -msgstr "" - -#: data/ui/glabels-ui.xml.h:9 -msgid "Align objects to tops" -msgstr "" - -#: data/ui/glabels-ui.xml.h:10 -msgid "Align objects to vertical centers" -msgstr "" - -#: data/ui/glabels-ui.xml.h:12 -msgid "Bold" -msgstr "" - -#: data/ui/glabels-ui.xml.h:14 -#, fuzzy -msgid "Center align" -msgstr "¤@¯ë" - -#: data/ui/glabels-ui.xml.h:15 -msgid "Center objects to horizontal label center" -msgstr "" - -#: data/ui/glabels-ui.xml.h:16 -msgid "Center objects to vertical label center" -msgstr "" - -#: data/ui/glabels-ui.xml.h:17 -msgid "Change the visibility of markup lines in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:18 -msgid "Change the visibility of the drawing toolbar in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:19 -msgid "Change the visibility of the grid in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:20 -msgid "Change the visibility of the main toolbar in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:21 -msgid "Change the visibility of the property toolbar in the current window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:22 -msgid "Close" -msgstr "" - -#: data/ui/glabels-ui.xml.h:23 -#, fuzzy -msgid "Close the current file" -msgstr "Àx¦s²{¦bÀÉ®×" - -#: data/ui/glabels-ui.xml.h:24 -msgid "Configure the application" -msgstr "" - -#: data/ui/glabels-ui.xml.h:25 -msgid "Contents" -msgstr "" - -#: data/ui/glabels-ui.xml.h:26 -msgid "Copy" -msgstr "" - -#: data/ui/glabels-ui.xml.h:27 -#, fuzzy -msgid "Copy the selection" -msgstr "²¾°£©Ò¦³¿ï¾Ü¶µ" - -#: data/ui/glabels-ui.xml.h:28 -#, fuzzy -msgid "Create a custom template" -msgstr "µe½uª«¥ó" - -#: data/ui/glabels-ui.xml.h:29 -#, fuzzy -msgid "Create a new document" -msgstr "µe½uª«¥ó" - -#: data/ui/glabels-ui.xml.h:30 -msgid "Create barcode object" -msgstr "«Ø¥ß¼Æ½X±ø" - -#: data/ui/glabels-ui.xml.h:31 -msgid "Create box/rectangle object" -msgstr "«Ø¥ß·sªº²°¤l/¤è§Îª«¥ó" - -#: data/ui/glabels-ui.xml.h:32 -msgid "Create ellipse/circle object" -msgstr "«Ø¥ß¾ò¶ê§Î/¹Ï§Îª«¥ó" - -#: data/ui/glabels-ui.xml.h:33 -msgid "Create image object" -msgstr "«Ø¥ß¼v¹³ª«¥ó" - -#: data/ui/glabels-ui.xml.h:34 -msgid "Create line object" -msgstr "µe½uª«¥ó" - -#: data/ui/glabels-ui.xml.h:35 -msgid "Create text object" -msgstr "«Ø¥ß·sªº¤å¦rª«¥ó" - -#: data/ui/glabels-ui.xml.h:36 -msgid "Cu_t" -msgstr "" - -#: data/ui/glabels-ui.xml.h:37 -#, fuzzy -msgid "Customize" -msgstr "¦Û­qÄæ¦ìÆ_" - -#: data/ui/glabels-ui.xml.h:38 -msgid "Customize Drawing Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:39 -msgid "Customize Main Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:40 -msgid "Customize Property Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:41 -msgid "Customize toolbars" -msgstr "" - -#: data/ui/glabels-ui.xml.h:42 -msgid "Cut" -msgstr "" - -#: data/ui/glabels-ui.xml.h:43 -msgid "Cut the selection" -msgstr "" - -#: data/ui/glabels-ui.xml.h:44 -msgid "Decrease magnification" -msgstr "" - -#: data/ui/glabels-ui.xml.h:45 -msgid "Delete" -msgstr "§R°£" - -#: data/ui/glabels-ui.xml.h:46 -#, fuzzy -msgid "Delete the selected objects" -msgstr "«Ø¥ß·sªº¤å¦rª«¥ó" - -#: data/ui/glabels-ui.xml.h:47 -msgid "Drawing toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:48 -msgid "Dump XML" -msgstr "" - -#: data/ui/glabels-ui.xml.h:49 -msgid "Dump the UI Xml description" -msgstr "" - -#: data/ui/glabels-ui.xml.h:50 -msgid "Edit merge properties" -msgstr "­×§ï¦X¨Ö³]©w" - -#: data/ui/glabels-ui.xml.h:54 -msgid "Flip object horizontally" -msgstr "" - -#: data/ui/glabels-ui.xml.h:55 -msgid "Flip object vertically" -msgstr "" - -#: data/ui/glabels-ui.xml.h:56 -#, fuzzy -msgid "Font name" -msgstr "¤£­nÀx¦s" - -#: data/ui/glabels-ui.xml.h:57 -#, fuzzy -msgid "Font selector" -msgstr "²¾°£©Ò¦³¿ï¾Ü¶µ" - -#: data/ui/glabels-ui.xml.h:58 -#, fuzzy -msgid "Font size" -msgstr "¤£­nÀx¦s" - -#: data/ui/glabels-ui.xml.h:59 -msgid "Icon and _Text" -msgstr "" - -#: data/ui/glabels-ui.xml.h:60 -msgid "Increase magnification" -msgstr "" - -#: data/ui/glabels-ui.xml.h:61 -msgid "Italic" -msgstr "" - -#: data/ui/glabels-ui.xml.h:63 -msgid "Left align" -msgstr "" - -#: data/ui/glabels-ui.xml.h:65 -msgid "Line width" -msgstr "" - -#: data/ui/glabels-ui.xml.h:66 -msgid "Lower object to bottom" -msgstr "" - -#: data/ui/glabels-ui.xml.h:67 -msgid "M_arkup" -msgstr "" - -#: data/ui/glabels-ui.xml.h:68 -msgid "Main toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:69 -msgid "Markup" -msgstr "" - -#: data/ui/glabels-ui.xml.h:70 -#, fuzzy -msgid "Modify document properties" -msgstr "­×§ï¤å¥ó¦X¨Ö³]©w" - -#: data/ui/glabels-ui.xml.h:71 -#, fuzzy -msgid "New" -msgstr "·s¼W (&_N)" - -#: data/ui/glabels-ui.xml.h:72 -#, fuzzy -msgid "Object property editor" -msgstr "¤å¦r¼Ë»ª" - -#: data/ui/glabels-ui.xml.h:73 -msgid "Only show icons in the drawing toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:74 -msgid "Only show icons in the main toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:76 -msgid "Open a file" -msgstr "¶}±ÒÀÉ®×" - -#: data/ui/glabels-ui.xml.h:77 -#, fuzzy -msgid "Open the glabels manual" -msgstr "¶}±Ò¼Ðñ" - -#: data/ui/glabels-ui.xml.h:78 -msgid "Paste" -msgstr "" - -#: data/ui/glabels-ui.xml.h:79 -msgid "Paste the clipboard" -msgstr "" - -#: data/ui/glabels-ui.xml.h:80 -#, fuzzy -msgid "Pr_eferences..." -msgstr "Glabels: ³]©w­È" - -#: data/ui/glabels-ui.xml.h:81 -#, fuzzy -msgid "Preferences" -msgstr "Glabels: ³]©w­È" - -#: data/ui/glabels-ui.xml.h:83 -#, fuzzy -msgid "Print the current file" -msgstr "¦C¦L²{¦³ÀÉ®×" - -#: data/ui/glabels-ui.xml.h:84 -#, fuzzy -msgid "Proper_ties..." -msgstr "¤å¦r¼Ë»ª" - -#: data/ui/glabels-ui.xml.h:85 -#, fuzzy -msgid "Properties" -msgstr "¤å¦r¼Ë»ª" - -#: data/ui/glabels-ui.xml.h:86 -msgid "Property toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:87 -msgid "Quit" -msgstr "" - -#: data/ui/glabels-ui.xml.h:88 -msgid "Quit the program" -msgstr "" - -#: data/ui/glabels-ui.xml.h:89 -msgid "Raise object to top" -msgstr "" - -#: data/ui/glabels-ui.xml.h:90 -msgid "Recent _Files" -msgstr "" - -#: data/ui/glabels-ui.xml.h:91 -msgid "Redo" -msgstr "" - -#: data/ui/glabels-ui.xml.h:92 -msgid "Redo the undone action" -msgstr "" - -#: data/ui/glabels-ui.xml.h:93 -msgid "Remove all selections" -msgstr "²¾°£©Ò¦³¿ï¾Ü¶µ" - -#: data/ui/glabels-ui.xml.h:95 -#, no-c-format -msgid "Restore scale to 100%" -msgstr "" - -#: data/ui/glabels-ui.xml.h:96 -msgid "Right align" -msgstr "" - -#: data/ui/glabels-ui.xml.h:99 -msgid "Rotate object 90 clockwise" -msgstr "" - -#: data/ui/glabels-ui.xml.h:100 -msgid "Rotate object 90 counter-clockwise" -msgstr "" - -#: data/ui/glabels-ui.xml.h:101 -#, fuzzy -msgid "Save" -msgstr "¥t¦s¬°..." - -#: data/ui/glabels-ui.xml.h:102 -msgid "Save As" -msgstr "¥t¦s¬°..." - -#: data/ui/glabels-ui.xml.h:103 -#, fuzzy -msgid "Save _As..." -msgstr "¥t¦s¬°..." - -#: data/ui/glabels-ui.xml.h:104 -#, fuzzy -msgid "Save the current file" -msgstr "Àx¦s²{¦bÀÉ®×" - -#: data/ui/glabels-ui.xml.h:105 -msgid "Save the current file with a different name" -msgstr "" - -#: data/ui/glabels-ui.xml.h:106 -#, fuzzy -msgid "Select All" -msgstr "¤Ï¿ï¾Ü¥þ³¡ (&_N)" - -#: data/ui/glabels-ui.xml.h:107 -#, fuzzy -msgid "Select _All" -msgstr "¤Ï¿ï¾Ü¥þ³¡ (&_N)" - -#: data/ui/glabels-ui.xml.h:108 -#, fuzzy -msgid "Select all objects" -msgstr "¿ï¾Ü, ²¾°Ê¤Î­×§ïª«¥ó" - -#: data/ui/glabels-ui.xml.h:109 -msgid "Select, move and modify objects" -msgstr "¿ï¾Ü, ²¾°Ê¤Î­×§ïª«¥ó" - -#: data/ui/glabels-ui.xml.h:111 -msgid "Set drawing toolbar button style according to desktop default" -msgstr "" - -#: data/ui/glabels-ui.xml.h:112 -msgid "Set main toolbar button style according to desktop default" -msgstr "" - -#: data/ui/glabels-ui.xml.h:113 -msgid "Show _Tooltips" -msgstr "" - -#: data/ui/glabels-ui.xml.h:114 -msgid "Show both icons and texts in the drawing toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:115 -msgid "Show both icons and texts in the main toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:116 -msgid "Show tooltips in the drawing toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:117 -msgid "Show tooltips in the main toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:118 -msgid "Show tooltips in the property toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:119 -msgid "Template Designer" -msgstr "" - -#: data/ui/glabels-ui.xml.h:120 -msgid "Template _Designer..." -msgstr "" - -#: data/ui/glabels-ui.xml.h:121 -msgid "Text color" -msgstr "" - -#: data/ui/glabels-ui.xml.h:122 -#, fuzzy -msgid "U_n-select All" -msgstr "¤Ï¿ï¾Ü¥þ³¡ (&_N)" - -#: data/ui/glabels-ui.xml.h:123 -#, fuzzy -msgid "Un-select All" -msgstr "¤Ï¿ï¾Ü¥þ³¡ (&_N)" - -#: data/ui/glabels-ui.xml.h:124 -msgid "Undo" -msgstr "" - -#: data/ui/glabels-ui.xml.h:125 -msgid "Undo the last action" -msgstr "" - -#: data/ui/glabels-ui.xml.h:126 -#, fuzzy -msgid "Zoom _1:1" -msgstr "1:1 Åã¥Ü" - -#: data/ui/glabels-ui.xml.h:127 -#, fuzzy -msgid "Zoom _In" -msgstr "©ñ¤j" - -#: data/ui/glabels-ui.xml.h:128 -#, fuzzy -msgid "Zoom _Out" -msgstr "ÁY¤p" - -#: data/ui/glabels-ui.xml.h:129 -#, fuzzy -msgid "Zoom to _fit" -msgstr "1:1 Åã¥Ü" - -#: data/ui/glabels-ui.xml.h:130 -msgid "Zoom to fit window" -msgstr "" - -#: data/ui/glabels-ui.xml.h:131 -msgid "_About..." -msgstr "" - -#: data/ui/glabels-ui.xml.h:132 -msgid "_Bottoms" -msgstr "" - -#: data/ui/glabels-ui.xml.h:135 -msgid "_Close" -msgstr "" - -#: data/ui/glabels-ui.xml.h:136 -msgid "_Contents" -msgstr "" - -#: data/ui/glabels-ui.xml.h:137 -msgid "_Copy" -msgstr "" - -#: data/ui/glabels-ui.xml.h:138 -#, fuzzy -msgid "_Create Object" -msgstr "«Ø¥ß·sªº¤å¦rª«¥ó" - -#: data/ui/glabels-ui.xml.h:139 -msgid "_Debug" -msgstr "" - -#: data/ui/glabels-ui.xml.h:141 -msgid "_Desktop Default" -msgstr "" - -#: data/ui/glabels-ui.xml.h:142 -msgid "_Drawing Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:143 -msgid "_Edit" -msgstr "" - -#: data/ui/glabels-ui.xml.h:145 -#, fuzzy -msgid "_File" -msgstr "¶ñº¡" - -#: data/ui/glabels-ui.xml.h:146 -msgid "_Grid" -msgstr "" - -#: data/ui/glabels-ui.xml.h:147 -msgid "_Help" -msgstr "" - -#: data/ui/glabels-ui.xml.h:148 -msgid "_Icon" -msgstr "" - -#: data/ui/glabels-ui.xml.h:152 -msgid "_Main Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:153 -#, fuzzy -msgid "_Merge Properties..." -msgstr "¦X¨Ö³]©w" - -#: data/ui/glabels-ui.xml.h:154 -msgid "_New" -msgstr "·s¼W (&_N)" - -#: data/ui/glabels-ui.xml.h:155 -msgid "_Objects" -msgstr "" - -#: data/ui/glabels-ui.xml.h:156 -#, fuzzy -msgid "_Open..." -msgstr "¶}±Ò" - -#: data/ui/glabels-ui.xml.h:158 -msgid "_Paste" -msgstr "" - -#: data/ui/glabels-ui.xml.h:159 -#, fuzzy -msgid "_Print..." -msgstr "¦C¦L" - -#: data/ui/glabels-ui.xml.h:160 -msgid "_Property Toolbar" -msgstr "" - -#: data/ui/glabels-ui.xml.h:161 -msgid "_Quit" -msgstr "" - -#: data/ui/glabels-ui.xml.h:164 -#, fuzzy -msgid "_Save" -msgstr "¥t¦s¬°..." - -#: data/ui/glabels-ui.xml.h:168 -#, fuzzy -msgid "_View" -msgstr "·s¼W (&_N)" - -#: data/glade/prefs-dialog.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 -#: data/glade/template-designer.glade.h:5 -msgid "*" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:3 -msgid "Default page size" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:4 -msgid "Fill" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:5 -msgid "Line" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:6 -msgid "Text" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:7 -msgid "Units" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 -msgid "Alignment:" -msgstr "¹ï¸m:" - -#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 -msgid "Color:" -msgstr "ÃC¦â:" - -#: data/glade/prefs-dialog.glade.h:10 -msgid "Font:" -msgstr "¦r«¬:" - -#: data/glade/prefs-dialog.glade.h:11 -msgid "ISO A4" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:12 -msgid "Inches" -msgstr "­^¤o" - -#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 -msgid "Line Spacing:" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:14 -#, fuzzy -msgid "Locale" -msgstr "¤ñ¨Ò:" - -#: data/glade/prefs-dialog.glade.h:15 -msgid "Millimeters" -msgstr "²@¦Ì" - -#: data/glade/prefs-dialog.glade.h:16 -msgid "Object defaults" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:17 -msgid "Points" -msgstr "ÂI" - -#: data/glade/prefs-dialog.glade.h:18 -msgid "Select default properties for new objects." -msgstr "" - -#: data/glade/prefs-dialog.glade.h:19 -msgid "Select locale specific behavior." -msgstr "" - -#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:25 -msgid "US Letter" -msgstr "" - -#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 -#: data/glade/template-designer.glade.h:72 -msgid "Width:" -msgstr "Áï«×:" - -#: data/glade/object-editor.glade.h:2 -msgid "00000000000 00000" -msgstr "" - -#: data/glade/object-editor.glade.h:3 -msgid "Xxx object properties" -msgstr "" - -#: data/glade/object-editor.glade.h:5 -msgid "Allow merge to automatically shrink text" -msgstr "" - -#: data/glade/object-editor.glade.h:6 -msgid "Angle:" -msgstr "¨¤«×:" - -#: data/glade/object-editor.glade.h:7 -msgid "Checksum" -msgstr "" - -#: data/glade/object-editor.glade.h:10 -#, fuzzy -msgid "Family:" -msgstr "¶ñº¡" - -#: data/glade/object-editor.glade.h:12 -msgid "Fill" -msgstr "¶ñº¡" - -#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 -msgid "Height:" -msgstr "°ª«×:" - -#: data/glade/object-editor.glade.h:14 -msgid "Image" -msgstr "¹Ï¹³" - -#: data/glade/object-editor.glade.h:15 -msgid "Insert merge field" -msgstr "´¡¤J¦X¨Ö¦C" - -#: data/glade/object-editor.glade.h:17 -msgid "Length:" -msgstr "ªø«×:" - -#: data/glade/object-editor.glade.h:18 -msgid "Line" -msgstr "½u" - -#: data/glade/object-editor.glade.h:20 -msgid "Literal:" -msgstr "¤å¦r:" - -#: data/glade/object-editor.glade.h:21 -msgid "Load image" -msgstr "" - -#: data/glade/object-editor.glade.h:22 -msgid "Position" -msgstr "¦ì¸m" - -#: data/glade/object-editor.glade.h:23 -msgid "Reset image size" -msgstr "­«³]¹Ï¹³¤j¤p" - -#: data/glade/object-editor.glade.h:24 -msgid "Size" -msgstr "¤j¤p" - -#: data/glade/object-editor.glade.h:25 -#, fuzzy -msgid "Size:" -msgstr "¤j¤p" - -#: data/glade/object-editor.glade.h:26 -#, fuzzy -msgid "Style" -msgstr "¼Ë¦¡" - -#: data/glade/object-editor.glade.h:27 -#, fuzzy -msgid "Style:" -msgstr "¼Ë¦¡" - -#: data/glade/object-editor.glade.h:30 -msgid "X:" -msgstr "X:" - -#: data/glade/object-editor.glade.h:31 -msgid "Y:" -msgstr "Y:" - -#: data/glade/object-editor.glade.h:32 -msgid "degrees" -msgstr "«×¼Æ" - -#: data/glade/object-editor.glade.h:33 -msgid "dialog1" -msgstr "" - -#: data/glade/object-editor.glade.h:34 -msgid "digits:" -msgstr "" - -#: data/glade/object-editor.glade.h:35 -#, fuzzy -msgid "format:" -msgstr "®æ¦¡:" - -#: data/glade/template-designer.glade.h:1 -msgid " " -msgstr "" - -#: data/glade/template-designer.glade.h:2 -msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" -msgstr "" - -#: data/glade/template-designer.glade.h:3 -msgid "(e.g., 8163A)" -msgstr "" - -#: data/glade/template-designer.glade.h:4 -msgid "(e.g., Avery, Acme, ...)" -msgstr "" - -#: data/glade/template-designer.glade.h:6 -msgid "1. Outer radius:" -msgstr "" - -#: data/glade/template-designer.glade.h:7 -msgid "1. Radius:" -msgstr "" - -#: data/glade/template-designer.glade.h:8 -#, fuzzy -msgid "1. Width:" -msgstr "Áï«×:" - -#: data/glade/template-designer.glade.h:9 -#, fuzzy -msgid "2. Height:" -msgstr "°ª«×:" - -#: data/glade/template-designer.glade.h:10 -msgid "2. Inner radius:" -msgstr "" - -#: data/glade/template-designer.glade.h:11 -msgid "2. Waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:12 -msgid "3. Clipping width:" -msgstr "" - -#: data/glade/template-designer.glade.h:13 -msgid "3. Margin" -msgstr "" - -#: data/glade/template-designer.glade.h:14 -msgid "3. Round (radius of corner):" -msgstr "" - -#: data/glade/template-designer.glade.h:15 -msgid "4. Clipping height:" -msgstr "" - -#: data/glade/template-designer.glade.h:16 -msgid "4. Horiz. waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:17 -msgid "5. Vert. waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:18 -msgid "5. Waste (overprint allowed):" -msgstr "" - -#: data/glade/template-designer.glade.h:19 -msgid "6. Margin" -msgstr "" - -#: data/glade/template-designer.glade.h:20 -msgid "Brand/Manufacturer:" -msgstr "" - -#: data/glade/template-designer.glade.h:21 -msgid "CD/DVD (including credit card CDs)" -msgstr "" - -#: data/glade/template-designer.glade.h:22 -msgid "" -"Congratulations!\n" -"\n" -"You have completed the gLabels Template Designer.\n" -"If you wish to accept and save your design, click \"Apply.\"\n" -"\n" -"Otherwise, you may click \"Cancel\" to abandon your design\n" -"or \"Back\" to continue editing this design." -msgstr "" - -#: data/glade/template-designer.glade.h:30 -msgid "Design Completed" -msgstr "" - -#: data/glade/template-designer.glade.h:31 -msgid "Distance from left edge (x0):" -msgstr "" - -#: data/glade/template-designer.glade.h:32 -msgid "Distance from top edge (y0):" -msgstr "" - -#: data/glade/template-designer.glade.h:34 -msgid "Horizontal pitch (dx):" -msgstr "" - -#: data/glade/template-designer.glade.h:35 -msgid "" -"How many layouts will your template contain? \n" -"\n" -"A layout is a set of labels or cards that can be arranged in a simple grid.\n" -"Most templates only need one layout, as in the first example.\n" -"The second example illustrates when two layouts are needed." -msgstr "" - -#: data/glade/template-designer.glade.h:40 -msgid "Label Size (CD/DVD)" -msgstr "" - -#: data/glade/template-designer.glade.h:41 -#, fuzzy -msgid "Label Size (Round)" -msgstr "¼Ðñ¤j¤p:" - -#: data/glade/template-designer.glade.h:42 -#, fuzzy -msgid "Label or Card Shape" -msgstr "·s¼W¼Ðñ©Î¥d" - -#: data/glade/template-designer.glade.h:43 -msgid "Label or Card Size (Rectangular)" -msgstr "" - -#: data/glade/template-designer.glade.h:44 -#, fuzzy -msgid "Layout #1" -msgstr "ª©­±:" - -#: data/glade/template-designer.glade.h:45 -#, fuzzy -msgid "Layout #2" -msgstr "ª©­±:" - -#: data/glade/template-designer.glade.h:46 -#, fuzzy -msgid "Layout(s)" -msgstr "ª©­±:" - -#: data/glade/template-designer.glade.h:47 -#, fuzzy -msgid "Name and Description" -msgstr "´y­z:" - -#: data/glade/template-designer.glade.h:48 -msgid "Number across (nx):" -msgstr "" - -#: data/glade/template-designer.glade.h:49 -msgid "Number down (ny):" -msgstr "" - -#: data/glade/template-designer.glade.h:50 -msgid "Number of Layouts" -msgstr "" - -#: data/glade/template-designer.glade.h:51 -msgid "Number of layouts:" -msgstr "" - -#: data/glade/template-designer.glade.h:52 -#, fuzzy -msgid "Page Size" -msgstr "¯È±i¤j¤p:" - -#: data/glade/template-designer.glade.h:54 -msgid "Part #:" -msgstr "" - -#: data/glade/template-designer.glade.h:55 -msgid "" -"Please enter the following identifying information about the template " -"stationery." -msgstr "" - -#: data/glade/template-designer.glade.h:56 -msgid "Please enter the following layout information." -msgstr "" - -#: data/glade/template-designer.glade.h:57 -msgid "" -"Please enter the following size parameters of a single label in your " -"template." -msgstr "" - -#: data/glade/template-designer.glade.h:58 -msgid "" -"Please enter the following size parameters of a single label or card in your " -"template." -msgstr "" - -#: data/glade/template-designer.glade.h:59 -msgid "Please select the basic shape of the labels or cards." -msgstr "" - -#: data/glade/template-designer.glade.h:60 -msgid "Please select the page size of the template stationery." -msgstr "" - -#: data/glade/template-designer.glade.h:61 -#, fuzzy -msgid "Print test sheet" -msgstr "¦b­º±i¯È" - -#: data/glade/template-designer.glade.h:62 -msgid "Rectangular or square (can have rounded corners)" -msgstr "" - -#: data/glade/template-designer.glade.h:63 -msgid "Round" -msgstr "" - -#: data/glade/template-designer.glade.h:64 -msgid "" -"Templates needing\n" -"two layouts." -msgstr "" - -#: data/glade/template-designer.glade.h:66 -msgid "" -"Templates needing only\n" -"one layout." -msgstr "" - -#: data/glade/template-designer.glade.h:68 -msgid "Vertical pitch (dy):" -msgstr "" - -#: data/glade/template-designer.glade.h:69 -msgid "" -"Welcome to the gLabels Template Designer.\n" -"\n" -"This dialog will assist you in the creation of a custom gLabels template." -msgstr "" - -#: data/templates/paper-sizes.xml.h:1 -msgid "A0" -msgstr "" - -#: data/templates/paper-sizes.xml.h:2 -msgid "A1" -msgstr "" - -#: data/templates/paper-sizes.xml.h:3 -msgid "A10" -msgstr "" - -#: data/templates/paper-sizes.xml.h:4 -msgid "A2" -msgstr "" - -#: data/templates/paper-sizes.xml.h:5 -msgid "A3" -msgstr "" - -#: data/templates/paper-sizes.xml.h:6 -msgid "A4" -msgstr "" - -#: data/templates/paper-sizes.xml.h:7 -msgid "A5" -msgstr "" - -#: data/templates/paper-sizes.xml.h:8 -msgid "A6" -msgstr "" - -#: data/templates/paper-sizes.xml.h:9 -msgid "A7" -msgstr "" - -#: data/templates/paper-sizes.xml.h:10 -msgid "A8" -msgstr "" - -#: data/templates/paper-sizes.xml.h:11 -msgid "A9" -msgstr "" - -#: data/templates/paper-sizes.xml.h:12 -msgid "B0" -msgstr "" - -#: data/templates/paper-sizes.xml.h:13 -msgid "B1" -msgstr "" - -#: data/templates/paper-sizes.xml.h:14 -msgid "B10" -msgstr "" - -#: data/templates/paper-sizes.xml.h:15 -msgid "B2" -msgstr "" - -#: data/templates/paper-sizes.xml.h:16 -msgid "B3" -msgstr "" - -#: data/templates/paper-sizes.xml.h:17 -msgid "B4" -msgstr "" - -#: data/templates/paper-sizes.xml.h:18 -msgid "B5" -msgstr "" - -#: data/templates/paper-sizes.xml.h:19 -msgid "B6" -msgstr "" - -#: data/templates/paper-sizes.xml.h:20 -msgid "B7" -msgstr "" - -#: data/templates/paper-sizes.xml.h:21 -msgid "B8" -msgstr "" - -#: data/templates/paper-sizes.xml.h:22 -msgid "B9" -msgstr "" - -#: data/templates/paper-sizes.xml.h:23 -msgid "US Executive" -msgstr "" - -#: data/templates/paper-sizes.xml.h:24 -msgid "US Legal" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:1 -#: data/templates/zweckform-iso-templates.xml.h:1 -msgid "Address Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:2 -#: data/templates/avery-iso-templates.xml.h:2 -#: data/templates/zweckform-iso-templates.xml.h:3 -#: data/templates/misc-us-templates.xml.h:2 -#: data/templates/misc-iso-templates.xml.h:9 -msgid "Business Cards" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:3 -msgid "CD/DVD Labels (Disc Labels)" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:4 -msgid "Diskette Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:5 -#, fuzzy -msgid "Filing Labels" -msgstr "¼Ðñ" - -#: data/templates/avery-us-templates.xml.h:6 -msgid "Full Sheet Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:7 -#, fuzzy -msgid "Large Round Labels" -msgstr "¥Ñ¸Tñ¶}¯Å" - -#: data/templates/avery-us-templates.xml.h:8 -msgid "Name Badge Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:9 -msgid "Return Address Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:10 -msgid "Shipping Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:11 -#, fuzzy -msgid "Small Round Labels" -msgstr "¥Ñ¸Tñ¶}¯Å" - -#: data/templates/avery-us-templates.xml.h:12 -#, fuzzy -msgid "Square Labels" -msgstr "¼Ðñ" - -#: data/templates/avery-us-templates.xml.h:13 -msgid "Video Tape Face Labels" -msgstr "" - -#: data/templates/avery-us-templates.xml.h:14 -msgid "Video Tape Spine Labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:1 -msgid "Address labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:3 -msgid "CD Booklet" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:4 -msgid "CD Inlet" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:5 -#: data/templates/zweckform-iso-templates.xml.h:4 -#: data/templates/misc-us-templates.xml.h:4 -#: data/templates/misc-iso-templates.xml.h:10 -#, fuzzy -msgid "CD/DVD Labels" -msgstr "¼Ðñ" - -#: data/templates/avery-iso-templates.xml.h:6 -msgid "Diskette labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:7 -#: data/templates/zweckform-iso-templates.xml.h:7 -#: data/templates/misc-iso-templates.xml.h:17 -msgid "Mailing Labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:8 -#, fuzzy -msgid "Mailing labels" -msgstr "¼Ðñ" - -#: data/templates/avery-iso-templates.xml.h:9 -msgid "Mini Address Labels" -msgstr "" - -#: data/templates/avery-iso-templates.xml.h:10 -#, fuzzy -msgid "Shipping labels" -msgstr "¶}±Ò¼Ðñ" - -#: data/templates/zweckform-iso-templates.xml.h:2 -msgid "Allround Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:5 -msgid "Correction and Cover-up Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:6 -msgid "Lever Arch File Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:8 -msgid "QSL-Karten Etiketten 70mm x 50,8mm" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:9 -msgid "Rectangular Copier Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:10 -#: data/templates/misc-iso-templates.xml.h:22 -msgid "Rectangular Labels" -msgstr "" - -#: data/templates/zweckform-iso-templates.xml.h:11 -msgid "Video Labels (back)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:1 -msgid "Business Card CD" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:3 -msgid "CD Template Rectangles" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:5 -msgid "CD/DVD Labels (Face Only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:6 -#: data/templates/misc-iso-templates.xml.h:11 -msgid "CD/DVD Labels (face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:7 -#, fuzzy -msgid "DLT Labels" -msgstr "¼Ðñ" - -#: data/templates/misc-us-templates.xml.h:8 -msgid "Microtube labels" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:9 -msgid "Mini-CD Labels" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:10 -msgid "PRO CD Labels 2-up (CD spine only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:11 -msgid "PRO CD Labels 2-up (Face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:12 -#: data/templates/misc-iso-templates.xml.h:21 -msgid "PRO CD Labels 2-up (face only)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:13 -msgid "Slimline CD Case (rightside up)" -msgstr "" - -#: data/templates/misc-us-templates.xml.h:14 -msgid "Slimline CD Case (upside down)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:1 -msgid "Agipa 119488: Business Cards" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:2 -msgid "Allround Labels --24" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:3 -msgid "Allround Labels --44" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:4 -msgid "Allround Labels --64" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:5 -msgid "Allround Labels --65" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:6 -msgid "Arch File Labels" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:7 -msgid "Arch File Labels (large)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:8 -msgid "Arch File Labels (small)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:12 -msgid "CD/DVD Labels Standard Format (face only)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:13 -msgid "Diskette Labels (face only)" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:14 -msgid "EPSON Photo Stickers 16" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:15 -msgid "Etiketten" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:16 -msgid "Fridge Magnet Stickers" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:18 -msgid "Mailing Labels --14" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:19 -msgid "Mailing Labels-2 columns" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:20 -msgid "Mailing Labels-3 columns" -msgstr "" - -#: data/templates/misc-iso-templates.xml.h:23 -msgid "Video Labels (face only)" -msgstr "" - -#: data/desktop/glabels.desktop.in.h:1 -msgid "Create labels, business cards and media covers." -msgstr "" - -#: data/desktop/glabels.desktop.in.h:2 -msgid "gLabels Label Designer" -msgstr "" - -#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 -#, fuzzy -msgid "gLabels Project File" -msgstr "¤å¦r¼Ë»ª" - -#, fuzzy -#~ msgid "Object _Properties..." -#~ msgstr "¤å¦r¼Ë»ª" - -#~ msgid "Display units" -#~ msgstr "Åã¥Ü³æ¦ì" - -#~ msgid "Default page size" -#~ msgstr "¹w³]¯È±i¤j¤p" - -#~ msgid "Outline" -#~ msgstr "¥~Ãä" - -#~ msgid "Edit line object properties" -#~ msgstr "­×§ï½uª«¥óªº³]©w" - -#~ msgid "Edit text object properties" -#~ msgstr "­×§ï¤å¦rª«¥óªº³]©w" - -#~ msgid "Maintain current aspect ratio" -#~ msgstr "«O¯d²{¦³ªº¤j¤p¤ñ¨Ò" - -#, fuzzy -#~ msgid "CD Labels" -#~ msgstr "¼Ðñ" - -#, fuzzy -#~ msgid "Open %s" -#~ msgstr "¶}±Ò" - -#~ msgid "Revert to saved copy of %s?" -#~ msgstr "­n¸ü¤J¤wÀx¦sªº³Æ¥÷ %s ?" - -#~ msgid "Unknown media type. Using default." -#~ msgstr "¤£©úªº´CÅéÃþ§Î. ¨Ï¥Î¹w³]." - -#~ msgid "" -#~ "``%s'' has been modified.\n" -#~ "\n" -#~ "Do you wish to save it?" -#~ msgstr "" -#~ "``%s`` ¤w³Q­×§ï.\n" -#~ "\n" -#~ "­n²{¦bÀx¦s¶Ü ?" - -#~ msgid "Close / Save label as" -#~ msgstr "Ãö³¬ / Àx¦s¼Ðñ¬°..." - -#~ msgid "Label no longer valid!" -#~ msgstr "¼Ðñ¨Ã¤£¬O¥¿½T¥iŪªº !" - -#~ msgid "Error writing file" -#~ msgstr "¦b¼g¤JÀɮ׮ɵo¥Í¿ù»~" - -#~ msgid "Edit properties..." -#~ msgstr "­×§ï³]©w..." - -#~ msgid "Appearance" -#~ msgstr "¼Ë»ª" - -#~ msgid "Position/Size" -#~ msgstr "¦ì¸m/¤j¤p" - -#~ msgid "Image format not currently supported" -#~ msgstr "¹Ï¹³®æ¦¡¨Ã¨S¦³¤ä´©" - -#~ msgid "Barcode data" -#~ msgstr "¼Æ½X±ø¸ê®Æ" - -#~ msgid "%" -#~ msgstr "%" - -#~ msgid "Show text with barcode" -#~ msgstr "Åã¥Ü¼Æ½X±ø¤å¦r" - -#~ msgid "Fields" -#~ msgstr "Äæ¦ì" - -#~ msgid "Column" -#~ msgstr "¦C" - -#~ msgid "Sample data" -#~ msgstr "¼Ë¥»¸ê®Æ" - -#~ msgid "Make a new, empty label" -#~ msgstr "»s§@·sÀÉ, ªÅªº¼Ëñ" - -#~ msgid " New " -#~ msgstr " ·s¼W " - -#~ msgid "New Label/Card" -#~ msgstr "·s¼W¼Ðñ/¥d" - -#~ msgid " Open " -#~ msgstr " ¶}±Ò " - -#~ msgid " Save " -#~ msgstr " Àx¦s " - -#~ msgid " Print " -#~ msgstr " ¦C¦L " - -#~ msgid "Function is not implemented!" -#~ msgstr "¥\¯à¥¼§¹¦¨ !" diff --git a/glabels2/qrencode-3.1.0/COPYING b/glabels2/qrencode-3.1.0/COPYING deleted file mode 100644 index 2d2d780e..00000000 --- a/glabels2/qrencode-3.1.0/COPYING +++ /dev/null @@ -1,510 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -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 and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes a de-facto standard. To achieve this, non-free programs must -be allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, 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 library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete 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 distribute a copy of this License along with the -Library. - - 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 Library or any portion -of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -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 Library, 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 Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you 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. - - If distribution of 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 satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at least - three years, to give the same user the materials specified in - Subsection 6a, above, for a charge no more than the cost of - performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be 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. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library 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. - - 9. 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 Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -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 with -this License. - - 11. 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 Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library 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 Library. - -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. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library 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. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser 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 Library -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 Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -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 - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "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 -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. 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 LIBRARY 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 -LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -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. - - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or -your school, if any, to sign a "copyright disclaimer" for the library, -if necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James - Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/glabels2/qrencode-3.1.0/ChangeLog b/glabels2/qrencode-3.1.0/ChangeLog deleted file mode 100644 index e4950e9e..00000000 --- a/glabels2/qrencode-3.1.0/ChangeLog +++ /dev/null @@ -1,447 +0,0 @@ -2009.06.06 Kentaro FUKUCHI - * Backported from the main trunk. - * Makefile.am: - - Dependency check was incorrect because of misconfiguration. - * Version 3.1.0 has been released. - -2009.05.30 Kentaro FUKUCHI - * qrinput.c: - - padlen check was wrong in QRinput_appendPaddingBit(). - * tests/test_qrinput.c: - - Stop printing bstream->data. - - test_padding2() has been added. - -2009.05.21 Kentaro FUKUCHI - * qrinput.c: - - 'padding' was not initialize. - -2009.05.20 Kentaro FUKUCHI - * qrenc.c, qrinput.c, qrencode.c: - - Some compile warnings cleared. - * qrencode.c, tests/test_qrencode.c: - - NULL check of an input arg has been added to - QRcode_encodeString8bit(). - - NULL check test and empty string test have been added for - QRcode_encodeString8bit(). - * qrinput.h, qrencode_inner.h, split.c: - - Copyright year updates. - * split.[ch]: - - Split_splitStringToQRinput() set errno EINVAL if input string is - NULL or empty. - - Documentation improved. - * qrenc.c: - - perror() is now used to show the details of some errors. - * qrencode.[ch]: - - Some functions now set errno appropriately. - - Typo fixes. - -2009.05.20 Kentaro FUKUCHI - * tests/create_frame_pattern.c, tests/Makefile.am: - - New test tool "create_frame_pattern" has been added. - * tests/test_qrspec.c: - - test_alignment1() has been replaced with test_newframe(). - test_newframe() compares newly created frames with frame pattern - data created by create_frame_pattern. - * tests/frame, tests/Makefile.am: - - Pattern file "frame" has been added to EXTRA_DIST. - * mask.c: - - Very small improvement. Unnecessary malloc()s are reduced. - * tests/test_qrencode.c: - - Two new tests have been added. - * split.c: - - NULL check and string length check have been added. - * qrspec.c, tests/test_qrinput.c: - - Forgotten padding bits bug has been fixed. (enbugged at 2009.5.18) - - New test for the bug above has been added. - * qrspec.[ch], qrencode_inner.h: - - Some function becomes __STATIC and their declarations have been - moved to qrencode_inner.h. - * tests/prof_qrencode.c: - - Now liberates all heap at the end of the program. - -2009.05.19 Kentaro FUKUCHI - * qrencode.c, qrencode_inner.h: - - calloc() is now used to initialize rsblock. - - Number of malloc()s in RSblock_initBlock() has been integrated to - one malloc() in QRraw_new(). - * rscode.c: - - A very small code improvement. - * qrinput.[ch]: - - More return value checks. - - Code cleanups. - * tests/common.h, tests/test_{split,monkey,qrinput}.c: - - Tests improved. - * qrspec.[ch], tests/test_qrspec.c: - - Code cleanups. - - QRspec_rs{Data,Ecc}Length() have been added. - * tests/view_qrcode.c: - - Code cleanups. - - Disabled mask setting in structured mode. - * tests/common.h: - - assert_nothing() has been added. - * qrinput.c, qrencode.c, tests/test_*.c: - - Various *_free() now allow NULL pointer. (nothing performed) - * qrspec.[ch]: - - Alignment pattern is now put by QRspec_putAlignmentPattern(). - QRspec_getAlignmentPattern() and QRspec_freeAlignment() have been - removed. - -2009.05.18 Kentaro FUKUCHI - * qrencode.c: - - More return value checks. - * bitstream.c: - - BitStream_free() allows NULL pointer (nothing performed). - * qrinput.c: - - QRinput_List_freeEntry() and QRinput_free() allow NULL pointer. - - QRinput_createPaddingBit() has been replaced with - QRinput_appendPaddingBit(). - - QRinput_convertData() now sets errno to EINVAL when input is too - large. - - More return value checks. Mainly for ENOMEM error. - -2009.05.16 Kentaro FUKUCHI - * qrencode.h: - - Indent improvement. - * Makefile.am: - - qrencode.spec has been added to EXTRA_DIST. - -2009.05.14 Kentaro FUKUCHI - * qrinput.c, qrencode.c, qrspe.c: - - More return value checks. Mainly for ENOMEM error. - * qrspec.[ch], qrencode.c, tests/test_qrspec.c: - - QRspec_getEccSpec() now accepts an int array instead to return - multiple values instead of returning dynamic allocated array. - * mask.c, rscode.c: - - More return value checks from malloc(). - * configure.ac: - - Added "--enable-mudflap" option. - * rscode.[ch]: - - Added free_rs_cache() for debug purpose. - * tests/test_{monkey,qrencode,rs}.c: - - Call free_rs_cache() at the end of the tests. - * qrencode.c: - - QRraw_new() and RSblock_init() have been improved. - - Eliminated unnecessary calls of init_rs(). - * autogen.sh, configure.ac: - - Darwin workarounds. - * tests/common.h, tests/test_bitstream.c: - - New tests have been added. - -2009.05.12 Kentaro FUKUCHI - * bitstream.c: - - BitStream_toByte() had returned non-NULL for an empty BitStream. - * tests/test_bitstream.c: - - test_null() has been added. - * qrinput.c: - - A possible memory leak has been eliminated. It happend when a wrong - version number was given. - * tests/test_qriput.c: - - Memory leaks have been eliminated. - -2009.05.01 Kentaro FUKUCHI - * Bumped vertion to 3.1.0. - -2009.04.30 Kentaro FUKUCHI - * bistream.[ch]: - - Internal representation of BitStream has been changed from - NUL-terminated string to unsigned char array. - * tests/common.h, tests/test_{bitstream,qrinput}.c: - - Some test sequences have been updated (see above). - -2009.03.25 Kentaro FUKUCHI - * configure.ac: - - "--without-tests" has become default setting. - * bitstream.[ch]: - - Now functions strictly check return value from malloc() and return - error if it fails. - -2008.10.31 Kentaro FUKUCHI - * tests/commo.h: - - __FUNCTION__ has been replaced with __func__, to follow the C99 - standard. - - The way of variadic macros has been changed, to follow the C99 - standard. - -2008.10.11 Kentaro FUKUCHI - * qrencode_inner.h: - - Now this header is called only by test programs. - * qrencode.c, qrencode_inner.h: - - Some definitions and declares written in qrencode_inner.h have been - moved into qrencode.c: - - QRraw_*() have been declared as __STATIC. - * mask.[ch], qrencode.c, qrencode_inner.h: - - Mask_makeMask() now requires QRecLevel. - - QRencode_writeFormatInformation() has been renamed and moved to - Mask_writeFormatInformation(), and become __STATIC. - * tests/*.c: - - Unneeded #include "qrencode_inner.h" have been removed. - -2008.10.11 Kentaro FUKUCHI - * autogen.sh: - - Darwin workaround. - * configure.ac: - - Now config.h offers "__STATIC" macro becomes "static" when - "--without-tests" is specified. This macro is useful for functions - called from test programs but not from other library codes. - * qrinput.c: - - Very little performance improvement. - * mask.c: - - Code cleanups. - -2008.09.12 Kentaro FUKUCHI - * tests/view_qrcode.c: - - Unused variable 'pitch' has been removed from draw_QRcode(). - -2008.06.03 Kentaro FUKUCHI - * Merged to the main trunk. - -2008.06.01 Kentaro FUKUCHI - * qrenc.c: - - Now it does not show the full usage when unrecognized options are - given. - - When "--help" is given, it displays the long usage. - * Version 3.0.3 has been released. - -2008.05.26 Kentaro FUKUCHI - * qrenc.c, tests/view_qrcode.c: - - getopt_long_only() has been replaced with getopt_long() which is - widely available. (Thanks to Gavan Fantom) - - Now it accepts long options. - * qrencode.1.in: - - followed the above changes. - * Bumped version to 3.0.3. - -2008.05.18 Kentaro FUKUCHI - * qrspec.c: - - The bit order of "Version information" has been corrected. - (Thanks to Paul Janssesn) - * configure.ac, Makefile.am: - - The "--without-tests" has been added to the configure script. - * qrencode.spec.in: - - Uses "--without-tests". - * Version 3.0.2 has been released. - -2008.05.14 Kentaro FUKUCHI - * various files: - - Some compile-time warnings/erros with g++ have been fixed. - (Thanks to wangsai) - -2008.05.09 Kentaro FUKUCHI - * qrenc.c: - - Now qrencode writes an image file in binary mode for non-POSIX - platform, such as MS-Windows. (bug report from Paul Janssens) - * Makefile.am: - - tests/test_all.sh has been added. - * tests/test_all.sh: - - Now it exits immediately if any test fails. - * Version 3.0.1 has been released. - -2008.05.01 Kentaro FUKUCHI - * qrencode.spec.in: - - Added the man page to the files section. - -2008.04.30 Kentaro FUKUCHI - * Version 3.0.0 has been released. - -2008.04.23 Kentaro FUKUCHI - * Version 3.0.0rc3 has been released. - - This will probably be the final release candidate, if all goes well. - -2008.04.23 Kentaro FUKUCHI - * split.c: - - Split_identifyMode() now uses isdigit() and isalnum() macros. - * qrinput.c: - - Error checks have been improved. - * qrenc.c, tests/view_qrcode.c: - - Return value checks have been added. - - Structured-append encode with version 0 now returns error. - * qrencode.[ch]: - - QRencode_encodeStructuredInput() -> QRencode_encodeInputStructured() - (for consistency with other QRencode_encode*Structured() functions) - * mask.c: - - A code block never called has been eliminated. - -2008.04.14 Kentaro FUKUCHI - * Version 3.0.0rc2 has been released. - -2008.04.20 Kentaro FUKUCHI - * qrencode.h: - - QR_MODE_NUL has been added to QRencodeMode. Basically it is used - only by Split_identifyMode(). - * qrinput.[ch], split.c: - - QRinput_identifyMode() has been moved to split.c, changed to static - and now needs a hint. - * split.c: - - Auto-splitting has been improved. - * qrinput.c: - - A memory leak has been fixed. - * configure.ac: - - The "--enable-gprof" and "--enable-gcov" options have been added. - * Makefile.am: - - man1_MANS has been moved into the "if BUILD_TOOLS - endif" block. - -2008.04.14 Kentaro FUKUCHI - * Version 3.0.0rc1 has been released. - -2008.04.14 Kentaro FUKUCHI - * Bumped version to 3.0.0. - * qrencode.[ch]: - - QRcode_encodeInput() has changed the API. Previously it takes a - QRinput, version and level, but now it takes only a QRinput, because - QRinput holds the version and level in it. From 3.0.0, you should - set them by calling QRinput_setVersion() and - QRinput_setErrorCorrectionLevel(), or use QRinput_new2() to - instantiate a QRinput object. - -2008.04.14 Kentaro FUKUCHI - * qrspe.c: - - NULL check has been added. - * split.[ch]: - - API changed. - * qrencode.c: - - Arguments (version and level) are now checked in QRcode_encodeMask(). - Internal functions trust the arguments are valid. - - Error checks improved. - * qrinput.c: - - Error checks improved. - * qrencode.h: - - Documentation improvements. - -2008.04.13 Kentaro FUKUCHI - * qrencode.c, qrencode_innter.h, tests/view_qrcode.c: - - Changed API of QRcode_encodeMask(). - * qrencode.[ch], qrinput.[ch], split.[ch]: - - Some functions now set errno appropriately. - -2008.04.09 Kentaro FUKUCHI - * qrencode.h, qrinput.c: - - QRinput_Struct_insertStructuredAppendHeaders() and - QRinput_insertStructuredAppendHeader now returns error, when the - input contains too many structured inputs. - * qrencode.c: - - QRcode_encodeInputToStructured() now returns NULL when - QRinput_splitQRinputToStruct() fails. - * tests/view_qrcode.c: - - Segmentation fault bug has been fixed. (see previous memo) - -2008.04.08 Kentaro FUKUCHI - * qrinput.c: - - Fixed a bug in QRinput_estimateBitStreamSizeOfEntry(). It could - overestimate the size. - * rscode.c: - - Optimized the order of the parameters equality test in init_rs(). - * qrspec.c, qrspec.h: - - Added QRspec_clearCache(). - * tests/test_estimatebit.c: - - Bug fixed in test_numbit3(). - -2008.04.07 Kentaro FUKUCHI - * Bumped version to 2.1.0. - * Structured append is now supported (patches from Yusuke Mihara): - - Two new types, QRcode_List and QRinput_Struct, have been added. - - Following functions have been added: - - QRcode_encodeStructuredInput() - - QRcode_encodeStringStructured() - - QRcode_encodeString8bitStructured() - - Some functions to handle structured append symbols have been added. - See Doxygen-ized descriptions for the details. - * qrenc.c: - - "-S" option has been added for structured append. - * split.h: - - "extern" was dropped. - * qrinput.h, qrencode.h: - - Moved declarations of QRinput_{get,set}{Version,ErrorCorrectionLevel} - from qrinput.h to qrencode.h. Now they are publicly accessible. - * qrencode.h, qrinput.h, qrinput.c: - - Added QRinput_new2(). - - QRinput_newEntry(), QRinput_freeEntry have been renamed to - QRinput_List_newEntry(), QRinput_List_freeEntry(). - * split.c: - - Bug fix: Split_eat8() now eats at least 1 byte. Previously it could - produce a 0-length input entry. - -2008.01.23 Kentaro FUKUCHI - * qrencode.1.in, Makefile.am, configure.ac: - - Manpage of qrencode has been added. - * qrenc.c, tests/view_qrcode.c: - - Usage message has been updated. - -2008.01.18 Kentaro FUKUCHI - * split.c: - - Bug fixes. - * tests/test_split.c: - - Followed recent API changes. - - Added new test "test_toupper()". - * qrenc.c, tests/view_qrcode.c: - - Source-level compatibility has been improved. - - view_qrcode now accepts stdin like qrencode. - - Usage message has been updated/fixed. - * Copyright year has been updated. - -2008.01.16 Kentaro FUKUCHI - * qrinput.c, split.c: - - Case-sensitive mode becomes now default mode. - - Alphabet-Numeric mode now encodes only upper-case alphabet and - numeric characters. If "-i" option is given, split.c converts - lower-case characters to upper-case characters at first. - * qrenc.c, tests/view_qrcode.c: - - Case-sensitive mode becomes now default mode. - - Option "-i" has been added. - -2007.12.14 Kentaro FUKUCHI - * tests/test_qrencode.c: - - New test has been added. - * tests/view_qrcode.c: - - Options supported. - - Default mask is now -1 (auto). - -2007.12.13 Kentaro FUKUCHI - * qrencode.[ch]: - - QRcode_writeFormatInformation now returns a number of dark modules. - * mask.c: - - The mask evaluation function now writes format information before - evaluation. (Philippe Delcroix) - * split.[ch]: - - Case-sensitive mode has been added to QRcode_encodeString(). - - "-8" option has been added to qrenc.c. - - "-c" now encodes in improved case-sensitive mode. - * tests/test_{split,qrencode}.c: - - test_split*() have been moved to test_split.c. - -2007.12.10 Kentaro FUKUCHI - * Bumped version to 2.0.0. - * Merged to main trunk. - * mask.[ch], split.[ch]: - - Masking functions and splitString functions are separated from - qrencode.c. - * mqrspec.[ch]: - - Specification of Micro QR code has been added, but not used yet. - -2007.03.24 Kentaro FUKUCHI - * Bumped version to 1.0.2. - -2007.03.24 Kentaro FUKUCHI - * qrencode.c (QRcode_splitStringToQRinput): - - a small bug fix. (Thanks to NANKI Haruo) - * qrencode.h: - - "extern "C"" barrier has been added for C++. - * test/view_qrcode.c: - - a typo fix. - -2006.12.27 Kentaro FUKUCHI - * Bumped version to 1.0.1. - -2006.12.27 Kentaro FUKUCHI - * qrenc.c, qrencode.[ch]: - - Added force 8-bit encoding mode. - * Makefile.am : - - Automake/Autoconf files have been added to dist-package. - -2006.12.17 Kentaro FUKUCHI - * qrencode_inner.h, qrencode.c: - - Removed unused member variable "b2" from QRRawCode. - * configure.ac, Makefile.am, acinclude.m4: - - Better configuration of libpng. (now uses pkg-config correctly) - -2006.12.02 Kentaro FUKUCHI - * Bumped version to 1.0.0. diff --git a/glabels2/qrencode-3.1.0/Doxyfile b/glabels2/qrencode-3.1.0/Doxyfile deleted file mode 100644 index f4aa9431..00000000 --- a/glabels2/qrencode-3.1.0/Doxyfile +++ /dev/null @@ -1,1252 +0,0 @@ -# Doxyfile 1.4.7 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = QRencode - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = YES - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = qrencode.h - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/glabels2/qrencode-3.1.0/Makefile.am b/glabels2/qrencode-3.1.0/Makefile.am deleted file mode 100644 index ab517d0d..00000000 --- a/glabels2/qrencode-3.1.0/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -INCLUDES = \ - $(GLABELS_CFLAGS) - -QR_ENCODE_FILES = \ - qrencode.c \ - qrencode.h \ - qrencode_inner.h \ - qrinput.c \ - qrinput.h \ - bitstream.c \ - bitstream.h \ - qrspec.c \ - qrspec.h \ - rscode.c \ - rscode.h \ - split.c \ - split.h \ - mask.c \ - mask.h - - -noinst_LTLIBRARIES = libqrencode.la - -libqrencode_la_SOURCES = $(QR_ENCODE_FILES) - -EXTRA_DIST = \ - acinclude.m4 \ - autogen.sh \ - configure.ac.dist \ - ChangeLog \ - COPYING \ - Doxyfile \ - libqrencode.pc.in \ - Makefile.am \ - Makefile.am.dist \ - Makefile.in.dist \ - NEWS \ - qrencode.spec.in \ - qrencode.spec \ - qrencode.1.in \ - README \ - README.glabels \ - tests/common.h \ - tests/create_frame_pattern.c \ - tests/frame \ - tests/Makefile.am \ - tests/Makefile.in \ - tests/prof_qrencode.c \ - tests/test_all.sh \ - tests/test_bitstream.c \ - tests/test_estimatebit.c \ - tests/test_monkey.c \ - tests/test_qrencode.c \ - tests/test_qrinput.c \ - tests/test_qrspec.c \ - tests/test_rs.c \ - tests/test_split.c \ - tests/view_qrcode.c \ - TODO \ - use/compile \ - use/config.guess \ - use/config.sub \ - use/depcomp \ - use/install-sh \ - use/ltmain.sh \ - use/missing diff --git a/glabels2/qrencode-3.1.0/Makefile.am.dist b/glabels2/qrencode-3.1.0/Makefile.am.dist deleted file mode 100644 index f48b6ed4..00000000 --- a/glabels2/qrencode-3.1.0/Makefile.am.dist +++ /dev/null @@ -1,36 +0,0 @@ -AUTOMAKE_OPTIONS = foreign - -SUBDIRS = . - -if BUILD_TESTS -SUBDIRS += tests -endif - -lib_LTLIBRARIES = libqrencode.la - -libqrencode_la_SOURCES = qrencode.c qrencode_inner.h \ - qrinput.c qrinput.h \ - bitstream.c bitstream.h \ - qrspec.c qrspec.h \ - rscode.c rscode.h \ - split.c split.h \ - mask.c mask.h - -libqrencode_la_LDFLAGS = -version-number $(MAJOR_VERSION):$(MINOR_VERSION):$(MICRO_VERSION) - -include_HEADERS = qrencode.h - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libqrencode.pc - -EXTRA_DIST = libqrencode.pc.in autogen.sh configure.ac acinclude.m4 \ - Makefile.am tests/Makefile.am qrencode.spec.in qrencode.spec \ - qrencode.1.in Doxyfile tests/test_all.sh - -if BUILD_TOOLS -bin_PROGRAMS = qrencode -qrencode_SOURCES = qrenc.c -qrencode_CFLAGS = $(png_CFLAGS) -qrencode_LDADD = libqrencode.la $(png_LIBS) -man1_MANS = qrencode.1 -endif diff --git a/glabels2/qrencode-3.1.0/Makefile.in.dist b/glabels2/qrencode-3.1.0/Makefile.in.dist deleted file mode 100644 index b9a518dd..00000000 --- a/glabels2/qrencode-3.1.0/Makefile.in.dist +++ /dev/null @@ -1,944 +0,0 @@ -# Makefile.in generated by automake 1.10.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 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. - -@SET_MAKE@ - - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@BUILD_TESTS_TRUE@am__append_1 = tests -@BUILD_TOOLS_TRUE@bin_PROGRAMS = qrencode$(EXEEXT) -subdir = . -DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(srcdir)/libqrencode.pc.in \ - $(srcdir)/qrencode.1.in $(srcdir)/qrencode.spec.in \ - $(top_srcdir)/configure COPYING ChangeLog NEWS TODO \ - use/compile use/config.guess use/config.sub use/depcomp \ - use/install-sh use/ltmain.sh use/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = libqrencode.pc qrencode.spec qrencode.1 -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libqrencode_la_LIBADD = -am_libqrencode_la_OBJECTS = qrencode.lo qrinput.lo bitstream.lo \ - qrspec.lo rscode.lo split.lo mask.lo -libqrencode_la_OBJECTS = $(am_libqrencode_la_OBJECTS) -libqrencode_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libqrencode_la_LDFLAGS) $(LDFLAGS) -o $@ -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am__qrencode_SOURCES_DIST = qrenc.c -@BUILD_TOOLS_TRUE@am_qrencode_OBJECTS = qrencode-qrenc.$(OBJEXT) -qrencode_OBJECTS = $(am_qrencode_OBJECTS) -am__DEPENDENCIES_1 = -@BUILD_TOOLS_TRUE@qrencode_DEPENDENCIES = libqrencode.la \ -@BUILD_TOOLS_TRUE@ $(am__DEPENDENCIES_1) -qrencode_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(qrencode_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/use/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libqrencode_la_SOURCES) $(qrencode_SOURCES) -DIST_SOURCES = $(libqrencode_la_SOURCES) $(am__qrencode_SOURCES_DIST) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(man1_MANS) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgconfig_DATA) -includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = . tests -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAJOR_VERSION = @MAJOR_VERSION@ -MAKEINFO = @MAKEINFO@ -MICRO_VERSION = @MICRO_VERSION@ -MINOR_VERSION = @MINOR_VERSION@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_CONFIG = @SDL_CONFIG@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -png_CFLAGS = @png_CFLAGS@ -png_LIBS = @png_LIBS@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign -SUBDIRS = . $(am__append_1) -lib_LTLIBRARIES = libqrencode.la -libqrencode_la_SOURCES = qrencode.c qrencode_inner.h \ - qrinput.c qrinput.h \ - bitstream.c bitstream.h \ - qrspec.c qrspec.h \ - rscode.c rscode.h \ - split.c split.h \ - mask.c mask.h - -libqrencode_la_LDFLAGS = -version-number $(MAJOR_VERSION):$(MINOR_VERSION):$(MICRO_VERSION) -include_HEADERS = qrencode.h -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libqrencode.pc -EXTRA_DIST = libqrencode.pc.in autogen.sh configure.ac acinclude.m4 \ - Makefile.am tests/Makefile.am qrencode.spec.in qrencode.spec \ - qrencode.1.in Doxyfile tests/test_all.sh - -@BUILD_TOOLS_TRUE@qrencode_SOURCES = qrenc.c -@BUILD_TOOLS_TRUE@qrencode_CFLAGS = $(png_CFLAGS) -@BUILD_TOOLS_TRUE@qrencode_LDADD = libqrencode.la $(png_LIBS) -@BUILD_TOOLS_TRUE@man1_MANS = qrencode.1 -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -libqrencode.pc: $(top_builddir)/config.status $(srcdir)/libqrencode.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -qrencode.spec: $(top_builddir)/config.status $(srcdir)/qrencode.spec.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -qrencode.1: $(top_builddir)/config.status $(srcdir)/qrencode.1.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libqrencode.la: $(libqrencode_la_OBJECTS) $(libqrencode_la_DEPENDENCIES) - $(libqrencode_la_LINK) -rpath $(libdir) $(libqrencode_la_OBJECTS) $(libqrencode_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -qrencode$(EXEEXT): $(qrencode_OBJECTS) $(qrencode_DEPENDENCIES) - @rm -f qrencode$(EXEEXT) - $(qrencode_LINK) $(qrencode_OBJECTS) $(qrencode_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitstream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrencode-qrenc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrencode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrinput.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrspec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rscode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -qrencode-qrenc.o: qrenc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qrencode_CFLAGS) $(CFLAGS) -MT qrencode-qrenc.o -MD -MP -MF $(DEPDIR)/qrencode-qrenc.Tpo -c -o qrencode-qrenc.o `test -f 'qrenc.c' || echo '$(srcdir)/'`qrenc.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/qrencode-qrenc.Tpo $(DEPDIR)/qrencode-qrenc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='qrenc.c' object='qrencode-qrenc.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qrencode_CFLAGS) $(CFLAGS) -c -o qrencode-qrenc.o `test -f 'qrenc.c' || echo '$(srcdir)/'`qrenc.c - -qrencode-qrenc.obj: qrenc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qrencode_CFLAGS) $(CFLAGS) -MT qrencode-qrenc.obj -MD -MP -MF $(DEPDIR)/qrencode-qrenc.Tpo -c -o qrencode-qrenc.obj `if test -f 'qrenc.c'; then $(CYGPATH_W) 'qrenc.c'; else $(CYGPATH_W) '$(srcdir)/qrenc.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/qrencode-qrenc.Tpo $(DEPDIR)/qrencode-qrenc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='qrenc.c' object='qrencode-qrenc.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qrencode_CFLAGS) $(CFLAGS) -c -o qrencode-qrenc.obj `if test -f 'qrenc.c'; then $(CYGPATH_W) 'qrenc.c'; else $(CYGPATH_W) '$(srcdir)/qrenc.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-man1: $(man1_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $$i; then file=$$i; \ - else file=$(srcdir)/$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -# 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. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - 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) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - 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) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \ - config.h -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-includeHEADERS install-man \ - install-pkgconfigDATA - -install-dvi: install-dvi-recursive - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: install-man1 - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-man uninstall-pkgconfigDATA - -uninstall-man: uninstall-man1 - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-binPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzma \ - dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man install-man1 install-pdf \ - install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-man uninstall-man1 uninstall-pkgconfigDATA - -# 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/glabels2/qrencode-3.1.0/NEWS b/glabels2/qrencode-3.1.0/NEWS deleted file mode 100644 index ebe82537..00000000 --- a/glabels2/qrencode-3.1.0/NEWS +++ /dev/null @@ -1,149 +0,0 @@ -libqrencode NEWS - Overview of changes -====================================== - -Version 3.1.0 (2009.6.6) ------------------------- -* Various code cleanups and performance improves. -* Strict internal error checks have been added. -* "--without-tests" has become default setting. Specify "--with-tests" to - compile test programs. -* Some memory leak bugs have been fixed. - -Release Note: - -This release focuses on the code cleanup and performance improve. Encoding time -has been improved, drastically in large symbols. Basically this update only -changes its internal code. The API is not changed, no need to recompile user -applications that includes only qrencode.h. If your application refers the -internal data representation (not recommended), see ChangeLog for further -information. - -Version 3.0.3 (2008.6.1) ------------------------- -* Portability enhancement. (Thanks to Gavan Fantom) -* The command line tool "qrencode" now accepts long options. See the man page - for the detailed instruction. - -Release Note: - -This release improves the portability of our command line tool "qrencode". -The library is not changed so that any applications using libqrencode are not -affected. - -From this release, qrencode accepts "long" options, such as "--help". See the -manpage for the detailed instructions. - -Qrencode now uses getopt_long() instead of getopt_long_only() which is not -available in some operating systems. If the getopt_long() is not provided or -the implementation of it is not compatible with GNU's one, please try -qrencode-3.0.3-gnulib, that contains the source code of the getopt_long(). -Gnulib version is a test release. If you feel happy with it, please let us know -and the future releases will include gnulib. - -Version 3.0.2 (2008.5.18) -------------------------- -* Some compile-time warnings/erros with g++ have been fixed. - (Thanks to wangsai) -* The bit order of "Version information" has been corrected. - Symbols greater than version 6 were affected. (Thanks to Paul Janssesn) -* The "--without-tests" option has been added to the configure script. - -Version 3.0.1 (2008.5.9) ------------------------- -* A bug fix for non-POSIX platform. (Thanks to Paul Janssens) -* The RPM spec file now packages the man page correctly. - -Version 3.0.0 (2008.4.30) -------------------------- -* The interface of QRencode_encodeInput() has been changed. User applications - using it must be modified. -* Structured append support has been added. (patches from Yusuke Mihara) -* The "-S" option for structured append has been added to qrencode and - view_qrcode. -* Some functions now set errno to indicate errors. -* Some bug fixes. - -Release Note: - -Now libqrencode supports "structured-append" of symbols. A large data set can -be split into multiple QR code symbols. The basic usage of structured-append -is not so different from the single symbol encoding: just call -QRcode_encodeStringStructured() or QRcode_encodeString8bitStructured() and -they return a list of symbols. Instead of giving a string, you can encode -an explicitly typed data. See the manual generated by Doxygen for the detailed -usage. - -Many thanks to Yusuke Mihara, who contributed a patch to add support of -structured-append to version 1.0.2. - -API changes: -* Incompatible API changes: - - QRencode_encodeInput -* New types: - - QRinput_Struct - - QRcode_List -* New functions: - - QRinput_new2 - - QRinput_Struct_new - - QRinput_Struct_setParity - - QRinput_Struct_appendInput - - QRinput_Struct_free - - QRinput_Struct_insertStructuredAppendHeaders - - QRinput_splitQRinputToStruct - - QRcode_encodeStructuredInput - - QRcode_encodeStringStructured - - QRcode_encodeString8bitStructured - - QRcode_List_size - - QRcode_List_free -* Declarations moved to qrencode.h: - - QRinput_getErrorCorrectionLevel - - QRinput_setErrorCorrectionLevel - - QRinput_getVersion - - QRinput_setVersion - -Version 2.0.0 (2008.1.24) --------------------------- -Summary: -* "-i" option to ignore case distinctions has been added to qrencode and - view_qrcode. -* "-c" option (case-sensitive mode) of qrencode is now enabled by default and - has been improved. See details in Release Note section. -* "-8" option has been added to qrencode to encode whole data in 8-bit mode. -* tests/view_qrcode now accepts various options like qrencode. -* Man page has been added. -* Code cleanup. -* The mask evaluation bug has been fixed. (Philippe Delcroix) - -* API changes - - QRcode_encodeString() now receives case-sensitive flag. - - QRcode_encodeStringCase() has been removed. - - QRcode_encodeString8bit() has been added. - -Release Note: - -Previously libqrencode encodes lower-case alphabet characters in Alphabet- -Numeric mode (upper-case alphabet and numeric) by default. According to the -specification of QR code, however, it is clearly claimed that Alphabet-Numeric -mode provides only upper-case alphabet (+ numeric and some symbol) characters. -Since this version, libqrencode distinguishes lower-case and upper-case of -alphabet characters by default. Because of that, "-c" option of qrencode -is now deprecated, and "-i" option has been added. By giving "-i", qrencode -converts lower-case characters to upper-case if possible, then encode a QR code -symbol. Please read qrencode.h for the details about API changes if you are -going to use this library. - -Many thanks to NANKI Haruo for his suggestions. - -Version 1.0.2 (2007.03.24) --------------------------- -* A small bug fix. (Thanks to NANKI Haruo) -* 'extern "C"' barrier has been added to qrencode.h. - -Version 1.0.1 (2006.12.27) --------------------------- -* Added "force 8-bit encoding mode". -* Configure script finds libpng's header correctly. - -Version 1.0.0 (2006.12.12) --------------------------- -* The first public release. diff --git a/glabels2/qrencode-3.1.0/README b/glabels2/qrencode-3.1.0/README deleted file mode 100644 index f99ad69b..00000000 --- a/glabels2/qrencode-3.1.0/README +++ /dev/null @@ -1,115 +0,0 @@ -libqrencode 3.1.0 - QR Code encoding library - -GENERAL INFORMATION -=================== -Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D -symbology that can be scanned by handy terminals such as a mobile phone with -CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has -high robustness. - -Libqrencode accepts a string or a list of data chunks then encodes in a QR Code -symbol as a bitmap array. While other QR Code applications generate an image -file, using libqrencode allows applications to render QR Code symbols from raw -bitmap data directly. This library also contains a command-line utility outputs -a QR Code symbol as a PNG image. It will help light-weight CGI programs. - - -SPECIFICATION -============= -Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial -Standards) X0510:2004 or ISO/IEC 18004. Most of features in the specification -are implemented such as: -- Numeric, alphabet, Japanese kanji (Shift-JIS) or any 8 bit code can be - embedded -- Optimized encoding of a string -- Structured-append of symbols - -Currently the following features are not supported: -- ECI and FNC1 mode -- Micro QR Code -- QR Code model 1 (deprecated) - - -INSTALL -======= - -Requirements ------------- -Some test programs or utility tools uses SDL or PNG, but the library itself -has no dependencies. You can skip compiling those tools if you want not to -install programs using SDL or PNG. - -Compile & install ------------------ -Just try - -./configure -make -make install - -This compiles and installs the library and header file to the appropriate -directories. By default, /usr/local/lib and /usr/local/include. You can change -the destination directory by passing some options to the configure script. -Run "./configure --help" to see the list of options. - -It also installs a binary "qrencode" to /usr/local/bin. If you want not to -install it, give "--without-tools" option to the configure script. - - -USAGE -===== -Basic usages of this library are written in the header file (qrencode.h). -You can generate a manual of the library by using Doxygen. - - -WARNINGS -======== -Some functions are THREAD UNSAFE. See qrencode.h for the details. - -Carefully use the qrencode command if it is used by a web application (CGI). -For example, giving "-s" option with too large number to qrencode may cause DoS. -You should limit the parameter by your application. - - -LICENSING INFORMATION -===================== -Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 2.1 of the License, or any later version. - -This library is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along -with this library; if not, write to the Free Software Foundation, Inc., 51 -Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - -CONTACTS -======== -Visit the homepage at: - -http://megaui.net/fukuchi/works/qrencode/index.en.html - -for new releases. - -Please mail any bug reports, suggestions, comments and questions to -Kentaro Fukuchi . Questions of license compliance -are also welcome. - - -ACKNOWLEDGMENTS -=============== -QR Code is registered trademarks of DENSO WAVE INCORPORATED in JAPAN and other -countries. - -Reed-Solomon code encoder is written by Phil Karn, KA9Q. -Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q - -NANKI Haruo - improved lower-case characteres encoding -Philippe Delcroix - improved mask evaluation -Yusuke Mihara - structured-append support -Shigeyuki Hirai, Paul Janssens, wangsai, Gavan Fantom - bug report / suggestion diff --git a/glabels2/qrencode-3.1.0/README.glabels b/glabels2/qrencode-3.1.0/README.glabels deleted file mode 100644 index a6c41da9..00000000 --- a/glabels2/qrencode-3.1.0/README.glabels +++ /dev/null @@ -1,8 +0,0 @@ -The following changes have been made to the stock qrencode-3.1.0 distribution -to facilitate compilation with glabels: - - Makefile.am renamed to Makefile.am.dist - Makefile.in renamed to Makefile.in.dist - configure.ac renamed to configure.ac.dist - added Makefile.am, which is configured from ../configure.in - diff --git a/glabels2/qrencode-3.1.0/TODO b/glabels2/qrencode-3.1.0/TODO deleted file mode 100644 index 8564ee9a..00000000 --- a/glabels2/qrencode-3.1.0/TODO +++ /dev/null @@ -1,12 +0,0 @@ -Thread unsafe. -Only two functions, QRspec_newFrame() and init_rs(), are thread unsafe, but -most of qrencode functions are thread unsafe because of them. - -This package contains -*.c and *.h files (total): 8077 lines, 198863 bytes. -configure script : 22539 lines, 725612 bytes. -It's absolutely crazy. - -Documents (not only the README, but also the manual of the library) needs -revision of grammer, spell or to resolve ambiguity or incomplete descriptions. -Feel really free to send us your revision. diff --git a/glabels2/qrencode-3.1.0/acinclude.m4 b/glabels2/qrencode-3.1.0/acinclude.m4 deleted file mode 100644 index e69de29b..00000000 diff --git a/glabels2/qrencode-3.1.0/aclocal.m4 b/glabels2/qrencode-3.1.0/aclocal.m4 deleted file mode 100644 index 9d176209..00000000 --- a/glabels2/qrencode-3.1.0/aclocal.m4 +++ /dev/null @@ -1,9217 +0,0 @@ -# generated automatically by aclocal 1.10.2 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This file 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. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, -[m4_warning([this file was generated for autoconf 2.63. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file 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. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file 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. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file 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. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file 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. - -# Generated from ltversion.in. - -# serial 3012 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6]) -m4_define([LT_PACKAGE_REVISION], [1.3012]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6' -macro_revision='1.3012' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file 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. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) - -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES - -# Configure paths for SDL -# Sam Lantinga 9/21/99 -# stolen from Manish Singh -# stolen back from Frank Belew -# stolen from Manish Singh -# Shamelessly stolen from Owen Taylor - -dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS -dnl -AC_DEFUN([AM_PATH_SDL], -[dnl -dnl Get the cflags and libraries from the sdl-config script -dnl -AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], - sdl_prefix="$withval", sdl_prefix="") -AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], - sdl_exec_prefix="$withval", sdl_exec_prefix="") -AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], - , enable_sdltest=yes) - - if test x$sdl_exec_prefix != x ; then - sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config - fi - fi - if test x$sdl_prefix != x ; then - sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_prefix/bin/sdl-config - fi - fi - - if test "x$prefix" != xNONE; then - PATH="$prefix/bin:$prefix/usr/bin:$PATH" - fi - AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) - min_sdl_version=ifelse([$1], ,0.11.0,$1) - AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) - no_sdl="" - if test "$SDL_CONFIG" = "no" ; then - no_sdl=yes - else - SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` - SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` - - sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_sdltest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_CXXFLAGS="$CXXFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $SDL_CFLAGS" - CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" -dnl -dnl Now check if the installed SDL is sufficiently new. (Also sanity -dnl checks the results of sdl-config to some extent -dnl - rm -f conf.sdltest - AC_TRY_RUN([ -#include -#include -#include -#include "SDL.h" - -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main (int argc, char *argv[]) -{ - int major, minor, micro; - char *tmp_version; - - /* This hangs on some systems (?) - system ("touch conf.sdltest"); - */ - { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_sdl_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_sdl_version"); - exit(1); - } - - if (($sdl_major_version > major) || - (($sdl_major_version == major) && ($sdl_minor_version > minor)) || - (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); - printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); - printf("*** to point to the correct copy of sdl-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - -],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_sdl" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$SDL_CONFIG" = "no" ; then - echo "*** The sdl-config script installed by SDL could not be found" - echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the SDL_CONFIG environment variable to the" - echo "*** full path to sdl-config." - else - if test -f conf.sdltest ; then - : - else - echo "*** Could not run SDL test program, checking why..." - CFLAGS="$CFLAGS $SDL_CFLAGS" - CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" - AC_TRY_LINK([ -#include -#include "SDL.h" - -int main(int argc, char *argv[]) -{ return 0; } -#undef main -#define main K_and_R_C_main -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding SDL or finding the wrong" - echo "*** version of SDL. If it is not finding SDL, 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 SDL was incorrectly installed" - echo "*** or that you have moved SDL since it was installed. In the latter case, you" - echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - SDL_CFLAGS="" - SDL_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(SDL_CFLAGS) - AC_SUBST(SDL_LIBS) - rm -f conf.sdltest -]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10.2], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10.2])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 8 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 9 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 13 - -# 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. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 3 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 5 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# 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 conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $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]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file 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. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([acinclude.m4]) diff --git a/glabels2/qrencode-3.1.0/autogen.sh b/glabels2/qrencode-3.1.0/autogen.sh deleted file mode 100755 index d1b19557..00000000 --- a/glabels2/qrencode-3.1.0/autogen.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -set -e - -if [ `uname -s` = Darwin ]; then - LIBTOOLIZE=glibtoolize -else - LIBTOOLIZE=libtoolize -fi - -if [ -d /usr/local/share/aclocal ]; then - ACLOCAL_DIR=/usr/local/share/aclocal -elif [ -d /opt/local/share/aclocal ]; then - ACLOCAL_DIR=/opt/local/share/aclocal -elif [ -d /usr/share/aclocal ]; then - ACLOCAL_DIR=/usr/share/aclocal -fi - -if [ ! -d use ]; then - mkdir use -fi - -autoheader - -aclocal -I $ACLOCAL_DIR - -$LIBTOOLIZE --automake --copy -automake --add-missing --copy - -autoconf diff --git a/glabels2/qrencode-3.1.0/bitstream.c b/glabels2/qrencode-3.1.0/bitstream.c deleted file mode 100644 index 36a8ee6e..00000000 --- a/glabels2/qrencode-3.1.0/bitstream.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Binary sequence class. - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include - -#include "bitstream.h" - -BitStream *BitStream_new(void) -{ - BitStream *bstream; - - bstream = (BitStream *)malloc(sizeof(BitStream)); - if(bstream == NULL) return NULL; - - bstream->length = 0; - bstream->data = NULL; - - return bstream; -} - -static int BitStream_allocate(BitStream *bstream, int length) -{ - unsigned char *data; - - if(bstream == NULL) { - return -1; - } - - data = (unsigned char *)malloc(length); - if(data == NULL) { - return -1; - } - - if(bstream->data) { - free(bstream->data); - } - bstream->length = length; - bstream->data = data; - - return 0; -} - -static BitStream *BitStream_newFromNum(int bits, unsigned int num) -{ - unsigned int mask; - int i; - unsigned char *p; - BitStream *bstream; - - bstream = BitStream_new(); - if(bstream == NULL) return NULL; - - if(BitStream_allocate(bstream, bits)) { - BitStream_free(bstream); - return NULL; - } - - p = bstream->data; - mask = 1 << (bits - 1); - for(i=0; i> 1; - } - - return bstream; -} - -static BitStream *BitStream_newFromBytes(int size, unsigned char *data) -{ - unsigned char mask; - int i, j; - unsigned char *p; - BitStream *bstream; - - bstream = BitStream_new(); - if(bstream == NULL) return NULL; - - if(BitStream_allocate(bstream, size * 8)) { - BitStream_free(bstream); - return NULL; - } - - p = bstream->data; - for(i=0; i> 1; - } - } - - return bstream; -} - -int BitStream_append(BitStream *bstream, BitStream *arg) -{ - unsigned char *data; - - if(arg == NULL) { - return -1; - } - if(arg->length == 0) { - return 0; - } - if(bstream->length == 0) { - if(BitStream_allocate(bstream, arg->length)) { - return -1; - } - memcpy(bstream->data, arg->data, arg->length); - return 0; - } - - data = (unsigned char *)malloc(bstream->length + arg->length); - if(data == NULL) { - return -1; - } - memcpy(data, bstream->data, bstream->length); - memcpy(data + bstream->length, arg->data, arg->length); - - free(bstream->data); - bstream->length += arg->length; - bstream->data = data; - - return 0; -} - -int BitStream_appendNum(BitStream *bstream, int bits, unsigned int num) -{ - BitStream *b; - int ret; - - if(bits == 0) return 0; - - b = BitStream_newFromNum(bits, num); - if(b == NULL) return -1; - - ret = BitStream_append(bstream, b); - BitStream_free(b); - - return ret; -} - -int BitStream_appendBytes(BitStream *bstream, int size, unsigned char *data) -{ - BitStream *b; - int ret; - - if(size == 0) return 0; - - b = BitStream_newFromBytes(size, data); - if(b == NULL) return -1; - - ret = BitStream_append(bstream, b); - BitStream_free(b); - - return ret; -} - -unsigned char *BitStream_toByte(BitStream *bstream) -{ - int i, j, size, bytes; - unsigned char *data, v; - unsigned char *p; - - size = BitStream_size(bstream); - if(size == 0) { - return NULL; - } - data = (unsigned char *)malloc((size + 7) / 8); - if(data == NULL) { - return NULL; - } - - bytes = size / 8; - - p = bstream->data; - for(i=0; idata); - free(bstream); - } -} diff --git a/glabels2/qrencode-3.1.0/bitstream.h b/glabels2/qrencode-3.1.0/bitstream.h deleted file mode 100644 index 5a5ac904..00000000 --- a/glabels2/qrencode-3.1.0/bitstream.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Binary sequence class. - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __BITSTREAM_H__ -#define __BITSTREAM_H__ - -typedef struct { - int length; - unsigned char *data; -} BitStream; - -extern BitStream *BitStream_new(void); -extern int BitStream_append(BitStream *bstream, BitStream *arg); -extern int BitStream_appendNum(BitStream *bstream, int bits, unsigned int num); -extern int BitStream_appendBytes(BitStream *bstream, int size, unsigned char *data); -#define BitStream_size(__bstream__) (__bstream__->length) -extern unsigned char *BitStream_toByte(BitStream *bstream); -extern void BitStream_free(BitStream *bstream); - -#endif /* __BITSTREAM_H__ */ diff --git a/glabels2/qrencode-3.1.0/config.h.in b/glabels2/qrencode-3.1.0/config.h.in deleted file mode 100644 index 30a0f4b9..00000000 --- a/glabels2/qrencode-3.1.0/config.h.in +++ /dev/null @@ -1,75 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to 'static' if no test programs will be compiled. */ - #define __STATIC static - diff --git a/glabels2/qrencode-3.1.0/configure b/glabels2/qrencode-3.1.0/configure deleted file mode 100755 index 917cb2f8..00000000 --- a/glabels2/qrencode-3.1.0/configure +++ /dev/null @@ -1,15327 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="QRencode" -ac_unique_file="qrencode.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='LTLIBOBJS -LIBOBJS -HAVE_SDL_FALSE -HAVE_SDL_TRUE -SDL_LIBS -SDL_CFLAGS -SDL_CONFIG -BUILD_TESTS_FALSE -BUILD_TESTS_TRUE -png_LIBS -png_CFLAGS -BUILD_TOOLS_FALSE -BUILD_TOOLS_TRUE -PKG_CONFIG -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -lt_ECHO -RANLIB -AR -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -SED -LIBTOOL -EGREP -GREP -CPP -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -VERSION -MICRO_VERSION -MINOR_VERSION -MAJOR_VERSION -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_static -enable_dependency_tracking -enable_shared -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -with_tools -with_tests -with_sdl_prefix -with_sdl_exec_prefix -enable_sdltest -enable_gprof -enable_gcov -enable_mudflap -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -PKG_CONFIG -png_CFLAGS -png_LIBS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -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=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -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_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$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 ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$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 | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$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 ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - 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 | -n) - 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 ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$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_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=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 ;; - - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# 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 the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - 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 - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # 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 <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --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 - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-static[=PKGS] build static libraries [default=no] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --disable-sdltest Do not try to compile and run a test SDL program - --enable-gprof generate extra code to write profile information - suitable for gprof [default=no] - --enable-gcov generate extra code to write coverage information - suitable for gcov [default=no] - --enable-mudflap generate extra code to check memory leaks - [default=no] - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-tools build utility tools [default=yes] - --with-tests build tests [default=no] - --with-sdl-prefix=PFX Prefix where SDL is installed (optional) - --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional) - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - PKG_CONFIG path to pkg-config utility - png_CFLAGS C compiler flags for png, overriding pkg-config - png_LIBS linker flags for png, overriding pkg-config - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.63 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -MAJOR_VERSION=3 -MINOR_VERSION=1 -MICRO_VERSION=0 -VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION - - - - - - -ac_config_headers="$ac_config_headers config.h" - -ac_aux_dir= -for ac_dir in use "$srcdir"/use; 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 - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in use \"$srcdir\"/use" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in use \"$srcdir\"/use" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -$as_echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -am__api_version='1.10' - -# 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 -# AmigaOS /C/install, which installs bootblocks on floppy discs -# 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" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /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 - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -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. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&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}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# 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 conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $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". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE=qrencode - VERSION=$VERSION - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=no -fi - - - - - - - - - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_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 $# != 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 - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&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 -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* 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; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_const=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const /**/ -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_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 $# != 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 - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&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 -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* 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; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -if test "x$CC" != xcc; then - { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define NO_MINUS_C_MINUS_O 1 -_ACEOF - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - -# 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 -# AmigaOS /C/install, which installs bootblocks on floppy discs -# 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" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /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 - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -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. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&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}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.6' -macro_revision='1.3012' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6046: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:6049: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:6052: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:$LINENO: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 7257 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - lt_cv_cc_needs_belf=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - lt_cv_ld_exported_symbols_list=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8665: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8669: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9004: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9008: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9109: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:9113: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9164: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:9168: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - link_all_deplibs=no - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF -int foo(void) {} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes -fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* 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_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* 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_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_svld_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_dld_link=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11977 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 12073 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi - -ac_config_files="$ac_config_files Makefile libqrencode.pc tests/Makefile qrencode.spec qrencode.1" - - - -# Check whether --with-tools was given. -if test "${with_tools+set}" = set; then - withval=$with_tools; build_tools=$withval -else - build_tools=yes -fi - - if test "x$build_tools" = "xyes" ; then - BUILD_TOOLS_TRUE= - BUILD_TOOLS_FALSE='#' -else - BUILD_TOOLS_TRUE='#' - BUILD_TOOLS_FALSE= -fi - -if test x$build_tools = xyes ; then - -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for png" >&5 -$as_echo_n "checking for png... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$png_CFLAGS"; then - pkg_cv_png_CFLAGS="$png_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\"libpng12\"\"") >&5 - ($PKG_CONFIG --exists --print-errors ""libpng12"") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_png_CFLAGS=`$PKG_CONFIG --cflags ""libpng12"" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$png_LIBS"; then - pkg_cv_png_LIBS="$png_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\"libpng12\"\"") >&5 - ($PKG_CONFIG --exists --print-errors ""libpng12"") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_png_LIBS=`$PKG_CONFIG --libs ""libpng12"" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - png_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors ""libpng12""` - else - png_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors ""libpng12""` - fi - # Put the nasty error message in config.log where it belongs - echo "$png_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (\"libpng12\") were not met: - -$png_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables png_CFLAGS -and png_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (\"libpng12\") were not met: - -$png_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables png_CFLAGS -and png_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables png_CFLAGS -and png_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables png_CFLAGS -and png_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - png_CFLAGS=$pkg_cv_png_CFLAGS - png_LIBS=$pkg_cv_png_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi -fi - - -# Check whether --with-tests was given. -if test "${with_tests+set}" = set; then - withval=$with_tests; build_tests=$withval -else - build_tests=no -fi - - if test "x$build_tests" = "xyes" ; then - BUILD_TESTS_TRUE= - BUILD_TESTS_FALSE='#' -else - BUILD_TESTS_TRUE='#' - BUILD_TESTS_FALSE= -fi - - - -if test x$build_tests = xyes ; then -echo "#define __STATIC" >>confdefs.h -else -echo "#define __STATIC static" >>confdefs.h -fi - - -if test x$build_tests = xyes ; then - SDL_REQUIRED_VERSION=1.2.0 - -# Check whether --with-sdl-prefix was given. -if test "${with_sdl_prefix+set}" = set; then - withval=$with_sdl_prefix; sdl_prefix="$withval" -else - sdl_prefix="" -fi - - -# Check whether --with-sdl-exec-prefix was given. -if test "${with_sdl_exec_prefix+set}" = set; then - withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval" -else - sdl_exec_prefix="" -fi - -# Check whether --enable-sdltest was given. -if test "${enable_sdltest+set}" = set; then - enableval=$enable_sdltest; -else - enable_sdltest=yes -fi - - - if test x$sdl_exec_prefix != x ; then - sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config - fi - fi - if test x$sdl_prefix != x ; then - sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_prefix/bin/sdl-config - fi - fi - - if test "x$prefix" != xNONE; then - PATH="$prefix/bin:$prefix/usr/bin:$PATH" - fi - # Extract the first word of "sdl-config", so it can be a program name with args. -set dummy sdl-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SDL_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $SDL_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no" - ;; -esac -fi -SDL_CONFIG=$ac_cv_path_SDL_CONFIG -if test -n "$SDL_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5 -$as_echo "$SDL_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - min_sdl_version=$SDL_REQUIRED_VERSION - { $as_echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5 -$as_echo_n "checking for SDL - version >= $min_sdl_version... " >&6; } - no_sdl="" - if test "$SDL_CONFIG" = "no" ; then - no_sdl=yes - else - SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` - SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` - - sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test "x$enable_sdltest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_CXXFLAGS="$CXXFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $SDL_CFLAGS" - CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" - rm -f conf.sdltest - if test "$cross_compiling" = yes; then - echo $ac_n "cross compiling; assumed OK... $ac_c" -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include -#include "SDL.h" - -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main (int argc, char *argv[]) -{ - int major, minor, micro; - char *tmp_version; - - /* This hangs on some systems (?) - system ("touch conf.sdltest"); - */ - { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_sdl_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_sdl_version"); - exit(1); - } - - if (($sdl_major_version > major) || - (($sdl_major_version == major) && ($sdl_minor_version > minor)) || - (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); - printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); - printf("*** to point to the correct copy of sdl-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - - -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -no_sdl=yes -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_sdl" = x ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - if test "$SDL_CONFIG" = "no" ; then - echo "*** The sdl-config script installed by SDL could not be found" - echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the SDL_CONFIG environment variable to the" - echo "*** full path to sdl-config." - else - if test -f conf.sdltest ; then - : - else - echo "*** Could not run SDL test program, checking why..." - CFLAGS="$CFLAGS $SDL_CFLAGS" - CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include "SDL.h" - -int main(int argc, char *argv[]) -{ return 0; } -#undef main -#define main K_and_R_C_main - -int -main () -{ - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding SDL or finding the wrong" - echo "*** version of SDL. If it is not finding SDL, 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" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means SDL was incorrectly installed" - echo "*** or that you have moved SDL since it was installed. In the latter case, you" - echo "*** may want to edit the sdl-config script: $SDL_CONFIG" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - SDL_CFLAGS="" - SDL_LIBS="" - { $as_echo "$as_me:$LINENO: WARNING: *** SDL $SDL_REQUIRED_VERSION or better is required." >&5 -$as_echo "$as_me: WARNING: *** SDL $SDL_REQUIRED_VERSION or better is required." >&2;} - fi - - - rm -f conf.sdltest - -fi - if test "x$SDL_CFLAGS" != "x" ; then - HAVE_SDL_TRUE= - HAVE_SDL_FALSE='#' -else - HAVE_SDL_TRUE='#' - HAVE_SDL_FALSE= -fi - - - -# Check whether --enable-gprof was given. -if test "${enable_gprof+set}" = set; then - enableval=$enable_gprof; -else - enable_gprof=no -fi - - -# Check whether --enable-gcov was given. -if test "${enable_gcov+set}" = set; then - enableval=$enable_gcov; -else - enable_gcov=no -fi - - -# Check whether --enable-mudflap was given. -if test "${enable_mudflap+set}" = set; then - enableval=$enable_mudflap; -else - enable_mudflap=no -fi - - -CFLAGS="-Wall $CFLAGS" - -if test $enable_gprof = yes; then - CFLAGS="$CFLAGS -g -pg" -fi - -if test $enable_gcov = yes; then - CFLAGS="$CFLAGS --coverage" -fi - -if test $enable_mudflap = yes; then - CFLAGS="$CFLAGS -fmudflap" - LDFLAGS="$LDFLAGS -lmudflap" -fi - -cat >confcache <<\_ACEOF -# 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, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# 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. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${BUILD_TOOLS_TRUE}" && test -z "${BUILD_TOOLS_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_TOOLS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_TOOLS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${BUILD_TESTS_TRUE}" && test -z "${BUILD_TESTS_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${HAVE_SDL_TRUE}" && test -z "${HAVE_SDL_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_SDL\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"HAVE_SDL\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTION]... [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "libqrencode.pc") CONFIG_FILES="$CONFIG_FILES libqrencode.pc" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "qrencode.spec") CONFIG_FILES="$CONFIG_FILES qrencode.spec" ;; - "qrencode.1") CONFIG_FILES="$CONFIG_FILES qrencode.1" ;; - - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=' ' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - -echo "" -echo "Options used to compile and link:" -echo " CC = $CC" -echo " CFLAGS = $CFLAGS" -echo " CPPFLAGS = $CPPFLAGS" -echo " CXX = $CXX" -echo " CXXFLAGS = $CXXFLAGS" -echo " LDFLAGS = $LDFLAGS" -echo "" diff --git a/glabels2/qrencode-3.1.0/configure.ac.dist b/glabels2/qrencode-3.1.0/configure.ac.dist deleted file mode 100644 index 9ae82f9d..00000000 --- a/glabels2/qrencode-3.1.0/configure.ac.dist +++ /dev/null @@ -1,102 +0,0 @@ -AC_INIT(QRencode) - -MAJOR_VERSION=3 -MINOR_VERSION=1 -MICRO_VERSION=0 -VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION -AC_SUBST(MAJOR_VERSION) -AC_SUBST(MINOR_VERSION) -AC_SUBST(MICRO_VERSION) -AC_SUBST(VERSION) - -AC_CONFIG_SRCDIR([qrencode.c]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_AUX_DIR(use) -AC_CONFIG_MACRO_DIR([m4]) -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -AM_INIT_AUTOMAKE(qrencode, $VERSION) - -AC_DISABLE_STATIC -AC_C_CONST -AC_C_INLINE -AC_HEADER_STDC - -AC_PROG_CC -AM_PROG_CC_C_O -AC_PROG_INSTALL -AC_PROG_LIBTOOL -PKG_PROG_PKG_CONFIG - -AC_CONFIG_FILES([Makefile libqrencode.pc tests/Makefile qrencode.spec qrencode.1]) - -dnl --with-tools -AC_ARG_WITH([tools], [AC_HELP_STRING([--with-tools], [build utility tools [default=yes]])], - [build_tools=$withval], [build_tools=yes]) -AM_CONDITIONAL(BUILD_TOOLS, [test "x$build_tools" = "xyes" ]) -if test x$build_tools = xyes ; then - PKG_CHECK_MODULES(png, "libpng12") -fi - -dnl --with-tests -AC_ARG_WITH([tests], [AC_HELP_STRING([--with-tests], [build tests [default=no]])], - [build_tests=$withval], [build_tests=no]) -AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes" ]) -AH_VERBATIM([tests], -[/* Define to 'static' if no test programs will be compiled. */ - #define __STATIC static - ]) -if test x$build_tests = xyes ; then -echo "#define __STATIC" >>confdefs.h -else -echo "#define __STATIC static" >>confdefs.h -fi - - -if test x$build_tests = xyes ; then - SDL_REQUIRED_VERSION=1.2.0 - AM_PATH_SDL($SDL_REQUIRED_VERSION,,AC_MSG_WARN([*** SDL $SDL_REQUIRED_VERSION or better is required.])) -fi -AM_CONDITIONAL(HAVE_SDL, [test "x$SDL_CFLAGS" != "x" ]) - - -dnl --enable-gprof -AC_ARG_ENABLE([gprof], [AC_HELP_STRING([--enable-gprof], [generate extra code to write profile information suitable for gprof [default=no]])], - [], [enable_gprof=no]) - -dnl --enable-gcov -AC_ARG_ENABLE([gcov], [AC_HELP_STRING([--enable-gcov], [generate extra code to write coverage information suitable for gcov [default=no]])], - [], [enable_gcov=no]) - -dnl --enable-mudflap -AC_ARG_ENABLE([mudflap], [AC_HELP_STRING([--enable-mudflap], [generate extra code to check memory leaks [default=no]])], - [], [enable_mudflap=no]) - -dnl set CFLAGS -CFLAGS="-Wall $CFLAGS" - -if test $enable_gprof = yes; then - CFLAGS="$CFLAGS -g -pg" -fi - -if test $enable_gcov = yes; then - CFLAGS="$CFLAGS --coverage" -fi - -if test $enable_mudflap = yes; then - CFLAGS="$CFLAGS -fmudflap" - LDFLAGS="$LDFLAGS -lmudflap" -fi - -AC_OUTPUT - -echo "" -echo "Options used to compile and link:" -echo " CC = $CC" -echo " CFLAGS = $CFLAGS" -echo " CPPFLAGS = $CPPFLAGS" -echo " CXX = $CXX" -echo " CXXFLAGS = $CXXFLAGS" -echo " LDFLAGS = $LDFLAGS" -echo "" diff --git a/glabels2/qrencode-3.1.0/libqrencode.pc.in b/glabels2/qrencode-3.1.0/libqrencode.pc.in deleted file mode 100644 index da3c8de5..00000000 --- a/glabels2/qrencode-3.1.0/libqrencode.pc.in +++ /dev/null @@ -1,9 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libqrencode -Description: A QR Code encoding library -Version: @VERSION@ -Libs: -L${libdir} -lqrencode diff --git a/glabels2/qrencode-3.1.0/mask.c b/glabels2/qrencode-3.1.0/mask.c deleted file mode 100644 index 9bf1279e..00000000 --- a/glabels2/qrencode-3.1.0/mask.c +++ /dev/null @@ -1,296 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Masking. - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include "config.h" -#include "qrencode.h" -#include "qrspec.h" -#include "mask.h" - -__STATIC int Mask_writeFormatInformation(int width, unsigned char *frame, int mask, QRecLevel level) -{ - unsigned int format; - unsigned char v; - int i; - int blacks = 0; - - format = QRspec_getFormatInfo(mask, level); - - for(i=0; i<8; i++) { - if(format & 1) { - blacks += 2; - v = 0x85; - } else { - v = 0x84; - } - frame[width * 8 + width - 1 - i] = v; - if(i < 6) { - frame[width * i + 8] = v; - } else { - frame[width * (i + 1) + 8] = v; - } - format= format >> 1; - } - for(i=0; i<7; i++) { - if(format & 1) { - blacks += 2; - v = 0x85; - } else { - v = 0x84; - } - frame[width * (width - 7 + i) + 8] = v; - if(i == 0) { - frame[width * 8 + 7] = v; - } else { - frame[width * 8 + 6 - i] = v; - } - format= format >> 1; - } - - return blacks; -} - -/** - * Demerit coefficients. - * See Section 8.8.2, pp.45, JIS X0510:2004. - */ -#define N1 (3) -#define N2 (3) -#define N3 (40) -#define N4 (10) - -#define MASKMAKER(__exp__) \ - int x, y;\ - int b = 0;\ -\ - for(y=0; y= 5) { - demerit += N1 + (runLength[i] - 5); - //n1 += N1 + (runLength[i] - 5); - } - if((i & 1)) { - if(i >= 3 && i < length-2 && (runLength[i] % 3) == 0) { - fact = runLength[i] / 3; - if(runLength[i-2] == fact && - runLength[i-1] == fact && - runLength[i+1] == fact && - runLength[i+2] == fact) { - if(runLength[i-3] < 0 || runLength[i-3] >= 4 * fact) { - demerit += N3; - //n3 += N3; - } else if(i+3 >= length || runLength[i+3] >= 4 * fact) { - demerit += N3; - //n3 += N3; - } - } - } - } - } - - return demerit; -} - -__STATIC int Mask_evaluateSymbol(int width, unsigned char *frame) -{ - int x, y; - unsigned char *p; - unsigned char b22, w22; - int head; - int demerit = 0; - - p = frame; - for(y=0; y 0 && y > 0) { - b22 = p[0] & p[-1] & p[-width] & p [-width-1]; - w22 = p[0] | p[-1] | p[-width] | p [-width-1]; - if((b22 | (w22 ^ 1))&1) { - demerit += N2; - } - } - if(x == 0 && (p[0] & 1)) { - runLength[0] = -1; - head = 1; - runLength[head] = 1; - } else if(x > 0) { - if((p[0] ^ p[-1]) & 1) { - head++; - runLength[head] = 1; - } else { - runLength[head]++; - } - } - p++; - } - demerit += Mask_calcN1N3(head+1, runLength); - } - - for(x=0; x 0) { - if((p[0] ^ p[-width]) & 1) { - head++; - runLength[head] = 1; - } else { - runLength[head]++; - } - } - p+=width; - } - demerit += Mask_calcN1N3(head+1, runLength); - } - - return demerit; -} - -unsigned char *Mask_mask(int width, unsigned char *frame, QRecLevel level) -{ - int i; - unsigned char *mask, *bestMask; - int minDemerit = INT_MAX; - int bestMaskNum = 0; - int blacks; - int demerit; - - mask = (unsigned char *)malloc(width * width); - if(mask == NULL) return NULL; - bestMask = NULL; - - for(i=0; i<8; i++) { -// n1 = n2 = n3 = n4 = 0; - demerit = 0; - blacks = maskMakers[i](width, frame, mask); - blacks += Mask_writeFormatInformation(width, mask, i, level); - blacks = 100 * blacks / (width * width); - demerit = (abs(blacks - 50) / 5) * N4; -// n4 = demerit; - demerit += Mask_evaluateSymbol(width, mask); -// printf("(%d,%d,%d,%d)=%d\n", n1, n2, n3 ,n4, demerit); - if(demerit < minDemerit) { - minDemerit = demerit; - bestMaskNum = i; - if(bestMask != NULL) { - free(bestMask); - } - bestMask = (unsigned char *)malloc(width * width); - if(bestMask == NULL) break; - memcpy(bestMask, mask, width * width); - } - } - free(mask); - return bestMask; -} diff --git a/glabels2/qrencode-3.1.0/mask.h b/glabels2/qrencode-3.1.0/mask.h deleted file mode 100644 index 1c227ab6..00000000 --- a/glabels2/qrencode-3.1.0/mask.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Masking. - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __MASK_H__ -#define __MASK_H__ - -#include "qrinput.h" - -extern unsigned char *Mask_makeMask(int width, unsigned char *frame, int mask, QRecLevel level); -extern unsigned char *Mask_mask(int width, unsigned char *frame, QRecLevel level); - -#endif /* __MASK_H__ */ diff --git a/glabels2/qrencode-3.1.0/qrenc.c b/glabels2/qrencode-3.1.0/qrenc.c deleted file mode 100644 index c68aec31..00000000 --- a/glabels2/qrencode-3.1.0/qrenc.c +++ /dev/null @@ -1,453 +0,0 @@ -/** - * qrencode - QR Code encoder - * - * QR Code encoding tool - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include - -#include "config.h" -#include "qrencode.h" - -static int casesensitive = 1; -static int eightbit = 0; -static int version = 0; -static int size = 3; -static int margin = 4; -static int structured = 0; -static QRecLevel level = QR_ECLEVEL_L; -static QRencodeMode hint = QR_MODE_8; - -static const struct option options[] = { - {"help" , no_argument , NULL, 'h'}, - {"output" , required_argument, NULL, 'o'}, - {"level" , required_argument, NULL, 'l'}, - {"size" , required_argument, NULL, 's'}, - {"symversion" , required_argument, NULL, 'v'}, - {"margin" , required_argument, NULL, 'm'}, - {"structured" , no_argument , NULL, 'S'}, - {"kanji" , no_argument , NULL, 'k'}, - {"casesensitive", no_argument , NULL, 'c'}, - {"ignorecase" , no_argument , NULL, 'i'}, - {"8bit" , no_argument , NULL, '8'}, - {"version" , no_argument , NULL, 'V'}, - {NULL, 0, NULL, 0} -}; - -static char *optstring = "ho:l:s:v:m:Skci8V"; - -static void usage(int help, int longopt) -{ - fprintf(stderr, -"qrencode version %s\n" -"Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi\n", VERSION); - if(help) { - if(longopt) { - fprintf(stderr, -"Usage: qrencode [OPTION]... [STRING]\n" -"Encode input data in a QR Code and save as a PNG image.\n\n" -" -h, --help display the help message. -h displays only the help of short\n" -" options.\n\n" -" -o FILENAME, --output=FILENAME\n" -" write PNG image to FILENAME. If '-' is specified, the result\n" -" will be output to standard output. If -S is given, structured\n" -" symbols are written to FILENAME-01.png, FILENAME-02.png, ...;\n" -" if specified, remove a trailing '.png' from FILENAME.\n\n" -" -s NUMBER, --size=NUMBER\n" -" specify the size of dot (pixel). (default=3)\n\n" -" -l {LMQH}, --level={LMQH}\n" -" specify error collectin level from L (lowest) to H (highest).\n" -" (default=L)\n\n" -" -v NUMBER, --symversion=NUMBER\n" -" specify the version of the symbol. (default=auto)\n\n" -" -m NUMBER, --margin=NUMBER\n" -" specify the width of margin. (default=4)\n\n" -" -S, --structured\n" -" make structured symbols. Version must be specified.\n\n" -" -k, --kanji assume that the input text contains kanji (shift-jis).\n\n" -" -c, --casesensitive\n" -" encode lower-case alphabet characters in 8-bit mode. (default)\n\n" -" -i, --ignorecase\n" -" ignore case distinctions and use only upper-case characters.\n\n" -" -8, -8bit encode entire data in 8-bit mode. -k, -c and -i will be ignored.\n\n" -" -V, --version\n" -" display the version number and copyrights of the qrencode.\n\n" -" [STRING] input data. If it is not specified, data will be taken from\n" -" standard input.\n" - ); - } else { - fprintf(stderr, -"Usage: qrencode [OPTION]... [STRING]\n" -"Encode input data in a QR Code and save as a PNG image.\n\n" -" -h display this message.\n" -" --help display the usage of long options.\n" -" -o FILENAME write PNG image to FILENAME. If '-' is specified, the result\n" -" will be output to standard output. If -S is given, structured\n" -" symbols are written to FILENAME-01.png, FILENAME-02.png, ...;\n" -" if specified, remove a trailing '.png' from FILENAME.\n" -" -s NUMBER specify the size of dot (pixel). (default=3)\n" -" -l {LMQH} specify error collectin level from L (lowest) to H (highest).\n" -" (default=L)\n" -" -v NUMBER specify the version of the symbol. (default=auto)\n" -" -m NUMBER specify the width of margin. (default=4)\n" -" -S make structured symbols. Version must be specified.\n" -" -k assume that the input text contains kanji (shift-jis).\n" -" -c encode lower-case alphabet characters in 8-bit mode. (default)\n" -" -i ignore case distinctions and use only upper-case characters.\n" -" -8 encode entire data in 8-bit mode. -k, -c and -i will be ignored.\n" -" -V display the version number and copyrights of the qrencode.\n" -" [STRING] input data. If it is not specified, data will be taken from\n" -" standard input.\n" - ); - } - } -} - -#define MAX_DATA_SIZE (7090 * 16) /* from the specification */ -static char *readStdin(void) -{ - char *buffer; - int ret; - - buffer = (char *)malloc(MAX_DATA_SIZE); - if(buffer == NULL) { - fprintf(stderr, "Memory allocation failed.\n"); - exit(EXIT_FAILURE); - } - ret = fread(buffer, 1, MAX_DATA_SIZE, stdin); - if(ret == 0) { - fprintf(stderr, "No input data.\n"); - exit(EXIT_FAILURE); - } - if(feof(stdin) == 0) { - fprintf(stderr, "Input data is too large.\n"); - exit(EXIT_FAILURE); - } - - buffer[ret] = '\0'; - - return buffer; -} - -static int writePNG(QRcode *qrcode, const char *outfile) -{ - static FILE *fp; // avoid clobbering by setjmp. - png_structp png_ptr; - png_infop info_ptr; - unsigned char *row, *p, *q; - int x, y, xx, yy, bit; - int realwidth; - - realwidth = (qrcode->width + margin * 2) * size; - row = (unsigned char *)malloc((realwidth + 7) / 8); - if(row == NULL) { - fprintf(stderr, "Failed to allocate memory.\n"); - exit(EXIT_FAILURE); - } - - if(outfile[0] == '-' && outfile[1] == '\0') { - fp = stdout; - } else { - fp = fopen(outfile, "wb"); - if(fp == NULL) { - fprintf(stderr, "Failed to create file: %s\n", outfile); - perror(NULL); - exit(EXIT_FAILURE); - } - } - - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if(png_ptr == NULL) { - fprintf(stderr, "Failed to initialize PNG writer.\n"); - exit(EXIT_FAILURE); - } - - info_ptr = png_create_info_struct(png_ptr); - if(info_ptr == NULL) { - fprintf(stderr, "Failed to initialize PNG write.\n"); - exit(EXIT_FAILURE); - } - - if(setjmp(png_jmpbuf(png_ptr))) { - png_destroy_write_struct(&png_ptr, &info_ptr); - fprintf(stderr, "Failed to write PNG image.\n"); - exit(EXIT_FAILURE); - } - - png_init_io(png_ptr, fp); - png_set_IHDR(png_ptr, info_ptr, - realwidth, realwidth, - 1, - PNG_COLOR_TYPE_GRAY, - PNG_INTERLACE_NONE, - PNG_COMPRESSION_TYPE_DEFAULT, - PNG_FILTER_TYPE_DEFAULT); - png_write_info(png_ptr, info_ptr); - - /* top margin */ - memset(row, 0xff, (realwidth + 7) / 8); - for(y=0; ydata; - for(y=0; ywidth; y++) { - bit = 7; - memset(row, 0xff, (realwidth + 7) / 8); - q = row; - q += margin * size / 8; - bit = 7 - (margin * size % 8); - for(x=0; xwidth; x++) { - for(xx=0; xx 4) { - q = base + strlen(base) - 4; - if(strcasecmp(".png", q) == 0) { - suffix = strdup(q); - *q = '\0'; - } - } - - qrlist = encodeStructured(intext); - if(qrlist == NULL) { - perror("Failed to encode the input data:"); - exit(EXIT_FAILURE); - } - - for(p = qrlist; p != NULL; p = p->next) { - if(p->code == NULL) { - fprintf(stderr, "Failed to encode the input data.\n"); - exit(EXIT_FAILURE); - } - if(suffix) { - snprintf(filename, FILENAME_MAX, "%s-%02d%s", base, i, suffix); - } else { - snprintf(filename, FILENAME_MAX, "%s-%02d", base, i); - } - writePNG(p->code, filename); - i++; - } - - free(base); - if(suffix) { - free(suffix); - } - - QRcode_List_free(qrlist); -} - -int main(int argc, char **argv) -{ - int opt, lindex = -1; - char *outfile = NULL; - char *intext = NULL; - - while((opt = getopt_long(argc, argv, optstring, options, &lindex)) != -1) { - switch(opt) { - case 'h': - if(lindex == 0) { - usage(1, 1); - } else { - usage(1, 0); - } - exit(0); - break; - case 'o': - outfile = optarg; - break; - case 's': - size = atoi(optarg); - if(size <= 0) { - fprintf(stderr, "Invalid size: %d\n", size); - exit(EXIT_FAILURE); - } - break; - case 'v': - version = atoi(optarg); - if(version < 0) { - fprintf(stderr, "Invalid version: %d\n", version); - exit(EXIT_FAILURE); - } - break; - case 'l': - switch(*optarg) { - case 'l': - case 'L': - level = QR_ECLEVEL_L; - break; - case 'm': - case 'M': - level = QR_ECLEVEL_M; - break; - case 'q': - case 'Q': - level = QR_ECLEVEL_Q; - break; - case 'h': - case 'H': - level = QR_ECLEVEL_H; - break; - default: - fprintf(stderr, "Invalid level: %s\n", optarg); - exit(EXIT_FAILURE); - break; - } - break; - case 'm': - margin = atoi(optarg); - if(margin < 0) { - fprintf(stderr, "Invalid margin: %d\n", margin); - exit(EXIT_FAILURE); - } - break; - case 'S': - structured = 1; - case 'k': - hint = QR_MODE_KANJI; - break; - case 'c': - casesensitive = 1; - break; - case 'i': - casesensitive = 0; - break; - case '8': - eightbit = 1; - break; - case 'V': - usage(0, 0); - exit(0); - break; - default: - fprintf(stderr, "Try `qrencode --help' for more information.\n"); - exit(EXIT_FAILURE); - break; - } - } - - if(argc == 1) { - usage(1, 0); - exit(0); - } - - if(outfile == NULL) { - fprintf(stderr, "No output filename is given.\n"); - exit(EXIT_FAILURE); - } - - if(optind < argc) { - intext = argv[optind]; - } - if(intext == NULL) { - intext = readStdin(); - } - - if(structured) { - if(version == 0) { - fprintf(stderr, "Version must be specified to encode structured symbols.\n"); - exit(EXIT_FAILURE); - } - qrencodeStructured(intext, outfile); - } else { - qrencode(intext, outfile); - } - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/qrencode.1.in b/glabels2/qrencode-3.1.0/qrencode.1.in deleted file mode 100644 index 85b26047..00000000 --- a/glabels2/qrencode-3.1.0/qrencode.1.in +++ /dev/null @@ -1,73 +0,0 @@ -.TH QRENCODE 1 "Jan. 23, 2008" "qrencode @VERSION@" -.SH NAME -qrencode \- Encode input data in a QR Code and save as a PNG image. -.SH SYNOPSIS -.B "qrencode" -[OPTION]... -[STRING] - -.SH DESCRIPTION -Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D -symbology that can be scanned by handy terminals such as a mobile phone with -CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has -high robustness. - -Qrencode is a utility software using libqrencode to encode string data in -a QR Code and save as a PNG image. - -.SH OPTIONS -.TP -.B \-h, --help -display help message. -.TP -.B \-o FILENAME, --output=FILENAME -write PNG image to FILENAME. If '-' is specified, the result will be output -to standard output. -.TP -.B \-s NUMBER, --size=NUMBER -specify the size of dot (pixel). (default=3) -.TP -.B \-l {LMQH}, --level={LMQH} -specify error collectin level from L (lowest) to H (highest). (default=L) -.TP -.B \-v NUMBER, --symversion=NUMBER -specify the version of the symbol. (default=auto) -.TP -.B \-m NUMBER, --margin=NUMBER -specify the width of margin. (default=4) -.TP -.B \-S, --structured -make structured symbols. Version must be specified. -.TP -.B \-k, --kanji -assume that the input text contains kanji (shift-jis). -.TP -.B \-c, --casesensitive -encode lower-case alphabet characters in 8-bit mode. (default) -.TP -.B \-i, --ignorecase -ignore case distinctions and use only upper-case characters. -.TP -.B \-8, --8bit -encode entire data in 8-bit mode. -k, -c and -i will be ignored. -.TP -.B \-V, --version -display the version number and copyrights of the qrencode. -.TP -.B [STRING] -input data. If it is not specified, data will be taken from standard input. - -.SH EXAMPLES -.TP -.B qrencode -l L -v 1 -o output.png 'Hello, world!' -encode into a symbol version 1, level L. -.TP -.B qrencode -iSv 1 --output=output.png -read standard input and encode it into a structured-appended symbols in -case-insensitive mode. - -.SH AUTHOR -Written by Kentaro Fukuchi. - -.SH COPYRIGHT -Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi. diff --git a/glabels2/qrencode-3.1.0/qrencode.c b/glabels2/qrencode-3.1.0/qrencode.c deleted file mode 100644 index 1a642f04..00000000 --- a/glabels2/qrencode-3.1.0/qrencode.c +++ /dev/null @@ -1,634 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include - -#include "config.h" -#include "qrencode.h" -#include "qrspec.h" -#include "bitstream.h" -#include "qrinput.h" -#include "rscode.h" -#include "split.h" -#include "mask.h" - -/****************************************************************************** - * Raw code - *****************************************************************************/ - -typedef struct { - int dataLength; - unsigned char *data; - int eccLength; - unsigned char *ecc; -} RSblock; - -typedef struct { - int version; - unsigned char *datacode; - unsigned char *ecccode; - int blocks; - RSblock *rsblock; - int count; - int dataLength; - int eccLength; - int b1; -} QRRawCode; - -static void RSblock_initBlock(RSblock *block, int dl, unsigned char *data, int el, unsigned char *ecc, RS *rs) -{ - block->dataLength = dl; - block->data = data; - block->eccLength = el; - block->ecc = ecc; - - encode_rs_char(rs, data, ecc); -} - -static int RSblock_init(RSblock *blocks, int spec[5], unsigned char *data, unsigned char *ecc) -{ - int i; - RSblock *block; - unsigned char *dp, *ep; - RS *rs; - int el, dl; - - dl = QRspec_rsDataCodes1(spec); - el = QRspec_rsEccCodes1(spec); - rs = init_rs(8, 0x11d, 0, 1, el, 255 - dl - el); - if(rs == NULL) return -1; - - block = blocks; - dp = data; - ep = ecc; - for(i=0; idatacode = QRinput_getByteStream(input); - if(raw->datacode == NULL) { - free(raw); - return NULL; - } - - QRspec_getEccSpec(input->version, input->level, spec); - - raw->version = input->version; - raw->b1 = QRspec_rsBlockNum1(spec); - raw->dataLength = QRspec_rsDataLength(spec); - raw->eccLength = QRspec_rsEccLength(spec); - raw->ecccode = (unsigned char *)malloc(raw->eccLength); - if(raw->ecccode == NULL) { - free(raw->datacode); - free(raw); - return NULL; - } - - raw->blocks = QRspec_rsBlockNum(spec); - raw->rsblock = (RSblock *)calloc(sizeof(RSblock), raw->blocks); - if(raw->rsblock == NULL) { - QRraw_free(raw); - return NULL; - } - ret = RSblock_init(raw->rsblock, spec, raw->datacode, raw->ecccode); - if(ret < 0) { - QRraw_free(raw); - return NULL; - } - - raw->count = 0; - - return raw; -} - -/** - * Return a code (byte). - * This function can be called iteratively. - * @param raw raw code. - * @return code - */ -__STATIC unsigned char QRraw_getCode(QRRawCode *raw) -{ - int col, row; - unsigned char ret; - - if(raw->count < raw->dataLength) { - row = raw->count % raw->blocks; - col = raw->count / raw->blocks; - if(col >= raw->rsblock[row].dataLength) { - row += raw->b1; - } - ret = raw->rsblock[row].data[col]; - } else if(raw->count < raw->dataLength + raw->eccLength) { - row = (raw->count - raw->dataLength) % raw->blocks; - col = (raw->count - raw->dataLength) / raw->blocks; - ret = raw->rsblock[row].ecc[col]; - } else { - return 0; - } - raw->count++; - return ret; -} - -__STATIC void QRraw_free(QRRawCode *raw) -{ - if(raw != NULL) { - free(raw->datacode); - free(raw->ecccode); - if(raw->rsblock != NULL) { - free(raw->rsblock); - } - free(raw); - } -} - -/****************************************************************************** - * Frame filling - *****************************************************************************/ - -typedef struct { - int width; - unsigned char *frame; - int x, y; - int dir; - int bit; -} FrameFiller; - -static FrameFiller *FrameFiller_new(int width, unsigned char *frame) -{ - FrameFiller *filler; - - filler = (FrameFiller *)malloc(sizeof(FrameFiller)); - if(filler == NULL) return NULL; - filler->width = width; - filler->frame = frame; - filler->x = width - 1; - filler->y = width - 1; - filler->dir = -1; - filler->bit = -1; - - return filler; -} - -static unsigned char *FrameFiller_next(FrameFiller *filler) -{ - unsigned char *p; - int x, y, w; - - if(filler->bit == -1) { - filler->bit = 0; - return filler->frame + filler->y * filler->width + filler->x; - } - - x = filler->x; - y = filler->y; - p = filler->frame; - w = filler->width; - - if(filler->bit == 0) { - x--; - filler->bit++; - } else { - x++; - y += filler->dir; - filler->bit--; - } - - if(filler->dir < 0) { - if(y < 0) { - y = 0; - x -= 2; - filler->dir = 1; - if(x == 6) { - x--; - y = 9; - } - } - } else { - if(y == w) { - y = w - 1; - x -= 2; - filler->dir = -1; - if(x == 6) { - x--; - y -= 8; - } - } - } - if(x < 0 || y < 0) return NULL; - - filler->x = x; - filler->y = y; - - if(p[y * w + x] & 0x80) { - // This tail recursion could be optimized. - return FrameFiller_next(filler); - } - return &p[y * w + x]; -} - -#if 0 -unsigned char *FrameFiller_fillerTest(int version) -{ - int width, length; - unsigned char *frame, *p; - FrameFiller *filler; - int i, j; - unsigned char cl = 1; - unsigned char ch = 0; - - width = QRspec_getWidth(version); - frame = QRspec_newFrame(version); - filler = FrameFiller_new(width, frame); - length = QRspec_getDataLength(version, QR_ECLEVEL_L) - + QRspec_getECCLength(version, QR_ECLEVEL_L); - - for(i=0; iversion = version; - qrcode->width = width; - qrcode->data = data; - - return qrcode; -} - -void QRcode_free(QRcode *qrcode) -{ - if(qrcode != NULL) { - free(qrcode->data); - free(qrcode); - } -} - -__STATIC QRcode *QRcode_encodeMask(QRinput *input, int mask) -{ - int width, version; - QRRawCode *raw; - unsigned char *frame, *masked, *p, code, bit; - FrameFiller *filler; - int i, j; - QRcode *qrcode; - - if(input->version < 0 || input->version > QRSPEC_VERSION_MAX) { - errno = EINVAL; - return NULL; - } - if(input->level > QR_ECLEVEL_H) { - errno = EINVAL; - return NULL; - } - - raw = QRraw_new(input); - if(raw == NULL) return NULL; - - version = raw->version; - width = QRspec_getWidth(version); - frame = QRspec_newFrame(version); - if(frame == NULL) { - QRraw_free(raw); - return NULL; - } - filler = FrameFiller_new(width, frame); - if(filler == NULL) { - QRraw_free(raw); - free(frame); - return NULL; - } - - /* inteleaved data and ecc codes */ - for(i=0; idataLength + raw->eccLength; i++) { - code = QRraw_getCode(raw); - bit = 0x80; - for(j=0; j<8; j++) { - p = FrameFiller_next(filler); - *p = 0x02 | ((bit & code) != 0); - bit = bit >> 1; - } - } - QRraw_free(raw); - /* remainder bits */ - j = QRspec_getRemainder(version); - for(i=0; ilevel); - } else { - masked = Mask_makeMask(width, frame, mask, input->level); - } - if(masked == NULL) { - free(frame); - return NULL; - } - qrcode = QRcode_new(version, width, masked); - - free(frame); - - return qrcode; -} - -QRcode *QRcode_encodeInput(QRinput *input) -{ - return QRcode_encodeMask(input, -1); -} - -QRcode *QRcode_encodeString8bit(const char *string, int version, QRecLevel level) -{ - QRinput *input; - QRcode *code; - int ret; - - if(string == NULL) { - errno = EINVAL; - return NULL; - } - - input = QRinput_new2(version, level); - if(input == NULL) return NULL; - - ret = QRinput_append(input, QR_MODE_8, strlen(string), (unsigned char *)string); - if(ret < 0) { - QRinput_free(input); - return NULL; - } - code = QRcode_encodeInput(input); - QRinput_free(input); - - return code; -} - -QRcode *QRcode_encodeString(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive) -{ - QRinput *input; - QRcode *code; - int ret; - - if(hint != QR_MODE_8 && hint != QR_MODE_KANJI) { - errno = EINVAL; - return NULL; - } - - input = QRinput_new2(version, level); - if(input == NULL) return NULL; - - ret = Split_splitStringToQRinput(string, input, hint, casesensitive); - if(ret < 0) { - QRinput_free(input); - return NULL; - } - - code = QRcode_encodeInput(input); - QRinput_free(input); - - return code; -} - -/****************************************************************************** - * Structured QR-code encoding - *****************************************************************************/ - -static QRcode_List *QRcode_List_newEntry(void) -{ - QRcode_List *entry; - - entry = (QRcode_List *)malloc(sizeof(QRcode_List)); - if(entry == NULL) return NULL; - - entry->next = NULL; - entry->code = NULL; - - return entry; -} - -static void QRcode_List_freeEntry(QRcode_List *entry) -{ - if(entry != NULL) { - QRcode_free(entry->code); - free(entry); - } -} - -void QRcode_List_free(QRcode_List *qrlist) -{ - QRcode_List *list = qrlist, *next; - - while(list != NULL) { - next = list->next; - QRcode_List_freeEntry(list); - list = next; - } -} - -int QRcode_List_size(QRcode_List *qrlist) -{ - QRcode_List *list = qrlist; - int size = 0; - - while(list != NULL) { - size++; - list = list->next; - } - - return size; -} - -#if 0 -static unsigned char QRcode_parity(const char *str, int size) -{ - unsigned char parity = 0; - int i; - - for(i=0; ihead; - - while(list != NULL) { - if(head == NULL) { - entry = QRcode_List_newEntry(); - if(entry == NULL) goto ABORT; - head = entry; - tail = head; - } else { - entry = QRcode_List_newEntry(); - if(entry == NULL) goto ABORT; - tail->next = entry; - tail = tail->next; - } - tail->code = QRcode_encodeInput(list->input); - if(tail->code == NULL) { - goto ABORT; - } - list = list->next; - } - - return head; -ABORT: - QRcode_List_free(head); - return NULL; -} - -static QRcode_List *QRcode_encodeInputToStructured(QRinput *input) -{ - QRinput_Struct *s; - QRcode_List *codes; - - s = QRinput_splitQRinputToStruct(input); - if(s == NULL) return NULL; - - codes = QRcode_encodeInputStructured(s); - QRinput_Struct_free(s); - - return codes; -} - -QRcode_List *QRcode_encodeString8bitStructured(const char *string, int version, QRecLevel level) -{ - QRinput *input; - QRcode_List *codes; - int ret; - - if(version <= 0) { - errno = EINVAL; - return NULL; - } - - input = QRinput_new2(version, level); - if(input == NULL) return NULL; - - ret = QRinput_append(input, QR_MODE_8, strlen(string), (unsigned char *)string); - if(ret < 0) { - QRinput_free(input); - return NULL; - } - codes = QRcode_encodeInputToStructured(input); - QRinput_free(input); - - return codes; -} - -QRcode_List *QRcode_encodeStringStructured(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive) -{ - QRinput *input; - QRcode_List *codes; - int ret; - - if(version <= 0) { - errno = EINVAL; - return NULL; - } - if(hint != QR_MODE_8 && hint != QR_MODE_KANJI) { - errno = EINVAL; - return NULL; - } - - input = QRinput_new2(version, level); - if(input == NULL) return NULL; - - ret = Split_splitStringToQRinput(string, input, hint, casesensitive); - if(ret < 0) { - QRinput_free(input); - return NULL; - } - codes = QRcode_encodeInputToStructured(input); - QRinput_free(input); - - return codes; -} diff --git a/glabels2/qrencode-3.1.0/qrencode.h b/glabels2/qrencode-3.1.0/qrencode.h deleted file mode 100644 index 342df3bd..00000000 --- a/glabels2/qrencode-3.1.0/qrencode.h +++ /dev/null @@ -1,426 +0,0 @@ -/** - * qrencode - QR Code encoder - * - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** \mainpage - * Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D - * symbology. - * - * \section encoding Encoding - * - * There are two ways to encode data: encoding a string or - * encoding a structured data. - * - * \subsection encoding-string Encoding a string - * You can encode a string by calling QRcode_encodeString(). - * The given string is parsed automatically and encoded. If you want to encode - * data that can be represented as a C string style (NUL terminated), you can - * simply use this way. - * - * If the input data contains Kanji (Shift-JIS) characters and you want to - * encode them as Kanji in QR Code, you should give QR_MODE_KANJI as a hint. - * Otherwise, all of non-alphanumeric characters are encoded as 8 bit data. - * If you want to encode a whole string in 8 bit mode, use - * QRcode_encodeString8bit() instead. - * - * Please note that a C string can not contain NUL character. If your data - * contains NUL, you should chose the second way. - * - * \subsection encoding-input Encoding a structured data - * You can construct a structured input data manually. If the structure of the - * input data is known, you can use this way. - * At first, create a ::QRinput object by QRinput_new(). Then add input data - * to the QRinput object by QRinput_append(). Finally call QRcode_encodeInput() - * to encode the QRinput data. - * You can reuse the QRinput data again to encode it in other symbols with - * different parameters. - * - * \section result Result - * The encoded symbol is resulted as a ::QRcode object. It will contain - * its version number, width of the symbol and an array represents the symbol. - * See ::QRcode for the details. You can free the object by QRcode_free(). - * - * Please note that the version of the result may be larger than specified. - * In such cases, the input data would be too large to be encoded in a - * symbol of the specified version. - * - * \section structured Structured append - * Libqrencode can generate "Structured-appended" symbols that enables to split - * a large data set into mulitple QR codes. A QR code reader concatenates - * multiple QR code symbols into a string. - * Just like QRcode_encodeString(), you can use QRcode_encodeStringStructured() - * to generate structured-appended symbols. This functions returns an instance - * of ::QRcode_List. The returned list is a singly-linked list of QRcode: you - * can retrieve each QR code in this way: - * - * \code - * QRcode_List *qrcodes; - * QRcode_List *entry; - * QRcode *qrcode; - * - * qrcodes = QRcode_encodeStringStructured(...); - * entry = qrcodes; - * while(entry != NULL) { - * qrcode = entry->code; - * // do something - * entry = entry->next; - * } - * QRcode_List_free(entry); - * \endcode - * - * Instead of using auto-parsing functions, you can construct your own - * structured input. At first, instantiate an object of ::QRinput_Struct - * by calling QRinput_Struct_new(). This object can hold multiple ::QRinput, - * and one QR code is generated for a ::QRinput. - * QRinput_Struct_appendInput() appends a ::QRinput to a ::QRinput_Struct - * object. In order to generate structured-appended symbols, it is required to - * embed headers to each symbol. You can use - * QRinput_Struct_insertStructuredAppendHeaders() to insert appropriate - * headers to each symbol. You should call this function just once before - * encoding symbols. - */ - -#ifndef __QRENCODE_H__ -#define __QRENCODE_H__ - -#if defined(__cplusplus) -extern "C" { -#endif - -/** - * Encoding mode. - */ -typedef enum { - QR_MODE_NUL = -1, ///< Terminator (NUL character). Internal use only - QR_MODE_NUM = 0, ///< Numeric mode - QR_MODE_AN, ///< Alphabet-numeric mode - QR_MODE_8, ///< 8-bit data mode - QR_MODE_KANJI, ///< Kanji (shift-jis) mode - QR_MODE_STRUCTURE, ///< Internal use only -} QRencodeMode; - -/** - * Level of error correction. - */ -typedef enum { - QR_ECLEVEL_L = 0, ///< lowest - QR_ECLEVEL_M, - QR_ECLEVEL_Q, - QR_ECLEVEL_H ///< highest -} QRecLevel; - -/****************************************************************************** - * Input data (qrinput.c) - *****************************************************************************/ - -/** - * Singly linked list to contain input strings. An instance of this class - * contains its version and error correction level too. It is required to - * set them by QRinput_setVersion() and QRinput_setErrorCorrectionLevel(), - * or use QRinput_new2() to instantiate an object. - */ -typedef struct _QRinput QRinput; - -/** - * Instantiate an input data object. The version is set to 0 (auto-select) - * and the error correction level is set to QR_ECLEVEL_L. - * @return an input object (initialized). On error, NULL is returned and errno - * is set to indicate the error. - * @throw ENOMEM unable to allocate memory. - */ -extern QRinput *QRinput_new(void); - -/** - * Instantiate an input data object. - * @param version version number. - * @param level Error correction level. - * @return an input object (initialized). On error, NULL is returned and errno - * is set to indicate the error. - * @throw ENOMEM unable to allocate memory for input objects. - * @throw EINVAL invalid arguments. - */ -extern QRinput *QRinput_new2(int version, QRecLevel level); - -/** - * Append data to an input object. - * The data is copied and appended to the input object. - * @param input input object. - * @param mode encoding mode. - * @param size size of data (byte). - * @param data a pointer to the memory area of the input data. - * @retval 0 success. - * @retval -1 an error occurred and errno is set to indeicate the error. - * See Execptions for the details. - * @throw ENOMEM unable to allocate memory. - * @throw EINVAL input data is invalid. - * - */ -extern int QRinput_append(QRinput *input, QRencodeMode mode, int size, const unsigned char *data); - -/** - * Get current version. - * @param input input object. - * @return current version. - */ -extern int QRinput_getVersion(QRinput *input); - -/** - * Set version of the QR-code that is to be encoded. - * @param input input object. - * @param version version number (0 = auto) - * @retval 0 success. - * @retval -1 invalid argument. - */ -extern int QRinput_setVersion(QRinput *input, int version); - -/** - * Get current error correction level. - * @param input input object. - * @return Current error correcntion level. - */ -extern QRecLevel QRinput_getErrorCorrectionLevel(QRinput *input); - -/** - * Set error correction level of the QR-code that is to be encoded. - * @param input input object. - * @param level Error correction level. - * @retval 0 success. - * @retval -1 invalid argument. - */ -extern int QRinput_setErrorCorrectionLevel(QRinput *input, QRecLevel level); - -/** - * Free the input object. - * All of data chunks in the input object are freed too. - * @param input input object. - */ -extern void QRinput_free(QRinput *input); - -/** - * Validate the input data. - * @param mode encoding mode. - * @param size size of data (byte). - * @param data a pointer to the memory area of the input data. - * @retval 0 success. - * @retval -1 invalid arguments. - */ -extern int QRinput_check(QRencodeMode mode, int size, const unsigned char *data); - -/** - * Set of QRinput for structured symbols. - */ -typedef struct _QRinput_Struct QRinput_Struct; - -/** - * Instantiate a set of input data object. - * @return an instance of QRinput_Struct. On error, NULL is returned and errno - * is set to indicate the error. - * @throw ENOMEM unable to allocate memory. - */ -extern QRinput_Struct *QRinput_Struct_new(void); - -/** - * Set parity of structured symbols. - * @param s structured input object. - * @param parity parity of s. - */ -extern void QRinput_Struct_setParity(QRinput_Struct *s, unsigned char parity); - -/** - * Append a QRinput object to the set. - * @warning never append the same QRinput object twice or more. - * @param s structured input object. - * @param input an input object. - * @retval >0 number of input objects in the structure. - * @retval -1 an error occurred. See Exceptions for the details. - * @throw ENOMEM unable to allocate memory. - */ -extern int QRinput_Struct_appendInput(QRinput_Struct *s, QRinput *input); - -/** - * Free all of QRinput in the set. - * @param s a structured input object. - */ -extern void QRinput_Struct_free(QRinput_Struct *s); - -/** - * Split a QRinput to QRinput_Struct. It calculates a parity, set it, then - * insert structured-append headers. - * @param input input object. Version number and error correction level must be - * set. - * @return a set of input data. On error, NULL is returned, and errno is set - * to indicate the error. See Exceptions for the details. - * @throw ERANGE input data is too large. - * @throw EINVAL invalid input data. - * @throw ENOMEM unable to allocate memory. - */ -extern QRinput_Struct *QRinput_splitQRinputToStruct(QRinput *input); - -/** - * Insert structured-append headers to the input structure. It calculates - * a parity and set it if the parity is not set yet. - * @param s input structure - * @retval 0 success. - * @retval -1 an error occurred and errno is set to indeicate the error. - * See Execptions for the details. - * @throw EINVAL invalid input object. - * @throw ENOMEM unable to allocate memory. - */ -extern int QRinput_Struct_insertStructuredAppendHeaders(QRinput_Struct *s); - -/****************************************************************************** - * QRcode output (qrencode.c) - *****************************************************************************/ - -/** - * QRcode class. - * Symbol data is represented as an array contains width*width uchars. - * Each uchar represents a module (dot). If the less significant bit of - * the uchar is 1, the corresponding module is black. The other bits are - * meaningless for usual applications, but here its specification is described. - * - *
    - * MSB 76543210 LSB
    - *     |||||||`- 1=black/0=white
    - *     ||||||`-- data and ecc code area
    - *     |||||`--- format information
    - *     ||||`---- version information
    - *     |||`----- timing pattern
    - *     ||`------ alignment pattern
    - *     |`------- finder pattern and separator
    - *     `-------- non-data modules (format, timing, etc.)
    - * 
    - */ -typedef struct { - int version; ///< version of the symbol - int width; ///< width of the symbol - unsigned char *data; ///< symbol data -} QRcode; - -/** - * Singly-linked list of QRcode. Used to represent a structured symbols. - * A list is terminated with NULL. - */ -typedef struct _QRcode_List QRcode_List; - -struct _QRcode_List { - QRcode *code; - QRcode_List *next; -}; - -/** - * Create a symbol from the input data. - * @warning This function is THREAD UNSAFE. - * @param input input data. - * @return an instance of QRcode class. The version of the result QRcode may - * be larger than the designated version. On error, NULL is returned, - * and errno is set to indicate the error. See Exceptions for the - * details. - * @throw EINVAL invalid input object. - * @throw ENOMEM unable to allocate memory for input objects. - */ -extern QRcode *QRcode_encodeInput(QRinput *input); - -/** - * Create a symbol from the string. The library automatically parses the input - * string and encodes in a QR Code symbol. - * @warning This function is THREAD UNSAFE. - * @param string input string. It must be NULL terminated. - * @param version version of the symbol. If 0, the library chooses the minimum - * version for the given input data. - * @param level error correction level. - * @param hint tell the library how non-alphanumerical characters should be - * encoded. If QR_MODE_KANJI is given, kanji characters will be - * encoded as Shif-JIS characters. If QR_MODE_8 is given, all of - * non-alphanumerical characters will be encoded as is. If you want - * to embed UTF-8 string, choose this. - * @param casesensitive case-sensitive(1) or not(0). - * @return an instance of QRcode class. The version of the result QRcode may - * be larger than the designated version. On error, NULL is returned, - * and errno is set to indicate the error. See Exceptions for the - * details. - * @throw EINVAL invalid input object. - * @throw ENOMEM unable to allocate memory for input objects. - */ -extern QRcode *QRcode_encodeString(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive); - -/** - * Same to QRcode_encodeString(), but encode whole data in 8-bit mode. - * @warning This function is THREAD UNSAFE. - */ -extern QRcode *QRcode_encodeString8bit(const char *string, int version, QRecLevel level); - -/** - * Free the instance of QRcode class. - * @param qrcode an instance of QRcode class. - */ -extern void QRcode_free(QRcode *qrcode); - -/** - * Create structured symbols from the input data. - * @warning This function is THREAD UNSAFE. - * @param s - * @return a singly-linked list of QRcode. - */ -extern QRcode_List *QRcode_encodeInputStructured(QRinput_Struct *s); - -/** - * Create structured symbols from the string. The library automatically parses - * the input string and encodes in a QR Code symbol. - * @warning This function is THREAD UNSAFE. - * @param string input string. It should be NULL terminated. - * @param version version of the symbol. - * @param level error correction level. - * @param hint tell the library how non-alphanumerical characters should be - * encoded. If QR_MODE_KANJI is given, kanji characters will be - * encoded as Shif-JIS characters. If QR_MODE_8 is given, all of - * non-alphanumerical characters will be encoded as is. If you want - * to embed UTF-8 string, choose this. - * @param casesensitive case-sensitive(1) or not(0). - * @return a singly-linked list of QRcode. On error, NULL is returned, and - * errno is set to indicate the error. See Exceptions for the details. - * @throw EINVAL invalid input object. - * @throw ENOMEM unable to allocate memory for input objects. - */ -extern QRcode_List *QRcode_encodeStringStructured(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive); - -/** - * Same to QRcode_encodeStringStructured(), but encode whole data in 8-bit mode. - * @warning This function is THREAD UNSAFE. - */ -extern QRcode_List *QRcode_encodeString8bitStructured(const char *string, int version, QRecLevel level); - -/** - * Return the number of symbols included in a QRcode_List. - * @param qrlist a head entry of a QRcode_List. - * @return number of symbols in the list. - */ -extern int QRcode_List_size(QRcode_List *qrlist); - -/** - * Free the QRcode_List. - * @param qrlist a head entry of a QRcode_List. - */ -extern void QRcode_List_free(QRcode_List *qrlist); - -#if defined(__cplusplus) -} -#endif - -#endif /* __QRENCODE_H__ */ diff --git a/glabels2/qrencode-3.1.0/qrencode.spec b/glabels2/qrencode-3.1.0/qrencode.spec deleted file mode 100644 index 10c4f14f..00000000 --- a/glabels2/qrencode-3.1.0/qrencode.spec +++ /dev/null @@ -1,70 +0,0 @@ -%define ver 3.1.0 -%define rel 1 - -Name: qrencode -Version: %{ver} -Release: %{rel}%{?dist} -Summary: Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D symbology that can be scanned by handy terminals such as a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - -Group: System Environment/Libraries -License: LGPLv2+ -URL: http://megaui.net/fukuchi/works/qrencode/ -Source0: http://megaui.net/fukuchi/works/qrencode/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -%description -Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1. - -%package devel -Summary: Development files for libqrencode -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1. - -This package contains development files for libqrencode. - -%prep -%setup -q - - -%build -%configure --without-tests -make %{?_smp_mflags} - - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la - - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root,-) -%doc COPYING TODO ChangeLog NEWS README -%{_libdir}/libqrencode.so.* -%{_bindir}/qrencode -%{_mandir}/man1/qrencode.1.gz - -%files devel -%defattr(-,root,root,-) -%{_includedir}/qrencode.h -%{_libdir}/libqrencode.so -%{_libdir}/pkgconfig/libqrencode.pc - -%changelog -* Fri May 01 2008 Kentaro Fukuchi 3.0.1-1 -- The man page has been packaged correctly. -* Tue May 15 2007 Kentaro Fukuchi 1.0.2-2 -- Summary has been synchronized to README. -* Thu May 09 2007 Katsumi Saito 1.0.2-1 -- Initial RPM release diff --git a/glabels2/qrencode-3.1.0/qrencode.spec.in b/glabels2/qrencode-3.1.0/qrencode.spec.in deleted file mode 100644 index f03947ad..00000000 --- a/glabels2/qrencode-3.1.0/qrencode.spec.in +++ /dev/null @@ -1,70 +0,0 @@ -%define ver @VERSION@ -%define rel 1 - -Name: qrencode -Version: %{ver} -Release: %{rel}%{?dist} -Summary: Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D symbology that can be scanned by handy terminals such as a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - -Group: System Environment/Libraries -License: LGPLv2+ -URL: http://megaui.net/fukuchi/works/qrencode/ -Source0: http://megaui.net/fukuchi/works/qrencode/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -%description -Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1. - -%package devel -Summary: Development files for libqrencode -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1. - -This package contains development files for libqrencode. - -%prep -%setup -q - - -%build -%configure --without-tests -make %{?_smp_mflags} - - -%install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la - - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root,-) -%doc COPYING TODO ChangeLog NEWS README -%{_libdir}/libqrencode.so.* -%{_bindir}/qrencode -%{_mandir}/man1/qrencode.1.gz - -%files devel -%defattr(-,root,root,-) -%{_includedir}/qrencode.h -%{_libdir}/libqrencode.so -%{_libdir}/pkgconfig/libqrencode.pc - -%changelog -* Fri May 01 2008 Kentaro Fukuchi 3.0.1-1 -- The man page has been packaged correctly. -* Tue May 15 2007 Kentaro Fukuchi 1.0.2-2 -- Summary has been synchronized to README. -* Thu May 09 2007 Katsumi Saito 1.0.2-1 -- Initial RPM release diff --git a/glabels2/qrencode-3.1.0/qrencode_inner.h b/glabels2/qrencode-3.1.0/qrencode_inner.h deleted file mode 100644 index a476fdd4..00000000 --- a/glabels2/qrencode-3.1.0/qrencode_inner.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * qrencode - QR Code encoder - * - * Header for test use - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __QRENCODE_INNER_H__ -#define __QRENCODE_INNER_H__ - -/** - * This header file includes definitions for test use. - */ -extern BitStream *QRinput_mergeBitStream(QRinput *input); -extern BitStream *QRinput_getBitStream(QRinput *input); -extern int QRinput_estimateBitStreamSize(QRinput *input, int version); -extern int QRinput_splitEntry(QRinput_List *entry, int bytes); -extern int QRinput_lengthOfCode(QRencodeMode mode, int version, int bits); -extern int QRinput_insertStructuredAppendHeader(QRinput *input, int size, int index, unsigned char parity); - - -/****************************************************************************** - * Raw code - *****************************************************************************/ - -typedef struct { - int dataLength; - unsigned char *data; - int eccLength; - unsigned char *ecc; -} RSblock; - -typedef struct { - int version; - unsigned char *datacode; - unsigned char *ecccode; - int blocks; - RSblock *rsblock; - int count; - int dataLength; - int eccLength; - int b1; -} QRRawCode; - -extern QRRawCode *QRraw_new(QRinput *input); -extern unsigned char QRraw_getCode(QRRawCode *raw); -extern void QRraw_free(QRRawCode *raw); - -/****************************************************************************** - * Frame filling - *****************************************************************************/ -extern unsigned char *FrameFiller_fillerTest(int version); - -/****************************************************************************** - * QR-code encoding - *****************************************************************************/ -extern QRcode *QRcode_encodeMask(QRinput *input, int mask); - - -/****************************************************************************** - * Mask - *****************************************************************************/ - -extern int Mask_evaluateSymbol(int width, unsigned char *frame); -extern int Mask_writeFormatInformation(int width, unsigned char *frame, int mask, QRecLevel level); - -#endif /* __QRENCODE_INNER_H__ */ diff --git a/glabels2/qrencode-3.1.0/qrinput.c b/glabels2/qrencode-3.1.0/qrinput.c deleted file mode 100644 index 153caae1..00000000 --- a/glabels2/qrencode-3.1.0/qrinput.c +++ /dev/null @@ -1,1329 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Input data chunk class - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include - -#include "config.h" -#include "qrencode.h" -#include "qrspec.h" -#include "bitstream.h" -#include "qrinput.h" - -/****************************************************************************** - * Entry of input data - *****************************************************************************/ - -static QRinput_List *QRinput_List_newEntry(QRencodeMode mode, int size, const unsigned char *data) -{ - QRinput_List *entry; - - if(QRinput_check(mode, size, data)) { - errno = EINVAL; - return NULL; - } - - entry = (QRinput_List *)malloc(sizeof(QRinput_List)); - if(entry == NULL) return NULL; - - entry->mode = mode; - entry->size = size; - entry->data = (unsigned char *)malloc(size); - if(entry->data == NULL) { - free(entry); - return NULL; - } - memcpy(entry->data, data, size); - entry->bstream = NULL; - entry->next = NULL; - - return entry; -} - -static void QRinput_List_freeEntry(QRinput_List *entry) -{ - if(entry != NULL) { - free(entry->data); - BitStream_free(entry->bstream); - free(entry); - } -} - -static QRinput_List *QRinput_List_dup(QRinput_List *entry) -{ - QRinput_List *n; - - n = (QRinput_List *)malloc(sizeof(QRinput_List)); - if(n == NULL) return NULL; - - n->mode = entry->mode; - n->size = entry->size; - n->data = (unsigned char *)malloc(n->size); - if(n->data == NULL) { - free(n); - return NULL; - } - memcpy(n->data, entry->data, entry->size); - n->bstream = NULL; - n->next = NULL; - - return n; -} - -/****************************************************************************** - * Input Data - *****************************************************************************/ - -QRinput *QRinput_new(void) -{ - return QRinput_new2(0, QR_ECLEVEL_L); -} - -QRinput *QRinput_new2(int version, QRecLevel level) -{ - QRinput *input; - - if(version < 0 || version > QRSPEC_VERSION_MAX || level > QR_ECLEVEL_H) { - errno = EINVAL; - return NULL; - } - - input = (QRinput *)malloc(sizeof(QRinput)); - if(input == NULL) return NULL; - - input->head = NULL; - input->tail = NULL; - input->version = version; - input->level = level; - - return input; -} - -int QRinput_getVersion(QRinput *input) -{ - return input->version; -} - -int QRinput_setVersion(QRinput *input, int version) -{ - if(version < 0 || version > QRSPEC_VERSION_MAX) { - errno = EINVAL; - return -1; - } - - input->version = version; - - return 0; -} - -QRecLevel QRinput_getErrorCorrectionLevel(QRinput *input) -{ - return input->level; -} - -int QRinput_setErrorCorrectionLevel(QRinput *input, QRecLevel level) -{ - if(level > QR_ECLEVEL_H) { - errno = EINVAL; - return -1; - } - - input->level = level; - - return 0; -} - -static void QRinput_appendEntry(QRinput *input, QRinput_List *entry) -{ - if(input->tail == NULL) { - input->head = entry; - input->tail = entry; - } else { - input->tail->next = entry; - input->tail = entry; - } - entry->next = NULL; -} - -int QRinput_append(QRinput *input, QRencodeMode mode, int size, const unsigned char *data) -{ - QRinput_List *entry; - - entry = QRinput_List_newEntry(mode, size, data); - if(entry == NULL) { - return -1; - } - - QRinput_appendEntry(input, entry); - - return 0; -} - -/** - * Insert a structured-append header to the head of the input data. - * @param input input data. - * @param size number of structured symbols. - * @param index index number of the symbol. (1 <= index <= size) - * @param parity parity among input data. (NOTE: each symbol of a set of structured symbols has the same parity data) - * @retval 0 success. - * @retval -1 error occurred and errno is set to indeicate the error. See Execptions for the details. - * @throw EINVAL invalid parameter. - * @throw ENOMEM unable to allocate memory. - */ -__STATIC int QRinput_insertStructuredAppendHeader(QRinput *input, int size, int index, unsigned char parity) -{ - QRinput_List *entry; - unsigned char buf[3]; - - if(size > MAX_STRUCTURED_SYMBOLS) { - errno = EINVAL; - return -1; - } - if(index <= 0 || index > MAX_STRUCTURED_SYMBOLS) { - errno = EINVAL; - return -1; - } - - buf[0] = (unsigned char)size; - buf[1] = (unsigned char)index; - buf[2] = parity; - entry = QRinput_List_newEntry(QR_MODE_STRUCTURE, 3, buf); - if(entry == NULL) { - return -1; - } - - entry->next = input->head; - input->head = entry; - - return 0; -} - -void QRinput_free(QRinput *input) -{ - QRinput_List *list, *next; - - if(input != NULL) { - list = input->head; - while(list != NULL) { - next = list->next; - QRinput_List_freeEntry(list); - list = next; - } - free(input); - } -} - -static unsigned char QRinput_calcParity(QRinput *input) -{ - unsigned char parity = 0; - QRinput_List *list; - int i; - - list = input->head; - while(list != NULL) { - if(list->mode != QR_MODE_STRUCTURE) { - for(i=list->size-1; i>=0; i--) { - parity ^= list->data[i]; - } - } - list = list->next; - } - - return parity; -} - -QRinput *QRinput_dup(QRinput *input) -{ - QRinput *n; - QRinput_List *list, *e; - - n = QRinput_new2(input->version, input->level); - if(n == NULL) return NULL; - - list = input->head; - while(list != NULL) { - e = QRinput_List_dup(list); - if(e == NULL) { - QRinput_free(n); - return NULL; - } - QRinput_appendEntry(n, e); - list = list->next; - } - - return n; -} - -/****************************************************************************** - * Numeric data - *****************************************************************************/ - -/** - * Check the input data. - * @param size - * @param data - * @return result - */ -static int QRinput_checkModeNum(int size, const char *data) -{ - int i; - - for(i=0; i '9') - return -1; - } - - return 0; -} - -/** - * Estimates the length of the encoded bit stream of numeric data. - * @param size - * @return number of bits - */ -int QRinput_estimateBitsModeNum(int size) -{ - int w; - int bits; - - w = size / 3; - bits = w * 10; - switch(size - w * 3) { - case 1: - bits += 4; - break; - case 2: - bits += 7; - break; - default: - break; - } - - return bits; -} - -/** - * Convert the number data to a bit stream. - * @param entry - * @retval 0 success - * @retval -1 an error occurred and errno is set to indeicate the error. - * See Execptions for the details. - * @throw ENOMEM unable to allocate memory. - */ -static int QRinput_encodeModeNum(QRinput_List *entry, int version) -{ - int words, i, ret; - unsigned int val; - - words = entry->size / 3; - entry->bstream = BitStream_new(); - if(entry->bstream == NULL) return -1; - - val = 0x1; - ret = BitStream_appendNum(entry->bstream, 4, val); - if(ret < 0) goto ABORT; - - val = entry->size; - ret = BitStream_appendNum(entry->bstream, QRspec_lengthIndicator(QR_MODE_NUM, version), val); - if(ret < 0) goto ABORT; - - for(i=0; idata[i*3 ] - '0') * 100; - val += (entry->data[i*3+1] - '0') * 10; - val += (entry->data[i*3+2] - '0'); - - ret = BitStream_appendNum(entry->bstream, 10, val); - if(ret < 0) goto ABORT; - } - - if(entry->size - words * 3 == 1) { - val = entry->data[words*3] - '0'; - ret = BitStream_appendNum(entry->bstream, 4, val); - if(ret < 0) goto ABORT; - } else if(entry->size - words * 3 == 2) { - val = (entry->data[words*3 ] - '0') * 10; - val += (entry->data[words*3+1] - '0'); - BitStream_appendNum(entry->bstream, 7, val); - if(ret < 0) goto ABORT; - } - - return 0; -ABORT: - BitStream_free(entry->bstream); - entry->bstream = NULL; - return -1; -} - -/****************************************************************************** - * Alphabet-numeric data - *****************************************************************************/ - -const signed char QRinput_anTable[128] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -/** - * Check the input data. - * @param size - * @param data - * @return result - */ -static int QRinput_checkModeAn(int size, const char *data) -{ - int i; - - for(i=0; isize / 2; - entry->bstream = BitStream_new(); - if(entry->bstream == NULL) return -1; - - val = 0x2; - ret = BitStream_appendNum(entry->bstream, 4, val); - if(ret < 0) goto ABORT; - - val = entry->size; - ret = BitStream_appendNum(entry->bstream, QRspec_lengthIndicator(QR_MODE_AN, version), val); - if(ret < 0) goto ABORT; - - for(i=0; idata[i*2 ]) * 45; - val += (unsigned int)QRinput_lookAnTable(entry->data[i*2+1]); - - ret = BitStream_appendNum(entry->bstream, 11, val); - if(ret < 0) goto ABORT; - } - - if(entry->size & 1) { - val = (unsigned int)QRinput_lookAnTable(entry->data[words * 2]); - - ret = BitStream_appendNum(entry->bstream, 6, val); - if(ret < 0) goto ABORT; - } - - return 0; -ABORT: - BitStream_free(entry->bstream); - entry->bstream = NULL; - return -1; -} - -/****************************************************************************** - * 8 bit data - *****************************************************************************/ - -/** - * Estimates the length of the encoded bit stream of 8 bit data. - * @param size - * @return number of bits - */ -int QRinput_estimateBitsMode8(int size) -{ - return size * 8; -} - -/** - * Convert the 8bits data to a bit stream. - * @param entry - * @retval 0 success - * @retval -1 an error occurred and errno is set to indeicate the error. - * See Execptions for the details. - * @throw ENOMEM unable to allocate memory. - */ -static int QRinput_encodeMode8(QRinput_List *entry, int version) -{ - int ret, i; - unsigned int val; - - entry->bstream = BitStream_new(); - if(entry->bstream == NULL) return -1; - - val = 0x4; - ret = BitStream_appendNum(entry->bstream, 4, val); - if(ret < 0) goto ABORT; - - val = entry->size; - ret = BitStream_appendNum(entry->bstream, QRspec_lengthIndicator(QR_MODE_8, version), val); - if(ret < 0) goto ABORT; - - for(i=0; isize; i++) { - ret = BitStream_appendNum(entry->bstream, 8, entry->data[i]); - if(ret < 0) goto ABORT; - } - - return 0; -ABORT: - BitStream_free(entry->bstream); - entry->bstream = NULL; - return -1; -} - - -/****************************************************************************** - * Kanji data - *****************************************************************************/ - -/** - * Estimates the length of the encoded bit stream of kanji data. - * @param size - * @return number of bits - */ -int QRinput_estimateBitsModeKanji(int size) -{ - return (size / 2) * 13; -} - -/** - * Check the input data. - * @param size - * @param data - * @return result - */ -static int QRinput_checkModeKanji(int size, const unsigned char *data) -{ - int i; - unsigned int val; - - if(size & 1) - return -1; - - for(i=0; i 0x9ffc && val < 0xe040) || val > 0xebbf) { - return -1; - } - } - - return 0; -} - -/** - * Convert the kanji data to a bit stream. - * @param entry - * @retval 0 success - * @retval -1 an error occurred and errno is set to indeicate the error. - * See Execptions for the details. - * @throw ENOMEM unable to allocate memory. - */ -static int QRinput_encodeModeKanji(QRinput_List *entry, int version) -{ - int ret, i; - unsigned int val, h; - - entry->bstream = BitStream_new(); - if(entry->bstream == NULL) return -1; - - val = 0x8; - ret = BitStream_appendNum(entry->bstream, 4, val); - if(ret < 0) goto ABORT; - - val = entry->size / 2; - ret = BitStream_appendNum(entry->bstream, QRspec_lengthIndicator(QR_MODE_KANJI, version), val); - if(ret < 0) goto ABORT; - - for(i=0; isize; i+=2) { - val = ((unsigned int)entry->data[i] << 8) | entry->data[i+1]; - if(val <= 0x9ffc) { - val -= 0x8140; - } else { - val -= 0xc140; - } - h = (val >> 8) * 0xc0; - val = (val & 0xff) + h; - - ret = BitStream_appendNum(entry->bstream, 13, val); - if(ret < 0) goto ABORT; - } - - return 0; -ABORT: - BitStream_free(entry->bstream); - entry->bstream = NULL; - return -1; -} - -/****************************************************************************** - * Structured Symbol - *****************************************************************************/ - -/** - * Convert a structure symbol code to a bit stream. - * @param entry - * @retval 0 success - * @retval -1 an error occurred and errno is set to indeicate the error. - * See Execptions for the details. - * @throw ENOMEM unable to allocate memory. - */ -static int QRinput_encodeModeStructure(QRinput_List *entry) -{ - int ret; - - entry->bstream = BitStream_new(); - if(entry->bstream == NULL) return -1; - - ret = BitStream_appendNum(entry->bstream, 4, 0x03); - if(ret < 0) goto ABORT; - ret = BitStream_appendNum(entry->bstream, 4, entry->data[1] - 1); - if(ret < 0) goto ABORT; - ret = BitStream_appendNum(entry->bstream, 4, entry->data[0] - 1); - if(ret < 0) goto ABORT; - ret = BitStream_appendNum(entry->bstream, 8, entry->data[2]); - if(ret < 0) goto ABORT; - - return 0; -ABORT: - BitStream_free(entry->bstream); - entry->bstream = NULL; - return -1; -} - -/****************************************************************************** - * Validation - *****************************************************************************/ - -int QRinput_check(QRencodeMode mode, int size, const unsigned char *data) -{ - if(size <= 0) return -1; - - switch(mode) { - case QR_MODE_NUM: - return QRinput_checkModeNum(size, (const char *)data); - break; - case QR_MODE_AN: - return QRinput_checkModeAn(size, (const char *)data); - break; - case QR_MODE_KANJI: - return QRinput_checkModeKanji(size, data); - break; - case QR_MODE_8: - return 0; - break; - case QR_MODE_STRUCTURE: - return 0; - break; - default: - break; - } - - return -1; -} - -/****************************************************************************** - * Estimation of the bit length - *****************************************************************************/ - -/** - * Estimates the length of the encoded bit stream on the current version. - * @param entry - * @param version version of the symbol - * @return number of bits - */ -static int QRinput_estimateBitStreamSizeOfEntry(QRinput_List *entry, int version) -{ - int bits = 0; - int l, m; - int num; - - if(version == 0) version = 1; - - switch(entry->mode) { - case QR_MODE_NUM: - bits = QRinput_estimateBitsModeNum(entry->size); - break; - case QR_MODE_AN: - bits = QRinput_estimateBitsModeAn(entry->size); - break; - case QR_MODE_8: - bits = QRinput_estimateBitsMode8(entry->size); - break; - case QR_MODE_KANJI: - bits = QRinput_estimateBitsModeKanji(entry->size); - break; - case QR_MODE_STRUCTURE: - return STRUCTURE_HEADER_BITS; - default: - return 0; - } - - l = QRspec_lengthIndicator(entry->mode, version); - m = 1 << l; - num = (entry->size + m - 1) / m; - - bits += num * (4 + l); // mode indicator (4bits) + length indicator - - return bits; -} - -/** - * Estimates the length of the encoded bit stream of the data. - * @param input input data - * @param version version of the symbol - * @return number of bits - */ -__STATIC int QRinput_estimateBitStreamSize(QRinput *input, int version) -{ - QRinput_List *list; - int bits = 0; - - list = input->head; - while(list != NULL) { - bits += QRinput_estimateBitStreamSizeOfEntry(list, version); - list = list->next; - } - - return bits; -} - -/** - * Estimates the required version number of the symbol. - * @param input input data - * @return required version number - */ -static int QRinput_estimateVersion(QRinput *input) -{ - int bits; - int version, prev; - - version = 0; - do { - prev = version; - bits = QRinput_estimateBitStreamSize(input, prev); - version = QRspec_getMinimumVersion((bits + 7) / 8, input->level); - if (version < 0) { - return -1; - } - } while (version > prev); - - return version; -} - -/** - * Returns required length in bytes for specified mode, version and bits. - * @param mode - * @param version - * @param bits - * @return required length of code words in bytes. - */ -__STATIC int QRinput_lengthOfCode(QRencodeMode mode, int version, int bits) -{ - int payload, size, chunks, remain, maxsize; - - payload = bits - 4 - QRspec_lengthIndicator(mode, version); - switch(mode) { - case QR_MODE_NUM: - chunks = payload / 10; - remain = payload - chunks * 10; - size = chunks * 3; - if(remain >= 7) { - size += 2; - } else if(remain >= 4) { - size += 1; - } - break; - case QR_MODE_AN: - chunks = payload / 11; - remain = payload - chunks * 11; - size = chunks * 2; - if(remain >= 6) size++; - break; - case QR_MODE_8: - size = payload / 8; - break; - case QR_MODE_KANJI: - size = (payload / 13) * 2; - break; - case QR_MODE_STRUCTURE: - size = payload / 8; - break; - default: - size = 0; - break; - } - maxsize = QRspec_maximumWords(mode, version); - if(size < 0) size = 0; - if(size > maxsize) size = maxsize; - - return size; -} - -/****************************************************************************** - * Data conversion - *****************************************************************************/ - -/** - * Convert the input data in the data chunk to a bit stream. - * @param entry - * @return number of bits (>0) or -1 for failure. - */ -static int QRinput_encodeBitStream(QRinput_List *entry, int version) -{ - int words, ret; - QRinput_List *st1 = NULL, *st2 = NULL; - - if(entry->bstream != NULL) { - BitStream_free(entry->bstream); - entry->bstream = NULL; - } - - words = QRspec_maximumWords(entry->mode, version); - if(entry->size > words) { - st1 = QRinput_List_newEntry(entry->mode, words, entry->data); - if(st1 == NULL) goto ABORT; - st2 = QRinput_List_newEntry(entry->mode, entry->size - words, &entry->data[words]); - if(st2 == NULL) goto ABORT; - - ret = QRinput_encodeBitStream(st1, version); - if(ret < 0) goto ABORT; - ret = QRinput_encodeBitStream(st2, version); - if(ret < 0) goto ABORT; - entry->bstream = BitStream_new(); - if(entry->bstream == NULL) goto ABORT; - ret = BitStream_append(entry->bstream, st1->bstream); - if(ret < 0) goto ABORT; - ret = BitStream_append(entry->bstream, st2->bstream); - if(ret < 0) goto ABORT; - QRinput_List_freeEntry(st1); - QRinput_List_freeEntry(st2); - } else { - ret = 0; - switch(entry->mode) { - case QR_MODE_NUM: - ret = QRinput_encodeModeNum(entry, version); - break; - case QR_MODE_AN: - ret = QRinput_encodeModeAn(entry, version); - break; - case QR_MODE_8: - ret = QRinput_encodeMode8(entry, version); - break; - case QR_MODE_KANJI: - ret = QRinput_encodeModeKanji(entry, version); - break; - case QR_MODE_STRUCTURE: - ret = QRinput_encodeModeStructure(entry); - break; - default: - break; - } - if(ret < 0) return -1; - } - - return BitStream_size(entry->bstream); -ABORT: - QRinput_List_freeEntry(st1); - QRinput_List_freeEntry(st2); - return -1; -} - -/** - * Convert the input data to a bit stream. - * @param input input data. - * @retval 0 success - * @retval -1 an error occurred and errno is set to indeicate the error. - * See Execptions for the details. - * @throw ENOMEM unable to allocate memory. - */ -static int QRinput_createBitStream(QRinput *input) -{ - QRinput_List *list; - int bits, total = 0; - - list = input->head; - while(list != NULL) { - bits = QRinput_encodeBitStream(list, input->version); - if(bits < 0) return -1; - total += bits; - list = list->next; - } - - return total; -} - -/** - * Convert the input data to a bit stream. - * When the version number is given and that is not sufficient, it is increased - * automatically. - * @param input input data. - * @retval 0 success - * @retval -1 an error occurred and errno is set to indeicate the error. - * See Execptions for the details. - * @throw ENOMEM unable to allocate memory. - * @throw EINVAL input is too large. - */ -static int QRinput_convertData(QRinput *input) -{ - int bits; - int ver; - - ver = QRinput_estimateVersion(input); - if(ver > QRinput_getVersion(input)) { - QRinput_setVersion(input, ver); - } - - for(;;) { - bits = QRinput_createBitStream(input); - if(bits < 0) return -1; - ver = QRspec_getMinimumVersion((bits + 7) / 8, input->level); - if(ver < 0) { - errno = EINVAL; - return -1; - } else if(ver > QRinput_getVersion(input)) { - QRinput_setVersion(input, ver); - } else { - break; - } - } - - return 0; -} - -/** - * Append padding bits for the input data. - * @param bstream Bitstream to be appended. - * @param input input data. - * @retval 0 success - * @retval -1 an error occurred and errno is set to indeicate the error. - * See Execptions for the details. - * @throw ENOMEM unable to allocate memory. - */ -static int QRinput_appendPaddingBit(BitStream *bstream, QRinput *input) -{ - int bits, maxbits, words, maxwords, i, ret; - BitStream *padding = NULL; - unsigned char *padbuf; - int padlen; - - bits = BitStream_size(bstream); - maxwords = QRspec_getDataLength(input->version, input->level); - maxbits = maxwords * 8; - - if(maxbits == bits) { - return 0; - } - - if(maxbits - bits < 5) { - ret = BitStream_appendNum(bstream, maxbits - bits, 0); - goto DONE; - } - - bits += 4; - words = (bits + 7) / 8; - - padding = BitStream_new(); - if(padding == NULL) return -1; - ret = BitStream_appendNum(padding, words * 8 - bits + 4, 0); - if(ret < 0) goto DONE; - - padlen = maxwords - words; - if(padlen > 0) { - padbuf = (unsigned char *)malloc(padlen); - if(padbuf == NULL) { - ret = -1; - goto DONE; - } - for(i=0; ihead; - while(list != NULL) { - ret = BitStream_append(bstream, list->bstream); - if(ret < 0) { - BitStream_free(bstream); - return NULL; - } - list = list->next; - } - - return bstream; -} - -/** - * Merge all bit streams in the input data and append padding bits - * @param input input data. - * @return padded merged bit stream - */ - -__STATIC BitStream *QRinput_getBitStream(QRinput *input) -{ - BitStream *bstream; - int ret; - - bstream = QRinput_mergeBitStream(input); - if(bstream == NULL) { - return NULL; - } - ret = QRinput_appendPaddingBit(bstream, input); - if(ret < 0) { - BitStream_free(bstream); - return NULL; - } - - return bstream; -} - -/** - * Pack all bit streams padding bits into a byte array. - * @param input input data. - * @return padded merged byte stream - */ - -unsigned char *QRinput_getByteStream(QRinput *input) -{ - BitStream *bstream; - unsigned char *array; - - bstream = QRinput_getBitStream(input); - if(bstream == NULL) { - return NULL; - } - array = BitStream_toByte(bstream); - BitStream_free(bstream); - - return array; -} - -/****************************************************************************** - * Structured input data - *****************************************************************************/ - -static QRinput_InputList *QRinput_InputList_newEntry(QRinput *input) -{ - QRinput_InputList *entry; - - entry = (QRinput_InputList *)malloc(sizeof(QRinput_InputList)); - if(entry == NULL) return NULL; - - entry->input = input; - entry->next = NULL; - - return entry; -} - -static void QRinput_InputList_freeEntry(QRinput_InputList *entry) -{ - if(entry != NULL) { - QRinput_free(entry->input); - free(entry); - } -} - -QRinput_Struct *QRinput_Struct_new(void) -{ - QRinput_Struct *s; - - s = (QRinput_Struct *)malloc(sizeof(QRinput_Struct)); - if(s == NULL) return NULL; - - s->size = 0; - s->parity = -1; - s->head = NULL; - s->tail = NULL; - - return s; -} - -void QRinput_Struct_setParity(QRinput_Struct *s, unsigned char parity) -{ - s->parity = (int)parity; -} - -int QRinput_Struct_appendInput(QRinput_Struct *s, QRinput *input) -{ - QRinput_InputList *e; - - e = QRinput_InputList_newEntry(input); - if(e == NULL) return -1; - - s->size++; - if(s->tail == NULL) { - s->head = e; - s->tail = e; - } else { - s->tail->next = e; - s->tail = e; - } - - return s->size; -} - -void QRinput_Struct_free(QRinput_Struct *s) -{ - QRinput_InputList *list, *next; - - if(s != NULL) { - list = s->head; - while(list != NULL) { - next = list->next; - QRinput_InputList_freeEntry(list); - list = next; - } - free(s); - } -} - -static unsigned char QRinput_Struct_calcParity(QRinput_Struct *s) -{ - QRinput_InputList *list; - unsigned char parity = 0; - - list = s->head; - while(list != NULL) { - parity ^= QRinput_calcParity(list->input); - list = list->next; - } - - QRinput_Struct_setParity(s, parity); - - return parity; -} - -static int QRinput_List_shrinkEntry(QRinput_List *entry, int bytes) -{ - unsigned char *data; - - data = (unsigned char *)malloc(bytes); - if(data == NULL) return -1; - - memcpy(data, entry->data, bytes); - free(entry->data); - entry->data = data; - entry->size = bytes; - - return 0; -} - -__STATIC int QRinput_splitEntry(QRinput_List *entry, int bytes) -{ - QRinput_List *e; - int ret; - - e = QRinput_List_newEntry(entry->mode, entry->size - bytes, entry->data + bytes); - if(e == NULL) { - return -1; - } - - ret = QRinput_List_shrinkEntry(entry, bytes); - if(ret < 0) { - QRinput_List_freeEntry(e); - return -1; - } - - e->next = entry->next; - entry->next = e; - - return 0; -} - -QRinput_Struct *QRinput_splitQRinputToStruct(QRinput *input) -{ - QRinput *p; - QRinput_Struct *s; - int bits, maxbits, nextbits, bytes, ret; - QRinput_List *list, *next, *prev; - - s = QRinput_Struct_new(); - if(s == NULL) return NULL; - - input = QRinput_dup(input); - if(input == NULL) { - QRinput_Struct_free(s); - return NULL; - } - - QRinput_Struct_setParity(s, QRinput_calcParity(input)); - maxbits = QRspec_getDataLength(input->version, input->level) * 8 - STRUCTURE_HEADER_BITS; - - if(maxbits <= 0) { - QRinput_Struct_free(s); - QRinput_free(input); - return NULL; - } - - bits = 0; - list = input->head; - prev = NULL; - while(list != NULL) { - nextbits = QRinput_estimateBitStreamSizeOfEntry(list, input->version); - if(bits + nextbits <= maxbits) { - ret = QRinput_encodeBitStream(list, input->version); - if(ret < 0) goto ABORT; - bits += ret; - prev = list; - list = list->next; - } else { - bytes = QRinput_lengthOfCode(list->mode, input->version, maxbits - bits); - if(bytes > 0) { - /* Splits this entry into 2 entries. */ - ret = QRinput_splitEntry(list, bytes); - if(ret < 0) goto ABORT; - /* First half is the tail of the current input. */ - next = list->next; - list->next = NULL; - /* Second half is the head of the next input, p.*/ - p = QRinput_new2(input->version, input->level); - if(p == NULL) goto ABORT; - p->head = next; - /* Renew QRinput.tail. */ - p->tail = input->tail; - input->tail = list; - /* Point to the next entry. */ - prev = list; - list = next; - } else { - /* Current entry will go to the next input. */ - prev->next = NULL; - p = QRinput_new2(input->version, input->level); - if(p == NULL) goto ABORT; - p->head = list; - p->tail = input->tail; - input->tail = prev; - } - ret = QRinput_Struct_appendInput(s, input); - if(ret < 0) goto ABORT; - input = p; - bits = 0; - } - } - QRinput_Struct_appendInput(s, input); - if(s->size > MAX_STRUCTURED_SYMBOLS) { - QRinput_Struct_free(s); - errno = ERANGE; - return NULL; - } - ret = QRinput_Struct_insertStructuredAppendHeaders(s); - if(ret < 0) { - QRinput_Struct_free(s); - return NULL; - } - - return s; - -ABORT: - QRinput_free(input); - QRinput_Struct_free(s); - return NULL; -} - -int QRinput_Struct_insertStructuredAppendHeaders(QRinput_Struct *s) -{ - int num, i; - QRinput_InputList *list; - - if(s->parity < 0) { - QRinput_Struct_calcParity(s); - } - num = 0; - list = s->head; - while(list != NULL) { - num++; - list = list->next; - } - i = 1; - list = s->head; - while(list != NULL) { - if(QRinput_insertStructuredAppendHeader(list->input, num, i, s->parity)) - return -1; - i++; - list = list->next; - } - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/qrinput.h b/glabels2/qrencode-3.1.0/qrinput.h deleted file mode 100644 index 21ced704..00000000 --- a/glabels2/qrencode-3.1.0/qrinput.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Input data chunk class - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __QRINPUT_H__ -#define __QRINPUT_H__ - -#include "qrencode.h" -#include "bitstream.h" - -/****************************************************************************** - * Entry of input data - *****************************************************************************/ -typedef struct _QRinput_List QRinput_List; - -struct _QRinput_List { - QRencodeMode mode; - int size; ///< Size of data chunk (byte). - unsigned char *data; ///< Data chunk. - BitStream *bstream; - QRinput_List *next; -}; - -/****************************************************************************** - * Input Data - *****************************************************************************/ -struct _QRinput { - int version; - QRecLevel level; - QRinput_List *head; - QRinput_List *tail; -}; - -/****************************************************************************** - * Structured append input data - *****************************************************************************/ -typedef struct _QRinput_InputList QRinput_InputList; - -struct _QRinput_InputList { - QRinput *input; - QRinput_InputList *next; -}; - -struct _QRinput_Struct { - int size; ///< number of structured symbols - int parity; - QRinput_InputList *head; - QRinput_InputList *tail; -}; - -/** - * Pack all bit streams padding bits into a byte array. - * @param input input data. - * @return padded merged byte stream - */ -extern unsigned char *QRinput_getByteStream(QRinput *input); - - -extern int QRinput_estimateBitsModeNum(int size); -extern int QRinput_estimateBitsModeAn(int size); -extern int QRinput_estimateBitsMode8(int size); -extern int QRinput_estimateBitsModeKanji(int size); - -extern QRinput *QRinput_dup(QRinput *input); - -extern const signed char QRinput_anTable[128]; - -/** - * Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). - * @param __c__ character - * @return value - */ -#define QRinput_lookAnTable(__c__) \ - ((__c__ & 0x80)?-1:QRinput_anTable[(int)__c__]) - -/** - * Length of a segment of structured-append header. - */ -#define STRUCTURE_HEADER_BITS 20 - -/** - * Maximum number of symbols in a set of structured-appended symbols. - */ -#define MAX_STRUCTURED_SYMBOLS 16 - -#endif /* __QRINPUT_H__ */ diff --git a/glabels2/qrencode-3.1.0/qrspec.c b/glabels2/qrencode-3.1.0/qrspec.c deleted file mode 100644 index 1a04a954..00000000 --- a/glabels2/qrencode-3.1.0/qrspec.c +++ /dev/null @@ -1,540 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * QR Code specification in convenient format. - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include - -#include "config.h" -#include "qrspec.h" - -/****************************************************************************** - * Version and capacity - *****************************************************************************/ - -typedef struct { - int width; //< Edge length of the symbol - int words; //< Data capacity (bytes) - int remainder; //< Remainder bit (bits) - int ec[4]; //< Number of ECC code (bytes) -} QRspec_Capacity; - -/** - * Table of the capacity of symbols - * See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004. - */ -static const QRspec_Capacity qrspecCapacity[QRSPEC_VERSION_MAX + 1] = { - { 0, 0, 0, { 0, 0, 0, 0}}, - { 21, 26, 0, { 7, 10, 13, 17}}, // 1 - { 25, 44, 7, { 10, 16, 22, 28}}, - { 29, 70, 7, { 15, 26, 36, 44}}, - { 33, 100, 7, { 20, 36, 52, 64}}, - { 37, 134, 7, { 26, 48, 72, 88}}, // 5 - { 41, 172, 7, { 36, 64, 96, 112}}, - { 45, 196, 0, { 40, 72, 108, 130}}, - { 49, 242, 0, { 48, 88, 132, 156}}, - { 53, 292, 0, { 60, 110, 160, 192}}, - { 57, 346, 0, { 72, 130, 192, 224}}, //10 - { 61, 404, 0, { 80, 150, 224, 264}}, - { 65, 466, 0, { 96, 176, 260, 308}}, - { 69, 532, 0, { 104, 198, 288, 352}}, - { 73, 581, 3, { 120, 216, 320, 384}}, - { 77, 655, 3, { 132, 240, 360, 432}}, //15 - { 81, 733, 3, { 144, 280, 408, 480}}, - { 85, 815, 3, { 168, 308, 448, 532}}, - { 89, 901, 3, { 180, 338, 504, 588}}, - { 93, 991, 3, { 196, 364, 546, 650}}, - { 97, 1085, 3, { 224, 416, 600, 700}}, //20 - {101, 1156, 4, { 224, 442, 644, 750}}, - {105, 1258, 4, { 252, 476, 690, 816}}, - {109, 1364, 4, { 270, 504, 750, 900}}, - {113, 1474, 4, { 300, 560, 810, 960}}, - {117, 1588, 4, { 312, 588, 870, 1050}}, //25 - {121, 1706, 4, { 336, 644, 952, 1110}}, - {125, 1828, 4, { 360, 700, 1020, 1200}}, - {129, 1921, 3, { 390, 728, 1050, 1260}}, - {133, 2051, 3, { 420, 784, 1140, 1350}}, - {137, 2185, 3, { 450, 812, 1200, 1440}}, //30 - {141, 2323, 3, { 480, 868, 1290, 1530}}, - {145, 2465, 3, { 510, 924, 1350, 1620}}, - {149, 2611, 3, { 540, 980, 1440, 1710}}, - {153, 2761, 3, { 570, 1036, 1530, 1800}}, - {157, 2876, 0, { 570, 1064, 1590, 1890}}, //35 - {161, 3034, 0, { 600, 1120, 1680, 1980}}, - {165, 3196, 0, { 630, 1204, 1770, 2100}}, - {169, 3362, 0, { 660, 1260, 1860, 2220}}, - {173, 3532, 0, { 720, 1316, 1950, 2310}}, - {177, 3706, 0, { 750, 1372, 2040, 2430}} //40 -}; - -int QRspec_getDataLength(int version, QRecLevel level) -{ - return qrspecCapacity[version].words - qrspecCapacity[version].ec[level]; -} - -int QRspec_getECCLength(int version, QRecLevel level) -{ - return qrspecCapacity[version].ec[level]; -} - -int QRspec_getMinimumVersion(int size, QRecLevel level) -{ - int i; - int words; - - for(i=1; i<= QRSPEC_VERSION_MAX; i++) { - words = qrspecCapacity[i].words - qrspecCapacity[i].ec[level]; - if(words >= size) return i; - } - - return -1; -} - -int QRspec_getWidth(int version) -{ - return qrspecCapacity[version].width; -} - -int QRspec_getRemainder(int version) -{ - return qrspecCapacity[version].remainder; -} - -/****************************************************************************** - * Length indicator - *****************************************************************************/ - -static const int lengthTableBits[4][3] = { - {10, 12, 14}, - { 9, 11, 13}, - { 8, 16, 16}, - { 8, 10, 12} -}; - -int QRspec_lengthIndicator(QRencodeMode mode, int version) -{ - int l; - - if(mode == QR_MODE_STRUCTURE) return 0; - if(version <= 9) { - l = 0; - } else if(version <= 26) { - l = 1; - } else { - l = 2; - } - - return lengthTableBits[mode][l]; -} - -int QRspec_maximumWords(QRencodeMode mode, int version) -{ - int l; - int bits; - int words; - - if(mode == QR_MODE_STRUCTURE) return 3; - if(version <= 9) { - l = 0; - } else if(version <= 26) { - l = 1; - } else { - l = 2; - } - - bits = lengthTableBits[mode][l]; - words = (1 << bits) - 1; - if(mode == QR_MODE_KANJI) { - words *= 2; // the number of bytes is required - } - - return words; -} - -/****************************************************************************** - * Error correction code - *****************************************************************************/ - -/** - * Table of the error correction code (Reed-Solomon block) - * See Table 12-16 (pp.30-36), JIS X0510:2004. - */ -static const int eccTable[QRSPEC_VERSION_MAX+1][4][2] = { - {{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}}, - {{ 1, 0}, { 1, 0}, { 1, 0}, { 1, 0}}, // 1 - {{ 1, 0}, { 1, 0}, { 1, 0}, { 1, 0}}, - {{ 1, 0}, { 1, 0}, { 2, 0}, { 2, 0}}, - {{ 1, 0}, { 2, 0}, { 2, 0}, { 4, 0}}, - {{ 1, 0}, { 2, 0}, { 2, 2}, { 2, 2}}, // 5 - {{ 2, 0}, { 4, 0}, { 4, 0}, { 4, 0}}, - {{ 2, 0}, { 4, 0}, { 2, 4}, { 4, 1}}, - {{ 2, 0}, { 2, 2}, { 4, 2}, { 4, 2}}, - {{ 2, 0}, { 3, 2}, { 4, 4}, { 4, 4}}, - {{ 2, 2}, { 4, 1}, { 6, 2}, { 6, 2}}, //10 - {{ 4, 0}, { 1, 4}, { 4, 4}, { 3, 8}}, - {{ 2, 2}, { 6, 2}, { 4, 6}, { 7, 4}}, - {{ 4, 0}, { 8, 1}, { 8, 4}, {12, 4}}, - {{ 3, 1}, { 4, 5}, {11, 5}, {11, 5}}, - {{ 5, 1}, { 5, 5}, { 5, 7}, {11, 7}}, //15 - {{ 5, 1}, { 7, 3}, {15, 2}, { 3, 13}}, - {{ 1, 5}, {10, 1}, { 1, 15}, { 2, 17}}, - {{ 5, 1}, { 9, 4}, {17, 1}, { 2, 19}}, - {{ 3, 4}, { 3, 11}, {17, 4}, { 9, 16}}, - {{ 3, 5}, { 3, 13}, {15, 5}, {15, 10}}, //20 - {{ 4, 4}, {17, 0}, {17, 6}, {19, 6}}, - {{ 2, 7}, {17, 0}, { 7, 16}, {34, 0}}, - {{ 4, 5}, { 4, 14}, {11, 14}, {16, 14}}, - {{ 6, 4}, { 6, 14}, {11, 16}, {30, 2}}, - {{ 8, 4}, { 8, 13}, { 7, 22}, {22, 13}}, //25 - {{10, 2}, {19, 4}, {28, 6}, {33, 4}}, - {{ 8, 4}, {22, 3}, { 8, 26}, {12, 28}}, - {{ 3, 10}, { 3, 23}, { 4, 31}, {11, 31}}, - {{ 7, 7}, {21, 7}, { 1, 37}, {19, 26}}, - {{ 5, 10}, {19, 10}, {15, 25}, {23, 25}}, //30 - {{13, 3}, { 2, 29}, {42, 1}, {23, 28}}, - {{17, 0}, {10, 23}, {10, 35}, {19, 35}}, - {{17, 1}, {14, 21}, {29, 19}, {11, 46}}, - {{13, 6}, {14, 23}, {44, 7}, {59, 1}}, - {{12, 7}, {12, 26}, {39, 14}, {22, 41}}, //35 - {{ 6, 14}, { 6, 34}, {46, 10}, { 2, 64}}, - {{17, 4}, {29, 14}, {49, 10}, {24, 46}}, - {{ 4, 18}, {13, 32}, {48, 14}, {42, 32}}, - {{20, 4}, {40, 7}, {43, 22}, {10, 67}}, - {{19, 6}, {18, 31}, {34, 34}, {20, 61}},//40 -}; - -void QRspec_getEccSpec(int version, QRecLevel level, int spec[5]) -{ - int b1, b2; - int data, ecc; - - b1 = eccTable[version][level][0]; - b2 = eccTable[version][level][1]; - data = QRspec_getDataLength(version, level); - ecc = QRspec_getECCLength(version, level); - - if(b2 == 0) { - spec[0] = b1; - spec[1] = data / b1; - spec[2] = ecc / b1; - spec[3] = spec[4] = 0; - } else { - spec[0] = b1; - spec[1] = data / (b1 + b2); - spec[2] = ecc / (b1 + b2); - spec[3] = b2; - spec[4] = spec[1] + 1; - } -} - -/****************************************************************************** - * Alignment pattern - *****************************************************************************/ - -/** - * Positions of alignment patterns. - * This array includes only the second and the third position of the alignment - * patterns. Rest of them can be calculated from the distance between them. - * - * See Table 1 in Appendix E (pp.71) of JIS X0510:2004. - */ -static const int alignmentPattern[QRSPEC_VERSION_MAX+1][2] = { - { 0, 0}, - { 0, 0}, {18, 0}, {22, 0}, {26, 0}, {30, 0}, // 1- 5 - {34, 0}, {22, 38}, {24, 42}, {26, 46}, {28, 50}, // 6-10 - {30, 54}, {32, 58}, {34, 62}, {26, 46}, {26, 48}, //11-15 - {26, 50}, {30, 54}, {30, 56}, {30, 58}, {34, 62}, //16-20 - {28, 50}, {26, 50}, {30, 54}, {28, 54}, {32, 58}, //21-25 - {30, 58}, {34, 62}, {26, 50}, {30, 54}, {26, 52}, //26-30 - {30, 56}, {34, 60}, {30, 58}, {34, 62}, {30, 54}, //31-35 - {24, 50}, {28, 54}, {32, 58}, {26, 54}, {30, 58}, //35-40 -}; - -/** - * Put an alignment marker. - * @param frame - * @param width - * @param ox,oy center coordinate of the pattern - */ -static void QRspec_putAlignmentMarker(unsigned char *frame, int width, int ox, int oy) -{ - static const unsigned char finder[] = { - 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, - 0xa1, 0xa0, 0xa0, 0xa0, 0xa1, - 0xa1, 0xa0, 0xa1, 0xa0, 0xa1, - 0xa1, 0xa0, 0xa0, 0xa0, 0xa1, - 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, - }; - int x, y; - const unsigned char *s; - - frame += (oy - 2) * width + ox - 2; - s = finder; - for(y=0; y<5; y++) { - for(x=0; x<5; x++) { - frame[x] = s[x]; - } - frame += width; - s += 5; - } -} - -__STATIC void QRspec_putAlignmentPattern(int version, unsigned char *frame, int width) -{ - int d, w, x, y, cx, cy; - - if(version < 2) return; - - d = alignmentPattern[version][1] - alignmentPattern[version][0]; - if(d < 0) { - w = 2; - } else { - w = (width - alignmentPattern[version][0]) / d + 2; - } - - if(w * w - 3 == 1) { - x = alignmentPattern[version][0]; - y = alignmentPattern[version][0]; - QRspec_putAlignmentMarker(frame, width, x, y); - return; - } - - cx = alignmentPattern[version][0]; - for(x=1; x QRSPEC_VERSION_MAX) return 0; - - return versionPattern[version -7]; -} - -/****************************************************************************** - * Format information - *****************************************************************************/ - -/* See calcFormatInfo in tests/test_qrspec.c */ -static const unsigned int formatInfo[4][8] = { - {0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976}, - {0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0}, - {0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed}, - {0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b} -}; - -unsigned int QRspec_getFormatInfo(int mask, QRecLevel level) -{ - if(mask < 0 || mask > 7) return 0; - - return formatInfo[level][mask]; -} - -/****************************************************************************** - * Frame - *****************************************************************************/ - -/** - * Cache of initial frames. - */ -/* C99 says that static storage shall be initialized to a null pointer - * by compiler. */ -static unsigned char *frames[QRSPEC_VERSION_MAX + 1]; - -/** - * Put a finder pattern. - * @param frame - * @param width - * @param ox,oy upper-left coordinate of the pattern - */ -static void putFinderPattern(unsigned char *frame, int width, int ox, int oy) -{ - static const unsigned char finder[] = { - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, - 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, - 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, - 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, - 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - }; - int x, y; - const unsigned char *s; - - frame += oy * width + ox; - s = finder; - for(y=0; y<7; y++) { - for(x=0; x<7; x++) { - frame[x] = s[x]; - } - frame += width; - s += 7; - } -} - - -static unsigned char *QRspec_createFrame(int version) -{ - unsigned char *frame, *p, *q; - int width; - int x, y; - unsigned int verinfo, v; - - width = qrspecCapacity[version].width; - frame = (unsigned char *)malloc(width * width); - if(frame == NULL) return NULL; - - memset(frame, 0, width * width); - /* Finder pattern */ - putFinderPattern(frame, width, 0, 0); - putFinderPattern(frame, width, width - 7, 0); - putFinderPattern(frame, width, 0, width - 7); - /* Separator */ - p = frame; - q = frame + width * (width - 7); - for(y=0; y<7; y++) { - p[7] = 0xc0; - p[width - 8] = 0xc0; - q[7] = 0xc0; - p += width; - q += width; - } - memset(frame + width * 7, 0xc0, 8); - memset(frame + width * 8 - 8, 0xc0, 8); - memset(frame + width * (width - 8), 0xc0, 8); - /* Mask format information area */ - memset(frame + width * 8, 0x84, 9); - memset(frame + width * 9 - 8, 0x84, 8); - p = frame + 8; - for(y=0; y<8; y++) { - *p = 0x84; - p += width; - } - p = frame + width * (width - 7) + 8; - for(y=0; y<7; y++) { - *p = 0x84; - p += width; - } - /* Timing pattern */ - p = frame + width * 6 + 8; - q = frame + width * 8 + 6; - for(x=1; x= 7) { - verinfo = QRspec_getVersionPattern(version); - - p = frame + width * (width - 11); - v = verinfo; - for(x=0; x<6; x++) { - for(y=0; y<3; y++) { - p[width * y + x] = 0x88 | (v & 1); - v = v >> 1; - } - } - - p = frame + width - 11; - v = verinfo; - for(y=0; y<6; y++) { - for(x=0; x<3; x++) { - p[x] = 0x88 | (v & 1); - v = v >> 1; - } - p += width; - } - } - /* and a little bit... */ - frame[width * (width - 8) + 8] = 0x81; - - return frame; -} - -unsigned char *QRspec_newFrame(int version) -{ - unsigned char *frame; - int width; - - if(version < 1 || version > QRSPEC_VERSION_MAX) return NULL; - - if(frames[version] == NULL) { - frames[version] = QRspec_createFrame(version); - } - if(frames[version] == NULL) return NULL; - - width = qrspecCapacity[version].width; - frame = (unsigned char *)malloc(width * width); - if(frame == NULL) return NULL; - memcpy(frame, frames[version], width * width); - - return frame; -} - -void QRspec_clearCache(void) -{ - int i; - - for(i=1; i<=QRSPEC_VERSION_MAX; i++) { - free(frames[i]); - } -} diff --git a/glabels2/qrencode-3.1.0/qrspec.h b/glabels2/qrencode-3.1.0/qrspec.h deleted file mode 100644 index a544e9b1..00000000 --- a/glabels2/qrencode-3.1.0/qrspec.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * QR Code specification in convenient format. - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __QRSPEC_H__ -#define __QRSPEC_H__ - -#include "qrencode.h" - -/****************************************************************************** - * Version and capacity - *****************************************************************************/ - -/** - * Maximum version (size) of QR-code symbol. - */ -#define QRSPEC_VERSION_MAX 40 - -/** - * Maximum width of a symbol - */ -#define QRSPEC_WIDTH_MAX 177 - -/** - * Return maximum data code length (bytes) for the version. - * @param version - * @param level - * @return maximum size (bytes) - */ -extern int QRspec_getDataLength(int version, QRecLevel level); - -/** - * Return maximum error correction code length (bytes) for the version. - * @param version - * @param level - * @return ECC size (bytes) - */ -extern int QRspec_getECCLength(int version, QRecLevel level); - -/** - * Return a version number that satisfies the input code length. - * @param size input code length (byte) - * @param level - * @return version number - */ -extern int QRspec_getMinimumVersion(int size, QRecLevel level); - -/** - * Return the width of the symbol for the version. - * @param version - * @return width - */ -extern int QRspec_getWidth(int version); - -/** - * Return the numer of remainder bits. - * @param version - * @return number of remainder bits - */ -extern int QRspec_getRemainder(int version); - -/****************************************************************************** - * Length indicator - *****************************************************************************/ - -/** - * Return the size of lenght indicator for the mode and version. - * @param mode - * @param version - * @return the size of the appropriate length indicator (bits). - */ -extern int QRspec_lengthIndicator(QRencodeMode mode, int version); - -/** - * Return the maximum length for the mode and version. - * @param mode - * @param version - * @return the maximum length (bytes) - */ -extern int QRspec_maximumWords(QRencodeMode mode, int version); - -/****************************************************************************** - * Error correction code - *****************************************************************************/ - -/** - * Return an array of ECC specification. - * @param version - * @param level - * @param spec an array of ECC specification contains as following: - * {# of type1 blocks, # of data code, # of ecc code, - * # of type2 blocks, # of data code} - */ -void QRspec_getEccSpec(int version, QRecLevel level, int spec[5]); - -#define QRspec_rsBlockNum(__spec__) (__spec__[0] + __spec__[3]) -#define QRspec_rsBlockNum1(__spec__) (__spec__[0]) -#define QRspec_rsDataCodes1(__spec__) (__spec__[1]) -#define QRspec_rsEccCodes1(__spec__) (__spec__[2]) -#define QRspec_rsBlockNum2(__spec__) (__spec__[3]) -#define QRspec_rsDataCodes2(__spec__) (__spec__[4]) -#define QRspec_rsEccCodes2(__spec__) (__spec__[2]) - -#define QRspec_rsDataLength(__spec__) \ - ((QRspec_rsBlockNum1(__spec__) * QRspec_rsDataCodes1(__spec__)) + \ - (QRspec_rsBlockNum2(__spec__) * QRspec_rsDataCodes2(__spec__))) -#define QRspec_rsEccLength(__spec__) \ - (QRspec_rsBlockNum(__spec__) * QRspec_rsEccCodes1(__spec__)) - -/****************************************************************************** - * Version information pattern - *****************************************************************************/ - -/** - * Return BCH encoded version information pattern that is used for the symbol - * of version 7 or greater. Use lower 18 bits. - * @param version - * @return BCH encoded version information pattern - */ -extern unsigned int QRspec_getVersionPattern(int version); - -/****************************************************************************** - * Format information - *****************************************************************************/ - -/** - * Return BCH encoded format information pattern. - * @param mask - * @param level - * @return BCH encoded format information pattern - */ -extern unsigned int QRspec_getFormatInfo(int mask, QRecLevel level); - -/****************************************************************************** - * Frame - *****************************************************************************/ - -/** - * Return a copy of initialized frame. - * When the same version is requested twice or more, a copy of cached frame - * is returned. - * WARNING: Thread unsafe!!! - * @param version - * @return Array of unsigned char. You can free it by free(). - */ -extern unsigned char *QRspec_newFrame(int version); - -/** - * Clear the frame cache. Typically for debug. - * WARNING: Thread unsafe!!! - */ -extern void QRspec_clearCache(void); - -#endif /* __QRSPEC_H__ */ diff --git a/glabels2/qrencode-3.1.0/rscode.c b/glabels2/qrencode-3.1.0/rscode.c deleted file mode 100644 index c92f6f23..00000000 --- a/glabels2/qrencode-3.1.0/rscode.c +++ /dev/null @@ -1,304 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Reed solomon encoder. This code is taken from Phil Karn's libfec then - * editted and packed into a pair of .c and .h files. - * - * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q - * (libfec is released under the GNU Lesser General Public License.) - * - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include "rscode.h" - -/* Stuff specific to the 8-bit symbol version of the general purpose RS codecs - * - */ -typedef unsigned char data_t; - - -/** - * Reed-Solomon codec control block - */ -struct _RS { - int mm; /* Bits per symbol */ - int nn; /* Symbols per block (= (1<= rs->nn) { - x -= rs->nn; - x = (x >> rs->mm) + (x & rs->nn); - } - return x; -} - - -#define MODNN(x) modnn(rs,x) - -#define MM (rs->mm) -#define NN (rs->nn) -#define ALPHA_TO (rs->alpha_to) -#define INDEX_OF (rs->index_of) -#define GENPOLY (rs->genpoly) -#define NROOTS (rs->nroots) -#define FCR (rs->fcr) -#define PRIM (rs->prim) -#define IPRIM (rs->iprim) -#define PAD (rs->pad) -#define A0 (NN) - - -/* Initialize a Reed-Solomon codec - * symsize = symbol size, bits - * gfpoly = Field generator polynomial coefficients - * fcr = first root of RS code generator polynomial, index form - * prim = primitive element to generate polynomial roots - * nroots = RS code generator polynomial degree (number of roots) - * pad = padding bytes at front of shortened block - */ -static RS *init_rs_char(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad) -{ - RS *rs; - - -/* Common code for intializing a Reed-Solomon control block (char or int symbols) - * Copyright 2004 Phil Karn, KA9Q - * May be used under the terms of the GNU Lesser General Public License (LGPL) - */ -//#undef NULL -//#define NULL ((void *)0) - - int i, j, sr,root,iprim; - - rs = NULL; - /* Check parameter ranges */ - if(symsize < 0 || symsize > (int)(8*sizeof(data_t))){ - goto done; - } - - if(fcr < 0 || fcr >= (1<= (1<= (1<= ((1<mm = symsize; - rs->nn = (1<pad = pad; - - rs->alpha_to = (data_t *)malloc(sizeof(data_t)*(rs->nn+1)); - if(rs->alpha_to == NULL){ - free(rs); - rs = NULL; - goto done; - } - rs->index_of = (data_t *)malloc(sizeof(data_t)*(rs->nn+1)); - if(rs->index_of == NULL){ - free(rs->alpha_to); - free(rs); - rs = NULL; - goto done; - } - - /* Generate Galois field lookup tables */ - rs->index_of[0] = A0; /* log(zero) = -inf */ - rs->alpha_to[A0] = 0; /* alpha**-inf = 0 */ - sr = 1; - for(i=0;inn;i++){ - rs->index_of[sr] = i; - rs->alpha_to[i] = sr; - sr <<= 1; - if(sr & (1<nn; - } - if(sr != 1){ - /* field generator polynomial is not primitive! */ - free(rs->alpha_to); - free(rs->index_of); - free(rs); - rs = NULL; - goto done; - } - - /* Form RS code generator polynomial from its roots */ - rs->genpoly = (data_t *)malloc(sizeof(data_t)*(nroots+1)); - if(rs->genpoly == NULL){ - free(rs->alpha_to); - free(rs->index_of); - free(rs); - rs = NULL; - goto done; - } - rs->fcr = fcr; - rs->prim = prim; - rs->nroots = nroots; - rs->gfpoly = gfpoly; - - /* Find prim-th root of 1, used in decoding */ - for(iprim=1;(iprim % prim) != 0;iprim += rs->nn) - ; - rs->iprim = iprim / prim; - - rs->genpoly[0] = 1; - for (i = 0,root=fcr*prim; i < nroots; i++,root += prim) { - rs->genpoly[i+1] = 1; - - /* Multiply rs->genpoly[] by @**(root + x) */ - for (j = i; j > 0; j--){ - if (rs->genpoly[j] != 0) - rs->genpoly[j] = rs->genpoly[j-1] ^ rs->alpha_to[modnn(rs,rs->index_of[rs->genpoly[j]] + root)]; - else - rs->genpoly[j] = rs->genpoly[j-1]; - } - /* rs->genpoly[0] can never be zero */ - rs->genpoly[0] = rs->alpha_to[modnn(rs,rs->index_of[rs->genpoly[0]] + root)]; - } - /* convert rs->genpoly[] to index form for quicker encoding */ - for (i = 0; i <= nroots; i++) - rs->genpoly[i] = rs->index_of[rs->genpoly[i]]; - done:; - - return rs; -} - -RS *init_rs(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad) -{ - RS *rs; - - for(rs = rslist; rs != NULL; rs = rs->next) { - if(rs->pad != pad) continue; - if(rs->nroots != nroots) continue; - if(rs->mm != symsize) continue; - if(rs->gfpoly != gfpoly) continue; - if(rs->fcr != fcr) continue; - if(rs->prim != prim) continue; - - goto DONE; - } - - rs = init_rs_char(symsize, gfpoly, fcr, prim, nroots, pad); - if(rs == NULL) goto DONE; - rs->next = rslist; - rslist = rs; - -DONE: - return rs; -} - - -void free_rs_char(RS *rs) -{ - free(rs->alpha_to); - free(rs->index_of); - free(rs->genpoly); - free(rs); -} - -void free_rs_cache(void) -{ - RS *rs, *next; - - rs = rslist; - while(rs != NULL) { - next = rs->next; - free_rs_char(rs); - rs = next; - } -} - -/* The guts of the Reed-Solomon encoder, meant to be #included - * into a function body with the following typedefs, macros and variables supplied - * according to the code parameters: - - * data_t - a typedef for the data symbol - * data_t data[] - array of NN-NROOTS-PAD and type data_t to be encoded - * data_t parity[] - an array of NROOTS and type data_t to be written with parity symbols - * NROOTS - the number of roots in the RS code generator polynomial, - * which is the same as the number of parity symbols in a block. - Integer variable or literal. - * - * NN - the total number of symbols in a RS block. Integer variable or literal. - * PAD - the number of pad symbols in a block. Integer variable or literal. - * ALPHA_TO - The address of an array of NN elements to convert Galois field - * elements in index (log) form to polynomial form. Read only. - * INDEX_OF - The address of an array of NN elements to convert Galois field - * elements in polynomial form to index (log) form. Read only. - * MODNN - a function to reduce its argument modulo NN. May be inline or a macro. - * GENPOLY - an array of NROOTS+1 elements containing the generator polynomial in index form - - * The memset() and memmove() functions are used. The appropriate header - * file declaring these functions (usually ) must be included by the calling - * program. - - * Copyright 2004, Phil Karn, KA9Q - * May be used under the terms of the GNU Lesser General Public License (LGPL) - */ - -#undef A0 -#define A0 (NN) /* Special reserved value encoding zero in index form */ - -void encode_rs_char(RS *rs, const data_t *data, data_t *parity) -{ - int i, j; - data_t feedback; - - memset(parity,0,NROOTS*sizeof(data_t)); - - for(i=0;i - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __RSCODE_H__ -#define __RSCODE_H__ - -/* - * General purpose RS codec, 8-bit symbols. - */ - -typedef struct _RS RS; - -/* WARNING: Thread unsafe!!! */ -extern RS *init_rs(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad); -extern void encode_rs_char(RS *rs, const unsigned char *data, unsigned char *parity); -extern void free_rs_char(RS *rs); -extern void free_rs_cache(void); - -#endif /* __RSCODE_H__ */ diff --git a/glabels2/qrencode-3.1.0/split.c b/glabels2/qrencode-3.1.0/split.c deleted file mode 100644 index 4bb8e55b..00000000 --- a/glabels2/qrencode-3.1.0/split.c +++ /dev/null @@ -1,297 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Input data splitter. - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include "qrencode.h" -#include "qrinput.h" -#include "qrspec.h" -#include "split.h" - -#define isdigit(__c__) ((unsigned char)((signed char)(__c__) - '0') < 10) -#define isalnum(__c__) (QRinput_lookAnTable(__c__) >= 0) - -static QRencodeMode Split_identifyMode(const char *string, QRencodeMode hint) -{ - unsigned char c, d; - unsigned int word; - - c = string[0]; - - if(c == '\0') return QR_MODE_NUL; - if(isdigit(c)) { - return QR_MODE_NUM; - } else if(isalnum(c)) { - return QR_MODE_AN; - } else if(hint == QR_MODE_KANJI) { - d = string[1]; - if(d != '\0') { - word = ((unsigned int)c << 8) | d; - if((word >= 0x8140 && word <= 0x9ffc) || (word >= 0xe040 && word <= 0xebbf)) { - return QR_MODE_KANJI; - } - } - } - - return QR_MODE_8; -} - -static int Split_eatNum(const char *string, QRinput *input, QRencodeMode hint); -static int Split_eatAn(const char *string, QRinput *input, QRencodeMode hint); -static int Split_eat8(const char *string, QRinput *input, QRencodeMode hint); -static int Split_eatKanji(const char *string, QRinput *input, QRencodeMode hint); - -static int Split_eatNum(const char *string, QRinput *input,QRencodeMode hint) -{ - const char *p; - int ret; - int run; - int dif; - int ln; - QRencodeMode mode; - - ln = QRspec_lengthIndicator(QR_MODE_NUM, input->version); - - p = string; - while(isdigit(*p)) { - p++; - } - run = p - string; - mode = Split_identifyMode(p, hint); - if(mode == QR_MODE_8) { - dif = QRinput_estimateBitsModeNum(run) + 4 + ln - + QRinput_estimateBitsMode8(1) /* + 4 + l8 */ - - QRinput_estimateBitsMode8(run + 1) /* - 4 - l8 */; - if(dif > 0) { - return Split_eat8(string, input, hint); - } - } - if(mode == QR_MODE_AN) { - dif = QRinput_estimateBitsModeNum(run) + 4 + ln - + QRinput_estimateBitsModeAn(1) /* + 4 + la */ - - QRinput_estimateBitsModeAn(run + 1) /* - 4 - la */; - if(dif > 0) { - return Split_eatAn(string, input, hint); - } - } - - ret = QRinput_append(input, QR_MODE_NUM, run, (unsigned char *)string); - if(ret < 0) return -1; - - return run; -} - -static int Split_eatAn(const char *string, QRinput *input, QRencodeMode hint) -{ - const char *p, *q; - int ret; - int run; - int dif; - int la, ln; - - la = QRspec_lengthIndicator(QR_MODE_AN, input->version); - ln = QRspec_lengthIndicator(QR_MODE_NUM, input->version); - - p = string; - while(isalnum(*p)) { - if(isdigit(*p)) { - q = p; - while(isdigit(*q)) { - q++; - } - dif = QRinput_estimateBitsModeAn(p - string) /* + 4 + la */ - + QRinput_estimateBitsModeNum(q - p) + 4 + ln - - QRinput_estimateBitsModeAn(q - string) /* - 4 - la */; - if(dif < 0) { - break; - } else { - p = q; - } - } else { - p++; - } - } - - run = p - string; - - if(*p && !isalnum(*p)) { - dif = QRinput_estimateBitsModeAn(run) + 4 + la - + QRinput_estimateBitsMode8(1) /* + 4 + l8 */ - - QRinput_estimateBitsMode8(run + 1) /* - 4 - l8 */; - if(dif > 0) { - return Split_eat8(string, input, hint); - } - } - - ret = QRinput_append(input, QR_MODE_AN, run, (unsigned char *)string); - if(ret < 0) return -1; - - return run; -} - -static int Split_eatKanji(const char *string, QRinput *input, QRencodeMode hint) -{ - const char *p; - int ret; - int run; - - p = string; - while(Split_identifyMode(p, hint) == QR_MODE_KANJI) { - p += 2; - } - run = p - string; - ret = QRinput_append(input, QR_MODE_KANJI, run, (unsigned char *)string); - if(ret < 0) return -1; - - return run; -} - -static int Split_eat8(const char *string, QRinput *input, QRencodeMode hint) -{ - const char *p, *q; - QRencodeMode mode; - int ret; - int run; - int dif; - int la, ln; - - la = QRspec_lengthIndicator(QR_MODE_AN, input->version); - ln = QRspec_lengthIndicator(QR_MODE_NUM, input->version); - - p = string + 1; - while(*p != '\0') { - mode = Split_identifyMode(p, hint); - if(mode == QR_MODE_KANJI) { - break; - } - if(mode == QR_MODE_NUM) { - q = p; - while(isdigit(*q)) { - q++; - } - dif = QRinput_estimateBitsMode8(p - string) /* + 4 + l8 */ - + QRinput_estimateBitsModeNum(q - p) + 4 + ln - - QRinput_estimateBitsMode8(q - string) /* - 4 - l8 */; - if(dif < 0) { - break; - } else { - p = q; - } - } else if(mode == QR_MODE_AN) { - q = p; - while(isalnum(*q)) { - q++; - } - dif = QRinput_estimateBitsMode8(p - string) /* + 4 + l8 */ - + QRinput_estimateBitsModeAn(q - p) + 4 + la - - QRinput_estimateBitsMode8(q - string) /* - 4 - l8 */; - if(dif < 0) { - break; - } else { - p = q; - } - } else { - p++; - } - } - - run = p - string; - ret = QRinput_append(input, QR_MODE_8, run, (unsigned char *)string); - if(ret < 0) return -1; - - return run; -} - -static int Split_splitString(const char *string, QRinput *input, - QRencodeMode hint) -{ - int length; - QRencodeMode mode; - - if(*string == '\0') return 0; - - mode = Split_identifyMode(string, hint); - if(mode == QR_MODE_NUM) { - length = Split_eatNum(string, input, hint); - } else if(mode == QR_MODE_AN) { - length = Split_eatAn(string, input, hint); - } else if(mode == QR_MODE_KANJI && hint == QR_MODE_KANJI) { - length = Split_eatKanji(string, input, hint); - } else { - length = Split_eat8(string, input, hint); - } - if(length == 0) return 0; - if(length < 0) return -1; - return Split_splitString(&string[length], input, hint); -} - -static char *dupAndToUpper(const char *str, QRencodeMode hint) -{ - char *newstr, *p; - QRencodeMode mode; - - newstr = strdup(str); - if(newstr == NULL) return NULL; - - p = newstr; - while(*p != '\0') { - mode = Split_identifyMode(p, hint); - if(mode == QR_MODE_KANJI) { - p += 2; - } else { - if (*p >= 'a' && *p <= 'z') { - *p = (char)((int)*p - 32); - } - p++; - } - } - - return newstr; -} - -int Split_splitStringToQRinput(const char *string, QRinput *input, - QRencodeMode hint, int casesensitive) -{ - char *newstr; - int ret; - - if(string == NULL || *string == '\0') { - errno = EINVAL; - return -1; - } - if(!casesensitive) { - newstr = dupAndToUpper(string, hint); - if(newstr == NULL) return -1; - ret = Split_splitString(newstr, input, hint); - free(newstr); - } else { - ret = Split_splitString(string, input, hint); - } - - return ret; -} diff --git a/glabels2/qrencode-3.1.0/split.h b/glabels2/qrencode-3.1.0/split.h deleted file mode 100644 index 6a495e49..00000000 --- a/glabels2/qrencode-3.1.0/split.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * qrencode - QR Code encoder - * - * Input data splitter. - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __SPLIT_H__ -#define __SPLIT_H__ - -#include "qrencode.h" - -/** - * Split the input string (null terminated) into QRinput. - * @param string input string - * @param hint give QR_MODE_KANJI if the input string contains Kanji character encoded in Shift-JIS. If not, give QR_MODE_8. - * @param casesensitive 0 for case-insensitive encoding (all alphabet characters are replaced to UPPER-CASE CHARACTERS. - * @retval 0 success. - * @retval -1 an error occurred. errno is set to indicate the error. See - * Exceptions for the details. - * @throw EINVAL invalid input object. - * @throw ENOMEM unable to allocate memory for input objects. - */ -extern int Split_splitStringToQRinput(const char *string, QRinput *input, - QRencodeMode hint, int casesensitive); - -#endif /* __SPLIT_H__ */ diff --git a/glabels2/qrencode-3.1.0/tests/Makefile.am b/glabels2/qrencode-3.1.0/tests/Makefile.am deleted file mode 100644 index d43b4af0..00000000 --- a/glabels2/qrencode-3.1.0/tests/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -if HAVE_SDL -sdlPROGRAMS = view_qrcode -endif - -noinst_PROGRAMS = test_qrinput test_bitstream test_estimatebit \ - test_qrspec test_rs test_qrencode prof_qrencode \ - test_split test_monkey create_frame_pattern \ - $(sdlPROGRAMS) - -EXTRA_DIST = frame - -test_qrinput_SOURCES = test_qrinput.c common.h -test_qrinput_LDADD = ../libqrencode.la - -test_bitstream_SOURCES = test_bitstream.c common.h -test_bitstream_LDADD = ../libqrencode.la - -test_estimatebit_SOURCES = test_estimatebit.c common.h -test_estimatebit_LDADD = ../libqrencode.la - -test_qrspec_SOURCES = test_qrspec.c common.h -test_qrspec_LDADD = ../libqrencode.la - -test_rs_SOURCES = test_rs.c common.h -test_rs_LDADD = ../libqrencode.la - -test_qrencode_SOURCES = test_qrencode.c common.h -test_qrencode_LDADD = ../libqrencode.la - -test_split_SOURCES = test_split.c common.h -test_split_LDADD = ../libqrencode.la - -test_monkey_SOURCES = test_monkey.c common.h -test_monkey_LDADD = ../libqrencode.la - -prof_qrencode_SOURCES = prof_qrencode.c -prof_qrencode_LDADD = ../libqrencode.la - -create_frame_pattern_SOURCES = create_frame_pattern.c -create_frame_pattern_CFLAGS = $(png_CFLAGS) -create_frame_pattern_LDADD = ../libqrencode.la $(png_LIBS) - -if HAVE_SDL -view_qrcode_SOURCES = view_qrcode.c common.h -view_qrcode_CFLAGS= $(SDL_CFLAGS) -view_qrcode_LDADD = ../libqrencode.la $(SDL_LIBS) -endif diff --git a/glabels2/qrencode-3.1.0/tests/Makefile.in b/glabels2/qrencode-3.1.0/tests/Makefile.in deleted file mode 100644 index 4580407f..00000000 --- a/glabels2/qrencode-3.1.0/tests/Makefile.in +++ /dev/null @@ -1,599 +0,0 @@ -# Makefile.in generated by automake 1.10.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 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. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -noinst_PROGRAMS = test_qrinput$(EXEEXT) test_bitstream$(EXEEXT) \ - test_estimatebit$(EXEEXT) test_qrspec$(EXEEXT) \ - test_rs$(EXEEXT) test_qrencode$(EXEEXT) prof_qrencode$(EXEEXT) \ - test_split$(EXEEXT) test_monkey$(EXEEXT) \ - create_frame_pattern$(EXEEXT) $(am__EXEEXT_1) -subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -@HAVE_SDL_TRUE@am__EXEEXT_1 = view_qrcode$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -am_create_frame_pattern_OBJECTS = \ - create_frame_pattern-create_frame_pattern.$(OBJEXT) -create_frame_pattern_OBJECTS = $(am_create_frame_pattern_OBJECTS) -am__DEPENDENCIES_1 = -create_frame_pattern_DEPENDENCIES = ../libqrencode.la \ - $(am__DEPENDENCIES_1) -create_frame_pattern_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(create_frame_pattern_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_prof_qrencode_OBJECTS = prof_qrencode.$(OBJEXT) -prof_qrencode_OBJECTS = $(am_prof_qrencode_OBJECTS) -prof_qrencode_DEPENDENCIES = ../libqrencode.la -am_test_bitstream_OBJECTS = test_bitstream.$(OBJEXT) -test_bitstream_OBJECTS = $(am_test_bitstream_OBJECTS) -test_bitstream_DEPENDENCIES = ../libqrencode.la -am_test_estimatebit_OBJECTS = test_estimatebit.$(OBJEXT) -test_estimatebit_OBJECTS = $(am_test_estimatebit_OBJECTS) -test_estimatebit_DEPENDENCIES = ../libqrencode.la -am_test_monkey_OBJECTS = test_monkey.$(OBJEXT) -test_monkey_OBJECTS = $(am_test_monkey_OBJECTS) -test_monkey_DEPENDENCIES = ../libqrencode.la -am_test_qrencode_OBJECTS = test_qrencode.$(OBJEXT) -test_qrencode_OBJECTS = $(am_test_qrencode_OBJECTS) -test_qrencode_DEPENDENCIES = ../libqrencode.la -am_test_qrinput_OBJECTS = test_qrinput.$(OBJEXT) -test_qrinput_OBJECTS = $(am_test_qrinput_OBJECTS) -test_qrinput_DEPENDENCIES = ../libqrencode.la -am_test_qrspec_OBJECTS = test_qrspec.$(OBJEXT) -test_qrspec_OBJECTS = $(am_test_qrspec_OBJECTS) -test_qrspec_DEPENDENCIES = ../libqrencode.la -am_test_rs_OBJECTS = test_rs.$(OBJEXT) -test_rs_OBJECTS = $(am_test_rs_OBJECTS) -test_rs_DEPENDENCIES = ../libqrencode.la -am_test_split_OBJECTS = test_split.$(OBJEXT) -test_split_OBJECTS = $(am_test_split_OBJECTS) -test_split_DEPENDENCIES = ../libqrencode.la -am__view_qrcode_SOURCES_DIST = view_qrcode.c common.h -@HAVE_SDL_TRUE@am_view_qrcode_OBJECTS = \ -@HAVE_SDL_TRUE@ view_qrcode-view_qrcode.$(OBJEXT) -view_qrcode_OBJECTS = $(am_view_qrcode_OBJECTS) -@HAVE_SDL_TRUE@view_qrcode_DEPENDENCIES = ../libqrencode.la \ -@HAVE_SDL_TRUE@ $(am__DEPENDENCIES_1) -view_qrcode_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(view_qrcode_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/use/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(create_frame_pattern_SOURCES) $(prof_qrencode_SOURCES) \ - $(test_bitstream_SOURCES) $(test_estimatebit_SOURCES) \ - $(test_monkey_SOURCES) $(test_qrencode_SOURCES) \ - $(test_qrinput_SOURCES) $(test_qrspec_SOURCES) \ - $(test_rs_SOURCES) $(test_split_SOURCES) \ - $(view_qrcode_SOURCES) -DIST_SOURCES = $(create_frame_pattern_SOURCES) \ - $(prof_qrencode_SOURCES) $(test_bitstream_SOURCES) \ - $(test_estimatebit_SOURCES) $(test_monkey_SOURCES) \ - $(test_qrencode_SOURCES) $(test_qrinput_SOURCES) \ - $(test_qrspec_SOURCES) $(test_rs_SOURCES) \ - $(test_split_SOURCES) $(am__view_qrcode_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAJOR_VERSION = @MAJOR_VERSION@ -MAKEINFO = @MAKEINFO@ -MICRO_VERSION = @MICRO_VERSION@ -MINOR_VERSION = @MINOR_VERSION@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -RANLIB = @RANLIB@ -SDL_CFLAGS = @SDL_CFLAGS@ -SDL_CONFIG = @SDL_CONFIG@ -SDL_LIBS = @SDL_LIBS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -png_CFLAGS = @png_CFLAGS@ -png_LIBS = @png_LIBS@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -@HAVE_SDL_TRUE@sdlPROGRAMS = view_qrcode -EXTRA_DIST = frame -test_qrinput_SOURCES = test_qrinput.c common.h -test_qrinput_LDADD = ../libqrencode.la -test_bitstream_SOURCES = test_bitstream.c common.h -test_bitstream_LDADD = ../libqrencode.la -test_estimatebit_SOURCES = test_estimatebit.c common.h -test_estimatebit_LDADD = ../libqrencode.la -test_qrspec_SOURCES = test_qrspec.c common.h -test_qrspec_LDADD = ../libqrencode.la -test_rs_SOURCES = test_rs.c common.h -test_rs_LDADD = ../libqrencode.la -test_qrencode_SOURCES = test_qrencode.c common.h -test_qrencode_LDADD = ../libqrencode.la -test_split_SOURCES = test_split.c common.h -test_split_LDADD = ../libqrencode.la -test_monkey_SOURCES = test_monkey.c common.h -test_monkey_LDADD = ../libqrencode.la -prof_qrencode_SOURCES = prof_qrencode.c -prof_qrencode_LDADD = ../libqrencode.la -create_frame_pattern_SOURCES = create_frame_pattern.c -create_frame_pattern_CFLAGS = $(png_CFLAGS) -create_frame_pattern_LDADD = ../libqrencode.la $(png_LIBS) -@HAVE_SDL_TRUE@view_qrcode_SOURCES = view_qrcode.c common.h -@HAVE_SDL_TRUE@view_qrcode_CFLAGS = $(SDL_CFLAGS) -@HAVE_SDL_TRUE@view_qrcode_LDADD = ../libqrencode.la $(SDL_LIBS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -create_frame_pattern$(EXEEXT): $(create_frame_pattern_OBJECTS) $(create_frame_pattern_DEPENDENCIES) - @rm -f create_frame_pattern$(EXEEXT) - $(create_frame_pattern_LINK) $(create_frame_pattern_OBJECTS) $(create_frame_pattern_LDADD) $(LIBS) -prof_qrencode$(EXEEXT): $(prof_qrencode_OBJECTS) $(prof_qrencode_DEPENDENCIES) - @rm -f prof_qrencode$(EXEEXT) - $(LINK) $(prof_qrencode_OBJECTS) $(prof_qrencode_LDADD) $(LIBS) -test_bitstream$(EXEEXT): $(test_bitstream_OBJECTS) $(test_bitstream_DEPENDENCIES) - @rm -f test_bitstream$(EXEEXT) - $(LINK) $(test_bitstream_OBJECTS) $(test_bitstream_LDADD) $(LIBS) -test_estimatebit$(EXEEXT): $(test_estimatebit_OBJECTS) $(test_estimatebit_DEPENDENCIES) - @rm -f test_estimatebit$(EXEEXT) - $(LINK) $(test_estimatebit_OBJECTS) $(test_estimatebit_LDADD) $(LIBS) -test_monkey$(EXEEXT): $(test_monkey_OBJECTS) $(test_monkey_DEPENDENCIES) - @rm -f test_monkey$(EXEEXT) - $(LINK) $(test_monkey_OBJECTS) $(test_monkey_LDADD) $(LIBS) -test_qrencode$(EXEEXT): $(test_qrencode_OBJECTS) $(test_qrencode_DEPENDENCIES) - @rm -f test_qrencode$(EXEEXT) - $(LINK) $(test_qrencode_OBJECTS) $(test_qrencode_LDADD) $(LIBS) -test_qrinput$(EXEEXT): $(test_qrinput_OBJECTS) $(test_qrinput_DEPENDENCIES) - @rm -f test_qrinput$(EXEEXT) - $(LINK) $(test_qrinput_OBJECTS) $(test_qrinput_LDADD) $(LIBS) -test_qrspec$(EXEEXT): $(test_qrspec_OBJECTS) $(test_qrspec_DEPENDENCIES) - @rm -f test_qrspec$(EXEEXT) - $(LINK) $(test_qrspec_OBJECTS) $(test_qrspec_LDADD) $(LIBS) -test_rs$(EXEEXT): $(test_rs_OBJECTS) $(test_rs_DEPENDENCIES) - @rm -f test_rs$(EXEEXT) - $(LINK) $(test_rs_OBJECTS) $(test_rs_LDADD) $(LIBS) -test_split$(EXEEXT): $(test_split_OBJECTS) $(test_split_DEPENDENCIES) - @rm -f test_split$(EXEEXT) - $(LINK) $(test_split_OBJECTS) $(test_split_LDADD) $(LIBS) -view_qrcode$(EXEEXT): $(view_qrcode_OBJECTS) $(view_qrcode_DEPENDENCIES) - @rm -f view_qrcode$(EXEEXT) - $(view_qrcode_LINK) $(view_qrcode_OBJECTS) $(view_qrcode_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_frame_pattern-create_frame_pattern.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prof_qrencode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bitstream.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_estimatebit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_monkey.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_qrencode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_qrinput.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_qrspec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_split.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view_qrcode-view_qrcode.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -create_frame_pattern-create_frame_pattern.o: create_frame_pattern.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(create_frame_pattern_CFLAGS) $(CFLAGS) -MT create_frame_pattern-create_frame_pattern.o -MD -MP -MF $(DEPDIR)/create_frame_pattern-create_frame_pattern.Tpo -c -o create_frame_pattern-create_frame_pattern.o `test -f 'create_frame_pattern.c' || echo '$(srcdir)/'`create_frame_pattern.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/create_frame_pattern-create_frame_pattern.Tpo $(DEPDIR)/create_frame_pattern-create_frame_pattern.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='create_frame_pattern.c' object='create_frame_pattern-create_frame_pattern.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(create_frame_pattern_CFLAGS) $(CFLAGS) -c -o create_frame_pattern-create_frame_pattern.o `test -f 'create_frame_pattern.c' || echo '$(srcdir)/'`create_frame_pattern.c - -create_frame_pattern-create_frame_pattern.obj: create_frame_pattern.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(create_frame_pattern_CFLAGS) $(CFLAGS) -MT create_frame_pattern-create_frame_pattern.obj -MD -MP -MF $(DEPDIR)/create_frame_pattern-create_frame_pattern.Tpo -c -o create_frame_pattern-create_frame_pattern.obj `if test -f 'create_frame_pattern.c'; then $(CYGPATH_W) 'create_frame_pattern.c'; else $(CYGPATH_W) '$(srcdir)/create_frame_pattern.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/create_frame_pattern-create_frame_pattern.Tpo $(DEPDIR)/create_frame_pattern-create_frame_pattern.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='create_frame_pattern.c' object='create_frame_pattern-create_frame_pattern.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(create_frame_pattern_CFLAGS) $(CFLAGS) -c -o create_frame_pattern-create_frame_pattern.obj `if test -f 'create_frame_pattern.c'; then $(CYGPATH_W) 'create_frame_pattern.c'; else $(CYGPATH_W) '$(srcdir)/create_frame_pattern.c'; fi` - -view_qrcode-view_qrcode.o: view_qrcode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(view_qrcode_CFLAGS) $(CFLAGS) -MT view_qrcode-view_qrcode.o -MD -MP -MF $(DEPDIR)/view_qrcode-view_qrcode.Tpo -c -o view_qrcode-view_qrcode.o `test -f 'view_qrcode.c' || echo '$(srcdir)/'`view_qrcode.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/view_qrcode-view_qrcode.Tpo $(DEPDIR)/view_qrcode-view_qrcode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='view_qrcode.c' object='view_qrcode-view_qrcode.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(view_qrcode_CFLAGS) $(CFLAGS) -c -o view_qrcode-view_qrcode.o `test -f 'view_qrcode.c' || echo '$(srcdir)/'`view_qrcode.c - -view_qrcode-view_qrcode.obj: view_qrcode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(view_qrcode_CFLAGS) $(CFLAGS) -MT view_qrcode-view_qrcode.obj -MD -MP -MF $(DEPDIR)/view_qrcode-view_qrcode.Tpo -c -o view_qrcode-view_qrcode.obj `if test -f 'view_qrcode.c'; then $(CYGPATH_W) 'view_qrcode.c'; else $(CYGPATH_W) '$(srcdir)/view_qrcode.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/view_qrcode-view_qrcode.Tpo $(DEPDIR)/view_qrcode-view_qrcode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='view_qrcode.c' object='view_qrcode-view_qrcode.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(view_qrcode_CFLAGS) $(CFLAGS) -c -o view_qrcode-view_qrcode.obj `if test -f 'view_qrcode.c'; then $(CYGPATH_W) 'view_qrcode.c'; else $(CYGPATH_W) '$(srcdir)/view_qrcode.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - -# 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/glabels2/qrencode-3.1.0/tests/common.h b/glabels2/qrencode-3.1.0/tests/common.h deleted file mode 100644 index 6156c7cb..00000000 --- a/glabels2/qrencode-3.1.0/tests/common.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * common part of test units. - */ - -#ifndef __COMMON_H__ -#define __COMMON_H__ - -#include -#include "../qrencode.h" -#include "../qrinput.h" -#include "../bitstream.h" -#include "../qrencode_inner.h" - -#define testStart(__arg__) (testStartReal(__func__, __arg__)) -#define testEndExp(__arg__) (testEnd(!(__arg__))) - -static int tests = 0; -static int failed = 0; -static int assertionFailed = 0; -static int assertionNum = 0; -static const char *testName = NULL; -static const char *testFunc = NULL; -char levelChar[4] = {'L', 'M', 'Q', 'H'}; -const char *modeStr[5] = {"nm", "an", "8", "kj", "st"}; - -void printQRinput(QRinput *input) -{ - QRinput_List *list; - unsigned char *p; - int i; - - list = input->head; - while(list != NULL) { - p = list->data; - for(i=0; isize; i++) { - printf("0x%02x,", list->data[i]); - } - list = list->next; - } - printf("\n"); -} - -void printQRinputInfo(QRinput *input) -{ - QRinput_List *list; - BitStream *b; - int i; - - printf("QRinput info:\n"); - printf(" version: %d\n", input->version); - printf(" level : %c\n", levelChar[input->level]); - list = input->head; - i = 0; - while(list != NULL) { - i++; - list = list->next; - } - printf(" chunks: %d\n", i); - b = QRinput_mergeBitStream(input); - if(b != NULL) { - printf(" bitstream-size: %d\n", BitStream_size(b)); - BitStream_free(b); - } - - list = input->head; - i = 0; - while(list != NULL) { - printf("\t#%d: mode = %s, size = %d\n", i, modeStr[list->mode], list->size); - i++; - list = list->next; - } -} - -void testStartReal(const char *func, const char *name) -{ - tests++; - testName = name; - testFunc = func; - assertionFailed = 0; - assertionNum = 0; - printf("_____%d: %s: %s...\n", tests, func, name); -} - -void testEnd(int result) -{ - printf(".....%d: %s: %s, ", tests, testFunc, testName); - if(result) { - puts("FAILED."); - failed++; - } else { - puts("PASSED."); - } -} - -#define assert_exp(__exp__, ...) \ -{assertionNum++;if(!(__exp__)) {assertionFailed++; printf(__VA_ARGS__);}} - -#define assert_zero(__exp__, ...) assert_exp((__exp__) == 0, __VA_ARGS__) -#define assert_nonzero(__exp__, ...) assert_exp((__exp__) != 0, __VA_ARGS__) -#define assert_null(__ptr__, ...) assert_exp((__ptr__) == NULL, __VA_ARGS__) -#define assert_nonnull(__ptr__, ...) assert_exp((__ptr__) != NULL, __VA_ARGS__) -#define assert_equal(__e1__, __e2__, ...) assert_exp((__e1__) == (__e2__), __VA_ARGS__) -#define assert_notequal(__e1__, __e2__, ...) assert_exp((__e1__) != (__e2__), __VA_ARGS__) -#define assert_nothing(__exp__, ...) {printf(__VA_ARGS__); __exp__;} - -void testFinish(void) -{ - printf(".....%d: %s: %s, ", tests, testFunc, testName); - if(assertionFailed) { - printf("FAILED. (%d assertions failed.)\n", assertionFailed); - failed++; - } else { - printf("PASSED. (%d assertions passed.)\n", assertionNum); - } -} - -void report() -{ - printf("Total %d tests, %d fails.\n", tests, failed); - if(failed) exit(-1); -} - -int ncmpBin(char *correct, BitStream *bstream, int len) -{ - int i, bit; - - if(len != BitStream_size(bstream)) { - printf("Length is not match: %d, %d expected.\n", BitStream_size(bstream), len); - return -1; - } - - for(i=0; idata[i] != bit) return -1; - } - - return 0; -} - -int cmpBin(char *correct, BitStream *bstream) -{ - int len; - - len = strlen(correct); - return ncmpBin(correct, bstream, len); -} - -char *sprintfBin(int size, unsigned char *data) -{ - int i, j; - unsigned char mask; - int b, r; - char *str, *p; - - str = (char *)malloc(size + 1); - p = str; - b = size / 8; - for(i=0; i> 1; - } - } - r = size - b * 8; - if(r) { - mask = 1 << (r - 1); - for(i=0; i> 1; - } - } - *p = '\0'; - - return str; -} - -static char qrModeChar[4] = {'n', 'a', '8', 'k'}; -void printQrinput(QRinput *input) -{ - QRinput_List *list; - - list = input->head; - while(list != NULL) { - printf("%c(%d)\n", qrModeChar[list->mode], list->size); - list = list->next; - } -} -#endif /* __COMMON_H__ */ diff --git a/glabels2/qrencode-3.1.0/tests/create_frame_pattern.c b/glabels2/qrencode-3.1.0/tests/create_frame_pattern.c deleted file mode 100644 index 786309fe..00000000 --- a/glabels2/qrencode-3.1.0/tests/create_frame_pattern.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * This tool creates a frame pattern data for debug purpose used by - * test_qrspec. test_qrspec and create_frame_pattern uses the same function - * of libqrencode. This means the test is meaningless if test_qrspec is run - * with a pattern data created by create_frame_pattern of the same version. - * In order to test it correctly, create a pattern data by the tool of the - * previous version, or use the frame data attached to the package. - */ - -#include -#include -#include -#include "common.h" -#include "../qrspec.h" - -void append_pattern(int version, FILE *fp) -{ - int width; - unsigned char *frame; - - frame = QRspec_newFrame(version); - width = QRspec_getWidth(version); - fwrite(frame, 1, width * width, fp); - free(frame); -} - -static int writePNG(unsigned char *frame, int width, const char *outfile) -{ - static FILE *fp; - png_structp png_ptr; - png_infop info_ptr; - unsigned char *row, *p, *q; - int x, y, xx, yy, bit; - int realwidth; - const int margin = 0; - const int size = 1; - - realwidth = (width + margin * 2) * size; - row = (unsigned char *)malloc((realwidth + 7) / 8); - if(row == NULL) { - fprintf(stderr, "Failed to allocate memory.\n"); - exit(EXIT_FAILURE); - } - - if(outfile[0] == '-' && outfile[1] == '\0') { - fp = stdout; - } else { - fp = fopen(outfile, "wb"); - if(fp == NULL) { - fprintf(stderr, "Failed to create file: %s\n", outfile); - perror(NULL); - exit(EXIT_FAILURE); - } - } - - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if(png_ptr == NULL) { - fclose(fp); - fprintf(stderr, "Failed to initialize PNG writer.\n"); - exit(EXIT_FAILURE); - } - - info_ptr = png_create_info_struct(png_ptr); - if(info_ptr == NULL) { - fclose(fp); - fprintf(stderr, "Failed to initialize PNG write.\n"); - exit(EXIT_FAILURE); - } - - if(setjmp(png_jmpbuf(png_ptr))) { - png_destroy_write_struct(&png_ptr, &info_ptr); - fclose(fp); - fprintf(stderr, "Failed to write PNG image.\n"); - exit(EXIT_FAILURE); - } - - png_init_io(png_ptr, fp); - png_set_IHDR(png_ptr, info_ptr, - realwidth, realwidth, - 1, - PNG_COLOR_TYPE_GRAY, - PNG_INTERLACE_NONE, - PNG_COMPRESSION_TYPE_DEFAULT, - PNG_FILTER_TYPE_DEFAULT); - png_write_info(png_ptr, info_ptr); - - /* top margin */ - memset(row, 0xff, (realwidth + 7) / 8); - for(y=0; y -#include -#include -#include -#include -#include "../qrencode.h" -#include "../qrspec.h" -#include "../rscode.h" - -struct timeval tv; -void timerStart(const char *str) -{ - printf("%s: START\n", str); - gettimeofday(&tv, NULL); -} - -void timerStop(void) -{ - struct timeval tc; - - gettimeofday(&tc, NULL); - printf("STOP: %ld msec\n", (tc.tv_sec - tv.tv_sec) * 1000 - + (tc.tv_usec - tv.tv_usec) / 1000); -} - -void prof_ver1to10(void) -{ - QRcode *code; - int i; - int version; - static const char *data = "This is test."; - - timerStart("Version 1 - 10 (500 symbols for each)"); - for(i=0; i<500; i++) { - for(version = 0; version < 11; version++) { - code = QRcode_encodeString(data, version, QR_ECLEVEL_L, QR_MODE_8, 0); - if(code == NULL) { - perror("Failed to encode:"); - } else { - QRcode_free(code); - } - } - } - timerStop(); -} - -void prof_ver31to40(void) -{ - QRcode *code; - int i; - int version; - static const char *data = "This is test."; - - timerStart("Version 31 - 40 (50 symbols for each)"); - for(i=0; i<50; i++) { - for(version = 31; version < 41; version++) { - code = QRcode_encodeString(data, version, QR_ECLEVEL_L, QR_MODE_8, 0); - if(code == NULL) { - perror("Failed to encode:"); - } else { - QRcode_free(code); - } - } - } - timerStop(); -} - -int main() -{ - prof_ver1to10(); - prof_ver31to40(); - - QRspec_clearCache(); - free_rs_cache(); - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/tests/test_all.sh b/glabels2/qrencode-3.1.0/tests/test_all.sh deleted file mode 100755 index c71f28d8..00000000 --- a/glabels2/qrencode-3.1.0/tests/test_all.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -e -./test_bitstream -./test_estimatebit -./test_qrencode -./test_qrinput -./test_qrspec -./test_rs -./test_split -./test_monkey diff --git a/glabels2/qrencode-3.1.0/tests/test_bitstream.c b/glabels2/qrencode-3.1.0/tests/test_bitstream.c deleted file mode 100644 index 8c853777..00000000 --- a/glabels2/qrencode-3.1.0/tests/test_bitstream.c +++ /dev/null @@ -1,150 +0,0 @@ -#include -#include -#include "common.h" -#include "../bitstream.h" - -void test_null(void) -{ - BitStream *bstream; - - testStart("Empty stream"); - bstream = BitStream_new(); - assert_zero(BitStream_size(bstream), "Size of empty BitStream is not 0."); - assert_null(BitStream_toByte(bstream), "BitStream_toByte returned non-NULL."); - assert_nothing(BitStream_free(NULL), "Check BitStream_free(NULL).\n"); - testFinish(); - - BitStream_free(bstream); -} - -void test_num(void) -{ - BitStream *bstream; - unsigned int data = 0x13579bdf; - char correct[] = "0010011010101111001101111011111"; - - testStart("New from num"); - bstream = BitStream_new(); - BitStream_appendNum(bstream, 31, data); - testEnd(cmpBin(correct, bstream)); - - BitStream_free(bstream); -} - -void test_bytes(void) -{ - BitStream *bstream; - unsigned char data[1] = {0x3a}; - char correct[] = "00111010"; - - testStart("New from bytes"); - bstream = BitStream_new(); - BitStream_appendBytes(bstream, 1, data); - testEnd(cmpBin(correct, bstream)); - BitStream_free(bstream); -} - -void test_appendNum(void) -{ - BitStream *bstream; - char correct[] = "10001010111111111111111100010010001101000101011001111000"; - - testStart("Append Num"); - bstream = BitStream_new(); - - BitStream_appendNum(bstream, 8, 0x0000008a); - assert_zero(ncmpBin(correct, bstream, 8), "Internal data is incorrect."); - - BitStream_appendNum(bstream, 16, 0x0000ffff); - assert_zero(ncmpBin(correct, bstream, 24), "Internal data is incorrect."); - - BitStream_appendNum(bstream, 32, 0x12345678); - - assert_zero(cmpBin(correct, bstream), "Internal data is incorrect."); - testFinish(); - - BitStream_free(bstream); -} - -void test_appendBytes(void) -{ - BitStream *bstream; - unsigned char data[8]; - char correct[] = "10001010111111111111111100010010001101000101011001111000"; - - testStart("Append Bytes"); - bstream = BitStream_new(); - - data[0] = 0x8a; - BitStream_appendBytes(bstream, 1, data); - assert_zero(ncmpBin(correct, bstream, 8), "Internal data is incorrect."); - - data[0] = 0xff; - data[1] = 0xff; - BitStream_appendBytes(bstream, 2, data); - assert_zero(ncmpBin(correct, bstream, 24), "Internal data is incorrect."); - - data[0] = 0x12; - data[1] = 0x34; - data[2] = 0x56; - data[3] = 0x78; - BitStream_appendBytes(bstream, 4, data); - - assert_zero(cmpBin(correct, bstream), "Internal data is incorrect."); - testFinish(); - - BitStream_free(bstream); -} - -void test_toByte(void) -{ - BitStream *bstream; - unsigned char correct[] = { - 0x8a, 0xff, 0xff, 0x12, 0x34, 0x56, 0x78 - }; - unsigned char *result; - - testStart("Convert to a byte array"); - bstream = BitStream_new(); - - BitStream_appendBytes(bstream, 1, &correct[0]); - BitStream_appendBytes(bstream, 2, &correct[1]); - BitStream_appendBytes(bstream, 4, &correct[3]); - - result = BitStream_toByte(bstream); - testEnd(memcmp(correct, result, 7)); - - BitStream_free(bstream); - free(result); -} - -void test_size(void) -{ - BitStream *bstream; - - testStart("size check"); - bstream = BitStream_new(); - assert_equal(BitStream_size(bstream), 0, "Initialized BitStream is not 0 length"); - BitStream_appendNum(bstream, 1, 0); - assert_equal(BitStream_size(bstream), 1, "Size incorrect. (first append)"); - BitStream_appendNum(bstream, 2, 0); - assert_equal(BitStream_size(bstream), 3, "Size incorrect. (second append)"); - testFinish(); - - BitStream_free(bstream); -} - -int main(int argc, char **argv) -{ - test_null(); - test_num(); - test_bytes(); - test_appendNum(); - test_appendBytes(); - test_toByte(); - test_size(); - - report(); - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/tests/test_estimatebit.c b/glabels2/qrencode-3.1.0/tests/test_estimatebit.c deleted file mode 100644 index 4e65eb63..00000000 --- a/glabels2/qrencode-3.1.0/tests/test_estimatebit.c +++ /dev/null @@ -1,158 +0,0 @@ -#include -#include -#include -#include "common.h" -#include "../qrinput.h" - -QRinput *gstream; - -void test_numbit(void) -{ - QRinput *stream; - char num[9]="01234567"; - int bits; - - testStart("Estimation of Numeric stream (8 digits)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); - bits = QRinput_estimateBitStreamSize(stream, 0); - testEndExp(bits == 41); - - QRinput_append(gstream, QR_MODE_NUM, 8, (unsigned char *)num); - QRinput_free(stream); -} - -void test_numbit2(void) -{ - QRinput *stream; - char num[17]="0123456789012345"; - int bits; - - testStart("Estimation of Numeric stream (16 digits)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_NUM, 16, (unsigned char *)num); - bits = QRinput_estimateBitStreamSize(stream, 0); - testEndExp(bits == 68); - - QRinput_append(gstream, QR_MODE_NUM, 16, (unsigned char *)num); - QRinput_free(stream); -} - -void test_numbit3(void) -{ - QRinput *stream; - char *num; - int bits; - - testStart("Estimation of Numeric stream (400 digits)"); - stream = QRinput_new(); - num = (char *)malloc(401); - memset(num, '1', 400); - num[400] = '\0'; - QRinput_append(stream, QR_MODE_NUM, 400, (unsigned char *)num); - bits = QRinput_estimateBitStreamSize(stream, 0); - /* 4 + 10 + 133*10 + 4 = 1348 */ - testEndExp(bits == 1348); - - QRinput_append(gstream, QR_MODE_NUM, 400, (unsigned char *)num); - QRinput_free(stream); - free(num); -} - -void test_an(void) -{ - QRinput *stream; - char str[6]="AC-42"; - int bits; - - testStart("Estimation of Alphabet-Numeric stream (5 chars)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_AN, 5, (unsigned char *)str); - bits = QRinput_estimateBitStreamSize(stream, 0); - testEndExp(bits == 41); - - QRinput_append(gstream, QR_MODE_AN, 5, (unsigned char *)str); - QRinput_free(stream); -} - -void test_8(void) -{ - QRinput *stream; - char str[9]="12345678"; - int bits; - - testStart("Estimation of 8 bit data stream (8 bytes)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_8, 8, (unsigned char *)str); - bits = QRinput_estimateBitStreamSize(stream, 0); - testEndExp(bits == 76); - - QRinput_append(gstream, QR_MODE_8, 8, (unsigned char *)str); - QRinput_free(stream); -} - -void test_structure(void) -{ - QRinput *stream; - int bits; - - testStart("Estimation of a structure-append header"); - stream = QRinput_new(); - QRinput_insertStructuredAppendHeader(stream, 10, 1, 0); - bits = QRinput_estimateBitStreamSize(stream, 1); - testEndExp(bits == 20); - - QRinput_insertStructuredAppendHeader(gstream, 10, 1, 0); - QRinput_free(stream); -} - -void test_kanji(void) -{ - int res; - - QRinput *stream; - unsigned char str[4]= {0x93, 0x5f,0xe4, 0xaa}; - int bits; - - testStart("Estimation of Kanji stream (2 chars)"); - stream = QRinput_new(); - res = QRinput_append(stream, QR_MODE_KANJI, 4, (unsigned char *)str); - if(res < 0) { - printf("Failed to add.\n"); - testEnd(1); - } else { - bits = QRinput_estimateBitStreamSize(stream, 0); - testEndExp(bits == 38); - QRinput_append(gstream, QR_MODE_KANJI, 4, (unsigned char *)str); - } - - QRinput_free(stream); -} - -void test_mix(void) -{ - int bits; - - testStart("Estimation of Mixed stream"); - bits = QRinput_estimateBitStreamSize(gstream, 0); - testEndExp(bits == (41 + 68 + 1348 + 41 + 76 + 38 + 20)); - QRinput_free(gstream); -} - -int main(int argc, char **argv) -{ - gstream = QRinput_new(); - - test_numbit(); - test_numbit2(); - test_numbit3(); - test_an(); - test_8(); - test_kanji(); - test_structure(); - test_mix(); - - report(); - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/tests/test_monkey.c b/glabels2/qrencode-3.1.0/tests/test_monkey.c deleted file mode 100644 index 8986fe72..00000000 --- a/glabels2/qrencode-3.1.0/tests/test_monkey.c +++ /dev/null @@ -1,326 +0,0 @@ -#include -#include -#include -#include "common.h" -#include "../qrinput.h" -#include "../split.h" -#include "../qrspec.h" -#include "../rscode.h" - -#define MAX_LENGTH 7091 -static char data[MAX_LENGTH]; -static char check[MAX_LENGTH]; - -static const char *AN = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"; - -#define drand(__scale__) ((__scale__) * (double)rand() / ((double)RAND_MAX + 1.0)) - -int fill8bitData(void) -{ - int len, i; - - len = 1 + (int)drand((MAX_LENGTH - 2)); - for(i=0; ihead; - i = 0; - while(list != NULL) { - memcpy(check + i, list->data, list->size); - i += list->size; - list = list->next; - } - if(i != len) { - printf("#%d: length is not correct. (%d should be %d)\n", num, i, len); - } - - check[i] = '\0'; - ret = memcmp(data, check, len); - if(ret != 0) { - printf("#%d: data mismatched.\n", num); - list = input->head; - i = 0; - while(list != NULL) { - ret = memcmp(data + i, list->data, list->size); - printf("wrong chunk:\n"); - printf(" position: %d\n", i); - printf(" mode : %d\n", list->mode); - printf(" size : %d\n", list->size); - printf(" data : %.*s\n", list->size, list->data); - i += list->size; - list = list->next; - } - exit(1); - } - QRinput_free(input); -} - -void monkey_split_an(int loop) -{ - int i; - - puts("Monkey test: Split_splitStringToQRinput() - AlphaNumeric string."); - srand(0); - for(i=0; ihead; - i = 0; - while(list != NULL) { - memcpy(check + i, list->data, list->size); - i += list->size; - list = list->next; - } - if(i != len) { - printf("#%d: length is not correct. (%d should be %d)\n", num, i, len); - } - - check[i] = '\0'; - ret = memcmp(data, check, len); - if(ret != 0) { - printf("#%d: data mismatched.\n", num); - list = input->head; - i = 0; - while(list != NULL) { - ret = memcmp(data + i, list->data, list->size); - printf("wrong chunk:\n"); - printf(" position: %d\n", i); - printf(" mode : %d\n", list->mode); - printf(" size : %d\n", list->size); - printf(" data : %.*s\n", list->size, list->data); - i += list->size; - list = list->next; - } - exit(1); - } - QRinput_free(input); -} - -void monkey_split_8(int loop) -{ - int i; - - puts("Monkey test: Split_splitStringToQRinput() - 8bit char string."); - srand(0); - for(i=0; ihead; - i = 0; - while(list != NULL) { - memcpy(check + i, list->data, list->size); - i += list->size; - list = list->next; - } - if(i != len) { - printf("#%d: length is not correct. (%d should be %d)\n", num, i, len); - } - - check[i] = '\0'; - ret = memcmp(data, check, len); - if(ret != 0) { - printf("#%d: data mismatched.\n", num); - list = input->head; - i = 0; - while(list != NULL) { - ret = memcmp(data + i, list->data, list->size); - printf("wrong chunk:\n"); - printf(" position: %d\n", i); - printf(" mode : %d\n", list->mode); - printf(" size : %d\n", list->size); - printf(" data : %.*s\n", list->size, list->data); - i += list->size; - list = list->next; - } - exit(1); - } - QRinput_free(input); -} - -void monkey_split_kanji(int loop) -{ - int i; - - puts("Monkey test: Split_splitStringToQRinput() - kanji string."); - srand(0); - for(i=0; ihead; - i = 0; - while(il != NULL) { - if(il->input->version != version) { - printf("Test: version %d, level %c\n", version, levelChar[level]); - printf("wrong version number.\n"); - printQRinputInfo(il->input); - exit(1); - } - i++; - il = il->next; - } - codes = QRcode_encodeInputStructured(s); - if(codes == NULL) { - perror("test_split_structure aborted at QRcode_encodeInputStructured():"); - QRinput_free(input); - QRinput_Struct_free(s); - return; - } - list = codes; - il = s->head; - c = 0; - while(list != NULL) { - if(list->code->version != version) { - printf("#%d: data mismatched.\n", num); - printf("Test: version %d, level %c\n", version, levelChar[level]); - printf("code #%d\n", c); - printf("Version mismatch: %d should be %d\n", list->code->version, version); - printf("max bits: %d\n", QRspec_getDataLength(version, level) * 8 - 20); - printQRinputInfo(il->input); - printQRinput(input); - exit(1); - } - list = list->next; - il = il->next; - c++; - } - - QRinput_free(input); - QRinput_Struct_free(s); - QRcode_List_free(codes); -} - -void monkey_split_structure(int loop) -{ - int i; - - puts("Monkey test: QRinput_splitQRinputToStruct."); - srand(0); - for(i=0; i -#include -#include "common.h" -#include "../qrencode_inner.h" -#include "../qrspec.h" -#include "../qrinput.h" -#include "../mask.h" -#include "../rscode.h" - -int inputSize(QRinput *input) -{ - BitStream *bstream; - int size; - - bstream = QRinput_mergeBitStream(input); - size = BitStream_size(bstream); - BitStream_free(bstream); - - return size; -} - -void test_iterate() -{ - int i; - QRinput *stream; - char num[9] = "01234567"; - unsigned char *data; - QRRawCode *raw; - int err = 0; - - testStart("Test getCode (1-L)"); - stream = QRinput_new(); - QRinput_setVersion(stream, 1); - QRinput_setErrorCorrectionLevel(stream, QR_ECLEVEL_L); - QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); - - raw = QRraw_new(stream); - data = raw->datacode; - for(i=0; idataLength; i++) { - if(data[i] != QRraw_getCode(raw)) { - err++; - } - } - - QRinput_free(stream); - QRraw_free(raw); - testEnd(err); -} - -void test_iterate2() -{ - int i; - QRinput *stream; - char num[9] = "01234567"; - QRRawCode *raw; - int err = 0; - unsigned char correct[] = { - 0x10, 0x11, 0xec, 0xec, 0x20, 0xec, 0x11, 0x11, - 0x0c, 0x11, 0xec, 0xec, 0x56, 0xec, 0x11, 0x11, - 0x61, 0x11, 0xec, 0xec, 0x80, 0xec, 0x11, 0x11, - 0xec, 0x11, 0xec, 0xec, 0x11, 0xec, 0x11, 0x11, - 0xec, 0x11, 0xec, 0xec, 0x11, 0xec, 0x11, 0x11, - 0xec, 0x11, 0xec, 0xec, 0x11, 0x11, - 0x5c, 0xde, 0x68, 0x68, 0x4d, 0xb3, 0xdb, 0xdb, - 0xd5, 0x14, 0xe1, 0xe1, 0x5b, 0x2a, 0x1f, 0x1f, - 0x49, 0xc4, 0x78, 0x78, 0xf7, 0xe0, 0x5b, 0x5b, - 0xc3, 0xa7, 0xc1, 0xc1, 0x5d, 0x9a, 0xea, 0xea, - 0x48, 0xad, 0x9d, 0x9d, 0x58, 0xb3, 0x3f, 0x3f, - 0x10, 0xdb, 0xbf, 0xbf, 0xeb, 0xec, 0x05, 0x05, - 0x98, 0x35, 0x83, 0x83, 0xa9, 0x95, 0xa6, 0xa6, - 0xea, 0x7b, 0x8d, 0x8d, 0x04, 0x3c, 0x08, 0x08, - 0x64, 0xce, 0x3e, 0x3e, 0x4d, 0x9b, 0x30, 0x30, - 0x4e, 0x65, 0xd6, 0xd6, 0xe4, 0x53, 0x2c, 0x2c, - 0x46, 0x1d, 0x2e, 0x2e, 0x29, 0x16, 0x27, 0x27 - }; - - testStart("Test getCode (5-H)"); - stream = QRinput_new(); - QRinput_setVersion(stream, 5); - QRinput_setErrorCorrectionLevel(stream, QR_ECLEVEL_H); - QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); - - raw = QRraw_new(stream); - for(i=0; idataLength; i++) { - if(correct[i] != QRraw_getCode(raw)) { - err++; - } - } - - QRinput_free(stream); - QRraw_free(raw); - testEnd(err); -} - -#if 0 -void print_filler(void) -{ - int width; - int x, y; - int version = 5; - unsigned char *frame; - - width = QRspec_getWidth(version); - frame = FrameFiller_fillerTest(version); - - for(y=0; y 5)] & 1; - if(decode & 1) b1++; - } - for(i=0; i<7; i++) { - decode = decode << 1; - decode |= frame[width * ((6 - i) + (i < 1)) + 8] & 1; - if(decode & 1) b1++; - } - if(decode != format) { - printf("Upper-left format information is invalid.\n"); - printf("%08x, %08x\n", format, decode); - testEnd(1); - return; - } - decode = 0; - for(i=0; i<7; i++) { - decode = decode << 1; - decode |= frame[width * (width - 1 - i) + 8] & 1; - if(decode & 1) b1++; - } - for(i=0; i<8; i++) { - decode = decode << 1; - decode |= frame[width * 8 + width - 8 + i] & 1; - if(decode & 1) b1++; - } - if(decode != format) { - printf("Bottom and right format information is invalid.\n"); - printf("%08x, %08x\n", format, decode); - testEnd(1); - return; - } - - if(b2 != blacks || b1 != b2) { - printf("Number of dark modules is incorrect.\n"); - printf("Return value: %d, dark modules in frame: %d, should be: %d\n", blacks, b1, b2); - testEnd(1); - return; - } - - free(frame); - - testEnd(0); -} - -#define N1 (3) -#define N2 (3) -#define N3 (40) -#define N4 (10) - -void test_eval(void) -{ - unsigned char *frame; - int w = 6; - int demerit; - - frame = (unsigned char *)malloc(w * w); - - testStart("Test mask evaluation (all white)"); - memset(frame, 0, w * w); - demerit = Mask_evaluateSymbol(w, frame); - testEndExp(demerit == ((N1 + 1)*w*2 + N2 * (w - 1) * (w - 1))); - - testStart("Test mask evaluation (all black)"); - memset(frame, 1, w * w); - demerit = Mask_evaluateSymbol(w, frame); - testEndExp(demerit == ((N1 + 1)*w*2 + N2 * (w - 1) * (w - 1))); - - free(frame); -} - -/* .#.#.#.#.# - * #.#.#.#.#. - * ..##..##.. - * ##..##..## - * ...###...# - * ###...###. - * ....####.. - * ####....## - * .....##### - * #####..... - */ -void test_eval2(void) -{ - unsigned char *frame; - int w = 10; - int demerit; - int x; - - frame = (unsigned char *)malloc(w * w); - - testStart("Test mask evaluation (run length penalty check)"); - for(x=0; xwidth; - frame = qrcode->data; - for(y=0; y> (20-x)) & 1) != (frame[y*w+x]&1)) { - printf("Diff in mask=%d (%d,%d)\n", mask, x, y); - err++; - } - } - } - QRcode_free(qrcode); - } - QRinput_free(stream); - testEnd(err); -} - -void test_encode2(void) -{ - QRcode *qrcode; - - testStart("Test encode (2-H) (no padding test)"); - qrcode = QRcode_encodeString("abcdefghijk123456789012", 0, QR_ECLEVEL_H, QR_MODE_8, 0); - testEndExp(qrcode->version == 2); - QRcode_free(qrcode); -} - -void test_encode3(void) -{ - QRcode *code1, *code2; - QRinput *input; - - testStart("Compare encodeString and encodeInput"); - code1 = QRcode_encodeString("0123456", 0, QR_ECLEVEL_L, QR_MODE_8, 0); - input = QRinput_new2(0, QR_ECLEVEL_L); - QRinput_append(input, QR_MODE_NUM, 7, (unsigned char *)"0123456"); - code2 = QRcode_encodeInput(input); - testEnd(memcmp(code1->data, code2->data, code1->width * code1->width)); - - QRcode_free(code1); - QRcode_free(code2); - QRinput_free(input); -} - -void test_encodeNull(void) -{ - QRcode *qrcode; - - testStart("Test encode NULL."); - qrcode = QRcode_encodeString(NULL, 0, QR_ECLEVEL_H, QR_MODE_8, 0); - assert_null(qrcode, "QRcode_encodeString() returned something.\n"); - testFinish(); - if(qrcode != NULL) QRcode_free(qrcode); -} - - -void test_encodeEmpty(void) -{ - QRcode *qrcode; - - testStart("Test encode an empty string."); - qrcode = QRcode_encodeString("", 0, QR_ECLEVEL_H, QR_MODE_8, 0); - assert_null(qrcode, "QRcode_encodeString() returned something.\n"); - testFinish(); - if(qrcode != NULL) QRcode_free(qrcode); -} - -void test_encodeNull8(void) -{ - QRcode *qrcode; - - testStart("Test encode NULL."); - qrcode = QRcode_encodeString8bit(NULL, 0, QR_ECLEVEL_H); - assert_null(qrcode, "QRcode_encodeString8bit() returned something.\n"); - testFinish(); - if(qrcode != NULL) QRcode_free(qrcode); -} - - -void test_encodeEmpty8(void) -{ - QRcode *qrcode; - - testStart("Test encode an empty string."); - qrcode = QRcode_encodeString8bit("", 0, QR_ECLEVEL_H); - assert_null(qrcode, "QRcode_encodeString8bit() returned something.\n"); - testFinish(); - if(qrcode != NULL) QRcode_free(qrcode); -} - -void test_encodeTooLong(void) -{ - QRcode *code; - char *data; - - testStart("Encode too large data"); - data = (char *)malloc(4300); - memset(data, 'a', 4295); - memset(data + 4295, '0', 4); - data[4299] = '\0'; - - code = QRcode_encodeString(data, 0, QR_ECLEVEL_L, QR_MODE_8, 0); - testEndExp(code == NULL); - - if(code != NULL) { - printf("%d, %d\n", code->version, code->width); - QRcode_free(code); - } - free(data); -} - -void test_01234567(void) -{ - QRinput *stream; - char num[9] = "01234567"; - int i, err = 0; - QRcode *qrcode; - unsigned char correct[] = { -0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, 0x84, 0x03, 0x02, 0x03, 0x03, 0xc0, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, -0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, 0xc0, 0x84, 0x03, 0x03, 0x03, 0x03, 0xc0, 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, -0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x02, 0x02, 0x02, 0xc0, 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, -0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x03, 0x02, 0x02, 0x02, 0xc0, 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, -0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x03, 0x03, 0x03, 0xc0, 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, -0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x02, 0x02, 0x03, 0xc0, 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, -0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, 0x91, 0x90, 0x91, 0x90, 0x91, 0xc0, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x85, 0x02, 0x02, 0x03, 0x03, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, -0x85, 0x84, 0x85, 0x85, 0x85, 0x85, 0x91, 0x84, 0x84, 0x03, 0x02, 0x02, 0x03, 0x84, 0x85, 0x85, 0x85, 0x85, 0x85, 0x84, 0x84, -0x02, 0x02, 0x02, 0x03, 0x02, 0x03, 0x90, 0x03, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x02, 0x02, -0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x91, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, -0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x90, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, -0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x91, 0x03, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x81, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03, 0x03, 0x02, 0x02, -0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, 0x84, 0x03, 0x03, 0x02, 0x03, 0x02, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, -0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x02, 0x03, -0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x02, 0x02, -0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, -0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x03, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02, -0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, 0xc0, 0x84, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x03, 0x03, 0x02, -0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, 0x85, 0x03, 0x03, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02}; - - testStart("Encode 01234567 in 1-M"); - stream = QRinput_new2(1, QR_ECLEVEL_M); - QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); - qrcode = QRcode_encodeInput(stream); - for(i=0; iwidth * qrcode->width; i++) { - if(qrcode->data[i] != correct[i]) { - err++; - } - } - testEnd(err); - QRinput_free(stream); - QRcode_free(qrcode); -} - -void print_01234567(void) -{ - QRinput *stream; - char num[9] = "01234567"; - unsigned char *frame; - int x, y, w; - QRcode *qrcode; - - stream = QRinput_new2(1, QR_ECLEVEL_M); - QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); - qrcode = QRcode_encodeInput(stream); - w = qrcode->width; - frame = qrcode->data; - for(y=0; yversion = -1; - input->level = QR_ECLEVEL_L; - code = QRcode_encodeInput(input); - assert_null(code, "invalid version(-1) was not checked.\n"); - if(code != NULL) QRcode_free(code); - - input->version = 41; - input->level = QR_ECLEVEL_L; - code = QRcode_encodeInput(input); - assert_null(code, "invalid version(41) access was not checked.\n"); - if(code != NULL) QRcode_free(code); - - input->version = 1; - input->level = (QRecLevel)(QR_ECLEVEL_H + 1); - code = QRcode_encodeInput(input); - assert_null(code, "invalid level(H+1) access was not checked.\n"); - if(code != NULL) QRcode_free(code); - - input->version = 1; - input->level = (QRecLevel)-1; - code = QRcode_encodeInput(input); - assert_null(code, "invalid level(-1) access was not checked.\n"); - if(code != NULL) QRcode_free(code); - - QRinput_free(input); - - testFinish(); -} - -void test_struct_semilong(void) -{ - QRcode_List *codes, *list; - const char *str = "asdfasdfasdfasdfasdfASDFASDASDFASDFAsdfasdfasdfasdASDFASDFADSADadsfasdf"; - int num, size; - - testStart("Testing semi-long structured-append symbols"); - codes = QRcode_encodeString8bitStructured(str, 1, QR_ECLEVEL_L); - list = codes; - num = 0; - while(list != NULL) { - num++; - assert_equal(list->code->version, 1, "version number is %d (1 expected)\n", list->code->version); - list = list->next; - } - size = QRcode_List_size(codes); - assert_equal(num, size, "QRcode_List_size returns wrong size?"); - QRcode_List_free(codes); - - codes = QRcode_encodeStringStructured(str, 1, QR_ECLEVEL_L, QR_MODE_8, 1); - list = codes; - num = 0; - while(list != NULL) { - num++; - assert_equal(list->code->version, 1, "version number is %d (1 expected)\n", list->code->version); - list = list->next; - } - size = QRcode_List_size(codes); - assert_equal(num, size, "QRcode_List_size returns wrong size?"); - QRcode_List_free(codes); - - testFinish(); -} - -void test_struct_example(void) -{ - QRcode_List *codes, *list; - const char *str = "an example of four Structured Append symbols,"; - int num; - - testStart("Testing the example of structured-append symbols"); - codes = QRcode_encodeString8bitStructured(str, 1, QR_ECLEVEL_M); - list = codes; - num = 0; - while(list != NULL) { - num++; - assert_equal(list->code->version, 1, "version number is %d (1 expected)\n", list->code->version); - list = list->next; - } - assert_equal(num, 4, "number of symbols is %d (4 expected).", num); - testFinish(); - QRcode_List_free(codes); -} - -void test_null_free(void) -{ - testStart("Testing free NULL pointers"); - assert_nothing(QRcode_free(NULL), "Check QRcode_free(NULL).\n"); - assert_nothing(QRcode_List_free(NULL), "Check QRcode_List_free(NULL).\n"); - assert_nothing(QRraw_free(NULL), "Check QRraw_free(NULL).\n"); - testFinish(); -} - -int main(int argc, char **argv) -{ - test_iterate(); - test_iterate2(); -// print_filler(); -// test_filler(); -// print_mask(); - test_format(); - test_eval(); - test_eval2(); - test_eval3(); - test_encode(); - test_encode2(); - test_encode3(); - test_encodeNull(); - test_encodeEmpty(); - test_encodeNull8(); - test_encodeEmpty8(); - test_encodeTooLong(); - test_01234567(); - test_invalid_input(); -// print_01234567(); - test_struct_example(); - test_struct_semilong(); - test_null_free(); - - QRspec_clearCache(); - free_rs_cache(); - - report(); - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/tests/test_qrinput.c b/glabels2/qrencode-3.1.0/tests/test_qrinput.c deleted file mode 100644 index b625ebd7..00000000 --- a/glabels2/qrencode-3.1.0/tests/test_qrinput.c +++ /dev/null @@ -1,835 +0,0 @@ -#include -#include -#include -#include "common.h" -#include "../qrinput.h" -#include "../qrencode_inner.h" -#include "../split.h" - -void test_encodeKanji(void) -{ - QRinput *stream; - unsigned char str[4]= {0x93, 0x5f,0xe4, 0xaa}; - unsigned char *buf; - char correct[] = "10000000001001101100111111101010101010"; - BitStream *bstream; - - testStart("Encoding kanji stream."); - buf = (unsigned char *)malloc(4); - memcpy(buf, str, 4); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_KANJI, 4, buf); - bstream = QRinput_mergeBitStream(stream); - testEnd(cmpBin(correct, bstream)); - QRinput_free(stream); - BitStream_free(bstream); - free(buf); -} - -void test_encode8(void) -{ - QRinput *stream; - char str[] = "AC-42"; - char correct[] = "0100000001010100000101000011001011010011010000110010"; - BitStream *bstream; - - testStart("Encoding 8bit stream."); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_8, 5, (unsigned char *)str); - bstream = QRinput_mergeBitStream(stream); - testEnd(cmpBin(correct, bstream)); - QRinput_free(stream); - BitStream_free(bstream); -} - -void test_encode8_versionup(void) -{ - QRinput *stream; - BitStream *bstream; - char *str; - int version; - - testStart("Encoding 8bit stream. (auto-version up test)"); - str = (char *)malloc(2900); - memset(str, 0xff, 2900); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_8, 2900, (unsigned char *)str); - bstream = QRinput_mergeBitStream(stream); - version = QRinput_getVersion(stream); - assert_equal(version, 40, "Version is %d (40 expected).\n", version); - testFinish(); - QRinput_free(stream); - BitStream_free(bstream); - free(str); -} - -void test_encodeAn(void) -{ - QRinput *stream; - char str[] = "AC-42"; - char correct[] = "00100000001010011100111011100111001000010"; - BitStream *bstream; - - testStart("Encoding alphabet-numeric stream."); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_AN, 5, (unsigned char *)str); - bstream = QRinput_mergeBitStream(stream); - testEnd(cmpBin(correct, bstream)); - QRinput_free(stream); - BitStream_free(bstream); -} - -void test_encodeAn2(void) -{ - QRinput *stream; - char str[] = "!,;$%"; - int ret; - - testStart("Encoding INVALID alphabet-numeric stream."); - stream = QRinput_new(); - ret = QRinput_append(stream, QR_MODE_AN, 5, (unsigned char *)str); - testEnd(!ret); - QRinput_free(stream); -} - -void test_encodeNumeric(void) -{ - QRinput *stream; - char num[9] = "01234567"; - char correct[] = "00010000001000000000110001010110011000011"; - BitStream *bstream; - - testStart("Encoding numeric stream. (8 digits)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); - bstream = QRinput_mergeBitStream(stream); - testEnd(cmpBin(correct, bstream)); - QRinput_free(stream); - BitStream_free(bstream); -} - -void test_encodeNumeric_versionup(void) -{ - QRinput *stream; - BitStream *bstream; - char *str; - int version; - - testStart("Encoding numeric stream. (auto-version up test)"); - str = (char *)malloc(1050); - memset(str, '1', 1050); - stream = QRinput_new2(0, QR_ECLEVEL_L); - QRinput_append(stream, QR_MODE_NUM, 1050, (unsigned char *)str); - bstream = QRinput_mergeBitStream(stream); - version = QRinput_getVersion(stream); - assert_equal(version, 14, "Version is %d (14 expected).", version); - testFinish(); - QRinput_free(stream); - BitStream_free(bstream); - free(str); -} - -void test_encodeNumericPadded(void) -{ - QRinput *stream; - char num[9] = "01234567"; - char *correct; - char *correctHead = "000100000010000000001100010101100110000110000000"; - BitStream *bstream; - int flag, i; - - testStart("Encoding numeric stream. (8 digits)(padded)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); - bstream = QRinput_getBitStream(stream); - correct = (char *)malloc(19 * 8 + 1); - correct[0] = '\0'; - strcat(correct, correctHead); - for(i=0; i<13; i++) { - strcat(correct, (i&1)?"00010001":"11101100"); - } - flag = cmpBin(correct, bstream); - testEnd(flag); - - free(correct); - QRinput_free(stream); - BitStream_free(bstream); -} - -void test_encodeNumericPadded2(void) -{ - QRinput *stream; - char num[8] = "0123456"; - char *correct; - char *correctHead = "000100000001110000001100010101100101100000000000"; - BitStream *bstream; - int flag, i; - - testStart("Encoding numeric stream. (7 digits)(padded)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_NUM, 7, (unsigned char *)num); - bstream = QRinput_getBitStream(stream); - correct = (char *)malloc(19 * 8 + 1); - correct[0] = '\0'; - strcat(correct, correctHead); - for(i=0; i<13; i++) { - strcat(correct, (i&1)?"00010001":"11101100"); - } - flag = cmpBin(correct, bstream); - testEnd(flag); - - free(correct); - QRinput_free(stream); - BitStream_free(bstream); -} - -void test_padding(void) -{ - QRinput *input; - BitStream *bstream; - int i, size; - char data[] = "0123456789ABCDeFG"; - unsigned char c; - - testStart("Padding bit check. (less than 5 bits)"); - input = QRinput_new2(0, QR_ECLEVEL_L); - QRinput_append(input, QR_MODE_8, 17, (unsigned char *)data); - bstream = QRinput_getBitStream(input); - size = BitStream_size(bstream); - assert_equal(size, 152, "# of bit is incorrect (%d != 152).\n", size); - c = 0; - for(i=0; i<4; i++) { - c += bstream->data[size - i - 1]; - } - assert_zero(c, "Padding bits are not zero."); - testFinish(); - - QRinput_free(input); - BitStream_free(bstream); -} - -void test_padding2(void) -{ - QRinput *input; - BitStream *bstream; - int i, size, ret; - char data[] = "0123456789ABCDeF"; - char correct[153]; - unsigned char c; - - testStart("Padding bit check. (1 or 2 padding bytes)"); - - /* 16 byte data (4 bit terminator and 1 byte padding) */ - memset(correct, 0, 153); - memcpy(correct, "010000010000", 12); - for(size=0; size<16; size++) { - c = 0x80; - for(i=0; i<8; i++) { - correct[size * 8 + i + 12] = (data[size]&c)?'1':'0'; - c = c >> 1; - } - } - memcpy(correct + 140, "000011101100", 12); - - input = QRinput_new2(1, QR_ECLEVEL_L); - QRinput_append(input, QR_MODE_8, 16, (unsigned char *)data); - bstream = QRinput_getBitStream(input); - size = BitStream_size(bstream); - assert_equal(size, 152, "16byte: # of bit is incorrect (%d != 152).\n", size); - ret = ncmpBin(correct, bstream, 152); - assert_zero(ret, "Padding bits incorrect.\n"); - - QRinput_free(input); - BitStream_free(bstream); - - /* 15 byte data (4 bit terminator and 2 byte paddings) */ - - memcpy(correct, "010000001111", 12); - memcpy(correct + 132, "00001110110000010001", 20); - - input = QRinput_new2(1, QR_ECLEVEL_L); - QRinput_append(input, QR_MODE_8, 15, (unsigned char *)data); - bstream = QRinput_getBitStream(input); - size = BitStream_size(bstream); - assert_equal(size, 152, "15byte: # of bit is incorrect (%d != 152).\n", size); - ret = ncmpBin(correct, bstream, 152); - assert_zero(ret, "Padding bits incorrect.\n"); - - testFinish(); - - QRinput_free(input); - BitStream_free(bstream); -} - -void test_encodeNumeric2(void) -{ - QRinput *stream; - char num[] = "0123456789012345"; - char correct[] = "00010000010000000000110001010110011010100110111000010100111010100101"; - BitStream *bstream; - - testStart("Encoding numeric stream. (16 digits)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_NUM, 16, (unsigned char *)num); - bstream = QRinput_mergeBitStream(stream); - testEnd(cmpBin(correct, bstream)); - QRinput_free(stream); - BitStream_free(bstream); -} - -void test_encodeNumeric3(void) -{ - QRinput *stream; - char num[9] = "0123456"; - char correct[] = "0001""0000000111""0000001100""0101011001""0110"; - BitStream *bstream; - - testStart("Encoding numeric stream. (7 digits)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_NUM, 7, (unsigned char *)num); - bstream = QRinput_mergeBitStream(stream); - testEnd(cmpBin(correct, bstream)); - QRinput_free(stream); - BitStream_free(bstream); -} - -void test_encodeTooLong(void) -{ - QRinput *stream; - unsigned char *data; - BitStream *bstream; - - data = (unsigned char *)malloc(4297); - memset(data, 'A', 4297); - - testStart("Encoding long string. (4297 bytes of alphanumeric)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_AN, 4297, data); - bstream = QRinput_mergeBitStream(stream); - testEndExp(bstream == NULL); - QRinput_free(stream); - if(bstream != NULL) { - BitStream_free(bstream); - } - free(data); -} - -void test_encodeAnNum(void) -{ - QRinput *input; - BitStream *bstream; - - testStart("Bit length check of alpha-numeric stream. (11 + 12)"); - input = QRinput_new(); - QRinput_append(input, QR_MODE_AN, 11, (unsigned char *)"ABCDEFGHIJK"); - QRinput_append(input, QR_MODE_NUM, 12, (unsigned char *)"123456789012"); - bstream = QRinput_mergeBitStream(input); - testEndExp(BitStream_size(bstream) == 128); - QRinput_free(input); - BitStream_free(bstream); - - testStart("Bit length check of alphabet stream. (23)"); - input = QRinput_new(); - QRinput_append(input, QR_MODE_AN, 23, (unsigned char *)"ABCDEFGHIJK123456789012"); - bstream = QRinput_mergeBitStream(input); - testEndExp(BitStream_size(bstream) == 140); - QRinput_free(input); - BitStream_free(bstream); -} - -void test_struct_listop(void) -{ - QRinput_Struct *s; - QRinput *inputs[5]; - QRinput_InputList *l; - int i, ret; - - testStart("QRinput_Struct list operation test."); - s = QRinput_Struct_new(); - QRinput_Struct_setParity(s, 10); - assert_nonnull(s, "QRinput_Struct_new() failed."); - assert_equal(s->parity, 10, "QRinput_Struct_setParity() failed."); - - for(i=0; i<5; i++) { - inputs[i] = QRinput_new(); - QRinput_append(inputs[i], QR_MODE_AN, 5, (unsigned char *)"ABCDE"); - ret = QRinput_Struct_appendInput(s, inputs[i]); - } - assert_equal(ret, 5, "QRinput_Struct_appendInput() returns wrong num?"); - assert_equal(s->size, 5, "QRiput_Struct.size counts wrong number."); - - l = s->head; - i = 0; - while(l != NULL) { - assert_equal(l->input, inputs[i], "QRinput_Struct input list order would be wrong?"); - l = l->next; - i++; - } - - QRinput_Struct_free(s); - testFinish(); -} - -void test_insertStructuredAppendHeader(void) -{ - QRinput *stream; - char correct[] = "0011000011111010010101000000000101000001"; - BitStream *bstream; - int ret; - - testStart("Insert a structured-append header"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_8, 1, (unsigned char *)"A"); - ret = QRinput_insertStructuredAppendHeader(stream, 16, 1, 0xa5); - assert_zero(ret, "QRinput_insertStructuredAppendHeader() returns nonzero.\n"); - bstream = QRinput_mergeBitStream(stream); - assert_nonnull(bstream->data, "Bstream->data is null."); - assert_zero(cmpBin(correct, bstream), "bitstream is wrong."); - testFinish(); - - QRinput_free(stream); - BitStream_free(bstream); -} - -void test_insertStructuredAppendHeader_error(void) -{ - QRinput *stream; - int ret; - - testStart("Insert a structured-append header (errors expected)"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_8, 1, (unsigned char *)"A"); - ret = QRinput_insertStructuredAppendHeader(stream, 17, 1, 0xa5); - assert_equal(-1, ret, "QRinput_insertStructuredAppendHeader() returns 0."); - assert_equal(EINVAL, errno, "errno is not set correctly (%d returned).", errno); - ret = QRinput_insertStructuredAppendHeader(stream, 16, 17, 0xa5); - assert_equal(-1, ret, "QRinput_insertStructuredAppendHeader() returns 0."); - assert_equal(EINVAL, errno, "errno is not set correctly (%d returned).", errno); - ret = QRinput_insertStructuredAppendHeader(stream, 16, 0, 0xa5); - assert_equal(-1, ret, "QRinput_insertStructuredAppendHeader() returns 0."); - assert_equal(EINVAL, errno, "errno is not set correctly (%d returned).", errno); - testFinish(); - - QRinput_free(stream); -} - -void test_struct_insertStructuredAppendHeaders(void) -{ - QRinput *input; - QRinput_Struct *s; - QRinput_InputList *p; - int i; - - testStart("Insert structured-append headers to a QRinput_Struct."); - s = QRinput_Struct_new(); - for(i=0; i<10; i++) { - input = QRinput_new(); - QRinput_append(input, QR_MODE_8, 1, (unsigned char *)"A"); - QRinput_Struct_appendInput(s, input); - } - QRinput_Struct_insertStructuredAppendHeaders(s); - p = s->head; - i = 1; - while(p != NULL) { - assert_equal(p->input->head->mode, QR_MODE_STRUCTURE, "a structured-append header is not inserted."); - assert_equal(p->input->head->data[0], 10, "size of the structured-header is wrong: #%d, %d should be %d\n", i, p->input->head->data[0], 10); - assert_equal(p->input->head->data[1], i, "index of the structured-header is wrong: #%d, %d should be %d\n", i, p->input->head->data[1], i); - assert_equal(p->input->head->data[2], 0, "parity of the structured-header is wrong: #%d\n", i); - p = p->next; - i++; - } - testFinish(); - QRinput_Struct_free(s); -} - -static int check_lengthOfCode(QRencodeMode mode, char *data, int size, int version) -{ - QRinput *input; - BitStream *b; - int bits; - int bytes; - - input = QRinput_new(); - QRinput_setVersion(input, version); - QRinput_append(input, mode, size, (unsigned char *)data); - b = QRinput_mergeBitStream(input); - bits = BitStream_size(b); - bytes = QRinput_lengthOfCode(mode, version, bits); - QRinput_free(input); - BitStream_free(b); - - return bytes; -} - -void test_lengthOfCode_num(void) -{ - int i, bytes; - char *data; - - data = (char *)malloc(8000); - for(i=0; i<8000; i++) { - data[i] = '0' + i % 10; - } - - testStart("Checking length of code (numeric)"); - for(i=1; i<=9; i++) { - bytes = check_lengthOfCode(QR_MODE_NUM, data, i, 1); - assert_equal(i, bytes, "lengthOfCode failed. (QR_MODE_NUM, version:1, size:%d)\n", i); - } - for(i=1023; i<=1025; i++) { - bytes = check_lengthOfCode(QR_MODE_NUM, data, i, 1); - assert_equal(1023, bytes, "lengthOfCode failed. (QR_MODE_NUM, version:1, size:%d)\n", i); - } - testFinish(); - free(data); -} - -void test_lengthOfCode_kanji(void) -{ - int i, bytes; - unsigned char str[4]= {0x93, 0x5f,0xe4, 0xaa}; - - testStart("Checking length of code (kanji)"); - for(i=2; i<=4; i+=2) { - bytes = check_lengthOfCode(QR_MODE_KANJI, (char *)str, i, 1); - assert_equal(i, bytes, "lengthOfCode failed. (QR_MODE_KANJI, version:1, size:%d)\n", i); - } - testFinish(); -} - -void test_struct_split_example(void) -{ - QRinput *input; - QRinput_Struct *s; - QRinput_InputList *e; - QRinput_List *l; - const char *str[4] = { "an example ", "of four Str", "uctured Appe", "nd symbols,"}; - int i; - BitStream *bstream; - - testStart("Testing the example of structured-append symbols"); - s = QRinput_Struct_new(); - for(i=0; i<4; i++) { - input = QRinput_new2(1, QR_ECLEVEL_M); - QRinput_append(input, QR_MODE_8, strlen(str[i]), (unsigned char *)str[i]); - QRinput_Struct_appendInput(s, input); - } - QRinput_Struct_insertStructuredAppendHeaders(s); - e = s->head; - i = 0; - while(e != NULL) { - bstream = QRinput_mergeBitStream(e->input); - BitStream_free(bstream); - l = e->input->head->next; - assert_equal(l->mode, QR_MODE_8, "#%d: wrong mode (%d).\n", i, l->mode); - assert_equal(e->input->level, QR_ECLEVEL_M, "#%d: wrong level (%d).\n", i, e->input->level); - - e = e->next; - i++; - } - testFinish(); - QRinput_Struct_free(s); -} - -void test_struct_split_tooLarge(void) -{ - QRinput *input; - QRinput_Struct *s; - char *str; - int errsv; - - testStart("Testing structured-append symbols. (too large data)"); - str = (char *)malloc(128); - memset(str, 'a', 128); - input = QRinput_new2(1, QR_ECLEVEL_H); - QRinput_append(input, QR_MODE_8, 128, (unsigned char *)str); - s = QRinput_splitQRinputToStruct(input); - errsv = errno; - assert_null(s, "returns non-null."); - assert_equal(errsv, ERANGE, "did not return ERANGE."); - testFinish(); - if(s != NULL) QRinput_Struct_free(s); - QRinput_free(input); - free(str); -} - -void test_struct_split_invalidVersion(void) -{ - QRinput *input; - QRinput_Struct *s; - char *str; - int errsv; - - testStart("Testing structured-append symbols. (invalid version 0)"); - str = (char *)malloc(128); - memset(str, 'a', 128); - input = QRinput_new2(0, QR_ECLEVEL_H); - QRinput_append(input, QR_MODE_8, 128, (unsigned char *)str); - s = QRinput_splitQRinputToStruct(input); - errsv = errno; - assert_null(s, "returns non-null."); - assert_equal(errsv, ERANGE, "did not return ERANGE."); - testFinish(); - if(s != NULL) QRinput_Struct_free(s); - QRinput_free(input); - free(str); -} - -void test_splitentry(void) -{ - QRinput *i1, *i2; - QRinput_List *e; - const char *str = "abcdefghij"; - int size1, size2, i; - unsigned char *d1, *d2; - - testStart("Testing QRinput_splitEntry. (next == NULL)"); - i1 = QRinput_new(); - QRinput_append(i1, QR_MODE_8, strlen(str), (unsigned char *)str); - - i2 = QRinput_dup(i1); - e = i2->head; - - e = i2->head; - QRinput_splitEntry(e, 4); - - size1 = size2 = 0; - e = i1->head; - while(e != NULL) { - size1 += e->size; - e = e->next; - } - e = i2->head; - while(e != NULL) { - size2 += e->size; - e = e->next; - } - - d1 = (unsigned char *)malloc(size1); - e = i1->head; - i = 0; - while(e != NULL) { - memcpy(&d1[i], e->data, e->size); - i += e->size; - e = e->next; - } - d2 = (unsigned char *)malloc(size2); - e = i2->head; - i = 0; - while(e != NULL) { - memcpy(&d2[i], e->data, e->size); - i += e->size; - e = e->next; - } - - assert_equal(size1, size2, "sizes are different. (%d:%d)\n", size1, size2); - assert_equal(i2->head->size, 4, "split failed (first half)"); - assert_equal(i2->head->next->size, 6, "split failed(second half)"); - assert_zero(memcmp(d1, d2, size1), "strings are different."); - QRinput_free(i1); - QRinput_free(i2); - free(d1); - free(d2); - - testFinish(); -} - -void test_splitentry2(void) -{ - QRinput *i1, *i2; - QRinput_List *e; - const char *str = "abcdefghij"; - int size1, size2, i; - unsigned char *d1, *d2; - - testStart("Testing QRinput_splitEntry. (next != NULL)"); - i1 = QRinput_new(); - QRinput_append(i1, QR_MODE_8, strlen(str), (unsigned char *)str); - QRinput_append(i1, QR_MODE_8, strlen(str), (unsigned char *)str); - - i2 = QRinput_dup(i1); - e = i2->head; - - e = i2->head; - QRinput_splitEntry(e, 4); - - size1 = size2 = 0; - e = i1->head; - while(e != NULL) { - size1 += e->size; - e = e->next; - } - e = i2->head; - while(e != NULL) { - size2 += e->size; - e = e->next; - } - - d1 = (unsigned char *)malloc(size1); - e = i1->head; - i = 0; - while(e != NULL) { - memcpy(&d1[i], e->data, e->size); - i += e->size; - e = e->next; - } - d2 = (unsigned char *)malloc(size2); - e = i2->head; - i = 0; - while(e != NULL) { - memcpy(&d2[i], e->data, e->size); - i += e->size; - e = e->next; - } - - assert_equal(size1, size2, "sizes are different. (%d:%d)\n", size1, size2); - assert_equal(i2->head->size, 4, "split failed (first half)"); - assert_equal(i2->head->next->size, 6, "split failed(second half)"); - assert_zero(memcmp(d1, d2, size1), "strings are different."); - QRinput_free(i1); - QRinput_free(i2); - free(d1); - free(d2); - - testFinish(); -} - -void test_splitentry3(void) -{ - QRinput *input; - QRinput_Struct *s; - QRinput_List *e00, *e01, *e10, *e11; - QRinput_InputList *list; - const char *str = "abcdefghijklmno"; - - testStart("Testing QRinput_splitEntry. (does not split an entry)"); - /* version 1 symbol contains 152 bit (19 byte) data. - * 20 bits for a structured-append header, so 132 bits can be used. - * 15 bytes of 8-bit data is suitable for the symbol. - * (mode(4) + length(8) + data(120) == 132.) - */ - input = QRinput_new2(1, QR_ECLEVEL_L); - QRinput_append(input, QR_MODE_8, strlen(str), (unsigned char *)str); - QRinput_append(input, QR_MODE_8, strlen(str), (unsigned char *)str); - s = QRinput_splitQRinputToStruct(input); - list = s->head; - e00 = list->input->head; - e01 = e00->next; - list = list->next; - e10 = list->input->head; - e11 = e00->next; - - assert_equal(e00->mode, QR_MODE_STRUCTURE, "Structure header is missing?"); - assert_equal(e01->mode, QR_MODE_8, "no data?!"); - assert_null(e01->next, "Input list is not terminated!\n"); - assert_equal(e10->mode, QR_MODE_STRUCTURE, "Structure header is missing?"); - assert_equal(e11->mode, QR_MODE_8, "no data?!"); - assert_null(e11->next, "Input list is not terminated!\n"); - - QRinput_free(input); - QRinput_Struct_free(s); - testFinish(); -} - -void test_parity(void) -{ - QRinput *input; - QRinput_Struct *s; - const char *text = "an example of four Structured Append symbols,"; - const char *str[4] = { - "an example ", - "of four Str", - "uctured Appe", - "nd symbols,"}; - unsigned char p1, p2; - int i, len; - - testStart("Testing parity calc."); - s = QRinput_Struct_new(); - for(i=0; i<4; i++) { - input = QRinput_new2(1, QR_ECLEVEL_M); - QRinput_append(input, QR_MODE_8, strlen(str[i]), (unsigned char *)str[i]); - QRinput_Struct_appendInput(s, input); - } - QRinput_Struct_insertStructuredAppendHeaders(s); - p1 = s->parity; - - p2 = 0; - len = strlen(text); - for(i=0; iparity; - - p2 = 0; - len = strlen(text); - for(i=0; i -#include -#include "common.h" -#include "../qrspec.h" - -void print_eccTable(void) -{ - int i, j; - int ecc; - int data; - int spec[5]; - - for(i=1; i<=QRSPEC_VERSION_MAX; i++) { - printf("Version %2d\n", i); - for(j=0; j<4; j++) { - QRspec_getEccSpec(i, (QRecLevel)j, spec); - data = QRspec_rsBlockNum1(spec) * QRspec_rsDataCodes1(spec) - + QRspec_rsBlockNum2(spec) * QRspec_rsDataCodes2(spec); - ecc = QRspec_rsBlockNum1(spec) * QRspec_rsEccCodes1(spec) - + QRspec_rsBlockNum2(spec) * QRspec_rsEccCodes2(spec); - printf("%3d\t", ecc); - printf("%2d\t", QRspec_rsBlockNum1(spec)); - printf("(%3d, %3d, %3d)\n", - QRspec_rsDataCodes1(spec) + QRspec_rsEccCodes1(spec), - QRspec_rsDataCodes1(spec), - QRspec_rsEccCodes1(spec)); - if(QRspec_rsBlockNum2(spec) > 0) { - printf("\t%2d\t", QRspec_rsBlockNum2(spec)); - printf("(%3d, %3d, %3d)\n", - QRspec_rsDataCodes2(spec) + QRspec_rsEccCodes2(spec), - QRspec_rsDataCodes2(spec), - QRspec_rsEccCodes2(spec)); - } - } - } -} - -void test_eccTable(void) -{ - int i, j; - int ecc; - int data; - int err = 0; - int spec[5]; - - testStart("Checking ECC table."); - for(i=1; i<=QRSPEC_VERSION_MAX; i++) { - for(j=0; j<4; j++) { - QRspec_getEccSpec(i, (QRecLevel)j, spec); - data = QRspec_rsBlockNum1(spec) * QRspec_rsDataCodes1(spec) - + QRspec_rsBlockNum2(spec) * QRspec_rsDataCodes2(spec); - ecc = QRspec_rsBlockNum1(spec) * QRspec_rsEccCodes1(spec) - + QRspec_rsBlockNum2(spec) * QRspec_rsEccCodes2(spec); - if(data + ecc != QRspec_getDataLength(i, (QRecLevel)j) + QRspec_getECCLength(i, (QRecLevel)j)) { - printf("Error in version %d, level %d: invalid size\n", i, j); - printf("%d %d %d %d %d %d\n", spec[0], spec[1], spec[2], spec[3], spec[4], spec[2]); - err++; - } - if(ecc != QRspec_getECCLength(i, (QRecLevel)j)) { - printf("Error in version %d, level %d: invalid data\n", i, j); - printf("%d %d %d %d %d %d\n", spec[0], spec[1], spec[2], spec[3], spec[4], spec[2]); - err++; - } - } - } - testEnd(err); -} - -void test_eccTable2(void) -{ - int i; - int spec[5]; - - const int correct[7][6] = { - { 8, 1, 0, 2, 60, 38}, - { 8, 1, 1, 2, 61, 39}, - {24, 2, 0, 11, 54, 24}, - {24, 2, 1, 16, 55, 25}, - {32, 0, 0, 17, 145, 115}, - {40, 3, 0, 20, 45, 15}, - {40, 3, 1, 61, 46, 16}, - }; - - testStart("Checking ECC table(2)"); - for(i=0; i<7; i++) { - QRspec_getEccSpec(correct[i][0], (QRecLevel)correct[i][1], spec); - if(correct[i][2] == 0) { - assert_equal(QRspec_rsBlockNum1(spec), correct[i][3], - "Error in version %d, level %d. rsBlockNum1 was %d, expected %d.\n", - correct[i][0], correct[i][1], - QRspec_rsBlockNum1(spec), correct[i][3]); - assert_equal(QRspec_rsDataCodes1(spec) + QRspec_rsEccCodes1(spec), correct[i][4], - "Error in version %d, level %d. rsDataCodes1 + rsEccCodes1 was %d, expected %d.\n", - correct[i][0], correct[i][1], - QRspec_rsDataCodes1(spec) + QRspec_rsEccCodes1(spec), correct[i][4]); - assert_equal(QRspec_rsDataCodes1(spec), correct[i][5], - "Error in version %d, level %d. rsDataCodes1 was %d, expected %d.\n", - correct[i][0], correct[i][1], - QRspec_rsDataCodes1(spec), correct[i][5]); - } else { - assert_equal(QRspec_rsBlockNum2(spec), correct[i][3], - "Error in version %d, level %d. rsBlockNum2 was %d, expected %d.\n", - correct[i][0], correct[i][1], - QRspec_rsBlockNum2(spec), correct[i][3]); - assert_equal(QRspec_rsDataCodes2(spec) + QRspec_rsEccCodes2(spec), correct[i][4], - "Error in version %d, level %d. rsDataCodes2 + rsEccCodes2 was %d, expected %d.\n", - correct[i][0], correct[i][1], - QRspec_rsDataCodes2(spec) + QRspec_rsEccCodes2(spec), correct[i][4]); - assert_equal(QRspec_rsDataCodes2(spec), correct[i][5], - "Error in version %d, level %d. rsDataCodes2 was %d, expected %d.\n", - correct[i][0], correct[i][1], - QRspec_rsDataCodes2(spec), correct[i][5]); - } - } - testFinish(); -} - -void test_newframe(void) -{ - unsigned char buf[QRSPEC_WIDTH_MAX * QRSPEC_WIDTH_MAX]; - int i, width; - size_t len; - FILE *fp; - unsigned char *frame; - - testStart("Checking newly created frame."); - fp = fopen("frame", "rb"); - if(fp == NULL) { - perror("Failed to open \"frame\":"); - abort(); - } - for(i=1; i<=QRSPEC_VERSION_MAX; i++) { - frame = QRspec_newFrame(i); - width = QRspec_getWidth(i); - len = fread(buf, 1, width * width, fp); - if((int)len != width * width) { - perror("Failed to read the pattern file:"); - abort(); - } - assert_zero(memcmp(frame, buf, len), "frame pattern mismatch (version %d)\n", i); - free(frame); - } - - testFinish(); - fclose(fp); -} - -#if 0 -/* This test is used to check positions of alignment pattern. See Appendix E - * (pp.71) of JIS X0510:2004 and compare to the output. Before comment out - * this test, change the value of the pattern marker's center dot from 0xa1 - * to 0xb1 (QRspec_putAlignmentMarker() : finder). - */ -void test_alignment(void) -{ - unsigned char *frame; - int i, x, y, width, c; - - testStart("Checking alignment pattern."); - for(i=2; i<=QRSPEC_VERSION_MAX; i++) { - printf("%2d", i); - frame = QRspec_newFrame(i); - width = QRspec_getWidth(i); - c = 0; - for(x=0; x> 12) != (unsigned int)version) { - printf("Error in version %d.\n", version); - err++; - continue; - } - mask = 0x40; - for(i=0; mask != 0; i++) { - if(version & mask) break; - mask = mask >> 1; - } - c = 6 - i; - data = version << 12; - code = 0x1f25 << c; - mask = 0x40000 >> (6 - c); - for(i=0; i<=c; i++) { - if(mask & data) { - data ^= code; - } - code = code >> 1; - mask = mask >> 1; - } - data = (version << 12) | (data & 0xfff); - if(data != pattern) { - printf("Error in version %d\n", version); - err++; - } - } -} - -void print_newFrame(void) -{ - int width; - int x, y; - unsigned char *frame; - - frame = QRspec_newFrame(7); - width = QRspec_getWidth(7); - for(y=0; y> 1; - } - c = 4 - i; - code = 0x537 << c ; //10100110111 - b = 1 << (10 + c); - for(i=0; i<=c; i++) { - if(b & ecc) { - ecc ^= code; - } - code = code >> 1; - b = b >> 1; - } - - return (data | ecc) ^ 0x5412; -} - -void test_format(void) -{ - unsigned int format; - int i, j; - int err = 0; - - testStart("Format info test"); - for(i=0; i<4; i++) { - for(j=0; j<8; j++) { - format = calcFormatInfo(j, (QRecLevel)i); -// printf("0x%04x, ", format); - if(format != QRspec_getFormatInfo(j, (QRecLevel)i)) { - printf("Level %d, mask %x\n", i, j); - err++; - } - } -// printf("\n"); - } - testEnd(err); -} - -int main(int argc, char **argv) -{ - test_eccTable(); - test_eccTable2(); - //print_eccTable(); - test_newframe(); - //test_alignment(); - test_verpat(); - //print_newFrame(); - test_format(); - - QRspec_clearCache(); - - report(); - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/tests/test_rs.c b/glabels2/qrencode-3.1.0/tests/test_rs.c deleted file mode 100644 index 60e9a487..00000000 --- a/glabels2/qrencode-3.1.0/tests/test_rs.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include "common.h" -#include "../qrencode_inner.h" -#include "../qrinput.h" -#include "../rscode.h" - -/* See pp. 73 of JIS X0510:2004 */ -void test_rscode1(void) -{ - QRinput *stream; - QRRawCode *code; - static const char str[9] = "01234567"; - static unsigned char correct[26] = { - 0x10, 0x20, 0x0c, 0x56, 0x61, 0x80, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, - 0xec, 0x11, 0xec, 0x11, 0xa5, 0x24, 0xd4, 0xc1, 0xed, 0x36, 0xc7, 0x87, - 0x2c, 0x55}; - - testStart("RS ecc test"); - stream = QRinput_new(); - QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)str); - QRinput_setErrorCorrectionLevel(stream, QR_ECLEVEL_M); - code = QRraw_new(stream); - - testEnd(memcmp(correct + 16, code->rsblock[0].ecc, 10)); - QRinput_free(stream); - QRraw_free(code); -} - -int main(int argc, char **argv) -{ - test_rscode1(); - - free_rs_cache(); - report(); - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/tests/test_split.c b/glabels2/qrencode-3.1.0/tests/test_split.c deleted file mode 100644 index 4c28e171..00000000 --- a/glabels2/qrencode-3.1.0/tests/test_split.c +++ /dev/null @@ -1,414 +0,0 @@ -#include -#include -#include -#include "common.h" -#include "../qrspec.h" -#include "../qrinput.h" -#include "../mask.h" -#include "../split.h" -#include "../bitstream.h" - -static int inputTest(QRinput_List *list, const char *fmt, ...) -{ - va_list ap; - int size; - QRencodeMode mode; - int i, err = 0; - - va_start(ap, fmt); - i = 1; - while(*fmt) { - if(list == NULL) { - err = 1; - break; - } - size = va_arg(ap, int); - if(list->size != size) { - err = 1; - break; - } - - switch(*fmt++) { - case 'n': - mode = QR_MODE_NUM; - break; - case 'a': - mode = QR_MODE_AN; - break; - case 'k': - mode = QR_MODE_KANJI; - break; - case '8': - mode = QR_MODE_8; - break; - default: - return -1; - break; - } - if(list->mode != mode) { - err = 1; - break; - } - list = list->next; - i++; - } - va_end(ap); - if(list != NULL) { - err = 1; - } - if(err) { - return -i; - } - return 0; -} - -int inputSize(QRinput *input) -{ - BitStream *bstream; - int size; - - bstream = QRinput_mergeBitStream(input); - size = BitStream_size(bstream); - BitStream_free(bstream); - - return size; -} - -void test_split1(void) -{ - QRinput *input; - BitStream *stream; - - testStart("Split test: null string"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("", input, QR_MODE_8, 0); - stream = QRinput_mergeBitStream(input); - testEndExp(BitStream_size(stream) == 0); - QRinput_free(input); - BitStream_free(stream); -} - -void test_split2(void) -{ - QRinput *input; - QRinput_List *list; - int err = 0; - - testStart("Split test: single typed strings (num)"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("0123", input, QR_MODE_8, 0); - list = input->head; - if(inputTest(list, "n", 4)) { - err++; - } - testEnd(err); - QRinput_free(input); - - err = 0; - testStart("Split test: single typed strings (num2)"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("12345678901234567890", input, QR_MODE_KANJI, 0); - list = input->head; - if(inputTest(list, "n", 20)) { - err++; - } - testEnd(err); - QRinput_free(input); -} - -void test_split3(void) -{ - QRinput *input; - QRinput_List *list; - int err = 0; - - testStart("Split test: single typed strings (an)"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("ab:-E", input, QR_MODE_8, 0); - list = input->head; - if(inputTest(list, "a", 5)) { - printQrinput(input); - err++; - } - testEnd(err); - QRinput_free(input); - - err = 0; - testStart("Split test: num + an"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("0123abcde", input, QR_MODE_KANJI, 0); - list = input->head; - if(inputTest(list, "a", 9)) { - err++; - } - testEnd(err); - QRinput_free(input); - - err = 0; - testStart("Split test: an + num + an"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("Ab345fg", input, QR_MODE_KANJI, 0); - list = input->head; - if(inputTest(list, "a", 7)) { - err++; - } - testEnd(err); - QRinput_free(input); -} - -void test_split4(void) -{ - QRinput *input; - QRinput *i1, *i2; - int s1, s2, size; -#define CHUNKA "ABCDEFGHIJK" -#define CHUNKB "123456" -#define CHUNKC "1234567" - - testStart("Split test: an and num entries"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput(CHUNKA/**/CHUNKB, input, QR_MODE_8, 0); - i1 = QRinput_new(); - QRinput_append(i1, QR_MODE_AN, 17, (unsigned char *)CHUNKA/**/CHUNKB); - i2 = QRinput_new(); - QRinput_append(i2, QR_MODE_AN, 11, (unsigned char *)CHUNKA); - QRinput_append(i2, QR_MODE_NUM, 6, (unsigned char *)CHUNKB); - - size = inputSize(input); - s1 = inputSize(i1); - s2 = inputSize(i2); - testEndExp(size == ((s1 < s2)?s1:s2)); - QRinput_free(input); - QRinput_free(i1); - QRinput_free(i2); - - testStart("Split test: num and an entries"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput(CHUNKB/**/CHUNKA, input, QR_MODE_8, 0); - i1 = QRinput_new(); - QRinput_append(i1, QR_MODE_AN, 17, (unsigned char *)CHUNKB/**/CHUNKA); - i2 = QRinput_new(); - QRinput_append(i2, QR_MODE_NUM, 6, (unsigned char *)CHUNKB); - QRinput_append(i2, QR_MODE_AN, 11, (unsigned char *)CHUNKA); - - size = inputSize(input); - s1 = inputSize(i1); - s2 = inputSize(i2); - testEndExp(size == ((s1 < s2)?s1:s2)); - QRinput_free(input); - QRinput_free(i1); - QRinput_free(i2); - - testStart("Split test: num and an entries (should be splitted)"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput(CHUNKC/**/CHUNKA, input, QR_MODE_8, 0); - i1 = QRinput_new(); - QRinput_append(i1, QR_MODE_AN, 18, (unsigned char *)CHUNKC/**/CHUNKA); - i2 = QRinput_new(); - QRinput_append(i2, QR_MODE_NUM, 7, (unsigned char *)CHUNKC); - QRinput_append(i2, QR_MODE_AN, 11, (unsigned char *)CHUNKA); - - size = inputSize(input); - s1 = inputSize(i1); - s2 = inputSize(i2); - testEndExp(size == ((s1 < s2)?s1:s2)); - QRinput_free(input); - QRinput_free(i1); - QRinput_free(i2); -} - -void test_split5(void) -{ - QRinput *input; - QRinput_List *list; - int err = 0; - - testStart("Split test: bit, an, bit, num"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("\x82\xd9""abcdeabcdea\x82\xb0""123456", input, QR_MODE_8, 0); - list = input->head; - if(inputTest(list, "8a8n", 2, 11, 2, 6)) { - err++; - } - testEnd(err); - QRinput_free(input); -} - -void test_split6(void) -{ - QRinput *input; - QRinput_List *list; - int err = 0; - - testStart("Split test: kanji, an, kanji, num"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("\x82\xd9""abcdeabcdea\x82\xb0""123456", input, QR_MODE_KANJI, 0); - list = input->head; - if(inputTest(list, "kakn", 2, 11, 2, 6)) { - printQrinput(input); - err++; - } - testEnd(err); - QRinput_free(input); -} - -void test_split7(void) -{ - QRinput *input; - QRinput_List *list; - int err = 0; - - testStart("Split test: an and num as bits"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("\x82\xd9""abcde\x82\xb0""12345", input, QR_MODE_8, 0); - list = input->head; - if(inputTest(list, "8n", 9, 5)) { - err++; - } - testEnd(err); - QRinput_free(input); -} - -void test_split8(void) -{ - QRinput *input; - QRinput_List *list; - int err = 0; - - testStart("Split test: terminated with a half of kanji code"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("\x82\xd9""abcdefgh\x82", input, QR_MODE_KANJI, 0); - list = input->head; - if(inputTest(list, "ka8", 2, 8, 1)) { - err++; - } - testEnd(err); - QRinput_free(input); -} - -void test_split3c(void) -{ - QRinput *input; - QRinput_List *list; - int err = 0; - - testStart("Split test: single typed strings (an, case-sensitive)"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("ab:-E", input, QR_MODE_8, 1); - list = input->head; - if(inputTest(list, "8", 5)) { - err++; - } - testEnd(err); - QRinput_free(input); - - err = 0; - testStart("Split test: num + an"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("0123abcde", input, QR_MODE_KANJI, 1); - list = input->head; - if(inputTest(list, "n8", 4, 5)) { - err++; - } - testEnd(err); - QRinput_free(input); - - err = 0; - testStart("Split test: an + num + an"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("Ab345fg", input, QR_MODE_KANJI, 1); - list = input->head; - if(inputTest(list, "8", 7)) { - printQrinput(input); - err++; - } - testEnd(err); - QRinput_free(input); -} - -void test_toupper(void) -{ - QRinput *input; - QRinput_List *list; - int err = 0; - - testStart("Split test: check dupAndToUpper (lower->upper)"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("abcde", input, QR_MODE_8, 0); - list = input->head; - if(inputTest(list, "a", 5)) { - err++; - } - if(strncmp((char *)list->data, "ABCDE", list->size)) { - err++; - } - testEnd(err); - QRinput_free(input); - - err = 0; - testStart("Split test: check dupAndToUpper (kanji)"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("\x83n\x83q\x83t\x83w\x83z", input, QR_MODE_KANJI, 0); - list = input->head; - if(inputTest(list, "k", 10)) { - printQrinput(input); - err++; - } - if(strncmp((char *)list->data, "\x83n\x83q\x83t\x83w\x83z", list->size)) { - err++; - } - testEnd(err); - QRinput_free(input); - - err = 0; - testStart("Split test: check dupAndToUpper (8bit)"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("\x83n\x83q\x83t\x83w\x83z", input, QR_MODE_8, 0); - list = input->head; - if(inputTest(list, "8", 10)) { - printQrinput(input); - err++; - } - if(strncmp((char *)list->data, "\x83N\x83Q\x83T\x83W\x83Z", list->size)) { - err++; - } - testEnd(err); - QRinput_free(input); -} - -void test_splitNum8(void) -{ - QRinput *input; - QRinput_List *list; - int err = 0; - - testStart("Split test: num and 8bit to 8bit"); - input = QRinput_new2(0, QR_ECLEVEL_L); - Split_splitStringToQRinput("1abcdefg", input, QR_MODE_8, 1); - list = input->head; - if(inputTest(list, "8", 8)) { - err++; - printQRinputInfo(input); - } - testEnd(err); - QRinput_free(input); -} - -int main(int argc, char **argv) -{ - test_split1(); - test_split2(); - test_split3(); - test_split4(); - test_split5(); - test_split6(); - test_split7(); - test_split8(); - test_split3c(); - test_toupper(); - test_splitNum8(); - - report(); - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/tests/view_qrcode.c b/glabels2/qrencode-3.1.0/tests/view_qrcode.c deleted file mode 100644 index ed86183c..00000000 --- a/glabels2/qrencode-3.1.0/tests/view_qrcode.c +++ /dev/null @@ -1,497 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "../config.h" -#include "../qrspec.h" -#include "../qrinput.h" -#include "../split.h" -#include "../qrencode_inner.h" - -static SDL_Surface *screen = NULL; -static int casesensitive = 1; -static int eightbit = 0; -static int version = 1; -static int size = 4; -static int margin = 4; -static int structured = 0; -static QRecLevel level = QR_ECLEVEL_L; -static QRencodeMode hint = QR_MODE_8; - -static char **textv; -static int textc; - -static const struct option options[] = { - {"help" , no_argument , NULL, 'h'}, - {"level" , required_argument, NULL, 'l'}, - {"size" , required_argument, NULL, 's'}, - {"symversion" , required_argument, NULL, 'v'}, - {"margin" , required_argument, NULL, 'm'}, - {"structured" , no_argument , NULL, 'S'}, - {"kanji" , no_argument , NULL, 'k'}, - {"casesensitive", no_argument , NULL, 'c'}, - {"ignorecase" , no_argument , NULL, 'i'}, - {"8bit" , no_argument , NULL, '8'}, - {"version" , no_argument , NULL, 'V'}, - {NULL, 0, NULL, 0} -}; - -static char *optstring = "ho:l:s:v:m:Skci8V"; - -static char levelChar[4] = {'L', 'M', 'Q', 'H'}; -static void usage(int help, int longopt) -{ - fprintf(stderr, -"view_qrcode version %s\n" -"Copyright (C) 2008, 2009 Kentaro Fukuchi\n", VERSION); - if(help) { - if(longopt) { - fprintf(stderr, -"Usage: view_qrcode [OPTION]... [STRING]\n" -"Encode input data in a QR Code and display.\n\n" -" -h, --help display the help message. -h displays only the help of short\n" -" options.\n\n" -" -s NUMBER, --size=NUMBER\n" -" specify the size of dot (pixel). (default=3)\n\n" -" -l {LMQH}, --level={LMQH}\n" -" specify error collectin level from L (lowest) to H (highest).\n" -" (default=L)\n\n" -" -v NUMBER, --symversion=NUMBER\n" -" specify the version of the symbol. (default=auto)\n\n" -" -m NUMBER, --margin=NUMBER\n" -" specify the width of margin. (default=4)\n\n" -" -S, --structured\n" -" make structured symbols. Version must be specified.\n\n" -" -k, --kanji assume that the input text contains kanji (shift-jis).\n\n" -" -c, --casesensitive\n" -" encode lower-case alphabet characters in 8-bit mode. (default)\n\n" -" -i, --ignorecase\n" -" ignore case distinctions and use only upper-case characters.\n\n" -" -8, -8bit encode entire data in 8-bit mode. -k, -c and -i will be ignored.\n\n" -" -V, --version\n" -" display the version number and copyrights of the qrencode.\n\n" -" [STRING] input data. If it is not specified, data will be taken from\n" -" standard input.\n" - ); - } else { - fprintf(stderr, -"Usage: view_qrcode [OPTION]... [STRING]\n" -"Encode input data in a QR Code and display.\n\n" -" -h display this message.\n" -" --help display the usage of long options.\n" -" -s NUMBER specify the size of dot (pixel). (default=3)\n" -" -l {LMQH} specify error collectin level from L (lowest) to H (highest).\n" -" (default=L)\n" -" -v NUMBER specify the version of the symbol. (default=auto)\n" -" -m NUMBER specify the width of margin. (default=4)\n" -" -S make structured symbols. Version must be specified.\n" -" -k assume that the input text contains kanji (shift-jis).\n" -" -c encode lower-case alphabet characters in 8-bit mode. (default)\n" -" -i ignore case distinctions and use only upper-case characters.\n" -" -8 encode entire data in 8-bit mode. -k, -c and -i will be ignored.\n" -" -V display the version number and copyrights of the qrencode.\n" -" [STRING] input data. If it is not specified, data will be taken from\n" -" standard input.\n" - ); - } - } -} - -#define MAX_DATA_SIZE (7090 * 16) /* from the specification */ -static char *readStdin(void) -{ - char *buffer; - int ret; - - buffer = (char *)malloc(MAX_DATA_SIZE); - ret = fread(buffer, 1, MAX_DATA_SIZE, stdin); - if(ret == 0) { - fprintf(stderr, "No input data.\n"); - exit(1); - } - if(!feof(stdin)) { - fprintf(stderr, "Input data is too large.\n"); - exit(1); - } - - buffer[ret] = '\0'; - - return buffer; -} - -static void draw_QRcode(QRcode *qrcode, int ox, int oy) -{ - int x, y, width; - unsigned char *p; - SDL_Rect rect; - - ox += margin * size; - oy += margin * size; - width = qrcode->width; - p = qrcode->data; - for(y=0; yversion; - width = (qrcode->width + margin * 2) * size; - - screen = SDL_SetVideoMode(width, width, 32, 0); - SDL_FillRect(screen, NULL, 0xffffff); - draw_QRcode(qrcode, 0, 0); - SDL_Flip(screen); - QRcode_free(qrcode); -} - -void draw_structuredQRcode(QRinput_Struct *s) -{ - int i, w, h, n, x, y; - int swidth; - QRcode_List *qrcodes, *p; - - qrcodes = QRcode_encodeInputStructured(s); - if(qrcodes == NULL) return; - - swidth = (qrcodes->code->width + margin * 2) * size; - n = QRcode_List_size(qrcodes); - w = (n < 4)?n:4; - h = (n - 1) / 4 + 1; - - screen = SDL_SetVideoMode(swidth * w, swidth * h, 32, 0); - SDL_FillRect(screen, NULL, 0xffffff); - - p = qrcodes; - for(i=0; icode, x, y); - p = p->next; - } - SDL_Flip(screen); - QRcode_List_free(qrcodes); -} - -void draw_structuredQRcodeFromText(int argc, char **argv) -{ - QRinput_Struct *s; - QRinput *input; - int i, ret; - - s = QRinput_Struct_new(); - if(s == NULL) { - fprintf(stderr, "Failed to allocate memory.\n"); - exit(1); - } - for(i=0; i QRSPEC_VERSION_MAX) - version = QRSPEC_VERSION_MAX; - loop = 0; - break; - case SDLK_LEFT: - version--; - if(version < 1) - version = 1; - loop = 0; - break; - case SDLK_UP: - size++; - loop = 0; - break; - case SDLK_DOWN: - size--; - if(size < 1) size = 1; - loop = 0; - break; - case SDLK_0: - case SDLK_1: - case SDLK_2: - case SDLK_3: - case SDLK_4: - case SDLK_5: - case SDLK_6: - case SDLK_7: - if(!mode && !structured) { - mask = (event.key.keysym.sym - SDLK_0); - loop = 0; - } - break; - case SDLK_8: - if(!mode && !structured) { - mask = -1; - loop = 0; - } - break; - case SDLK_l: - level = QR_ECLEVEL_L; - loop = 0; - break; - case SDLK_m: - level = QR_ECLEVEL_M; - loop = 0; - break; - case SDLK_h: - level = QR_ECLEVEL_H; - loop = 0; - break; - case SDLK_q: - level = QR_ECLEVEL_Q; - loop = 0; - break; - case SDLK_ESCAPE: - loop = 0; - flag = 0; - break; - default: - break; - } - } - if(event.type == SDL_QUIT) { - loop = 0; - flag = 0; - } - } - } - } -} - -void view_simple(const char *str) -{ - QRinput *input; - int ret; - - input = QRinput_new2(version, level); - if(input == NULL) { - fprintf(stderr, "Memory allocation error.\n"); - exit(1); - } - if(eightbit) { - ret = QRinput_append(input, QR_MODE_8, strlen(str), (unsigned char *)str); - } else { - ret = Split_splitStringToQRinput(str, input, hint, casesensitive); - } - if(ret < 0) { - perror("Encoding the input string"); - exit(1); - } - - view(0, input); - - QRinput_free(input); -} - -void view_multiText(char **argv, int argc) -{ - textc = argc; - textv = argv; - - view(1, NULL); -} - -int main(int argc, char **argv) -{ - int opt, lindex = -1; - char *intext = NULL; - - while((opt = getopt_long(argc, argv, optstring, options, &lindex)) != -1) { - switch(opt) { - case 'h': - if(lindex == 0) { - usage(1, 1); - } else { - usage(1, 0); - } - exit(0); - break; - case 's': - size = atoi(optarg); - if(size <= 0) { - fprintf(stderr, "Invalid size: %d\n", size); - exit(1); - } - break; - case 'v': - version = atoi(optarg); - if(version < 0) { - fprintf(stderr, "Invalid version: %d\n", version); - exit(1); - } - break; - case 'l': - switch(*optarg) { - case 'l': - case 'L': - level = QR_ECLEVEL_L; - break; - case 'm': - case 'M': - level = QR_ECLEVEL_M; - break; - case 'q': - case 'Q': - level = QR_ECLEVEL_Q; - break; - case 'h': - case 'H': - level = QR_ECLEVEL_H; - break; - default: - fprintf(stderr, "Invalid level: %s\n", optarg); - exit(1); - break; - } - break; - case 'm': - margin = atoi(optarg); - if(margin < 0) { - fprintf(stderr, "Invalid margin: %d\n", margin); - exit(1); - } - break; - case 'S': - structured = 1; - case 'k': - hint = QR_MODE_KANJI; - break; - case 'c': - casesensitive = 1; - break; - case 'i': - casesensitive = 0; - break; - case '8': - eightbit = 1; - break; - case 'V': - usage(0, 0); - exit(0); - break; - default: - fprintf(stderr, "Try `view_qrcode --help' for more information.\n"); - exit(1); - break; - } - } - if(argc == 1) { - usage(1, 0); - exit(0); - } - - if(optind < argc) { - intext = argv[optind]; - } - if(intext == NULL) { - intext = readStdin(); - } - - if(SDL_Init(SDL_INIT_VIDEO) < 0) { - fprintf(stderr, "Failed initializing SDL: %s\n", SDL_GetError()); - return -1; - } - if(structured && version < 1) { - fprintf(stderr, "Version number must be greater than 0 to encode structured symbols.\n"); - exit(1); - } - if(structured && (argc - optind > 1)) { - view_multiText(argv + optind, argc - optind); - } else { - view_simple(intext); - } - - SDL_Quit(); - - return 0; -} diff --git a/glabels2/qrencode-3.1.0/use/compile b/glabels2/qrencode-3.1.0/use/compile deleted file mode 100755 index 1b1d2321..00000000 --- a/glabels2/qrencode-3.1.0/use/compile +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2005-05-14.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/glabels2/qrencode-3.1.0/use/config.guess b/glabels2/qrencode-3.1.0/use/config.guess deleted file mode 100755 index f32079ab..00000000 --- a/glabels2/qrencode-3.1.0/use/config.guess +++ /dev/null @@ -1,1526 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-01-23' - -# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/glabels2/qrencode-3.1.0/use/config.sub b/glabels2/qrencode-3.1.0/use/config.sub deleted file mode 100755 index 6759825a..00000000 --- a/glabels2/qrencode-3.1.0/use/config.sub +++ /dev/null @@ -1,1658 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-01-16' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/glabels2/qrencode-3.1.0/use/depcomp b/glabels2/qrencode-3.1.0/use/depcomp deleted file mode 100755 index e5f9736c..00000000 --- a/glabels2/qrencode-3.1.0/use/depcomp +++ /dev/null @@ -1,589 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2007-03-29.01 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/glabels2/qrencode-3.1.0/use/install-sh b/glabels2/qrencode-3.1.0/use/install-sh deleted file mode 100755 index a5897de6..00000000 --- a/glabels2/qrencode-3.1.0/use/install-sh +++ /dev/null @@ -1,519 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2006-12-25.00 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# 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. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # 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 $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/glabels2/qrencode-3.1.0/use/ltmain.sh b/glabels2/qrencode-3.1.0/use/ltmain.sh deleted file mode 100755 index b612e9a6..00000000 --- a/glabels2/qrencode-3.1.0/use/ltmain.sh +++ /dev/null @@ -1,8412 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6 -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-1ubuntu1 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION="2.2.6 Debian-2.2.6a-1ubuntu1" -TIMESTAMP="" -package_revision=1.3012 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -# define setmode _setmode -#else -# include -# include -# ifdef __CYGWIN__ -# include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - *) - func_fatal_configuration "$modename: unknown library version type \`$version_type'" - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/glabels2/qrencode-3.1.0/use/missing b/glabels2/qrencode-3.1.0/use/missing deleted file mode 100755 index 1c8ff704..00000000 --- a/glabels2/qrencode-3.1.0/use/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -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 - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - 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 - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. 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 $msg. You should only need it if - you modified \`${configure_ac}'. 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 $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. 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_ac}` - 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 $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - 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 - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. 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 test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. 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 test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. 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." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - 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 prerequisites 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 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/glabels2/src/Makefile.am b/glabels2/src/Makefile.am deleted file mode 100644 index a1c833cc..00000000 --- a/glabels2/src/Makefile.am +++ /dev/null @@ -1,323 +0,0 @@ -LIB_BARCODE_DIR = ../barcode-0.98 -LIB_IEC16022_DIR = ../iec16022-0.2.1 -LIB_QRENCODE_DIR = ../qrencode-3.1.0 - -SUBDIRS= pixmaps stock-pixmaps - -bin_PROGRAMS = glabels glabels-batch - -INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_builddir) \ - -I$(LIB_BARCODE_DIR) \ - -I$(LIB_IEC16022_DIR) \ - -I$(LIB_QRENCODE_DIR) \ - $(GLABELS_CFLAGS) \ - $(DISABLE_DEPRECATED_CFLAGS) \ - -DPREFIX=\""$(prefix)"\" \ - -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DDATADIR=\""$(datadir)"\" \ - -DLIBDIR=\""$(libdir)"\" \ - -DGLABELS_LOCALEDIR=\""$(datadir)/locale"\" \ - -DGLABELS_BUILDER_DIR=\""$(datadir)/glabels/builder/"\" \ - -DGLABELS_ICON_DIR=\""$(datadir)/pixmaps/"\" \ - -DGLABELS_PIXMAP_DIR=\""$(datadir)/pixmaps/glabels/"\" \ - -DG_LOG_DOMAIN=\""glabels\"" - -glabels_LDFLAGS = -export-dynamic - -glabels_LDADD = \ - $(GLABELS_LIBS) \ - ../libglabels/libglabels.la \ - $(LIB_BARCODE_DIR)/libbarcode.la \ - $(LIB_IEC16022_DIR)/libiec16022.la \ - $(LIB_QRENCODE_DIR)/libqrencode.la - -glabels_batch_LDFLAGS = -export-dynamic - -glabels_batch_LDADD = \ - $(GLABELS_LIBS) \ - ../libglabels/libglabels.la \ - $(LIB_BARCODE_DIR)/libbarcode.la \ - $(LIB_IEC16022_DIR)/libiec16022.la \ - $(LIB_QRENCODE_DIR)/libqrencode.la - -BUILT_SOURCES = \ - marshal.c \ - marshal.h - -glabels_SOURCES = \ - glabels.c \ - warning-handler.c \ - warning-handler.h \ - critical-error-handler.c \ - critical-error-handler.h \ - window.c \ - window.h \ - stock.c \ - stock.h \ - ui.h \ - ui.c \ - ui-util.h \ - ui-util.c \ - ui-commands.h \ - ui-commands.c \ - ui-property-bar.h \ - ui-property-bar.c \ - ui-sidebar.h \ - ui-sidebar.c \ - file.h \ - file.c \ - file-util.h \ - file-util.c \ - new-label-dialog.h \ - new-label-dialog.c \ - recent.h \ - recent.c \ - prefs.c \ - prefs.h \ - prefs-model.c \ - prefs-model.h \ - prefs-dialog.c \ - prefs-dialog.h \ - hig.h \ - view.c \ - view.h \ - view-object.c \ - view-object.h \ - view-box.c \ - view-box.h \ - view-ellipse.c \ - view-ellipse.h \ - view-line.c \ - view-line.h \ - view-image.c \ - view-image.h \ - view-text.c \ - view-text.h \ - view-barcode.c \ - view-barcode.h \ - merge-properties-dialog.c \ - merge-properties-dialog.h \ - object-editor.c \ - object-editor.h \ - object-editor-private.h \ - object-editor-position-page.c \ - object-editor-size-page.c \ - object-editor-lsize-page.c \ - object-editor-line-page.c \ - object-editor-fill-page.c \ - object-editor-image-page.c \ - object-editor-text-page.c \ - object-editor-edit-page.c \ - object-editor-bc-page.c \ - object-editor-data-page.c \ - object-editor-shadow-page.c \ - print.c \ - print.h \ - print-op.c \ - print-op.h \ - print-op-dialog.c \ - print-op-dialog.h \ - template-designer.c \ - template-designer.h \ - bc.c \ - bc.h \ - bc-gnubarcode.c \ - bc-gnubarcode.h \ - bc-postnet.c \ - bc-postnet.h \ - bc-iec16022.c \ - bc-iec16022.h \ - bc-iec18004.c \ - bc-iec18004.h \ - label.c \ - label.h \ - label-object.c \ - label-object.h \ - label-text.c \ - label-text.h \ - label-box.c \ - label-box.h \ - label-line.c \ - label-line.h \ - label-ellipse.c \ - label-ellipse.h \ - label-image.c \ - label-image.h \ - label-barcode.c \ - label-barcode.h \ - xml-label.c \ - xml-label.h \ - xml-label-04.c \ - xml-label-04.h \ - pixbuf-cache.c \ - pixbuf-cache.h \ - merge.c \ - merge.h \ - merge-init.c \ - merge-init.h \ - merge-text.c \ - merge-text.h \ - merge-evolution.c \ - merge-evolution.h \ - merge-vcard.c \ - merge-vcard.h \ - text-node.c \ - text-node.h \ - mini-preview-pixbuf.c \ - mini-preview-pixbuf.h \ - mini-preview-pixbuf-cache.c \ - mini-preview-pixbuf-cache.h \ - wdgt-media-select.c \ - wdgt-media-select.h \ - mini-preview.c \ - mini-preview.h \ - mini-label-preview.c \ - mini-label-preview.h \ - rotate-label-button.c \ - rotate-label-button.h \ - wdgt-chain-button.c \ - wdgt-chain-button.h \ - wdgt-merge-menu.c \ - wdgt-merge-menu.h \ - color-combo.c \ - color-combo.h \ - color-combo-button.c \ - color-combo-button.h \ - color-combo-menu.c \ - color-combo-menu.h \ - color-combo-color-menu-item.c \ - color-combo-color-menu-item.h \ - color-combo-history.c \ - color-combo-history.h \ - color-swatch.c \ - color-swatch.h \ - font-combo.c \ - font-combo.h \ - font-combo-menu.c \ - font-combo-menu.h \ - font-combo-menu-item.c \ - font-combo-menu-item.h \ - font-sample.c \ - font-sample.h \ - font-util.c \ - font-util.h \ - cairo-label-path.c \ - cairo-label-path.h \ - cairo-markup-path.c \ - cairo-markup-path.h \ - cairo-ellipse-path.c \ - cairo-ellipse-path.h \ - combo-util.c \ - combo-util.h \ - builder-util.c \ - builder-util.h \ - str-util.c \ - str-util.h \ - color.c \ - color.h \ - debug.c \ - debug.h \ - $(BUILT_SOURCES) - - -glabels_batch_SOURCES = \ - glabels-batch.c \ - file-util.h \ - file-util.c \ - print.c \ - print.h \ - print-op.c \ - print-op.h \ - bc.c \ - bc.h \ - bc-gnubarcode.c \ - bc-gnubarcode.h \ - bc-postnet.c \ - bc-postnet.h \ - bc-iec16022.c \ - bc-iec16022.h \ - bc-iec18004.c \ - bc-iec18004.h \ - label.c \ - label.h \ - label-object.c \ - label-object.h \ - label-text.c \ - label-text.h \ - label-box.c \ - label-box.h \ - label-line.c \ - label-line.h \ - label-ellipse.c \ - label-ellipse.h \ - label-image.c \ - label-image.h \ - label-barcode.c \ - label-barcode.h \ - xml-label.c \ - xml-label.h \ - xml-label-04.c \ - xml-label-04.h \ - pixbuf-cache.c \ - pixbuf-cache.h \ - merge.c \ - merge.h \ - merge-init.c \ - merge-init.h \ - merge-text.c \ - merge-text.h \ - merge-evolution.c \ - merge-evolution.h \ - merge-vcard.c \ - merge-vcard.h \ - text-node.c \ - text-node.h \ - prefs.c \ - prefs.h \ - prefs-model.c \ - prefs-model.h \ - font-util.c \ - font-util.h \ - str-util.c \ - str-util.h \ - color.c \ - color.h \ - debug.c \ - debug.h \ - hig.h \ - cairo-label-path.c \ - cairo-label-path.h \ - cairo-ellipse-path.c \ - cairo-ellipse-path.h \ - $(BUILT_SOURCES) - -marshal.h: marshal.list $(GLIB_GENMARSHAL) - $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=gl_marshal > $@ - -marshal.c: marshal.list $(GLIB_GENMARSHAL) - $(AM_V_GEN) echo "#include \"marshal.h\"" > $@ && \ - $(GLIB_GENMARSHAL) $< --body --prefix=gl_marshal >> $@ - -EXTRA_DIST = \ - marshal.list - -CLEANFILES = $(BUILT_SOURCES) - -$(bin_PROGRAMS): $(LIB_BARCODE_DIR)/libbarcode.la \ - $(LIB_IEC16022_DIR)/libiec16022.la \ - ../libglabels/libglabels.la - -$(LIB_BARCODE_DIR)/libbarcode.la: - cd $(LIB_BARCODE_DIR); $(MAKE) - -$(LIB_IEC16022_DIR)/libiec16022.la: - cd $(LIB_IEC16022_DIR); $(MAKE) - -$(LIB_QRENCODE_DIR)/libqrencode.la: - cd $(LIB_QRENCODE_DIR); $(MAKE) - -../libglabels/libglabels.la: - cd ../libglabels; $(MAKE) - diff --git a/glabels2/src/bc-gnubarcode.c b/glabels2/src/bc-gnubarcode.c deleted file mode 100644 index 6ce051d0..00000000 --- a/glabels2/src/bc-gnubarcode.c +++ /dev/null @@ -1,450 +0,0 @@ -/* - * bc-gnubarcode.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "bc-gnubarcode.h" - -#include -#include -#include -#include /* GNU Barcode */ - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ -#define SHRINK_AMOUNT 0.15 /* shrink bars to account for ink spreading */ -#define FONT_SCALE 0.95 /* Shrink fonts just a hair */ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ -static glBarcode *render_pass1 (struct Barcode_Item *bci, - gint flags); - -static gboolean is_length_valid (const gchar *digits, - gint n1, - gint n2); - -static gboolean is_length1_valid (const gchar *digits, - gint n1, - gint n2); - -static gboolean is_length2_valid (const gchar *digits, - gint n1, - gint n2); - - -/*****************************************************************************/ -/* Generate intermediate representation of barcode. */ -/*****************************************************************************/ -glBarcode * -gl_barcode_gnubarcode_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits) -{ - glBarcode *gbc; - struct Barcode_Item *bci; - gint flags; - - /* Assign type flag. Pre-filter by length for subtypes. */ - if (g_ascii_strcasecmp (id, "EAN") == 0) { - flags = BARCODE_EAN; - } else if (g_ascii_strcasecmp (id, "EAN-8") == 0) { - if (!is_length_valid (digits, 7, 8)) { - return NULL; - } - flags = BARCODE_EAN; - } else if (g_ascii_strcasecmp (id, "EAN-8+2") == 0) { - if (!is_length1_valid (digits, 7, 8) || !is_length2_valid (digits, 2, 2)) { - return NULL; - } - flags = BARCODE_EAN; - } else if (g_ascii_strcasecmp (id, "EAN-8+5") == 0) { - if (!is_length1_valid (digits, 7, 8) || !is_length2_valid (digits, 5, 5)) { - return NULL; - } - flags = BARCODE_EAN; - } else if (g_ascii_strcasecmp (id, "EAN-13") == 0) { - if (!is_length_valid (digits, 12, 13)) { - return NULL; - } - flags = BARCODE_EAN; - } else if (g_ascii_strcasecmp (id, "EAN-13+2") == 0) { - if (!is_length1_valid (digits, 12,13) || !is_length2_valid (digits, 2,2)) { - return NULL; - } - flags = BARCODE_EAN; - } else if (g_ascii_strcasecmp (id, "EAN-13+5") == 0) { - if (!is_length1_valid (digits, 12,13) || !is_length2_valid (digits, 5,5)) { - return NULL; - } - flags = BARCODE_EAN; - } else if (g_ascii_strcasecmp (id, "UPC") == 0) { - flags = BARCODE_UPC; - } else if (g_ascii_strcasecmp (id, "UPC-A") == 0) { - if (!is_length_valid (digits, 11, 12)) { - return NULL; - } - flags = BARCODE_UPC; - } else if (g_ascii_strcasecmp (id, "UPC-A+2") == 0) { - if (!is_length1_valid (digits, 11,12) || !is_length2_valid (digits, 2,2)) { - return NULL; - } - flags = BARCODE_UPC; - } else if (g_ascii_strcasecmp (id, "UPC-A+5") == 0) { - if (!is_length1_valid (digits, 11,12) || !is_length2_valid (digits, 5,5)) { - return NULL; - } - flags = BARCODE_UPC; - } else if (g_ascii_strcasecmp (id, "UPC-E") == 0) { - if (!is_length_valid (digits, 6, 8)) { - return NULL; - } - flags = BARCODE_UPC; - } else if (g_ascii_strcasecmp (id, "UPC-E+2") == 0) { - if (!is_length1_valid (digits, 6, 8) || !is_length2_valid (digits, 2,2)) { - return NULL; - } - flags = BARCODE_UPC; - } else if (g_ascii_strcasecmp (id, "UPC-E+5") == 0) { - if (!is_length1_valid (digits, 6, 8) || !is_length2_valid (digits, 5,5)) { - return NULL; - } - flags = BARCODE_UPC; - } else if (g_ascii_strcasecmp (id, "ISBN") == 0) { - if (!is_length_valid (digits, 9, 10)) { - return NULL; - } - flags = BARCODE_ISBN; - } else if (g_ascii_strcasecmp (id, "ISBN+5") == 0) { - if (!is_length1_valid (digits, 9, 10) || !is_length2_valid (digits, 5,5)) { - return NULL; - } - flags = BARCODE_ISBN; - } else if (g_ascii_strcasecmp (id, "Code39") == 0) { - flags = BARCODE_39; - } else if (g_ascii_strcasecmp (id, "Code128") == 0) { - flags = BARCODE_128; - } else if (g_ascii_strcasecmp (id, "Code128C") == 0) { - flags = BARCODE_128C; - } else if (g_ascii_strcasecmp (id, "Code128B") == 0) { - flags = BARCODE_128B; - } else if (g_ascii_strcasecmp (id, "I25") == 0) { - flags = BARCODE_I25; - } else if (g_ascii_strcasecmp (id, "CBR") == 0) { - flags = BARCODE_CBR; - } else if (g_ascii_strcasecmp (id, "MSI") == 0) { - flags = BARCODE_MSI; - } else if (g_ascii_strcasecmp (id, "PLS") == 0) { - flags = BARCODE_PLS; - } else { - g_message( "Illegal barcode id %s", id ); - flags = BARCODE_ANY; - } - - - bci = Barcode_Create ((char *)digits); - - /* First encode using GNU Barcode library */ - if (!text_flag) { - flags |= BARCODE_NO_ASCII; - } - if (!checksum_flag) { - flags |= BARCODE_NO_CHECKSUM; - } - - bci->scalef = 0.0; - bci->width = w; - bci->height = h; - - Barcode_Encode (bci, flags); - if (!bci->partial || !bci->textinfo) { - Barcode_Delete (bci); - return NULL; - } - - /* now render with our custom back-end, - to create appropriate intermdediate format */ - gbc = render_pass1 (bci, flags); - - 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, - gint flags) -{ - gint validbits = BARCODE_NO_ASCII; - glBarcode *gbc; - glBarcodeLine *line; - glBarcodeChar *bchar; - gdouble scalef = 1.0; - gdouble x; - gint i, j, barlen; - gdouble f1, f2; - gint mode = '-'; /* text below bars */ - gdouble x0, y0, yr; - gchar *p, c; - - if (bci->width > (2*bci->margin)) { - bci->width -= 2*bci->margin; - } - if (bci->height > (2*bci->margin)) { - bci->height -= 2*bci->margin; - } - - /* If any flag is clear in "flags", inherit it from "bci->flags" */ - if (!(flags & BARCODE_NO_ASCII)) { - flags |= bci->flags & BARCODE_NO_ASCII; - } - flags = bci->flags = (flags & validbits) | (bci->flags & ~validbits); - - /* 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 scale factor depends on bar length */ - if (!bci->scalef) { - if (!bci->width) bci->width = barlen; /* default */ - scalef = bci->scalef = (double)bci->width / (double)barlen; - if (scalef < 0.5) scalef = 0.5; - } - - /* The width defaults to "just enough" */ - bci->width = barlen * scalef + 1; - - /* But it can be too small, in this case enlarge and center the area */ - if (bci->width < barlen * scalef) { - int wid = barlen * scalef + 1; - bci->xoff -= (wid - bci->width)/2 ; - bci->width = wid; - /* Can't extend too far on the left */ - if (bci->xoff < 0) { - bci->width += -bci->xoff; - bci->xoff = 0; - } - } - - /* The height defaults to 80 points (rescaled) */ - if (!bci->height) - bci->height = 80 * scalef; - - /* If too small (5 + text), reduce the scale factor and center */ - i = 5 + 10 * ((bci->flags & BARCODE_NO_ASCII)==0); - if (bci->height < i * scalef ) { - bci->height = i * scalef; - } - - gbc = g_new0 (glBarcode, 1); - - /* Now traverse the code string and create a list of lines */ - x = bci->margin + (bci->partial[0] - '0') * scalef; - 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 * scalef) / 2; - y0 = bci->margin; - yr = bci->height; - if (!(bci->flags & BARCODE_NO_ASCII)) { /* leave space for text */ - if (mode == '-') { - /* text below bars: 10 or 5 points */ - yr -= (isdigit (*p) ? 10 : 5) * scalef; - } else { /* '+' */ - /* above bars: 10 or 0 from bottom, - and 10 from top */ - y0 += 10 * scalef; - yr -= (isdigit (*p) ? 20 : 10) * scalef; - } - } - line = g_new0 (glBarcodeLine, 1); - line->x = x0; - line->y = y0; - line->length = yr; - line->width = (j * scalef) - SHRINK_AMOUNT; - gbc->lines = g_list_append (gbc->lines, line); - } - x += j * scalef; - - } - - /* Now the text */ - mode = '-'; /* reinstantiate default */ - if (!(bci->flags & BARCODE_NO_ASCII)) { - 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) { - g_message ("impossible data: %s", p); - continue; - } - bchar = g_new0 (glBarcodeChar, 1); - bchar->x = f1 * scalef + bci->margin; - if (mode == '-') { - bchar->y = - bci->margin + bci->height - 8 * scalef; - } else { - bchar->y = bci->margin; - } - bchar->fsize = f2 * FONT_SCALE * scalef; - 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; -} - - -/*--------------------------------------------------------------------------*/ -/* Validate specific length of string (for subtypes). */ -/*--------------------------------------------------------------------------*/ -static gboolean -is_length_valid (const gchar *digits, - gint n1, - gint n2) -{ - gchar *p; - gint i; - - if (!digits) { - return FALSE; - } - - for (p = (gchar *)digits, i=0; *p != 0; p++) { - if (g_ascii_isdigit (*p)) { - i++; - } - } - - return (i >= n1) && (i <= n2); -} - - -/*--------------------------------------------------------------------------*/ -/* Validate specific length of string (for subtypes). */ -/*--------------------------------------------------------------------------*/ -static gboolean -is_length1_valid (const gchar *digits, - gint n1, - gint n2) -{ - gchar *p; - gint i; - - if (!digits) { - return FALSE; - } - - for (p = (gchar *)digits, i=0; !g_ascii_isspace (*p) && *p != 0; p++) { - if (g_ascii_isdigit (*p)) { - i++; - } - } - - return (i >= n1) && (i <= n2); -} - - -/*--------------------------------------------------------------------------*/ -/* Validate specific length of second string (for subtypes). */ -/*--------------------------------------------------------------------------*/ -static gboolean -is_length2_valid (const gchar *digits, - gint n1, - gint n2) -{ - gchar *p; - gint i; - - if (!digits) { - return FALSE; - } - - for (p = (gchar *)digits; !g_ascii_isspace (*p) && (*p != 0); p++) { - /* Skip over 1st string */ - } - - for (i=0; *p != 0; p++) { - if (g_ascii_isdigit (*p)) { - i++; - } - } - - return (i >= n1) && (i <= n2); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/bc-gnubarcode.h b/glabels2/src/bc-gnubarcode.h deleted file mode 100644 index ac96b346..00000000 --- a/glabels2/src/bc-gnubarcode.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * bc-gnubarcode.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __BC_GNUBARCODE_H__ -#define __BC_GNUBARCODE_H__ - -#include "bc.h" - -G_BEGIN_DECLS - -glBarcode *gl_barcode_gnubarcode_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits); - -G_END_DECLS - -#endif /* __BC_GNUBARCODE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/bc-iec16022.c b/glabels2/src/bc-iec16022.c deleted file mode 100644 index 3ccdc043..00000000 --- a/glabels2/src/bc-iec16022.c +++ /dev/null @@ -1,156 +0,0 @@ -/* - * bc-iec16022.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "bc-iec16022.h" - -#include -#include -#include -#include -#include - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ -#define MIN_PIXEL_SIZE 1.0 - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ -static glBarcode *render_iec16022 (const gchar *grid, - gint i_width, - gint i_height, - gdouble w, - gdouble h); - - -/*****************************************************************************/ -/* Generate intermediate representation of barcode. */ -/*****************************************************************************/ -glBarcode * -gl_barcode_iec16022_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits) -{ - gchar *grid; - gint i_width, i_height; - glBarcode *gbc; - - if ( strlen (digits) == 0 ) - { - return NULL; - } - - i_width = 0; - i_height = 0; - - grid = (gchar *)iec16022ecc200 (&i_width, &i_height, NULL, - strlen (digits), (unsigned char *)digits, - NULL, NULL, NULL); - - /* now render with our custom back-end, - to create appropriate intermdediate format */ - gbc = render_iec16022 (grid, i_width, i_height, w, h); - - free (grid); - return gbc; -} - - -/*-------------------------------------------------------------------------- - * PRIVATE. Render to glBarcode intermediate representation of barcode. - *--------------------------------------------------------------------------*/ -static glBarcode * -render_iec16022 (const gchar *grid, - gint i_width, - gint i_height, - gdouble w, - gdouble h) -{ - glBarcode *gbc; - glBarcodeLine *line; - gint x, y; - gdouble aspect_ratio, pixel_size; - - /* Treat requested size as a bounding box, scale to maintain aspect - * ratio while fitting it in this bounding box. */ - aspect_ratio = (gdouble)i_height / (gdouble)i_width; - if ( h > w*aspect_ratio ) { - h = w * aspect_ratio; - } else { - w = h / aspect_ratio; - } - - /* Now determine pixel size. */ - pixel_size = w / i_width; - if ( pixel_size < MIN_PIXEL_SIZE ) - { - pixel_size = MIN_PIXEL_SIZE; - } - - gbc = g_new0 (glBarcode, 1); - - /* Now traverse the code string and create a list of boxes */ - for ( y = i_height-1; y >= 0; y-- ) - { - - for ( x = 0; x < i_width; x++ ) - { - - if (*grid++) - { - line = g_new0 (glBarcodeLine, 1); - line->x = x*pixel_size + pixel_size/2.0; - line->y = y*pixel_size; - line->length = pixel_size; - line->width = pixel_size; - gbc->lines = g_list_append (gbc->lines, line); - } - - } - - } - - /* Fill in other info */ - gbc->height = i_height * pixel_size; - gbc->width = i_width * pixel_size; - - return gbc; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/bc-iec16022.h b/glabels2/src/bc-iec16022.h deleted file mode 100644 index 64655b0b..00000000 --- a/glabels2/src/bc-iec16022.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * bc-iec16022.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __BC_IEC16022_H__ -#define __BC_IEC16022_H__ - -#include "bc.h" - -G_BEGIN_DECLS - -glBarcode *gl_barcode_iec16022_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits); - -G_END_DECLS - -#endif /* __BC_IEC16022_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/bc-iec18004.c b/glabels2/src/bc-iec18004.c deleted file mode 100644 index bef0fd89..00000000 --- a/glabels2/src/bc-iec18004.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * bc-iec18004.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "bc-iec18004.h" - -#include -#include -#include -#include -#include - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - -#define MIN_PIXEL_SIZE 1.0 - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ -static glBarcode *render_iec18004 (const gchar *grid, - gint i_width, - gint i_height, - gdouble w, - gdouble h); - - -/*****************************************************************************/ -/* Generate intermediate representation of barcode. */ -/*****************************************************************************/ -glBarcode * -gl_barcode_iec18004_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits) -{ - gint i_width, i_height; - glBarcode *gbc; - QRcode *qrcode; - - if ( strlen (digits) == 0 ) - { - return NULL; - } - - i_width = 0; - i_height = 0; - - qrcode = QRcode_encodeString ((const char *)digits, 0, QR_ECLEVEL_M, - QR_MODE_8, 1); - if (qrcode == NULL) - { - return NULL; - } - - i_width = i_height = qrcode->width; - gbc = render_iec18004 ((const gchar *)qrcode->data, i_width, i_height, - w, h); - - QRcode_free ( qrcode ); - - return gbc; -} - - -/*-------------------------------------------------------------------------- - * PRIVATE. Render to glBarcode intermediate representation of barcode. - *--------------------------------------------------------------------------*/ -static glBarcode * -render_iec18004 (const gchar *grid, - gint i_width, - gint i_height, - gdouble w, - gdouble h) -{ - glBarcode *gbc; - glBarcodeLine *line; - gint x, y; - gdouble aspect_ratio, pixel_size; - - /* Treat requested size as a bounding box, scale to maintain aspect - * ratio while fitting it in this bounding box. */ - aspect_ratio = (gdouble)i_height / (gdouble)i_width; - if ( h > w*aspect_ratio ) { - h = w * aspect_ratio; - } else { - w = h / aspect_ratio; - } - - /* Now determine pixel size. */ - pixel_size = w / i_width; - if ( pixel_size < MIN_PIXEL_SIZE ) - { - pixel_size = MIN_PIXEL_SIZE; - } - - gbc = g_new0 (glBarcode, 1); - - /* Now traverse the code string and create a list of boxes */ - for ( y = 0; y < i_height; y++ ) - { - for ( x = 0; x < i_width; x++ ) - { - - /* Symbol data is represented as an array contains - * width*width uchars. Each uchar represents a module - * (dot). If the less significant bit of the uchar - * is 1, the corresponding module is black. The other - * bits are meaningless for us. */ - if ((*grid++) & 1) - { - line = g_new0 (glBarcodeLine, 1); - line->x = x*pixel_size + pixel_size/2.0; - line->y = y*pixel_size; - line->length = pixel_size; - line->width = pixel_size; - gbc->lines = g_list_append (gbc->lines, line); - } - - } - - } - - /* Fill in other info */ - gbc->height = i_height * pixel_size; - gbc->width = i_width * pixel_size; - - return gbc; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/bc-iec18004.h b/glabels2/src/bc-iec18004.h deleted file mode 100644 index 2c3e7eeb..00000000 --- a/glabels2/src/bc-iec18004.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * bc-iec18004.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __BC_IEC18004_H__ -#define __BC_IEC18004_H__ - -#include "bc.h" - -G_BEGIN_DECLS - -glBarcode *gl_barcode_iec18004_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits); - -G_END_DECLS - -#endif /* __BC_IEC18004_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/bc-postnet.c b/glabels2/src/bc-postnet.c deleted file mode 100644 index 52c07dba..00000000 --- a/glabels2/src/bc-postnet.c +++ /dev/null @@ -1,231 +0,0 @@ -/* - * bc-postnet.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -/* - * This module implements the POSTNET barcode specified in the USPS - * publication 25, Mar 2001. - */ - -#include - -#include "bc-postnet.h" - -#include -#include - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ -#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 - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ -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"; - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ -static gchar *postnet_code (const gchar *digits); - -static gboolean is_length_valid (const gchar *digits, - gint n); - - -/****************************************************************************/ -/* Generate list of lines that form the barcode for the given digits. */ -/****************************************************************************/ -glBarcode * -gl_barcode_postnet_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits) -{ - gchar *code, *p; - glBarcode *gbc; - glBarcodeLine *line; - gdouble x; - - /* Validate code length for all subtypes. */ - if ( (g_ascii_strcasecmp (id, "POSTNET") == 0) ) { - if (!is_length_valid (digits, 5) && - !is_length_valid (digits, 9) && - !is_length_valid (digits, 11)) { - return NULL; - } - } - if ( (g_ascii_strcasecmp (id, "POSTNET-5") == 0) ) { - if (!is_length_valid (digits, 5)) { - return NULL; - } - } - if ( (g_ascii_strcasecmp (id, "POSTNET-9") == 0) ) { - if (!is_length_valid (digits, 9)) { - return NULL; - } - } - if ( (g_ascii_strcasecmp (id, "POSTNET-11") == 0) ) { - if (!is_length_valid (digits, 11)) { - return NULL; - } - } - if ( (g_ascii_strcasecmp (id, "CEPNET") == 0) ) { - if (!is_length_valid (digits, 8)) { - return NULL; - } - } - - /* First get code string */ - code = postnet_code (digits); - if (code == NULL) { - return NULL; - } - - gbc = g_new0 (glBarcode, 1); - - /* 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 (const 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 = (gchar *)digits, len = 0; (*p != 0) && (len < 11); p++) { - if (g_ascii_isdigit (*p)) { - /* Only translate valid characters (0-9) */ - d = (*p) - '0'; - sum += d; - code = g_string_append (code, symbols[d]); - 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; -} - - -/*--------------------------------------------------------------------------*/ -/* Validate specific length of string (for subtypes). */ -/*--------------------------------------------------------------------------*/ -static gboolean -is_length_valid (const gchar *digits, - gint n) -{ - gchar *p; - gint i; - - if (!digits) { - return FALSE; - } - - for (p = (gchar *)digits, i=0; *p != 0; p++) { - if (g_ascii_isdigit (*p)) { - i++; - } - } - - return (i == n); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/bc-postnet.h b/glabels2/src/bc-postnet.h deleted file mode 100644 index 0945670d..00000000 --- a/glabels2/src/bc-postnet.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * bc-postnet.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __BC_POSTNET_H__ -#define __BC_POSTNET_H__ - -#include "bc.h" - -G_BEGIN_DECLS - -glBarcode *gl_barcode_postnet_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits); - -G_END_DECLS - -#endif /* __BC_POSTNET_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/bc.c b/glabels2/src/bc.c deleted file mode 100644 index 7c35234a..00000000 --- a/glabels2/src/bc.c +++ /dev/null @@ -1,411 +0,0 @@ -/* - * bc.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "bc.h" - -#include -#include - -#include "bc-postnet.h" -#include "bc-gnubarcode.h" -#include "bc-iec16022.h" -#include "bc-iec18004.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -typedef struct { - gchar *id; - gchar *name; - glBarcodeNewFunc new; - gboolean can_text; - gboolean text_optional; - gboolean can_checksum; - gboolean checksum_optional; - gchar *default_digits; - gboolean can_freeform; - guint prefered_n; -} Backend; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static const Backend backends[] = { - - { "POSTNET", N_("POSTNET (any)"), gl_barcode_postnet_new, - FALSE, FALSE, TRUE, FALSE, "12345-6789-12", FALSE, 11}, - - { "POSTNET-5", N_("POSTNET-5 (ZIP only)"), gl_barcode_postnet_new, - FALSE, FALSE, TRUE, FALSE, "12345", FALSE, 5}, - - { "POSTNET-9", N_("POSTNET-9 (ZIP+4)"), gl_barcode_postnet_new, - FALSE, FALSE, TRUE, FALSE, "12345-6789", FALSE, 9}, - - { "POSTNET-11", N_("POSTNET-11 (DPBC)"), gl_barcode_postnet_new, - FALSE, FALSE, TRUE, FALSE, "12345-6789-12", FALSE, 11}, - - { "CEPNET", N_("CEPNET"), gl_barcode_postnet_new, - FALSE, FALSE, TRUE, FALSE, "12345-678", FALSE, 8}, - - { "EAN", N_("EAN (any)"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "000000000000 00000", FALSE, 17}, - - { "EAN-8", N_("EAN-8"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "0000000", FALSE, 7}, - - { "EAN-8+2", N_("EAN-8 +2"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "0000000 00", FALSE, 9}, - - { "EAN-8+5", N_("EAN-8 +5"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "0000000 00000", FALSE, 12}, - - { "EAN-13", N_("EAN-13"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "000000000000", FALSE, 12}, - - { "EAN-13+2", N_("EAN-13 +2"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "000000000000 00", FALSE, 14}, - - { "EAN-13+5", N_("EAN-13 +5"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "000000000000 00000", FALSE, 17}, - - { "UPC", N_("UPC (UPC-A or UPC-E)"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "00000000000 00000", FALSE, 16}, - - { "UPC-A", N_("UPC-A"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "00000000000", FALSE, 11}, - - { "UPC-A+2", N_("UPC-A +2"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "00000000000 00", FALSE, 13}, - - { "UPC-A+5", N_("UPC-A +5"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "00000000000 00000", FALSE, 16}, - - { "UPC-E", N_("UPC-E"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "000000", FALSE, 6}, - - { "UPC-E+2", N_("UPC-E +2"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "000000 00", FALSE, 8}, - - { "UPC-E+5", N_("UPC-E +5"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "000000 00000", FALSE, 11}, - - { "ISBN", N_("ISBN"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, TRUE, "0-00000-000-0", FALSE, 10}, - - { "ISBN+5", N_("ISBN +5"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, TRUE, "0-00000-000-0 00000", FALSE, 15}, - - { "Code39", N_("Code 39"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, - - { "Code128", N_("Code 128"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, - - { "Code128C", N_("Code 128C"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, FALSE, "0000000000", TRUE, 10}, - - { "Code128B", N_("Code 128B"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, - - { "I25", N_("Interleaved 2 of 5"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, - - { "CBR", N_("Codabar"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, - - { "MSI", N_("MSI"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, - - { "PLS", N_("Plessey"), gl_barcode_gnubarcode_new, - TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, - - { "IEC16022", N_("IEC16022 (DataMatrix)"), gl_barcode_iec16022_new, - FALSE, FALSE, TRUE, FALSE, "12345678", TRUE, 8}, - - { "IEC18004", N_("IEC18004 (QRCode)"), gl_barcode_iec18004_new, - FALSE, FALSE, TRUE, FALSE, "12345678", TRUE, 8}, - - { NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL, FALSE, 0} - -}; - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - - -/*---------------------------------------------------------------------------*/ -/* Convert id to index into above table. */ -/*---------------------------------------------------------------------------*/ -static gint -id_to_index (const gchar *id) -{ - gint i; - - if (id == 0) { - return 0; /* NULL request default. I.e., the first element. */ - } - - for (i=0; backends[i].id != NULL; i++) { - if (g_ascii_strcasecmp (id, backends[i].id) == 0) { - return i; - } - } - - g_message( "Unknown barcode id \"%s\"", id ); - return 0; -} - - -/*---------------------------------------------------------------------------*/ -/* Convert name to index into above table. */ -/*---------------------------------------------------------------------------*/ -static gint -name_to_index (const gchar *name) -{ - gint i; - - g_return_val_if_fail (name!=NULL, 0); - - for (i=0; backends[i].id != NULL; i++) { - if (strcmp (name, backends[i].name) == 0) { - return i; - } - } - - g_message( "Unknown barcode name \"%s\"", name ); - return 0; -} - - -/*****************************************************************************/ -/* Call appropriate barcode backend to create barcode in intermediate format.*/ -/*****************************************************************************/ -glBarcode * -gl_barcode_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits) -{ - glBarcode *gbc; - gint i; - - g_return_val_if_fail (digits!=NULL, NULL); - - i = id_to_index (id); - gbc = backends[i].new (backends[i].id, - text_flag, - checksum_flag, - w, - h, - digits); - - 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; - } -} - - -/*****************************************************************************/ -/* Get a list of names for valid barcode styles. */ -/*****************************************************************************/ -GList * -gl_barcode_get_styles_list (void) -{ - gint i; - GList *list = NULL; - - for (i=0; backends[i].id != NULL; i++) { - list = g_list_append (list, g_strdup (backends[i].name)); - } - - return list; -} - - -/*****************************************************************************/ -/* Free up a previously allocated list of style names. */ -/*****************************************************************************/ -void -gl_barcode_free_styles_list (GList *styles_list) -{ - GList *p; - - for (p=styles_list; p != NULL; p=p->next) { - g_free (p->data); - p->data = NULL; - } - - g_list_free (styles_list); -} - - -/*****************************************************************************/ -/* Return an appropriate set of digits for the given barcode style. */ -/*****************************************************************************/ -gchar * -gl_barcode_default_digits (const gchar *id, - guint n) -{ - int i; - - i = id_to_index (id); - - if (backends[i].can_freeform) { - - return g_strnfill (MAX (n,1), '0'); - - } else { - - return g_strdup (backends[i].default_digits); - - } -} - - -/*****************************************************************************/ -/* Query text capabilities. */ -/*****************************************************************************/ -gboolean -gl_barcode_can_text (const gchar *id) -{ - return backends[id_to_index (id)].can_text; -} - - -gboolean -gl_barcode_text_optional (const gchar *id) -{ - return backends[id_to_index (id)].text_optional; -} - - -/*****************************************************************************/ -/* Query checksum capabilities. */ -/*****************************************************************************/ -gboolean -gl_barcode_can_csum (const gchar *id) -{ - return backends[id_to_index (id)].can_checksum; -} - - -gboolean -gl_barcode_csum_optional (const gchar *id) -{ - return backends[id_to_index (id)].checksum_optional; -} - - -/*****************************************************************************/ -/* Query if freeform input is allowed. */ -/*****************************************************************************/ -gboolean -gl_barcode_can_freeform (const gchar *id) -{ - return backends[id_to_index (id)].can_freeform; -} - - -/*****************************************************************************/ -/* Query prefered number of digits of input. */ -/*****************************************************************************/ -guint -gl_barcode_get_prefered_n (const gchar *id) -{ - return backends[id_to_index (id)].prefered_n; -} - - -/*****************************************************************************/ -/* Convert style to text. */ -/*****************************************************************************/ -const gchar * -gl_barcode_id_to_name (const gchar *id) -{ - return backends[id_to_index (id)].name; -} - - -/*****************************************************************************/ -/* Convert name to style. */ -/*****************************************************************************/ -const gchar * -gl_barcode_name_to_id (const gchar *name) -{ - g_return_val_if_fail (name!=NULL, backends[0].id); - - return backends[name_to_index (name)].id; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/bc.h b/glabels2/src/bc.h deleted file mode 100644 index 1e62a6fa..00000000 --- a/glabels2/src/bc.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * bc.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __BC_H__ -#define __BC_H__ - -#include -#include - -G_BEGIN_DECLS - -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; - -typedef glBarcode *(*glBarcodeNewFunc) (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits); - - -#define GL_BARCODE_FONT_FAMILY "Sans" -#define GL_BARCODE_FONT_WEIGHT PANGO_WEIGHT_NORMAL - - -glBarcode *gl_barcode_new (const gchar *id, - gboolean text_flag, - gboolean checksum_flag, - gdouble w, - gdouble h, - const gchar *digits); - -void gl_barcode_free (glBarcode **bc); - -GList *gl_barcode_get_styles_list (void); -void gl_barcode_free_styles_list (GList *styles_list); - -gchar *gl_barcode_default_digits (const gchar *id, - guint n); - -gboolean gl_barcode_can_text (const gchar *id); -gboolean gl_barcode_text_optional (const gchar *id); - -gboolean gl_barcode_can_csum (const gchar *id); -gboolean gl_barcode_csum_optional (const gchar *id); - -gboolean gl_barcode_can_freeform (const gchar *id); -guint gl_barcode_get_prefered_n (const gchar *id); - -const gchar *gl_barcode_id_to_name (const gchar *id); -const gchar *gl_barcode_name_to_id (const gchar *name); - -G_END_DECLS - -#endif /* __BC_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/builder-util.c b/glabels2/src/builder-util.c deleted file mode 100644 index e78c2303..00000000 --- a/glabels2/src/builder-util.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * builder-util.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "builder-util.h" - - -/****************************************************************************/ -/* Get widgets from GtkBuilder "en masse." */ -/****************************************************************************/ -void gl_builder_util_get_widgets (GtkBuilder *builder, - gchar *first_name, - ...) -{ - va_list args; - gchar *name; - GtkWidget **p_widget; - - va_start (args, first_name); - - for ( name = first_name; name; name = va_arg (args, gchar *) ) - { - p_widget = va_arg (args, GtkWidget **); - - *p_widget = GTK_WIDGET (gtk_builder_get_object (builder, name)); - - if (!*p_widget) - { - g_critical ("Could not load widget \"%s\".\n\ngLabels may not be installed correctly!", - name); - break; - } - } - - va_end (args); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/builder-util.h b/glabels2/src/builder-util.h deleted file mode 100644 index c3e55493..00000000 --- a/glabels2/src/builder-util.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * builder-util.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __BUILDER_UTIL_H__ -#define __BUILDER_UTIL_H__ - -#include -#include - -G_BEGIN_DECLS - -void gl_builder_util_get_widgets (GtkBuilder *builder, - gchar *first_name, - ...); - -G_END_DECLS - -#endif /* __BUILDER_UTIL_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/cairo-ellipse-path.c b/glabels2/src/cairo-ellipse-path.c deleted file mode 100644 index b0fd4493..00000000 --- a/glabels2/src/cairo-ellipse-path.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * cairo-ellipse-path.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "cairo-ellipse-path.h" - -#include - -#include "debug.h" - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - -#define ARC_FINE 2 - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - - -/*****************************************************************************/ -/* Create ellipse path */ -/*****************************************************************************/ -void -gl_cairo_ellipse_path (cairo_t *cr, - gdouble rx, - gdouble ry) -{ - gdouble x, y; - gint i_theta; - - gl_debug (DEBUG_VIEW, "START"); - - cairo_new_path (cr); - cairo_move_to (cr, 2*rx, ry); - for (i_theta = ARC_FINE; i_theta <= 360; i_theta += ARC_FINE) { - x = rx + rx * cos (i_theta * G_PI / 180.0); - y = ry + ry * sin (i_theta * G_PI / 180.0); - cairo_line_to (cr, x, y); - } - cairo_close_path (cr); - - gl_debug (DEBUG_VIEW, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/cairo-ellipse-path.h b/glabels2/src/cairo-ellipse-path.h deleted file mode 100644 index 9da409af..00000000 --- a/glabels2/src/cairo-ellipse-path.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * cairo-ellipse-path.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __CAIRO_ELLIPSE_PATH_H__ -#define __CAIRO_ELLIPSE_PATH_H__ - -#include -#include - -G_BEGIN_DECLS - -void gl_cairo_ellipse_path (cairo_t *cr, - gdouble rx, - gdouble ry); - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/cairo-label-path.c b/glabels2/src/cairo-label-path.c deleted file mode 100644 index 59b8db13..00000000 --- a/glabels2/src/cairo-label-path.c +++ /dev/null @@ -1,274 +0,0 @@ -/* - * cairo-label-path.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "cairo-label-path.h" - -#include - -#include "debug.h" - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_cairo_rect_label_path (cairo_t *cr, - lglTemplate *template, - gboolean rotate_flag, - gboolean waste_flag); -static void gl_cairo_round_label_path (cairo_t *cr, - lglTemplate *template, - gboolean rotate_flag, - gboolean waste_flag); -static void gl_cairo_cd_label_path (cairo_t *cr, - lglTemplate *template, - gboolean rotate_flag, - gboolean waste_flag); - - -/*--------------------------------------------------------------------------*/ -/* Create label path */ -/*--------------------------------------------------------------------------*/ -void -gl_cairo_label_path (cairo_t *cr, - lglTemplate *template, - gboolean rotate_flag, - gboolean waste_flag) -{ - const lglTemplateFrame *frame; - - gl_debug (DEBUG_PATH, "START"); - - frame = (lglTemplateFrame *)template->frames->data; - - switch (frame->shape) { - - case LGL_TEMPLATE_FRAME_SHAPE_RECT: - gl_cairo_rect_label_path (cr, template, rotate_flag, waste_flag); - break; - - case LGL_TEMPLATE_FRAME_SHAPE_ROUND: - gl_cairo_round_label_path (cr, template, rotate_flag, waste_flag); - break; - - case LGL_TEMPLATE_FRAME_SHAPE_CD: - gl_cairo_cd_label_path (cr, template, rotate_flag, waste_flag); - break; - - default: - g_message ("Unknown label style"); - break; - } - - gl_debug (DEBUG_PATH, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Create rectangular label path */ -/*--------------------------------------------------------------------------*/ -static void -gl_cairo_rect_label_path (cairo_t *cr, - lglTemplate *template, - gboolean rotate_flag, - gboolean waste_flag) -{ - const lglTemplateFrame *frame; - gdouble w, h, r; - gdouble x_waste, y_waste; - - gl_debug (DEBUG_PATH, "START"); - - frame = (lglTemplateFrame *)template->frames->data; - r = frame->rect.r; - - x_waste = 0.0; - y_waste = 0.0; - - if (rotate_flag) - { - lgl_template_frame_get_size (frame, &h, &w); - if (waste_flag) - { - x_waste = frame->rect.y_waste; - y_waste = frame->rect.x_waste; - } - } - else - { - lgl_template_frame_get_size (frame, &w, &h); - if (waste_flag) - { - x_waste = frame->rect.x_waste; - y_waste = frame->rect.y_waste; - } - } - - - if ( r == 0.0 ) - { - cairo_rectangle (cr, -x_waste, -y_waste, w+x_waste, h+y_waste); - } - else - { - cairo_new_path (cr); - cairo_arc_negative (cr, r-x_waste, r-y_waste, r, 3*G_PI/2, G_PI); - cairo_arc_negative (cr, r-x_waste, h-r+y_waste, r, G_PI, G_PI/2); - cairo_arc_negative (cr, w-r+x_waste, h-r+y_waste, r, G_PI/2, 0.); - cairo_arc_negative (cr, w-r+x_waste, r-y_waste, r, 2*G_PI, 3*G_PI/2); - cairo_close_path (cr); - } - - gl_debug (DEBUG_PATH, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Create round label path */ -/*--------------------------------------------------------------------------*/ -static void -gl_cairo_round_label_path (cairo_t *cr, - lglTemplate *template, - gboolean rotate_flag, - gboolean waste_flag) -{ - const lglTemplateFrame *frame; - gdouble w, h; - gdouble waste; - - gl_debug (DEBUG_PATH, "START"); - - frame = (lglTemplateFrame *)template->frames->data; - - if (rotate_flag) - { - lgl_template_frame_get_size (frame, &h, &w); - } - else - { - lgl_template_frame_get_size (frame, &w, &h); - } - - if (waste_flag) - { - waste = frame->round.waste; - } - else - { - waste = 0.0; - } - - cairo_arc (cr, w/2, h/2, w/2+waste, 0.0, 2*G_PI); - cairo_close_path (cr); - - gl_debug (DEBUG_PATH, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Create cd label path */ -/*--------------------------------------------------------------------------*/ -static void -gl_cairo_cd_label_path (cairo_t *cr, - lglTemplate *template, - gboolean rotate_flag, - gboolean waste_flag) -{ - const lglTemplateFrame *frame; - gdouble w, h; - gdouble xc, yc; - gdouble r1, r2; - gdouble theta1, theta2; - gdouble waste; - - gl_debug (DEBUG_PATH, "START"); - - frame = (lglTemplateFrame *)template->frames->data; - - if (rotate_flag) - { - lgl_template_frame_get_size (frame, &h, &w); - } - else - { - lgl_template_frame_get_size (frame, &w, &h); - } - - xc = w/2.0; - yc = h/2.0; - - r1 = frame->cd.r1; - r2 = frame->cd.r2; - - if (waste_flag) - { - waste = frame->cd.waste; - } - else - { - waste = 0.0; - } - - /* - * Outer path (may be clipped in the case of a business card type CD) - */ - theta1 = acos (w / (2.0*r1)); - theta2 = asin (h / (2.0*r1)); - - cairo_new_path (cr); - cairo_arc (cr, xc, yc, r1+waste, theta1, theta2); - cairo_arc (cr, xc, yc, r1+waste, G_PI-theta2, G_PI-theta1); - cairo_arc (cr, xc, yc, r1+waste, G_PI+theta1, G_PI+theta2); - cairo_arc (cr, xc, yc, r1+waste, 2*G_PI-theta2, 2*G_PI-theta1); - cairo_close_path (cr); - - - /* - * Inner path (hole) - */ - cairo_new_sub_path (cr); - cairo_arc (cr, xc, yc, r2-waste, 0.0, 2*G_PI); - cairo_close_path (cr); - - gl_debug (DEBUG_PATH, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/cairo-label-path.h b/glabels2/src/cairo-label-path.h deleted file mode 100644 index 9bb3c23d..00000000 --- a/glabels2/src/cairo-label-path.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * cairo-label-path.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __CAIRO_LABEL_PATH_H__ -#define __CAIRO_LABEL_PATH_H__ - -#include -#include - -G_BEGIN_DECLS - -void gl_cairo_label_path (cairo_t *cr, - lglTemplate *template, - gboolean rotate_flag, - gboolean waste_flag); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/cairo-markup-path.c b/glabels2/src/cairo-markup-path.c deleted file mode 100644 index 7a8bab38..00000000 --- a/glabels2/src/cairo-markup-path.c +++ /dev/null @@ -1,330 +0,0 @@ -/* - * cairo-markup-path.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "cairo-markup-path.h" - -#include - -#include "debug.h" - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_cairo_markup_margin_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label); - -static void gl_cairo_markup_margin_rect_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label); - -static void gl_cairo_markup_margin_round_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label); - -static void gl_cairo_markup_margin_cd_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label); - -static void gl_cairo_markup_line_path (cairo_t *cr, - const lglTemplateMarkup *markup); - -static void gl_cairo_markup_circle_path (cairo_t *cr, - const lglTemplateMarkup *markup); - -static void gl_cairo_markup_rect_path (cairo_t *cr, - const lglTemplateMarkup *markup); - - -/*--------------------------------------------------------------------------*/ -/* Create markup path */ -/*--------------------------------------------------------------------------*/ -void -gl_cairo_markup_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label) -{ - gl_debug (DEBUG_PATH, "START"); - - switch (markup->type) { - case LGL_TEMPLATE_MARKUP_MARGIN: - gl_cairo_markup_margin_path (cr, markup, label); - break; - case LGL_TEMPLATE_MARKUP_LINE: - gl_cairo_markup_line_path (cr, markup); - break; - case LGL_TEMPLATE_MARKUP_CIRCLE: - gl_cairo_markup_circle_path (cr, markup); - break; - case LGL_TEMPLATE_MARKUP_RECT: - gl_cairo_markup_rect_path (cr, markup); - break; - default: - g_message ("Unknown template markup type"); - break; - } - - gl_debug (DEBUG_PATH, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw margin markup. */ -/*---------------------------------------------------------------------------*/ -static void -gl_cairo_markup_margin_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label) -{ - const lglTemplateFrame *frame; - - gl_debug (DEBUG_PATH, "START"); - - frame = (lglTemplateFrame *)label->template->frames->data; - - switch (frame->shape) { - - case LGL_TEMPLATE_FRAME_SHAPE_RECT: - gl_cairo_markup_margin_rect_path (cr, markup, label); - break; - - case LGL_TEMPLATE_FRAME_SHAPE_ROUND: - gl_cairo_markup_margin_round_path (cr, markup, label); - break; - - case LGL_TEMPLATE_FRAME_SHAPE_CD: - gl_cairo_markup_margin_cd_path (cr, markup, label); - break; - - default: - g_message ("Unknown template label style"); - break; - } - - gl_debug (DEBUG_PATH, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw simple recangular margin. */ -/*---------------------------------------------------------------------------*/ -static void -gl_cairo_markup_margin_rect_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label) -{ - const lglTemplateFrame *frame; - gdouble w, h, r, m; - - gl_debug (DEBUG_PATH, "START"); - - frame = (lglTemplateFrame *)label->template->frames->data; - - m = markup->margin.size; - - lgl_template_frame_get_size (frame, &w, &h); - w = w - 2*m; - h = h - 2*m; - r = MAX (frame->rect.r - m, 0.0); - - if ( r == 0.0 ) - { - cairo_rectangle (cr, m, m, w, h); - } - else - { - cairo_new_path (cr); - cairo_arc_negative (cr, m+r, m+r, r, 3*G_PI/2, G_PI); - cairo_arc_negative (cr, m+r, m+h-r, r, G_PI, G_PI/2); - cairo_arc_negative (cr, m+w-r, m+h-r, r, G_PI/2, 0.); - cairo_arc_negative (cr, m+w-r, m+r, r, 2*G_PI, 3*G_PI/2); - cairo_close_path (cr); - } - - gl_debug (DEBUG_PATH, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw round margin. */ -/*---------------------------------------------------------------------------*/ -static void -gl_cairo_markup_margin_round_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label) -{ - const lglTemplateFrame *frame; - gdouble r, m; - - gl_debug (DEBUG_PATH, "START"); - - frame = (lglTemplateFrame *)label->template->frames->data; - - r = frame->round.r; - m = markup->margin.size; - - cairo_arc (cr, r, r, r-m, 0, 2*G_PI); - cairo_close_path (cr); - - gl_debug (DEBUG_PATH, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw CD margins. */ -/*---------------------------------------------------------------------------*/ -static void -gl_cairo_markup_margin_cd_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label) -{ - const lglTemplateFrame *frame; - gdouble m, r1, r2; - gdouble theta1, theta2; - gdouble xc, yc; - gdouble w, h; - - gl_debug (DEBUG_PATH, "START"); - - frame = (lglTemplateFrame *)label->template->frames->data; - - lgl_template_frame_get_size (frame, &w, &h); - xc = w/2.0; - yc = h/2.0; - - m = markup->margin.size; - r1 = frame->cd.r1 - m; - r2 = frame->cd.r2 + m; - - - /* - * Outer path (may be clipped) - */ - theta1 = acos ((w-2*m) / (2.0*r1)); - theta2 = asin ((h-2*m) / (2.0*r1)); - - cairo_new_path (cr); - cairo_arc (cr, xc, yc, r1, theta1, theta2); - cairo_arc (cr, xc, yc, r1, G_PI-theta2, G_PI-theta1); - cairo_arc (cr, xc, yc, r1, G_PI+theta1, G_PI+theta2); - cairo_arc (cr, xc, yc, r1, 2*G_PI-theta2, 2*G_PI-theta1); - cairo_close_path (cr); - - - /* Inner path (hole) */ - cairo_new_sub_path (cr); - cairo_arc (cr, xc, yc, r2, 0.0, 2*G_PI); - cairo_close_path (cr); - - gl_debug (DEBUG_PATH, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw line markup. */ -/*---------------------------------------------------------------------------*/ -static void -gl_cairo_markup_line_path (cairo_t *cr, - const lglTemplateMarkup *markup) -{ - gl_debug (DEBUG_PATH, "START"); - - cairo_move_to (cr, markup->line.x1, markup->line.y1); - cairo_line_to (cr, markup->line.x2, markup->line.y2); - - gl_debug (DEBUG_PATH, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw circle markup. */ -/*---------------------------------------------------------------------------*/ -static void -gl_cairo_markup_circle_path (cairo_t *cr, - const lglTemplateMarkup *markup) -{ - gl_debug (DEBUG_PATH, "START"); - - cairo_arc (cr, - markup->circle.x0, markup->circle.y0, - markup->circle.r, - 0.0, 2*G_PI); - cairo_close_path (cr); - - gl_debug (DEBUG_PATH, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw rect markup. */ -/*---------------------------------------------------------------------------*/ -static void -gl_cairo_markup_rect_path (cairo_t *cr, - const lglTemplateMarkup *markup) -{ - gdouble x1 = markup->rect.x1; - gdouble y1 = markup->rect.y1; - gdouble w = markup->rect.w; - gdouble h = markup->rect.h; - gdouble r = markup->rect.r; - - gl_debug (DEBUG_PATH, "START"); - - if ( r == 0.0 ) - { - cairo_rectangle (cr, x1, y1, w, h); - } - else - { - cairo_new_path (cr); - cairo_arc_negative (cr, x1+r, y1+r, r, 3*G_PI/2, G_PI); - cairo_arc_negative (cr, x1+r, y1+h-r, r, G_PI, G_PI/2); - cairo_arc_negative (cr, x1+w-r, y1+h-r, r, G_PI/2, 0.); - cairo_arc_negative (cr, x1+w-r, y1+r, r, 2*G_PI, 3*G_PI/2); - cairo_close_path (cr); - } - - gl_debug (DEBUG_PATH, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/cairo-markup-path.h b/glabels2/src/cairo-markup-path.h deleted file mode 100644 index 3f375b20..00000000 --- a/glabels2/src/cairo-markup-path.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * cairo-markup-path.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __CAIRO_MARKUP_PATH_H__ -#define __CAIRO_MARKUP_PATH_H__ - -#include -#include -#include "label.h" - -G_BEGIN_DECLS - -void gl_cairo_markup_path (cairo_t *cr, - const lglTemplateMarkup *markup, - glLabel *label); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-combo-button.c b/glabels2/src/color-combo-button.c deleted file mode 100644 index 65461be2..00000000 --- a/glabels2/src/color-combo-button.c +++ /dev/null @@ -1,426 +0,0 @@ -/* - * color-combo-button.c - * Copyright (C) 2008-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "color-combo-button.h" - -#include -#include - -#include "color-combo-menu.h" -#include "color-swatch.h" -#include "color.h" -#include "marshal.h" - -#define IMAGE_W 24 -#define IMAGE_H 24 - -#define SWATCH_H 5 - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -/** GL_COLOR_COMBO_BUTTON Private fields */ -struct _glColorComboButtonPrivate { - - guint color; - gboolean is_default_flag; - - guint default_color; - - GtkWidget *button; - GtkWidget *button_vbox; - GtkWidget *swatch; - GtkWidget *dropdown_button; - - GtkWidget *menu; -}; - -enum { - COLOR_CHANGED, - LAST_SIGNAL -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static guint signals[LAST_SIGNAL] = {0}; - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void -gl_color_combo_button_finalize (GObject *object); - -static void -button_clicked_cb (glColorComboButton *this); - -static gboolean -dropdown_button_press_event_cb (GtkWidget *widget, - GdkEventButton *event, - glColorComboButton *this); - -static void -menu_color_changed_cb (glColorComboMenu *object, - guint color, - gboolean is_default, - glColorComboButton *this); - -static void -menu_selection_done_cb (GtkMenuShell *object, - glColorComboButton *this); - - -/*****************************************************************************/ -/* Object infrastructure. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glColorComboButton, gl_color_combo_button, GTK_TYPE_HBOX); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_button_class_init (glColorComboButtonClass *class) -{ - GObjectClass *gobject_class = (GObjectClass *) class; - - gl_color_combo_button_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_color_combo_button_finalize; - - signals[COLOR_CHANGED] = - g_signal_new ("color_changed", - G_OBJECT_CLASS_TYPE (gobject_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glColorComboButtonClass, color_changed), - NULL, NULL, - gl_marshal_VOID__UINT_BOOLEAN, - G_TYPE_NONE, - 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); - -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_button_init (glColorComboButton *this) -{ - GtkWidget *arrow; - - gtk_box_set_spacing (GTK_BOX (this), 0); - - this->priv = g_new0 (glColorComboButtonPrivate, 1); - - this->priv->button_vbox = gtk_vbox_new (FALSE, 0); - - this->priv->button = gtk_toggle_button_new (); - gtk_container_add (GTK_CONTAINER (this->priv->button), this->priv->button_vbox); - gtk_button_set_focus_on_click (GTK_BUTTON (this->priv->button), FALSE); - g_signal_connect_swapped (this->priv->button, "clicked", - G_CALLBACK(button_clicked_cb), this); - - gtk_box_pack_start (GTK_BOX (this), this->priv->button, FALSE, FALSE, 0); - - this->priv->dropdown_button = gtk_toggle_button_new (); - arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN); - gtk_container_add (GTK_CONTAINER (this->priv->dropdown_button), arrow); - gtk_button_set_relief (GTK_BUTTON (this->priv->dropdown_button), GTK_RELIEF_NONE); - gtk_button_set_focus_on_click (GTK_BUTTON (this->priv->dropdown_button), FALSE); - g_signal_connect (this->priv->dropdown_button, "button_press_event", - G_CALLBACK(dropdown_button_press_event_cb), this); - - gtk_box_pack_start (GTK_BOX (this), this->priv->dropdown_button, FALSE, FALSE, 0); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_color_combo_button_finalize (GObject *object) -{ - glColorComboButton *this; - - g_return_if_fail (object && IS_GL_COLOR_COMBO_BUTTON (object)); - this = GL_COLOR_COMBO_BUTTON (object); - - g_object_ref_sink (this->priv->menu); - g_free (this->priv); - - G_OBJECT_CLASS (gl_color_combo_button_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_color_combo_button_new (GdkPixbuf *icon, - const gchar *default_label, - guint default_color, - guint color) -{ - glColorComboButton *this; - GdkPixbuf *pixbuf; - GtkWidget *wimage; - - this = g_object_new (TYPE_GL_COLOR_COMBO_BUTTON, NULL); - - if (!default_label) - { - default_label = _("Default Color"); - } - - this->priv->default_color = default_color; - this->priv->color = color; - - if (icon) - { - pixbuf = gdk_pixbuf_new_subpixbuf (icon, 0, 0, IMAGE_W, IMAGE_H-SWATCH_H); - wimage = gtk_image_new_from_pixbuf (pixbuf); - g_object_unref (G_OBJECT (pixbuf)); - gtk_box_pack_start (GTK_BOX (this->priv->button_vbox), wimage, FALSE, FALSE, 0); - - this->priv->swatch = gl_color_swatch_new (IMAGE_W, SWATCH_H, color); - } - else - { - this->priv->swatch = gl_color_swatch_new (IMAGE_W, IMAGE_H, color); - } - gtk_box_pack_start (GTK_BOX (this->priv->button_vbox), this->priv->swatch, FALSE, FALSE, 0); - - this->priv->menu = gl_color_combo_menu_new (default_label, color); - gtk_widget_show_all (this->priv->menu); - - g_signal_connect (this->priv->menu, "color_changed", - G_CALLBACK (menu_color_changed_cb), this); - g_signal_connect (this->priv->menu, "selection_done", - G_CALLBACK (menu_selection_done_cb), this); - - return GTK_WIDGET (this); -} - - -/*****************************************************************************/ -/* Set color. */ -/*****************************************************************************/ -void -gl_color_combo_button_set_color (glColorComboButton *this, - guint color) -{ - this->priv->color = color; - - gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), color); -} - - -/*****************************************************************************/ -/* Set to default color. */ -/*****************************************************************************/ -void -gl_color_combo_button_set_to_default (glColorComboButton *this) -{ - gl_color_combo_button_set_color (this, this->priv->default_color); -} - -/*****************************************************************************/ -/* Get color. */ -/*****************************************************************************/ -guint -gl_color_combo_button_get_color (glColorComboButton *this, - gboolean *is_default) -{ - if (is_default) - { - *is_default = this->priv->is_default_flag; - } - - return this->priv->color; -} - - -/*****************************************************************************/ -/** Set relief style. */ -/*****************************************************************************/ -void -gl_color_combo_button_set_relief( glColorComboButton *this, - GtkReliefStyle relief ) -{ - gtk_button_set_relief (GTK_BUTTON (this->priv->button), relief); -} - - -/*****************************************************************************/ -/* Color button "clicked" callback. */ -/*****************************************************************************/ -static void -button_clicked_cb( glColorComboButton *this ) -{ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->button), - FALSE); - - g_signal_emit (this, signals[COLOR_CHANGED], 0, - this->priv->color, - this->priv->is_default_flag); -} - - -/*****************************************************************************/ -/* Menu positioning function. */ -/*****************************************************************************/ -static void -menu_position_function (GtkMenu *menu, - gint *x, - gint *y, - gboolean *push_in, - gpointer user_data) -{ - glColorComboButton *this = GL_COLOR_COMBO_BUTTON (user_data); - gint x1, y1; - gint menu_h, menu_w; - - gdk_window_get_origin (GTK_WIDGET (this)->window, &x1, &y1); - *x = x1 + GTK_WIDGET (this)->allocation.x; - *y = y1 + GTK_WIDGET (this)->allocation.y + - GTK_WIDGET (this)->allocation.height; - - menu_h = this->priv->menu->allocation.height; - menu_w = this->priv->menu->allocation.width; - - if ((*y + menu_h) > gdk_screen_height ()) - { - *y = y1 + GTK_WIDGET (this)->allocation.y - menu_h; - if ( *y < 0 ) - { - *y = gdk_screen_height () - menu_h; - } - } - - if ((*x + menu_w) > gdk_screen_width ()) - { - *x = gdk_screen_width () - menu_w; - } - - *push_in = TRUE; -} - - -/*****************************************************************************/ -/* Dropdown button "button_press_event" callback. */ -/*****************************************************************************/ -static gboolean -dropdown_button_press_event_cb (GtkWidget *widget, - GdkEventButton *event, - glColorComboButton *this) -{ - switch (event->button) - { - - case 1: - g_signal_handlers_block_by_func (G_OBJECT (this->priv->button), - button_clicked_cb, this); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->button), - TRUE); - g_signal_handlers_unblock_by_func (G_OBJECT (this->priv->button), - button_clicked_cb, this); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->dropdown_button), - TRUE); - - gtk_menu_popup (GTK_MENU (this->priv->menu), - NULL, NULL, - menu_position_function, this, - event->button, event->time); - break; - - default: - break; - - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Menu "color changed" callback. */ -/*****************************************************************************/ -static void -menu_color_changed_cb (glColorComboMenu *object, - guint color, - gboolean is_default, - glColorComboButton *this) -{ - if (is_default) - { - this->priv->color = this->priv->default_color; - } - else - { - this->priv->color = color; - } - this->priv->is_default_flag = is_default; - - gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), - this->priv->color); - - g_signal_emit (this, signals[COLOR_CHANGED], 0, - this->priv->color, - this->priv->is_default_flag); -} - - -/*****************************************************************************/ -/* Menu "color changed" callback. */ -/*****************************************************************************/ -static void -menu_selection_done_cb (GtkMenuShell *object, - glColorComboButton *this) -{ - g_signal_handlers_block_by_func (G_OBJECT (this->priv->button), - button_clicked_cb, this); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->button), - FALSE); - g_signal_handlers_unblock_by_func (G_OBJECT (this->priv->button), - button_clicked_cb, this); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->dropdown_button), - FALSE); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-combo-button.h b/glabels2/src/color-combo-button.h deleted file mode 100644 index f5878476..00000000 --- a/glabels2/src/color-combo-button.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * color-combo-button.h - * Copyright (C) 2008-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __GL_COLOR_COMBO_BUTTON_H__ -#define __GL_COLOR_COMBO_BUTTON_H__ - - -#include - - -G_BEGIN_DECLS - -#define TYPE_GL_COLOR_COMBO_BUTTON (gl_color_combo_button_get_type ()) -#define GL_COLOR_COMBO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GL_COLOR_COMBO_BUTTON, glColorComboButton)) -#define GL_COLOR_COMBO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GL_COLOR_COMBO_BUTTON, glColorComboButtonClass)) -#define IS_GL_COLOR_COMBO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GL_COLOR_COMBO_BUTTON)) -#define IS_GL_COLOR_COMBO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GL_COLOR_COMBO_BUTTON)) -#define GL_COLOR_COMBO_BUTTON_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), TYPE_GL_COLOR_COMBO_BUTTON, glColorComboButtonClass)) - - -typedef struct _glColorComboButton glColorComboButton; -typedef struct _glColorComboButtonPrivate glColorComboButtonPrivate; -typedef struct _glColorComboButtonClass glColorComboButtonClass; - - -struct _glColorComboButton { - GtkHBox parent; - - glColorComboButtonPrivate *priv; -}; - -struct _glColorComboButtonClass { - GtkHBoxClass parent_class; - - /* - * Signals - */ - void (*color_changed) (glColorComboButton *object, - guint color, - gboolean is_default, - gpointer user_data); - -}; - - -GType gl_color_combo_button_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_color_combo_button_new (GdkPixbuf *icon, - const gchar *default_label, - guint default_color, - guint color); - -void gl_color_combo_button_set_color (glColorComboButton *this, - guint color); - -void gl_color_combo_button_set_to_default (glColorComboButton *this); - -guint gl_color_combo_button_get_color (glColorComboButton *this, - gboolean *is_default); - -void gl_color_combo_button_set_relief (glColorComboButton *this, - GtkReliefStyle relief); - - -G_END_DECLS - -#endif /* __GL_COLOR_COMBO_BUTTON_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-combo-color-menu-item.c b/glabels2/src/color-combo-color-menu-item.c deleted file mode 100644 index bdaca24a..00000000 --- a/glabels2/src/color-combo-color-menu-item.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * color-combo-color-menu-item.c - * Copyright (C) 2008 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "color-combo-color-menu-item.h" - -#include -#include - -#include "color-swatch.h" -#include "color.h" -#include "marshal.h" - - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - -#define SIZE 20 - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glColorComboColorMenuItemPrivate { - - gint id; - - GtkWidget *swatch; -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_color_combo_color_menu_item_finalize (GObject *object); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glColorComboColorMenuItem, gl_color_combo_color_menu_item, GTK_TYPE_MENU_ITEM); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_color_menu_item_class_init (glColorComboColorMenuItemClass *class) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (class); - - gl_color_combo_color_menu_item_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_color_combo_color_menu_item_finalize; -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_color_menu_item_init (glColorComboColorMenuItem *this) -{ - this->priv = g_new0 (glColorComboColorMenuItemPrivate, 1); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_color_combo_color_menu_item_finalize (GObject *object) -{ - glColorComboColorMenuItem *this = GL_COLOR_COMBO_COLOR_MENU_ITEM (object); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_COLOR_COMBO_COLOR_MENU_ITEM (object)); - - g_free (this->priv); - - G_OBJECT_CLASS (gl_color_combo_color_menu_item_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_color_combo_color_menu_item_new (gint id, - guint color, - const gchar *tip) -{ - glColorComboColorMenuItem *this; - - this = g_object_new (GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM, NULL); - - this->priv->id = id; - - this->priv->swatch = gl_color_swatch_new (SIZE, SIZE, color); - gtk_container_add (GTK_CONTAINER (this), this->priv->swatch); - - gtk_widget_set_tooltip_text (GTK_WIDGET (this), tip); - - return GTK_WIDGET (this); -} - - -/*****************************************************************************/ -/* Set color. */ -/*****************************************************************************/ -void -gl_color_combo_color_menu_item_set_color(glColorComboColorMenuItem *this, - gint id, - guint color, - const gchar *tip) -{ - this->priv->id = id; - - gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), color); - - gtk_widget_set_tooltip_text (GTK_WIDGET (this), tip); -} - - -/*****************************************************************************/ -/* Get id. */ -/*****************************************************************************/ -gint -gl_color_combo_color_menu_item_get_id (glColorComboColorMenuItem *this) -{ - return this->priv->id; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-combo-color-menu-item.h b/glabels2/src/color-combo-color-menu-item.h deleted file mode 100644 index 15d59353..00000000 --- a/glabels2/src/color-combo-color-menu-item.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * color-combo-color-menu-item.h - * Copyright (C) 2008 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __COLOR_COMBO_COLOR_MENU_ITEM_H__ -#define __COLOR_COMBO_COLOR_MENU_ITEM_H__ - - -#include - - -G_BEGIN_DECLS - -#define GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM (gl_color_combo_color_menu_item_get_type ()) -#define GL_COLOR_COMBO_COLOR_MENU_ITEM(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM, glColorComboColorMenuItem )) -#define GL_COLOR_COMBO_COLOR_MENU_ITEM_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM, glColorComboColorMenuItemClass)) -#define GL_IS_COLOR_COMBO_COLOR_MENU_ITEM(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM)) -#define GL_IS_COLOR_COMBO_COLOR_MENU_ITEM_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM)) - -typedef struct _glColorComboColorMenuItem glColorComboColorMenuItem; -typedef struct _glColorComboColorMenuItemPrivate glColorComboColorMenuItemPrivate; -typedef struct _glColorComboColorMenuItemClass glColorComboColorMenuItemClass; - -struct _glColorComboColorMenuItem { - GtkMenuItem parent_widget; - - glColorComboColorMenuItemPrivate *priv; -}; - -struct _glColorComboColorMenuItemClass { - GtkMenuItemClass parent_class; -}; - - -GType gl_color_combo_color_menu_item_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_color_combo_color_menu_item_new (gint id, - guint color, - const gchar *tip); - -gint gl_color_combo_color_menu_item_get_id (glColorComboColorMenuItem *this); - -void gl_color_combo_color_menu_item_set_color(glColorComboColorMenuItem *this, - gint id, - guint color, - const gchar *tip); - - -G_END_DECLS - -#endif /* __COLOR_COMBO_COLOR_MENU_ITEM_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-combo-history.c b/glabels2/src/color-combo-history.c deleted file mode 100644 index 31eacf49..00000000 --- a/glabels2/src/color-combo-history.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * color-combo-history.c - * Copyright (C) 2008 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "color-combo-history.h" - -#include "color.h" - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -/** GL_COLOR_COMBO_HISTORY Private fields */ -struct _glColorComboHistoryPrivate { - - guint max_n; - - guint n; - guint *color; -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_color_combo_history_finalize (GObject *object); - - -/*****************************************************************************/ -/* Object infrastructure. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glColorComboHistory, gl_color_combo_history, G_TYPE_OBJECT); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_history_class_init (glColorComboHistoryClass *class) -{ - GObjectClass *gobject_class = (GObjectClass *) class; - - gl_color_combo_history_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_color_combo_history_finalize; -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_history_init (glColorComboHistory *this) -{ - this->priv = g_new0 (glColorComboHistoryPrivate, 1); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_color_combo_history_finalize (GObject *object) -{ - glColorComboHistory *this; - - g_return_if_fail (object && IS_GL_COLOR_COMBO_HISTORY (object)); - this = GL_COLOR_COMBO_HISTORY (object); - - g_free (this->priv->color); - g_free (this->priv); - - G_OBJECT_CLASS (gl_color_combo_history_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -glColorComboHistory * -gl_color_combo_history_new (guint n) -{ - glColorComboHistory *this; - - this = g_object_new (TYPE_GL_COLOR_COMBO_HISTORY, NULL); - - this->priv->max_n = n; - this->priv->n = 0; - if (n > 0) - { - this->priv->color = g_new0 (guint, n); - } - - return this; -} - - -/*****************************************************************************/ -/* Add color to history. */ -/*****************************************************************************/ -void -gl_color_combo_history_add_color (glColorComboHistory *this, - guint color) -{ - guint i; - - /* - * First check for duplicate color. - */ - for ( i=0; i < this->priv->n; i++ ) - { - if ( this->priv->color[i] == color ) - { - return; - } - } - - /* - * Simple case. - */ - if ( this->priv->n < this->priv->max_n ) - { - this->priv->color[ this->priv->n ] = color; - this->priv->n++; - - return; - } - - /* Move colors down, dropping oldest. */ - for ( i=0; i < (this->priv->n - 1); i++ ) - { - this->priv->color[i] = this->priv->color[i+1]; - } - this->priv->color[ this->priv->n - 1 ] = color; -} - -/*****************************************************************************/ -/* Get color. */ -/*****************************************************************************/ -guint -gl_color_combo_history_get_color (glColorComboHistory *this, - guint i) -{ - return this->priv->color[i]; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-combo-history.h b/glabels2/src/color-combo-history.h deleted file mode 100644 index a5439a39..00000000 --- a/glabels2/src/color-combo-history.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * color-combo-history.h - * Copyright (C) 2008 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __GL_COLOR_COMBO_HISTORY_H__ -#define __GL_COLOR_COMBO_HISTORY_H__ - - -#include - - -G_BEGIN_DECLS - -/* Utility Macros */ -#define TYPE_GL_COLOR_COMBO_HISTORY (gl_color_combo_history_get_type ()) -#define GL_COLOR_COMBO_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GL_COLOR_COMBO_HISTORY, glColorComboHistory)) -#define GL_COLOR_COMBO_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GL_COLOR_COMBO_HISTORY, glColorComboHistoryClass)) -#define IS_GL_COLOR_COMBO_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GL_COLOR_COMBO_HISTORY)) -#define IS_GL_COLOR_COMBO_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GL_COLOR_COMBO_HISTORY)) -#define GL_COLOR_COMBO_HISTORY_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), TYPE_GL_COLOR_COMBO_HISTORY, glColorComboHistoryClass)) - - -/* Type definitions */ -typedef struct _glColorComboHistory glColorComboHistory; -typedef struct _glColorComboHistoryPrivate glColorComboHistoryPrivate; -typedef struct _glColorComboHistoryClass glColorComboHistoryClass; - - -/** GL_COLOR_COMBO_HISTORY Object */ -struct _glColorComboHistory { - GObject parent; - - glColorComboHistoryPrivate *priv; -}; - -/** GL_COLOR_COMBO_HISTORY Class */ -struct _glColorComboHistoryClass { - GObjectClass parent_class; -}; - - -GType gl_color_combo_history_get_type (void) G_GNUC_CONST; - -glColorComboHistory *gl_color_combo_history_new (guint n); - -void gl_color_combo_history_add_color (glColorComboHistory *this, - guint color); - -guint gl_color_combo_history_get_color (glColorComboHistory *this, - guint i); - - -G_END_DECLS - -#endif /* __GL_COLOR_COMBO_HISTORY_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-combo-menu.c b/glabels2/src/color-combo-menu.c deleted file mode 100644 index d24a233b..00000000 --- a/glabels2/src/color-combo-menu.c +++ /dev/null @@ -1,452 +0,0 @@ -/* - * color-combo-menu.c - * Copyright (C) 2008 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "color-combo-menu.h" - -#include -#include - -#include "color-combo-color-menu-item.h" -#include "color-combo-history.h" -#include "color.h" -#include "marshal.h" - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - -#define PALETTE_COLS 7 -#define PALETTE_ROWS (G_N_ELEMENTS(color_table)/PALETTE_COLS + (G_N_ELEMENTS(color_table)%PALETTE_COLS ? 1 : 0)) - -#define ROW_DEFAULT (0) -#define ROW_SEP_1 (ROW_DEFAULT + 1) -#define ROW_PALETTE (ROW_SEP_1 + 1) -#define ROW_SEP_2 (ROW_PALETTE + PALETTE_ROWS) -#define ROW_HISTORY (ROW_SEP_2 + 1) -#define ROW_SEP_3 (ROW_HISTORY + 1) -#define ROW_CUSTOM (ROW_SEP_3 + 1) - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glColorComboMenuPrivate { - - GtkWidget *default_menu_item; - GtkWidget *custom_menu_item; - - GtkWidget *history_menu_item[PALETTE_COLS]; - - guint color; -}; - -enum { - COLOR_CHANGED, - LAST_SIGNAL -}; - -typedef struct { - guint color; - gchar *name; -} ColorTableEntry; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static guint signals[LAST_SIGNAL] = {0}; - -static ColorTableEntry color_table[] = -{ - - { GL_COLOR (139, 0, 0), N_("Dark Red") }, - { GL_COLOR (165, 42, 42), N_("Brown") }, - { GL_COLOR (205, 149, 12), N_("Dark Goldenrod") }, - { GL_COLOR ( 0, 100, 0), N_("Dark Green") }, - { GL_COLOR ( 0, 139, 139), N_("Dark Cyan") }, - { GL_COLOR ( 0, 0, 128), N_("Navy Blue") }, - { GL_COLOR (148, 0, 211), N_("Dark Violet") }, - - { GL_COLOR (255, 0, 0), N_("Red") }, - { GL_COLOR (255, 165, 0), N_("Orange") }, - { GL_COLOR (205, 205, 0), N_("Dark Yellow") }, - { GL_COLOR ( 0, 205, 0), N_("Medium green") }, - { GL_COLOR ( 64, 224, 208), N_("Turquoise") }, - { GL_COLOR ( 0, 0, 255), N_("Blue") }, - { GL_COLOR (160, 32, 240), N_("Purple") }, - - { GL_COLOR (250, 128, 114), N_("Salmon") }, - { GL_COLOR (255, 215, 0), N_("Gold") }, - { GL_COLOR (255, 255, 0), N_("Yellow") }, - { GL_COLOR ( 0, 255, 0), N_("Green") }, - { GL_COLOR ( 0, 255, 255), N_("Cyan") }, - { GL_COLOR (135, 206, 235), N_("SkyBlue") }, - { GL_COLOR (238, 130, 238), N_("Violet") }, - - { GL_COLOR (255, 192, 203), N_("Pink") }, - { GL_COLOR (255, 246, 143), N_("Khaki") }, - { GL_COLOR (255, 255, 224), N_("Light Yellow") }, - { GL_COLOR (144, 238, 144), N_("Light Green") }, - { GL_COLOR (224, 255, 255), N_("Light Cyan") }, - { GL_COLOR (198, 226, 255), N_("Slate Gray") }, - { GL_COLOR (216, 191, 216), N_("Thistle") }, - - { GL_COLOR (255, 255, 255), N_("White") }, - { GL_COLOR (230, 230, 230), N_("10% Gray") }, - { GL_COLOR (192, 192, 192), N_("25% Gray") }, - { GL_COLOR (153, 153, 153), N_("40% Gray") }, - { GL_COLOR (128, 128, 128), N_("50% Gray") }, - { GL_COLOR (102, 102, 102), N_("60% Gray") }, - { GL_COLOR ( 0, 0, 0), N_("Black") }, - -}; - -static glColorComboHistory *custom_color_history = NULL; - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_color_combo_menu_finalize (GObject *object); - -static void load_custom_color_history (glColorComboMenu *this); - -static gboolean map_event_cb (GtkWidget *widget, - GdkEventAny *event); - -static void default_menu_item_activate_cb (glColorComboMenu *this); -static void custom_menu_item_activate_cb (glColorComboMenu *this); - -static void palette_menu_item_activate_cb (GtkMenuItem *item, - glColorComboMenu *this); - -static void history_menu_item_activate_cb (GtkMenuItem *item, - glColorComboMenu *this); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glColorComboMenu, gl_color_combo_menu, GTK_TYPE_MENU); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_menu_class_init (glColorComboMenuClass *class) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (class); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); - - gl_color_combo_menu_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_color_combo_menu_finalize; - - widget_class->map_event = map_event_cb; - - signals[COLOR_CHANGED] = - g_signal_new ("color_changed", - G_OBJECT_CLASS_TYPE (gobject_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glColorComboMenuClass, color_changed), - NULL, NULL, - gl_marshal_VOID__UINT_BOOLEAN, - G_TYPE_NONE, - 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_menu_init (glColorComboMenu *this) -{ - GtkWidget *separator_menu_item; - gint i, i_row, i_col; - GtkWidget *palette_menu_item; - - - /* - * Initialize history, if needed. - */ - if ( !custom_color_history ) - { - custom_color_history = gl_color_combo_history_new (PALETTE_COLS); - } - - - this->priv = g_new0 (glColorComboMenuPrivate, 1); - - this->priv->default_menu_item = gtk_menu_item_new_with_label (""); - gtk_menu_attach (GTK_MENU (this), this->priv->default_menu_item, - 0, PALETTE_COLS, ROW_DEFAULT, ROW_DEFAULT+1); - - separator_menu_item = gtk_separator_menu_item_new (); - gtk_menu_attach (GTK_MENU (this), separator_menu_item, - 0, PALETTE_COLS, ROW_SEP_1, ROW_SEP_1+1); - - for ( i=0; i < G_N_ELEMENTS(color_table); i++ ) - { - - i_row = i / PALETTE_COLS; - i_col = i % PALETTE_COLS; - - palette_menu_item = gl_color_combo_color_menu_item_new (i, - color_table[i].color, - color_table[i].name); - g_signal_connect (palette_menu_item, "activate", - G_CALLBACK (palette_menu_item_activate_cb), this); - - gtk_menu_attach (GTK_MENU (this), palette_menu_item, - i_col, i_col+1, - ROW_PALETTE+i_row, ROW_PALETTE+i_row+1); - } - - separator_menu_item = gtk_separator_menu_item_new (); - gtk_menu_attach (GTK_MENU (this), separator_menu_item, - 0, PALETTE_COLS, ROW_SEP_2, ROW_SEP_2+1); - - for ( i=0; i < PALETTE_COLS; i++ ) - { - this->priv->history_menu_item[i] = - gl_color_combo_color_menu_item_new (i, 0, NULL); - gtk_widget_set_sensitive (this->priv->history_menu_item[i], FALSE); - g_signal_connect (this->priv->history_menu_item[i], "activate", - G_CALLBACK (history_menu_item_activate_cb), this); - gtk_menu_attach (GTK_MENU (this), this->priv->history_menu_item[i], - i, i+1, - ROW_HISTORY, ROW_HISTORY+1); - } - - separator_menu_item = gtk_separator_menu_item_new (); - gtk_menu_attach (GTK_MENU (this), separator_menu_item, - 0, PALETTE_COLS, ROW_SEP_3, ROW_SEP_3+1); - - this->priv->custom_menu_item = gtk_menu_item_new_with_label (_("Custom Color")); - gtk_menu_attach (GTK_MENU (this), this->priv->custom_menu_item, - 0, PALETTE_COLS, ROW_CUSTOM, ROW_CUSTOM+1); - - g_signal_connect_swapped (this->priv->default_menu_item, "activate", - G_CALLBACK (default_menu_item_activate_cb), this); - g_signal_connect_swapped (this->priv->custom_menu_item, "activate", - G_CALLBACK (custom_menu_item_activate_cb), this); - -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_color_combo_menu_finalize (GObject *object) -{ - glColorComboMenu *this = GL_COLOR_COMBO_MENU (object); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_COLOR_COMBO_MENU (object)); - - g_free (this->priv); - - G_OBJECT_CLASS (gl_color_combo_menu_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_color_combo_menu_new (const gchar *default_label, - guint color) -{ - glColorComboMenu *this; - - this = g_object_new (gl_color_combo_menu_get_type (), NULL); - - gtk_label_set_text ( GTK_LABEL (gtk_bin_get_child (GTK_BIN (this->priv->default_menu_item))), - default_label); - - this->priv->color = color; - - return GTK_WIDGET (this); -} - - -/*****************************************************************************/ -/* Load menu with custom color history. */ -/*****************************************************************************/ -static void -load_custom_color_history (glColorComboMenu *this) -{ - guint i; - guint color; - gchar *tip; - - for ( i=0; i < PALETTE_COLS; i++ ) - { - color = gl_color_combo_history_get_color (custom_color_history, i); - - if (color) - { - tip = g_strdup_printf (_("Custom Color #%u"), i+1); - - gl_color_combo_color_menu_item_set_color (GL_COLOR_COMBO_COLOR_MENU_ITEM (this->priv->history_menu_item[i]), - i, - color, - tip); - g_free (tip); - gtk_widget_set_sensitive (this->priv->history_menu_item[i], TRUE); - } - } -} - - -/*****************************************************************************/ -/* Map event callback. */ -/*****************************************************************************/ -static gboolean -map_event_cb (GtkWidget *widget, - GdkEventAny *event) -{ - glColorComboMenu *this = GL_COLOR_COMBO_MENU (widget); - - load_custom_color_history (this); - - return FALSE; -} - - -/*****************************************************************************/ -/* "Default" menu_item activate callback. */ -/*****************************************************************************/ -static void -default_menu_item_activate_cb (glColorComboMenu *this) -{ - g_signal_emit (this, signals[COLOR_CHANGED], 0, - NULL, TRUE); - - gtk_widget_hide (GTK_WIDGET (this)); -} - - -/*****************************************************************************/ -/* "Custom color" menu_item activate callback. */ -/*****************************************************************************/ -static void -custom_menu_item_activate_cb (glColorComboMenu *this) -{ - GtkWidget *custom_dialog; - GtkWidget *colorsel; - gint response; - GdkColor color; - - gtk_widget_hide (GTK_WIDGET (this)); - - custom_dialog = gtk_color_selection_dialog_new (_("Custom Color")); - - colorsel = GTK_COLOR_SELECTION_DIALOG (custom_dialog)->colorsel; - color.red = GL_COLOR_F_RED (this->priv->color) * 65535; - color.green = GL_COLOR_F_GREEN (this->priv->color) * 65535; - color.blue = GL_COLOR_F_BLUE (this->priv->color) * 65535; - - gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (colorsel), - &color); - - response = gtk_dialog_run (GTK_DIALOG (custom_dialog)); - - switch (response) { - - case GTK_RESPONSE_OK: - gtk_color_selection_get_current_color (GTK_COLOR_SELECTION (colorsel), - &color); - this->priv->color = GL_COLOR ((color.red >>8), - (color.green >>8), - (color.blue >>8)); - - gl_color_combo_history_add_color (custom_color_history, - this->priv->color); - - g_signal_emit (this, signals[COLOR_CHANGED], 0, - this->priv->color, FALSE); - - gtk_widget_destroy (custom_dialog); - break; - default: - gtk_widget_destroy (custom_dialog); - break; - } -} - - -/*****************************************************************************/ -/* Palette color changed callback. */ -/*****************************************************************************/ -static void -palette_menu_item_activate_cb (GtkMenuItem *item, - glColorComboMenu *this) -{ - gint i; - - i = gl_color_combo_color_menu_item_get_id (GL_COLOR_COMBO_COLOR_MENU_ITEM (item)); - - this->priv->color = color_table[i].color; - - g_signal_emit (this, signals[COLOR_CHANGED], 0, - this->priv->color, FALSE); - - gtk_widget_hide (GTK_WIDGET (this)); -} - -/*****************************************************************************/ -/* History color menu item callback. */ -/*****************************************************************************/ -static void -history_menu_item_activate_cb (GtkMenuItem *item, - glColorComboMenu *this) -{ - gint i; - - i = gl_color_combo_color_menu_item_get_id (GL_COLOR_COMBO_COLOR_MENU_ITEM (item)); - - this->priv->color = gl_color_combo_history_get_color (custom_color_history, - i); - - g_signal_emit (this, signals[COLOR_CHANGED], 0, - this->priv->color, FALSE); - - gtk_widget_hide (GTK_WIDGET (this)); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-combo-menu.h b/glabels2/src/color-combo-menu.h deleted file mode 100644 index e309e0a0..00000000 --- a/glabels2/src/color-combo-menu.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * color-combo-menu.h - * Copyright (C) 2008 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __COLOR_COMBO_MENU_H__ -#define __COLOR_COMBO_MENU_H__ - -#include - - -G_BEGIN_DECLS - -#define GL_TYPE_COLOR_COMBO_MENU (gl_color_combo_menu_get_type ()) -#define GL_COLOR_COMBO_MENU(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_COLOR_COMBO_MENU, glColorComboMenu )) -#define GL_COLOR_COMBO_MENU_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_COLOR_COMBO_MENU, glColorComboMenuClass)) -#define GL_IS_COLOR_COMBO_MENU(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_COLOR_COMBO_MENU)) -#define GL_IS_COLOR_COMBO_MENU_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_COLOR_COMBO_MENU)) - -typedef struct _glColorComboMenu glColorComboMenu; -typedef struct _glColorComboMenuPrivate glColorComboMenuPrivate; -typedef struct _glColorComboMenuClass glColorComboMenuClass; - -struct _glColorComboMenu { - GtkMenu parent_widget; - - glColorComboMenuPrivate *priv; -}; - -struct _glColorComboMenuClass { - GtkMenuClass parent_class; - - /* - * Signals - */ - void (*color_changed) (glColorComboMenu *object, - guint color, - gboolean is_default, - gpointer user_data); - -}; - - -GType gl_color_combo_menu_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_color_combo_menu_new (const gchar *default_label, - guint color); - - -G_END_DECLS - - -#endif /* __COLOR_COMBO_MENU_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ - diff --git a/glabels2/src/color-combo.c b/glabels2/src/color-combo.c deleted file mode 100644 index 250292d4..00000000 --- a/glabels2/src/color-combo.c +++ /dev/null @@ -1,353 +0,0 @@ -/* - * color-combo.c - * Copyright (C) 2008-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "color-combo.h" - -#include -#include - -#include "color-combo-menu.h" -#include "color-swatch.h" -#include "color.h" -#include "marshal.h" - - -#define IMAGE_W 24 -#define IMAGE_H 24 - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -/** GL_COLOR_COMBO Private fields */ -struct _glColorComboPrivate { - - guint color; - gboolean is_default_flag; - - guint default_color; - - GtkWidget *swatch; - - GtkWidget *menu; -}; - -enum { - COLOR_CHANGED, - LAST_SIGNAL -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static guint signals[LAST_SIGNAL] = {0}; - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_color_combo_finalize (GObject *object); - -static gboolean -button_press_event_cb (GtkWidget *widget, - GdkEventButton *event, - glColorCombo *this); - -static void -menu_color_changed_cb (glColorComboMenu *object, - guint color, - gboolean is_default, - glColorCombo *this); - -static void -menu_selection_done_cb (GtkMenuShell *object, - glColorCombo *this); - - -/*****************************************************************************/ -/* Object infrastructure. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glColorCombo, gl_color_combo, GTK_TYPE_TOGGLE_BUTTON); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_class_init (glColorComboClass *class) -{ - GObjectClass *gobject_class = (GObjectClass *) class; - - gl_color_combo_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_color_combo_finalize; - - signals[COLOR_CHANGED] = - g_signal_new ("color_changed", - G_OBJECT_CLASS_TYPE (gobject_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glColorComboClass, color_changed), - NULL, NULL, - gl_marshal_VOID__UINT_BOOLEAN, - G_TYPE_NONE, - 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); - -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_color_combo_init (glColorCombo *this) -{ - GtkWidget *hbox; - GtkWidget *arrow; - - this->priv = g_new0 (glColorComboPrivate, 1); - - hbox = gtk_hbox_new (FALSE, 3); - gtk_container_add (GTK_CONTAINER (this), hbox); - - this->priv->swatch = gl_color_swatch_new (IMAGE_W, IMAGE_H, GL_COLOR_NONE); - gtk_box_pack_start (GTK_BOX (hbox), this->priv->swatch, TRUE, TRUE, 0); - - arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN); - gtk_box_pack_end (GTK_BOX (hbox), arrow, FALSE, FALSE, 0); - - g_signal_connect (this, "button_press_event", - G_CALLBACK(button_press_event_cb), this); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_color_combo_finalize (GObject *object) -{ - glColorCombo *this; - - g_return_if_fail (object && IS_GL_COLOR_COMBO (object)); - this = GL_COLOR_COMBO (object); - - g_object_ref_sink (this->priv->menu); - g_free (this->priv); - - G_OBJECT_CLASS (gl_color_combo_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_color_combo_new (const gchar *default_label, - guint default_color, - guint color) -{ - glColorCombo *this; - - this = g_object_new (TYPE_GL_COLOR_COMBO, NULL); - - if (!default_label) - { - default_label = _("Default Color"); - } - - this->priv->default_color = default_color; - this->priv->color = color; - - gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), color); - - this->priv->menu = gl_color_combo_menu_new (default_label, - color); - gtk_widget_show_all (this->priv->menu); - - g_signal_connect (this->priv->menu, "color_changed", - G_CALLBACK (menu_color_changed_cb), this); - g_signal_connect (this->priv->menu, "selection_done", - G_CALLBACK (menu_selection_done_cb), this); - - return GTK_WIDGET (this); -} - - -/*****************************************************************************/ -/* Set color. */ -/*****************************************************************************/ -void -gl_color_combo_set_color (glColorCombo *this, - guint color) -{ - this->priv->color = color; - - gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), color); -} - - -/*****************************************************************************/ -/* Set to default color. */ -/*****************************************************************************/ -void -gl_color_combo_set_to_default (glColorCombo *this) -{ - gl_color_combo_set_color (this, this->priv->default_color); -} - -/*****************************************************************************/ -/* Get color. */ -/*****************************************************************************/ -guint -gl_color_combo_get_color (glColorCombo *this, - gboolean *is_default) -{ - if (is_default) - { - *is_default = this->priv->is_default_flag; - } - - return this->priv->color; -} - - -/*****************************************************************************/ -/* Menu positioning function. */ -/*****************************************************************************/ -static void -menu_position_function (GtkMenu *menu, - gint *x, - gint *y, - gboolean *push_in, - gpointer user_data) -{ - glColorCombo *this = GL_COLOR_COMBO (user_data); - gint x1, y1; - gint menu_h, menu_w; - - gdk_window_get_origin (GTK_WIDGET (this)->window, &x1, &y1); - *x = x1 + GTK_WIDGET (this)->allocation.x; - *y = y1 + GTK_WIDGET (this)->allocation.y + - GTK_WIDGET (this)->allocation.height; - - menu_h = this->priv->menu->allocation.height; - menu_w = this->priv->menu->allocation.width; - - if ((*y + menu_h) > gdk_screen_height ()) - { - *y = y1 + GTK_WIDGET (this)->allocation.y - menu_h; - if ( *y < 0 ) - { - *y = gdk_screen_height () - menu_h; - } - } - - if ((*x + menu_w) > gdk_screen_width ()) - { - *x = gdk_screen_width () - menu_w; - } - - *push_in = TRUE; -} - - -/*****************************************************************************/ -/* Button "button_press_event" callback. */ -/*****************************************************************************/ -static gboolean -button_press_event_cb (GtkWidget *widget, - GdkEventButton *event, - glColorCombo *this) -{ - switch (event->button) - { - - case 1: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this), TRUE); - - gtk_menu_popup (GTK_MENU (this->priv->menu), - NULL, NULL, - menu_position_function, this, - event->button, event->time); - break; - - default: - break; - - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Menu "color changed" callback. */ -/*****************************************************************************/ -static void -menu_color_changed_cb (glColorComboMenu *object, - guint color, - gboolean is_default, - glColorCombo *this) -{ - if (is_default) - { - this->priv->color = this->priv->default_color; - } - else - { - this->priv->color = color; - } - this->priv->is_default_flag = is_default; - - gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), - this->priv->color); - - g_signal_emit (this, signals[COLOR_CHANGED], 0, - this->priv->color, - this->priv->is_default_flag); -} - - -/*****************************************************************************/ -/* Menu "color changed" callback. */ -/*****************************************************************************/ -static void -menu_selection_done_cb (GtkMenuShell *object, - glColorCombo *this) -{ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this), FALSE); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-combo.h b/glabels2/src/color-combo.h deleted file mode 100644 index baa928d9..00000000 --- a/glabels2/src/color-combo.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * color-combo.h - * Copyright (C) 2008-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __GL_COLOR_COMBO_H__ -#define __GL_COLOR_COMBO_H__ - - -#include - - -G_BEGIN_DECLS - -#define TYPE_GL_COLOR_COMBO (gl_color_combo_get_type ()) -#define GL_COLOR_COMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GL_COLOR_COMBO, glColorCombo)) -#define GL_COLOR_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GL_COLOR_COMBO, glColorComboClass)) -#define IS_GL_COLOR_COMBO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GL_COLOR_COMBO)) -#define IS_GL_COLOR_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GL_COLOR_COMBO)) -#define GL_COLOR_COMBO_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), TYPE_GL_COLOR_COMBO, glColorComboClass)) - - -typedef struct _glColorCombo glColorCombo; -typedef struct _glColorComboPrivate glColorComboPrivate; -typedef struct _glColorComboClass glColorComboClass; - - -struct _glColorCombo { - GtkToggleButton parent; - - glColorComboPrivate *priv; -}; - -struct _glColorComboClass { - GtkToggleButtonClass parent_class; - - /* - * Signals - */ - void (*color_changed) (glColorCombo *object, - guint color, - gboolean is_default, - gpointer user_data); - -}; - - -GType gl_color_combo_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_color_combo_new (const gchar *default_label, - guint default_color, - guint color); - -void gl_color_combo_set_color (glColorCombo *this, - guint color); - -void gl_color_combo_set_to_default (glColorCombo *this); - -guint gl_color_combo_get_color (glColorCombo *this, - gboolean *is_default); - -void gl_color_combo_set_relief (glColorCombo *this, - GtkReliefStyle relief); - - -G_END_DECLS - -#endif /* __GL_COLOR_COMBO_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-swatch.c b/glabels2/src/color-swatch.c deleted file mode 100644 index ae71f1a7..00000000 --- a/glabels2/src/color-swatch.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * color-swatch.c - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "color-swatch.h" - -#include "color.h" -#include "marshal.h" - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glColorSwatchPrivate { - - guint color; - -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_color_swatch_finalize (GObject *object); - -static void style_set_cb (GtkWidget *widget, - GtkStyle *previous_style); - -static void redraw (glColorSwatch *this); - -static gboolean expose_event_cb (GtkWidget *widget, - GdkEventExpose *event); - -static void draw_swatch (glColorSwatch *this, - cairo_t *cr); - - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glColorSwatch, gl_color_swatch, GTK_TYPE_DRAWING_AREA); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_color_swatch_class_init (glColorSwatchClass *class) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (class); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); - - gl_color_swatch_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_color_swatch_finalize; - - widget_class->expose_event = expose_event_cb; - widget_class->style_set = style_set_cb; -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_color_swatch_init (glColorSwatch *this) -{ - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW); - - this->priv = g_new0 (glColorSwatchPrivate, 1); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_color_swatch_finalize (GObject *object) -{ - glColorSwatch *this = GL_COLOR_SWATCH (object); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_COLOR_SWATCH (object)); - - g_free (this->priv); - - G_OBJECT_CLASS (gl_color_swatch_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_color_swatch_new (gint w, - gint h, - guint color) -{ - glColorSwatch *this; - - this = g_object_new (GL_TYPE_COLOR_SWATCH, NULL); - - this->priv->color = color; - - gtk_widget_set_size_request (GTK_WIDGET (this), w, h); - - return GTK_WIDGET (this); -} - - -/*****************************************************************************/ -/* Set color. */ -/*****************************************************************************/ -void -gl_color_swatch_set_color (glColorSwatch *this, - guint color) -{ - this->priv->color = color; - - redraw (this); -} - - -/*--------------------------------------------------------------------------*/ -/* Style set handler (updates colors when style/theme changes). */ -/*--------------------------------------------------------------------------*/ -static void -style_set_cb (GtkWidget *widget, - GtkStyle *previous_style) -{ - redraw (GL_COLOR_SWATCH (widget)); -} - - -/*****************************************************************************/ -/* Request redraw. */ -/*****************************************************************************/ -static void -redraw (glColorSwatch *this) -{ - GdkRegion *region; - - if (GTK_WIDGET_REALIZED (GTK_WIDGET (this))) - { - /* redraw the cairo canvas forcing an expose event */ - region = gdk_drawable_get_clip_region (GTK_WIDGET (this)->window); - gdk_window_invalidate_region (GTK_WIDGET (this)->window, region, TRUE); - gdk_region_destroy (region); - } -} - - -/*****************************************************************************/ -/* "Expose event" callback. */ -/*****************************************************************************/ -static gboolean -expose_event_cb (GtkWidget *widget, - GdkEventExpose *event) -{ - cairo_t *cr; - - cr = gdk_cairo_create (widget->window); - - cairo_rectangle (cr, - event->area.x, event->area.y, - event->area.width, event->area.height); - cairo_clip (cr); - - cairo_translate (cr, widget->allocation.x, widget->allocation.y); - - draw_swatch (GL_COLOR_SWATCH (widget), cr); - - cairo_destroy (cr); - - return FALSE; -} - - -/*****************************************************************************/ -/* Draw swatch. */ -/*****************************************************************************/ -static void -draw_swatch (glColorSwatch *this, - cairo_t *cr) -{ - GtkStyle *style; - gdouble w, h; - guint fill_color, line_color; - - - cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); - - - w = GTK_WIDGET (this)->allocation.width; - h = GTK_WIDGET (this)->allocation.height; - - - style = gtk_widget_get_style (GTK_WIDGET (this)); - if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) ) - { - fill_color = this->priv->color; - line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); - } - else - { - fill_color = GL_COLOR_NONE; - line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_INSENSITIVE]); - } - - cairo_rectangle( cr, 0, 0, w-1, h-1 ); - - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); - cairo_fill_preserve( cr ); - - cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (line_color)); - cairo_set_line_width (cr, 1.0); - cairo_stroke (cr); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color-swatch.h b/glabels2/src/color-swatch.h deleted file mode 100644 index c6e05fb9..00000000 --- a/glabels2/src/color-swatch.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * color-swatch.h - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __COLOR_SWATCH_H__ -#define __COLOR_SWATCH_H__ - - -#include - - -G_BEGIN_DECLS - -#define GL_TYPE_COLOR_SWATCH (gl_color_swatch_get_type ()) -#define GL_COLOR_SWATCH(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_COLOR_SWATCH, glColorSwatch )) -#define GL_COLOR_SWATCH_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_COLOR_SWATCH, glColorSwatchClass)) -#define GL_IS_COLOR_SWATCH(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_COLOR_SWATCH)) -#define GL_IS_COLOR_SWATCH_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_COLOR_SWATCH)) - -typedef struct _glColorSwatch glColorSwatch; -typedef struct _glColorSwatchPrivate glColorSwatchPrivate; -typedef struct _glColorSwatchClass glColorSwatchClass; - -struct _glColorSwatch { - GtkDrawingArea parent_widget; - - glColorSwatchPrivate *priv; -}; - -struct _glColorSwatchClass { - GtkDrawingAreaClass parent_class; -}; - - -GType gl_color_swatch_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_color_swatch_new (gint w, - gint h, - guint color); - -void gl_color_swatch_set_color(glColorSwatch *this, - guint color); - - -G_END_DECLS - -#endif /* __COLOR_SWATCH_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color.c b/glabels2/src/color.c deleted file mode 100644 index 2a87c9e1..00000000 --- a/glabels2/src/color.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * color.c - * Copyright (C) 2002-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "color.h" - -#include - - -/*****************************************************************************/ -/* Apply given opacity to given color. */ -/*****************************************************************************/ -guint -gl_color_set_opacity (guint color, - gdouble opacity) -{ - guint new_color; - - new_color = (color & 0xFFFFFF00) | (((guint)(255.0*opacity)) & 0xFF); - - return new_color; -} - - -/*****************************************************************************/ -/* Resolve actual shadow color by adjusting opacity. */ -/*****************************************************************************/ -guint -gl_color_shadow (guint base_color, - gdouble opacity, - guint object_color) -{ - guint color; - - color = gl_color_set_opacity (base_color, - opacity * GL_COLOR_F_ALPHA (object_color)); - - return color; -} - - -/*****************************************************************************/ -/* Convert gLabels color into a GdkColor */ -/*****************************************************************************/ -GdkColor * -gl_color_to_gdk_color (guint color) -{ - GdkColor *gdk_color; - - gdk_color = g_new0 (GdkColor, 1); - - gdk_color->red = GL_COLOR_F_RED (color) * 65535; - gdk_color->green = GL_COLOR_F_GREEN (color) * 65535; - gdk_color->blue = GL_COLOR_F_BLUE (color) * 65535; - - return gdk_color; -} - - -/*****************************************************************************/ -/* Convert GdkColor into a gLabels color */ -/*****************************************************************************/ -guint -gl_color_from_gdk_color (GdkColor *gdk_color) -{ - guint color; - - color = GL_COLOR ((gdk_color->red >>8), - (gdk_color->green >>8), - (gdk_color->blue >>8)); - - return color; -} - - -/****************************************************************************/ -/* Create a single color node with default color. */ -/****************************************************************************/ -glColorNode * -gl_color_node_new_default (void) -{ - glColorNode* color_node; - - color_node = g_new0(glColorNode,1); - - color_node->field_flag = FALSE; - color_node->color = GL_COLOR_NONE; - color_node->key = NULL; - - return color_node; -} - - -/****************************************************************************/ -/* Copy a single color node. */ -/****************************************************************************/ -glColorNode * -gl_color_node_dup (glColorNode *src) -{ - glColorNode *dst; - - if ( src == NULL ) return NULL; - - dst = g_new0 (glColorNode, 1); - - dst->field_flag = src->field_flag; - if (src->key != NULL) - { - dst->key = g_strdup (src->key); - } - else - { - dst->key = NULL; - } - dst->color = src->color; - - return dst; -} - - -/****************************************************************************/ -/* Compare 2 color nodes for equality. */ -/****************************************************************************/ -gboolean -gl_color_node_equal (glColorNode *color_node1, - glColorNode *color_node2) -{ - /* First take care of the case of either or both being NULL. */ - if ( color_node1 == NULL ) - { - return ( color_node2 == NULL ); - } - else - { - if ( color_node2 == NULL ) - { - return FALSE; - } - } - - /* Bail if field flags differ. */ - if ( color_node1->field_flag != color_node2->field_flag ) - { - return FALSE; - } - - /* Now take care of the case of either or both color fields being different. */ - if ( color_node1->color != color_node2->color ) - { - return FALSE; - } - - /* Then take care of the case of either or both key fields being NULL. */ - if ( color_node1->key == NULL ) - { - return ( color_node2->key == NULL ); - } - else - { - if ( color_node2->key == NULL ) - { - return FALSE; - } - } - - /* Field flags are identical, so now compare the keys. */ - return (strcmp (color_node1->key, color_node2->key) == 0); -} - - -/****************************************************************************/ -/* Expand single node into representative color. */ -/****************************************************************************/ -guint -gl_color_node_expand (glColorNode *color_node, - glMergeRecord *record) -{ - gchar *text; - GdkColor *gdk_color; - guint color; - - if (color_node->field_flag) - { - if (record == NULL) - { - return GL_COLOR_NONE; - } - else - { - text = gl_merge_eval_key (record, color_node->key); - if (text != NULL) - { - gdk_color = g_new0 (GdkColor, 1); - if (gdk_color_parse (text, gdk_color)) - { - color = gl_color_from_gdk_color (gdk_color); - g_free (gdk_color); - return color; - } - else - { - g_free (gdk_color); - return GL_COLOR_NONE; - } - } - else - { - return GL_COLOR_NONE; - } - } - } - else - { - return color_node->color; - } -} - - -/****************************************************************************/ -/* Free a single color node. */ -/****************************************************************************/ -void -gl_color_node_free (glColorNode **color_node) -{ - if ( *color_node == NULL ) return; - - g_free ((*color_node)->key); - (*color_node)->key = NULL; - g_free (*color_node); - *color_node = NULL; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/color.h b/glabels2/src/color.h deleted file mode 100644 index 48feed7e..00000000 --- a/glabels2/src/color.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * color.h - * Copyright (C) 2002-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __COLOR_H__ -#define __COLOR_H__ - -#include "merge.h" -#include - -G_BEGIN_DECLS - -/* - * gLabels stores colors as a 32-bit unsigned integer in RGBA format (MSByte = Red) - */ -#define GL_COLOR(r,g,b) ( (((unsigned int) (r) & 0xff) << 24) \ - | (((unsigned int) (g) & 0xff) << 16) \ - | (((unsigned int) (b) & 0xff) << 8) \ - | 0xff ) - -#define GL_COLOR_A(r,g,b,a) ( (((unsigned int) (r) & 0xff) << 24) \ - | (((unsigned int) (g) & 0xff) << 16) \ - | (((unsigned int) (b) & 0xff) << 8) \ - | ( (unsigned int) (a) & 0xff ) ) - - -#define GL_COLOR_NONE GL_COLOR_A(0,0,0,0) -#define GL_COLOR_BLACK GL_COLOR_A(0,0,0,255) -#define GL_COLOR_WHITE GL_COLOR_A(255,255,255,255) - -#define GL_COLOR_TEXT_DEFAULT GL_COLOR_BLACK -#define GL_COLOR_BC_DEFAULT GL_COLOR_BLACK -#define GL_COLOR_NO_LINE GL_COLOR_NONE -#define GL_COLOR_NO_FILL GL_COLOR_NONE -#define GL_COLOR_FILL_MERGE_DEFAULT GL_COLOR_A(255,255,255,128) -#define GL_COLOR_MERGE_DEFAULT GL_COLOR_A(0,0,0,128) -#define GL_COLOR_SHADOW_DEFAULT GL_COLOR(0,0,0) -#define GL_COLOR_SHADOW_MERGE_DEFAULT GL_COLOR_A(0,0,0,255) - - -/* - * Extract components as floating point (0.0 .. 1.0) - */ -#define GL_COLOR_F_RED(x) ( (((x)>>24) & 0xff) / 255.0 ) -#define GL_COLOR_F_GREEN(x) ( (((x)>>16) & 0xff) / 255.0 ) -#define GL_COLOR_F_BLUE(x) ( (((x)>>8) & 0xff) / 255.0 ) -#define GL_COLOR_F_ALPHA(x) ( ( (x) & 0xff) / 255.0 ) - -/* - * Extract arguments for cairo_set_source_rgb() - */ -#define GL_COLOR_RGB_ARGS(x) \ - GL_COLOR_F_RED(x), \ - GL_COLOR_F_GREEN(x), \ - GL_COLOR_F_BLUE(x) - -/* - * Extract arguments for cairo_set_source_rgba() - */ -#define GL_COLOR_RGBA_ARGS(x) \ - GL_COLOR_F_RED(x), \ - GL_COLOR_F_GREEN(x), \ - GL_COLOR_F_BLUE(x), \ - GL_COLOR_F_ALPHA(x) - - - - -guint gl_color_set_opacity (guint color, - gdouble opacity); - -guint gl_color_shadow (guint base_color, - gdouble opacity, - guint object_color); - -/* - * Routines to convert to/from GdkColor. - */ -GdkColor *gl_color_to_gdk_color (guint color); - -guint gl_color_from_gdk_color (GdkColor *gdk_color); - - - -/* - * Color nodes - */ -typedef struct { - gboolean field_flag; - guint color; - gchar *key; -} glColorNode; - -glColorNode *gl_color_node_new_default (void); - -glColorNode *gl_color_node_dup (glColorNode *color_node); -gboolean gl_color_node_equal (glColorNode *color_node1, - glColorNode *color_node2); -guint gl_color_node_expand (glColorNode *color_node, - glMergeRecord *record); -void gl_color_node_free (glColorNode **color_node); - - -G_END_DECLS - -#endif /* __COLOR_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/combo-util.c b/glabels2/src/combo-util.c deleted file mode 100644 index 0ca90f1f..00000000 --- a/glabels2/src/combo-util.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * combo-util.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "combo-util.h" - -#include - - -/****************************************************************************/ -/* Convienience function to set strings in a text combo_box from a GList */ -/****************************************************************************/ -void -gl_combo_util_set_strings (GtkComboBox *combo, - GList *list) -{ - GtkTreeModel *model; - GList *p; - - g_return_if_fail (list); - - model = gtk_combo_box_get_model(combo); - gtk_list_store_clear (GTK_LIST_STORE (model)); - - for (p=list; p!=NULL; p=p->next) { - if (p->data) { - gtk_combo_box_append_text (combo, p->data); - } - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. gl_combo_util_set_active_text support. */ -/*---------------------------------------------------------------------------*/ - -typedef struct { - const gchar *text; - GtkTreeIter iter; - gboolean found; -} TextSearchData; - -static gboolean -search_text_func (GtkTreeModel *model, - GtkTreePath *path, - GtkTreeIter *iter, - gpointer data) -{ - TextSearchData *search_data = (TextSearchData *)data; - gchar *text = NULL; - - gtk_tree_model_get (model, iter, 0, &text, -1); - - if (strcmp (text,search_data->text) == 0) { - search_data->found = TRUE; - search_data->iter = *iter; - } - - g_free (text); - - return FALSE; -} - - -/****************************************************************************/ -/* Convienience function to set active text in a text combo_box from text */ -/****************************************************************************/ -void -gl_combo_util_set_active_text (GtkComboBox *combo, - const gchar *text) -{ - GtkTreeModel *model = gtk_combo_box_get_model(combo); - - g_return_if_fail (GTK_IS_LIST_STORE (model)); - - if (!text) { - - gtk_combo_box_set_active (combo, -1); - - } else { - TextSearchData search_data; - - search_data.text = text; - search_data.found = FALSE; - - gtk_tree_model_foreach (model, search_text_func, &search_data); - if (search_data.found) { - gtk_combo_box_set_active_iter (combo, - &search_data.iter); - } else { - gtk_combo_box_set_active (combo, -1); - } - - } - -} - - -/****************************************************************************/ -/* Convienience function to add a simple text model to an existing */ -/* combo_box. This is needed since combo_boxes created with glade do not */ -/* use the gtk_combo_box_new_text() constructor. */ -/****************************************************************************/ -void -gl_combo_util_add_text_model (GtkComboBox *combo) -{ - GtkCellRenderer *cell; - GtkListStore *store; - - store = gtk_list_store_new (1, G_TYPE_STRING); - gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store)); - g_object_unref (store); - - cell = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); - gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, - "text", 0, - NULL); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/combo-util.h b/glabels2/src/combo-util.h deleted file mode 100644 index 2205b6f2..00000000 --- a/glabels2/src/combo-util.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * combo-util.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __COMBO_UTIL_H__ -#define __COMBO_UTIL_H__ - -#include -#include - -G_BEGIN_DECLS - -void gl_combo_util_set_strings (GtkComboBox *combo, - GList *list); - -void gl_combo_util_set_active_text (GtkComboBox *combo, - const gchar *text); - -void gl_combo_util_add_text_model (GtkComboBox *combo); - -G_END_DECLS - -#endif /* __COMBO_UTIL_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/critical-error-handler.c b/glabels2/src/critical-error-handler.c deleted file mode 100644 index 0d9fed1d..00000000 --- a/glabels2/src/critical-error-handler.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * critical-error-handler.h - * Copyright (C) 2005-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "critical-error-handler.h" - -#include -#include -#include -#include - - -static void critical_error_handler (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer user_data); - - -/***************************************************************************/ -/* Initialize error handler. */ -/***************************************************************************/ -void -gl_critical_error_handler_init (void) -{ - g_log_set_handler ("LibGlabels", - G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, - critical_error_handler, - "libglabels"); - - g_log_set_handler (G_LOG_DOMAIN, - G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, - critical_error_handler, - "glabels"); -} - - -/*-------------------------------------------------------------------------*/ -/* PRIVATE. Actual error handler. */ -/*-------------------------------------------------------------------------*/ -static void -critical_error_handler (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer user_data) -{ - GtkWidget *dialog; - - dialog = gtk_message_dialog_new (NULL, - GTK_DIALOG_MODAL, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_NONE, - _("gLabels Fatal Error!")); - gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), - "%s", message); - gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_QUIT, 0); - - gtk_dialog_run (GTK_DIALOG (dialog)); - - abort (); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/critical-error-handler.h b/glabels2/src/critical-error-handler.h deleted file mode 100644 index e356ebf2..00000000 --- a/glabels2/src/critical-error-handler.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * critical-error-handler.h - * Copyright (C) 2005-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __CRITICAL_ERROR_HANDLER_H__ -#define __CRITICAL_ERROR_HANDLER_H__ - -#include - -G_BEGIN_DECLS - -void gl_critical_error_handler_init (void); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/debug.c b/glabels2/src/debug.c deleted file mode 100644 index ce53820a..00000000 --- a/glabels2/src/debug.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * debug.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -/* - * This file is based on gedit-debug.c from gedit2: - * - * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence - * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi - * - */ - -#include "debug.h" - -#include - - -glDebugSection debug_flags = GLABELS_DEBUG_NONE; - - -/****************************************************************************/ -/* Initialize debug flags, based on environmental variables. */ -/****************************************************************************/ -void -gl_debug_init (void) -{ - if (g_getenv ("GLABELS_DEBUG") != NULL) - { - /* enable all debugging */ - debug_flags = ~GLABELS_DEBUG_NONE; - return; - } - - if (g_getenv ("GLABELS_DEBUG_VIEW") != NULL) - debug_flags |= GLABELS_DEBUG_VIEW; - if (g_getenv ("GLABELS_DEBUG_ITEM") != NULL) - debug_flags |= GLABELS_DEBUG_ITEM; - if (g_getenv ("GLABELS_DEBUG_PRINT") != NULL) - debug_flags |= GLABELS_DEBUG_PRINT; - if (g_getenv ("GLABELS_DEBUG_PREFS") != NULL) - debug_flags |= GLABELS_DEBUG_PREFS; - if (g_getenv ("GLABELS_DEBUG_FILE") != NULL) - debug_flags |= GLABELS_DEBUG_FILE; - if (g_getenv ("GLABELS_DEBUG_LABEL") != NULL) - debug_flags |= GLABELS_DEBUG_LABEL; - if (g_getenv ("GLABELS_DEBUG_TEMPLATE") != NULL) - debug_flags |= GLABELS_DEBUG_TEMPLATE; - if (g_getenv ("GLABELS_DEBUG_PAPER") != NULL) - debug_flags |= GLABELS_DEBUG_PAPER; - if (g_getenv ("GLABELS_DEBUG_XML") != NULL) - debug_flags |= GLABELS_DEBUG_XML; - if (g_getenv ("GLABELS_DEBUG_MERGE") != NULL) - debug_flags |= GLABELS_DEBUG_MERGE; - if (g_getenv ("GLABELS_DEBUG_UNDO") != NULL) - debug_flags |= GLABELS_DEBUG_UNDO; - if (g_getenv ("GLABELS_DEBUG_RECENT") != NULL) - debug_flags |= GLABELS_DEBUG_RECENT; - if (g_getenv ("GLABELS_DEBUG_COMMANDS") != NULL) - debug_flags |= GLABELS_DEBUG_COMMANDS; - if (g_getenv ("GLABELS_DEBUG_WINDOW") != NULL) - debug_flags |= GLABELS_DEBUG_WINDOW; - if (g_getenv ("GLABELS_DEBUG_UI") != NULL) - debug_flags |= GLABELS_DEBUG_UI; - if (g_getenv ("GLABELS_DEBUG_PROPERTY_BAR") != NULL) - debug_flags |= GLABELS_DEBUG_PROPERTY_BAR; - if (g_getenv ("GLABELS_DEBUG_MEDIA_SELECT") != NULL) - debug_flags |= GLABELS_DEBUG_MEDIA_SELECT; - if (g_getenv ("GLABELS_DEBUG_MINI_PREVIEW") != NULL) - debug_flags |= GLABELS_DEBUG_MINI_PREVIEW; - if (g_getenv ("GLABELS_DEBUG_PIXBUF_CACHE") != NULL) - debug_flags |= GLABELS_DEBUG_PIXBUF_CACHE; - if (g_getenv ("GLABELS_DEBUG_EDITOR") != NULL) - debug_flags |= GLABELS_DEBUG_EDITOR; - if (g_getenv ("GLABELS_DEBUG_WDGT") != NULL) - debug_flags |= GLABELS_DEBUG_WDGT; - if (g_getenv ("GLABELS_DEBUG_PATH") != NULL) - debug_flags |= GLABELS_DEBUG_PATH; - if (g_getenv ("GLABELS_DEBUG_MERGE_MENU") != NULL) - debug_flags |= GLABELS_DEBUG_MERGE_MENU; -} - - -/****************************************************************************/ -/* Print debugging information. */ -/****************************************************************************/ -void -gl_debug (glDebugSection section, - const gchar *file, - gint line, - const gchar *function, - const gchar *format, - ...) -{ - if (debug_flags & section) - { - va_list args; - gchar *msg; - - g_return_if_fail (format != NULL); - - va_start (args, format); - msg = g_strdup_vprintf (format, args); - va_end (args); - - g_print ("%s:%d (%s) %s\n", file, line, function, msg); - - g_free (msg); - } - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/debug.h b/glabels2/src/debug.h deleted file mode 100644 index 6dced6d4..00000000 --- a/glabels2/src/debug.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * debug.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -/* - * This file is based on gedit-debug.h from gedit2: - * - * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence - * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi - * - */ -#ifndef __DEBUG_H__ -#define __DEBUG_H__ - -#include - -G_BEGIN_DECLS - -/* - * Set an environmental var of the same name to turn on - * debugging output. Setting GLABELS_DEBUG will turn on all - * sections. - */ - -typedef enum { - GLABELS_DEBUG_NONE = 0, - GLABELS_DEBUG_VIEW = 1 << 0, - GLABELS_DEBUG_ITEM = 1 << 1, - GLABELS_DEBUG_PRINT = 1 << 2, - GLABELS_DEBUG_PREFS = 1 << 3, - GLABELS_DEBUG_FILE = 1 << 4, - GLABELS_DEBUG_LABEL = 1 << 5, - GLABELS_DEBUG_TEMPLATE = 1 << 6, - GLABELS_DEBUG_PAPER = 1 << 7, - GLABELS_DEBUG_XML = 1 << 8, - GLABELS_DEBUG_MERGE = 1 << 9, - GLABELS_DEBUG_UNDO = 1 << 10, - GLABELS_DEBUG_RECENT = 1 << 11, - GLABELS_DEBUG_COMMANDS = 1 << 12, - GLABELS_DEBUG_WINDOW = 1 << 13, - GLABELS_DEBUG_UI = 1 << 14, - GLABELS_DEBUG_PROPERTY_BAR = 1 << 15, - GLABELS_DEBUG_MEDIA_SELECT = 1 << 16, - GLABELS_DEBUG_MINI_PREVIEW = 1 << 17, - GLABELS_DEBUG_PIXBUF_CACHE = 1 << 18, - GLABELS_DEBUG_EDITOR = 1 << 19, - GLABELS_DEBUG_WDGT = 1 << 20, - GLABELS_DEBUG_PATH = 1 << 21, - GLABELS_DEBUG_MERGE_MENU = 1 << 22, -} glDebugSection; - - -#ifndef __GNUC__ -#define __FUNCTION__ "" -#endif - -#define DEBUG_VIEW GLABELS_DEBUG_VIEW, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_ITEM GLABELS_DEBUG_ITEM, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_PRINT GLABELS_DEBUG_PRINT, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_PREFS GLABELS_DEBUG_PREFS, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_FILE GLABELS_DEBUG_FILE, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_LABEL GLABELS_DEBUG_LABEL, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_TEMPLATE GLABELS_DEBUG_TEMPLATE,__FILE__, __LINE__, __FUNCTION__ -#define DEBUG_PAPER GLABELS_DEBUG_PAPER, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_XML GLABELS_DEBUG_XML, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_MERGE GLABELS_DEBUG_MERGE, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_UNDO GLABELS_DEBUG_UNDO, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_RECENT GLABELS_DEBUG_RECENT, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_COMMANDS GLABELS_DEBUG_COMMANDS,__FILE__, __LINE__, __FUNCTION__ -#define DEBUG_WINDOW GLABELS_DEBUG_WINDOW, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_UI GLABELS_DEBUG_UI, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_PROPERTY_BAR GLABELS_DEBUG_PROPERTY_BAR, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_MEDIA_SELECT GLABELS_DEBUG_MEDIA_SELECT, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_MINI_PREVIEW GLABELS_DEBUG_MINI_PREVIEW, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_PIXBUF_CACHE GLABELS_DEBUG_PIXBUF_CACHE, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_EDITOR GLABELS_DEBUG_EDITOR, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_WDGT GLABELS_DEBUG_WDGT, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_PATH GLABELS_DEBUG_PATH, __FILE__, __LINE__, __FUNCTION__ -#define DEBUG_MERGE_MENU GLABELS_DEBUG_MERGE_MENU, __FILE__, __LINE__, __FUNCTION__ - -void gl_debug_init (void); - -void gl_debug (glDebugSection section, - const gchar *file, - gint line, - const gchar *function, - const gchar *format, - ...); - -G_END_DECLS - -#endif /* __DEBUG_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/file-util.c b/glabels2/src/file-util.c deleted file mode 100644 index 684c7faa..00000000 --- a/glabels2/src/file-util.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * file-util.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "file-util.h" - -#include - - -/****************************************************************************/ -/* Append ".glabels" extension to filename if needed. */ -/****************************************************************************/ -gchar * -gl_file_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; -} - - -/****************************************************************************/ -/* Remove ".glabels" extension from filename if needed. */ -/****************************************************************************/ -gchar * -gl_file_util_remove_extension (const gchar *orig_filename) -{ - gchar *new_filename, *extension; - - new_filename = g_strdup (orig_filename); - - extension = strrchr (new_filename, '.'); - if (extension != NULL) { - if (g_strcasecmp (extension, ".glabels") == 0) { - *extension = 0; /* truncate string, rm extension */ - } - } - - return new_filename; -} - - -/****************************************************************************/ -/* Make sure we have an absolute path to filename. */ -/****************************************************************************/ -gchar * -gl_file_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_build_filename (pwd, filename, NULL); - g_free (pwd); - } - - return absolute_filename; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/file-util.h b/glabels2/src/file-util.h deleted file mode 100644 index 50c447c1..00000000 --- a/glabels2/src/file-util.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * file-util.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __FILE_UTIL_H__ -#define __FILE_UTIL_H__ - -#include - -G_BEGIN_DECLS - -gchar *gl_file_util_add_extension (const gchar *orig_filename); -gchar *gl_file_util_remove_extension (const gchar *orig_filename); - -gchar *gl_file_util_make_absolute (const gchar *filename); - -G_END_DECLS - -#endif /* __FILE_UTIL_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/file.c b/glabels2/src/file.c deleted file mode 100644 index 3f0c6336..00000000 --- a/glabels2/src/file.c +++ /dev/null @@ -1,860 +0,0 @@ -/* - * file.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "file.h" - -#include -#include -#include - -#include "xml-label.h" -#include "recent.h" -#include "file-util.h" -#include "window.h" -#include "new-label-dialog.h" -#include "libglabels/libglabels.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/* Saved state for new dialog */ -static gchar *page_size = NULL; -static gchar *category = 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 new_response (GtkDialog *dialog, - gint response, - gpointer user_data); - -static void properties_response (GtkDialog *dialog, - gint response, - gpointer user_data); - -static void open_response (GtkDialog *chooser, - gint response, - glWindow *window); -static void save_as_response (GtkDialog *chooser, - gint response, - glLabel *label); - - -/*****************************************************************************/ -/* "New" menu callback. */ -/*****************************************************************************/ -void -gl_file_new (glWindow *window) -{ - GtkWidget *dialog; - - gl_debug (DEBUG_FILE, "START"); - - g_return_if_fail (window && GTK_IS_WINDOW (window)); - - dialog = gl_new_label_dialog_new (GTK_WINDOW (window)); - gtk_window_set_title (GTK_WINDOW (dialog), _("New Label or Card")); - - g_object_set_data (G_OBJECT (dialog), "parent_window", window); - - g_signal_connect (G_OBJECT(dialog), "response", - G_CALLBACK (new_response), dialog); - - if (page_size != NULL) { - gl_new_label_dialog_set_filter_parameters (GL_NEW_LABEL_DIALOG (dialog), - page_size, - category); - } - if (sheet_name != NULL) { - gl_new_label_dialog_set_template_name (GL_NEW_LABEL_DIALOG (dialog), - sheet_name); - } - gl_new_label_dialog_set_rotate_state (GL_NEW_LABEL_DIALOG (dialog), rotate_flag); - - gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); - gtk_widget_show_all (GTK_WIDGET (dialog)); - - gl_debug (DEBUG_FILE, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. New "ok" button callback. */ -/*---------------------------------------------------------------------------*/ -static void -new_response (GtkDialog *dialog, - gint response, - gpointer user_data) -{ - lglTemplate *template; - glLabel *label; - glWindow *window; - GtkWidget *new_window; - - gl_debug (DEBUG_FILE, "START"); - - switch (response) { - - case GTK_RESPONSE_OK: - - gl_new_label_dialog_get_filter_parameters (GL_NEW_LABEL_DIALOG (dialog), - &page_size, - &category); - - if (sheet_name != NULL) - g_free (sheet_name); - sheet_name = - gl_new_label_dialog_get_template_name (GL_NEW_LABEL_DIALOG (dialog)); - - rotate_flag = - gl_new_label_dialog_get_rotate_state (GL_NEW_LABEL_DIALOG (dialog)); - - template = lgl_db_lookup_template_from_name (sheet_name); - - label = GL_LABEL(gl_label_new ()); - gl_label_set_template (label, template); - gl_label_set_rotate_flag (label, rotate_flag); - - lgl_template_free (template); - - window = - GL_WINDOW (g_object_get_data (G_OBJECT (dialog), - "parent_window")); - if ( gl_window_is_empty (window) ) { - gl_window_set_label (window, label); - } else { - new_window = gl_window_new_from_label (label); - gtk_widget_show_all (new_window); - } - - break; - - default: - break; - } - - gtk_widget_destroy (GTK_WIDGET (dialog)); - - gl_debug (DEBUG_FILE, "END"); -} - - -/*****************************************************************************/ -/* "Properties" menu callback. */ -/*****************************************************************************/ -void -gl_file_properties (glLabel *label, - glWindow *window) -{ - GtkWidget *dialog; - gchar *name; - - gl_debug (DEBUG_FILE, "START"); - - g_return_if_fail (label && GL_IS_LABEL (label)); - g_return_if_fail (window && GTK_IS_WINDOW (window)); - - dialog = gl_new_label_dialog_new (GTK_WINDOW (window)); - gtk_window_set_title (GTK_WINDOW (dialog), _("Label properties")); - - g_object_set_data (G_OBJECT (dialog), "label", label); - - g_signal_connect (G_OBJECT(dialog), "response", - G_CALLBACK (properties_response), dialog); - - if (label->template->paper_id != NULL) { - gl_new_label_dialog_set_filter_parameters (GL_NEW_LABEL_DIALOG (dialog), - label->template->paper_id, - NULL); - } - name = lgl_template_get_name (label->template); - if (name != NULL) { - gl_new_label_dialog_set_template_name (GL_NEW_LABEL_DIALOG (dialog), name); - } - g_free (name); - - gl_new_label_dialog_set_rotate_state (GL_NEW_LABEL_DIALOG (dialog), - label->rotate_flag); - - gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); - gtk_widget_show_all (GTK_WIDGET (dialog)); - - gl_debug (DEBUG_FILE, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Properties "ok" button callback. */ -/*---------------------------------------------------------------------------*/ -static void -properties_response (GtkDialog *dialog, - gint response, - gpointer user_data) -{ - lglTemplate *template; - glLabel *label; - - gl_debug (DEBUG_FILE, "START"); - - switch (response) { - - case GTK_RESPONSE_OK: - - gl_new_label_dialog_get_filter_parameters (GL_NEW_LABEL_DIALOG (dialog), - &page_size, - &category); - - if (sheet_name != NULL) - g_free (sheet_name); - sheet_name = - gl_new_label_dialog_get_template_name (GL_NEW_LABEL_DIALOG (dialog)); - - rotate_flag = - gl_new_label_dialog_get_rotate_state (GL_NEW_LABEL_DIALOG (dialog)); - - template = lgl_db_lookup_template_from_name (sheet_name); - - label = GL_LABEL(g_object_get_data (G_OBJECT (dialog), "label")); - gl_label_set_template (label, template); - gl_label_set_rotate_flag (label, rotate_flag); - - break; - - default: - break; - } - - gtk_widget_destroy (GTK_WIDGET (dialog)); - - gl_debug (DEBUG_FILE, "END"); -} - - -/*****************************************************************************/ -/* "Open" menu callback. */ -/*****************************************************************************/ -void -gl_file_open (glWindow *window) -{ - GtkWidget *chooser; - GtkFileFilter *filter; - - gl_debug (DEBUG_FILE, "START"); - - g_return_if_fail (window != NULL); - - chooser = gtk_file_chooser_dialog_new ("Open label", - GTK_WINDOW (window), - GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, - NULL); - - /* Recover state of open dialog */ - if (open_path != NULL) { - gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(chooser), - open_path); - } - - filter = gtk_file_filter_new (); - gtk_file_filter_add_pattern (filter, "*"); - gtk_file_filter_set_name (filter, _("All files")); - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); - - filter = gtk_file_filter_new (); - gtk_file_filter_add_pattern (filter, "*.glabels"); - gtk_file_filter_set_name (filter, _("gLabels documents")); - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); - - gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), filter); - - g_signal_connect (G_OBJECT (chooser), "response", - G_CALLBACK (open_response), window); - - /* show the dialog */ - gtk_widget_show (GTK_WIDGET (chooser)); - - gl_debug (DEBUG_FILE, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Open "response" callback. */ -/*---------------------------------------------------------------------------*/ -static void -open_response (GtkDialog *chooser, - gint response, - glWindow *window) -{ - gchar *raw_filename; - gchar *filename; - GtkWidget *dialog; - - gl_debug (DEBUG_FILE, "START"); - - g_return_if_fail (chooser && GTK_IS_FILE_CHOOSER (chooser)); - g_return_if_fail (window && GTK_IS_WINDOW (window)); - - switch (response) { - - case GTK_RESPONSE_ACCEPT: - /* get the filename */ - raw_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(chooser)); - filename = g_filename_to_utf8 (raw_filename, -1, NULL, NULL, NULL); - - if (!raw_filename || - !filename || - g_file_test (raw_filename, G_FILE_TEST_IS_DIR)) { - - dialog = gtk_message_dialog_new (GTK_WINDOW(chooser), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_CLOSE, - _("Empty file name selection")); - gtk_message_dialog_format_secondary_text ( - GTK_MESSAGE_DIALOG (dialog), - _("Please select a file or supply a valid file name")); - - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); - - } else { - - if (!g_file_test (raw_filename, G_FILE_TEST_IS_REGULAR)) { - - dialog = gtk_message_dialog_new (GTK_WINDOW(chooser), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_CLOSE, - _("File does not exist")); - gtk_message_dialog_format_secondary_text ( - GTK_MESSAGE_DIALOG (dialog), - _("Please select a file or supply a valid file name")); - - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); - - - } else { - - if ( gl_file_open_real (filename, window) ) { - gtk_widget_destroy (GTK_WIDGET (chooser)); - } - - } - - } - - g_free (filename); - g_free (raw_filename); - break; - - default: - gtk_widget_destroy (GTK_WIDGET (chooser)); - break; - - } - - gl_debug (DEBUG_FILE, "END"); -} - - -/*****************************************************************************/ -/* "Open recent" menu callback. */ -/*****************************************************************************/ -void -gl_file_open_recent (const gchar *filename, - glWindow *window) -{ - gl_debug (DEBUG_FILE, ""); - - if (filename) { - gl_debug (DEBUG_FILE, "open recent: %s", filename); - - gl_file_open_real (filename, window); - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Open a file. */ -/*---------------------------------------------------------------------------*/ -gboolean -gl_file_open_real (const gchar *filename, - glWindow *window) -{ - gchar *abs_filename; - glLabel *label; - glXMLLabelStatus status; - GtkWidget *new_window; - - gl_debug (DEBUG_FILE, "START"); - - abs_filename = gl_file_util_make_absolute (filename); - label = gl_xml_label_open (abs_filename, &status); - if (!label) { - GtkWidget *dialog; - - gl_debug (DEBUG_FILE, "couldn't open file"); - - dialog = gtk_message_dialog_new (GTK_WINDOW (window), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - _("Could not open file \"%s\""), - filename); - gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), - _("Not a supported file format")); - - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); - - g_free (abs_filename); - - gl_debug (DEBUG_FILE, "END false"); - - return FALSE; - - } else { - - if ( gl_window_is_empty (GL_WINDOW(window)) ) { - gl_window_set_label (GL_WINDOW(window), label); - } else { - new_window = gl_window_new_from_label (label); - gtk_widget_show_all (new_window); - } - - gl_recent_add_utf8_filename (abs_filename); - - if (open_path != NULL) - g_free (open_path); - open_path = g_path_get_dirname (abs_filename); - g_free (abs_filename); - - gl_debug (DEBUG_FILE, "END true"); - - return TRUE; - - } -} - - -/*****************************************************************************/ -/* "Save" menu callback. */ -/*****************************************************************************/ -gboolean -gl_file_save (glLabel *label, - glWindow *window) -{ - glXMLLabelStatus status; - gchar *filename = NULL; - - gl_debug (DEBUG_FILE, ""); - - g_return_val_if_fail (label != NULL, FALSE); - - if (gl_label_is_untitled (label)) - { - gl_debug (DEBUG_FILE, "Untitled"); - - return gl_file_save_as (label, window); - } - - if (!gl_label_is_modified (label)) - { - gl_debug (DEBUG_FILE, "Not modified"); - - return TRUE; - } - - filename = gl_label_get_filename (label); - g_return_val_if_fail (filename != NULL, FALSE); - - gl_xml_label_save (label, filename, &status); - - if (status != XML_LABEL_OK) - { - GtkWidget *dialog; - - gl_debug (DEBUG_FILE, "FAILED"); - - dialog = gtk_message_dialog_new (GTK_WINDOW (window), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - _("Could not save file \"%s\""), - filename); - gtk_message_dialog_format_secondary_text ( - GTK_MESSAGE_DIALOG (dialog), - _("Error encountered during save. The file is still not saved.")); - - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); - - g_free (filename); - - return FALSE; - } - else - { - gl_debug (DEBUG_FILE, "OK"); - - gl_recent_add_utf8_filename (filename); - - g_free (filename); - - return TRUE; - } -} - - -/*****************************************************************************/ -/* "Save As" menu callback. */ -/*****************************************************************************/ -gboolean -gl_file_save_as (glLabel *label, - glWindow *window) -{ - GtkWidget *chooser; - GtkFileFilter *filter; - gboolean saved_flag = FALSE; - gchar *name, *title; - - gl_debug (DEBUG_FILE, "START"); - - g_return_val_if_fail (label && GL_IS_LABEL(label), FALSE); - g_return_val_if_fail (window && GL_IS_WINDOW(window), FALSE); - - name = gl_label_get_short_name (label); - title = g_strdup_printf (_("Save \"%s\" as"), name); - g_free (name); - - chooser = gtk_file_chooser_dialog_new (title, - GTK_WINDOW (window), - GTK_FILE_CHOOSER_ACTION_SAVE, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, - NULL); - - gtk_window_set_modal (GTK_WINDOW (chooser), TRUE); - - g_free (title); - - /* Recover proper state of save-as dialog */ - if (save_path != NULL) { - gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(chooser), - save_path); - } - - filter = gtk_file_filter_new (); - gtk_file_filter_add_pattern (filter, "*"); - gtk_file_filter_set_name (filter, _("All files")); - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); - - filter = gtk_file_filter_new (); - gtk_file_filter_add_pattern (filter, "*.glabels"); - gtk_file_filter_set_name (filter, _("gLabels documents")); - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); - - gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), filter); - - g_signal_connect (G_OBJECT (chooser), "response", - G_CALLBACK (save_as_response), label); - - g_object_set_data (G_OBJECT (chooser), "saved_flag", &saved_flag); - - /* show the dialog */ - gtk_widget_show (GTK_WIDGET (chooser)); - - /* Hold here and process events until we are done with this dialog. */ - /* This is so we can return a boolean result of our save attempt. */ - gtk_main (); - - gl_debug (DEBUG_FILE, "END"); - - /* Return flag as set by one of the above callbacks, TRUE = saved */ - return saved_flag; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Save As" ok button callback. */ -/*---------------------------------------------------------------------------*/ -static void -save_as_response (GtkDialog *chooser, - gint response, - glLabel *label) -{ - gchar *raw_filename, *filename, *full_filename; - GtkWidget *dialog; - glXMLLabelStatus status; - gboolean *saved_flag; - gboolean cancel_flag = FALSE; - - gl_debug (DEBUG_FILE, "START"); - - g_return_if_fail (GTK_IS_FILE_CHOOSER (chooser)); - - saved_flag = g_object_get_data (G_OBJECT(chooser), "saved_flag"); - - switch (response) { - - case GTK_RESPONSE_ACCEPT: - /* get the filename */ - raw_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(chooser)); - - gl_debug (DEBUG_FILE, "raw_filename = \"%s\"", raw_filename); - - if (!raw_filename || g_file_test (raw_filename, G_FILE_TEST_IS_DIR)) { - - dialog = gtk_message_dialog_new (GTK_WINDOW(chooser), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_CLOSE, - _("Empty file name selection")); - gtk_message_dialog_format_secondary_text ( - GTK_MESSAGE_DIALOG (dialog), - _("Please supply a valid file name")); - - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); - - } else { - - full_filename = gl_file_util_add_extension (raw_filename); - - filename = g_filename_to_utf8 (full_filename, -1, - NULL, NULL, NULL); - - gl_debug (DEBUG_FILE, "filename = \"%s\"", filename); - - if (g_file_test (full_filename, G_FILE_TEST_IS_REGULAR)) { - gint ret; - - dialog = gtk_message_dialog_new (GTK_WINDOW(chooser), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, - _("Overwrite file \"%s\"?"), - filename); - gtk_message_dialog_format_secondary_text ( - GTK_MESSAGE_DIALOG (dialog), - _("File already exists.")); - - ret = gtk_dialog_run (GTK_DIALOG (dialog)); - if ( ret == GTK_RESPONSE_NO ) { - cancel_flag = TRUE; - } - gtk_widget_destroy (dialog); - } - - if (!cancel_flag) { - - gl_xml_label_save (label, filename, &status); - - gl_debug (DEBUG_FILE, "status of save = %d", status); - - if ( status != XML_LABEL_OK ) { - - dialog = gtk_message_dialog_new ( - GTK_WINDOW(chooser), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - _("Could not save file \"%s\""), - filename); - gtk_message_dialog_format_secondary_text ( - GTK_MESSAGE_DIALOG (dialog), - _("Error encountered during save. The file is still not saved.")); - - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); - - } else { - - *saved_flag = TRUE; - - gl_recent_add_utf8_filename (filename); - - if (save_path != NULL) - g_free (save_path); - save_path = g_path_get_dirname (filename); - - gtk_widget_destroy (GTK_WIDGET (chooser)); - gtk_main_quit (); - } - - } - - g_free (filename); - g_free (full_filename); - } - - g_free (raw_filename); - break; - - default: - *saved_flag = FALSE; - gtk_widget_destroy (GTK_WIDGET (chooser)); - gtk_main_quit (); - break; - - } - - gl_debug (DEBUG_FILE, "END"); -} - - -/*****************************************************************************/ -/* "Close" menu callback. */ -/*****************************************************************************/ -gboolean -gl_file_close (glWindow *window) -{ - glView *view; - glLabel *label; - gboolean close = TRUE; - - gl_debug (DEBUG_FILE, "START"); - - g_return_val_if_fail (window && GL_IS_WINDOW(window), TRUE); - - if ( !gl_window_is_empty (window) ) { - - view = GL_VIEW(window->view); - label = view->label; - - if (gl_label_is_modified (label)) { - GtkWidget *dialog; - gchar *fname = NULL; - gint ret; - - fname = gl_label_get_short_name (label); - - dialog = gtk_message_dialog_new (GTK_WINDOW(window), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_NONE, - _("Save changes to document \"%s\" before closing?"), - fname); - gtk_message_dialog_format_secondary_text ( - GTK_MESSAGE_DIALOG (dialog), - _("Your changes will be lost if you don't save them.")); - - gtk_dialog_add_button (GTK_DIALOG (dialog), - _("Close without saving"), - GTK_RESPONSE_NO); - - gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); - - gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_SAVE, GTK_RESPONSE_YES); - - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES); - - gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); - - ret = gtk_dialog_run (GTK_DIALOG (dialog)); - - gtk_widget_destroy (dialog); - - g_free (fname); - - switch (ret) - { - case GTK_RESPONSE_YES: - close = gl_file_save (label, window); - break; - case GTK_RESPONSE_NO: - close = TRUE; - break; - default: - close = FALSE; - } - - gl_debug (DEBUG_FILE, "CLOSE: %s", close ? "TRUE" : "FALSE"); - } - - } - - if (close) { - gtk_widget_destroy (GTK_WIDGET(window)); - - if ( gl_window_get_window_list () == NULL ) { - - gl_debug (DEBUG_FILE, "All windows closed."); - - gtk_main_quit (); - } - - } - - gl_debug (DEBUG_FILE, "END"); - - return close; -} - - -/*****************************************************************************/ -/* "Exit" menu callback. */ -/*****************************************************************************/ -void -gl_file_exit (void) -{ - const GList *window_list; - GList *p, *p_next; - - gl_debug (DEBUG_FILE, "START"); - - window_list = gl_window_get_window_list (); - - for (p=(GList *)window_list; p != NULL; p=p_next) { - p_next = p->next; - - gl_file_close (GL_WINDOW(p->data)); - } - - gl_debug (DEBUG_FILE, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/file.h b/glabels2/src/file.h deleted file mode 100644 index 3ac975e1..00000000 --- a/glabels2/src/file.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * file.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __FILE_H__ -#define __FILE_H__ - -#include - -#include "label.h" -#include "window.h" - -G_BEGIN_DECLS - -void gl_file_new (glWindow *window); - - -void gl_file_properties (glLabel *label, - glWindow *window); - - -void gl_file_open (glWindow *window); - - -void gl_file_open_recent (const gchar *filename, - glWindow *window); - -gboolean gl_file_open_real (const gchar *filename, - glWindow *window); - - -gboolean gl_file_save (glLabel *label, - glWindow *window); - -gboolean gl_file_save_as (glLabel *label, - glWindow *window); - - -gboolean gl_file_close (glWindow *window); - -void gl_file_exit (void); - -G_END_DECLS - -#endif /* __FILE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/font-combo-menu-item.c b/glabels2/src/font-combo-menu-item.c deleted file mode 100644 index a1b4e497..00000000 --- a/glabels2/src/font-combo-menu-item.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * font-combo-menu-item.c - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "font-combo-menu-item.h" - -#include -#include - -#include "font-sample.h" -#include "marshal.h" - - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - -#define SAMPLE_W 32 -#define SAMPLE_H 24 - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glFontComboMenuItemPrivate { - - gchar *font_family; - -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_font_combo_menu_item_finalize (GObject *object); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glFontComboMenuItem, gl_font_combo_menu_item, GTK_TYPE_MENU_ITEM); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_font_combo_menu_item_class_init (glFontComboMenuItemClass *class) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (class); - - gl_font_combo_menu_item_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_font_combo_menu_item_finalize; -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_font_combo_menu_item_init (glFontComboMenuItem *this) -{ - this->priv = g_new0 (glFontComboMenuItemPrivate, 1); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_font_combo_menu_item_finalize (GObject *object) -{ - glFontComboMenuItem *this = GL_FONT_COMBO_MENU_ITEM (object); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_FONT_COMBO_MENU_ITEM (object)); - - g_free (this->priv->font_family); - g_free (this->priv); - - G_OBJECT_CLASS (gl_font_combo_menu_item_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_font_combo_menu_item_new (gchar *font_family) -{ - glFontComboMenuItem *this; - GtkWidget *hbox; - GtkWidget *sample; - GtkWidget *label; - gchar *markup; - - this = g_object_new (GL_TYPE_FONT_COMBO_MENU_ITEM, NULL); - - this->priv->font_family = g_strdup (font_family); - - hbox = gtk_hbox_new (FALSE, 6); - gtk_container_add (GTK_CONTAINER (this), hbox); - - sample = gl_font_sample_new (SAMPLE_W, SAMPLE_H, "Aa", font_family); - gtk_box_pack_start (GTK_BOX (hbox), sample, FALSE, FALSE, 0); - - label = gtk_label_new (font_family); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - - markup = g_strdup_printf ("ABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz\n0123456789", - font_family); - gtk_widget_set_tooltip_markup (GTK_WIDGET (this), markup); - g_free (markup); - - return GTK_WIDGET (this); -} - - -/*****************************************************************************/ -/* Get family. */ -/*****************************************************************************/ -gchar * -gl_font_combo_menu_item_get_family (glFontComboMenuItem *this) -{ - return g_strdup (this->priv->font_family); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/font-combo-menu-item.h b/glabels2/src/font-combo-menu-item.h deleted file mode 100644 index 30681616..00000000 --- a/glabels2/src/font-combo-menu-item.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * font-combo-menu-item.h - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __FONT_COMBO_MENU_ITEM_H__ -#define __FONT_COMBO_MENU_ITEM_H__ - - -#include - - -G_BEGIN_DECLS - -#define GL_TYPE_FONT_COMBO_MENU_ITEM (gl_font_combo_menu_item_get_type ()) -#define GL_FONT_COMBO_MENU_ITEM(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_FONT_COMBO_MENU_ITEM, glFontComboMenuItem )) -#define GL_FONT_COMBO_MENU_ITEM_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_FONT_COMBO_MENU_ITEM, glFontComboMenuItemClass)) -#define GL_IS_FONT_COMBO_MENU_ITEM(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_FONT_COMBO_MENU_ITEM)) -#define GL_IS_FONT_COMBO_MENU_ITEM_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_FONT_COMBO_MENU_ITEM)) - -typedef struct _glFontComboMenuItem glFontComboMenuItem; -typedef struct _glFontComboMenuItemPrivate glFontComboMenuItemPrivate; -typedef struct _glFontComboMenuItemClass glFontComboMenuItemClass; - -struct _glFontComboMenuItem { - GtkMenuItem parent_widget; - - glFontComboMenuItemPrivate *priv; -}; - -struct _glFontComboMenuItemClass { - GtkMenuItemClass parent_class; -}; - - -GType gl_font_combo_menu_item_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_font_combo_menu_item_new (gchar *font_family); - -gchar *gl_font_combo_menu_item_get_family (glFontComboMenuItem *this); - - -G_END_DECLS - -#endif /* __FONT_COMBO_MENU_ITEM_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/font-combo-menu.c b/glabels2/src/font-combo-menu.c deleted file mode 100644 index 34c93979..00000000 --- a/glabels2/src/font-combo-menu.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * font-combo-menu.c - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "font-combo-menu.h" - -#include -#include - -#include "font-combo-menu-item.h" -#include "font-util.h" -#include "marshal.h" - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glFontComboMenuPrivate { - - gchar *font_family; - -}; - -enum { - FONT_CHANGED, - LAST_SIGNAL -}; - -gchar *standard_families[] = { "Sans", "Serif", "Monospace", NULL }; - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static guint signals[LAST_SIGNAL] = {0}; - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_font_combo_menu_finalize (GObject *object); - -static void menu_item_activate_cb (glFontComboMenuItem *item, - glFontComboMenu *this); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glFontComboMenu, gl_font_combo_menu, GTK_TYPE_MENU); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_font_combo_menu_class_init (glFontComboMenuClass *class) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (class); - - gl_font_combo_menu_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_font_combo_menu_finalize; - - signals[FONT_CHANGED] = - g_signal_new ("font_changed", - G_OBJECT_CLASS_TYPE (gobject_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glFontComboMenuClass, font_changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, 0); -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_font_combo_menu_init (glFontComboMenu *this) -{ - gint i; - GtkWidget *menu_item; - GtkWidget *sub_menu; - const GList *list; - GList *p; - - this->priv = g_new0 (glFontComboMenuPrivate, 1); - - - for ( i = 0; standard_families[i] != NULL; i++ ) - { - menu_item = gl_font_combo_menu_item_new (standard_families[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); - g_signal_connect (menu_item, "activate", - G_CALLBACK (menu_item_activate_cb), this); - } - - menu_item = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); - - menu_item = gtk_menu_item_new_with_label (_("Proportional fonts")); - gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); - - sub_menu = gtk_menu_new (); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), sub_menu); - - list = gl_font_util_get_proportional_families (); - for ( p = (GList *)list; p != NULL; p = p->next ) - { - menu_item = gl_font_combo_menu_item_new (p->data); - gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item); - g_signal_connect (menu_item, "activate", - G_CALLBACK (menu_item_activate_cb), this); - } - - menu_item = gtk_menu_item_new_with_label (_("Fixed-width fonts")); - gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); - - sub_menu = gtk_menu_new (); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), sub_menu); - - list = gl_font_util_get_fixed_width_families (); - for ( p = (GList *)list; p != NULL; p = p->next ) - { - menu_item = gl_font_combo_menu_item_new (p->data); - gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item); - g_signal_connect (menu_item, "activate", - G_CALLBACK (menu_item_activate_cb), this); - } - - menu_item = gtk_menu_item_new_with_label (_("All fonts")); - gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); - - sub_menu = gtk_menu_new (); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), sub_menu); - - list = gl_font_util_get_all_families (); - for ( p = (GList *)list; p != NULL; p = p->next ) - { - menu_item = gl_font_combo_menu_item_new (p->data); - gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item); - g_signal_connect (menu_item, "activate", - G_CALLBACK (menu_item_activate_cb), this); - } - -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_font_combo_menu_finalize (GObject *object) -{ - glFontComboMenu *this = GL_FONT_COMBO_MENU (object); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_FONT_COMBO_MENU (object)); - - g_free (this->priv); - - G_OBJECT_CLASS (gl_font_combo_menu_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_font_combo_menu_new (void) -{ - glFontComboMenu *this; - - this = g_object_new (gl_font_combo_menu_get_type (), NULL); - - return GTK_WIDGET (this); -} - - -/*****************************************************************************/ -/* menu_item activate callback. */ -/*****************************************************************************/ -static void menu_item_activate_cb (glFontComboMenuItem *item, - glFontComboMenu *this) -{ - this->priv->font_family = gl_font_combo_menu_item_get_family (item); - - g_signal_emit (this, signals[FONT_CHANGED], 0); - - gtk_widget_hide (GTK_WIDGET (this)); -} - - -/*****************************************************************************/ -/* Get font family name. */ -/*****************************************************************************/ -gchar * -gl_font_combo_menu_get_family (glFontComboMenu *this) -{ - return g_strdup (this->priv->font_family); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/font-combo-menu.h b/glabels2/src/font-combo-menu.h deleted file mode 100644 index d40fa43a..00000000 --- a/glabels2/src/font-combo-menu.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * font-combo-menu.h - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __FONT_COMBO_MENU_H__ -#define __FONT_COMBO_MENU_H__ - -#include - - -G_BEGIN_DECLS - -#define GL_TYPE_FONT_COMBO_MENU (gl_font_combo_menu_get_type ()) -#define GL_FONT_COMBO_MENU(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_FONT_COMBO_MENU, glFontComboMenu )) -#define GL_FONT_COMBO_MENU_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_FONT_COMBO_MENU, glFontComboMenuClass)) -#define GL_IS_FONT_COMBO_MENU(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_FONT_COMBO_MENU)) -#define GL_IS_FONT_COMBO_MENU_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_FONT_COMBO_MENU)) - -typedef struct _glFontComboMenu glFontComboMenu; -typedef struct _glFontComboMenuPrivate glFontComboMenuPrivate; -typedef struct _glFontComboMenuClass glFontComboMenuClass; - -struct _glFontComboMenu { - GtkMenu parent_widget; - - glFontComboMenuPrivate *priv; -}; - -struct _glFontComboMenuClass { - GtkMenuClass parent_class; - - /* - * Signals - */ - void (*font_changed) (glFontComboMenu *object, - gpointer user_data); - -}; - - -GType gl_font_combo_menu_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_font_combo_menu_new (void); - -gchar *gl_font_combo_menu_get_family (glFontComboMenu *this); - - -G_END_DECLS - - -#endif /* __FONT_COMBO_MENU_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ - diff --git a/glabels2/src/font-combo.c b/glabels2/src/font-combo.c deleted file mode 100644 index ffd8877e..00000000 --- a/glabels2/src/font-combo.c +++ /dev/null @@ -1,321 +0,0 @@ -/* - * font-combo.c - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "font-combo.h" - -#include -#include - -#include "font-combo-menu.h" -#include "font-util.h" -#include "marshal.h" - - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -/** GL_FONT_COMBO Private fields */ -struct _glFontComboPrivate { - - gchar *font_family; - - GtkWidget *label; - - GtkWidget *menu; -}; - -enum { - CHANGED, - LAST_SIGNAL -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static guint signals[LAST_SIGNAL] = {0}; - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_font_combo_finalize (GObject *object); - -static gboolean -button_press_event_cb (GtkWidget *widget, - GdkEventButton *event, - glFontCombo *this); - -static void -menu_font_changed_cb (glFontComboMenu *menu, - glFontCombo *this); - -static void -menu_selection_done_cb (GtkMenuShell *object, - glFontCombo *this); - - -/*****************************************************************************/ -/* Object infrastructure. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glFontCombo, gl_font_combo, GTK_TYPE_TOGGLE_BUTTON); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_font_combo_class_init (glFontComboClass *class) -{ - GObjectClass *gobject_class = (GObjectClass *) class; - - gl_font_combo_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_font_combo_finalize; - - signals[CHANGED] = - g_signal_new ("changed", - G_OBJECT_CLASS_TYPE (gobject_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glFontComboClass, changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, 0); -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_font_combo_init (glFontCombo *this) -{ - GtkWidget *hbox; - GtkWidget *arrow; - - this->priv = g_new0 (glFontComboPrivate, 1); - - hbox = gtk_hbox_new (FALSE, 3); - gtk_container_add (GTK_CONTAINER (this), hbox); - - this->priv->label = gtk_label_new (""); - gtk_misc_set_alignment (GTK_MISC (this->priv->label), 0.0, 0.5); - gtk_widget_set_size_request (this->priv->label, 180, -1); - gtk_box_pack_start (GTK_BOX (hbox), this->priv->label, TRUE, TRUE, 0); - - arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN); - gtk_box_pack_end (GTK_BOX (hbox), arrow, FALSE, FALSE, 0); - - g_signal_connect (this, "button_press_event", - G_CALLBACK(button_press_event_cb), this); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_font_combo_finalize (GObject *object) -{ - glFontCombo *this; - - g_return_if_fail (object && IS_GL_FONT_COMBO (object)); - this = GL_FONT_COMBO (object); - - g_free (this->priv->font_family); - g_object_ref_sink (this->priv->menu); - g_free (this->priv); - - G_OBJECT_CLASS (gl_font_combo_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_font_combo_new (const gchar *font_family) -{ - glFontCombo *this; - - this = g_object_new (TYPE_GL_FONT_COMBO, NULL); - - this->priv->font_family = gl_font_util_validate_family (font_family); - - gtk_label_set_text (GTK_LABEL (this->priv->label), this->priv->font_family); - - this->priv->menu = gl_font_combo_menu_new (); - - gtk_widget_show_all (this->priv->menu); - - g_signal_connect (this->priv->menu, "font_changed", - G_CALLBACK (menu_font_changed_cb), this); - g_signal_connect (this->priv->menu, "selection_done", - G_CALLBACK (menu_selection_done_cb), this); - - return GTK_WIDGET (this); -} - - -/*****************************************************************************/ -/** Set relief style. */ -/*****************************************************************************/ -void -gl_font_combo_set_relief( glFontCombo *this, - GtkReliefStyle relief ) -{ - gtk_button_set_relief (GTK_BUTTON (this), relief); -} - - -/*****************************************************************************/ -/* Set font family. */ -/*****************************************************************************/ -void -gl_font_combo_set_family (glFontCombo *this, - const gchar *font_family) -{ - - this->priv->font_family = gl_font_util_validate_family (font_family); - - gtk_label_set_text (GTK_LABEL (this->priv->label), this->priv->font_family); -} - - -/*****************************************************************************/ -/* Get font family. */ -/*****************************************************************************/ -gchar * -gl_font_combo_get_family (glFontCombo *this) -{ - return g_strdup (this->priv->font_family); -} - - -/*****************************************************************************/ -/* Menu positioning function. */ -/*****************************************************************************/ -static void -menu_position_function (GtkMenu *menu, - gint *x, - gint *y, - gboolean *push_in, - gpointer user_data) -{ - glFontCombo *this = GL_FONT_COMBO (user_data); - gint x1, y1; - gint menu_h, menu_w; - - gdk_window_get_origin (GTK_WIDGET (this)->window, &x1, &y1); - *x = x1 + GTK_WIDGET (this)->allocation.x; - *y = y1 + GTK_WIDGET (this)->allocation.y + - GTK_WIDGET (this)->allocation.height; - - menu_h = this->priv->menu->allocation.height; - menu_w = this->priv->menu->allocation.width; - - if ((*y + menu_h) > gdk_screen_height ()) - { - *y = y1 + GTK_WIDGET (this)->allocation.y - menu_h; - if ( *y < 0 ) - { - *y = gdk_screen_height () - menu_h; - } - } - - if ((*x + menu_w) > gdk_screen_width ()) - { - *x = gdk_screen_width () - menu_w; - } - - *push_in = TRUE; -} - - -/*****************************************************************************/ -/* Button "button_press_event" callback. */ -/*****************************************************************************/ -static gboolean -button_press_event_cb (GtkWidget *widget, - GdkEventButton *event, - glFontCombo *this) -{ - switch (event->button) - { - - case 1: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this), TRUE); - - gtk_menu_popup (GTK_MENU (this->priv->menu), - NULL, NULL, - menu_position_function, this, - event->button, event->time); - break; - - default: - break; - - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Menu "font changed" callback. */ -/*****************************************************************************/ -static void -menu_font_changed_cb (glFontComboMenu *menu, - glFontCombo *this) -{ - this->priv->font_family = gl_font_combo_menu_get_family (menu); - - gtk_label_set_text (GTK_LABEL (this->priv->label), this->priv->font_family); - - g_signal_emit (this, signals[CHANGED], 0); -} - - -/*****************************************************************************/ -/* Menu "selection done" callback. */ -/*****************************************************************************/ -static void -menu_selection_done_cb (GtkMenuShell *object, - glFontCombo *this) -{ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this), FALSE); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/font-combo.h b/glabels2/src/font-combo.h deleted file mode 100644 index a7b9de6b..00000000 --- a/glabels2/src/font-combo.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * font-combo.h - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __GL_FONT_COMBO_H__ -#define __GL_FONT_COMBO_H__ - - -#include - - -G_BEGIN_DECLS - -#define TYPE_GL_FONT_COMBO (gl_font_combo_get_type ()) -#define GL_FONT_COMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GL_FONT_COMBO, glFontCombo)) -#define GL_FONT_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GL_FONT_COMBO, glFontComboClass)) -#define IS_GL_FONT_COMBO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GL_FONT_COMBO)) -#define IS_GL_FONT_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GL_FONT_COMBO)) -#define GL_FONT_COMBO_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), TYPE_GL_FONT_COMBO, glFontComboClass)) - - -typedef struct _glFontCombo glFontCombo; -typedef struct _glFontComboPrivate glFontComboPrivate; -typedef struct _glFontComboClass glFontComboClass; - - -struct _glFontCombo { - GtkToggleButton parent; - - glFontComboPrivate *priv; -}; - -struct _glFontComboClass { - GtkToggleButtonClass parent_class; - - /* - * Signals - */ - void (*changed) (glFontCombo *object, - gpointer user_data); - -}; - - -GType gl_font_combo_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_font_combo_new (const gchar *font_family); - -void gl_font_combo_set_family (glFontCombo *this, - const gchar *font_family); - -gchar *gl_font_combo_get_family (glFontCombo *this); - -void gl_font_combo_set_relief (glFontCombo *this, - GtkReliefStyle relief); - - -G_END_DECLS - -#endif /* __GL_COLOR_COMBO_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/font-sample.c b/glabels2/src/font-sample.c deleted file mode 100644 index da2c13aa..00000000 --- a/glabels2/src/font-sample.c +++ /dev/null @@ -1,299 +0,0 @@ -/* - * font-sample.c - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "font-sample.h" - -#include "marshal.h" -#include "color.h" - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - -#define MARGIN 2 - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glFontSamplePrivate { - - gchar *sample_text; - - gchar *font_family; -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_font_sample_finalize (GObject *object); - -static void style_set_cb (GtkWidget *widget, - GtkStyle *previous_style); - -static void redraw (glFontSample *this); - -static gboolean expose_event_cb (GtkWidget *widget, - GdkEventExpose *event); - -static void draw_sample (glFontSample *this, - cairo_t *cr); - - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glFontSample, gl_font_sample, GTK_TYPE_DRAWING_AREA); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_font_sample_class_init (glFontSampleClass *class) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (class); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); - - gl_font_sample_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_font_sample_finalize; - - widget_class->expose_event = expose_event_cb; - widget_class->style_set = style_set_cb; -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_font_sample_init (glFontSample *this) -{ - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW); - - this->priv = g_new0 (glFontSamplePrivate, 1); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_font_sample_finalize (GObject *object) -{ - glFontSample *this = GL_FONT_SAMPLE (object); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_FONT_SAMPLE (object)); - - g_free (this->priv->sample_text); - g_free (this->priv->font_family); - g_free (this->priv); - - G_OBJECT_CLASS (gl_font_sample_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_font_sample_new (gint w, - gint h, - const gchar *sample_text, - const gchar *font_family) -{ - glFontSample *this; - - this = g_object_new (GL_TYPE_FONT_SAMPLE, NULL); - - this->priv->sample_text = g_strdup (sample_text); - this->priv->font_family = g_strdup (font_family); - - gtk_widget_set_size_request (GTK_WIDGET (this), w, h); - - return GTK_WIDGET (this); -} - - -/*--------------------------------------------------------------------------*/ -/* Style set handler (updates colors when style/theme changes). */ -/*--------------------------------------------------------------------------*/ -static void -style_set_cb (GtkWidget *widget, - GtkStyle *previous_style) -{ - redraw (GL_FONT_SAMPLE (widget)); -} - - -/*****************************************************************************/ -/* Request redraw. */ -/*****************************************************************************/ -static void -redraw (glFontSample *this) -{ - GdkRegion *region; - - if (GTK_WIDGET_REALIZED (GTK_WIDGET (this))) - { - /* redraw the cairo canvas forcing an expose event */ - region = gdk_drawable_get_clip_region (GTK_WIDGET (this)->window); - gdk_window_invalidate_region (GTK_WIDGET (this)->window, region, TRUE); - gdk_region_destroy (region); - } -} - - -/*****************************************************************************/ -/* "Expose event" callback. */ -/*****************************************************************************/ -static gboolean -expose_event_cb (GtkWidget *widget, - GdkEventExpose *event) -{ - cairo_t *cr; - - cr = gdk_cairo_create (widget->window); - - cairo_rectangle (cr, - event->area.x, event->area.y, - event->area.width, event->area.height); - cairo_clip (cr); - - cairo_translate (cr, widget->allocation.x, widget->allocation.y); - - draw_sample (GL_FONT_SAMPLE (widget), cr); - - cairo_destroy (cr); - - return FALSE; -} - - -/*****************************************************************************/ -/* Draw sample. */ -/*****************************************************************************/ -static void -draw_sample (glFontSample *this, - cairo_t *cr) -{ - GtkStyle *style; - gdouble w, h; - guint fill_color, line_color; - PangoLayout *layout; - PangoFontDescription *desc; - PangoRectangle ink_rect, logical_rect; - gdouble layout_x, layout_y, layout_width, layout_height; - - - - w = GTK_WIDGET (this)->allocation.width; - h = GTK_WIDGET (this)->allocation.height; - - - style = gtk_widget_get_style (GTK_WIDGET (this)); - if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) ) - { - fill_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); - line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); - } - else - { - fill_color = GL_COLOR_NONE; - line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_INSENSITIVE]); - } - - - cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); - - cairo_rectangle( cr, 0, 0, w-1, h-1 ); - - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); - cairo_fill_preserve( cr ); - - cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (line_color)); - cairo_set_line_width (cr, 1.0); - cairo_stroke (cr); - - - cairo_set_antialias (cr, CAIRO_ANTIALIAS_DEFAULT); - - - layout = pango_cairo_create_layout (cr); - - desc = pango_font_description_new (); - pango_font_description_set_family (desc, this->priv->font_family); - pango_font_description_set_weight (desc, PANGO_WEIGHT_NORMAL); - pango_font_description_set_style (desc, PANGO_STYLE_NORMAL); - pango_font_description_set_size (desc, 0.6 * h * PANGO_SCALE); - - pango_layout_set_font_description (layout, desc); - pango_font_description_free (desc); - - pango_layout_set_text (layout, this->priv->sample_text, -1); - pango_layout_set_width (layout, -1); - pango_layout_get_pixel_extents (layout, &ink_rect, &logical_rect); - layout_width = MAX (logical_rect.width, ink_rect.width); - layout_height = MAX (logical_rect.height, ink_rect.height); - - layout_x = (w - layout_width) / 2.0; - layout_y = (h - layout_height) / 2.0; - - if (ink_rect.x < logical_rect.x) - { - layout_x += logical_rect.x - ink_rect.x; - } - - if (ink_rect.y < logical_rect.y) - { - layout_y += logical_rect.y - ink_rect.y; - } - - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); - cairo_move_to (cr, layout_x, layout_y); - pango_cairo_show_layout (cr, layout); - - g_object_unref (layout); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/font-sample.h b/glabels2/src/font-sample.h deleted file mode 100644 index 7946e774..00000000 --- a/glabels2/src/font-sample.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * font-sample.h - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __FONT_SAMPLE_H__ -#define __FONT_SAMPLE_H__ - - -#include - - -G_BEGIN_DECLS - -#define GL_TYPE_FONT_SAMPLE (gl_font_sample_get_type ()) -#define GL_FONT_SAMPLE(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_FONT_SAMPLE, glFontSample )) -#define GL_FONT_SAMPLE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_FONT_SAMPLE, glFontSampleClass)) -#define GL_IS_FONT_SAMPLE(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_FONT_SAMPLE)) -#define GL_IS_FONT_SAMPLE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_FONT_SAMPLE)) - -typedef struct _glFontSample glFontSample; -typedef struct _glFontSamplePrivate glFontSamplePrivate; -typedef struct _glFontSampleClass glFontSampleClass; - -struct _glFontSample { - GtkDrawingArea parent_widget; - - glFontSamplePrivate *priv; -}; - -struct _glFontSampleClass { - GtkDrawingAreaClass parent_class; -}; - - -GType gl_font_sample_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_font_sample_new (gint w, - gint h, - const gchar *sample_text, - const gchar *font_family); - - -G_END_DECLS - -#endif /* __FONT_SAMPLE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/font-util.c b/glabels2/src/font-util.c deleted file mode 100644 index e4cd2e08..00000000 --- a/glabels2/src/font-util.c +++ /dev/null @@ -1,196 +0,0 @@ -/* - * font-util.h - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "font-util.h" - -#include -#include -#include - -#include - - -/****************************************************************************/ -/* Get list of all available font families. */ -/****************************************************************************/ -const GList * -gl_font_util_get_all_families (void) -{ - static GList *list = NULL; - PangoFontMap *fontmap; - PangoContext *context; - PangoFontFamily **families; - gint n; - gint i; - gchar *name; - - if ( !list ) - { - fontmap = pango_cairo_font_map_new (); - context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fontmap)); - - pango_context_list_families (context, &families, &n); - - for ( i=0; idata); /* 1st entry */ - } - else - { - good_family = NULL; - } - - return good_family; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/font-util.h b/glabels2/src/font-util.h deleted file mode 100644 index 79449efa..00000000 --- a/glabels2/src/font-util.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * font-util.h - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __FONT_UTIL_H__ -#define __FONT_UTIL_H__ - -#include - -G_BEGIN_DECLS - -const GList *gl_font_util_get_all_families (void); -const GList *gl_font_util_get_proportional_families (void); -const GList *gl_font_util_get_fixed_width_families (void); - -gchar *gl_font_util_validate_family (const gchar *family); - -G_END_DECLS - -#endif /* __FONT_UTIL_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/glabels-batch.c b/glabels2/src/glabels-batch.c deleted file mode 100644 index ac574326..00000000 --- a/glabels2/src/glabels-batch.c +++ /dev/null @@ -1,200 +0,0 @@ -/* - * glabels-batch.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include - -#include - -#include -#include "merge-init.h" -#include "xml-label.h" -#include "print.h" -#include "print-op.h" -#include "file-util.h" -#include "prefs.h" -#include "debug.h" - -/*============================================*/ -/* Private globals */ -/*============================================*/ -static gchar *output = "output.pdf"; -static gint n_copies = 1; -static gint n_sheets = 1; -static gint first = 1; -static gboolean outline_flag = FALSE; -static gboolean reverse_flag = FALSE; -static gboolean crop_marks_flag = FALSE; -static gchar *input = NULL; -static gchar **remaining_args = NULL; - -static GOptionEntry option_entries[] = { - {"output", 'o', 0, G_OPTION_ARG_STRING, &output, - N_("set output filename (default=\"output.pdf\")"), N_("filename")}, - {"sheets", 's', 0, G_OPTION_ARG_INT, &n_sheets, - N_("number of sheets (default=1)"), N_("sheets")}, - {"copies", 'c', 0, G_OPTION_ARG_INT, &n_copies, - N_("number of copies (default=1)"), N_("copies")}, - {"first", 'f', 0, G_OPTION_ARG_INT, &first, - N_("first label on first sheet (default=1)"), N_("first")}, - {"outline", 'l', 0, G_OPTION_ARG_NONE, &outline_flag, - N_("print outlines (to test printer alignment)"), NULL}, - {"reverse", 'r', 0, G_OPTION_ARG_NONE, &reverse_flag, - N_("print in reverse (i.e. a mirror image)"), NULL}, - {"cropmarks", 'C', 0, G_OPTION_ARG_NONE, &crop_marks_flag, - N_("print crop marks"), NULL}, - {"input", 'i', 0, G_OPTION_ARG_STRING, &input, - N_("input file for merging"), N_("filename")}, - { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, - &remaining_args, NULL, N_("[FILE...]") }, - { NULL } -}; - - - -/*****************************************************************************/ -/* Main */ -/*****************************************************************************/ -int -main (int argc, char **argv) -{ - GOptionContext *option_context; - GList *p, *file_list = NULL; - gchar *abs_fn; - glLabel *label = NULL; - glMerge *merge = NULL; - lglTemplateFrame *frame; - glXMLLabelStatus status; - glPrintOp *print_op; - gchar *utf8_filename; - GError *error = NULL; - - bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALEDIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); - - option_context = g_option_context_new (NULL); - g_option_context_set_summary (option_context, - _("Print files created with gLabels.")); - g_option_context_add_main_entries (option_context, option_entries, GETTEXT_PACKAGE); - - - /* Initialize minimal gnome program */ - gtk_init (&argc, &argv); - if (!g_option_context_parse (option_context, &argc, &argv, &error)) - { - g_print(_("%s\nRun '%s --help' to see a full list of available command line options.\n"), - error->message, argv[0]); - g_error_free (error); - return 1; - } - - - /* create file list */ - if (remaining_args != NULL) { - gint i, num_args; - - num_args = g_strv_length (remaining_args); - for (i = 0; i < num_args; ++i) { - utf8_filename = g_filename_to_utf8 (remaining_args[i], -1, NULL, NULL, NULL); - if (utf8_filename) - file_list = g_list_append (file_list, utf8_filename); - } - g_strfreev (remaining_args); - remaining_args = NULL; - } - - /* initialize components */ - gl_debug_init (); - gl_merge_init (); - lgl_db_init (); - gl_prefs_init (); - - /* now print the files */ - for (p = file_list; p; p = p->next) { - g_print ("LABEL FILE = %s\n", (gchar *) p->data); - label = gl_xml_label_open (p->data, &status); - - - if ( status == XML_LABEL_OK ) { - - merge = gl_label_get_merge (label); - if (input != NULL) { - if (merge != NULL) { - gl_merge_set_src(merge, input); - gl_label_set_merge(label, merge); - } else { - fprintf ( stderr, - _("cannot perform document merge with glabels file %s\n"), - (char *)p->data ); - } - } - abs_fn = gl_file_util_make_absolute ( output ); - frame = (lglTemplateFrame *)label->template->frames->data; - - print_op = gl_print_op_new (label); - gl_print_op_set_filename (print_op, abs_fn); - gl_print_op_set_n_copies (print_op, n_copies); - gl_print_op_set_first (print_op, first); - gl_print_op_set_outline_flag (print_op, outline_flag); - gl_print_op_set_reverse_flag (print_op, reverse_flag); - gl_print_op_set_crop_marks_flag (print_op, crop_marks_flag); - if (merge) - { - gl_print_op_set_n_sheets (print_op, - ceil ((double)(first-1 + n_copies * gl_merge_get_record_count(merge)) - / lgl_template_frame_get_n_labels (frame))); - } - else - { - gl_print_op_set_n_sheets (print_op, n_sheets); - gl_print_op_set_last (print_op, - lgl_template_frame_get_n_labels (frame)); - } - gtk_print_operation_run (GTK_PRINT_OPERATION (print_op), - GTK_PRINT_OPERATION_ACTION_EXPORT, - NULL, - NULL); - - g_object_unref (label); - } - else { - fprintf ( stderr, _("cannot open glabels file %s\n"), - (char *)p->data ); - } - } - - g_list_free (file_list); - - return 0; -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/glabels.c b/glabels2/src/glabels.c deleted file mode 100644 index 14e300bb..00000000 --- a/glabels2/src/glabels.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - * glabels.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include - -#include -#include "warning-handler.h" -#include "critical-error-handler.h" -#include "stock.h" -#include "merge-init.h" -#include "recent.h" -#include "mini-preview-pixbuf-cache.h" -#include "prefs.h" -#include "debug.h" -#include "window.h" -#include "file.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private globals */ -/*========================================================*/ - - -/*========================================================*/ -/* Local function prototypes */ -/*========================================================*/ - - -/****************************************************************************/ -/* main program */ -/****************************************************************************/ -int -main (int argc, char **argv) -{ - gchar **remaining_args = NULL; - GOptionEntry option_entries[] = { - { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, - &remaining_args, NULL, N_("[FILE...]") }, - { NULL } - }; - - GOptionContext *option_context; - gchar *icon_file; - GList *file_list = NULL, *p; - GtkWidget *win; - gchar *utf8_filename; - GError *error = NULL; - - bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALEDIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); - - option_context = g_option_context_new (NULL); - g_option_context_set_summary (option_context, - _("Launch gLabels label and business card designer.")); - g_option_context_add_main_entries (option_context, option_entries, GETTEXT_PACKAGE); - - - /* Initialize program */ - gtk_init( &argc, &argv ); - if (!g_option_context_parse (option_context, &argc, &argv, &error)) - { - g_print(_("%s\nRun '%s --help' to see a full list of available command line options.\n"), - error->message, argv[0]); - g_error_free (error); - return 1; - } - - - /* Install GUI handlers for critical error and warning messages */ - gl_critical_error_handler_init(); - gl_warning_handler_init(); - - /* Set default icon */ - icon_file = GLABELS_ICON_DIR "glabels.png"; - if (!g_file_test (icon_file, G_FILE_TEST_EXISTS)) - { - g_message ("Could not find %s", icon_file); - } - else - { - gtk_window_set_default_icon_from_file (icon_file, NULL); - } - - - /* Initialize subsystems */ - gl_debug_init (); - gl_stock_init (); - lgl_db_init (); - gl_prefs_init (); - gl_mini_preview_pixbuf_cache_init (); - gl_merge_init (); - gl_recent_init (); - - - /* Parse args and build the list of files to be loaded at startup */ - if (remaining_args != NULL) { - gint i, num_args; - - num_args = g_strv_length (remaining_args); - for (i = 0; i < num_args; ++i) { - utf8_filename = g_filename_to_utf8 (remaining_args[i], -1, NULL, NULL, NULL); - if (utf8_filename) - file_list = g_list_append (file_list, utf8_filename); - } - g_strfreev (remaining_args); - remaining_args = NULL; - } - - - /* Open files or create empty top-level window. */ - for (p = file_list; p; p = p->next) { - win = gl_window_new_from_file (p->data); - gtk_widget_show_all (win); - g_free (p->data); - } - if ( gl_window_get_window_list() == NULL ) { - win = gl_window_new (); - gtk_widget_show_all (win); - } - g_list_free (file_list); - - - /* Begin main loop */ - gtk_main(); - - return 0; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/hig.h b/glabels2/src/hig.h deleted file mode 100644 index 7db439a8..00000000 --- a/glabels2/src/hig.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * hig.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __HIG_H__ -#define __HIG_H__ - -#include - -G_BEGIN_DECLS - -#define GL_HIG_PAD1 6 -#define GL_HIG_PAD2 12 - -G_END_DECLS - -#endif /* __HIG_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-barcode.c b/glabels2/src/label-barcode.c deleted file mode 100644 index c45c20c2..00000000 --- a/glabels2/src/label-barcode.c +++ /dev/null @@ -1,503 +0,0 @@ -/* - * label-barcode.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "label-barcode.h" - -#include -#include -#include - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - -#define FONT_SCALE (72.0/96.0) - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glLabelBarcodePrivate { - glTextNode *text_node; - gchar *id; - glColorNode *color_node; - gboolean text_flag; - gboolean checksum_flag; - guint format_digits; -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_label_barcode_finalize (GObject *object); - -static void copy (glLabelObject *dst_object, - glLabelObject *src_object); - -static void get_size (glLabelObject *object, - gdouble *w, - gdouble *h); - -static void set_line_color (glLabelObject *object, - glColorNode *line_color); - -static glColorNode *get_line_color (glLabelObject *object); - -static void draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glLabelBarcode, gl_label_barcode, GL_TYPE_LABEL_OBJECT); - - -static void -gl_label_barcode_class_init (glLabelBarcodeClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); - - gl_label_barcode_parent_class = g_type_class_peek_parent (class); - - label_object_class->copy = copy; - label_object_class->get_size = get_size; - label_object_class->set_line_color = set_line_color; - label_object_class->get_line_color = get_line_color; - label_object_class->draw_object = draw_object; - label_object_class->draw_shadow = NULL; - - object_class->finalize = gl_label_barcode_finalize; -} - - -static void -gl_label_barcode_init (glLabelBarcode *lbc) -{ - lbc->priv = g_new0 (glLabelBarcodePrivate, 1); - lbc->priv->color_node = gl_color_node_new_default (); - lbc->priv->text_node = gl_text_node_new_from_text (""); -} - - -static void -gl_label_barcode_finalize (GObject *object) -{ - glLabelBarcode *lbc = GL_LABEL_BARCODE (object); - - g_return_if_fail (object && GL_IS_LABEL_BARCODE (object)); - - gl_text_node_free (&lbc->priv->text_node); - g_free (lbc->priv->id); - gl_color_node_free (&(lbc->priv->color_node)); - g_free (lbc->priv); - - G_OBJECT_CLASS (gl_label_barcode_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/* NEW label "barcode" object. */ -/*****************************************************************************/ -GObject * -gl_label_barcode_new (glLabel *label) -{ - glLabelBarcode *lbc; - - lbc = g_object_new (gl_label_barcode_get_type(), NULL); - - gl_label_object_set_parent (GL_LABEL_OBJECT(lbc), label); - - return G_OBJECT (lbc); -} - - -/*****************************************************************************/ -/* Copy object contents. */ -/*****************************************************************************/ -static void -copy (glLabelObject *dst_object, - glLabelObject *src_object) -{ - glLabelBarcode *lbc = (glLabelBarcode *)src_object; - glLabelBarcode *new_lbc = (glLabelBarcode *)dst_object; - glTextNode *text_node; - gchar *id; - gboolean text_flag; - gboolean checksum_flag; - glColorNode *color_node; - guint format_digits; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); - g_return_if_fail (new_lbc && GL_IS_LABEL_BARCODE (new_lbc)); - - text_node = gl_label_barcode_get_data (lbc); - gl_label_barcode_get_props (lbc, &id, &text_flag, &checksum_flag, &format_digits); - color_node = get_line_color (src_object); - - gl_label_barcode_set_data (new_lbc, text_node); - gl_label_barcode_set_props (new_lbc, id, text_flag, checksum_flag, format_digits); - set_line_color (dst_object, color_node); - - gl_color_node_free (&color_node); - gl_text_node_free (&text_node); - g_free (id); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set object params. */ -/*****************************************************************************/ -void -gl_label_barcode_set_data (glLabelBarcode *lbc, - glTextNode *text_node) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); - - if (!gl_text_node_equal (lbc->priv->text_node, text_node)) { - - gl_text_node_free (&lbc->priv->text_node); - lbc->priv->text_node = gl_text_node_dup (text_node); - - gl_label_object_emit_changed (GL_LABEL_OBJECT(lbc)); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -void -gl_label_barcode_set_props (glLabelBarcode *lbc, - gchar *id, - gboolean text_flag, - gboolean checksum_flag, - guint format_digits) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); - - if ( ((lbc->priv->id == NULL) && (id != NULL)) - || (g_ascii_strcasecmp (lbc->priv->id, id) != 0) - || (lbc->priv->text_flag != text_flag) - || (lbc->priv->checksum_flag != checksum_flag) - || (lbc->priv->format_digits != format_digits)) { - - lbc->priv->id = g_strdup (id); - lbc->priv->text_flag = text_flag; - lbc->priv->checksum_flag = checksum_flag; - lbc->priv->format_digits = format_digits; - - gl_label_object_emit_changed (GL_LABEL_OBJECT(lbc)); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Get object params. */ -/*****************************************************************************/ -glTextNode * -gl_label_barcode_get_data (glLabelBarcode *lbc) -{ - g_return_val_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc), NULL); - - return gl_text_node_dup (lbc->priv->text_node); -} - - -void -gl_label_barcode_get_props (glLabelBarcode *lbc, - gchar **id, - gboolean *text_flag, - gboolean *checksum_flag, - guint *format_digits) -{ - g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); - - *id = g_strdup (lbc->priv->id); - *text_flag = lbc->priv->text_flag; - *checksum_flag = lbc->priv->checksum_flag; - *format_digits = lbc->priv->format_digits; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get object size method. */ -/*---------------------------------------------------------------------------*/ -static void -get_size (glLabelObject *object, - gdouble *w, - gdouble *h) -{ - glLabelBarcode *lbc = (glLabelBarcode *)object; - gchar *data; - gdouble w_parent, h_parent; - glBarcode *gbc; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); - - gl_label_object_get_raw_size (object, &w_parent, &h_parent); - - if (lbc->priv->text_node->field_flag) { - data = gl_barcode_default_digits (lbc->priv->id, - lbc->priv->format_digits); - } else { - data = gl_text_node_expand (lbc->priv->text_node, NULL); - } - - gbc = gl_barcode_new (lbc->priv->id, - lbc->priv->text_flag, - lbc->priv->checksum_flag, - w_parent, - h_parent, - data); - g_free (data); - - if ( gbc == NULL ) { - /* Try again with default digits. */ - data = gl_barcode_default_digits (lbc->priv->id, - lbc->priv->format_digits); - gbc = gl_barcode_new (lbc->priv->id, - lbc->priv->text_flag, - lbc->priv->checksum_flag, - w_parent, - h_parent, - data); - g_free (data); - } - - if ( gbc != NULL ) - { - *w = gbc->width; - *h = gbc->height; - } - else - { - /* If we still can't render, just set a default size. */ - *w = 144; - *h = 72; - } - - gl_barcode_free (&gbc); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set line color method. */ -/*---------------------------------------------------------------------------*/ -static void -set_line_color (glLabelObject *object, - glColorNode *line_color_node) -{ - glLabelBarcode *lbarcode = (glLabelBarcode *)object; - - g_return_if_fail (lbarcode && GL_IS_LABEL_BARCODE (lbarcode)); - - if ( !gl_color_node_equal(lbarcode->priv->color_node, line_color_node) ) { - - gl_color_node_free (&(lbarcode->priv->color_node)); - lbarcode->priv->color_node = gl_color_node_dup (line_color_node); - gl_label_object_emit_changed (GL_LABEL_OBJECT(lbarcode)); - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get line color method. */ -/*---------------------------------------------------------------------------*/ -static glColorNode* -get_line_color (glLabelObject *object) -{ - glLabelBarcode *lbarcode = (glLabelBarcode *)object; - - g_return_val_if_fail (lbarcode && GL_IS_LABEL_BARCODE (lbarcode), NULL); - - return gl_color_node_dup (lbarcode->priv->color_node); -} - - -/*****************************************************************************/ -/* Draw object method. */ -/*****************************************************************************/ -static void -draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - gdouble x0, y0; - cairo_matrix_t matrix; - glBarcode *gbc; - glBarcodeLine *line; - glBarcodeChar *bchar; - GList *li; - gdouble y_offset; - PangoLayout *layout; - PangoFontDescription *desc; - gchar *text, *cstring; - glTextNode *text_node; - gchar *id; - gboolean text_flag; - gboolean checksum_flag; - guint color; - glColorNode *color_node; - guint format_digits; - gdouble w, h; - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_get_position (object, &x0, &y0); - gl_label_object_get_matrix (object, &matrix); - - text_node = gl_label_barcode_get_data (GL_LABEL_BARCODE (object)); - gl_label_barcode_get_props (GL_LABEL_BARCODE (object), - &id, &text_flag, &checksum_flag, &format_digits); - - color_node = gl_label_object_get_line_color (object); - color = gl_color_node_expand (color_node, record); - if (color_node->field_flag && screen_flag) - { - color = GL_COLOR_MERGE_DEFAULT; - } - gl_color_node_free (&color_node); - - gl_label_object_get_size (object, &w, &h); - - text_node = gl_label_barcode_get_data(GL_LABEL_BARCODE(object)); - text = gl_text_node_expand (text_node, record); - if (text_node->field_flag && screen_flag) { - text = gl_barcode_default_digits (id, format_digits); - } - - gbc = gl_barcode_new (id, text_flag, checksum_flag, w, h, text); - - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (color)); - - if (gbc == NULL) { - - layout = pango_cairo_create_layout (cr); - - desc = pango_font_description_new (); - pango_font_description_set_family (desc, GL_BARCODE_FONT_FAMILY); - pango_font_description_set_size (desc, 12 * PANGO_SCALE * FONT_SCALE); - pango_layout_set_font_description (layout, desc); - pango_font_description_free (desc); - - if (text == NULL || *text == '\0') - { - pango_layout_set_text (layout, _("Barcode data empty"), -1); - } - else - { - pango_layout_set_text (layout, _("Invalid barcode data"), -1); - } - - cairo_move_to (cr, 0, 0); - pango_cairo_show_layout (cr, layout); - - g_object_unref (layout); - - } else { - - for (li = gbc->lines; li != NULL; li = li->next) { - line = (glBarcodeLine *) li->data; - - cairo_move_to (cr, line->x, line->y); - cairo_line_to (cr, line->x, line->y + line->length); - cairo_set_line_width (cr, line->width); - cairo_stroke (cr); - } - - for (li = gbc->chars; li != NULL; li = li->next) { - bchar = (glBarcodeChar *) li->data; - - layout = pango_cairo_create_layout (cr); - - desc = pango_font_description_new (); - pango_font_description_set_family (desc, GL_BARCODE_FONT_FAMILY); - pango_font_description_set_size (desc, bchar->fsize * PANGO_SCALE * FONT_SCALE); - pango_layout_set_font_description (layout, desc); - pango_font_description_free (desc); - - cstring = g_strdup_printf ("%c", bchar->c); - pango_layout_set_text (layout, cstring, -1); - g_free (cstring); - - y_offset = 0.2 * bchar->fsize; - - cairo_move_to (cr, bchar->x, bchar->y-y_offset); - pango_cairo_show_layout (cr, layout); - - g_object_unref (layout); - - } - - gl_barcode_free (&gbc); - - } - - g_free (text); - gl_text_node_free (&text_node); - g_free (id); - - gl_debug (DEBUG_LABEL, "END"); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-barcode.h b/glabels2/src/label-barcode.h deleted file mode 100644 index 61fde06b..00000000 --- a/glabels2/src/label-barcode.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * label-barcode.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __LABEL_BARCODE_H__ -#define __LABEL_BARCODE_H__ - -#include "bc.h" -#include "text-node.h" -#include "label-object.h" - -G_BEGIN_DECLS - - -#define GL_TYPE_LABEL_BARCODE (gl_label_barcode_get_type ()) -#define GL_LABEL_BARCODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_BARCODE, glLabelBarcode)) -#define GL_LABEL_BARCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_BARCODE, glLabelBarcodeClass)) -#define GL_IS_LABEL_BARCODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_BARCODE)) -#define GL_IS_LABEL_BARCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_BARCODE)) - -typedef struct _glLabelBarcode glLabelBarcode; -typedef struct _glLabelBarcodeClass glLabelBarcodeClass; - -typedef struct _glLabelBarcodePrivate glLabelBarcodePrivate; - -struct _glLabelBarcode { - glLabelObject object; - - glLabelBarcodePrivate *priv; -}; - -struct _glLabelBarcodeClass { - glLabelObjectClass parent_class; -}; - - -GType gl_label_barcode_get_type (void) G_GNUC_CONST; - -GObject *gl_label_barcode_new (glLabel *label); - -void gl_label_barcode_set_data (glLabelBarcode *lbc, - glTextNode *text_node); -void gl_label_barcode_set_props (glLabelBarcode *lbc, - gchar *id, - gboolean text_flag, - gboolean checksum_flag, - guint format_digits); - -glTextNode *gl_label_barcode_get_data (glLabelBarcode *lbc); -void gl_label_barcode_get_props (glLabelBarcode *lbc, - gchar **id, - gboolean *text_flag, - gboolean *checksum_flag, - guint *format_digits); - -G_END_DECLS - -#endif /* __LABEL_BARCODE_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-box.c b/glabels2/src/label-box.c deleted file mode 100644 index 26797368..00000000 --- a/glabels2/src/label-box.c +++ /dev/null @@ -1,418 +0,0 @@ -/* - * label-box.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include "label-box.h" - -#include - -#include "debug.h" - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glLabelBoxPrivate { - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_label_box_finalize (GObject *object); - -static void copy (glLabelObject *dst_object, - glLabelObject *src_object); - -static void set_fill_color (glLabelObject *object, - glColorNode *fill_color_node); - -static void set_line_color (glLabelObject *object, - glColorNode *line_color_node); - -static void set_line_width (glLabelObject *object, - gdouble line_width); - -static glColorNode* get_fill_color (glLabelObject *object); - -static glColorNode* get_line_color (glLabelObject *object); - -static gdouble get_line_width (glLabelObject *object); - -static void draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - -static void draw_shadow (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glLabelBox, gl_label_box, GL_TYPE_LABEL_OBJECT); - - -static void -gl_label_box_class_init (glLabelBoxClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); - - gl_label_box_parent_class = g_type_class_peek_parent (class); - - label_object_class->copy = copy; - label_object_class->set_fill_color = set_fill_color; - label_object_class->set_line_color = set_line_color; - label_object_class->set_line_width = set_line_width; - label_object_class->get_fill_color = get_fill_color; - label_object_class->get_line_color = get_line_color; - label_object_class->get_line_width = get_line_width; - label_object_class->draw_object = draw_object; - label_object_class->draw_shadow = draw_shadow; - - object_class->finalize = gl_label_box_finalize; -} - - -static void -gl_label_box_init (glLabelBox *lbox) -{ - lbox->priv = g_new0 (glLabelBoxPrivate, 1); - lbox->priv->line_color_node = gl_color_node_new_default (); - lbox->priv->fill_color_node = gl_color_node_new_default (); -} - - -static void -gl_label_box_finalize (GObject *object) -{ - glLabelBox *lbox = GL_LABEL_BOX (object); - - g_return_if_fail (object && GL_IS_LABEL_BOX (object)); - - gl_color_node_free (&(lbox->priv->fill_color_node)); - gl_color_node_free (&(lbox->priv->line_color_node)); - g_free (lbox->priv); - - G_OBJECT_CLASS (gl_label_box_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/* NEW label "box" object. */ -/*****************************************************************************/ -GObject * -gl_label_box_new (glLabel *label) -{ - glLabelBox *lbox; - - lbox = g_object_new (gl_label_box_get_type(), NULL); - - gl_label_object_set_parent (GL_LABEL_OBJECT(lbox), label); - - return G_OBJECT (lbox); -} - - -/*****************************************************************************/ -/* Copy object contents. */ -/*****************************************************************************/ -static void -copy (glLabelObject *dst_object, - glLabelObject *src_object) -{ - glLabelBox *lbox = (glLabelBox *)src_object; - glLabelBox *new_lbox = (glLabelBox *)dst_object; - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); - g_return_if_fail (new_lbox && GL_IS_LABEL_BOX (new_lbox)); - - line_width = get_line_width (src_object); - line_color_node = get_line_color (src_object); - fill_color_node = get_fill_color (src_object); - - set_line_width (dst_object, line_width); - set_line_color (dst_object, line_color_node); - set_fill_color (dst_object, fill_color_node); - - gl_color_node_free (&line_color_node); - gl_color_node_free (&fill_color_node); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set fill color method. */ -/*---------------------------------------------------------------------------*/ -static void -set_fill_color (glLabelObject *object, - glColorNode *fill_color_node) -{ - glLabelBox *lbox = (glLabelBox *)object; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); - - if (!gl_color_node_equal (lbox->priv->fill_color_node, fill_color_node)) { - - gl_color_node_free (&(lbox->priv->fill_color_node)); - lbox->priv->fill_color_node = gl_color_node_dup (fill_color_node); - - gl_label_object_emit_changed (GL_LABEL_OBJECT(lbox)); - } - gl_debug (DEBUG_LABEL, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set line color method. */ -/*---------------------------------------------------------------------------*/ -static void -set_line_color (glLabelObject *object, - glColorNode *line_color_node) -{ - glLabelBox *lbox = (glLabelBox *)object; - - g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); - - if ( !gl_color_node_equal (lbox->priv->line_color_node, line_color_node )) { - gl_color_node_free (&(lbox->priv->line_color_node)); - lbox->priv->line_color_node = gl_color_node_dup (line_color_node); - gl_label_object_emit_changed (GL_LABEL_OBJECT(lbox)); - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set line width method. */ -/*---------------------------------------------------------------------------*/ -static void -set_line_width (glLabelObject *object, - gdouble line_width) -{ - glLabelBox *lbox = (glLabelBox *)object; - - g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); - - if ( lbox->priv->line_width != line_width ) { - lbox->priv->line_width = line_width; - gl_label_object_emit_changed (GL_LABEL_OBJECT(lbox)); - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get fill color method. */ -/*---------------------------------------------------------------------------*/ -static gdouble -get_line_width (glLabelObject *object) -{ - glLabelBox *lbox = (glLabelBox *)object; - - g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0.0); - - return lbox->priv->line_width; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get line color method. */ -/*---------------------------------------------------------------------------*/ -static glColorNode* -get_line_color (glLabelObject *object) -{ - glLabelBox *lbox = (glLabelBox *)object; - - g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0); - - return gl_color_node_dup (lbox->priv->line_color_node); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get line width method. */ -/*---------------------------------------------------------------------------*/ -static glColorNode* -get_fill_color (glLabelObject *object) -{ - glLabelBox *lbox = (glLabelBox *)object; - - g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0); - - return gl_color_node_dup (lbox->priv->fill_color_node); -} - - -/*****************************************************************************/ -/* Draw object method. */ -/*****************************************************************************/ -static void -draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - guint line_color; - guint fill_color; - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_get_size (object, &w, &h); - - line_width = gl_label_object_get_line_width (object); - - line_color_node = gl_label_object_get_line_color (object); - fill_color_node = gl_label_object_get_fill_color (object); - line_color = gl_color_node_expand (line_color_node, record); - fill_color = gl_color_node_expand (fill_color_node, record); - if (line_color_node->field_flag && screen_flag) - { - line_color = GL_COLOR_MERGE_DEFAULT; - } - if (fill_color_node->field_flag && screen_flag) - { - fill_color = GL_COLOR_FILL_MERGE_DEFAULT; - } - - - cairo_rectangle (cr, 0.0, 0.0, w, h); - - /* Paint fill color */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); - cairo_fill_preserve (cr); - - /* Draw outline */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); - cairo_set_line_width (cr, line_width); - cairo_stroke (cr); - - gl_color_node_free (&line_color_node); - gl_color_node_free (&fill_color_node); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Draw shadow method. */ -/*****************************************************************************/ -static void -draw_shadow (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - guint line_color; - guint fill_color; - glColorNode *shadow_color_node; - guint shadow_color; - gdouble shadow_opacity; - guint shadow_line_color; - guint shadow_fill_color; - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_get_size (object, &w, &h); - - line_width = gl_label_object_get_line_width (object); - - line_color_node = gl_label_object_get_line_color (object); - fill_color_node = gl_label_object_get_fill_color (object); - line_color = gl_color_node_expand (line_color_node, record); - fill_color = gl_color_node_expand (fill_color_node, record); - if (line_color_node->field_flag && screen_flag) - { - line_color = GL_COLOR_MERGE_DEFAULT; - } - if (fill_color_node->field_flag && screen_flag) - { - fill_color = GL_COLOR_FILL_MERGE_DEFAULT; - } - - shadow_color_node = gl_label_object_get_shadow_color (object); - shadow_color = gl_color_node_expand (shadow_color_node, record); - if (shadow_color_node->field_flag && screen_flag) - { - shadow_color = GL_COLOR_SHADOW_MERGE_DEFAULT; - } - shadow_opacity = gl_label_object_get_shadow_opacity (object); - shadow_line_color = gl_color_shadow (shadow_color, shadow_opacity, line_color_node->color); - shadow_fill_color = gl_color_shadow (shadow_color, shadow_opacity, fill_color_node->color); - - - cairo_rectangle (cr, 0.0, 0.0, w, h); - - - /* Draw fill shadow */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_fill_color)); - cairo_fill_preserve (cr); - - /* Draw outline shadow */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_line_color)); - cairo_set_line_width (cr, line_width); - cairo_stroke (cr); - - - gl_color_node_free (&line_color_node); - gl_color_node_free (&fill_color_node); - gl_color_node_free (&shadow_color_node); - - gl_debug (DEBUG_LABEL, "END"); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-box.h b/glabels2/src/label-box.h deleted file mode 100644 index fdd623f7..00000000 --- a/glabels2/src/label-box.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * label-box.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __LABEL_BOX_H__ -#define __LABEL_BOX_H__ - -#include "label-object.h" - - -G_BEGIN_DECLS - - -#define GL_TYPE_LABEL_BOX (gl_label_box_get_type ()) -#define GL_LABEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_BOX, glLabelBox)) -#define GL_LABEL_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_BOX, glLabelBoxClass)) -#define GL_IS_LABEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_BOX)) -#define GL_IS_LABEL_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_BOX)) - -typedef struct _glLabelBox glLabelBox; -typedef struct _glLabelBoxClass glLabelBoxClass; - -typedef struct _glLabelBoxPrivate glLabelBoxPrivate; - -struct _glLabelBox { - glLabelObject object; - - glLabelBoxPrivate *priv; -}; - -struct _glLabelBoxClass { - glLabelObjectClass parent_class; -}; - -GType gl_label_box_get_type (void) G_GNUC_CONST; - -GObject *gl_label_box_new (glLabel *label); - -G_END_DECLS - -#endif /* __LABEL_BOX_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-ellipse.c b/glabels2/src/label-ellipse.c deleted file mode 100644 index d3270680..00000000 --- a/glabels2/src/label-ellipse.c +++ /dev/null @@ -1,421 +0,0 @@ -/* - * label-ellipse.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include "label-ellipse.h" - -#include -#include - -#include "cairo-ellipse-path.h" - -#include "debug.h" - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glLabelEllipsePrivate { - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; -}; - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_label_ellipse_finalize (GObject *object); - -static void copy (glLabelObject *dst_object, - glLabelObject *src_object); - -static void set_fill_color (glLabelObject *object, - glColorNode *fill_color_node); - -static void set_line_color (glLabelObject *object, - glColorNode *line_color_node); - -static void set_line_width (glLabelObject *object, - gdouble line_width); - -static glColorNode* get_fill_color (glLabelObject *object); - -static glColorNode* get_line_color (glLabelObject *object); - -static gdouble get_line_width (glLabelObject *object); - -static void draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - -static void draw_shadow (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glLabelEllipse, gl_label_ellipse, GL_TYPE_LABEL_OBJECT); - - -static void -gl_label_ellipse_class_init (glLabelEllipseClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); - - gl_label_ellipse_parent_class = g_type_class_peek_parent (class); - - label_object_class->copy = copy; - label_object_class->set_fill_color = set_fill_color; - label_object_class->set_line_color = set_line_color; - label_object_class->set_line_width = set_line_width; - label_object_class->get_fill_color = get_fill_color; - label_object_class->get_line_color = get_line_color; - label_object_class->get_line_width = get_line_width; - label_object_class->draw_object = draw_object; - label_object_class->draw_shadow = draw_shadow; - - object_class->finalize = gl_label_ellipse_finalize; -} - - -static void -gl_label_ellipse_init (glLabelEllipse *lellipse) -{ - lellipse->priv = g_new0 (glLabelEllipsePrivate, 1); - lellipse->priv->line_color_node = gl_color_node_new_default (); - lellipse->priv->fill_color_node = gl_color_node_new_default (); -} - - -static void -gl_label_ellipse_finalize (GObject *object) -{ - glLabelEllipse *lellipse = GL_LABEL_ELLIPSE (object); - - g_return_if_fail (object && GL_IS_LABEL_ELLIPSE (object)); - - gl_color_node_free (&(lellipse->priv->line_color_node)); - gl_color_node_free (&(lellipse->priv->fill_color_node)); - g_free (lellipse->priv); - - G_OBJECT_CLASS (gl_label_ellipse_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/* NEW label "ellipse" object. */ -/*****************************************************************************/ -GObject * -gl_label_ellipse_new (glLabel *label) -{ - glLabelEllipse *lellipse; - - lellipse = g_object_new (gl_label_ellipse_get_type(), NULL); - - gl_label_object_set_parent (GL_LABEL_OBJECT(lellipse), label); - - return G_OBJECT (lellipse); -} - - -/*****************************************************************************/ -/* Copy object contents. */ -/*****************************************************************************/ -static void -copy (glLabelObject *dst_object, - glLabelObject *src_object) -{ - glLabelEllipse *lellipse = (glLabelEllipse *)src_object; - glLabelEllipse *new_lellipse = (glLabelEllipse *)dst_object; - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); - g_return_if_fail (new_lellipse && GL_IS_LABEL_ELLIPSE (new_lellipse)); - - line_width = get_line_width (src_object); - line_color_node = get_line_color (src_object); - fill_color_node = get_fill_color (src_object); - - set_line_width (dst_object, line_width); - set_line_color (dst_object, line_color_node); - set_fill_color (dst_object, fill_color_node); - - gl_color_node_free (&line_color_node); - gl_color_node_free (&fill_color_node); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set fill color method. */ -/*---------------------------------------------------------------------------*/ -static void -set_fill_color (glLabelObject *object, - glColorNode *fill_color_node) -{ - glLabelEllipse *lellipse = (glLabelEllipse *)object; - - g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); - - if (!gl_color_node_equal (lellipse->priv->fill_color_node, fill_color_node)) { - - gl_color_node_free (&(lellipse->priv->fill_color_node)); - lellipse->priv->fill_color_node = gl_color_node_dup (fill_color_node); - - gl_label_object_emit_changed (GL_LABEL_OBJECT(lellipse)); - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set line color method. */ -/*---------------------------------------------------------------------------*/ -static void -set_line_color (glLabelObject *object, - glColorNode *line_color_node) -{ - glLabelEllipse *lellipse = (glLabelEllipse *)object; - - g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); - - if ( !gl_color_node_equal (lellipse->priv->line_color_node, line_color_node) ) { - - gl_color_node_free (&(lellipse->priv->line_color_node)); - lellipse->priv->line_color_node = gl_color_node_dup (line_color_node); - - gl_label_object_emit_changed (GL_LABEL_OBJECT(lellipse)); - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set line width method. */ -/*---------------------------------------------------------------------------*/ -static void -set_line_width (glLabelObject *object, - gdouble line_width) -{ - glLabelEllipse *lellipse = (glLabelEllipse *)object; - - g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); - - if ( lellipse->priv->line_width != line_width ) { - lellipse->priv->line_width = line_width; - gl_label_object_emit_changed (GL_LABEL_OBJECT(lellipse)); - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get fill color method. */ -/*---------------------------------------------------------------------------*/ -static gdouble -get_line_width (glLabelObject *object) -{ - glLabelEllipse *lellipse = (glLabelEllipse *)object; - - g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0.0); - - return lellipse->priv->line_width; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get line color method. */ -/*---------------------------------------------------------------------------*/ -static glColorNode* -get_line_color (glLabelObject *object) -{ - glLabelEllipse *lellipse = (glLabelEllipse *)object; - - g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0); - - return gl_color_node_dup (lellipse->priv->line_color_node); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get line width method. */ -/*---------------------------------------------------------------------------*/ -static glColorNode* -get_fill_color (glLabelObject *object) -{ - glLabelEllipse *lellipse = (glLabelEllipse *)object; - - g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0); - - return gl_color_node_dup (lellipse->priv->fill_color_node); -} - - -/*****************************************************************************/ -/* Draw object method. */ -/*****************************************************************************/ -static void -draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - guint line_color; - guint fill_color; - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_get_size (object, &w, &h); - - line_width = gl_label_object_get_line_width (object); - - line_color_node = gl_label_object_get_line_color (object); - fill_color_node = gl_label_object_get_fill_color (object); - line_color = gl_color_node_expand (line_color_node, record); - fill_color = gl_color_node_expand (fill_color_node, record); - if (line_color_node->field_flag && screen_flag) - { - line_color = GL_COLOR_MERGE_DEFAULT; - } - if (fill_color_node->field_flag && screen_flag) - { - fill_color = GL_COLOR_FILL_MERGE_DEFAULT; - } - - - gl_cairo_ellipse_path (cr, w/2, h/2); - - /* Paint fill color */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); - cairo_fill_preserve (cr); - - /* Draw outline */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); - cairo_set_line_width (cr, line_width); - cairo_stroke (cr); - - gl_color_node_free (&line_color_node); - gl_color_node_free (&fill_color_node); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Draw shadow method. */ -/*****************************************************************************/ -static void -draw_shadow (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - guint line_color; - guint fill_color; - glColorNode *shadow_color_node; - guint shadow_color; - gdouble shadow_opacity; - guint shadow_line_color; - guint shadow_fill_color; - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_get_size (object, &w, &h); - - line_width = gl_label_object_get_line_width (object); - - line_color_node = gl_label_object_get_line_color (object); - fill_color_node = gl_label_object_get_fill_color (object); - line_color = gl_color_node_expand (line_color_node, record); - fill_color = gl_color_node_expand (fill_color_node, record); - if (line_color_node->field_flag && screen_flag) - { - line_color = GL_COLOR_MERGE_DEFAULT; - } - if (fill_color_node->field_flag && screen_flag) - { - fill_color = GL_COLOR_FILL_MERGE_DEFAULT; - } - - shadow_color_node = gl_label_object_get_shadow_color (object); - shadow_color = gl_color_node_expand (shadow_color_node, record); - if (shadow_color_node->field_flag && screen_flag) - { - shadow_color = GL_COLOR_SHADOW_MERGE_DEFAULT; - } - shadow_opacity = gl_label_object_get_shadow_opacity (object); - shadow_line_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, line_color_node->color); - shadow_fill_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, fill_color_node->color); - - - gl_cairo_ellipse_path (cr, w/2, h/2); - - - /* Draw fill shadow */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_fill_color)); - cairo_fill_preserve (cr); - - /* Draw outline shadow */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_line_color)); - cairo_set_line_width (cr, line_width); - cairo_stroke (cr); - - - gl_color_node_free (&line_color_node); - gl_color_node_free (&fill_color_node); - gl_color_node_free (&shadow_color_node); - - gl_debug (DEBUG_LABEL, "END"); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-ellipse.h b/glabels2/src/label-ellipse.h deleted file mode 100644 index d1a01221..00000000 --- a/glabels2/src/label-ellipse.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * label-ellipse.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __LABEL_ELLIPSE_H__ -#define __LABEL_ELLIPSE_H__ - -#include "label-object.h" - - -G_BEGIN_DECLS - - -#define GL_TYPE_LABEL_ELLIPSE (gl_label_ellipse_get_type ()) -#define GL_LABEL_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_ELLIPSE, glLabelEllipse)) -#define GL_LABEL_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_ELLIPSE, glLabelEllipseClass)) -#define GL_IS_LABEL_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_ELLIPSE)) -#define GL_IS_LABEL_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_ELLIPSE)) - -typedef struct _glLabelEllipse glLabelEllipse; -typedef struct _glLabelEllipseClass glLabelEllipseClass; - -typedef struct _glLabelEllipsePrivate glLabelEllipsePrivate; - -struct _glLabelEllipse { - glLabelObject object; - - glLabelEllipsePrivate *priv; -}; - -struct _glLabelEllipseClass { - glLabelObjectClass parent_class; -}; - -GType gl_label_ellipse_get_type (void) G_GNUC_CONST; - -GObject *gl_label_ellipse_new (glLabel *label); - -G_END_DECLS - -#endif /* __LABEL_ELLIPSE_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-image.c b/glabels2/src/label-image.c deleted file mode 100644 index d325dc69..00000000 --- a/glabels2/src/label-image.c +++ /dev/null @@ -1,372 +0,0 @@ -/* - * label-image.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "label-image.h" - -#include -#include - -#include "pixmaps/checkerboard.xpm" - -#include "debug.h" - - -#define MIN_IMAGE_SIZE 1.0 - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glLabelImagePrivate { - glTextNode *filename; - GdkPixbuf *pixbuf; -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static GdkPixbuf *default_pixbuf = NULL; - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_label_image_finalize (GObject *object); - -static void copy (glLabelObject *dst_object, - glLabelObject *src_object); - -static void set_size (glLabelObject *object, - gdouble w, - gdouble h); - -static void draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glLabelImage, gl_label_image, GL_TYPE_LABEL_OBJECT); - - -static void -gl_label_image_class_init (glLabelImageClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); - - gl_label_image_parent_class = g_type_class_peek_parent (class); - - label_object_class->copy = copy; - label_object_class->set_size = set_size; - label_object_class->draw_object = draw_object; - label_object_class->draw_shadow = NULL; - - object_class->finalize = gl_label_image_finalize; -} - - -static void -gl_label_image_init (glLabelImage *limage) -{ - GdkPixbuf *pixbuf; - - if ( default_pixbuf == NULL ) { - pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)checkerboard_xpm); - default_pixbuf = - gdk_pixbuf_scale_simple (pixbuf, 128, 128, GDK_INTERP_NEAREST); - g_object_unref (pixbuf); - } - - limage->priv = g_new0 (glLabelImagePrivate, 1); - - limage->priv->filename = g_new0 (glTextNode, 1); - - limage->priv->pixbuf = default_pixbuf; -} - - -static void -gl_label_image_finalize (GObject *object) -{ - glLabelObject *lobject = GL_LABEL_OBJECT (object); - glLabelImage *limage = GL_LABEL_IMAGE (object);; - GHashTable *pixbuf_cache; - - g_return_if_fail (object && GL_IS_LABEL_IMAGE (object)); - - if (!limage->priv->filename->field_flag) { - pixbuf_cache = gl_label_get_pixbuf_cache (lobject->parent); - gl_pixbuf_cache_remove_pixbuf (pixbuf_cache, - limage->priv->filename->data); - } - gl_text_node_free (&limage->priv->filename); - g_free (limage->priv); - - G_OBJECT_CLASS (gl_label_image_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/* NEW label "image" object. */ -/*****************************************************************************/ -GObject * -gl_label_image_new (glLabel *label) -{ - glLabelImage *limage; - - limage = g_object_new (gl_label_image_get_type(), NULL); - - gl_label_object_set_parent (GL_LABEL_OBJECT(limage), label); - - return G_OBJECT (limage); -} - - -/*****************************************************************************/ -/* Copy object contents. */ -/*****************************************************************************/ -static void -copy (glLabelObject *dst_object, - glLabelObject *src_object) -{ - glLabelImage *limage = (glLabelImage *)src_object; - glLabelImage *new_limage = (glLabelImage *)dst_object; - glTextNode *filename; - GdkPixbuf *pixbuf; - GHashTable *pixbuf_cache; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (limage && GL_IS_LABEL_IMAGE (limage)); - g_return_if_fail (new_limage && GL_IS_LABEL_IMAGE (new_limage)); - - filename = gl_label_image_get_filename (limage); - - /* Make sure destination label has data suitably cached. */ - if ( !filename->field_flag && (filename->data != NULL) ) { - pixbuf = limage->priv->pixbuf; - if ( pixbuf != default_pixbuf ) { - pixbuf_cache = gl_label_get_pixbuf_cache (dst_object->parent); - gl_pixbuf_cache_add_pixbuf (pixbuf_cache, filename->data, pixbuf); - } - } - - gl_label_image_set_filename (new_limage, filename); - gl_text_node_free (&filename); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set size method. */ -/*---------------------------------------------------------------------------*/ -static void -set_size (glLabelObject *object, - gdouble w, - gdouble h) -{ - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if (w < MIN_IMAGE_SIZE) - { - w = MIN_IMAGE_SIZE; - } - - if (h < MIN_IMAGE_SIZE) - { - h = MIN_IMAGE_SIZE; - } - - GL_LABEL_OBJECT_CLASS (gl_label_image_parent_class)->set_size (object, w, h); -} - - -/*****************************************************************************/ -/* Set object params. */ -/*****************************************************************************/ -void -gl_label_image_set_filename (glLabelImage *limage, - glTextNode *filename) -{ - glTextNode *old_filename; - GHashTable *pixbuf_cache; - GdkPixbuf *pixbuf; - gdouble image_w, image_h, aspect_ratio, w, h; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (limage && GL_IS_LABEL_IMAGE (limage)); - g_return_if_fail (filename != NULL); - - old_filename = limage->priv->filename; - - /* If Unchanged don't do anything */ - if ( gl_text_node_equal (filename, old_filename ) ) { - return; - } - - pixbuf_cache = gl_label_get_pixbuf_cache (GL_LABEL_OBJECT(limage)->parent); - - /* Remove reference to previous pixbuf from cache, if needed. */ - if ( !old_filename->field_flag && (old_filename->data != NULL) ) { - gl_pixbuf_cache_remove_pixbuf (pixbuf_cache, old_filename->data); - } - - /* Set new filename. */ - limage->priv->filename = gl_text_node_dup(filename); - gl_text_node_free (&old_filename); - - /* Now set the pixbuf. */ - if ( filename->field_flag || (filename->data == NULL) ) { - - limage->priv->pixbuf = default_pixbuf; - - } else { - - pixbuf = gl_pixbuf_cache_get_pixbuf (pixbuf_cache, filename->data); - - if (pixbuf != NULL) { - limage->priv->pixbuf = pixbuf; - } else { - limage->priv->pixbuf = default_pixbuf; - } - } - - /* Treat current size as a bounding box, scale image to maintain aspect - * ratio while fitting it in this bounding box. */ - image_w = gdk_pixbuf_get_width (limage->priv->pixbuf); - image_h = gdk_pixbuf_get_height (limage->priv->pixbuf); - aspect_ratio = image_h / image_w; - gl_label_object_get_size (GL_LABEL_OBJECT(limage), &w, &h); - if ( h > w*aspect_ratio ) { - h = w * aspect_ratio; - } else { - w = h / aspect_ratio; - } - gl_label_object_set_size (GL_LABEL_OBJECT(limage), w, h); - - gl_label_object_emit_changed (GL_LABEL_OBJECT(limage)); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Get object params. */ -/*****************************************************************************/ -glTextNode * -gl_label_image_get_filename (glLabelImage *limage) -{ - g_return_val_if_fail (limage && GL_IS_LABEL_IMAGE (limage), NULL); - - return gl_text_node_dup (limage->priv->filename); -} - - -const GdkPixbuf * -gl_label_image_get_pixbuf (glLabelImage *limage, - glMergeRecord *record) -{ - g_return_val_if_fail (limage && GL_IS_LABEL_IMAGE (limage), NULL); - - if ((record != NULL) && limage->priv->filename->field_flag) { - - GdkPixbuf *pixbuf = NULL; - gchar *real_filename; - - /* Indirect filename, re-evaluate for given record. */ - - real_filename = gl_merge_eval_key (record, - limage->priv->filename->data); - - if (real_filename != NULL) { - pixbuf = gdk_pixbuf_new_from_file (real_filename, NULL); - } - if ( pixbuf != NULL ) { - return pixbuf; - } else { - return default_pixbuf; - } - - } - - return limage->priv->pixbuf; - -} - - -/*****************************************************************************/ -/* Draw object method. */ -/*****************************************************************************/ -static void -draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - gdouble x0, y0; - gdouble w, h; - const GdkPixbuf *pixbuf; - gint image_w, image_h; - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_get_size (object, &w, &h); - gl_label_object_get_position (object, &x0, &y0); - - pixbuf = gl_label_image_get_pixbuf (GL_LABEL_IMAGE (object), record); - image_w = gdk_pixbuf_get_width (pixbuf); - image_h = gdk_pixbuf_get_height (pixbuf); - - cairo_save (cr); - - cairo_rectangle (cr, 0.0, 0.0, w, h); - - cairo_scale (cr, w/image_w, h/image_h); - gdk_cairo_set_source_pixbuf (cr, (GdkPixbuf *)pixbuf, 0, 0); - cairo_fill (cr); - - cairo_restore (cr); - - gl_debug (DEBUG_LABEL, "END"); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-image.h b/glabels2/src/label-image.h deleted file mode 100644 index 15216c37..00000000 --- a/glabels2/src/label-image.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * label-image.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __LABEL_IMAGE_H__ -#define __LABEL_IMAGE_H__ - -#include -#include "label-object.h" -#include "text-node.h" -#include "merge.h" - -G_BEGIN_DECLS - - -#define GL_TYPE_LABEL_IMAGE (gl_label_image_get_type ()) -#define GL_LABEL_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_IMAGE, glLabelImage)) -#define GL_LABEL_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_IMAGE, glLabelImageClass)) -#define GL_IS_LABEL_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_IMAGE)) -#define GL_IS_LABEL_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_IMAGE)) - -typedef struct _glLabelImage glLabelImage; -typedef struct _glLabelImageClass glLabelImageClass; - -typedef struct _glLabelImagePrivate glLabelImagePrivate; - -struct _glLabelImage { - glLabelObject object; - - glLabelImagePrivate *priv; -}; - -struct _glLabelImageClass { - glLabelObjectClass parent_class; -}; - -GType gl_label_image_get_type (void) G_GNUC_CONST; - -GObject *gl_label_image_new (glLabel *label); - -void gl_label_image_set_filename (glLabelImage *limage, - glTextNode *filename); - -glTextNode *gl_label_image_get_filename (glLabelImage *limage); - -const GdkPixbuf *gl_label_image_get_pixbuf (glLabelImage *limage, - glMergeRecord *record); - -G_END_DECLS - -#endif /* __LABEL_IMAGE_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-line.c b/glabels2/src/label-line.c deleted file mode 100644 index 70b26cc4..00000000 --- a/glabels2/src/label-line.c +++ /dev/null @@ -1,339 +0,0 @@ -/* - * label-line.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include "label-line.h" - -#include - -#include "debug.h" - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glLabelLinePrivate { - gdouble line_width; - glColorNode *line_color_node; -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_label_line_finalize (GObject *object); - -static void copy (glLabelObject *dst_object, - glLabelObject *src_object); - -static void set_line_color (glLabelObject *object, - glColorNode *line_color_node); - -static void set_line_width (glLabelObject *object, - gdouble line_width); - -static glColorNode *get_line_color (glLabelObject *object); - -static gdouble get_line_width (glLabelObject *object); - -static void draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - -static void draw_shadow (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glLabelLine, gl_label_line, GL_TYPE_LABEL_OBJECT); - - -static void -gl_label_line_class_init (glLabelLineClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); - - gl_label_line_parent_class = g_type_class_peek_parent (class); - - label_object_class->copy = copy; - label_object_class->set_line_color = set_line_color; - label_object_class->set_line_width = set_line_width; - label_object_class->get_line_color = get_line_color; - label_object_class->get_line_width = get_line_width; - label_object_class->draw_object = draw_object; - label_object_class->draw_shadow = draw_shadow; - - object_class->finalize = gl_label_line_finalize; -} - - -static void -gl_label_line_init (glLabelLine *lline) -{ - lline->priv = g_new0 (glLabelLinePrivate, 1); - lline->priv->line_color_node = gl_color_node_new_default (); -} - - -static void -gl_label_line_finalize (GObject *object) -{ - glLabelLine *lline = GL_LABEL_LINE (object); - - g_return_if_fail (object && GL_IS_LABEL_LINE (object)); - - gl_color_node_free (&(lline->priv->line_color_node)); - g_free (lline->priv); - - G_OBJECT_CLASS (gl_label_line_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/* NEW label "line" object. */ -/*****************************************************************************/ -GObject * -gl_label_line_new (glLabel *label) -{ - glLabelLine *lline; - - lline = g_object_new (gl_label_line_get_type(), NULL); - - gl_label_object_set_parent (GL_LABEL_OBJECT(lline), label); - - return G_OBJECT (lline); -} - - -/*****************************************************************************/ -/* Copy object contents. */ -/*****************************************************************************/ -static void -copy (glLabelObject *dst_object, - glLabelObject *src_object) -{ - glLabelLine *lline = (glLabelLine *)src_object; - glLabelLine *new_lline = (glLabelLine *)dst_object; - gdouble line_width; - glColorNode *line_color_node; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (lline && GL_IS_LABEL_LINE (lline)); - g_return_if_fail (new_lline && GL_IS_LABEL_LINE (new_lline)); - - line_width = get_line_width (src_object); - line_color_node = get_line_color (src_object); - - set_line_width (dst_object, line_width); - set_line_color (dst_object, line_color_node); - - gl_color_node_free (&line_color_node); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set line color method. */ -/*---------------------------------------------------------------------------*/ -static void -set_line_color (glLabelObject *object, - glColorNode *line_color_node) -{ - glLabelLine *lline = (glLabelLine *)object; - - g_return_if_fail (lline && GL_IS_LABEL_LINE (lline)); - - if ( !gl_color_node_equal (lline->priv->line_color_node, line_color_node)) { - - gl_color_node_free (&(lline->priv->line_color_node )); - lline->priv->line_color_node = gl_color_node_dup (line_color_node); - - gl_label_object_emit_changed (GL_LABEL_OBJECT(lline)); - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set line width method. */ -/*---------------------------------------------------------------------------*/ -static void -set_line_width (glLabelObject *object, - gdouble line_width) -{ - glLabelLine *lline = (glLabelLine *)object; - - g_return_if_fail (lline && GL_IS_LABEL_LINE (lline)); - - if ( lline->priv->line_width != line_width ) { - lline->priv->line_width = line_width; - gl_label_object_emit_changed (GL_LABEL_OBJECT(lline)); - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get line color method. */ -/*---------------------------------------------------------------------------*/ -static gdouble -get_line_width (glLabelObject *object) -{ - glLabelLine *lline = (glLabelLine *)object; - - g_return_val_if_fail (lline && GL_IS_LABEL_LINE (lline), 0.0); - - return lline->priv->line_width; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Get line width method. */ -/*---------------------------------------------------------------------------*/ -static glColorNode* -get_line_color (glLabelObject *object) -{ - glLabelLine *lline = (glLabelLine *)object; - - g_return_val_if_fail (lline && GL_IS_LABEL_LINE (lline), 0); - - return gl_color_node_dup (lline->priv->line_color_node); -} - - -/*****************************************************************************/ -/* Draw object method. */ -/*****************************************************************************/ -static void -draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - guint line_color; - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); - - line_width = gl_label_object_get_line_width (object); - - line_color_node = gl_label_object_get_line_color (object); - line_color = gl_color_node_expand (line_color_node, record); - if (line_color_node->field_flag && screen_flag) - { - line_color = GL_COLOR_MERGE_DEFAULT; - } - - - cairo_move_to (cr, 0.0, 0.0); - cairo_line_to (cr, w, h); - - - /* Draw line */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); - cairo_set_line_width (cr, line_width); - cairo_stroke (cr); - - gl_color_node_free (&line_color_node); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Draw shadow method. */ -/*****************************************************************************/ -static void -draw_shadow (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - guint shadow_line_color; - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); - - line_width = gl_label_object_get_line_width (object); - - line_color_node = gl_label_object_get_line_color (object); - if (line_color_node->field_flag) - { - line_color_node->color = GL_COLOR_MERGE_DEFAULT; - } - - shadow_color_node = gl_label_object_get_shadow_color (object); - if (shadow_color_node->field_flag) - { - shadow_color_node->color = GL_COLOR_SHADOW_MERGE_DEFAULT; - } - shadow_opacity = gl_label_object_get_shadow_opacity (object); - shadow_line_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, line_color_node->color); - - - cairo_move_to (cr, 0.0, 0.0); - cairo_line_to (cr, w, h); - - - /* Draw outline shadow */ - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_line_color)); - cairo_set_line_width (cr, line_width); - cairo_stroke (cr); - - - gl_color_node_free (&line_color_node); - gl_color_node_free (&shadow_color_node); - - gl_debug (DEBUG_LABEL, "END"); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-line.h b/glabels2/src/label-line.h deleted file mode 100644 index da11a574..00000000 --- a/glabels2/src/label-line.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * label-line.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __LABEL_LINE_H__ -#define __LABEL_LINE_H__ - -#include "label-object.h" - - -G_BEGIN_DECLS - - -#define GL_TYPE_LABEL_LINE (gl_label_line_get_type ()) -#define GL_LABEL_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_LINE, glLabelLine)) -#define GL_LABEL_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_LINE, glLabelLineClass)) -#define GL_IS_LABEL_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_LINE)) -#define GL_IS_LABEL_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_LINE)) - -typedef struct _glLabelLine glLabelLine; -typedef struct _glLabelLineClass glLabelLineClass; - -typedef struct _glLabelLinePrivate glLabelLinePrivate; - -struct _glLabelLine { - glLabelObject object; - - glLabelLinePrivate *priv; -}; - -struct _glLabelLineClass { - glLabelObjectClass parent_class; -}; - -GType gl_label_line_get_type (void) G_GNUC_CONST; - -GObject *gl_label_line_new (glLabel *label); - - -G_END_DECLS - -#endif /* __LABEL_LINE_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-object.c b/glabels2/src/label-object.c deleted file mode 100644 index 89cefc98..00000000 --- a/glabels2/src/label-object.c +++ /dev/null @@ -1,1594 +0,0 @@ -/* - * label-object.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "label-object.h" - -#include -#include - -#include "marshal.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private defines. */ -/*========================================================*/ - -#define DEFAULT_SHADOW_X_OFFSET (3.6) -#define DEFAULT_SHADOW_Y_OFFSET (3.6) -#define DEFAULT_SHADOW_OPACITY (0.5) - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glLabelObjectPrivate { - gchar *name; - gdouble x, y; - gdouble w, h; - cairo_matrix_t matrix; - - gdouble aspect_ratio; - - gboolean shadow_state; - gdouble shadow_x; - gdouble shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; -}; - -enum { - CHANGED, - MOVED, - FLIP_ROTATE, - TOP, - BOTTOM, - REMOVED, - LAST_SIGNAL -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static guint signals[LAST_SIGNAL] = {0}; - -static guint instance = 0; - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_label_object_finalize (GObject *object); - -static void merge_changed_cb (glLabel *label, - glLabelObject *object); - -static void set_size (glLabelObject *object, - gdouble w, - gdouble h); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glLabelObject, gl_label_object, G_TYPE_OBJECT); - - -static void -gl_label_object_class_init (glLabelObjectClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_label_object_finalize; - - class->set_size = set_size; - - signals[CHANGED] = - g_signal_new ("changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelObjectClass, changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - signals[MOVED] = - g_signal_new ("moved", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelObjectClass, moved), - NULL, NULL, - gl_marshal_VOID__DOUBLE_DOUBLE, - G_TYPE_NONE, - 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); - signals[FLIP_ROTATE] = - g_signal_new ("flip_rotate", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelObjectClass, flip_rotate), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - signals[TOP] = - g_signal_new ("top", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelObjectClass, top), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - signals[BOTTOM] = - g_signal_new ("bottom", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelObjectClass, bottom), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - signals[REMOVED] = - g_signal_new ("removed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelObjectClass, removed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -static void -gl_label_object_init (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, "START"); - - object->priv = g_new0 (glLabelObjectPrivate, 1); - - object->priv->name = g_strdup_printf ("object%d", instance++); - - cairo_matrix_init_identity (&object->priv->matrix); - - object->priv->shadow_state = FALSE; - object->priv->shadow_x = DEFAULT_SHADOW_X_OFFSET; - object->priv->shadow_y = DEFAULT_SHADOW_Y_OFFSET; - object->priv->shadow_color_node = gl_color_node_new_default (); - object->priv->shadow_opacity = DEFAULT_SHADOW_OPACITY; - - gl_debug (DEBUG_LABEL, "END"); -} - - -static void -gl_label_object_finalize (GObject *object) -{ - glLabelObject *label_object = GL_LABEL_OBJECT (object); - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - g_free (label_object->priv->name); - g_free (label_object->priv); - - G_OBJECT_CLASS (gl_label_object_parent_class)->finalize (object); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* New label object. */ -/*****************************************************************************/ -GObject * -gl_label_object_new (glLabel *label) -{ - glLabelObject *object; - - gl_debug (DEBUG_LABEL, "START"); - - object = g_object_new (gl_label_object_get_type(), NULL); - - gl_label_object_set_parent (object, label); - - gl_debug (DEBUG_LABEL, "END"); - - return G_OBJECT (object); -} - - -/*****************************************************************************/ -/* Duplicate object. */ -/*****************************************************************************/ -glLabelObject * -gl_label_object_dup (glLabelObject *src_object, - glLabel *label) -{ - glLabelObject *dst_object; - gdouble x, y, w, h; - cairo_matrix_t matrix; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (src_object && GL_IS_LABEL_OBJECT (src_object), NULL); - - dst_object = g_object_new (G_OBJECT_TYPE(src_object), NULL); - - gl_label_object_set_parent (dst_object, label); - - gl_label_object_get_position (src_object, &x, &y); - gl_label_object_get_size (src_object, &w, &h); - gl_label_object_get_matrix (src_object, &matrix); - gl_label_object_get_shadow_offset (src_object, &shadow_x, &shadow_y); - shadow_color_node = gl_label_object_get_shadow_color (src_object); - shadow_opacity = gl_label_object_get_shadow_opacity (src_object); - shadow_state = gl_label_object_get_shadow_state (src_object); - - gl_label_object_set_position (dst_object, x, y); - gl_label_object_set_size (dst_object, w, h); - gl_label_object_set_matrix (dst_object, &matrix); - gl_label_object_set_shadow_offset (dst_object, shadow_x, shadow_y); - gl_label_object_set_shadow_color (dst_object, shadow_color_node); - gl_label_object_set_shadow_opacity (dst_object, shadow_opacity); - gl_label_object_set_shadow_state (dst_object, shadow_state); - - gl_color_node_free (&shadow_color_node); - - if ( GL_LABEL_OBJECT_GET_CLASS(src_object)->copy != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(src_object)->copy (dst_object, src_object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return dst_object; -} - - -/*****************************************************************************/ -/* Emit "changed" signal (for derived objects). */ -/*****************************************************************************/ -void -gl_label_object_emit_changed (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - g_signal_emit (G_OBJECT(object), signals[CHANGED], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set parent label of object. */ -/*****************************************************************************/ -void -gl_label_object_set_parent (glLabelObject *object, - glLabel *label) -{ - glLabel *old_parent; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - g_return_if_fail (label && GL_IS_LABEL (label)); - - old_parent = object->parent; - if ( old_parent != NULL ) { - g_signal_handlers_disconnect_by_func (old_parent, - G_CALLBACK(merge_changed_cb), - object); - gl_label_remove_object( old_parent, object ); - } - gl_label_add_object( label, object ); - - g_signal_connect (G_OBJECT(label), "merge_changed", - G_CALLBACK(merge_changed_cb), object); - - g_signal_emit (G_OBJECT(object), signals[CHANGED], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Get parent label of object. */ -/*****************************************************************************/ -glLabel * -gl_label_object_get_parent (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), NULL); - - gl_debug (DEBUG_LABEL, "END"); - - return object->parent; -} - - -/*****************************************************************************/ -/* Set remove object from parent. */ -/*****************************************************************************/ -void -gl_label_object_remove (glLabelObject *object) -{ - glLabel *parent; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - parent = object->parent; - if ( parent != NULL ) { - g_signal_handlers_disconnect_by_func (parent, - G_CALLBACK(merge_changed_cb), - object); - gl_label_remove_object (parent, object); - - g_signal_emit (G_OBJECT(object), signals[REMOVED], 0); - - g_object_unref (G_OBJECT(object)); - } - - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set name of object. */ -/*****************************************************************************/ -void -gl_label_object_set_name (glLabelObject *object, - gchar *name) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - g_free(object->priv->name); - object->priv->name = name; - - g_signal_emit (G_OBJECT(object), signals[CHANGED], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Get name of object. */ -/*****************************************************************************/ -gchar * -gl_label_object_get_name (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), NULL); - - gl_debug (DEBUG_LABEL, "END"); - - return g_strdup(object->priv->name); -} - - -/*****************************************************************************/ -/* Set position of object. */ -/*****************************************************************************/ -void -gl_label_object_set_position (glLabelObject *object, - gdouble x, - gdouble y) -{ - gdouble dx, dy; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( (x != object->priv->x) || (y != object->priv->y) ) { - - dx = x - object->priv->x; - dy = y - object->priv->y; - - object->priv->x = x; - object->priv->y = y; - - g_signal_emit (G_OBJECT(object), signals[MOVED], 0, dx, dy); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set position of object relative to old position. */ -/*****************************************************************************/ -void -gl_label_object_set_position_relative (glLabelObject *object, - gdouble dx, - gdouble dy) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( (dx != 0.0) || (dy != 0.0) ) { - - object->priv->x += dx; - object->priv->y += dy; - - gl_debug (DEBUG_LABEL, " x = %f, y= %f", - object->priv->x, - object->priv->y); - - g_signal_emit (G_OBJECT(object), signals[MOVED], 0, dx, dy); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Get position of object. */ -/*****************************************************************************/ -void -gl_label_object_get_position (glLabelObject *object, - gdouble *x, - gdouble *y) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - *x = object->priv->x; - *y = object->priv->y; - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Default set size method. */ -/*---------------------------------------------------------------------------*/ -static void -set_size (glLabelObject *object, - gdouble w, - gdouble h) -{ - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( (object->priv->w != w) || (object->priv->h != h) ) { - - object->priv->w = w; - object->priv->h = h; - - g_signal_emit (G_OBJECT(object), signals[CHANGED], 0); - } -} - - -/*****************************************************************************/ -/* Set size of object. */ -/*****************************************************************************/ -void -gl_label_object_set_size (glLabelObject *object, - gdouble w, - gdouble h) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_size != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_size (object, w, h); - - object->priv->aspect_ratio = h / w; - - } - - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set size of object honoring current aspect ratio. */ -/*****************************************************************************/ -void -gl_label_object_set_size_honor_aspect (glLabelObject *object, - gdouble w, - gdouble h) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( h > w*object->priv->aspect_ratio ) { - - h = w * object->priv->aspect_ratio; - - } else { - - w = h / object->priv->aspect_ratio; - - } - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_size != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_size (object, w, h); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Get raw size method (don't let object content adjust size). */ -/*****************************************************************************/ -void -gl_label_object_get_raw_size (glLabelObject *object, - gdouble *w, - gdouble *h) -{ - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - *w = object->priv->w; - *h = object->priv->h; -} - - -/*****************************************************************************/ -/* Get size of object. */ -/*****************************************************************************/ -void -gl_label_object_get_size (glLabelObject *object, - gdouble *w, - gdouble *h) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_size != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->get_size (object, w, h); - - } else { - - gl_label_object_get_raw_size (object, w, h); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Get extent of object. */ -/*****************************************************************************/ -void -gl_label_object_get_extent (glLabelObject *object, - glLabelRegion *region) -{ - gdouble w, h; - gdouble line_w; - gdouble xa1, ya1, xa2, ya2, xa3, ya3, xa4, ya4; - cairo_matrix_t matrix; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - gl_label_object_get_size (object, &w, &h); - line_w = gl_label_object_get_line_width (object); - - /* setup untransformed corners of bounding box, account for line width */ - xa1 = - line_w/2; - ya1 = - line_w/2; - xa2 = w + line_w/2; - ya2 = - line_w/2; - xa3 = w + line_w/2; - ya3 = h + line_w/2; - xa4 = - line_w/2; - ya4 = h + line_w/2; - - /* transform these points */ - gl_label_object_get_matrix (object, &matrix); - cairo_matrix_transform_point (&matrix, &xa1, &ya1); - cairo_matrix_transform_point (&matrix, &xa2, &ya2); - cairo_matrix_transform_point (&matrix, &xa3, &ya3); - cairo_matrix_transform_point (&matrix, &xa4, &ya4); - - /* now find the maximum extent of these points in x and y */ - region->x1 = MIN (xa1, MIN (xa2, MIN (xa3, xa4))) + object->priv->x; - region->y1 = MIN (ya1, MIN (ya2, MIN (ya3, ya4))) + object->priv->y; - region->x2 = MAX (xa1, MAX (xa2, MAX (xa3, xa4))) + object->priv->x; - region->y2 = MAX (ya1, MAX (ya2, MAX (ya3, ya4))) + object->priv->y; - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Can text properties be set for this object? */ -/*****************************************************************************/ -gboolean -gl_label_object_can_text (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_family != NULL ) { - - return TRUE; - - } else { - - return FALSE; - - } - -} - - -/*****************************************************************************/ -/* Set font family for all text contained in object. */ -/*****************************************************************************/ -void -gl_label_object_set_font_family (glLabelObject *object, - const gchar *font_family) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_family != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_font_family (object, font_family); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Set font size for all text contained in object. */ -/****************************************************************************/ -void -gl_label_object_set_font_size (glLabelObject *object, - gdouble font_size) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_size != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_font_size (object, font_size); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Set font weight for all text contained in object. */ -/****************************************************************************/ -void -gl_label_object_set_font_weight (glLabelObject *object, - PangoWeight font_weight) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_weight != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_font_weight (object, font_weight); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Set font italic flag for all text contained in object. */ -/****************************************************************************/ -void -gl_label_object_set_font_italic_flag (glLabelObject *object, - gboolean font_italic_flag) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_italic_flag != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_font_italic_flag (object, - font_italic_flag); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Set text alignment for all text contained in object. */ -/****************************************************************************/ -void -gl_label_object_set_text_alignment (glLabelObject *object, - PangoAlignment text_alignment) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_text_alignment != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_text_alignment (object, - text_alignment); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Set text line spacing for all text contained in object. */ -/****************************************************************************/ -void -gl_label_object_set_text_line_spacing (glLabelObject *object, - gdouble text_line_spacing) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_text_line_spacing != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_text_line_spacing (object, text_line_spacing); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Set text color for all text contained in object. */ -/****************************************************************************/ -void -gl_label_object_set_text_color (glLabelObject *object, - glColorNode *text_color_node) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_text_color != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_text_color (object, text_color_node); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Get font family for all text contained in object. */ -/*****************************************************************************/ -gchar * -gl_label_object_get_font_family (glLabelObject *object) -{ - gchar *ret = NULL; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), NULL); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_family != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_family (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/****************************************************************************/ -/* Get font size for all text contained in object. */ -/****************************************************************************/ -gdouble -gl_label_object_get_font_size (glLabelObject *object) -{ - gdouble ret = 0.0; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0.0); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_size != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_size (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/****************************************************************************/ -/* Get font weight for all text contained in object. */ -/****************************************************************************/ -PangoWeight -gl_label_object_get_font_weight (glLabelObject *object) -{ - PangoWeight ret = PANGO_WEIGHT_NORMAL; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), PANGO_WEIGHT_NORMAL); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_weight != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_weight (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/****************************************************************************/ -/* Get font italic flag for all text contained in object. */ -/****************************************************************************/ -gboolean -gl_label_object_get_font_italic_flag (glLabelObject *object) -{ - gboolean ret = FALSE; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_italic_flag != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_italic_flag (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/****************************************************************************/ -/* Get text alignment for all text contained in object. */ -/****************************************************************************/ -PangoAlignment -gl_label_object_get_text_alignment (glLabelObject *object) -{ - PangoAlignment ret = PANGO_ALIGN_LEFT; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), PANGO_ALIGN_LEFT); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_text_alignment != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_text_alignment (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/****************************************************************************/ -/* Get text line spacing for all text contained in object. */ -/****************************************************************************/ -gdouble -gl_label_object_get_text_line_spacing (glLabelObject *object) -{ - gdouble ret = 0.0; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0.0); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_text_line_spacing != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_text_line_spacing (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/****************************************************************************/ -/* Get text color for all text contained in object. */ -/****************************************************************************/ -glColorNode* -gl_label_object_get_text_color (glLabelObject *object) -{ - glColorNode *ret = NULL; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_text_color != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_text_color (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/*****************************************************************************/ -/* Can fill properties be set for this object? */ -/*****************************************************************************/ -gboolean -gl_label_object_can_fill (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_fill_color != NULL ) { - - return TRUE; - - } else { - - return FALSE; - - } - -} - - -/****************************************************************************/ -/* Set fill color for object. */ -/****************************************************************************/ -void -gl_label_object_set_fill_color (glLabelObject *object, - glColorNode *fill_color_node) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_fill_color != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_fill_color (object, fill_color_node); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Get fill color for object. */ -/****************************************************************************/ -glColorNode* -gl_label_object_get_fill_color (glLabelObject *object) -{ - glColorNode *ret = NULL; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_fill_color != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_fill_color (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/*****************************************************************************/ -/* Can line color property be set for this object? */ -/*****************************************************************************/ -gboolean -gl_label_object_can_line_color (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_line_color != NULL ) { - - return TRUE; - - } else { - - return FALSE; - - } - -} - - -/****************************************************************************/ -/* Set line color for object. */ -/****************************************************************************/ -void -gl_label_object_set_line_color (glLabelObject *object, - glColorNode *line_color_node) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_line_color != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_line_color (object, line_color_node); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Get line color for object. */ -/****************************************************************************/ -glColorNode* -gl_label_object_get_line_color (glLabelObject *object) -{ - glColorNode *ret = NULL; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_line_color != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_line_color (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/*****************************************************************************/ -/* Can line width property be set for this object? */ -/*****************************************************************************/ -gboolean -gl_label_object_can_line_width (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_line_width != NULL ) { - - return TRUE; - - } else { - - return FALSE; - - } - -} - - -/****************************************************************************/ -/* Set line width for object. */ -/****************************************************************************/ -void -gl_label_object_set_line_width (glLabelObject *object, - gdouble line_width) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_line_width != NULL ) { - - /* We have an object specific method, use it */ - GL_LABEL_OBJECT_GET_CLASS(object)->set_line_width (object, line_width); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Get line width for object. */ -/****************************************************************************/ -gdouble -gl_label_object_get_line_width (glLabelObject *object) -{ - gdouble ret = 0.0; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0.0); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_line_width != NULL ) { - - /* We have an object specific method, use it */ - ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_line_width (object); - - } - - gl_debug (DEBUG_LABEL, "END"); - - return ret; -} - - -/****************************************************************************/ -/* Set shadow state of object. */ -/****************************************************************************/ -void -gl_label_object_set_shadow_state (glLabelObject *object, - gboolean state) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if (object->priv->shadow_state != state) - { - object->priv->shadow_state = state; - gl_label_object_emit_changed (object); - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Get shadow state of object. */ -/****************************************************************************/ -gboolean -gl_label_object_get_shadow_state (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); - - return object->priv->shadow_state; -} - - -/****************************************************************************/ -/* Set offset of object's shadow. */ -/****************************************************************************/ -void -gl_label_object_set_shadow_offset (glLabelObject *object, - gdouble x, - gdouble y) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( (x != object->priv->shadow_x) || (y != object->priv->shadow_y) ) - { - object->priv->shadow_x = x; - object->priv->shadow_y = y; - - gl_label_object_emit_changed (object); - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Get offset of object's shadow. */ -/****************************************************************************/ -void -gl_label_object_get_shadow_offset (glLabelObject *object, - gdouble *x, - gdouble *y) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - *x = object->priv->shadow_x; - *y = object->priv->shadow_y; - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Set color of object's shadow. */ -/****************************************************************************/ -void -gl_label_object_set_shadow_color (glLabelObject *object, - glColorNode *color_node) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if ( !gl_color_node_equal (object->priv->shadow_color_node, color_node )) - { - gl_color_node_free (&(object->priv->shadow_color_node)); - object->priv->shadow_color_node = gl_color_node_dup (color_node); - gl_label_object_emit_changed (GL_LABEL_OBJECT(object)); - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Get color of object's shadow. */ -/****************************************************************************/ -glColorNode* -gl_label_object_get_shadow_color (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), NULL); - - return gl_color_node_dup (object->priv->shadow_color_node); -} - - -/****************************************************************************/ -/* Set opacity of object's shadow. */ -/****************************************************************************/ -void -gl_label_object_set_shadow_opacity (glLabelObject *object, - gdouble alpha) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if (object->priv->shadow_opacity != alpha) - { - object->priv->shadow_opacity = alpha; - gl_label_object_emit_changed (object); - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Get opacity of object's shadow. */ -/****************************************************************************/ -gdouble -gl_label_object_get_shadow_opacity (glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); - - return object->priv->shadow_opacity; -} - - -/****************************************************************************/ -/* Flip object horizontally. */ -/****************************************************************************/ -void -gl_label_object_flip_horiz (glLabelObject *object) -{ - cairo_matrix_t flip_matrix; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - cairo_matrix_init_scale (&flip_matrix, -1.0, 1.0); - cairo_matrix_multiply (&object->priv->matrix, &object->priv->matrix, &flip_matrix); - - g_signal_emit (G_OBJECT(object), signals[FLIP_ROTATE], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Flip object vertically. */ -/****************************************************************************/ -void -gl_label_object_flip_vert (glLabelObject *object) -{ - cairo_matrix_t flip_matrix; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - cairo_matrix_init_scale (&flip_matrix, 1.0, -1.0); - cairo_matrix_multiply (&object->priv->matrix, &object->priv->matrix, &flip_matrix); - - g_signal_emit (G_OBJECT(object), signals[FLIP_ROTATE], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Rotate object. */ -/****************************************************************************/ -void -gl_label_object_rotate (glLabelObject *object, - gdouble theta_degs) -{ - cairo_matrix_t rotate_matrix; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - cairo_matrix_init_rotate (&rotate_matrix, theta_degs*(G_PI/180.)); - cairo_matrix_multiply (&object->priv->matrix, &object->priv->matrix, &rotate_matrix); - - g_signal_emit (G_OBJECT(object), signals[FLIP_ROTATE], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Set raw affine */ -/****************************************************************************/ -void -gl_label_object_set_matrix (glLabelObject *object, - cairo_matrix_t *matrix) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - object->priv->matrix = *matrix; -} - - -/****************************************************************************/ -/* Get raw affine */ -/****************************************************************************/ -void -gl_label_object_get_matrix (glLabelObject *object, - cairo_matrix_t *matrix) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - *matrix = object->priv->matrix; -} - - -/****************************************************************************/ -/* Bring label object to front/top. */ -/****************************************************************************/ -void -gl_label_object_raise_to_top (glLabelObject *object) -{ - glLabel *label; - - gl_debug (DEBUG_LABEL, "START"); - - label = object->parent; - - gl_label_raise_object_to_top (label, object); - - g_signal_emit (G_OBJECT(object), signals[TOP], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Send label object to rear/bottom. */ -/****************************************************************************/ -void -gl_label_object_lower_to_bottom (glLabelObject *object) -{ - glLabel *label; - - gl_debug (DEBUG_LABEL, "START"); - - label = object->parent; - - gl_label_lower_object_to_bottom (label, object); - - g_signal_emit (G_OBJECT(object), signals[BOTTOM], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Label's merge data changed callback. */ -/*--------------------------------------------------------------------------*/ -static void -merge_changed_cb (glLabel *label, - glLabelObject *object) -{ - gl_label_object_emit_changed (object); -} - - -/*****************************************************************************/ -/* Draw object */ -/*****************************************************************************/ -void -gl_label_object_draw (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) - -{ - gdouble x0, y0; - cairo_matrix_t matrix; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - gl_label_object_get_position (object, &x0, &y0); - gl_label_object_get_matrix (object, &matrix); - - cairo_save (cr); - cairo_translate (cr, x0, y0); - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->draw_shadow != NULL ) { - - shadow_state = gl_label_object_get_shadow_state (object); - - if ( shadow_state ) - { - gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); - - cairo_save (cr); - cairo_translate (cr, shadow_x, shadow_y); - cairo_transform (cr, &matrix); - - GL_LABEL_OBJECT_GET_CLASS(object)->draw_shadow (object, - cr, - screen_flag, - record); - - cairo_restore (cr); - } - } - - if ( GL_LABEL_OBJECT_GET_CLASS(object)->draw_object != NULL ) { - - cairo_save (cr); - cairo_transform (cr, &matrix); - - GL_LABEL_OBJECT_GET_CLASS(object)->draw_object (object, - cr, - screen_flag, - record); - - cairo_restore (cr); - } - - cairo_restore (cr); - - gl_debug (DEBUG_LABEL, "END"); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-object.h b/glabels2/src/label-object.h deleted file mode 100644 index 15cc5e9c..00000000 --- a/glabels2/src/label-object.h +++ /dev/null @@ -1,353 +0,0 @@ -/* - * label-object.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __LABEL_OBJECT_H__ -#define __LABEL_OBJECT_H__ - -#include -#include -#include - -G_BEGIN_DECLS - -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; - - -#define GL_TYPE_LABEL_OBJECT (gl_label_object_get_type ()) -#define GL_LABEL_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_OBJECT, glLabelObject)) -#define GL_LABEL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_OBJECT, glLabelObjectClass)) -#define GL_IS_LABEL_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_OBJECT)) -#define GL_IS_LABEL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_OBJECT)) -#define GL_LABEL_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_LABEL_OBJECT, glLabelObjectClass)) - - -typedef struct _glLabelObject glLabelObject; -typedef struct _glLabelObjectClass glLabelObjectClass; - -typedef struct _glLabelObjectPrivate glLabelObjectPrivate; - -#include "label.h" -#include "color.h" - -struct _glLabelObject { - GObject object; - - glLabel *parent; - - glLabelObjectPrivate *priv; -}; - -struct _glLabelObjectClass { - GObjectClass parent_class; - - /* - * Methods - */ - - void (*set_size) (glLabelObject *object, - gdouble w, - gdouble h); - - void (*get_size) (glLabelObject *object, - gdouble *w, - gdouble *h); - - void (*set_font_family) (glLabelObject *object, - const gchar *font_family); - - void (*set_font_size) (glLabelObject *object, - gdouble font_size); - - void (*set_font_weight) (glLabelObject *object, - PangoWeight font_weight); - - void (*set_font_italic_flag) (glLabelObject *object, - gboolean font_italic_flag); - - void (*set_text_alignment) (glLabelObject *object, - PangoAlignment text_alignment); - - void (*set_text_line_spacing) (glLabelObject *object, - gdouble text_line_spacing); - - void (*set_text_color) (glLabelObject *object, - glColorNode *text_color_node); - - void (*set_fill_color) (glLabelObject *object, - glColorNode *fill_color_node); - - void (*set_line_color) (glLabelObject *object, - glColorNode *line_color_node); - - void (*set_line_width) (glLabelObject *object, - gdouble line_width); - - gchar *(*get_font_family) (glLabelObject *object); - - gdouble (*get_font_size) (glLabelObject *object); - - PangoWeight (*get_font_weight) (glLabelObject *object); - - gboolean (*get_font_italic_flag) (glLabelObject *object); - - PangoAlignment (*get_text_alignment) (glLabelObject *object); - - gdouble (*get_text_line_spacing) (glLabelObject *object); - - glColorNode* (*get_text_color) (glLabelObject *object); - - glColorNode* (*get_fill_color) (glLabelObject *object); - - glColorNode* (*get_line_color) (glLabelObject *object); - - gdouble (*get_line_width) (glLabelObject *object); - - void (*copy) (glLabelObject *dst_object, - glLabelObject *src_object); - - /* - * Draw methods - */ - void (*draw_shadow) (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - - void (*draw_object) (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - - - /* - * Signals - */ - void (*changed) (glLabelObject *object, - gpointer user_data); - - void (*moved) (glLabelObject *object, - gdouble dx, - gdouble dy, - gpointer user_data); - - void (*flip_rotate) (glLabelObject *object, - gpointer user_data); - - void (*top) (glLabelObject *object, - gpointer user_data); - - void (*bottom) (glLabelObject *object, - gpointer user_data); - - void (*removed) (glLabelObject *object, - gpointer user_data); - -}; - -GType gl_label_object_get_type (void) G_GNUC_CONST; - -GObject *gl_label_object_new (glLabel *label); - - -glLabelObject *gl_label_object_dup (glLabelObject *src_object, - glLabel *label); - -void gl_label_object_emit_changed (glLabelObject *object); - - -void gl_label_object_set_parent (glLabelObject *object, - glLabel *label); - -glLabel *gl_label_object_get_parent (glLabelObject *object); - - -void gl_label_object_remove (glLabelObject *object); - -void gl_label_object_set_name (glLabelObject *object, - gchar *name); - -gchar *gl_label_object_get_name (glLabelObject *object); - - -void gl_label_object_set_position (glLabelObject *object, - gdouble x, - gdouble y); - -void gl_label_object_set_position_relative (glLabelObject *object, - gdouble dx, - gdouble dy); - -void gl_label_object_get_position (glLabelObject *object, - gdouble *x, - gdouble *y); - -void gl_label_object_set_size (glLabelObject *object, - gdouble w, - gdouble h); - -void gl_label_object_set_size_honor_aspect (glLabelObject *object, - gdouble w, - gdouble h); - -void gl_label_object_get_size (glLabelObject *object, - gdouble *w, - gdouble *h); - -void gl_label_object_get_raw_size (glLabelObject *object, - gdouble *w, - gdouble *h); - -void gl_label_object_get_extent (glLabelObject *object, - glLabelRegion *region); - -gboolean gl_label_object_can_text (glLabelObject *object); - -void gl_label_object_set_font_family (glLabelObject *object, - const gchar *font_family); - -void gl_label_object_set_font_size (glLabelObject *object, - gdouble font_size); - -void gl_label_object_set_font_weight (glLabelObject *object, - PangoWeight font_weight); - -void gl_label_object_set_font_italic_flag (glLabelObject *object, - gboolean font_italic_flag); - -void gl_label_object_set_text_alignment (glLabelObject *object, - PangoAlignment text_alignment); - -void gl_label_object_set_text_color (glLabelObject *object, - glColorNode *text_color_node); - -void gl_label_object_set_text_line_spacing (glLabelObject *object, - gdouble text_line_spacing); - - -gchar *gl_label_object_get_font_family (glLabelObject *object); - -gdouble gl_label_object_get_font_size (glLabelObject *object); - -PangoWeight gl_label_object_get_font_weight (glLabelObject *object); - -gboolean gl_label_object_get_font_italic_flag (glLabelObject *object); - -PangoAlignment gl_label_object_get_text_alignment (glLabelObject *object); - -gdouble gl_label_object_get_text_line_spacing (glLabelObject *object); - -glColorNode *gl_label_object_get_text_color (glLabelObject *object); - - -gboolean gl_label_object_can_fill (glLabelObject *object); - -void gl_label_object_set_fill_color (glLabelObject *object, - glColorNode *fill_color_node); - -glColorNode* gl_label_object_get_fill_color (glLabelObject *object); - - -gboolean gl_label_object_can_line_color (glLabelObject *object); - -void gl_label_object_set_line_color (glLabelObject *object, - glColorNode *line_color_node); - -glColorNode *gl_label_object_get_line_color (glLabelObject *object); - -gboolean gl_label_object_can_line_width (glLabelObject *object); - -void gl_label_object_set_line_width (glLabelObject *object, - gdouble line_width); - -gdouble gl_label_object_get_line_width (glLabelObject *object); - - -void gl_label_object_raise_to_top (glLabelObject *object); - -void gl_label_object_lower_to_bottom (glLabelObject *object); - - -void gl_label_object_flip_horiz (glLabelObject *object); - -void gl_label_object_flip_vert (glLabelObject *object); - -void gl_label_object_rotate (glLabelObject *object, - gdouble theta_degs); - -void gl_label_object_set_matrix (glLabelObject *object, - cairo_matrix_t *matrix); - -void gl_label_object_get_matrix (glLabelObject *object, - cairo_matrix_t *matrix); - -void gl_label_object_set_shadow_state (glLabelObject *object, - gboolean state); - -void gl_label_object_set_shadow_offset (glLabelObject *object, - gdouble x, - gdouble y); - -void gl_label_object_set_shadow_color (glLabelObject *object, - glColorNode *color_node); - -void gl_label_object_set_shadow_opacity (glLabelObject *object, - gdouble alpha); - -gboolean gl_label_object_get_shadow_state (glLabelObject *object); - -void gl_label_object_get_shadow_offset (glLabelObject *object, - gdouble *x, - gdouble *y); - -glColorNode* gl_label_object_get_shadow_color (glLabelObject *object); - -gdouble gl_label_object_get_shadow_opacity (glLabelObject *object); - -void gl_label_object_draw (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - - - - -G_END_DECLS - -#endif /* __LABEL_OBJECT_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-text.c b/glabels2/src/label-text.c deleted file mode 100644 index d7497624..00000000 --- a/glabels2/src/label-text.c +++ /dev/null @@ -1,1055 +0,0 @@ -/* - * label-text.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "label-text.h" - -#include -#include -#include -#include - -#include "font-util.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - -#define DEFAULT_FONT_FAMILY "Sans" -#define DEFAULT_FONT_SIZE 14.0 -#define DEFAULT_FONT_WEIGHT PANGO_WEIGHT_NORMAL -#define DEFAULT_FONT_ITALIC_FLAG FALSE -#define DEFAULT_ALIGN PANGO_ALIGN_LEFT -#define DEFAULT_COLOR GL_COLOR (0,0,0) -#define DEFAULT_TEXT_LINE_SPACING 1.0 -#define DEFAULT_AUTO_SHRINK FALSE - -#define FONT_SCALE (72.0/96.0) - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glLabelTextPrivate { - GtkTextTagTable *tag_table; - GtkTextBuffer *buffer; - - gchar *font_family; - gdouble font_size; - PangoWeight font_weight; - gboolean font_italic_flag; - PangoAlignment align; - glColorNode *color_node; - gdouble line_spacing; - gboolean auto_shrink; - - gboolean size_changed; - gdouble w; - gdouble h; -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_label_text_finalize (GObject *object); - -static void copy (glLabelObject *dst_object, - glLabelObject *src_object); - -static void buffer_changed_cb (GtkTextBuffer *textbuffer, - glLabelText *ltext); - -static void get_size (glLabelObject *object, - gdouble *w, - gdouble *h); - -static void set_font_family (glLabelObject *object, - const gchar *font_family); - -static void set_font_size (glLabelObject *object, - gdouble font_size); - -static void set_font_weight (glLabelObject *object, - PangoWeight font_weight); - -static void set_font_italic_flag (glLabelObject *object, - gboolean font_italic_flag); - -static void set_text_alignment (glLabelObject *object, - PangoAlignment text_alignment); - -static void set_text_line_spacing (glLabelObject *object, - gdouble text_line_spacing); - -static void set_text_color (glLabelObject *object, - glColorNode *text_color_node); - -static gchar *get_font_family (glLabelObject *object); - -static gdouble get_font_size (glLabelObject *object); - -static PangoWeight get_font_weight (glLabelObject *object); - -static gboolean get_font_italic_flag (glLabelObject *object); - -static PangoAlignment get_text_alignment (glLabelObject *object); - -static gdouble get_text_line_spacing (glLabelObject *object); - -static glColorNode* get_text_color (glLabelObject *object); - -static void draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - -static void draw_shadow (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - -static void draw_text_real (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record, - guint color); - -static gdouble auto_shrink_font_size (cairo_t *cr, - gchar *family, - gdouble size, - PangoWeight weight, - PangoStyle style, - gchar *text, - gdouble width); - - -/*****************************************************************************/ -/* Object infrastructure. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glLabelText, gl_label_text, GL_TYPE_LABEL_OBJECT); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_label_text_class_init (glLabelTextClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); - - gl_label_text_parent_class = g_type_class_peek_parent (class); - - label_object_class->copy = copy; - - label_object_class->get_size = get_size; - - label_object_class->set_font_family = set_font_family; - label_object_class->set_font_size = set_font_size; - label_object_class->set_font_weight = set_font_weight; - label_object_class->set_font_italic_flag = set_font_italic_flag; - label_object_class->set_text_alignment = set_text_alignment; - label_object_class->set_text_line_spacing = set_text_line_spacing; - label_object_class->set_text_color = set_text_color; - label_object_class->get_font_family = get_font_family; - label_object_class->get_font_size = get_font_size; - label_object_class->get_font_weight = get_font_weight; - label_object_class->get_font_italic_flag = get_font_italic_flag; - label_object_class->get_text_alignment = get_text_alignment; - label_object_class->get_text_line_spacing = get_text_line_spacing; - label_object_class->get_text_color = get_text_color; - label_object_class->draw_object = draw_object; - label_object_class->draw_shadow = draw_shadow; - - object_class->finalize = gl_label_text_finalize; -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_label_text_init (glLabelText *ltext) -{ - ltext->priv = g_new0 (glLabelTextPrivate, 1); - - ltext->priv->tag_table = gtk_text_tag_table_new (); - ltext->priv->buffer = gtk_text_buffer_new (ltext->priv->tag_table); - - ltext->priv->font_family = g_strdup(DEFAULT_FONT_FAMILY); - ltext->priv->font_size = DEFAULT_FONT_SIZE; - ltext->priv->font_weight = DEFAULT_FONT_WEIGHT; - ltext->priv->font_italic_flag = DEFAULT_FONT_ITALIC_FLAG; - ltext->priv->align = DEFAULT_ALIGN; - ltext->priv->color_node = gl_color_node_new_default (); - ltext->priv->color_node->color = DEFAULT_COLOR; - ltext->priv->line_spacing = DEFAULT_TEXT_LINE_SPACING; - ltext->priv->auto_shrink = DEFAULT_AUTO_SHRINK; - - ltext->priv->size_changed = TRUE; - - g_signal_connect (G_OBJECT(ltext->priv->buffer), "changed", - G_CALLBACK(buffer_changed_cb), ltext); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_label_text_finalize (GObject *object) -{ - glLabelText *ltext = GL_LABEL_TEXT (object); - - g_return_if_fail (object && GL_IS_LABEL_TEXT (object)); - - g_object_unref (ltext->priv->tag_table); - g_object_unref (ltext->priv->buffer); - g_free (ltext->priv->font_family); - gl_color_node_free (&(ltext->priv->color_node)); - g_free (ltext->priv); - - G_OBJECT_CLASS (gl_label_text_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GObject * -gl_label_text_new (glLabel *label) -{ - glLabelText *ltext; - - ltext = g_object_new (gl_label_text_get_type(), NULL); - - gl_label_object_set_parent (GL_LABEL_OBJECT(ltext), label); - - return G_OBJECT (ltext); -} - - -/*****************************************************************************/ -/* Copy object contents. */ -/*****************************************************************************/ -static void -copy (glLabelObject *dst_object, - glLabelObject *src_object) -{ - glLabelText *ltext = (glLabelText *)src_object; - glLabelText *new_ltext = (glLabelText *)dst_object; - GList *lines; - glColorNode *text_color_node; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - g_return_if_fail (new_ltext && GL_IS_LABEL_TEXT (new_ltext)); - - lines = gl_label_text_get_lines (ltext); - text_color_node = get_text_color (src_object); - gl_label_text_set_lines (new_ltext, lines); - - new_ltext->priv->font_family = g_strdup (ltext->priv->font_family); - new_ltext->priv->font_size = ltext->priv->font_size; - new_ltext->priv->font_weight = ltext->priv->font_weight; - new_ltext->priv->font_italic_flag = ltext->priv->font_italic_flag; - set_text_color (dst_object, text_color_node); - new_ltext->priv->align = ltext->priv->align; - new_ltext->priv->line_spacing = ltext->priv->line_spacing; - new_ltext->priv->auto_shrink = ltext->priv->auto_shrink; - - new_ltext->priv->size_changed = ltext->priv->size_changed; - new_ltext->priv->w = ltext->priv->w; - new_ltext->priv->h = ltext->priv->h; - - gl_color_node_free (&text_color_node); - gl_text_node_lines_free (&lines); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set object params. */ -/*****************************************************************************/ -void -gl_label_text_set_lines (glLabelText *ltext, - GList *lines) -{ - gchar *text; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - - text = gl_text_node_lines_expand (lines, NULL); - gtk_text_buffer_set_text (ltext->priv->buffer, text, -1); - g_free (text); - - ltext->priv->size_changed = TRUE; - - gl_debug (DEBUG_LABEL, "END"); -} - -/*****************************************************************************/ -/* Get object params. */ -/*****************************************************************************/ -GtkTextBuffer * -gl_label_text_get_buffer (glLabelText *ltext) -{ - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), NULL); - - return ltext->priv->buffer; -} - - -GList * -gl_label_text_get_lines (glLabelText *ltext) -{ - GtkTextIter start, end; - gchar *text; - GList *lines; - - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), NULL); - - gtk_text_buffer_get_bounds (ltext->priv->buffer, &start, &end); - text = gtk_text_buffer_get_text (ltext->priv->buffer, - &start, &end, FALSE); - lines = gl_text_node_lines_new_from_text (text); - g_free (text); - - return lines; -} - - -/*****************************************************************************/ -/* Text buffer "changed" callback. */ -/*****************************************************************************/ -static void -buffer_changed_cb (GtkTextBuffer *textbuffer, - glLabelText *ltext) -{ - ltext->priv->size_changed = TRUE; - - gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); -} - - -/*****************************************************************************/ -/* Get object size method. */ -/*****************************************************************************/ -static void -get_size (glLabelObject *object, - gdouble *w, - gdouble *h) -{ - glLabelText *ltext = (glLabelText *)object; - PangoFontMap *fontmap; - PangoContext *context; - cairo_font_options_t *options; - PangoStyle style; - PangoLayout *layout; - PangoFontDescription *desc; - gdouble font_size; - gdouble line_spacing; - GtkTextIter start, end; - gchar *text; - gdouble w_parent, h_parent; - gint iw, ih; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - - gl_label_object_get_raw_size (object, &w_parent, &h_parent); - - if ( (w_parent != 0.0) || (h_parent != 0.0) ) { - *w = w_parent; - *h = h_parent; - return; - } - - if (!ltext->priv->size_changed) - { - *w = ltext->priv->w; - *h = ltext->priv->h; - return; - } - - font_size = GL_LABEL_TEXT (object)->priv->font_size * FONT_SCALE; - line_spacing = GL_LABEL_TEXT (object)->priv->line_spacing; - - gtk_text_buffer_get_bounds (ltext->priv->buffer, &start, &end); - text = gtk_text_buffer_get_text (ltext->priv->buffer, - &start, &end, FALSE); - - - fontmap = pango_cairo_font_map_new (); - context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fontmap)); - options = cairo_font_options_create (); - cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE); - pango_cairo_context_set_font_options (context, options); - cairo_font_options_destroy (options); - - layout = pango_layout_new (context); - - style = GL_LABEL_TEXT (object)->priv->font_italic_flag ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL; - - desc = pango_font_description_new (); - pango_font_description_set_family (desc, GL_LABEL_TEXT (object)->priv->font_family); - pango_font_description_set_weight (desc, GL_LABEL_TEXT (object)->priv->font_weight); - pango_font_description_set_style (desc, style); - pango_font_description_set_size (desc, font_size * PANGO_SCALE); - pango_layout_set_font_description (layout, desc); - pango_font_description_free (desc); - - pango_layout_set_spacing (layout, font_size * (line_spacing-1) * PANGO_SCALE); - pango_layout_set_text (layout, text, -1); - pango_layout_get_size (layout, &iw, &ih); - *w = ltext->priv->w = iw / PANGO_SCALE + 2*GL_LABEL_TEXT_MARGIN; - *h = ltext->priv->h = ih / PANGO_SCALE; - ltext->priv->size_changed = FALSE; - - g_object_unref (layout); - g_object_unref (context); - g_object_unref (fontmap); - g_free (text); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set font family method. */ -/*****************************************************************************/ -static void -set_font_family (glLabelObject *object, - const gchar *font_family) -{ - glLabelText *ltext = (glLabelText *)object; - gchar *good_font_family; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - g_return_if_fail (font_family); - - good_font_family = gl_font_util_validate_family (font_family); - - if (ltext->priv->font_family) { - if (strcmp (ltext->priv->font_family, good_font_family) == 0) { - g_free (good_font_family); - gl_debug (DEBUG_LABEL, "END (no change)"); - return; - } - g_free (ltext->priv->font_family); - } - ltext->priv->font_family = g_strdup (good_font_family); - g_free (good_font_family); - - gl_debug (DEBUG_LABEL, "new font family = %s", ltext->priv->font_family); - - ltext->priv->size_changed = TRUE; - - gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set font size method. */ -/*****************************************************************************/ -static void -set_font_size (glLabelObject *object, - gdouble font_size) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - - if (ltext->priv->font_size != font_size) { - - ltext->priv->size_changed = TRUE; - - ltext->priv->font_size = font_size; - gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set font weight method. */ -/*****************************************************************************/ -static void -set_font_weight (glLabelObject *object, - PangoWeight font_weight) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - - if (ltext->priv->font_weight != font_weight) { - - ltext->priv->size_changed = TRUE; - - ltext->priv->font_weight = font_weight; - gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set font italic flag method. */ -/*****************************************************************************/ -static void -set_font_italic_flag (glLabelObject *object, - gboolean font_italic_flag) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - - if (ltext->priv->font_italic_flag != font_italic_flag) { - - ltext->priv->size_changed = TRUE; - - ltext->priv->font_italic_flag = font_italic_flag; - gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set text alignment method. */ -/*****************************************************************************/ -static void -set_text_alignment (glLabelObject *object, - PangoAlignment text_alignment) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - - if (ltext->priv->align != text_alignment) { - - ltext->priv->size_changed = TRUE; - - ltext->priv->align = text_alignment; - gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set text line spacing method. */ -/*****************************************************************************/ -static void -set_text_line_spacing (glLabelObject *object, - gdouble line_spacing) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - - if (ltext->priv->line_spacing != line_spacing) { - - ltext->priv->size_changed = TRUE; - - ltext->priv->line_spacing = line_spacing; - gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Set text color method. */ -/*****************************************************************************/ -static void -set_text_color (glLabelObject *object, - glColorNode *text_color_node) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - - if (!gl_color_node_equal (ltext->priv->color_node, text_color_node)) { - - gl_color_node_free (&(ltext->priv->color_node)); - ltext->priv->color_node = gl_color_node_dup (text_color_node); - - gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Get font family method. */ -/*****************************************************************************/ -static gchar * -get_font_family (glLabelObject *object) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), NULL); - - return g_strdup (ltext->priv->font_family); -} - - -/*****************************************************************************/ -/* Get font size method. */ -/*****************************************************************************/ -static gdouble -get_font_size (glLabelObject *object) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0.0); - - return ltext->priv->font_size; -} - - -/*****************************************************************************/ -/* Get font weight method. */ -/*****************************************************************************/ -static PangoWeight -get_font_weight (glLabelObject *object) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), PANGO_WEIGHT_NORMAL); - - return ltext->priv->font_weight; -} - - -/*****************************************************************************/ -/* Get font italic flag method. */ -/*****************************************************************************/ -static gboolean -get_font_italic_flag (glLabelObject *object) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), FALSE); - - return ltext->priv->font_italic_flag; -} - - -/*****************************************************************************/ -/* Get text alignment method. */ -/*****************************************************************************/ -static PangoAlignment -get_text_alignment (glLabelObject *object) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), GTK_JUSTIFY_LEFT); - - return ltext->priv->align; -} - - -/*****************************************************************************/ -/* Get text line spacing method. */ -/*****************************************************************************/ -static gdouble -get_text_line_spacing (glLabelObject *object) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0.0); - - return ltext->priv->line_spacing; -} - - -/*****************************************************************************/ -/* Get text color method. */ -/*****************************************************************************/ -static glColorNode* -get_text_color (glLabelObject *object) -{ - glLabelText *ltext = (glLabelText *)object; - - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0); - - return gl_color_node_dup (ltext->priv->color_node); -} - - -/*****************************************************************************/ -/* Set auto shrink flag. */ -/*****************************************************************************/ -void -gl_label_text_set_auto_shrink (glLabelText *ltext, - gboolean auto_shrink) -{ - gl_debug (DEBUG_LABEL, "BEGIN"); - - g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); - - if (ltext->priv->auto_shrink != auto_shrink) { - - ltext->priv->auto_shrink = auto_shrink; - gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Query auto shrink flag. */ -/*****************************************************************************/ -gboolean -gl_label_text_get_auto_shrink (glLabelText *ltext) -{ - gl_debug (DEBUG_LABEL, ""); - - g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0); - - return ltext->priv->auto_shrink; -} - - -/*****************************************************************************/ -/* Draw object method. */ -/*****************************************************************************/ -static void -draw_object (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - glColorNode *color_node; - guint color; - - gl_debug (DEBUG_LABEL, "START"); - - color_node = gl_label_object_get_text_color (object); - color = gl_color_node_expand (color_node, record); - if (color_node->field_flag && screen_flag) - { - color = GL_COLOR_MERGE_DEFAULT; - } - gl_color_node_free (&color_node); - - draw_text_real (object, cr, screen_flag, record, color); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Draw shadow method. */ -/*****************************************************************************/ -static void -draw_shadow (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - glColorNode *color_node; - guint color; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - guint shadow_color; - - gl_debug (DEBUG_LABEL, "START"); - - color_node = gl_label_object_get_text_color (object); - color = gl_color_node_expand (color_node, record); - if (color_node->field_flag && screen_flag) - { - color = GL_COLOR_MERGE_DEFAULT; - } - gl_color_node_free (&color_node); - - shadow_color_node = gl_label_object_get_shadow_color (object); - if (shadow_color_node->field_flag) - { - shadow_color_node->color = GL_COLOR_SHADOW_MERGE_DEFAULT; - } - shadow_opacity = gl_label_object_get_shadow_opacity (object); - shadow_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, color); - gl_color_node_free (&shadow_color_node); - - draw_text_real (object, cr, screen_flag, record, shadow_color); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Draw text. */ -/*****************************************************************************/ -static void -draw_text_real (glLabelObject *object, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record, - guint color) -{ - gdouble x0, y0; - cairo_matrix_t matrix; - gdouble object_w, object_h; - gdouble raw_w, raw_h; - gchar *text; - GList *lines; - gchar *font_family; - gdouble font_size; - PangoWeight font_weight; - gboolean font_italic_flag; - gboolean auto_shrink; - gdouble text_line_spacing; - PangoAlignment alignment; - PangoStyle style; - PangoLayout *layout; - PangoFontDescription *desc; - gdouble scale_x, scale_y; - cairo_font_options_t *font_options; - PangoContext *context; - - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_object_get_position (object, &x0, &y0); - gl_label_object_get_matrix (object, &matrix); - - gl_label_object_get_size (object, &object_w, &object_h); - gl_label_object_get_raw_size (object, &raw_w, &raw_h); - lines = gl_label_text_get_lines (GL_LABEL_TEXT (object)); - font_family = gl_label_object_get_font_family (object); - font_size = gl_label_object_get_font_size (object) * FONT_SCALE; - font_weight = gl_label_object_get_font_weight (object); - font_italic_flag = gl_label_object_get_font_italic_flag (object); - - alignment = gl_label_object_get_text_alignment (object); - text_line_spacing = - gl_label_object_get_text_line_spacing (object); - auto_shrink = gl_label_text_get_auto_shrink (GL_LABEL_TEXT (object)); - - text = gl_text_node_lines_expand (lines, record); - - style = font_italic_flag ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL; - - - if (!screen_flag && record && auto_shrink && (raw_w != 0.0)) - { - font_size = auto_shrink_font_size (cr, - font_family, - font_size, - font_weight, - style, - text, - object_w); - } - - - /* - * Workaround for pango Bug#341481. - * Render font at device scale and scale font size accordingly. - */ - scale_x = 1.0; - scale_y = 1.0; - cairo_device_to_user_distance (cr, &scale_x, &scale_y); - scale_x = fabs (scale_x); - scale_y = fabs (scale_y); - cairo_save (cr); - cairo_scale (cr, scale_x, scale_y); - - layout = pango_cairo_create_layout (cr); - - font_options = cairo_font_options_create (); - cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE); - context = pango_layout_get_context (layout); - pango_cairo_context_set_font_options (context, font_options); - cairo_font_options_destroy (font_options); - - desc = pango_font_description_new (); - pango_font_description_set_family (desc, font_family); - pango_font_description_set_weight (desc, font_weight); - pango_font_description_set_style (desc, style); - pango_font_description_set_size (desc, font_size * PANGO_SCALE / scale_x); - pango_layout_set_font_description (layout, desc); - pango_font_description_free (desc); - - pango_layout_set_text (layout, text, -1); - pango_layout_set_spacing (layout, font_size * (text_line_spacing-1) * PANGO_SCALE / scale_x); - if (raw_w == 0.0) - { - pango_layout_set_width (layout, -1); - } - else - { - pango_layout_set_width (layout, object_w * PANGO_SCALE / scale_x); - } - pango_layout_set_wrap (layout, PANGO_WRAP_CHAR); - pango_layout_set_alignment (layout, alignment); - - - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (color)); - cairo_move_to (cr, GL_LABEL_TEXT_MARGIN/scale_x, 0); - pango_cairo_show_layout (cr, layout); - - cairo_restore (cr); - - g_object_unref (layout); - - - gl_text_node_lines_free (&lines); - g_free (font_family); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Automatically shrink text size to fit within horizontal width. */ -/*****************************************************************************/ -static gdouble -auto_shrink_font_size (cairo_t *cr, - gchar *family, - gdouble size, - PangoWeight weight, - PangoStyle style, - gchar *text, - gdouble width) -{ - PangoLayout *layout; - PangoFontDescription *desc; - gint iw, ih; - gdouble layout_width; - gdouble new_size; - - layout = pango_cairo_create_layout (cr); - - desc = pango_font_description_new (); - pango_font_description_set_family (desc, family); - pango_font_description_set_weight (desc, weight); - pango_font_description_set_style (desc, style); - pango_font_description_set_size (desc, size * PANGO_SCALE); - - pango_layout_set_font_description (layout, desc); - pango_font_description_free (desc); - - pango_layout_set_text (layout, text, -1); - pango_layout_set_width (layout, -1); - pango_layout_get_size (layout, &iw, &ih); - layout_width = (gdouble)iw / (gdouble)PANGO_SCALE; - - g_object_unref (layout); - - g_print ("Object w = %g, layout w = %g\n", width, layout_width); - - if ( layout_width > width ) - { - /* Scale down. */ - new_size = size * (width-2*GL_LABEL_TEXT_MARGIN)/layout_width; - - /* Round down to nearest 1/2 point */ - new_size = (int)(new_size*2.0) / 2.0; - - /* don't get ridiculously small. */ - if (new_size < 1.0) - { - new_size = 1.0; - } - } - else - { - new_size = size; - } - - return new_size; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label-text.h b/glabels2/src/label-text.h deleted file mode 100644 index 9c7ce435..00000000 --- a/glabels2/src/label-text.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * label-text.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __LABEL_TEXT_H__ -#define __LABEL_TEXT_H__ - -#include -#include "text-node.h" -#include "label-object.h" - -G_BEGIN_DECLS - -#define GL_LABEL_TEXT_MARGIN 3.0 - - -#define GL_TYPE_LABEL_TEXT (gl_label_text_get_type ()) -#define GL_LABEL_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_TEXT, glLabelText)) -#define GL_LABEL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_TEXT, glLabelTextClass)) -#define GL_IS_LABEL_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_TEXT)) -#define GL_IS_LABEL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_TEXT)) -#define GL_COLOR_COMBO_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_LABEL_TEXT, glLabelTextClass)) - - -typedef struct _glLabelText glLabelText; -typedef struct _glLabelTextPrivate glLabelTextPrivate; -typedef struct _glLabelTextClass glLabelTextClass; - - -struct _glLabelText { - glLabelObject object; - - glLabelTextPrivate *priv; -}; - -struct _glLabelTextClass { - glLabelObjectClass parent_class; -}; - - -GType gl_label_text_get_type (void) G_GNUC_CONST; - -GObject *gl_label_text_new (glLabel *label); - -void gl_label_text_set_lines (glLabelText *ltext, - GList *lines); - -GtkTextBuffer *gl_label_text_get_buffer (glLabelText *ltext); - -GList *gl_label_text_get_lines (glLabelText *ltext); - -void gl_label_text_set_auto_shrink (glLabelText *ltext, - gboolean auto_shrink); - -gboolean gl_label_text_get_auto_shrink (glLabelText *ltext); - - -G_END_DECLS - -#endif /* __LABEL_TEXT_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label.c b/glabels2/src/label.c deleted file mode 100644 index 659c1107..00000000 --- a/glabels2/src/label.c +++ /dev/null @@ -1,707 +0,0 @@ -/* - * label.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "label.h" - -#include - -#include "prefs.h" -#include "file-util.h" -#include "marshal.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glLabelPrivate { - - gchar *filename; - gint compression; - gboolean modified_flag; - gint untitled_instance; - - glMerge *merge; - - GHashTable *pixbuf_cache; -}; - -enum { - CHANGED, - NAME_CHANGED, - MODIFIED_CHANGED, - MERGE_CHANGED, - SIZE_CHANGED, - OBJECT_ADDED, - LAST_SIGNAL -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static guint signals[LAST_SIGNAL] = {0}; - -static guint untitled = 0; - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_label_finalize (GObject *object); - -static void object_changed_cb (glLabelObject *object, - glLabel *label); - -static void object_moved_cb (glLabelObject *object, - gdouble x, - gdouble y, - glLabel *label); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glLabel, gl_label, G_TYPE_OBJECT); - - -static void -gl_label_class_init (glLabelClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_LABEL, "START"); - - gl_label_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_label_finalize; - - signals[CHANGED] = - g_signal_new ("changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelClass, changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - signals[NAME_CHANGED] = - g_signal_new ("name_changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelClass, name_changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - signals[MODIFIED_CHANGED] = - g_signal_new ("modified_changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelClass, modified_changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - signals[MERGE_CHANGED] = - g_signal_new ("merge_changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelClass, merge_changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - signals[SIZE_CHANGED] = - g_signal_new ("size_changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelClass, size_changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - signals[OBJECT_ADDED] = - g_signal_new ("object_added", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glLabelClass, object_added), - NULL, NULL, - gl_marshal_VOID__OBJECT, - G_TYPE_NONE, - 1, G_TYPE_OBJECT); - - gl_debug (DEBUG_LABEL, "END"); -} - - -static void -gl_label_init (glLabel *label) -{ - gl_debug (DEBUG_LABEL, "START"); - - label->template = NULL; - label->rotate_flag = FALSE; - label->objects = NULL; - - label->priv = g_new0 (glLabelPrivate, 1); - - label->priv->filename = NULL; - label->priv->merge = NULL; - label->priv->pixbuf_cache = gl_pixbuf_cache_new (); - - gl_debug (DEBUG_LABEL, "END"); -} - - -static void -gl_label_finalize (GObject *object) -{ - glLabel *label = GL_LABEL (object); - GList *p, *p_next; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (object && GL_IS_LABEL (object)); - - for (p = label->objects; p != NULL; p = p_next) { - p_next = p->next; /* NOTE: p will be left dangling */ - g_object_unref (G_OBJECT(p->data)); - } - - lgl_template_free (label->template); - g_free (label->priv->filename); - if (label->priv->merge != NULL) { - g_object_unref (G_OBJECT(label->priv->merge)); - } - gl_pixbuf_cache_free (label->priv->pixbuf_cache); - - g_free (label->priv); - - G_OBJECT_CLASS (gl_label_parent_class)->finalize (object); - - gl_debug (DEBUG_LABEL, "END"); -} - - -GObject * -gl_label_new (void) -{ - glLabel *label; - - gl_debug (DEBUG_LABEL, "START"); - - label = g_object_new (gl_label_get_type(), NULL); - - label->priv->compression = 9; - - label->priv->modified_flag = FALSE; - - gl_debug (DEBUG_LABEL, "END"); - - return G_OBJECT (label); -} - - -/*****************************************************************************/ -/* Add object to label. */ -/*****************************************************************************/ -void -gl_label_add_object (glLabel *label, - glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (label && GL_IS_LABEL (label)); - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - object->parent = label; - label->objects = g_list_append (label->objects, g_object_ref (object)); - - label->priv->modified_flag = TRUE; - - g_signal_emit (G_OBJECT(label), signals[OBJECT_ADDED], 0, object); - g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - - g_signal_connect (G_OBJECT(object), "changed", - G_CALLBACK(object_changed_cb), label); - - g_signal_connect (G_OBJECT(object), "moved", - G_CALLBACK(object_moved_cb), label); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*****************************************************************************/ -/* Remove object from label. */ -/*****************************************************************************/ -void -gl_label_remove_object (glLabel *label, - glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (label && GL_IS_LABEL (label)); - g_return_if_fail (GL_IS_LABEL_OBJECT (object)); - - object->parent = NULL; - label->objects = g_list_remove (label->objects, object); - - if ( G_OBJECT(label)->ref_count /* not finalized */ ) { - - g_signal_handlers_disconnect_by_func (object, - G_CALLBACK(object_changed_cb), - label); - g_signal_handlers_disconnect_by_func (object, - G_CALLBACK(object_moved_cb), - label); - - label->priv->modified_flag = TRUE; - - g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Object changed callback. */ -/*---------------------------------------------------------------------------*/ -static void -object_changed_cb (glLabelObject *object, - glLabel *label) -{ - - if ( !label->priv->modified_flag ) { - - label->priv->modified_flag = TRUE; - - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - } - - g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Object moved callback. */ -/*---------------------------------------------------------------------------*/ -static void -object_moved_cb (glLabelObject *object, - gdouble x, - gdouble y, - glLabel *label) -{ - - if ( !label->priv->modified_flag ) { - - label->priv->modified_flag = TRUE; - - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - } - - g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); -} - - -/****************************************************************************/ -/* Bring label object to front/top. */ -/****************************************************************************/ -void -gl_label_raise_object_to_top (glLabel *label, - glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, "START"); - - /* 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); - - label->priv->modified_flag = TRUE; - - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Send label object to rear/bottom. */ -/****************************************************************************/ -void -gl_label_lower_object_to_bottom (glLabel *label, - glLabelObject *object) -{ - gl_debug (DEBUG_LABEL, "START"); - - /* 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); - - label->priv->modified_flag = TRUE; - - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* set template. */ -/****************************************************************************/ -extern void -gl_label_set_template (glLabel *label, - lglTemplate *template) -{ - gchar *name; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (label && GL_IS_LABEL (label)); - g_return_if_fail (template); - - if ((label->template == NULL) || - !lgl_template_do_templates_match (template, label->template)) { - - lgl_template_free (label->template); - label->template = lgl_template_dup (template); - - label->priv->modified_flag = TRUE; - - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[SIZE_CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); - - name = lgl_template_get_name (template); - gl_prefs_add_recent_template (name); - g_free (name); - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* set rotate flag. */ -/****************************************************************************/ -extern void -gl_label_set_rotate_flag (glLabel *label, - gboolean rotate_flag) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (label && GL_IS_LABEL (label)); - - if (rotate_flag != label->rotate_flag) { - - label->rotate_flag = rotate_flag; - - label->priv->modified_flag = TRUE; - - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[SIZE_CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); - - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Get label size. */ -/****************************************************************************/ -void -gl_label_get_size (glLabel *label, - gdouble *w, - gdouble *h) -{ - lglTemplate *template; - const lglTemplateFrame *frame; - - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (label && GL_IS_LABEL (label)); - - template = label->template; - if ( !template ) { - gl_debug (DEBUG_LABEL, "END -- template NULL"); - *w = *h = 0; - return; - } - frame = (lglTemplateFrame *)template->frames->data; - - if (!label->rotate_flag) { - lgl_template_frame_get_size (frame, w, h); - } else { - lgl_template_frame_get_size (frame, h, w); - } - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* set merge information structure. */ -/****************************************************************************/ -extern void -gl_label_set_merge (glLabel *label, - glMerge *merge) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_if_fail (label && GL_IS_LABEL (label)); - - if ( label->priv->merge != NULL ) { - g_object_unref (G_OBJECT(label->priv->merge)); - } - label->priv->merge = gl_merge_dup (merge); - - label->priv->modified_flag = TRUE; - - g_signal_emit (G_OBJECT(label), signals[MERGE_CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); - - gl_debug (DEBUG_LABEL, "END"); -} - - -/****************************************************************************/ -/* Get merge information structure. */ -/****************************************************************************/ -glMerge * -gl_label_get_merge (glLabel *label) -{ - gl_debug (DEBUG_LABEL, "START"); - - g_return_val_if_fail (label && GL_IS_LABEL (label), NULL); - - gl_debug (DEBUG_LABEL, "END"); - - return gl_merge_dup (label->priv->merge); -} - - -/****************************************************************************/ -/* return filename. */ -/****************************************************************************/ -gchar * -gl_label_get_filename (glLabel *label) -{ - gl_debug (DEBUG_LABEL, ""); - - return g_strdup ( label->priv->filename ); -} - - -/****************************************************************************/ -/* return short filename. */ -/****************************************************************************/ -gchar * -gl_label_get_short_name (glLabel *label) -{ - gl_debug (DEBUG_LABEL, ""); - - if ( label->priv->filename == NULL ) { - - if ( label->priv->untitled_instance == 0 ) { - label->priv->untitled_instance = ++untitled; - } - - return g_strdup_printf ( "%s %d", _("Untitled"), - label->priv->untitled_instance ); - - } else { - gchar *temp_name, *short_name; - - temp_name = g_path_get_basename ( label->priv->filename ); - short_name = gl_file_util_remove_extension (temp_name); - g_free (temp_name); - - return short_name; - } -} - - -/****************************************************************************/ -/* Get pixbuf cache. */ -/****************************************************************************/ -GHashTable * -gl_label_get_pixbuf_cache (glLabel *label) -{ - return label->priv->pixbuf_cache; -} - - -/****************************************************************************/ -/* Is label modified? */ -/****************************************************************************/ -gboolean -gl_label_is_modified (glLabel *label) -{ - gl_debug (DEBUG_LABEL, "return %d", label->priv->modified_flag); - return label->priv->modified_flag; -} - - -/****************************************************************************/ -/* Is label untitled? */ -/****************************************************************************/ -gboolean -gl_label_is_untitled (glLabel *label) -{ - gl_debug (DEBUG_LABEL, "return %d",(label->priv->filename == NULL)); - return (label->priv->filename == NULL); -} - - -/****************************************************************************/ -/* Can undo? */ -/****************************************************************************/ -gboolean -gl_label_can_undo (glLabel *label) -{ - return FALSE; -} - - -/****************************************************************************/ -/* Can redo? */ -/****************************************************************************/ -gboolean -gl_label_can_redo (glLabel *label) -{ - return FALSE; -} - - -/****************************************************************************/ -/* Set filename. */ -/****************************************************************************/ -void -gl_label_set_filename (glLabel *label, - const gchar *filename) -{ - label->priv->filename = g_strdup (filename); - - g_signal_emit (G_OBJECT(label), signals[NAME_CHANGED], 0); -} - - -/****************************************************************************/ -/* Clear modified flag. */ -/****************************************************************************/ -void -gl_label_clear_modified (glLabel *label) -{ - - if ( label->priv->modified_flag ) { - - label->priv->modified_flag = FALSE; - - g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); - } - -} - - -/****************************************************************************/ -/* Set compression level. */ -/****************************************************************************/ -void -gl_label_set_compression (glLabel *label, - gint compression) -{ - gl_debug (DEBUG_LABEL, "set %d", compression); - - /* Older versions of libxml2 always return a -1 for documents "read in," so - * default to 9. Also, default to 9 for anything else out of range. */ - if ((compression < 0) || (compression >9)) { - compression = 9; - } - - gl_debug (DEBUG_LABEL, "actual set %d", compression); - label->priv->compression = compression; -} - - -/****************************************************************************/ -/* Get compression level. */ -/****************************************************************************/ -gint -gl_label_get_compression (glLabel *label) -{ - gl_debug (DEBUG_LABEL, "return %d", label->priv->compression); - return label->priv->compression; -} - - -/****************************************************************************/ -/* Draw label. */ -/****************************************************************************/ -void -gl_label_draw (glLabel *label, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record) -{ - GList *p_obj; - glLabelObject *object; - - g_return_if_fail (label && GL_IS_LABEL (label)); - - for (p_obj = label->objects; p_obj != NULL; p_obj = p_obj->next) - { - object = GL_LABEL_OBJECT (p_obj->data); - - gl_label_object_draw (object, cr, screen_flag, record); - } -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/label.h b/glabels2/src/label.h deleted file mode 100644 index 73f0d89e..00000000 --- a/glabels2/src/label.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * label.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __LABEL_H__ -#define __LABEL_H__ - -#include -#include - -#include -#include "merge.h" -#include "pixbuf-cache.h" - -G_BEGIN_DECLS - -typedef struct { - gdouble x1; - gdouble y1; - gdouble x2; - gdouble y2; -} glLabelRegion; - -#define GL_TYPE_LABEL (gl_label_get_type ()) -#define GL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL, glLabel)) -#define GL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL, glLabelClass)) -#define GL_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL)) -#define GL_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL)) - -typedef struct _glLabel glLabel; -typedef struct _glLabelClass glLabelClass; - -typedef struct _glLabelPrivate glLabelPrivate; - -#include "label-object.h" -struct _glLabel { - GObject object; - - lglTemplate *template; - gboolean rotate_flag; - - GList *objects; - - glLabelPrivate *priv; -}; - -struct _glLabelClass { - GObjectClass parent_class; - - void (*changed) (glLabel *label, gpointer user_data); - - void (*name_changed) (glLabel *label, gpointer user_data); - - void (*modified_changed) (glLabel *label, gpointer user_data); - - void (*merge_changed) (glLabel *label, gpointer user_data); - - void (*size_changed) (glLabel *label, gpointer user_data); - - void (*object_added) (glLabel *label, - glLabelObject *object, - gpointer user_data); - -}; - - -GType gl_label_get_type (void) G_GNUC_CONST; - -GObject *gl_label_new (void); - - -void gl_label_add_object (glLabel *label, - glLabelObject *object); - -void gl_label_remove_object (glLabel *label, - glLabelObject *object); - -void gl_label_raise_object_to_top (glLabel *label, - glLabelObject *object); - -void gl_label_lower_object_to_bottom (glLabel *label, - glLabelObject *object); - - -void gl_label_set_template (glLabel *label, - lglTemplate *template); - -void gl_label_set_rotate_flag (glLabel *label, - gboolean rotate_flag); - -void gl_label_get_size (glLabel *label, - gdouble *w, - gdouble *h); - - -void gl_label_set_merge (glLabel *label, - glMerge *merge); - -glMerge *gl_label_get_merge (glLabel *label); - - -gchar *gl_label_get_filename (glLabel *label); - -gchar *gl_label_get_short_name (glLabel *label); - -GHashTable *gl_label_get_pixbuf_cache (glLabel *label); - -gboolean gl_label_is_modified (glLabel *label); - -gboolean gl_label_is_untitled (glLabel *label); - -gboolean gl_label_can_undo (glLabel *label); - -gboolean gl_label_can_redo (glLabel *label); - - -void gl_label_set_filename (glLabel *label, - const gchar *filename); - -void gl_label_clear_modified (glLabel *label); - -void gl_label_set_compression (glLabel *label, - gint compression); - -gint gl_label_get_compression (glLabel *label); - -void gl_label_draw (glLabel *label, - cairo_t *cr, - gboolean screen_flag, - glMergeRecord *record); - -G_END_DECLS - - -#endif /* __LABEL_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/marshal.list b/glabels2/src/marshal.list deleted file mode 100644 index edc75344..00000000 --- a/glabels2/src/marshal.list +++ /dev/null @@ -1,9 +0,0 @@ -VOID:VOID -VOID:INT -VOID:INT,INT -VOID:INT,UINT -VOID:DOUBLE -VOID:DOUBLE,DOUBLE -VOID:OBJECT -VOID:STRING -VOID:UINT,BOOLEAN diff --git a/glabels2/src/merge-evolution.c b/glabels2/src/merge-evolution.c deleted file mode 100644 index 36f7bf22..00000000 --- a/glabels2/src/merge-evolution.c +++ /dev/null @@ -1,568 +0,0 @@ -/* - * merge-evolution.h - * Copyright (C) 2001-2009 Jim Evins . - * and - * Copyright (C) 2005 Austin Henry - * and - * Copyright (C) 2007 Peter Cherriman - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#ifdef HAVE_LIBEBOOK - - -#include "merge-evolution.h" - -#include -#include -#include -#include - -#include - -#include "debug.h" - -#define DEFAULT_QUERY "(exists \"full_name\")" - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glMergeEvolutionPrivate { - gchar *query; - EBook *book; - GList *contacts; - GList *fields; /* the fields supported by the addressbook */ -}; - -enum { - LAST_SIGNAL -}; - -enum { - ARG_0, - ARG_QUERY, -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_merge_evolution_finalize (GObject *object); - -static void gl_merge_evolution_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec); - -static void gl_merge_evolution_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec); - -static GList *gl_merge_evolution_get_key_list (glMerge *merge); -static gchar *gl_merge_evolution_get_primary_key (glMerge *merge); -static void gl_merge_evolution_open (glMerge *merge); -static void gl_merge_evolution_close (glMerge *merge); -static glMergeRecord *gl_merge_evolution_get_record (glMerge *merge); -static void gl_merge_evolution_copy (glMerge *dst_merge, - glMerge *src_merge); - -/* utility function prototypes go here */ -static void free_field_list (GList *fields); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glMergeEvolution, gl_merge_evolution, GL_TYPE_MERGE); - -static void -gl_merge_evolution_class_init (glMergeEvolutionClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glMergeClass *merge_class = GL_MERGE_CLASS (class); - - gl_debug (DEBUG_MERGE, "START"); - - gl_merge_evolution_parent_class = g_type_class_peek_parent (class); - - object_class->set_property = gl_merge_evolution_set_property; - object_class->get_property = gl_merge_evolution_get_property; - - g_object_class_install_property - (object_class, - ARG_QUERY, - g_param_spec_string ("query", NULL, - "Query used to select records from the addressbook", - "(exists \"full_name\")", - (G_PARAM_READABLE | G_PARAM_WRITABLE))); - - object_class->finalize = gl_merge_evolution_finalize; - - merge_class->get_key_list = gl_merge_evolution_get_key_list; - merge_class->get_primary_key = gl_merge_evolution_get_primary_key; - merge_class->open = gl_merge_evolution_open; - merge_class->close = gl_merge_evolution_close; - merge_class->get_record = gl_merge_evolution_get_record; - merge_class->copy = gl_merge_evolution_copy; - - gl_debug (DEBUG_MERGE, "END"); -} - - -static void -gl_merge_evolution_init (glMergeEvolution *merge_evolution) -{ - gl_debug (DEBUG_MERGE, "START"); - - merge_evolution->priv = g_new0 (glMergeEvolutionPrivate, 1); - merge_evolution->priv->query = g_strdup(DEFAULT_QUERY); - - gl_debug (DEBUG_MERGE, "END"); -} - - -static void -gl_merge_evolution_finalize (GObject *object) -{ - glMergeEvolution *merge_evolution = GL_MERGE_EVOLUTION (object); - - gl_debug (DEBUG_MERGE, "START"); - - g_return_if_fail (object && GL_IS_MERGE_EVOLUTION (object)); - - free_field_list(merge_evolution->priv->fields); - g_free (merge_evolution->priv->query); - g_free (merge_evolution->priv); - - G_OBJECT_CLASS (gl_merge_evolution_parent_class)->finalize (object); - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Set argument. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_evolution_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec) -{ - glMergeEvolution *merge_evolution; - - merge_evolution = GL_MERGE_EVOLUTION (object); - - switch (param_id) { - - case ARG_QUERY: - g_free (merge_evolution->priv->query); - merge_evolution->priv->query = g_value_dup_string (value); - gl_debug (DEBUG_MERGE, "ARG \"query\" = \"%s\"", - merge_evolution->priv->query); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - - } - -} - - -/*--------------------------------------------------------------------------*/ -/* Get argument. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_evolution_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec) -{ - glMergeEvolution *merge_evolution; - - merge_evolution = GL_MERGE_EVOLUTION (object); - - switch (param_id) { - - case ARG_QUERY: - g_value_set_string (value, merge_evolution->priv->query); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - - } - -} - - -/*--------------------------------------------------------------------------*/ -/* Get key list. */ -/*--------------------------------------------------------------------------*/ -static GList * -gl_merge_evolution_get_key_list (glMerge *merge) -{ - glMergeEvolution *merge_evolution; - GList *key_list = NULL; - GList *iter; - - gl_debug (DEBUG_MERGE, "BEGIN"); - - merge_evolution = GL_MERGE_EVOLUTION (merge); - - /* for the previously retrieved supported fileds, go through them and find - * their pretty names */ - for (iter = merge_evolution->priv->fields; - iter != NULL; - iter = g_list_next(iter)) - { - key_list = g_list_prepend (key_list, - g_strdup (e_contact_pretty_name (*(EContactField *)iter->data))); - } - - key_list = g_list_reverse (key_list); - - gl_debug (DEBUG_MERGE, "END"); - - return key_list; -} - - -/*--------------------------------------------------------------------------*/ -/* Get "primary" key. */ -/*--------------------------------------------------------------------------*/ -static gchar * -gl_merge_evolution_get_primary_key (glMerge *merge) -{ - return g_strdup (e_contact_pretty_name(E_CONTACT_FILE_AS)); -} - - -/* Sort compare function for sorting contacts by file-as element - * by Peter Cherriman (PJC) - * called by GList* g_list_sort(GList *list, sort_contact_by_file_as); - */ -static gint sort_contact_by_file_as(gconstpointer *a, gconstpointer *b) -{ - /* - * Returns : negative value if a < b; zero if a = b; positive value if a > b - */ - - // Check and cast a and b to EContact - EContact *contact_a = E_CONTACT(a); - EContact *contact_b = E_CONTACT(b); - - // Extract file_as for each contact and compare... - gchar *a_file_as = e_contact_get (contact_a, E_CONTACT_FILE_AS); - gchar *b_file_as = e_contact_get (contact_b, E_CONTACT_FILE_AS); - gint res = lgl_str_utf8_casecmp(a_file_as, b_file_as); - - gl_debug(DEBUG_MERGE, "Sort comparing contacts '%s' and '%s' = %d", a_file_as, b_file_as, res); - - // free file_as strings created earlier.... - g_free (a_file_as); - g_free (b_file_as); - - return res; -} - - -/*--------------------------------------------------------------------------*/ -/* Open merge source. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_evolution_open (glMerge *merge) -{ - glMergeEvolution *merge_evolution; - EBookQuery *query; - gboolean status; - GList *fields, *iter; - EContactField *field_id; - GError *error = NULL; - - gl_debug (DEBUG_MERGE, "BEGIN"); - - merge_evolution = GL_MERGE_EVOLUTION (merge); - - query = e_book_query_from_string(merge_evolution->priv->query); - if (!query) { - g_warning (_("Couldn't construct query")); - return; - } - - merge_evolution->priv->book = e_book_new_system_addressbook(&error); - if (!merge_evolution->priv->book) { - g_warning (_("Couldn't open addressbook.")); - if (error) - { - g_warning ("e_book_new_system_addressbook: %s", error->message); - g_error_free (error); - } - e_book_query_unref(query); - return; - } - - if (!e_book_open(merge_evolution->priv->book, FALSE, &error)) { - g_warning (_("Couldn't open addressbook.")); - if (error) - { - g_warning ("e_book_open: %s", error->message); - g_error_free (error); - } - e_book_query_unref(query); - g_object_unref(merge_evolution->priv->book); - merge_evolution->priv->book = NULL; - return; - } - - /* fetch the list of fields supported by this address book */ - status = e_book_get_supported_fields(merge_evolution->priv->book, &fields, &error); - if (status == FALSE) { - g_warning (_("Couldn't list available fields.")); - if (error) - { - g_warning ("e_book_get_supported_fields: %s", error->message); - g_error_free (error); - } - e_book_query_unref(query); - g_object_unref(merge_evolution->priv->book); - merge_evolution->priv->book = NULL; - return; - } - - /* generate a list of field_ids, and put that into private->fields */ - for (iter = fields; iter != NULL; iter = g_list_next(iter)) { - field_id = g_new(EContactField, 1); - *field_id = e_contact_field_id(iter->data); - - /* above this value, the data aren't strings anymore */ - if (*field_id >= E_CONTACT_LAST_SIMPLE_STRING) { - g_free (field_id); - continue; - } - - merge_evolution->priv->fields = - g_list_prepend(merge_evolution->priv->fields, field_id); - } - free_field_list(fields); /* don't need the list of names anymore */ - - gl_debug(DEBUG_MERGE, "Field list length: %d", g_list_length(merge_evolution->priv->fields)); - - /* finally retrieve the contacts */ - status = e_book_get_contacts (merge_evolution->priv->book, - query, - &merge_evolution->priv->contacts, - &error); - if (status == FALSE) { - g_warning (_("Couldn't get contacts.")); - if (error) - { - g_warning ("e_book_get_contacts: %s", error->message); - g_error_free (error); - } - e_book_query_unref(query); - free_field_list(merge_evolution->priv->fields); - g_object_unref(merge_evolution->priv->book); - merge_evolution->priv->book = NULL; - - return; - } - - e_book_query_unref(query); - - /* Sort contacts using file-as element.... - * by Peter Cherriman (PJC) - */ - gl_debug (DEBUG_MERGE, "Starting sort"); - merge_evolution->priv->contacts = g_list_sort(merge_evolution->priv->contacts, (GCompareFunc)sort_contact_by_file_as); - gl_debug (DEBUG_MERGE, "Ended sort"); - - gl_debug (DEBUG_MERGE, "END"); - - return; -} - - -/*--------------------------------------------------------------------------*/ -/* Close merge source. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_evolution_close (glMerge *merge) -{ - glMergeEvolution *merge_evolution; - GList *iter; - - merge_evolution = GL_MERGE_EVOLUTION (merge); - - /* unref all of the objects created in _open */ - g_object_unref(merge_evolution->priv->book); - merge_evolution->priv->book = NULL; - - for (iter = merge_evolution->priv->contacts; - iter != NULL; - iter = g_list_next(iter)) - { - EContact *contact = E_CONTACT (iter->data); - - g_object_unref(contact); - } - g_list_free(merge_evolution->priv->contacts); - merge_evolution->priv->contacts = NULL; -} - - -/*--------------------------------------------------------------------------*/ -/* Get next record from merge source, NULL if no records left (i.e EOF) */ -/*--------------------------------------------------------------------------*/ -static glMergeRecord * -gl_merge_evolution_get_record (glMerge *merge) -{ - glMergeEvolution *merge_evolution; - glMergeRecord *record; - glMergeField *field; - EContactField field_id; - - GList *head, *iter; - EContact *contact; - - merge_evolution = GL_MERGE_EVOLUTION (merge); - - head = merge_evolution->priv->contacts; - if (head == NULL) { - return NULL; /* past the last record */ - } - contact = E_CONTACT(head->data); - - record = g_new0 (glMergeRecord, 1); - record->select_flag = TRUE; - - /* Take the interesting fields one by one from the contact, and put them - * into the glMergeRecord structure. When done, free up the resources for - * that contact */ - - /* iterate through the supported fields, and add them to the list */ - for (iter = merge_evolution->priv->fields; - iter != NULL; - iter = g_list_next(iter)) - { - gchar *value; - field_id = *(EContactField *)iter->data; - value = g_strdup (e_contact_get_const (contact, field_id)); - - if (value) { - field = g_new0 (glMergeField, 1); - field->key = g_strdup (e_contact_pretty_name (field_id)); - field->value = value; - record->field_list = g_list_prepend (record->field_list, field); - } - } - - record->field_list = g_list_reverse (record->field_list); - - /* do a destructive read */ - g_object_unref (contact); - merge_evolution->priv->contacts = - g_list_remove_link (merge_evolution->priv->contacts, head); - g_list_free_1 (head); - - return record; -} - - -/*---------------------------------------------------------------------------*/ -/* Copy merge_evolution specific fields. */ -/*---------------------------------------------------------------------------*/ -static void -gl_merge_evolution_copy (glMerge *dst_merge, - glMerge *src_merge) -{ - GList *src_iter, *dst_iter; - - gl_debug (DEBUG_MERGE, "BEGIN"); - - glMergeEvolution *dst_merge_evolution; - glMergeEvolution *src_merge_evolution; - - dst_merge_evolution = GL_MERGE_EVOLUTION (dst_merge); - src_merge_evolution = GL_MERGE_EVOLUTION (src_merge); - - dst_merge_evolution->priv->query = g_strdup(src_merge_evolution->priv->query); - - dst_merge_evolution->priv->fields = g_list_copy(src_merge_evolution->priv->fields); - for (src_iter = src_merge_evolution->priv->fields, - dst_iter = dst_merge_evolution->priv->fields; - src_iter != NULL && dst_iter != NULL; - src_iter = g_list_next(src_iter), dst_iter = g_list_next(dst_iter)) - { - dst_iter->data = g_new(EContactField, 1); - if (src_iter->data) { /* this better not be null, but... */ - memcpy(dst_iter->data, src_iter->data, sizeof(EContactField)); - } - } - - /* I don't know that there's a good way to do a deep copy of the various - * libebook structures/objects, so I'm just going to leave them out. They - * are all regenerated on gl_merge_evolution_open, anyway */ - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* Free the list of supported fields */ -/*---------------------------------------------------------------------------*/ -static void -free_field_list (GList *fields) -{ - GList *iter; - - for (iter = fields; iter != NULL; iter = g_list_next(iter)) - { - if (iter->data) { - g_free(iter->data); - } - } - g_list_free(fields); - fields = NULL; -} - - -#endif /* HAVE_LIBEBOOK */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge-evolution.h b/glabels2/src/merge-evolution.h deleted file mode 100644 index f49d1b46..00000000 --- a/glabels2/src/merge-evolution.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * merge-evolution.h - * Copyright (C) 2001-2009 Jim Evins . - * and - * Copyright (C) 2005 Austin Henry - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MERGE_EVOLUTION_H__ -#define __MERGE_EVOLUTION_H__ - -#include "merge.h" - -G_BEGIN_DECLS - -/* The following object arguments are available: - * - * name type description - * --------------------------------------------------------------------------- - * query gchar* The query used to select records - * - */ - -#define GL_TYPE_MERGE_EVOLUTION (gl_merge_evolution_get_type ()) -#define GL_MERGE_EVOLUTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE_EVOLUTION, glMergeEvolution)) -#define GL_MERGE_EVOLUTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_EVOLUTION, glMergeEvolutionClass)) -#define GL_IS_MERGE_EVOLUTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE_EVOLUTION)) -#define GL_IS_MERGE_EVOLUTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_EVOLUTION)) -#define GL_MERGE_EVOLUTION_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_MERGE_EVOLUTION, glMergeEvolutionClass)) - - -typedef struct _glMergeEvolution glMergeEvolution; -typedef struct _glMergeEvolutionClass glMergeEvolutionClass; - -typedef struct _glMergeEvolutionPrivate glMergeEvolutionPrivate; - - -struct _glMergeEvolution { - glMerge object; - - glMergeEvolutionPrivate *priv; -}; - -struct _glMergeEvolutionClass { - glMergeClass parent_class; -}; - - -GType gl_merge_evolution_get_type (void) G_GNUC_CONST; - -G_END_DECLS - -#endif /* __MERGE_EVOLUTION_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge-init.c b/glabels2/src/merge-init.c deleted file mode 100644 index 9d575644..00000000 --- a/glabels2/src/merge-init.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * merge-init.c - * Copyright (C) 2002-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include - -#include "merge-init.h" -#include "merge-text.h" - -#ifdef HAVE_LIBEBOOK -#include "merge-evolution.h" -#include "merge-vcard.h" -#endif /* HAVE_LIBEBOOK */ - -#include "debug.h" - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - - -/*****************************************************************************/ -/* Initailize document merge module, by registering all available backends. */ -/*****************************************************************************/ -void -gl_merge_init (void) -{ - - gl_merge_register_backend (GL_TYPE_MERGE_TEXT, - "Text/Comma", - _("Text file with comma delimeters (CSV)"), - GL_MERGE_SRC_IS_FILE, - "delim", ',', - NULL); - - gl_merge_register_backend (GL_TYPE_MERGE_TEXT, - "Text/Colon", - _("Text file with colon delimeters"), - GL_MERGE_SRC_IS_FILE, - "delim", ':', - NULL); - - gl_merge_register_backend (GL_TYPE_MERGE_TEXT, - "Text/Tab", - _("Text file with tab delimeters"), - GL_MERGE_SRC_IS_FILE, - "delim", '\t', - NULL); - -#ifdef HAVE_LIBEBOOK - - gl_merge_register_backend (GL_TYPE_MERGE_EVOLUTION, - "ebook/eds", - _("Data from default Evolution Addressbook"), - GL_MERGE_SRC_IS_FIXED, - NULL); - - gl_merge_register_backend (GL_TYPE_MERGE_VCARD, - "ebook/vcard", - _("Data from a file containing VCards"), - GL_MERGE_SRC_IS_FILE, - NULL); - -#endif /* HAVE_LIBEBOOK */ - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge-init.h b/glabels2/src/merge-init.h deleted file mode 100644 index 3e281bf7..00000000 --- a/glabels2/src/merge-init.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * merge-init.h - * Copyright (C) 2002-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MERGE_INIT_H__ -#define __MERGE_INIT_H__ - -#include "merge.h" - -G_BEGIN_DECLS - -void gl_merge_init (void); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge-properties-dialog.c b/glabels2/src/merge-properties-dialog.c deleted file mode 100644 index c1c9c354..00000000 --- a/glabels2/src/merge-properties-dialog.c +++ /dev/null @@ -1,702 +0,0 @@ -/* - * merge-properties-dialog.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "merge-properties-dialog.h" - -#include -#include -#include - -#include "label.h" -#include "merge.h" -#include "combo-util.h" -#include "builder-util.h" -#include "hig.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -struct _glMergePropertiesDialogPrivate { - - glLabel *label; - glMerge *merge; - - GtkBuilder *builder; - - GtkWidget *type_combo; - GtkWidget *location_vbox; - GtkWidget *src_entry; - - GtkTreeStore *store; - GtkWidget *treeview; - - GtkWidget *select_all_button; - GtkWidget *unselect_all_button; - - GtkWidget *ok_button; - - gchar *saved_src; - -}; - -enum { - /* Real columns */ - SELECT_COLUMN, - RECORD_FIELD_COLUMN, - VALUE_COLUMN, - - /* Invisible columns */ - IS_RECORD_COLUMN, - DATA_COLUMN, /* points to glMergeRecord */ - - N_COLUMNS -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_merge_properties_dialog_finalize (GObject *object); -static void gl_merge_properties_dialog_construct (glMergePropertiesDialog *dialog, - glLabel *label, - GtkWindow *window); - -static void type_changed_cb (GtkWidget *widget, - glMergePropertiesDialog *dialog); - -static void src_changed_cb (GtkWidget *widget, - glMergePropertiesDialog *dialog); - -static void response_cb (glMergePropertiesDialog *dialog, - gint response, - gpointer user_data); - -static void load_tree (GtkTreeStore *store, - glMerge *merge); - -static void record_select_toggled_cb (GtkCellRendererToggle *cell, - gchar *path_str, - GtkTreeStore *store); - -static void select_all_button_clicked_cb (GtkWidget *widget, - glMergePropertiesDialog *dialog); - -static void unselect_all_button_clicked_cb (GtkWidget *widget, - glMergePropertiesDialog *dialog); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glMergePropertiesDialog, gl_merge_properties_dialog, GTK_TYPE_DIALOG); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_merge_properties_dialog_class_init (glMergePropertiesDialogClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_MERGE, ""); - - gl_merge_properties_dialog_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_merge_properties_dialog_finalize; -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_merge_properties_dialog_init (glMergePropertiesDialog *dialog) -{ - GtkBuilder *builder; - static gchar *object_ids[] = { "merge_properties_vbox", NULL }; - GError *error = NULL; - GtkWidget *vbox; - - gl_debug (DEBUG_MERGE, "START"); - - dialog->priv = g_new0 (glMergePropertiesDialogPrivate, 1); - - gtk_container_set_border_width (GTK_CONTAINER(dialog), GL_HIG_PAD1); - - gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE); - gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); - dialog->priv->ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_OK, GTK_RESPONSE_OK); - - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); - - builder = gtk_builder_new (); - gtk_builder_add_objects_from_file (builder, - GLABELS_BUILDER_DIR "merge-properties-dialog.builder", - object_ids, - &error); - if (error) { - g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); - g_error_free (error); - return; - } - - gl_builder_util_get_widgets (builder, - "merge_properties_vbox", &vbox, - "type_combo", &dialog->priv->type_combo, - "location_vbox", &dialog->priv->location_vbox, - "treeview", &dialog->priv->treeview, - "select_all_button", &dialog->priv->select_all_button, - "unselect_all_button", &dialog->priv->unselect_all_button, - NULL); - - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox); - dialog->priv->builder = builder; - - gl_combo_util_add_text_model (GTK_COMBO_BOX (dialog->priv->type_combo)); - - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*****************************************************************************/ -/* Finalize Function. */ -/*****************************************************************************/ -static void -gl_merge_properties_dialog_finalize (GObject *object) -{ - glMergePropertiesDialog* dialog = GL_MERGE_PROPERTIES_DIALOG (object); - - gl_debug (DEBUG_MERGE, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_MERGE_PROPERTIES_DIALOG (dialog)); - g_return_if_fail (dialog->priv != NULL); - - if (dialog->priv->merge != NULL) { - g_object_unref (G_OBJECT (dialog->priv->merge)); - } - if (dialog->priv->builder != NULL) { - g_object_unref (G_OBJECT (dialog->priv->builder)); - } - g_free (dialog->priv); - - G_OBJECT_CLASS (gl_merge_properties_dialog_parent_class)->finalize (object); - gl_debug (DEBUG_MERGE, "END"); -} - - -/*****************************************************************************/ -/* NEW merge properties dialog. */ -/*****************************************************************************/ -GtkWidget* -gl_merge_properties_dialog_new (glLabel *label, - GtkWindow *window) -{ - GtkWidget *dialog; - - gl_debug (DEBUG_MERGE, "START"); - - dialog = GTK_WIDGET (g_object_new (GL_TYPE_MERGE_PROPERTIES_DIALOG, NULL)); - - gl_merge_properties_dialog_construct (GL_MERGE_PROPERTIES_DIALOG (dialog), - label, window); - - gl_debug (DEBUG_MERGE, "END"); - - return dialog; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Create merge widgets. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_properties_dialog_construct (glMergePropertiesDialog *dialog, - glLabel *label, - GtkWindow *window) -{ - gchar *description; - glMergeSrcType src_type; - gchar *src; - gchar *name, *title; - GList *texts; - GtkCellRenderer *renderer; - GtkTreeViewColumn *column; - GtkTreeSelection *selection; - - gl_debug (DEBUG_MERGE, "START"); - - g_return_if_fail (GL_IS_MERGE_PROPERTIES_DIALOG (dialog)); - g_return_if_fail (dialog->priv != NULL); - - if (window) { - gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(window)); - gtk_window_set_destroy_with_parent (GTK_WINDOW(dialog), TRUE); - } - - dialog->priv->label = label; - - dialog->priv->merge = gl_label_get_merge (dialog->priv->label); - description = gl_merge_get_description (dialog->priv->merge); - src_type = gl_merge_get_src_type (dialog->priv->merge); - src = gl_merge_get_src (dialog->priv->merge); - - /* --- Window title --- */ - name = gl_label_get_short_name (label); - title = g_strdup_printf ("%s %s", name, _("Merge Properties")); - gtk_window_set_title (GTK_WINDOW (dialog), title); - g_free (name); - g_free (title); - - texts = gl_merge_get_descriptions (); - gl_debug (DEBUG_MERGE, "DESCRIPTIONS:"); - { - GList *p; - - for (p=texts; p!=NULL; p=p->next) { - gl_debug (DEBUG_MERGE, " \"%s\"", p->data); - } - } - gl_combo_util_set_strings (GTK_COMBO_BOX (dialog->priv->type_combo), - texts); - gl_merge_free_descriptions (&texts); - gl_combo_util_set_active_text (GTK_COMBO_BOX (dialog->priv->type_combo), - description); - g_signal_connect (G_OBJECT (dialog->priv->type_combo), "changed", - G_CALLBACK (type_changed_cb), dialog); - - gl_debug (DEBUG_MERGE, "Src_type = %d", src_type); - switch (src_type) { - case GL_MERGE_SRC_IS_FILE: - dialog->priv->src_entry = - gtk_file_chooser_button_new (_("Select merge-database source"), - GTK_FILE_CHOOSER_ACTION_OPEN); - gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog->priv->src_entry), - src); - gtk_file_chooser_button_set_focus_on_click (GTK_FILE_CHOOSER_BUTTON (dialog->priv->src_entry), - FALSE); - g_signal_connect (G_OBJECT (dialog->priv->src_entry), - "selection-changed", - G_CALLBACK (src_changed_cb), dialog); - break; - default: - dialog->priv->src_entry = gtk_label_new (_("N/A")); - gtk_misc_set_alignment (GTK_MISC (dialog->priv->src_entry), 0.0, 0.5); - break; - } - gtk_box_pack_start (GTK_BOX (dialog->priv->location_vbox), - dialog->priv->src_entry, FALSE, FALSE, 0); - gtk_widget_show_all (GTK_WIDGET (dialog->priv->location_vbox)); - - dialog->priv->store = gtk_tree_store_new (N_COLUMNS, - G_TYPE_BOOLEAN, /* Record selector */ - G_TYPE_STRING, /* Record/Field name */ - G_TYPE_STRING, /* Field value */ - G_TYPE_BOOLEAN, /* Is Record? */ - G_TYPE_POINTER /* Pointer to record */); - load_tree (dialog->priv->store, dialog->priv->merge); - - gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->priv->treeview), - GTK_TREE_MODEL (dialog->priv->store)); - - gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (dialog->priv->treeview), - TRUE); - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->priv->treeview)); - gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); - renderer = gtk_cell_renderer_toggle_new (); - g_signal_connect (G_OBJECT (renderer), "toggled", - G_CALLBACK (record_select_toggled_cb), dialog->priv->store); - column = gtk_tree_view_column_new_with_attributes (_("Select"), renderer, - "active", SELECT_COLUMN, - "visible", IS_RECORD_COLUMN, - NULL); - gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->priv->treeview), column); - renderer = gtk_cell_renderer_text_new (); - g_object_set (G_OBJECT (renderer), "yalign", 0.0, NULL); - column = gtk_tree_view_column_new_with_attributes (_("Record/Field"), renderer, - "text", RECORD_FIELD_COLUMN, - NULL); - gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); - gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->priv->treeview), column); - gtk_tree_view_set_expander_column (GTK_TREE_VIEW (dialog->priv->treeview), column); - renderer = gtk_cell_renderer_text_new (); - g_object_set (G_OBJECT (renderer), "yalign", 0.0, NULL); - column = gtk_tree_view_column_new_with_attributes (_("Data"), renderer, - "text", VALUE_COLUMN, - NULL); - gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); - gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->priv->treeview), column); - - g_signal_connect (G_OBJECT (dialog->priv->select_all_button), - "clicked", - G_CALLBACK (select_all_button_clicked_cb), dialog); - - g_signal_connect (G_OBJECT (dialog->priv->unselect_all_button), - "clicked", - G_CALLBACK (unselect_all_button_clicked_cb), dialog); - - - g_free (src); - g_free (description); - - gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); - - gtk_widget_grab_focus (dialog->priv->ok_button); - gtk_widget_grab_default (dialog->priv->ok_button); - - g_signal_connect(G_OBJECT (dialog), "response", - G_CALLBACK (response_cb), NULL); - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. type "changed" callback. */ -/*--------------------------------------------------------------------------*/ -static void -type_changed_cb (GtkWidget *widget, - glMergePropertiesDialog *dialog) -{ - gchar *description; - gchar *name; - gchar *src; - glMergeSrcType src_type; - - gl_debug (DEBUG_MERGE, "START"); - - description = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->priv->type_combo)); - name = gl_merge_description_to_name (description); - - src = gl_merge_get_src (dialog->priv->merge); /* keep current src if possible */ - if ( src != NULL ) { - gl_debug (DEBUG_MERGE, "Saving src = \"%s\"", src); - g_free (dialog->priv->saved_src); - dialog->priv->saved_src = src; - } - - if (dialog->priv->merge != NULL) { - g_object_unref (G_OBJECT(dialog->priv->merge)); - } - dialog->priv->merge = gl_merge_new (name); - - gtk_widget_destroy (dialog->priv->src_entry); - src_type = gl_merge_get_src_type (dialog->priv->merge); - switch (src_type) { - case GL_MERGE_SRC_IS_FILE: - dialog->priv->src_entry = - gtk_file_chooser_button_new (_("Select merge-database source"), - GTK_FILE_CHOOSER_ACTION_OPEN); - gtk_file_chooser_button_set_focus_on_click (GTK_FILE_CHOOSER_BUTTON (dialog->priv->src_entry), - FALSE); - if (dialog->priv->saved_src != NULL) { - gl_debug (DEBUG_MERGE, "Setting src = \"%s\"", dialog->priv->saved_src); - gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog->priv->src_entry), - dialog->priv->saved_src); - gl_merge_set_src (dialog->priv->merge, dialog->priv->saved_src); - } - g_signal_connect (G_OBJECT (dialog->priv->src_entry), - "selection-changed", - G_CALLBACK (src_changed_cb), dialog); - break; - case GL_MERGE_SRC_IS_FIXED: - dialog->priv->src_entry = gtk_label_new (_("Fixed")); - gtk_misc_set_alignment (GTK_MISC (dialog->priv->src_entry), 0.0, 0.5); - - gl_debug (DEBUG_MERGE, "Setting src = \"%s\"", dialog->priv->saved_src); - gl_merge_set_src (dialog->priv->merge, "Fixed"); - break; - default: - dialog->priv->src_entry = gtk_label_new (_("N/A")); - gtk_misc_set_alignment (GTK_MISC (dialog->priv->src_entry), 0.0, 0.5); - break; - } - gtk_box_pack_start( GTK_BOX (dialog->priv->location_vbox), - dialog->priv->src_entry, FALSE, FALSE, 0); - gtk_widget_show_all (dialog->priv->location_vbox); - - load_tree (dialog->priv->store, dialog->priv->merge); - - g_free (description); - g_free (name); - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. source "changed" callback. */ -/*--------------------------------------------------------------------------*/ -static void -src_changed_cb (GtkWidget *widget, - glMergePropertiesDialog *dialog) -{ - gchar *src, *orig_src; - - gl_debug (DEBUG_MERGE, "START"); - - orig_src = gl_merge_get_src (dialog->priv->merge); - src = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog->priv->src_entry)); - - gl_debug (DEBUG_MERGE, "orig=\"%s\", new=\"%s\"\n", orig_src, src); - - if (((orig_src == NULL) && (src != NULL)) || - ((orig_src != NULL) && (src == NULL)) || - ((orig_src != NULL) && (src != NULL) && strcmp (src, orig_src))) - { - gl_merge_set_src (dialog->priv->merge, src); - load_tree (dialog->priv->store, dialog->priv->merge); - } - - g_free (orig_src); - g_free (src); - - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. response callback. */ -/*--------------------------------------------------------------------------*/ -static void -response_cb (glMergePropertiesDialog *dialog, - gint response, - gpointer user_data) -{ - gl_debug (DEBUG_MERGE, "START"); - - switch (response) { - - case GTK_RESPONSE_OK: - gl_label_set_merge (dialog->priv->label, dialog->priv->merge); - gtk_widget_hide (GTK_WIDGET (dialog)); - break; - case GTK_RESPONSE_CANCEL: - /* Let the dialog get rebuilt next time to recover state. */ - gtk_widget_destroy (GTK_WIDGET (dialog)); - break; - case GTK_RESPONSE_DELETE_EVENT: - break; - default: - g_print ("response = %d", response); - g_assert_not_reached (); - } - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Load tree store from merge data. */ -/*--------------------------------------------------------------------------*/ -static void -load_tree (GtkTreeStore *store, - glMerge *merge) -{ - const GList *record_list; - GList *p_rec, *p_field; - glMergeRecord *record; - glMergeField *field; - GtkTreeIter iter1, iter2; - gchar *primary_key; - gchar *primary_value; - - gl_debug (DEBUG_MERGE, "START"); - - gtk_tree_store_clear (store); - - primary_key = gl_merge_get_primary_key (merge); - record_list = gl_merge_get_record_list (merge); - - for ( p_rec=(GList *)record_list; p_rec!=NULL; p_rec=p_rec->next ) { - record = (glMergeRecord *)p_rec->data; - - primary_value = gl_merge_eval_key (record, primary_key); - - gtk_tree_store_append (store, &iter1, NULL); - gtk_tree_store_set (store, &iter1, - SELECT_COLUMN, record->select_flag, - RECORD_FIELD_COLUMN, primary_value, - IS_RECORD_COLUMN, TRUE, - DATA_COLUMN, record, - -1); - - g_free (primary_value); - - for ( p_field=record->field_list; p_field!=NULL; p_field=p_field->next ) { - field = (glMergeField *)p_field->data; - - gtk_tree_store_append (store, &iter2, &iter1); - gtk_tree_store_set (store, &iter2, - RECORD_FIELD_COLUMN, field->key, - VALUE_COLUMN, field->value, - IS_RECORD_COLUMN, FALSE, - -1); - } - } - - g_free (primary_key); - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Record select toggled. */ -/*--------------------------------------------------------------------------*/ -static void -record_select_toggled_cb (GtkCellRendererToggle *cell, - gchar *path_str, - GtkTreeStore *store) -{ - GtkTreePath *path; - GtkTreeIter iter; - glMergeRecord *record; - - gl_debug (DEBUG_MERGE, "START"); - - /* get toggled iter */ - path = gtk_tree_path_new_from_string (path_str); - gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path); - - /* get current data */ - gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, - DATA_COLUMN, &record, - -1); - - /* toggle the select flag within the record */ - record->select_flag ^= 1; - - /* set new value in store */ - gtk_tree_store_set (store, &iter, - SELECT_COLUMN, record->select_flag, - -1); - - /* clean up */ - gtk_tree_path_free (path); - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. "Select All" button callback. */ -/*--------------------------------------------------------------------------*/ -static void -select_all_button_clicked_cb (GtkWidget *widget, - glMergePropertiesDialog *dialog) -{ - GtkTreeModel *store = GTK_TREE_MODEL (dialog->priv->store); - GtkTreeIter iter; - glMergeRecord *record; - gboolean good; - - gl_debug (DEBUG_MERGE, "START"); - - for ( good = gtk_tree_model_get_iter_first (store, &iter); - good; - good = gtk_tree_model_iter_next (store, &iter) ) - { - - /* get current data */ - gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, - DATA_COLUMN, &record, - -1); - - - /* Set select flag within the record */ - record->select_flag = TRUE; - - /* set new value in store */ - gtk_tree_store_set (GTK_TREE_STORE (store), &iter, - SELECT_COLUMN, record->select_flag, - -1); - - } - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. "Unselect All" button callback. */ -/*--------------------------------------------------------------------------*/ -static void -unselect_all_button_clicked_cb (GtkWidget *widget, - glMergePropertiesDialog *dialog) -{ - GtkTreeModel *store = GTK_TREE_MODEL (dialog->priv->store); - GtkTreeIter iter; - glMergeRecord *record; - gboolean good; - - gl_debug (DEBUG_MERGE, "START"); - - for ( good = gtk_tree_model_get_iter_first (store, &iter); - good; - good = gtk_tree_model_iter_next (store, &iter) ) - { - - /* get current data */ - gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, - DATA_COLUMN, &record, - -1); - - - /* Set select flag within the record */ - record->select_flag = FALSE; - - /* set new value in store */ - gtk_tree_store_set (GTK_TREE_STORE (store), &iter, - SELECT_COLUMN, record->select_flag, - -1); - - } - - gl_debug (DEBUG_MERGE, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge-properties-dialog.h b/glabels2/src/merge-properties-dialog.h deleted file mode 100644 index 33be5d17..00000000 --- a/glabels2/src/merge-properties-dialog.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * merge-properties-dialog.h - * Copyright (C) 2002-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MERGE_PROPERTIES_DIALOG_H__ -#define __MERGE_PROPERTIES_DIALOG_H__ - -#include -#include "label.h" - -G_BEGIN_DECLS - -#define GL_TYPE_MERGE_PROPERTIES_DIALOG (gl_merge_properties_dialog_get_type ()) -#define GL_MERGE_PROPERTIES_DIALOG(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE_PROPERTIES_DIALOG, glMergePropertiesDialog)) -#define GL_MERGE_PROPERTIES_DIALOG_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_PROPERTIES_DIALOG, glMergePropertiesDialogClass)) -#define GL_IS_MERGE_PROPERTIES_DIALOG(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE_PROPERTIES_DIALOG)) -#define GL_IS_MERGE_PROPERTIES_DIALOG_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_PROPERTIES_DIALOG)) -#define GL_MERGE_PROPERTIES_DIALOG_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_MERGE_PROPERTIES_DIALOG, glMergePropertiesDialogClass)) - - -typedef struct _glMergePropertiesDialog glMergePropertiesDialog; -typedef struct _glMergePropertiesDialogClass glMergePropertiesDialogClass; - -typedef struct _glMergePropertiesDialogPrivate glMergePropertiesDialogPrivate; - -struct _glMergePropertiesDialog -{ - GtkDialog parent_instance; - - glMergePropertiesDialogPrivate *priv; - -}; - -struct _glMergePropertiesDialogClass -{ - GtkDialogClass parent_class; -}; - -GType gl_merge_properties_dialog_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_merge_properties_dialog_new (glLabel *label, - GtkWindow *window); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge-text.c b/glabels2/src/merge-text.c deleted file mode 100644 index 079eb5b9..00000000 --- a/glabels2/src/merge-text.c +++ /dev/null @@ -1,716 +0,0 @@ -/* - * merge-text.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "merge-text.h" - -#include - -#include "debug.h" - -#define LINE_BUF_LEN 1024 - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glMergeTextPrivate { - gchar delim; - FILE *fp; -}; - -enum { - LAST_SIGNAL -}; - -enum { - ARG_0, - ARG_DELIM, -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_merge_text_finalize (GObject *object); - -static void gl_merge_text_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec); - -static void gl_merge_text_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec); - -static GList *gl_merge_text_get_key_list (glMerge *merge); -static gchar *gl_merge_text_get_primary_key (glMerge *merge); -static void gl_merge_text_open (glMerge *merge); -static void gl_merge_text_close (glMerge *merge); -static glMergeRecord *gl_merge_text_get_record (glMerge *merge); -static void gl_merge_text_copy (glMerge *dst_merge, - glMerge *src_merge); - -static GList *parse_line (FILE *fp, - gchar delim); -static gchar *parse_field (gchar *raw_field); -static void free_fields (GList **fields); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glMergeText, gl_merge_text, GL_TYPE_MERGE); - - -static void -gl_merge_text_class_init (glMergeTextClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glMergeClass *merge_class = GL_MERGE_CLASS (class); - - gl_debug (DEBUG_MERGE, "START"); - - gl_merge_text_parent_class = g_type_class_peek_parent (class); - - object_class->set_property = gl_merge_text_set_property; - object_class->get_property = gl_merge_text_get_property; - - g_object_class_install_property - (object_class, - ARG_DELIM, - g_param_spec_char ("delim", NULL, NULL, - 0, 0x7F, ',', - (G_PARAM_READABLE | G_PARAM_WRITABLE))); - - object_class->finalize = gl_merge_text_finalize; - - merge_class->get_key_list = gl_merge_text_get_key_list; - merge_class->get_primary_key = gl_merge_text_get_primary_key; - merge_class->open = gl_merge_text_open; - merge_class->close = gl_merge_text_close; - merge_class->get_record = gl_merge_text_get_record; - merge_class->copy = gl_merge_text_copy; - - gl_debug (DEBUG_MERGE, "END"); -} - - -static void -gl_merge_text_init (glMergeText *merge_text) -{ - gl_debug (DEBUG_MERGE, "START"); - - merge_text->priv = g_new0 (glMergeTextPrivate, 1); - - gl_debug (DEBUG_MERGE, "END"); -} - - -static void -gl_merge_text_finalize (GObject *object) -{ - glMergeText *merge_text = GL_MERGE_TEXT (object); - - gl_debug (DEBUG_MERGE, "START"); - - g_return_if_fail (object && GL_IS_MERGE_TEXT (object)); - - g_free (merge_text->priv); - - G_OBJECT_CLASS (gl_merge_text_parent_class)->finalize (object); - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Set argument. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_text_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec) -{ - glMergeText *merge_text; - - merge_text = GL_MERGE_TEXT (object); - - switch (param_id) { - - case ARG_DELIM: - merge_text->priv->delim = g_value_get_char (value); - gl_debug (DEBUG_MERGE, "ARG \"delim\" = \"%c\"", - merge_text->priv->delim); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - - } - -} - - -/*--------------------------------------------------------------------------*/ -/* Get argument. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_text_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec) -{ - glMergeText *merge_text; - - merge_text = GL_MERGE_TEXT (object); - - switch (param_id) { - - case ARG_DELIM: - g_value_set_char (value, merge_text->priv->delim); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - - } - -} - - -/*--------------------------------------------------------------------------*/ -/* Get key list. */ -/*--------------------------------------------------------------------------*/ -static GList * -gl_merge_text_get_key_list (glMerge *merge) -{ - glMergeText *merge_text; - GList *record_list, *p_rec; - glMergeRecord *record; - GList *p_field; - gint i_field, n_fields, n_fields_max = 0; - GList *key_list; - - /* Field keys are simply column numbers. */ - - gl_debug (DEBUG_MERGE, "BEGIN"); - - merge_text = GL_MERGE_TEXT (merge); - - record_list = (GList *)gl_merge_get_record_list (merge); - - for ( p_rec=record_list; p_rec!=NULL; p_rec=p_rec->next ) { - record = (glMergeRecord *)p_rec->data; - - n_fields = 0; - for ( p_field=record->field_list; p_field!=NULL; p_field=p_field->next ) { - n_fields++; - } - if ( n_fields > n_fields_max ) n_fields_max = n_fields; - } - - key_list = NULL; - for (i_field=1; i_field <= n_fields_max; i_field++) { - key_list = g_list_append (key_list, g_strdup_printf ("%d", i_field)); - } - - - gl_debug (DEBUG_MERGE, "END"); - - return key_list; -} - - -/*--------------------------------------------------------------------------*/ -/* Get "primary" key. */ -/*--------------------------------------------------------------------------*/ -static gchar * -gl_merge_text_get_primary_key (glMerge *merge) -{ - /* For now, let's always assume the first column is the primary key. */ - return g_strdup ("1"); -} - - -/*--------------------------------------------------------------------------*/ -/* Open merge source. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_text_open (glMerge *merge) -{ - glMergeText *merge_text; - gchar *src; - - merge_text = GL_MERGE_TEXT (merge); - - src = gl_merge_get_src (merge); - - if (src != NULL) { - merge_text->priv->fp = fopen (src, "r"); - } - - g_free (src); -} - - -/*--------------------------------------------------------------------------*/ -/* Close merge source. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_text_close (glMerge *merge) -{ - glMergeText *merge_text; - - merge_text = GL_MERGE_TEXT (merge); - - if (merge_text->priv->fp != NULL) { - - fclose (merge_text->priv->fp); - merge_text->priv->fp = NULL; - - } -} - - -/*--------------------------------------------------------------------------*/ -/* Get next record from merge source, NULL if no records left (i.e EOF) */ -/*--------------------------------------------------------------------------*/ -static glMergeRecord * -gl_merge_text_get_record (glMerge *merge) -{ - glMergeText *merge_text; - gchar delim; - FILE *fp; - glMergeRecord *record; - GList *fields, *p; - gint i_field; - glMergeField *field; - - merge_text = GL_MERGE_TEXT (merge); - - delim = merge_text->priv->delim; - fp = merge_text->priv->fp; - - if (fp == NULL) { - return NULL; - } - - fields = parse_line (fp, delim); - if ( fields == NULL ) { - return NULL; - } - - record = g_new0 (glMergeRecord, 1); - record->select_flag = TRUE; - i_field = 1; - for (p=fields; p != NULL; p=p->next) { - - field = g_new0 (glMergeField, 1); - field->key = g_strdup_printf ("%d", i_field++); -#ifndef CSV_ALWAYS_UTF8 - field->value = g_locale_to_utf8 (p->data, -1, NULL, NULL, NULL); -#else - field->value = g_strdup (p->data); -#endif - - record->field_list = g_list_append (record->field_list, field); - } - free_fields (&fields); - - return record; -} - - -/*---------------------------------------------------------------------------*/ -/* Copy merge_text specific fields. */ -/*---------------------------------------------------------------------------*/ -static void -gl_merge_text_copy (glMerge *dst_merge, - glMerge *src_merge) -{ - glMergeText *dst_merge_text; - glMergeText *src_merge_text; - - dst_merge_text = GL_MERGE_TEXT (dst_merge); - src_merge_text = GL_MERGE_TEXT (src_merge); - - dst_merge_text->priv->delim = src_merge_text->priv->delim; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Parse line. */ -/* */ -/* Attempt to be a robust parser of various CSV (and similar) formats. */ -/* */ -/* Split into fields, accounting for: */ -/* - delimeters may be embedded in quoted text (") */ -/* - delimeters may be "escaped" by a leading backslash (\) */ -/* - quotes may be embedded in quoted text as two adjacent quotes ("") */ -/* - quotes may be "escaped" either within or outside of quoted text. */ -/* - newlines may be embedded in quoted text, allowing a field to span */ -/* more than one line. */ -/* */ -/* This function does not do any parsing of the individual fields, other */ -/* than to correctly interpet delimeters. Actual parsing of the individual */ -/* fields is done in parse_field(). */ -/* */ -/* Returns a list of fields. A blank line is considered a line with one */ -/* empty field. Returns empty (NULL) when done. */ -/*---------------------------------------------------------------------------*/ -static GList * -parse_line (FILE *fp, - gchar delim ) -{ - GList *list = NULL; - GString *string; - gint c; - enum { BEGIN, NORMAL, QUOTED, QUOTED_QUOTE1, - NORMAL_ESCAPED, QUOTED_ESCAPED, DONE } state; - - state = BEGIN; - string = g_string_new( "" ); - while ( state != DONE ) { - c=getc (fp); - - switch (state) { - - case BEGIN: - if ( c == delim ) - { - /* first field is empty. */ - list = g_list_append (list, g_strdup ("")); - state = NORMAL; - break; - } - switch (c) { - case '"': - string = g_string_append_c (string, c); - state = QUOTED; - break; - case '\\': - string = g_string_append_c (string, c); - state = NORMAL_ESCAPED; - break; - case '\n': - /* treat as one empty field. */ - list = g_list_append (list, g_strdup ("")); - state = DONE; - break; - case EOF: - /* end of file, no more lines. */ - state = DONE; - break; - default: - string = g_string_append_c (string, c); - state = NORMAL; - break; - } - break; - - case NORMAL: - if ( c == delim ) - { - list = g_list_append (list, parse_field (string->str)); - string = g_string_assign( string, "" ); - state = NORMAL; - break; - } - switch (c) { - case '"': - string = g_string_append_c (string, c); - state = QUOTED; - break; - case '\\': - string = g_string_append_c (string, c); - state = NORMAL_ESCAPED; - break; - case '\n': - case EOF: - list = g_list_append (list, parse_field (string->str)); - state = DONE; - break; - default: - string = g_string_append_c (string, c); - state = NORMAL; - break; - } - break; - - case QUOTED: - switch (c) { - case '"': - string = g_string_append_c (string, c); - state = QUOTED_QUOTE1; - break; - case '\\': - string = g_string_append_c (string, c); - state = QUOTED_ESCAPED; - break; - case EOF: - /* File ended mid way through quoted item */ - list = g_list_append (list, parse_field (string->str)); - state = DONE; - break; - default: - string = g_string_append_c (string, c); - break; - } - break; - - case QUOTED_QUOTE1: - if ( c == delim ) - { - list = g_list_append (list, parse_field (string->str)); - string = g_string_assign( string, "" ); - state = NORMAL; - break; - } - switch (c) { - case '"': - /* insert quotes in string, stay quoted. */ - string = g_string_append_c (string, c); - state = QUOTED; - break; - case '\n': - case EOF: - /* line or file ended after quoted item */ - list = g_list_append (list, parse_field (string->str)); - state = DONE; - break; - default: - string = g_string_append_c (string, c); - state = NORMAL; - break; - } - break; - - case NORMAL_ESCAPED: - switch (c) { - case EOF: - /* File ended mid way through quoted item */ - list = g_list_append (list, parse_field (string->str)); - state = DONE; - break; - default: - string = g_string_append_c (string, c); - state = NORMAL; - break; - } - break; - - case QUOTED_ESCAPED: - switch (c) { - case EOF: - /* File ended mid way through quoted item */ - list = g_list_append (list, parse_field (string->str)); - state = DONE; - break; - default: - string = g_string_append_c (string, c); - state = QUOTED; - break; - } - break; - - default: - g_assert_not_reached(); - break; - } - - } - g_string_free( string, TRUE ); - - return list; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Parse field. */ -/* */ -/* - Strip leading and trailing white space, unless quoted. */ -/* - Strip CR, unless escaped. */ -/* - Expand '\n' and '\t' into newline and tab characters. */ -/* - Remove quotes, unless escaped (\" anywhere or "" within quotes) */ -/*---------------------------------------------------------------------------*/ -static gchar * -parse_field (gchar *raw_field) -{ - GString *string; - gchar *pass1_field, *c, *field; - enum { NORMAL, NORMAL_ESCAPED, QUOTED, QUOTED_ESCAPED, QUOTED_QUOTE1} state; - - - /* - * Pass 1: remove leading and trailing spaces. - */ - pass1_field = g_strdup (raw_field); - g_strstrip (pass1_field); - - /* - * Pass 2: resolve quoting and escaping. - */ - state = NORMAL; - string = g_string_new( "" ); - for ( c=pass1_field; *c != 0; c++ ) - { - switch (state) { - - case NORMAL: - switch (*c) { - case '\\': - state = NORMAL_ESCAPED; - break; - case '"': - state = QUOTED; - break; - case '\r': - /* Strip CR. */ - break; - default: - string = g_string_append_c (string, *c); - 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; - 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; - 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; - 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 QUOTED. */ - state = QUOTED; - break; - default: - string = g_string_append_c (string, *c); - state = NORMAL; - break; - } - break; - - default: - g_assert_not_reached(); - break; - } - - } - - field = g_strdup (string->str); - g_string_free( string, TRUE ); - g_free (pass1_field); - - return field; -} - - -/*---------------------------------------------------------------------------*/ -/* 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; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge-text.h b/glabels2/src/merge-text.h deleted file mode 100644 index 9a1abbb7..00000000 --- a/glabels2/src/merge-text.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * merge-text.h - * Copyright (C) 2002-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MERGE_TEXT_H__ -#define __MERGE_TEXT_H__ - -#include "merge.h" - -G_BEGIN_DECLS - -/* The following object arguments are available: - * - * name type description - * --------------------------------------------------------------------------- - * delim gchar Field delimiter. - * - */ - -#define GL_TYPE_MERGE_TEXT (gl_merge_text_get_type ()) -#define GL_MERGE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE_TEXT, glMergeText)) -#define GL_MERGE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_TEXT, glMergeTextClass)) -#define GL_IS_MERGE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE_TEXT)) -#define GL_IS_MERGE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_TEXT)) -#define GL_MERGE_TEXT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_MERGE_TEXT, glMergeTextClass)) - - -typedef struct _glMergeText glMergeText; -typedef struct _glMergeTextClass glMergeTextClass; - -typedef struct _glMergeTextPrivate glMergeTextPrivate; - - -struct _glMergeText { - glMerge object; - - glMergeTextPrivate *priv; -}; - -struct _glMergeTextClass { - glMergeClass parent_class; -}; - - -GType gl_merge_text_get_type (void) G_GNUC_CONST; - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge-vcard.c b/glabels2/src/merge-vcard.c deleted file mode 100644 index 69d205dd..00000000 --- a/glabels2/src/merge-vcard.c +++ /dev/null @@ -1,401 +0,0 @@ -/* - * merge-vcard.c - * Copyright (C) 2001-2009 Jim Evins . - * and - * Copyright (C) 2005 Austin Henry - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#ifdef HAVE_LIBEBOOK - - -#include "merge-vcard.h" - -#include -#include -#include -#include - -#include "debug.h" - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glMergeVCardPrivate { - FILE *fp; -}; - -enum { - LAST_SIGNAL -}; - -enum { - ARG_0, -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_merge_vcard_finalize (GObject *object); - -static void gl_merge_vcard_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec); - -static void gl_merge_vcard_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec); - -static GList *gl_merge_vcard_get_key_list (glMerge *merge); -static gchar *gl_merge_vcard_get_primary_key (glMerge *merge); -static void gl_merge_vcard_open (glMerge *merge); -static void gl_merge_vcard_close (glMerge *merge); -static glMergeRecord *gl_merge_vcard_get_record (glMerge *merge); -static void gl_merge_vcard_copy (glMerge *dst_merge, - glMerge *src_merge); -static char * parse_next_vcard (FILE *fp); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glMergeVCard, gl_merge_vcard, GL_TYPE_MERGE); - - -static void -gl_merge_vcard_class_init (glMergeVCardClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glMergeClass *merge_class = GL_MERGE_CLASS (class); - - gl_debug (DEBUG_MERGE, "START"); - - gl_merge_vcard_parent_class = g_type_class_peek_parent (class); - - object_class->set_property = gl_merge_vcard_set_property; - object_class->get_property = gl_merge_vcard_get_property; - - object_class->finalize = gl_merge_vcard_finalize; - - merge_class->get_key_list = gl_merge_vcard_get_key_list; - merge_class->get_primary_key = gl_merge_vcard_get_primary_key; - merge_class->open = gl_merge_vcard_open; - merge_class->close = gl_merge_vcard_close; - merge_class->get_record = gl_merge_vcard_get_record; - merge_class->copy = gl_merge_vcard_copy; - - gl_debug (DEBUG_MERGE, "END"); -} - - -static void -gl_merge_vcard_init (glMergeVCard *merge_vcard) -{ - gl_debug (DEBUG_MERGE, "START"); - - merge_vcard->priv = g_new0 (glMergeVCardPrivate, 1); - - gl_debug (DEBUG_MERGE, "END"); -} - - -static void -gl_merge_vcard_finalize (GObject *object) -{ - glMergeVCard *merge_vcard = GL_MERGE_VCARD (object); - - gl_debug (DEBUG_MERGE, "START"); - - g_return_if_fail (object && GL_IS_MERGE_VCARD (object)); - - g_free (merge_vcard->priv); - - G_OBJECT_CLASS (gl_merge_vcard_parent_class)->finalize (object); - - gl_debug (DEBUG_MERGE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Set argument. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_vcard_set_property (GObject *object, - guint param_id, - const GValue *value, - GParamSpec *pspec) -{ - glMergeVCard *merge_vcard; - - merge_vcard = GL_MERGE_VCARD (object); - - switch (param_id) { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } -} - - -/*--------------------------------------------------------------------------*/ -/* Get argument. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_vcard_get_property (GObject *object, - guint param_id, - GValue *value, - GParamSpec *pspec) -{ - glMergeVCard *merge_vcard; - - merge_vcard = GL_MERGE_VCARD (object); - - switch (param_id) { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); - break; - } - -} - - -/*--------------------------------------------------------------------------*/ -/* Get key list. */ -/*--------------------------------------------------------------------------*/ -static GList * -gl_merge_vcard_get_key_list (glMerge *merge) -{ - glMergeVCard *merge_vcard; - GList *key_list; - - gl_debug (DEBUG_MERGE, "BEGIN"); - - merge_vcard = GL_MERGE_VCARD (merge); - - /* extremely simple approach until I can list the available keys from the - * server, and return them. */ - key_list = NULL; - key_list = g_list_append (key_list, g_strdup ("full_name")); - key_list = g_list_append (key_list, g_strdup ("home_address")); - key_list = g_list_append (key_list, g_strdup ("work_address")); - - gl_debug (DEBUG_MERGE, "END"); - - return key_list; -} - - -/*--------------------------------------------------------------------------*/ -/* Get "primary" key. */ -/*--------------------------------------------------------------------------*/ -static gchar * -gl_merge_vcard_get_primary_key (glMerge *merge) -{ - /* For now, let's always assume the full name is the primary key. */ - return g_strdup ("full_name"); -} - - -/*--------------------------------------------------------------------------*/ -/* Open merge source. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_vcard_open (glMerge *merge) -{ - glMergeVCard *merge_vcard; - gchar *src; - - merge_vcard = GL_MERGE_VCARD (merge); - - src = gl_merge_get_src (merge); - - if (src != NULL) { - merge_vcard->priv->fp = fopen (src, "r"); - } - - g_free (src); - - return; -} - - -/*--------------------------------------------------------------------------*/ -/* Close merge source. */ -/*--------------------------------------------------------------------------*/ -static void -gl_merge_vcard_close (glMerge *merge) -{ - glMergeVCard *merge_vcard; - - merge_vcard = GL_MERGE_VCARD (merge); - - if (merge_vcard->priv->fp != NULL) { - fclose (merge_vcard->priv->fp); - merge_vcard->priv->fp = NULL; - } -} - - -/*--------------------------------------------------------------------------*/ -/* Get next record from merge source, NULL if no records left (i.e EOF) */ -/*--------------------------------------------------------------------------*/ -static glMergeRecord * -gl_merge_vcard_get_record (glMerge *merge) -{ - glMergeVCard *merge_vcard; - glMergeRecord *record; - glMergeField *field; - - char *vcard; - EContact *contact; - - merge_vcard = GL_MERGE_VCARD (merge); - - vcard = parse_next_vcard(merge_vcard->priv->fp); - if (vcard == NULL || vcard[0] == '\0') { - return NULL; /* EOF */ - } - contact = e_contact_new_from_vcard(vcard); - if (contact == NULL) { - return NULL; /* invalid vcard */ - } - - record = g_new0 (glMergeRecord, 1); - record->select_flag = TRUE; - - /* Take the interesting fields one by one from the contact, and put them - * into the glMergeRecord structure. When done, free up the resources for - * that contact */ - - /* get the full name */ - field = g_new0 (glMergeField, 1); - field->key = g_strdup ("full_name"); - field->value = g_strdup (e_contact_get_const(contact, E_CONTACT_FULL_NAME)); - - record->field_list = g_list_append (record->field_list, field); - - /* get the home address */ - field = g_new0 (glMergeField, 1); - field->key = g_strdup ("home_address"); - field->value = g_strdup (e_contact_get_const(contact, E_CONTACT_ADDRESS_LABEL_HOME)); - - record->field_list = g_list_append (record->field_list, field); - - /* get the work address */ - field = g_new0 (glMergeField, 1); - field->key = g_strdup ("work_address"); - field->value = g_strdup (e_contact_get_const(contact, E_CONTACT_ADDRESS_LABEL_WORK)); - - record->field_list = g_list_append (record->field_list, field); - - /* free the contact */ - g_object_unref (contact); - g_free(vcard); - - return record; -} - - -/*---------------------------------------------------------------------------*/ -/* Copy merge_vcard specific fields. */ -/*---------------------------------------------------------------------------*/ -static void -gl_merge_vcard_copy (glMerge *dst_merge, - glMerge *src_merge) -{ - glMergeVCard *dst_merge_vcard; - glMergeVCard *src_merge_vcard; - - dst_merge_vcard = GL_MERGE_VCARD (dst_merge); - src_merge_vcard = GL_MERGE_VCARD (src_merge); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE: pull out a full VCard from the open file */ -/* Arguments: */ -/* fp - an open stream to parse in put from */ -/* Returns: */ -/* a pointer to the buffer containing the vcard, the empty string on */ -/* end-of-file or error, this buffer needs to be free by the caller */ -/*---------------------------------------------------------------------------*/ -static char * -parse_next_vcard (FILE *fp) -{ - gboolean found_begin = FALSE; - gboolean found_end = FALSE; - char *vcard; - char line[512]; - int size = 2048; - int cursize = 0; - - /* if no source has been set up, don't try to read from the file */ - if (!fp) { - return NULL; - } - - vcard = g_malloc0(size); - - while (fgets(line, sizeof(line), fp) && found_end == FALSE) { - if (found_begin == TRUE) { - if (g_str_has_prefix(line, "END:VCARD")) { found_end = TRUE; } - } else { - if (g_str_has_prefix(line, "BEGIN:VCARD")) { found_begin = TRUE; } - else { continue; }/* skip lines not in a vcard */ - } - - /* if the buffer passed us isn't big enough, reallocate it */ - cursize += strlen(line); - if (cursize >= size) { - size *= 2; - vcard = (char *)g_realloc(vcard, size); /* aborts program on error */ - } - - /* add the line (or portion thereof) to the vcard */ - strncat(vcard, line, size); - } - - return vcard; -} - - - -#endif /* HAVE_LIBEBOOK */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge-vcard.h b/glabels2/src/merge-vcard.h deleted file mode 100644 index 41a64ea5..00000000 --- a/glabels2/src/merge-vcard.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * merge-vcard.h - * Copyright (C) 2001-2009 Jim Evins . - * and - * Copyright (C) 2005 Austin Henry - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MERGE_VCARD_H__ -#define __MERGE_VCARD_H__ - -#include "merge.h" - -G_BEGIN_DECLS - -/* The following object arguments are available: - * - * name type description - * --------------------------------------------------------------------------- - * - */ - -#define GL_TYPE_MERGE_VCARD (gl_merge_vcard_get_type ()) -#define GL_MERGE_VCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE_VCARD, glMergeVCard)) -#define GL_MERGE_VCARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_VCARD, glMergeVCardClass)) -#define GL_IS_MERGE_VCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE_VCARD)) -#define GL_IS_MERGE_VCARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_VCARD)) -#define GL_MERGE_VCARD_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_MERGE_VCARD, glMergeVCardClass)) - - -typedef struct _glMergeVCard glMergeVCard; -typedef struct _glMergeVCardClass glMergeVCardClass; - -typedef struct _glMergeVCardPrivate glMergeVCardPrivate; - - -struct _glMergeVCard { - glMerge object; - - glMergeVCardPrivate *priv; -}; - -struct _glMergeVCardClass { - glMergeClass parent_class; -}; - - -GType gl_merge_vcard_get_type (void) G_GNUC_CONST; - -G_END_DECLS - - -#endif /* __MERGE_VCARD_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge.c b/glabels2/src/merge.c deleted file mode 100644 index 56e14813..00000000 --- a/glabels2/src/merge.c +++ /dev/null @@ -1,799 +0,0 @@ -/* - * merge.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "merge.h" - -#include -#include -#include - -#include - -#include "debug.h" - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glMergePrivate { - gchar *name; - gchar *description; - gchar *src; - glMergeSrcType src_type; - - GList *record_list; -}; - -enum { - LAST_SIGNAL -}; - -typedef struct { - - GType type; - gchar *name; - gchar *description; - glMergeSrcType src_type; - - guint n_params; - GParameter *params; - -} Backend; - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static GList *backends = NULL; - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_merge_finalize (GObject *object); - -static void merge_open (glMerge *merge); - -static void merge_close (glMerge *merge); - -static glMergeRecord *merge_get_record (glMerge *merge); - -static void merge_free_record (glMergeRecord **record); - -static glMergeRecord *merge_dup_record (glMergeRecord *record); - -static void merge_free_record_list (GList **record_list); - -static GList *merge_dup_record_list (GList *record_list); - - - - -/*****************************************************************************/ -/* Register a new merge backend. */ -/*****************************************************************************/ -void -gl_merge_register_backend (GType type, - gchar *name, - gchar *description, - glMergeSrcType src_type, - const gchar *first_arg_name, - ...) -{ - Backend *backend; - va_list args; - const gchar *pname; - GObjectClass *class; - GParamSpec *pspec; - GParameter *params; - guint n_params = 0, n_alloced_params = 16; - - backend = g_new0 (Backend, 1); - - backend->type = type; - backend->name = g_strdup (name); - backend->description = g_strdup (description); - backend->src_type = src_type; - - params = g_new (GParameter, n_alloced_params); - va_start (args, first_arg_name); - for ( pname=first_arg_name; pname != NULL; pname=va_arg (args,gchar *) ) { - gchar *error = NULL; - - class = g_type_class_ref (type); - if (class == NULL) { - g_message ("%s: unknown object type %d", - G_STRLOC, (int)type); - break; - } - pspec = g_object_class_find_property (class, pname); - if (pspec == NULL) { - g_message ("%s: object class `%s' has no property named `%s'", - G_STRLOC, g_type_name (type), pname); - break; - } - if (n_params >= n_alloced_params) { - n_alloced_params += 16; - params = g_renew (GParameter, params, n_alloced_params); - } - params[n_params].name = pname; - params[n_params].value.g_type = 0; - g_value_init (¶ms[n_params].value, pspec->value_type); - G_VALUE_COLLECT (¶ms[n_params].value, args, 0, &error); - if (error) { - g_message ("%s: %s", G_STRLOC, error); - g_free (error); - break; - } - - n_params++; - } - va_end (args); - - backend->n_params = n_params; - backend->params = params; - - backends = g_list_append (backends, backend); - -} - -/*****************************************************************************/ -/* Get list of registered backend descriptions. */ -/*****************************************************************************/ -GList * -gl_merge_get_descriptions (void) -{ - GList *descriptions = NULL; - GList *p; - Backend *backend; - - descriptions = g_list_append (descriptions, g_strdup(_("None"))); - - for ( p=backends; p!=NULL; p=p->next) { - backend = (Backend *)p->data; - descriptions = g_list_append (descriptions, - g_strdup(backend->description)); - } - - return descriptions; -} - -/*****************************************************************************/ -/* Free list of descriptions. */ -/*****************************************************************************/ -void -gl_merge_free_descriptions (GList **descriptions) -{ - GList *p; - - gl_debug (DEBUG_MERGE, "START"); - - for (p = *descriptions; p != NULL; p = p->next) { - g_free (p->data); - p->data = NULL; - } - - g_list_free (*descriptions); - *descriptions = NULL; - - gl_debug (DEBUG_MERGE, "END"); -} - -/*****************************************************************************/ -/* Lookup name of backend from description. */ -/*****************************************************************************/ -gchar * -gl_merge_description_to_name (gchar *description) -{ - GList *p; - Backend *backend; - - if (lgl_str_utf8_casecmp(description, _("None")) == 0) { - return g_strdup("None"); - } - - for ( p=backends; p!=NULL; p=p->next) { - backend = (Backend *)p->data; - if (lgl_str_utf8_casecmp(description, backend->description) == 0) { - return g_strdup(backend->name); - } - } - - return g_strdup("None"); -} - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glMerge, gl_merge, G_TYPE_OBJECT); - -static void -gl_merge_class_init (glMergeClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_MERGE, "START"); - - gl_merge_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_merge_finalize; - - gl_debug (DEBUG_MERGE, "END"); -} - -static void -gl_merge_init (glMerge *merge) -{ - gl_debug (DEBUG_MERGE, "START"); - - merge->priv = g_new0 (glMergePrivate, 1); - - gl_debug (DEBUG_MERGE, "END"); -} - -static void -gl_merge_finalize (GObject *object) -{ - glMerge *merge = GL_MERGE (object); - - gl_debug (DEBUG_MERGE, "START"); - - g_return_if_fail (object && GL_IS_MERGE (object)); - - merge_free_record_list (&merge->priv->record_list); - g_free (merge->priv->name); - g_free (merge->priv->description); - g_free (merge->priv->src); - g_free (merge->priv); - - G_OBJECT_CLASS (gl_merge_parent_class)->finalize (object); - - gl_debug (DEBUG_MERGE, "END"); -} - -/*****************************************************************************/ -/* New merge object. */ -/*****************************************************************************/ -glMerge * -gl_merge_new (gchar *name) -{ - glMerge *merge = NULL; - GList *p; - Backend *backend; - - gl_debug (DEBUG_MERGE, "START"); - - for (p=backends; p!=NULL; p=p->next) { - backend = (Backend *)p->data; - - if (g_strcasecmp(name, backend->name) == 0) { - - merge = GL_MERGE (g_object_newv (backend->type, - backend->n_params, - backend->params)); - - merge->priv->name = g_strdup (name); - merge->priv->description = g_strdup (backend->description); - merge->priv->src_type = backend->src_type; - - break; - } - } - - if ( (merge == NULL) && (g_strcasecmp (name, "None") != 0)) { - g_message ("Unknown merge backend \"%s\"", name); - } - - gl_debug (DEBUG_MERGE, "END"); - - return merge; -} - -/*****************************************************************************/ -/* Duplicate merge. */ -/*****************************************************************************/ -glMerge * -gl_merge_dup (glMerge *src_merge) -{ - glMerge *dst_merge; - - gl_debug (DEBUG_MERGE, "START"); - - if (src_merge == NULL) { - gl_debug (DEBUG_MERGE, "END (NULL)"); - return NULL; - } - - g_return_val_if_fail (GL_IS_MERGE (src_merge), NULL); - - dst_merge = g_object_new (G_OBJECT_TYPE(src_merge), NULL); - dst_merge->priv->name = g_strdup (src_merge->priv->name); - dst_merge->priv->description = g_strdup (src_merge->priv->description); - dst_merge->priv->src = g_strdup (src_merge->priv->src); - dst_merge->priv->src_type = src_merge->priv->src_type; - dst_merge->priv->record_list - = merge_dup_record_list (src_merge->priv->record_list); - - if ( GL_MERGE_GET_CLASS(src_merge)->copy != NULL ) { - - /* We have an object specific method, use it */ - GL_MERGE_GET_CLASS(src_merge)->copy (dst_merge, src_merge); - - } - - gl_debug (DEBUG_MERGE, "END"); - - return dst_merge; -} - -/*****************************************************************************/ -/* Get name of merge. */ -/*****************************************************************************/ -gchar * -gl_merge_get_name (glMerge *merge) -{ - gl_debug (DEBUG_MERGE, ""); - - if (merge == NULL) { - return g_strdup("None"); - } - - g_return_val_if_fail (GL_IS_MERGE (merge), g_strdup("None")); - - return g_strdup(merge->priv->name); -} - -/*****************************************************************************/ -/* Get description of merge. */ -/*****************************************************************************/ -gchar * -gl_merge_get_description (glMerge *merge) -{ - gl_debug (DEBUG_MERGE, ""); - - if (merge == NULL) { - return g_strdup(_("None")); - } - - g_return_val_if_fail (GL_IS_MERGE (merge), g_strdup(_("None"))); - - return g_strdup(merge->priv->description); -} - -/*****************************************************************************/ -/* Get source type of merge. */ -/*****************************************************************************/ -glMergeSrcType -gl_merge_get_src_type (glMerge *merge) -{ - gl_debug (DEBUG_MERGE, ""); - - if (merge == NULL) { - return GL_MERGE_SRC_IS_FIXED; - } - - g_return_val_if_fail (GL_IS_MERGE (merge), GL_MERGE_SRC_IS_FIXED); - - return merge->priv->src_type; -} - -/*****************************************************************************/ -/* Set src of merge. */ -/*****************************************************************************/ -void -gl_merge_set_src (glMerge *merge, - gchar *src) -{ - GList *record_list = NULL; - glMergeRecord *record; - - gl_debug (DEBUG_MERGE, "START"); - - if (merge == NULL) - { - gl_debug (DEBUG_MERGE, "END (NULL)"); - return; - } - - g_return_if_fail (GL_IS_MERGE (merge)); - - if ( src == NULL) - { - - if ( merge->priv->src != NULL ) - { - g_free (merge->priv->src); - } - merge->priv->src = NULL; - merge_free_record_list (&merge->priv->record_list); - - } - else - { - - if ( merge->priv->src != NULL ) - { - g_free(merge->priv->src); - } - merge->priv->src = g_strdup (src); - - merge_free_record_list (&merge->priv->record_list); - - merge_open (merge); - while ( (record = merge_get_record (merge)) != NULL ) - { - record_list = g_list_append( record_list, record ); - } - merge_close (merge); - merge->priv->record_list = record_list; - - } - - - gl_debug (DEBUG_MERGE, "END"); -} - -/*****************************************************************************/ -/* Get src of merge. */ -/*****************************************************************************/ -gchar * -gl_merge_get_src (glMerge *merge) -{ - gl_debug (DEBUG_MERGE, ""); - - if (merge == NULL) { - return NULL; - } - - g_return_val_if_fail (GL_IS_MERGE (merge), NULL); - - return g_strdup(merge->priv->src); -} - -/*****************************************************************************/ -/* Get Key List. */ -/*****************************************************************************/ -GList * -gl_merge_get_key_list (glMerge *merge) -{ - GList *key_list = NULL; - - gl_debug (DEBUG_MERGE, "START"); - - if (merge == NULL) { - return NULL; - } - - g_return_val_if_fail (GL_IS_MERGE (merge), NULL); - - if ( GL_MERGE_GET_CLASS(merge)->get_key_list != NULL ) { - - key_list = GL_MERGE_GET_CLASS(merge)->get_key_list (merge); - - } - - gl_debug (DEBUG_MERGE, "END"); - - return key_list; -} - -/*****************************************************************************/ -/* Free a list of keys. */ -/*****************************************************************************/ -void -gl_merge_free_key_list (GList **key_list) -{ - GList *p; - - gl_debug (DEBUG_MERGE, "START"); - - for (p = *key_list; p != NULL; p = p->next) { - g_free (p->data); - p->data = NULL; - } - - g_list_free (*key_list); - *key_list = NULL; - - gl_debug (DEBUG_MERGE, "END"); -} - -/*****************************************************************************/ -/* Get Key List. */ -/*****************************************************************************/ -gchar * -gl_merge_get_primary_key (glMerge *merge) -{ - gchar *key = NULL; - - gl_debug (DEBUG_MERGE, "START"); - - if (merge == NULL) { - return NULL; - } - - g_return_val_if_fail (GL_IS_MERGE (merge), NULL); - - if ( GL_MERGE_GET_CLASS(merge)->get_primary_key != NULL ) { - - key = GL_MERGE_GET_CLASS(merge)->get_primary_key (merge); - - } - - gl_debug (DEBUG_MERGE, "END"); - - return key; -} - -/*---------------------------------------------------------------------------*/ -/* Open merge source. */ -/*---------------------------------------------------------------------------*/ -static void -merge_open (glMerge *merge) -{ - gl_debug (DEBUG_MERGE, "START"); - - g_return_if_fail (merge && GL_IS_MERGE (merge)); - - if ( GL_MERGE_GET_CLASS(merge)->open != NULL ) { - - GL_MERGE_GET_CLASS(merge)->open (merge); - - } - - gl_debug (DEBUG_MERGE, "END"); -} - -/*---------------------------------------------------------------------------*/ -/* Close merge source. */ -/*---------------------------------------------------------------------------*/ -static void -merge_close (glMerge *merge) -{ - gl_debug (DEBUG_MERGE, "START"); - - g_return_if_fail (merge && GL_IS_MERGE (merge)); - - if ( GL_MERGE_GET_CLASS(merge)->close != NULL ) { - - GL_MERGE_GET_CLASS(merge)->close (merge); - - } - - gl_debug (DEBUG_MERGE, "END"); -} - -/*---------------------------------------------------------------------------*/ -/* Get next record (list of fields) from opened merge source. */ -/*---------------------------------------------------------------------------*/ -static glMergeRecord * -merge_get_record (glMerge *merge) -{ - glMergeRecord *record = NULL; - - gl_debug (DEBUG_MERGE, "START"); - - g_return_val_if_fail (merge && GL_IS_MERGE (merge), NULL); - - if ( GL_MERGE_GET_CLASS(merge)->get_record != NULL ) { - - record = GL_MERGE_GET_CLASS(merge)->get_record (merge); - - } - - gl_debug (DEBUG_MERGE, "END"); - - return record; -} - -/*---------------------------------------------------------------------------*/ -/* Free a merge record (list of fields) */ -/*---------------------------------------------------------------------------*/ -static void -merge_free_record (glMergeRecord **record) -{ - GList *p; - glMergeField *field; - - gl_debug (DEBUG_MERGE, "START"); - - 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; - - gl_debug (DEBUG_MERGE, "END"); -} - -/*---------------------------------------------------------------------------*/ -/* Duplicate a merge record (list of fields) */ -/*---------------------------------------------------------------------------*/ -static glMergeRecord * -merge_dup_record (glMergeRecord *record) -{ - glMergeRecord *dest_record; - GList *p; - glMergeField *dest_field, *field; - - gl_debug (DEBUG_MERGE, "START"); - - dest_record = g_new0 (glMergeRecord, 1); - dest_record->select_flag = record->select_flag; - - for (p = record->field_list; p != NULL; p = p->next) { - field = (glMergeField *) p->data; - - dest_field = g_new0 (glMergeField, 1); - - dest_field->key = g_strdup (field->key); - dest_field->value = g_strdup (field->value); - - dest_record->field_list = - g_list_append (dest_record->field_list, dest_field); - - } - - gl_debug (DEBUG_MERGE, "END"); - - return dest_record; -} - -/*****************************************************************************/ -/* Find key in given record and evaluate. */ -/*****************************************************************************/ -gchar * -gl_merge_eval_key (glMergeRecord *record, - gchar *key) - -{ - GList *p; - glMergeField *field; - gchar *val = NULL; - - gl_debug (DEBUG_MERGE, "START"); - - if ( (record != NULL) ) { - for (p = record->field_list; p != NULL; p = p->next) { - field = (glMergeField *) p->data; - - if (strcmp (key, field->key) == 0) { - val = g_strdup (field->value); - } - - } - } - - gl_debug (DEBUG_MERGE, "END"); - - return val; -} - -/*****************************************************************************/ -/* Read all records from merge source. */ -/*****************************************************************************/ -const GList * -gl_merge_get_record_list (glMerge *merge) -{ - gl_debug (DEBUG_MERGE, ""); - - if ( merge != NULL ) { - return merge->priv->record_list; - } else { - return NULL; - } -} - -/*---------------------------------------------------------------------------*/ -/* Free a list of records. */ -/*---------------------------------------------------------------------------*/ -static void -merge_free_record_list (GList **record_list) -{ - GList *p; - glMergeRecord *record; - - gl_debug (DEBUG_MERGE, "START"); - - for (p = *record_list; p != NULL; p = p->next) { - record = (glMergeRecord *) p->data; - - merge_free_record( &record ); - - } - - g_list_free (*record_list); - *record_list = NULL; - - gl_debug (DEBUG_MERGE, "END"); -} - -/*---------------------------------------------------------------------------*/ -/* Duplicate a list of records. */ -/*---------------------------------------------------------------------------*/ -static GList * -merge_dup_record_list (GList *record_list) -{ - GList *dest_list = NULL, *p; - glMergeRecord *dest_record, *record; - - gl_debug (DEBUG_MERGE, "START"); - - for (p = record_list; p != NULL; p = p->next) { - record = (glMergeRecord *) p->data; - - dest_record = merge_dup_record( record ); - dest_list = g_list_append (dest_list, dest_record); - } - - - gl_debug (DEBUG_MERGE, "END"); - - return dest_list; -} - -/*****************************************************************************/ -/* Count selected records. */ -/*****************************************************************************/ -gint -gl_merge_get_record_count (glMerge *merge) -{ - GList *p; - glMergeRecord *record; - gint count; - - gl_debug (DEBUG_MERGE, "START"); - - count = 0; - for ( p=merge->priv->record_list; p!=NULL; p=p->next ) { - record = (glMergeRecord *)p->data; - - if ( record->select_flag ) count ++; - } - - gl_debug (DEBUG_MERGE, "END"); - - return count; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/merge.h b/glabels2/src/merge.h deleted file mode 100644 index 9456ca92..00000000 --- a/glabels2/src/merge.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - * merge.h - * Copyright (C) 2002-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MERGE_H__ -#define __MERGE_H__ - -#include - -G_BEGIN_DECLS - -typedef enum { - GL_MERGE_SRC_IS_FIXED, - GL_MERGE_SRC_IS_FILE, -} glMergeSrcType; - -typedef struct { - gchar *key; - gchar *value; -} glMergeField; - -typedef struct { - gboolean select_flag; - GList *field_list; /* List of glMergeFields */ -} glMergeRecord; - - -#define GL_TYPE_MERGE (gl_merge_get_type ()) -#define GL_MERGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE, glMerge)) -#define GL_MERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE, glMergeClass)) -#define GL_IS_MERGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE)) -#define GL_IS_MERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE)) -#define GL_MERGE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_MERGE, glMergeClass)) - - -typedef struct _glMerge glMerge; -typedef struct _glMergeClass glMergeClass; - -typedef struct _glMergePrivate glMergePrivate; - - -struct _glMerge { - GObject object; - - glMergePrivate *priv; -}; - -struct _glMergeClass { - GObjectClass parent_class; - - GList *(*get_key_list) (glMerge *merge); - - gchar *(*get_primary_key) (glMerge *merge); - - void (*open) (glMerge *merge); - - void (*close) (glMerge *merge); - - glMergeRecord *(*get_record) (glMerge *merge); - - void (*copy) (glMerge *dst_merge, - glMerge *src_merge); -}; - - -void gl_merge_register_backend (GType type, - gchar *name, - gchar *description, - glMergeSrcType src_type, - const gchar *first_arg_name, - ...); - -GList *gl_merge_get_descriptions (void); - -void gl_merge_free_descriptions (GList **descriptions); - -gchar *gl_merge_description_to_name (gchar *description); - -GType gl_merge_get_type (void) G_GNUC_CONST; - -glMerge *gl_merge_new (gchar *name); - -glMerge *gl_merge_dup (glMerge *orig); - -gchar *gl_merge_get_name (glMerge *merge); - -gchar *gl_merge_get_description (glMerge *merge); - -glMergeSrcType gl_merge_get_src_type (glMerge *merge); - -void gl_merge_set_src (glMerge *merge, - gchar *src); - -gchar *gl_merge_get_src (glMerge *merge); - -GList *gl_merge_get_key_list (glMerge *merge); - -void gl_merge_free_key_list (GList **keys); - -gchar *gl_merge_get_primary_key (glMerge *merge); - -gchar *gl_merge_eval_key (glMergeRecord *record, - gchar *key); - -const GList *gl_merge_get_record_list (glMerge *merge); - -gint gl_merge_get_record_count (glMerge *merge); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/mini-label-preview.c b/glabels2/src/mini-label-preview.c deleted file mode 100644 index e58986fd..00000000 --- a/glabels2/src/mini-label-preview.c +++ /dev/null @@ -1,315 +0,0 @@ -/* - * mini-label-preview.c - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "mini-label-preview.h" - -#include -#include "cairo-label-path.h" -#include "color.h" -#include "marshal.h" - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - -#define MARGIN 2 -#define SHADOW_OFFSET 3 - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glMiniLabelPreviewPrivate { - - lglTemplate *template; - gboolean rotate_flag; -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_mini_label_preview_finalize (GObject *object); - -static void style_set_cb (GtkWidget *widget, - GtkStyle *previous_style); - -static void redraw (glMiniLabelPreview *this); - -static gboolean expose_event_cb (GtkWidget *widget, - GdkEventExpose *event); - -static void draw_preview (glMiniLabelPreview *this, - cairo_t *cr); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glMiniLabelPreview, gl_mini_label_preview, GTK_TYPE_DRAWING_AREA); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_mini_label_preview_class_init (glMiniLabelPreviewClass *class) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (class); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); - - gl_mini_label_preview_parent_class = g_type_class_peek_parent (class); - - gobject_class->finalize = gl_mini_label_preview_finalize; - - widget_class->expose_event = expose_event_cb; - widget_class->style_set = style_set_cb; -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_mini_label_preview_init (glMiniLabelPreview *this) -{ - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW); - - this->priv = g_new0 (glMiniLabelPreviewPrivate, 1); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_mini_label_preview_finalize (GObject *object) -{ - glMiniLabelPreview *this = GL_MINI_LABEL_PREVIEW (object); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_MINI_LABEL_PREVIEW (object)); - - lgl_template_free (this->priv->template); - g_free (this->priv); - - G_OBJECT_CLASS (gl_mini_label_preview_parent_class)->finalize (object); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_mini_label_preview_new (gint w, - gint h) -{ - glMiniLabelPreview *this; - - this = g_object_new (GL_TYPE_MINI_LABEL_PREVIEW, NULL); - - gtk_widget_set_size_request (GTK_WIDGET (this), w, h); - - return GTK_WIDGET (this); -} - - -/*****************************************************************************/ -/* Set label by name. */ -/*****************************************************************************/ -void -gl_mini_label_preview_set_by_name (glMiniLabelPreview *this, - gchar *name, - gboolean rotate_flag) -{ - if (!name) - { - lgl_template_free (this->priv->template); - this->priv->template = NULL; - } - else - { - this->priv->template = lgl_db_lookup_template_from_name (name); - this->priv->rotate_flag = rotate_flag; - } - - redraw (this); -} - - -/*--------------------------------------------------------------------------*/ -/* Style set handler (updates colors when style/theme changes). */ -/*--------------------------------------------------------------------------*/ -static void -style_set_cb (GtkWidget *widget, - GtkStyle *previous_style) -{ - redraw (GL_MINI_LABEL_PREVIEW (widget)); -} - - -/*****************************************************************************/ -/* Request redraw. */ -/*****************************************************************************/ -static void -redraw (glMiniLabelPreview *this) -{ - GdkRegion *region; - - if (GTK_WIDGET_REALIZED (GTK_WIDGET (this))) - { - /* redraw the cairo canvas forcing an expose event */ - region = gdk_drawable_get_clip_region (GTK_WIDGET (this)->window); - gdk_window_invalidate_region (GTK_WIDGET (this)->window, region, TRUE); - gdk_region_destroy (region); - } -} - - -/*****************************************************************************/ -/* "Expose event" callback. */ -/*****************************************************************************/ -static gboolean -expose_event_cb (GtkWidget *widget, - GdkEventExpose *event) -{ - cairo_t *cr; - - cr = gdk_cairo_create (widget->window); - - cairo_rectangle (cr, - event->area.x, event->area.y, - event->area.width, event->area.height); - cairo_clip (cr); - - cairo_translate (cr, widget->allocation.x, widget->allocation.y); - - draw_preview (GL_MINI_LABEL_PREVIEW (widget), cr); - - cairo_destroy (cr); - - return FALSE; -} - - -/*****************************************************************************/ -/* Draw sample. */ -/*****************************************************************************/ -static void -draw_preview (glMiniLabelPreview *this, - cairo_t *cr) -{ - GtkStyle *style; - gdouble w, h; - guint fill_color, line_color, shadow_color; - const lglTemplateFrame *frame; - gdouble w_label, h_label; - gdouble scale; - - - w = GTK_WIDGET (this)->allocation.width; - h = GTK_WIDGET (this)->allocation.height; - - - style = gtk_widget_get_style (GTK_WIDGET (this)); - if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) ) - { - fill_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); - line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); - shadow_color = gl_color_from_gdk_color (&style->dark[GTK_STATE_NORMAL]); - } - else - { - fill_color = GL_COLOR_NONE; - line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_INSENSITIVE]); - shadow_color = GL_COLOR_NONE; - } - - - if (this->priv->template == NULL) - { - return; - } - - frame = (lglTemplateFrame *)this->priv->template->frames->data; - - if (this->priv->rotate_flag) - { - lgl_template_frame_get_size (frame, &h_label, &w_label); - } - else - { - lgl_template_frame_get_size (frame, &w_label, &h_label); - } - - scale = MIN( (w - 2*MARGIN - 2*SHADOW_OFFSET)/w_label, - (h - 2*MARGIN - 2*SHADOW_OFFSET)/h_label ); - - - cairo_translate (cr, w/2.0, h/2.0); - cairo_scale (cr, scale, scale); - cairo_translate (cr, -w_label/2.0, -h_label/2.0); - - - /* - * Shadow - */ - cairo_save (cr); - cairo_translate (cr, SHADOW_OFFSET/scale, SHADOW_OFFSET/scale); - gl_cairo_label_path (cr, this->priv->template, this->priv->rotate_flag, FALSE); - - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_color)); - cairo_fill (cr); - cairo_restore (cr); - - /* - * Label + outline - */ - gl_cairo_label_path (cr, this->priv->template, this->priv->rotate_flag, FALSE); - - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); - cairo_fill_preserve (cr); - - cairo_set_line_width (cr, 1.0/scale); - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); - cairo_stroke (cr); - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/mini-label-preview.h b/glabels2/src/mini-label-preview.h deleted file mode 100644 index 9cc8ece7..00000000 --- a/glabels2/src/mini-label-preview.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * mini-label-preview.h - * Copyright (C) 2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MINI_LABEL_PREVIEW_H__ -#define __MINI_LABEL_PREVIEW_H__ - - -#include - - -G_BEGIN_DECLS - -#define GL_TYPE_MINI_LABEL_PREVIEW (gl_mini_label_preview_get_type ()) -#define GL_MINI_LABEL_PREVIEW(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_MINI_LABEL_PREVIEW, glMiniLabelPreview )) -#define GL_MINI_LABEL_PREVIEW_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MINI_LABEL_PREVIEW, glMiniLabelPreviewClass)) -#define GL_IS_MINI_LABEL_PREVIEW(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MINI_LABEL_PREVIEW)) -#define GL_IS_MINI_LABEL_PREVIEW_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MINI_LABEL_PREVIEW)) - -typedef struct _glMiniLabelPreview glMiniLabelPreview; -typedef struct _glMiniLabelPreviewPrivate glMiniLabelPreviewPrivate; -typedef struct _glMiniLabelPreviewClass glMiniLabelPreviewClass; - -struct _glMiniLabelPreview { - GtkDrawingArea parent_widget; - - glMiniLabelPreviewPrivate *priv; -}; - -struct _glMiniLabelPreviewClass { - GtkDrawingAreaClass parent_class; -}; - - -GType gl_mini_label_preview_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_mini_label_preview_new (gint w, - gint h); - -void gl_mini_label_preview_set_by_name (glMiniLabelPreview *this, - gchar *name, - gboolean rotate_flag); - - - -G_END_DECLS - -#endif /* __MINI_LABEL_PREVIEW_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/mini-preview-pixbuf-cache.c b/glabels2/src/mini-preview-pixbuf-cache.c deleted file mode 100644 index 82077ad5..00000000 --- a/glabels2/src/mini-preview-pixbuf-cache.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * mini-preview-pixbuf-cache.c - * Copyright (C) 2007-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "mini-preview-pixbuf-cache.h" - -#include - -#include "libglabels/libglabels.h" -#include "mini-preview-pixbuf.h" - -#include "debug.h" - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static GHashTable *mini_preview_pixbuf_cache = NULL; - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - - -/*****************************************************************************/ -/* Create a new hash table to keep track of cached mini preview pixbufs. */ -/*****************************************************************************/ -void -gl_mini_preview_pixbuf_cache_init (void) -{ - GList *names = NULL; - GList *p; - lglTemplate *template; - - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - mini_preview_pixbuf_cache = g_hash_table_new (g_str_hash, g_str_equal); - - names = lgl_db_get_template_name_list_unique (NULL, NULL, NULL); - for ( p=names; p != NULL; p=p->next ) - { - gl_debug (DEBUG_PIXBUF_CACHE, "name = \"%s\"", p->data); - - template = lgl_db_lookup_template_from_name (p->data); - gl_mini_preview_pixbuf_cache_add_by_template (template); - lgl_template_free (template); - } - lgl_db_free_template_name_list (names); - - gl_debug (DEBUG_PIXBUF_CACHE, "END pixbuf_cache=%p", mini_preview_pixbuf_cache); -} - -/*****************************************************************************/ -/* Add pixbuf to cache by template. */ -/*****************************************************************************/ -void -gl_mini_preview_pixbuf_cache_add_by_template (lglTemplate *template) -{ - GdkPixbuf *pixbuf; - GList *p; - lglTemplateAlias *alias; - gchar *name; - - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - pixbuf = gl_mini_preview_pixbuf_new (template, 72, 72); - - for ( p=template->aliases; p != NULL; p=p->next ) - { - alias = (lglTemplateAlias *)p->data; - - name = g_strdup_printf ("%s %s", alias->brand, alias->part); - g_hash_table_insert (mini_preview_pixbuf_cache, name, g_object_ref (pixbuf)); - } - - g_object_unref (pixbuf); - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); -} - -/*****************************************************************************/ -/* Add pixbuf to cache by name. */ -/*****************************************************************************/ -void -gl_mini_preview_pixbuf_cache_add_by_name (gchar *name) -{ - lglTemplate *template; - GdkPixbuf *pixbuf; - - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - template = lgl_db_lookup_template_from_name (name); - pixbuf = gl_mini_preview_pixbuf_new (template, 72, 72); - lgl_template_free (template); - - g_hash_table_insert (mini_preview_pixbuf_cache, g_strdup (name), pixbuf); - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); -} - -/*****************************************************************************/ -/* Get pixbuf. */ -/*****************************************************************************/ -GdkPixbuf * -gl_mini_preview_pixbuf_cache_get_pixbuf (gchar *name) -{ - GdkPixbuf *pixbuf; - - gl_debug (DEBUG_PIXBUF_CACHE, "START pixbuf_cache=%p", mini_preview_pixbuf_cache); - - pixbuf = g_hash_table_lookup (mini_preview_pixbuf_cache, name); - - if (!pixbuf) - { - gl_mini_preview_pixbuf_cache_add_by_name (name); - pixbuf = g_hash_table_lookup (mini_preview_pixbuf_cache, name); - } - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); - - return g_object_ref (pixbuf); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/mini-preview-pixbuf-cache.h b/glabels2/src/mini-preview-pixbuf-cache.h deleted file mode 100644 index 218eaddc..00000000 --- a/glabels2/src/mini-preview-pixbuf-cache.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * mini-preview-pixbuf-cache.h - * Copyright (C) 2007-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MINI_PREVIEW_PIXBUF_CACHE_H__ -#define __MINI_PREVIEW_PIXBUF_CACHE_H__ - -#include -#include - -G_BEGIN_DECLS - -void gl_mini_preview_pixbuf_cache_init (void); - -void gl_mini_preview_pixbuf_cache_add_by_name (gchar *name); -void gl_mini_preview_pixbuf_cache_add_by_template (lglTemplate *template); - -GdkPixbuf *gl_mini_preview_pixbuf_cache_get_pixbuf (gchar *name); - - -G_END_DECLS - -#endif /*__MINI_PREVIEW_PIXBUF_CACHE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/mini-preview-pixbuf.c b/glabels2/src/mini-preview-pixbuf.c deleted file mode 100644 index 0651263f..00000000 --- a/glabels2/src/mini-preview-pixbuf.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * mini-preview-pixbuf.c - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "mini-preview-pixbuf.h" - -#include -#include - -#include "cairo-label-path.h" - -#include "debug.h" - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - -#define PAPER_RGB_ARGS 0.95, 0.95, 0.95 -#define PAPER_OUTLINE_RGB_ARGS 0.0, 0.0, 0.0 -#define LABEL_RGB_ARGS 1.0, 1.0, 1.0 -#define LABEL_OUTLINE_RGB_ARGS 0.25, 0.25, 0.25 - -#define PAPER_OUTLINE_WIDTH_PIXELS 1.0 -#define LABEL_OUTLINE_WIDTH_PIXELS 1.0 - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void draw_paper (cairo_t *cr, - lglTemplate *template, - gdouble scale); - -static void draw_label_outlines (cairo_t *cr, - lglTemplate *template, - gdouble scale); - -static void draw_label_outline (cairo_t *cr, - lglTemplate *template, - gdouble x0, - gdouble y0); - - - - -/****************************************************************************/ -/* Create new pixbuf with mini preview of template */ -/****************************************************************************/ -GdkPixbuf * -gl_mini_preview_pixbuf_new (lglTemplate *template, - gint width, - gint height) -{ - cairo_surface_t *surface; - cairo_t *cr; - GdkPixbuf *pixbuf; - gdouble scale; - gdouble w, h; - gdouble offset_x, offset_y; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - /* Create pixbuf and cairo context. */ - pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height); - surface = cairo_image_surface_create_for_data (gdk_pixbuf_get_pixels (pixbuf), - CAIRO_FORMAT_RGB24, - gdk_pixbuf_get_width (pixbuf), - gdk_pixbuf_get_height (pixbuf), - gdk_pixbuf_get_rowstride (pixbuf)); - - cr = cairo_create (surface); - cairo_surface_destroy (surface); - - /* Clear pixbuf */ - cairo_save (cr); - cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); - cairo_paint (cr); - cairo_restore (cr); - - cairo_set_antialias (cr, CAIRO_ANTIALIAS_GRAY); - - /* Set scale and offset */ - w = width - 1; - h = height - 1; - if ( (w/template->page_width) > (h/template->page_height) ) { - scale = h / template->page_height; - } else { - scale = w / template->page_width; - } - offset_x = (width/scale - template->page_width) / 2.0; - offset_y = (height/scale - template->page_height) / 2.0; - cairo_identity_matrix (cr); - cairo_scale (cr, scale, scale); - cairo_translate (cr, offset_x, offset_y); - - /* Draw paper and label outlines */ - draw_paper (cr, template, scale); - draw_label_outlines (cr, template, scale); - - /* Cleanup */ - cairo_destroy (cr); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); - - return pixbuf; -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Draw paper and paper outline. */ -/*--------------------------------------------------------------------------*/ -static void -draw_paper (cairo_t *cr, - lglTemplate *template, - gdouble scale) -{ - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - cairo_save (cr); - cairo_rectangle (cr, 0.0, 0.0, template->page_width, template->page_height); - cairo_set_source_rgb (cr, PAPER_RGB_ARGS); - cairo_fill_preserve (cr); - cairo_set_line_width (cr, PAPER_OUTLINE_WIDTH_PIXELS/scale); - cairo_set_source_rgb (cr, PAPER_OUTLINE_RGB_ARGS); - cairo_stroke (cr); - cairo_restore (cr); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Draw label outlines. */ -/*--------------------------------------------------------------------------*/ -static void -draw_label_outlines (cairo_t *cr, - lglTemplate *template, - gdouble scale) -{ - const lglTemplateFrame *frame; - gint i, n_labels; - lglTemplateOrigin *origins; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - cairo_save (cr); - - cairo_set_line_width (cr, LABEL_OUTLINE_WIDTH_PIXELS/scale); - - frame = (lglTemplateFrame *)template->frames->data; - - n_labels = lgl_template_frame_get_n_labels (frame); - origins = lgl_template_frame_get_origins (frame); - - for ( i=0; i < n_labels; i++ ) { - - draw_label_outline(cr, template, origins[i].x, origins[i].y); - - } - - g_free (origins); - - cairo_restore (cr); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Draw label outline. */ -/*--------------------------------------------------------------------------*/ -static void -draw_label_outline (cairo_t *cr, - lglTemplate *template, - gdouble x0, - gdouble y0) -{ - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - cairo_save (cr); - - cairo_translate (cr, x0, y0); - - gl_cairo_label_path (cr, template, FALSE, FALSE); - - cairo_set_source_rgb (cr, LABEL_RGB_ARGS); - cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); - cairo_fill_preserve (cr); - - cairo_set_source_rgb (cr, LABEL_OUTLINE_RGB_ARGS); - cairo_stroke (cr); - - cairo_restore (cr); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/mini-preview-pixbuf.h b/glabels2/src/mini-preview-pixbuf.h deleted file mode 100644 index 825938e5..00000000 --- a/glabels2/src/mini-preview-pixbuf.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * mini-preview-pixbuf.h - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MINI_PREVIEW_PIXBUF_H__ -#define __MINI_PREVIEW_PIXBUF_H__ - - -#include -#include - -G_BEGIN_DECLS - -GdkPixbuf *gl_mini_preview_pixbuf_new (lglTemplate *template, - gint width, - gint height); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/mini-preview.c b/glabels2/src/mini-preview.c deleted file mode 100644 index 9bcedbff..00000000 --- a/glabels2/src/mini-preview.c +++ /dev/null @@ -1,1062 +0,0 @@ -/* - * mini-preview.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "mini-preview.h" - -#include - -#include "libglabels/db.h" -#include "cairo-label-path.h" -#include "marshal.h" -#include "color.h" -#include "print.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - -#define MARGIN 2 -#define SHADOW_OFFSET 3 - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - CLICKED, - PRESSED, - RELEASED, - LAST_SIGNAL -}; - -typedef struct { - gdouble x; - gdouble y; -} LabelCenter; - -struct _glMiniPreviewPrivate { - - GtkWidget *canvas; - - lglTemplate *template; - gint labels_per_sheet; - LabelCenter *centers; - - gint highlight_first; - gint highlight_last; - - gboolean dragging; - gint first_i; - gint last_i; - gint prev_i; - - gboolean update_scheduled_flag; - - glLabel *label; - gint page; - gint n_sheets; - gint n_copies; - gint first; - gint last; - gboolean collate_flag; - gboolean outline_flag; - gboolean reverse_flag; - gboolean crop_marks_flag; -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static gint mini_preview_signals[LAST_SIGNAL] = { 0 }; - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_mini_preview_finalize (GObject *object); - -static void gl_mini_preview_construct (glMiniPreview *this, - gint height, - gint width); - -static gboolean button_press_event_cb (GtkWidget *widget, - GdkEventButton *event); -static gboolean motion_notify_event_cb (GtkWidget *widget, - GdkEventMotion *event); -static gboolean button_release_event_cb (GtkWidget *widget, - GdkEventButton *event); - - -static gboolean expose_event_cb (GtkWidget *widget, - GdkEventExpose *event, - glMiniPreview *this); -static void style_set_cb (GtkWidget *widget, - GtkStyle *previous_style, - glMiniPreview *this); - -static void redraw (glMiniPreview *this); -static void draw (glMiniPreview *this, - cairo_t *cr); - -static void draw_shadow (glMiniPreview *this, - cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height); -static void draw_paper (glMiniPreview *this, - cairo_t *cr, - gdouble width, - gdouble height, - gdouble line_width); -static void draw_labels (glMiniPreview *this, - cairo_t *cr, - lglTemplate *template, - gdouble line_width); -static void draw_rich_preview (glMiniPreview *this, - cairo_t *cr); - - -static gint find_closest_label (glMiniPreview *this, - gdouble x, - gdouble y); - -static gdouble set_transform_and_get_scale (glMiniPreview *this, - cairo_t *cr); - - -/****************************************************************************/ -/* Object infrastructure. */ -/****************************************************************************/ -G_DEFINE_TYPE (glMiniPreview, gl_mini_preview, GTK_TYPE_EVENT_BOX); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_mini_preview_class_init (glMiniPreviewClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - gl_mini_preview_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_mini_preview_finalize; - - widget_class->button_press_event = button_press_event_cb; - widget_class->motion_notify_event = motion_notify_event_cb; - widget_class->button_release_event = button_release_event_cb; - - mini_preview_signals[CLICKED] = - g_signal_new ("clicked", - G_OBJECT_CLASS_TYPE(object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glMiniPreviewClass, clicked), - NULL, NULL, - gl_marshal_VOID__INT, - G_TYPE_NONE, 1, G_TYPE_INT); - - mini_preview_signals[PRESSED] = - g_signal_new ("pressed", - G_OBJECT_CLASS_TYPE(object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glMiniPreviewClass, pressed), - NULL, NULL, - gl_marshal_VOID__INT_INT, - G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); - - mini_preview_signals[RELEASED] = - g_signal_new ("released", - G_OBJECT_CLASS_TYPE(object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glMiniPreviewClass, released), - NULL, NULL, - gl_marshal_VOID__INT_INT, - G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_mini_preview_init (glMiniPreview *this) -{ - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - this->priv = g_new0 (glMiniPreviewPrivate, 1); - - gtk_widget_add_events (GTK_WIDGET (this), - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_POINTER_MOTION_MASK); - - gtk_event_box_set_visible_window (GTK_EVENT_BOX (this), FALSE); - - this->priv->canvas = gtk_drawing_area_new (); - GTK_WIDGET_SET_FLAGS (this->priv->canvas, GTK_NO_WINDOW); - gtk_container_add (GTK_CONTAINER (this), this->priv->canvas); - - g_signal_connect (G_OBJECT (this->priv->canvas), "expose-event", - G_CALLBACK (expose_event_cb), this); - g_signal_connect (G_OBJECT (this->priv->canvas), "style-set", - G_CALLBACK (style_set_cb), this); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/*****************************************************************************/ -/* Finalize Method. */ -/*****************************************************************************/ -static void -gl_mini_preview_finalize (GObject *object) -{ - glMiniPreview *this = GL_MINI_PREVIEW (object); - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_MINI_PREVIEW (object)); - - if (this->priv->label) - { - g_object_unref (this->priv->label); - } - lgl_template_free (this->priv->template); - g_free (this->priv->centers); - g_free (this->priv); - - G_OBJECT_CLASS (gl_mini_preview_parent_class)->finalize (object); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/*****************************************************************************/ -/** New Object Generator. */ -/*****************************************************************************/ -GtkWidget * -gl_mini_preview_new (gint height, - gint width) -{ - glMiniPreview *this; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - this = g_object_new (gl_mini_preview_get_type (), NULL); - - gl_mini_preview_construct (this, height, width); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); - - return GTK_WIDGET (this); -} - - -/*--------------------------------------------------------------------------*/ -/* Construct composite widget. */ -/*--------------------------------------------------------------------------*/ -static void -gl_mini_preview_construct (glMiniPreview *this, - gint height, - gint width) -{ - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - gtk_widget_set_size_request (GTK_WIDGET (this->priv->canvas), width, height); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/****************************************************************************/ -/* Set template for mini-preview to determine geometry. */ -/****************************************************************************/ -void -gl_mini_preview_set_by_name (glMiniPreview *this, - const gchar *name) -{ - lglTemplate *template; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - /* Fetch template */ - template = lgl_db_lookup_template_from_name (name); - - gl_mini_preview_set_template (this, template); - - lgl_template_free (template); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/****************************************************************************/ -/* Set template for mini-preview to determine geometry. */ -/****************************************************************************/ -void -gl_mini_preview_set_template (glMiniPreview *this, - const lglTemplate *template) -{ - const lglTemplateFrame *frame; - lglTemplateOrigin *origins; - gdouble w, h; - gint i; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - frame = (lglTemplateFrame *)template->frames->data; - - /* - * Set template - */ - lgl_template_free (this->priv->template); - this->priv->template = lgl_template_dup (template); - - /* - * Set labels per sheet - */ - this->priv->labels_per_sheet = lgl_template_frame_get_n_labels (frame); - - /* - * Initialize centers - */ - g_free (this->priv->centers); - this->priv->centers = g_new0 (LabelCenter, this->priv->labels_per_sheet); - origins = lgl_template_frame_get_origins (frame); - lgl_template_frame_get_size (frame, &w, &h); - for ( i=0; ipriv->labels_per_sheet; i++ ) - { - this->priv->centers[i].x = origins[i].x + w/2.0; - this->priv->centers[i].y = origins[i].y + h/2.0; - } - g_free (origins); - - /* - * Redraw modified preview - */ - redraw (this); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/****************************************************************************/ -/* Highlight given label outlines. */ -/****************************************************************************/ -void -gl_mini_preview_highlight_range (glMiniPreview *this, - gint first_label, - gint last_label) -{ - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - if ( (first_label != this->priv->highlight_first) || - (last_label != this->priv->highlight_last) ) - { - - this->priv->highlight_first = first_label; - this->priv->highlight_last = last_label; - - redraw (this); - - } - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/****************************************************************************/ -/* Set label. */ -/****************************************************************************/ -void -gl_mini_preview_set_label (glMiniPreview *this, - glLabel *label) -{ - if ( this->priv->label ) - { - g_object_unref (this->priv->label); - } - this->priv->label = g_object_ref (label); - redraw (this); -} - - -/****************************************************************************/ -/* Set page number. */ -/****************************************************************************/ -void -gl_mini_preview_set_page (glMiniPreview *this, - gint page) -{ - if ( page != this->priv->page ) - { - this->priv->page = page; - redraw (this); - } -} - - -/****************************************************************************/ -/* Set number of sheets. */ -/****************************************************************************/ -void -gl_mini_preview_set_n_sheets (glMiniPreview *this, - gint n_sheets) -{ - if ( n_sheets != this->priv->n_sheets ) - { - this->priv->n_sheets = n_sheets; - redraw (this); - } -} - - -/****************************************************************************/ -/* Set number of copies (merge only). */ -/****************************************************************************/ -void -gl_mini_preview_set_n_copies (glMiniPreview *this, - gint n_copies) -{ - if ( n_copies != this->priv->n_copies ) - { - this->priv->n_copies = n_copies; - redraw (this); - } -} - - -/****************************************************************************/ -/* Set first label number on first sheet. */ -/****************************************************************************/ -void -gl_mini_preview_set_first (glMiniPreview *this, - gint first) -{ - if ( first != this->priv->first ) - { - this->priv->first = first; - redraw (this); - } -} - - -/****************************************************************************/ -/* Set last label number on first sheet (non-merge only). */ -/****************************************************************************/ -void -gl_mini_preview_set_last (glMiniPreview *this, - gint last) -{ - if ( last != this->priv->last ) - { - this->priv->last = last; - redraw (this); - } -} - - -/****************************************************************************/ -/* Set collate flag (merge only). */ -/****************************************************************************/ -void -gl_mini_preview_set_collate_flag (glMiniPreview *this, - gboolean collate_flag) -{ - if ( collate_flag != this->priv->collate_flag ) - { - this->priv->collate_flag = collate_flag; - redraw (this); - } -} - - -/****************************************************************************/ -/* Set outline flag. */ -/****************************************************************************/ -void -gl_mini_preview_set_outline_flag (glMiniPreview *this, - gboolean outline_flag) -{ - if ( outline_flag != this->priv->outline_flag ) - { - this->priv->outline_flag = outline_flag; - redraw (this); - } -} - - -/****************************************************************************/ -/* Set reverse flag. */ -/****************************************************************************/ -void -gl_mini_preview_set_reverse_flag (glMiniPreview *this, - gboolean reverse_flag) -{ - if ( reverse_flag != this->priv->reverse_flag ) - { - this->priv->reverse_flag = reverse_flag; - redraw (this); - } -} - - -/****************************************************************************/ -/* Set crop marks flag. */ -/****************************************************************************/ -void -gl_mini_preview_set_crop_marks_flag (glMiniPreview *this, - gboolean crop_marks_flag) -{ - if ( crop_marks_flag != this->priv->crop_marks_flag ) - { - this->priv->crop_marks_flag = crop_marks_flag; - redraw (this); - } -} - - -/*--------------------------------------------------------------------------*/ -/* Set transformation and return scale. */ -/*--------------------------------------------------------------------------*/ -static gdouble -set_transform_and_get_scale (glMiniPreview *this, - cairo_t *cr) -{ - lglTemplate *template = this->priv->template; - gdouble w, h; - gdouble scale; - gdouble offset_x, offset_y; - - /* Establish scale and origin. */ - w = GTK_WIDGET (this)->allocation.width; - h = GTK_WIDGET (this)->allocation.height; - - /* establish scale. */ - scale = MIN( (w - 2*MARGIN - 2*SHADOW_OFFSET)/template->page_width, - (h - 2*MARGIN - 2*SHADOW_OFFSET)/template->page_height ); - - /* Find offset to center preview. */ - offset_x = (w/scale - template->page_width) / 2.0; - offset_y = (h/scale - template->page_height) / 2.0; - - /* Set transformation. */ - cairo_scale (cr, scale, scale); - cairo_translate (cr, offset_x, offset_y); - - return scale; -} - - -/*--------------------------------------------------------------------------*/ -/* Button press event handler */ -/*--------------------------------------------------------------------------*/ -static gboolean -button_press_event_cb (GtkWidget *widget, - GdkEventButton *event) -{ - glMiniPreview *this = GL_MINI_PREVIEW (widget); - cairo_t *cr; - gdouble scale; - gdouble x, y; - gint i; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - if ( event->button == 1 ) - { - cr = gdk_cairo_create (GTK_WIDGET (this->priv->canvas)->window); - - scale = set_transform_and_get_scale (this, cr); - - x = event->x; - y = event->y; - cairo_device_to_user (cr, &x, &y); - - i = find_closest_label (this, x, y); - - g_signal_emit (G_OBJECT(this), - mini_preview_signals[CLICKED], - 0, i); - - this->priv->first_i = i; - this->priv->last_i = i; - g_signal_emit (G_OBJECT(this), - mini_preview_signals[PRESSED], - 0, this->priv->first_i, this->priv->last_i); - - this->priv->dragging = TRUE; - this->priv->prev_i = i; - - cairo_destroy (cr); - } - - gl_debug (DEBUG_MINI_PREVIEW, "END"); - return FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* Motion notify event handler */ -/*--------------------------------------------------------------------------*/ -static gboolean -motion_notify_event_cb (GtkWidget *widget, - GdkEventMotion *event) -{ - glMiniPreview *this = GL_MINI_PREVIEW (widget); - cairo_t *cr; - gdouble scale; - gdouble x, y; - gint i; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - if (this->priv->dragging) - { - cr = gdk_cairo_create (GTK_WIDGET (this->priv->canvas)->window); - - scale = set_transform_and_get_scale (this, cr); - - x = event->x; - y = event->y; - cairo_device_to_user (cr, &x, &y); - - i = find_closest_label (this, x, y); - - if ( i != this->priv->prev_i ) - { - this->priv->last_i = i; - - g_signal_emit (G_OBJECT(this), - mini_preview_signals[PRESSED], - 0, - MIN (this->priv->first_i, this->priv->last_i), - MAX (this->priv->first_i, this->priv->last_i)); - - this->priv->prev_i = i; - } - cairo_destroy (cr); - } - - gl_debug (DEBUG_MINI_PREVIEW, "END"); - return FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* Button release event handler */ -/*--------------------------------------------------------------------------*/ -static gboolean -button_release_event_cb (GtkWidget *widget, - GdkEventButton *event) -{ - glMiniPreview *this = GL_MINI_PREVIEW (widget); - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - if ( event->button == 1 ) - { - this->priv->dragging = FALSE; - - } - - g_signal_emit (G_OBJECT(this), - mini_preview_signals[RELEASED], - 0, this->priv->first_i, this->priv->last_i); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); - return FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* Find index+1 of label closest to given coordinates. */ -/*--------------------------------------------------------------------------*/ -static gint -find_closest_label (glMiniPreview *this, - gdouble x, - gdouble y) -{ - gint i; - gint min_i; - gdouble dx, dy, d2, min_d2; - - dx = x - this->priv->centers[0].x; - dy = y - this->priv->centers[0].y; - min_d2 = dx*dx + dy*dy; - min_i = 0; - - for ( i=1; ipriv->labels_per_sheet; i++ ) - { - dx = x - this->priv->centers[i].x; - dy = y - this->priv->centers[i].y; - d2 = dx*dx + dy*dy; - - if ( d2 < min_d2 ) - { - min_d2 = d2; - min_i = i; - } - } - - return min_i + 1; -} - - -/*--------------------------------------------------------------------------*/ -/* Expose event handler. */ -/*--------------------------------------------------------------------------*/ -static gboolean -expose_event_cb (GtkWidget *widget, - GdkEventExpose *event, - glMiniPreview *this) -{ - cairo_t *cr; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - this->priv->update_scheduled_flag = FALSE; - - cr = gdk_cairo_create (widget->window); - - cairo_rectangle (cr, - event->area.x, event->area.y, - event->area.width, event->area.height); - cairo_clip (cr); - cairo_translate (cr, widget->allocation.x, widget->allocation.y); - - draw (this, cr); - - cairo_destroy (cr); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); - return FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* Style set handler (updates colors when style/theme changes). */ -/*--------------------------------------------------------------------------*/ -static void -style_set_cb (GtkWidget *widget, - GtkStyle *previous_style, - glMiniPreview *this) -{ - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - redraw (this); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Redraw. */ -/*--------------------------------------------------------------------------*/ -static void -redraw (glMiniPreview *this) -{ - GdkRegion *region; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - if (GTK_WIDGET (this->priv->canvas)->window) - { - - if ( !this->priv->update_scheduled_flag ) - { - this->priv->update_scheduled_flag = TRUE; - - region = gdk_drawable_get_clip_region (GTK_WIDGET (this->priv->canvas)->window); - gdk_window_invalidate_region (GTK_WIDGET (this->priv->canvas)->window, region, TRUE); - gdk_region_destroy (region); - } - } - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Draw mini preview. */ -/*--------------------------------------------------------------------------*/ -static void -draw (glMiniPreview *this, - cairo_t *cr) -{ - lglTemplate *template = this->priv->template; - gdouble scale; - gdouble shadow_x, shadow_y; - - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - if (template) - { - - scale = set_transform_and_get_scale (this, cr); - - /* update shadow */ - shadow_x = SHADOW_OFFSET/scale; - shadow_y = SHADOW_OFFSET/scale; - - draw_shadow (this, cr, - shadow_x, shadow_y, - template->page_width, template->page_height); - - draw_paper (this, cr, - template->page_width, template->page_height, - 1.0/scale); - - draw_labels (this, cr, template, 1.0/scale); - - if (this->priv->label) - { - draw_rich_preview (this, cr); - } - - } - - gl_debug (DEBUG_MINI_PREVIEW, "END"); - -} - - -/*--------------------------------------------------------------------------*/ -/* Draw page shadow */ -/*--------------------------------------------------------------------------*/ -static void -draw_shadow (glMiniPreview *this, - cairo_t *cr, - gdouble x, - gdouble y, - gdouble width, - gdouble height) -{ - GtkStyle *style; - guint shadow_color; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - cairo_save (cr); - - cairo_rectangle (cr, x, y, width, height); - - style = gtk_widget_get_style (GTK_WIDGET(this)); - shadow_color = gl_color_from_gdk_color (&style->dark[GTK_STATE_NORMAL]); - cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (shadow_color)); - - cairo_fill (cr); - - cairo_restore (cr); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Draw page */ -/*--------------------------------------------------------------------------*/ -static void -draw_paper (glMiniPreview *this, - cairo_t *cr, - gdouble width, - gdouble height, - gdouble line_width) -{ - GtkStyle *style; - guint paper_color, outline_color; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - cairo_save (cr); - - style = gtk_widget_get_style (GTK_WIDGET(this)); - paper_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); - outline_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); - - cairo_rectangle (cr, 0.0, 0.0, width, height); - - cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (paper_color)); - cairo_fill_preserve (cr); - - cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (outline_color)); - cairo_set_line_width (cr, line_width); - cairo_stroke (cr); - - cairo_restore (cr); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Draw labels */ -/*--------------------------------------------------------------------------*/ -static void -draw_labels (glMiniPreview *this, - cairo_t *cr, - lglTemplate *template, - gdouble line_width) -{ - const lglTemplateFrame *frame; - gint i, n_labels; - lglTemplateOrigin *origins; - GtkStyle *style; - guint base_color; - guint highlight_color, paper_color, outline_color; - - gl_debug (DEBUG_MINI_PREVIEW, "START"); - - frame = (lglTemplateFrame *)template->frames->data; - - n_labels = lgl_template_frame_get_n_labels (frame); - origins = lgl_template_frame_get_origins (frame); - - style = gtk_widget_get_style (GTK_WIDGET(this)); - base_color = gl_color_from_gdk_color (&style->base[GTK_STATE_SELECTED]); - - paper_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); - highlight_color = gl_color_set_opacity (base_color, 0.10); - if (this->priv->label) - { - /* Outlines are more subtle when doing a rich preview. */ - outline_color = gl_color_set_opacity (base_color, 0.05); - } - else - { - outline_color = gl_color_set_opacity (base_color, 1.00); - } - - for ( i=0; i < n_labels; i++ ) { - - cairo_save (cr); - - cairo_translate (cr, origins[i].x, origins[i].y); - gl_cairo_label_path (cr, template, FALSE, FALSE); - - if ( ((i+1) >= this->priv->highlight_first) && - ((i+1) <= this->priv->highlight_last) ) - { - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (highlight_color)); - cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); - cairo_fill_preserve (cr); - } - - cairo_set_line_width (cr, line_width); - cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (outline_color)); - cairo_stroke (cr); - - cairo_restore (cr); - - } - - g_free (origins); - - gl_debug (DEBUG_MINI_PREVIEW, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Draw rich preview using print renderers. */ -/*--------------------------------------------------------------------------*/ -static void -draw_rich_preview (glMiniPreview *this, - cairo_t *cr) -{ - glMerge *merge; - glPrintState state; - - merge = gl_label_get_merge (this->priv->label); - - if (!merge) - { - gl_print_simple_sheet (this->priv->label, - cr, - this->priv->page, - this->priv->n_sheets, - this->priv->first, - this->priv->last, - this->priv->outline_flag, - this->priv->reverse_flag, - this->priv->crop_marks_flag); - } - else - { - /* FIXME: maybe the renderers should be more self contained. - * This will only work for the first page, since - * previous pages must be rendered to establish - * state. - */ - state.i_copy = 0; - state.p_record = (GList *)gl_merge_get_record_list (merge); - - if (this->priv->collate_flag) - { - gl_print_collated_merge_sheet (this->priv->label, - cr, - this->priv->page, - this->priv->n_copies, - this->priv->first, - this->priv->outline_flag, - this->priv->reverse_flag, - this->priv->crop_marks_flag, - &state); - } - else - { - gl_print_uncollated_merge_sheet (this->priv->label, - cr, - this->priv->page, - this->priv->n_copies, - this->priv->first, - this->priv->outline_flag, - this->priv->reverse_flag, - this->priv->crop_marks_flag, - &state); - } - } -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/mini-preview.h b/glabels2/src/mini-preview.h deleted file mode 100644 index caf77ebb..00000000 --- a/glabels2/src/mini-preview.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * mini-preview.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __MINI_PREVIEW_H__ -#define __MINI_PREVIEW_H__ - -#include -#include "label.h" - - -G_BEGIN_DECLS - -#define GL_TYPE_MINI_PREVIEW (gl_mini_preview_get_type ()) -#define GL_MINI_PREVIEW(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_MINI_PREVIEW, glMiniPreview )) -#define GL_MINI_PREVIEW_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MINI_PREVIEW, glMiniPreviewClass)) -#define GL_IS_MINI_PREVIEW(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MINI_PREVIEW)) -#define GL_IS_MINI_PREVIEW_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MINI_PREVIEW)) - - -typedef struct _glMiniPreview glMiniPreview; -typedef struct _glMiniPreviewPrivate glMiniPreviewPrivate; -typedef struct _glMiniPreviewClass glMiniPreviewClass; - -struct _glMiniPreview { - GtkEventBox parent; - - glMiniPreviewPrivate *priv; -}; - -struct _glMiniPreviewClass { - GtkEventBoxClass parent_class; - - void (*clicked) (glMiniPreview *this, - gint index, - gpointer user_data); - - void (*pressed) (glMiniPreview *this, - gint index1, - gint index2, - gpointer user_data); - - void (*released) (glMiniPreview *this, - gint index1, - gint index2, - gpointer user_data); - -}; - - -GType gl_mini_preview_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_mini_preview_new (gint height, - gint width); - -void gl_mini_preview_set_by_name (glMiniPreview *this, - const gchar *name); - -void gl_mini_preview_set_template (glMiniPreview *this, - const lglTemplate *template); - -void gl_mini_preview_highlight_range (glMiniPreview *this, - gint first_label, - gint last_label); - - -/* - * If label is set, the preview will be rich. - */ -void gl_mini_preview_set_label (glMiniPreview *this, - glLabel *label); - -void gl_mini_preview_set_page (glMiniPreview *this, - gint n_sheets); -void gl_mini_preview_set_n_sheets (glMiniPreview *this, - gint n_sheets); -void gl_mini_preview_set_n_copies (glMiniPreview *this, - gint n_copies); -void gl_mini_preview_set_first (glMiniPreview *this, - gint first); -void gl_mini_preview_set_last (glMiniPreview *this, - gint last); -void gl_mini_preview_set_collate_flag (glMiniPreview *this, - gboolean collate_flag); -void gl_mini_preview_set_outline_flag (glMiniPreview *this, - gboolean outline_flag); -void gl_mini_preview_set_reverse_flag (glMiniPreview *this, - gboolean reverse_flag); -void gl_mini_preview_set_crop_marks_flag (glMiniPreview *this, - gboolean crop_marks_flag); - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/new-label-dialog.c b/glabels2/src/new-label-dialog.c deleted file mode 100644 index 015f0991..00000000 --- a/glabels2/src/new-label-dialog.c +++ /dev/null @@ -1,296 +0,0 @@ -/* - * new-label-dialog.c - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "new-label-dialog.h" - -#include -#include - -#include "hig.h" -#include "wdgt-media-select.h" -#include "rotate-label-button.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -struct _glNewLabelDialogPrivate { - - GtkWidget *media_select; - GtkWidget *rotate_label; - -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_new_label_dialog_finalize (GObject *object); - -static void template_changed_cb (glWdgtMediaSelect *select, - gpointer data); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glNewLabelDialog, gl_new_label_dialog, GTK_TYPE_DIALOG); - - -/*****************************************************************************/ -/* Class Init Function. */ -/*****************************************************************************/ -static void -gl_new_label_dialog_class_init (glNewLabelDialogClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_FILE, ""); - - gl_new_label_dialog_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_new_label_dialog_finalize; -} - - -/*****************************************************************************/ -/* Object Instance Init Function. */ -/*****************************************************************************/ -static void -gl_new_label_dialog_init (glNewLabelDialog *dialog) -{ - GtkWidget *label; - GtkWidget *frame; - gchar *name; - - gl_debug (DEBUG_FILE, "START"); - - g_return_if_fail (GL_IS_NEW_LABEL_DIALOG (dialog)); - - dialog->priv = g_new0 (glNewLabelDialogPrivate, 1); - - gtk_container_set_border_width (GTK_CONTAINER (dialog), GL_HIG_PAD1); - - gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); - gtk_dialog_add_buttons (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); - gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - - - label = gtk_label_new (_("Media type")); - gtk_label_set_use_markup (GTK_LABEL (label), TRUE); - frame = gtk_frame_new (""); - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); - gtk_box_pack_start (GTK_BOX( GTK_DIALOG (dialog)->vbox), frame, FALSE, FALSE, GL_HIG_PAD1); - - dialog->priv->media_select = gl_wdgt_media_select_new (); - gtk_container_add (GTK_CONTAINER (frame), dialog->priv->media_select); - - label = gtk_label_new (_("Label orientation")); - gtk_label_set_use_markup (GTK_LABEL (label), TRUE); - frame = gtk_frame_new (""); - gtk_frame_set_label_widget (GTK_FRAME (frame), label); - gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); - gtk_box_pack_start (GTK_BOX( GTK_DIALOG (dialog)->vbox), frame, FALSE, FALSE, 0); - - dialog->priv->rotate_label = gl_rotate_label_button_new (); - gtk_container_add (GTK_CONTAINER (frame), dialog->priv->rotate_label); - - /* Sync template name from media select with rotate widget. */ - name = gl_wdgt_media_select_get_name (GL_WDGT_MEDIA_SELECT (dialog->priv->media_select)); - gl_rotate_label_button_set_template_name (GL_ROTATE_LABEL_BUTTON (dialog->priv->rotate_label), - name); - - g_signal_connect (G_OBJECT (dialog->priv->media_select), "changed", - G_CALLBACK (template_changed_cb), dialog); - - gl_debug (DEBUG_FILE, "END"); -} - - -/*****************************************************************************/ -/* Finalize Function. */ -/*****************************************************************************/ -static void -gl_new_label_dialog_finalize (GObject *object) -{ - glNewLabelDialog* dialog = GL_NEW_LABEL_DIALOG (object);; - - gl_debug (DEBUG_FILE, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_NEW_LABEL_DIALOG (dialog)); - g_return_if_fail (dialog->priv != NULL); - - g_free (dialog->priv); - - G_OBJECT_CLASS (gl_new_label_dialog_parent_class)->finalize (object); - - gl_debug (DEBUG_FILE, "END"); - -} - - -/*****************************************************************************/ -/* NEW object properties dialog. */ -/*****************************************************************************/ -GtkWidget * -gl_new_label_dialog_new (GtkWindow *win) -{ - GtkWidget *dialog; - - gl_debug (DEBUG_FILE, ""); - - dialog = GTK_WIDGET (g_object_new (GL_TYPE_NEW_LABEL_DIALOG, NULL)); - - gtk_window_set_transient_for (GTK_WINDOW (dialog), win); - - return dialog; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. New template changed callback. */ -/*---------------------------------------------------------------------------*/ -static void -template_changed_cb (glWdgtMediaSelect *select, - gpointer data) -{ - glNewLabelDialog *dialog = GL_NEW_LABEL_DIALOG (data); - gchar *name; - - gl_debug (DEBUG_FILE, "START"); - - name = gl_wdgt_media_select_get_name (GL_WDGT_MEDIA_SELECT (select)); - - gl_rotate_label_button_set_template_name (GL_ROTATE_LABEL_BUTTON (dialog->priv->rotate_label), - name); - - gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), - GTK_RESPONSE_OK, - (name != NULL)); - - g_free (name); - - gl_debug (DEBUG_FILE, "END"); -} - - -/*****************************************************************************/ -/* Get template name. */ -/*****************************************************************************/ -gchar * -gl_new_label_dialog_get_template_name (glNewLabelDialog *dialog) -{ - gchar *name; - - name = gl_wdgt_media_select_get_name (GL_WDGT_MEDIA_SELECT (dialog->priv->media_select)); - - return name; -} - - -/*****************************************************************************/ -/* Set template name. */ -/*****************************************************************************/ -void -gl_new_label_dialog_set_template_name (glNewLabelDialog *dialog, - gchar *name) -{ - gl_wdgt_media_select_set_name (GL_WDGT_MEDIA_SELECT (dialog->priv->media_select), name); -} - - -/*****************************************************************************/ -/* Get current filter parameters. */ -/*****************************************************************************/ -void -gl_new_label_dialog_get_filter_parameters (glNewLabelDialog *dialog, - gchar **page_size_id, - gchar **category_id) -{ - gl_wdgt_media_select_get_filter_parameters ( - GL_WDGT_MEDIA_SELECT (dialog->priv->media_select), - page_size_id, category_id); -} - - -/*****************************************************************************/ -/* Set current filter parameters. */ -/*****************************************************************************/ -void -gl_new_label_dialog_set_filter_parameters (glNewLabelDialog *dialog, - const gchar *page_size_id, - const gchar *category_id) -{ - gl_wdgt_media_select_set_filter_parameters ( - GL_WDGT_MEDIA_SELECT (dialog->priv->media_select), - page_size_id, category_id); -} - - -/*****************************************************************************/ -/* Get rotate state. */ -/*****************************************************************************/ -gboolean -gl_new_label_dialog_get_rotate_state (glNewLabelDialog *dialog) -{ - return gl_rotate_label_button_get_state ( - GL_ROTATE_LABEL_BUTTON (dialog->priv->rotate_label)); -} - - -/*****************************************************************************/ -/* Set rotate state. */ -/*****************************************************************************/ -void -gl_new_label_dialog_set_rotate_state (glNewLabelDialog *dialog, - gboolean state) -{ - gl_rotate_label_button_set_state ( - GL_ROTATE_LABEL_BUTTON (dialog->priv->rotate_label), state); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/new-label-dialog.h b/glabels2/src/new-label-dialog.h deleted file mode 100644 index 2029a9fc..00000000 --- a/glabels2/src/new-label-dialog.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * new-label-dialog.h - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __NEW_LABEL_DIALOG_H__ -#define __NEW_LABEL_DIALOG_H__ - -#include - -G_BEGIN_DECLS - -#define GL_TYPE_NEW_LABEL_DIALOG (gl_new_label_dialog_get_type ()) -#define GL_NEW_LABEL_DIALOG(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_NEW_LABEL_DIALOG, glNewLabelDialog)) -#define GL_NEW_LABEL_DIALOG_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_NEW_LABEL_DIALOG, glNewLabelDialogClass)) -#define GL_IS_NEW_LABEL_DIALOG(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_NEW_LABEL_DIALOG)) -#define GL_IS_NEW_LABEL_DIALOG_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_NEW_LABEL_DIALOG)) -#define GL_NEW_LABEL_DIALOG_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_NEW_LABEL_DIALOG, glNewLabelDialogClass)) - - -typedef struct _glNewLabelDialog glNewLabelDialog; -typedef struct _glNewLabelDialogClass glNewLabelDialogClass; - -typedef struct _glNewLabelDialogPrivate glNewLabelDialogPrivate; - -struct _glNewLabelDialog -{ - GtkDialog parent_instance; - - glNewLabelDialogPrivate *priv; - -}; - -struct _glNewLabelDialogClass -{ - GtkDialogClass parent_class; -}; - - -GType gl_new_label_dialog_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_new_label_dialog_new (GtkWindow *win); - -gchar *gl_new_label_dialog_get_template_name (glNewLabelDialog *dialog); - -void gl_new_label_dialog_set_template_name (glNewLabelDialog *dialog, - gchar *name); - -void gl_new_label_dialog_get_filter_parameters (glNewLabelDialog *dialog, - gchar **page_size_id, - gchar **category_id); - -void gl_new_label_dialog_set_filter_parameters (glNewLabelDialog *dialog, - const gchar *page_size_id, - const gchar *category_id); - -gboolean gl_new_label_dialog_get_rotate_state (glNewLabelDialog *dialog); - -void gl_new_label_dialog_set_rotate_state (glNewLabelDialog *dialog, - gboolean state); - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-bc-page.c b/glabels2/src/object-editor-bc-page.c deleted file mode 100644 index 3d6f155b..00000000 --- a/glabels2/src/object-editor-bc-page.c +++ /dev/null @@ -1,435 +0,0 @@ -/* - * object-editor-bc-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "color-combo.h" -#include "color.h" -#include "combo-util.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void style_changed_cb (glObjectEditor *editor); -static void bc_radio_toggled_cb (glObjectEditor *editor); - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare size page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_bc_page (glObjectEditor *editor) -{ - GList *styles = NULL; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "bc_page_vbox", &editor->priv->bc_page_vbox, - "bc_style_combo", &editor->priv->bc_style_combo, - "bc_text_check", &editor->priv->bc_text_check, - "bc_cs_check", &editor->priv->bc_cs_check, - "bc_color_hbox", &editor->priv->bc_color_hbox, - "bc_key_combo", &editor->priv->bc_key_combo, - "bc_key_radio", &editor->priv->bc_key_radio, - "bc_color_radio", &editor->priv->bc_color_radio, - "data_format_label", &editor->priv->data_format_label, - "data_ex_label", &editor->priv->data_ex_label, - "data_digits_label", &editor->priv->data_digits_label, - "data_digits_spin", &editor->priv->data_digits_spin, - NULL); - - editor->priv->data_format_fixed_flag = FALSE; - - editor->priv->bc_color_combo = gl_color_combo_new (_("Default"), - GL_COLOR_BC_DEFAULT, - gl_prefs->default_line_color); - gtk_box_pack_start (GTK_BOX (editor->priv->bc_color_hbox), - editor->priv->bc_color_combo, - FALSE, FALSE, 0); - - gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->bc_style_combo)); - gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->bc_key_combo)); - - /* Load barcode styles */ - styles = gl_barcode_get_styles_list (); - gl_combo_util_set_strings (GTK_COMBO_BOX(editor->priv->bc_style_combo), - styles); - gl_barcode_free_styles_list (styles); - - /* Modify widgets */ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->bc_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->bc_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->bc_key_combo, FALSE); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->bc_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->bc_style_combo), - "changed", - G_CALLBACK (style_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->bc_text_check), - "toggled", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->bc_cs_check), - "toggled", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->bc_color_combo), - "color_changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->bc_key_combo), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->bc_color_radio), - "toggled", - G_CALLBACK (bc_radio_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->bc_key_radio), - "toggled", - G_CALLBACK (bc_radio_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->data_digits_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Callback for when style has changed. */ -/*--------------------------------------------------------------------------*/ -static void -style_changed_cb (glObjectEditor *editor) -{ - gchar *style_string = NULL; - const gchar *id; - gchar *ex_string = NULL; - guint digits; - - if (editor->priv->stop_signals) return; - - style_string = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_style_combo)); - - /* Don't emit if entry is empty. */ - if ( *style_string != 0 ) { - id = gl_barcode_name_to_id (style_string); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(editor->priv->bc_text_check), - gl_barcode_can_text (id)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(editor->priv->bc_cs_check), - gl_barcode_can_csum (id)); - - gtk_widget_set_sensitive (editor->priv->bc_text_check, - gl_barcode_text_optional (id)); - gtk_widget_set_sensitive (editor->priv->bc_cs_check, - gl_barcode_csum_optional (id)); - - editor->priv->data_format_fixed_flag = !gl_barcode_can_freeform (id); - digits = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->data_digits_spin)); - if (editor->priv->data_format_fixed_flag) { - digits = gl_barcode_get_prefered_n(id); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->data_digits_spin), - digits); - } - - ex_string = gl_barcode_default_digits (id, digits); - gtk_label_set_text (GTK_LABEL(editor->priv->data_ex_label), ex_string); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->data_literal_radio))) { - gtk_widget_set_sensitive (editor->priv->data_format_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_ex_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_digits_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_digits_spin, FALSE); - } else { - gtk_widget_set_sensitive (editor->priv->data_format_label, TRUE); - gtk_widget_set_sensitive (editor->priv->data_ex_label, TRUE); - gtk_widget_set_sensitive (editor->priv->data_digits_label, - !editor->priv->data_format_fixed_flag); - gtk_widget_set_sensitive (editor->priv->data_digits_spin, - !editor->priv->data_format_fixed_flag); - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - } - - g_free (style_string); - g_free (ex_string); -} - - -/*****************************************************************************/ -/* Set barcode style. */ -/*****************************************************************************/ -void -gl_object_editor_set_bc_style (glObjectEditor *editor, - gchar *id, - gboolean text_flag, - gboolean checksum_flag, - guint format_digits) -{ - const gchar *style_string; - gchar *ex_string; - - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - style_string = gl_barcode_id_to_name (id); - - gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->bc_style_combo), - style_string); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->bc_text_check), - text_flag); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->bc_cs_check), - checksum_flag); - - gtk_widget_set_sensitive (editor->priv->bc_text_check, - gl_barcode_text_optional (id)); - gtk_widget_set_sensitive (editor->priv->bc_cs_check, - gl_barcode_csum_optional (id)); - - editor->priv->data_format_fixed_flag = !gl_barcode_can_freeform (id); - - if (editor->priv->data_format_fixed_flag) { - format_digits = gl_barcode_get_prefered_n (id); - } - - ex_string = gl_barcode_default_digits (id, format_digits); - gtk_label_set_text (GTK_LABEL(editor->priv->data_ex_label), ex_string); - g_free (ex_string); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->data_digits_spin), - format_digits); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->data_literal_radio))) { - gtk_widget_set_sensitive (editor->priv->data_format_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_ex_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_digits_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_digits_spin, FALSE); - } else { - gtk_widget_set_sensitive (editor->priv->data_format_label, TRUE); - gtk_widget_set_sensitive (editor->priv->data_ex_label, TRUE); - gtk_widget_set_sensitive (editor->priv->data_digits_label, - !editor->priv->data_format_fixed_flag); - gtk_widget_set_sensitive (editor->priv->data_digits_spin, - !editor->priv->data_format_fixed_flag); - } - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query barcode style. */ -/*****************************************************************************/ -void -gl_object_editor_get_bc_style (glObjectEditor *editor, - gchar **id, - gboolean *text_flag, - gboolean *checksum_flag, - guint *format_digits) -{ - gchar *style_string; - - gl_debug (DEBUG_EDITOR, "START"); - - style_string = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_style_combo)); - *id = g_strdup (gl_barcode_name_to_id (style_string)); - - *text_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->bc_text_check)); - - *checksum_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->bc_cs_check)); - - - *format_digits = - gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->data_digits_spin)); - - g_free (style_string); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set bc color. */ -/*****************************************************************************/ -void -gl_object_editor_set_bc_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *color_node) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_widget_set_sensitive (editor->priv->bc_key_radio, merge_flag); - - if ( color_node->color == GL_COLOR_NONE ) { - - gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->bc_color_combo)); - - } else { - - gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->bc_color_combo), - color_node->color); - } - - if (!color_node->field_flag) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->bc_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->bc_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->bc_key_combo, FALSE); - - } else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->bc_key_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->bc_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->bc_key_combo, TRUE); - - gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->bc_key_combo), - color_node->key); - } - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query bc color. */ -/*****************************************************************************/ -glColorNode* -gl_object_editor_get_bc_color (glObjectEditor *editor) -{ - guint color; - glColorNode *color_node; - gboolean is_default; - - gl_debug (DEBUG_EDITOR, "START"); - - color_node = gl_color_node_new_default (); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->bc_key_radio))) { - color_node->field_flag = TRUE; - color_node->color = gl_prefs->default_line_color; - color_node->key = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_key_combo)); - } else { - color_node->field_flag = FALSE; - color_node->key = NULL; - color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->bc_color_combo), - &is_default); - - if (is_default) { - color_node->color = gl_prefs->default_line_color; - } else { - color_node->color = color; - } - } - - gl_debug (DEBUG_EDITOR, "END"); - - return color_node; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. barcode color radio callback. */ -/*--------------------------------------------------------------------------*/ -static void -bc_radio_toggled_cb (glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->bc_color_radio))) { - gtk_widget_set_sensitive (editor->priv->bc_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->bc_key_combo, FALSE); - } else { - gtk_widget_set_sensitive (editor->priv->bc_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->bc_key_combo, TRUE); - - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-data-page.c b/glabels2/src/object-editor-data-page.c deleted file mode 100644 index 728a36d7..00000000 --- a/glabels2/src/object-editor-data-page.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - * object-editor-data-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include -#include - -#include "prefs.h" -#include "combo-util.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void data_radio_toggled_cb (glObjectEditor *editor); - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare data page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_data_page (glObjectEditor *editor) -{ - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "data_page_vbox", &editor->priv->data_page_vbox, - "data_literal_radio", &editor->priv->data_literal_radio, - "data_key_radio", &editor->priv->data_key_radio, - "data_text_entry", &editor->priv->data_text_entry, - "data_key_combo", &editor->priv->data_key_combo, - NULL); - - gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->data_key_combo)); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->data_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->data_text_entry), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->data_key_combo), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->data_literal_radio), - "toggled", - G_CALLBACK (data_radio_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->data_key_radio), - "toggled", - G_CALLBACK (data_radio_toggled_cb), - G_OBJECT (editor)); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. data radio callback. */ -/*--------------------------------------------------------------------------*/ -static void -data_radio_toggled_cb (glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_WDGT, "START"); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->data_literal_radio))) { - gtk_widget_set_sensitive (editor->priv->data_text_entry, TRUE); - gtk_widget_set_sensitive (editor->priv->data_key_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->data_format_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_ex_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_digits_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_digits_spin, FALSE); - } else { - gtk_widget_set_sensitive (editor->priv->data_text_entry, FALSE); - gtk_widget_set_sensitive (editor->priv->data_key_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->data_format_label, TRUE); - gtk_widget_set_sensitive (editor->priv->data_ex_label, TRUE); - gtk_widget_set_sensitive (editor->priv->data_digits_label, - !editor->priv->data_format_fixed_flag); - gtk_widget_set_sensitive (editor->priv->data_digits_spin, - !editor->priv->data_format_fixed_flag); - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - - gl_debug (DEBUG_WDGT, "END"); -} - - -/*****************************************************************************/ -/* Set data. */ -/*****************************************************************************/ -void -gl_object_editor_set_data (glObjectEditor *editor, - gboolean merge_flag, - glTextNode *text_node) -{ - gint pos; - - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_widget_set_sensitive (editor->priv->data_key_radio, merge_flag); - - if (!text_node->field_flag) { - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->data_literal_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->data_text_entry, TRUE); - gtk_widget_set_sensitive (editor->priv->data_key_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->data_format_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_ex_label, FALSE); - gtk_widget_set_sensitive (editor->priv->data_digits_spin, FALSE); - gtk_widget_set_sensitive (editor->priv->data_digits_label, FALSE); - - gtk_editable_delete_text (GTK_EDITABLE (editor->priv->data_text_entry), 0, -1); - pos = 0; - if (text_node->data != NULL ) { - gtk_editable_insert_text (GTK_EDITABLE (editor->priv->data_text_entry), - text_node->data, - strlen (text_node->data), - &pos); - } - - } else { - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->data_key_radio), TRUE); - - gtk_widget_set_sensitive (editor->priv->data_text_entry, FALSE); - gtk_widget_set_sensitive (editor->priv->data_key_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->data_format_label, TRUE); - gtk_widget_set_sensitive (editor->priv->data_ex_label, TRUE); - gtk_widget_set_sensitive (editor->priv->data_digits_label, - !editor->priv->data_format_fixed_flag); - gtk_widget_set_sensitive (editor->priv->data_digits_spin, - !editor->priv->data_format_fixed_flag); - - - gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo), - text_node->data); - } - - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query data. */ -/*****************************************************************************/ -glTextNode * -gl_object_editor_get_data (glObjectEditor *editor) -{ - glTextNode *text_node; - - gl_debug (DEBUG_EDITOR, "START"); - - text_node = g_new0(glTextNode,1); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->data_literal_radio))) { - text_node->field_flag = FALSE; - text_node->data = - gtk_editable_get_chars (GTK_EDITABLE (editor->priv->data_text_entry), - 0, -1); - } else { - text_node->field_flag = TRUE; - text_node->data = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo)); - } - - gl_debug (DEBUG_EDITOR, "text_node: field_flag=%d, data=%s", - text_node->field_flag, text_node->data); - - gl_debug (DEBUG_EDITOR, "END"); - - return text_node; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-edit-page.c b/glabels2/src/object-editor-edit-page.c deleted file mode 100644 index 0e52015a..00000000 --- a/glabels2/src/object-editor-edit-page.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - * object-editor-edit-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "color.h" -#include "wdgt-merge-menu.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void insert_button_cb (glObjectEditor *editor); - -static void field_selected_cb (glObjectEditor *editor, gchar *field); - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare size page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_edit_page (glObjectEditor *editor) -{ - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "edit_page_vbox", &editor->priv->edit_page_vbox, - "edit_text_view", &editor->priv->edit_text_view, - "edit_insert_field_button", &editor->priv->edit_insert_field_button, - NULL); - - editor->priv->edit_insert_field_menu = gl_wdgt_merge_menu_new (); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->edit_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->edit_insert_field_button), - "clicked", - G_CALLBACK (insert_button_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->edit_insert_field_menu), - "field_selected", - G_CALLBACK (field_selected_cb), - G_OBJECT (editor)); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Menu item activated callback. */ -/*--------------------------------------------------------------------------*/ -static void -field_selected_cb (glObjectEditor *editor, gchar *field) -{ - GtkTextBuffer *buffer; - gchar *field_string; - - gl_debug (DEBUG_EDITOR, "START"); - - field_string = g_strdup_printf ("${%s}", field); - gl_debug (DEBUG_WDGT, "Inserting %s", field_string); - - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->priv->edit_text_view)); - gtk_text_buffer_insert_at_cursor (buffer, field_string, -1); - - g_free (field_string); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Insert button callback. */ -/*--------------------------------------------------------------------------*/ -static void -insert_button_cb (glObjectEditor *editor) -{ - gl_debug (DEBUG_EDITOR, "START"); - - gtk_widget_show_all (editor->priv->edit_insert_field_menu); - gtk_menu_popup (GTK_MENU (editor->priv->edit_insert_field_menu), - NULL, NULL, NULL, NULL, 1, gtk_get_current_event_time ()); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set text buffer as model for text view/editor. */ -/*****************************************************************************/ -void -gl_object_editor_set_text_buffer (glObjectEditor *editor, - GtkTextBuffer *buffer) -{ - gl_debug (DEBUG_EDITOR, "START"); - - gtk_text_view_set_buffer (GTK_TEXT_VIEW(editor->priv->edit_text_view), buffer); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-fill-page.c b/glabels2/src/object-editor-fill-page.c deleted file mode 100644 index b1143d2c..00000000 --- a/glabels2/src/object-editor-fill-page.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * object-editor-fill-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "color-combo.h" -#include "color.h" -#include "combo-util.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void fill_radio_toggled_cb (glObjectEditor *editor); - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare fill page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_fill_page (glObjectEditor *editor) -{ - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "fill_page_vbox", &editor->priv->fill_page_vbox, - "fill_color_hbox", &editor->priv->fill_color_hbox, - "fill_key_combo", &editor->priv->fill_key_combo, - "fill_key_radio", &editor->priv->fill_key_radio, - "fill_color_radio", &editor->priv->fill_color_radio, - NULL); - - editor->priv->fill_color_combo = gl_color_combo_new (_("No Fill"), - GL_COLOR_NO_FILL, - gl_prefs->default_fill_color); - gtk_box_pack_start (GTK_BOX (editor->priv->fill_color_hbox), - editor->priv->fill_color_combo, - FALSE, FALSE, 0); - - gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->fill_key_combo)); - - /* Modify widgets based on configuration */ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->fill_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->fill_key_combo, FALSE); - gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->fill_color_combo), - gl_prefs->default_fill_color); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->fill_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->fill_color_combo), - "color_changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->fill_key_combo), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->fill_color_radio), - "toggled", - G_CALLBACK (fill_radio_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->fill_key_radio), - "toggled", - G_CALLBACK (fill_radio_toggled_cb), - G_OBJECT (editor)); - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set fill color. */ -/*****************************************************************************/ -void -gl_object_editor_set_fill_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *color_node) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_widget_set_sensitive (editor->priv->fill_key_radio, merge_flag); - - if ( color_node->color == GL_COLOR_NONE ) { - - gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->fill_color_combo)); - - } else { - - gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->fill_color_combo), - color_node->color); - - } - - if (!color_node->field_flag) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->fill_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->fill_key_combo, FALSE); - - } else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->fill_key_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->fill_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->fill_key_combo, TRUE); - - gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->fill_key_combo), - color_node->key); - } - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query fill color. */ -/*****************************************************************************/ -glColorNode* -gl_object_editor_get_fill_color (glObjectEditor *editor) -{ - guint color; - gboolean is_default; - glColorNode *color_node; - - gl_debug (DEBUG_EDITOR, "START"); - - color_node = gl_color_node_new_default (); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->fill_key_radio))) { - color_node->field_flag = TRUE; - color_node->key = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->fill_key_combo)); - } else { - color_node->field_flag = FALSE; - color_node->key = NULL; - color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->fill_color_combo), - &is_default); - - if (!is_default) { - color_node->color = color; - } - } - - gl_debug (DEBUG_EDITOR, "END"); - - return color_node; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. fill radio callback. */ -/*--------------------------------------------------------------------------*/ -static void -fill_radio_toggled_cb (glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->fill_color_radio))) { - gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->fill_key_combo, FALSE); - } else { - gtk_widget_set_sensitive (editor->priv->fill_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->fill_key_combo, TRUE); - - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-image-page.c b/glabels2/src/object-editor-image-page.c deleted file mode 100644 index de649ab4..00000000 --- a/glabels2/src/object-editor-image-page.c +++ /dev/null @@ -1,361 +0,0 @@ -/* - * object-editor-image-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "combo-util.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void img_radio_toggled_cb (glObjectEditor *editor); - -static void update_preview_cb (GtkFileChooser *file_chooser, - gpointer data); -static void add_image_filters_to_chooser (GtkFileChooser *file_chooser); - -static void img_selection_changed_cb (glObjectEditor *editor); - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare image page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_image_page (glObjectEditor *editor) -{ - GtkWidget *preview; - - - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "img_page_vbox", &editor->priv->img_page_vbox, - "img_file_radio", &editor->priv->img_file_radio, - "img_key_radio", &editor->priv->img_key_radio, - "img_file_button", &editor->priv->img_file_button, - "img_key_combo", &editor->priv->img_key_combo, - NULL); - - gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->img_key_combo)); - - /* Modify file button properties. */ - add_image_filters_to_chooser (GTK_FILE_CHOOSER (editor->priv->img_file_button)); - preview = gtk_image_new (); - gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (editor->priv->img_file_button), preview); - g_signal_connect (G_OBJECT (editor->priv->img_file_button), - "update-preview", - G_CALLBACK (update_preview_cb), preview); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->img_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->img_file_button), - "selection-changed", - G_CALLBACK (img_selection_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->img_key_combo), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->img_file_radio), - "toggled", - G_CALLBACK (img_radio_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->img_key_radio), - "toggled", - G_CALLBACK (img_radio_toggled_cb), - G_OBJECT (editor)); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. image radio callback. */ -/*--------------------------------------------------------------------------*/ -static void -img_radio_toggled_cb (glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_WDGT, "START"); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->img_file_radio))) { - gtk_widget_set_sensitive (editor->priv->img_file_button, TRUE); - gtk_widget_set_sensitive (editor->priv->img_key_combo, FALSE); - } else { - gtk_widget_set_sensitive (editor->priv->img_file_button, FALSE); - gtk_widget_set_sensitive (editor->priv->img_key_combo, TRUE); - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - - gl_debug (DEBUG_WDGT, "END"); -} - - -/*****************************************************************************/ -/* Set image. */ -/*****************************************************************************/ -void -gl_object_editor_set_image (glObjectEditor *editor, - gboolean merge_flag, - glTextNode *text_node) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_widget_set_sensitive (editor->priv->img_key_radio, merge_flag); - - if (!text_node->field_flag) { - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->img_file_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->img_file_button, TRUE); - gtk_widget_set_sensitive (editor->priv->img_key_combo, FALSE); - - if (text_node->data != NULL ) { - gtk_file_chooser_set_filename (GTK_FILE_CHOOSER(editor->priv->img_file_button), - text_node->data); - } else { - gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER(editor->priv->img_file_button)); - } - } else { - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->img_key_radio), TRUE); - - gtk_widget_set_sensitive (editor->priv->img_file_button, FALSE); - gtk_widget_set_sensitive (editor->priv->img_key_combo, TRUE); - - gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->img_key_combo), - text_node->data); - } - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query image. */ -/*****************************************************************************/ -glTextNode * -gl_object_editor_get_image (glObjectEditor *editor) -{ - glTextNode *text_node; - - gl_debug (DEBUG_EDITOR, "START"); - - text_node = g_new0(glTextNode,1); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->img_file_radio))) { - text_node->field_flag = FALSE; - text_node->data = - gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(editor->priv->img_file_button)); - } else { - text_node->field_flag = TRUE; - text_node->data = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->img_key_combo)); - } - - gl_debug (DEBUG_EDITOR, "text_node: field_flag=%d, data=%s", - text_node->field_flag, text_node->data); - - gl_debug (DEBUG_EDITOR, "END"); - - return text_node; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update preview image. */ -/*--------------------------------------------------------------------------*/ -static void -update_preview_cb (GtkFileChooser *file_chooser, gpointer data) -{ - GtkWidget *preview; - char *filename; - GdkPixbuf *pixbuf; - gboolean have_preview; - - preview = GTK_WIDGET (data); - filename = gtk_file_chooser_get_preview_filename (file_chooser); - - if (filename) { - pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL); - have_preview = (pixbuf != NULL); - g_free (filename); - - gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf); - g_object_unref (G_OBJECT (pixbuf)); - - gtk_file_chooser_set_preview_widget_active (file_chooser, - have_preview); - } else { - gtk_file_chooser_set_preview_widget_active (file_chooser, FALSE); - } -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add filters to file chooser. */ -/* Based on eog's eog_file_selection_add_filter(). */ -/*--------------------------------------------------------------------------*/ -static void -add_image_filters_to_chooser (GtkFileChooser *chooser) -{ - GtkFileFilter *all_file_filter; - GtkFileFilter *all_img_filter; - GSList *formats; - GSList *it; - GtkFileFilter *filter; - GSList *filters = NULL; - gchar **mime_types, **pattern, *tmp; - int i; - - /* All Files Filter */ - all_file_filter = gtk_file_filter_new (); - gtk_file_filter_set_name (all_file_filter, _("All Files")); - gtk_file_filter_add_pattern (all_file_filter, "*"); - - /* All Image Filter */ - all_img_filter = gtk_file_filter_new (); - gtk_file_filter_set_name (all_img_filter, _("All Images")); - - /* Individual image filters */ - formats = gdk_pixbuf_get_formats (); - for (it = formats; it != NULL; it = it->next) { - gchar *filter_name; - GdkPixbufFormat *format; - filter = gtk_file_filter_new (); - gchar *description, *name; - - format = (GdkPixbufFormat*) it->data; - - /* Filter name: First description then file extension, eg. "The PNG-Format (*.png)".*/ - description = gdk_pixbuf_format_get_description (format); - name = gdk_pixbuf_format_get_name (format); - filter_name = g_strdup_printf (_("%s (*.%s)"), description, name); - g_free (description); - g_free (name); - gtk_file_filter_set_name (filter, filter_name); - g_free (filter_name); - - mime_types = gdk_pixbuf_format_get_mime_types ((GdkPixbufFormat *) it->data); - for (i = 0; mime_types[i] != NULL; i++) { - gtk_file_filter_add_mime_type (filter, mime_types[i]); - gtk_file_filter_add_mime_type (all_img_filter, mime_types[i]); - } - g_strfreev (mime_types); - - pattern = gdk_pixbuf_format_get_extensions ((GdkPixbufFormat *) it->data); - for (i = 0; pattern[i] != NULL; i++) { - tmp = g_strconcat ("*.", pattern[i], NULL); - gtk_file_filter_add_pattern (filter, tmp); - gtk_file_filter_add_pattern (all_img_filter, tmp); - g_free (tmp); - } - g_strfreev (pattern); - - filters = g_slist_prepend (filters, filter); - } - g_slist_free (formats); - - /* Add filter to filechooser */ - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), all_file_filter); - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), all_img_filter); - gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), all_img_filter); - - for (it = filters; it != NULL; it = it->next) { - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), - GTK_FILE_FILTER (it->data)); - } - g_slist_free (filters); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Selection changed callback. */ -/*--------------------------------------------------------------------------*/ -static void -img_selection_changed_cb (glObjectEditor *editor) -{ - gchar *filename; - - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(editor->priv->img_file_button)); - if (filename != NULL) - { - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - } - g_free (filename); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-line-page.c b/glabels2/src/object-editor-line-page.c deleted file mode 100644 index a7c2f582..00000000 --- a/glabels2/src/object-editor-line-page.c +++ /dev/null @@ -1,282 +0,0 @@ -/* - * object-editor-line-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "color-combo.h" -#include "color.h" -#include "combo-util.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ -static void line_radio_toggled_cb (glObjectEditor *editor); - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare line page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_line_page (glObjectEditor *editor) -{ - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "line_page_vbox", &editor->priv->line_page_vbox, - "line_width_spin", &editor->priv->line_width_spin, - "line_color_hbox", &editor->priv->line_color_hbox, - "line_key_combo", &editor->priv->line_key_combo, - "line_key_radio", &editor->priv->line_key_radio, - "line_color_radio", &editor->priv->line_color_radio, - NULL); - - editor->priv->line_color_combo = gl_color_combo_new (_("No Line"), - GL_COLOR_NO_LINE, - gl_prefs->default_line_color); - gtk_box_pack_start (GTK_BOX (editor->priv->line_color_hbox), - editor->priv->line_color_combo, - FALSE, FALSE, 0); - - gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->line_key_combo)); - - /* Modify widgets based on configuration */ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->line_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->line_key_combo, FALSE); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->line_width_spin), - gl_prefs->default_line_width); - gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->line_color_combo), - gl_prefs->default_line_color); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->line_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->line_width_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->line_color_combo), - "color_changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->line_key_combo), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->line_color_radio), - "toggled", - G_CALLBACK (line_radio_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->line_key_radio), - "toggled", - G_CALLBACK (line_radio_toggled_cb), - G_OBJECT (editor)); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set line width. */ -/*****************************************************************************/ -void -gl_object_editor_set_line_width (glObjectEditor *editor, - gdouble width) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - /* Set widget values */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->line_width_spin), - width); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query line width. */ -/*****************************************************************************/ -gdouble -gl_object_editor_get_line_width (glObjectEditor *editor) -{ - gdouble w; - - gl_debug (DEBUG_EDITOR, "START"); - - w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->line_width_spin)); - - gl_debug (DEBUG_EDITOR, "END"); - - return w; -} - - -/*****************************************************************************/ -/* Set line color. */ -/*****************************************************************************/ -void -gl_object_editor_set_line_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *color_node) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gl_debug (DEBUG_EDITOR, "color field %s(%d) / %X", color_node->key, color_node->field_flag, color_node->color); - gtk_widget_set_sensitive (editor->priv->line_key_radio, merge_flag); - - if ( color_node->color == GL_COLOR_NONE ) { - - gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->line_color_combo)); - - } else { - - gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->line_color_combo), - color_node->color); - - } - - if (!color_node->field_flag) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->line_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->line_key_combo, FALSE); - - } else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->line_key_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->line_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->line_key_combo, TRUE); - - gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->line_key_combo), - color_node->key); - } - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query line color. */ -/*****************************************************************************/ -glColorNode* -gl_object_editor_get_line_color (glObjectEditor *editor) -{ - guint color; - gboolean is_default; - glColorNode *color_node; - - gl_debug (DEBUG_EDITOR, "START"); - - color_node = gl_color_node_new_default (); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->line_key_radio))) { - color_node->field_flag = TRUE; - color_node->key = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->line_key_combo)); - } else { - color_node->field_flag = FALSE; - color_node->key = NULL; - color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->line_color_combo), - &is_default); - - if (!is_default) { - color_node->color = color; - } - } - - gl_debug (DEBUG_EDITOR, "END"); - - return color_node; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. line color radio callback. */ -/*--------------------------------------------------------------------------*/ -static void -line_radio_toggled_cb (glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->line_color_radio))) { - gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->line_key_combo, FALSE); - } else { - gtk_widget_set_sensitive (editor->priv->line_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->line_key_combo, TRUE); - - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-lsize-page.c b/glabels2/src/object-editor-lsize-page.c deleted file mode 100644 index a832f094..00000000 --- a/glabels2/src/object-editor-lsize-page.c +++ /dev/null @@ -1,270 +0,0 @@ -/* - * object-editor-lsize-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - -#define LENGTH(x,y) sqrt( (x)*(x) + (y)*(y) ) -#define ANGLE(x,y) ( (180.0/G_PI)*atan2( -(y), (x) ) ) -#define COMP_X(l,a) ( (l) * cos( (G_PI/180.0)*(a) ) ) -#define COMP_Y(l,a) ( -(l) * sin( (G_PI/180.0)*(a) ) ) - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare line size page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_lsize_page (glObjectEditor *editor) -{ - const gchar *units_string; - gdouble climb_rate; - gint digits; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "lsize_page_vbox", &editor->priv->lsize_page_vbox, - "lsize_r_spin", &editor->priv->lsize_r_spin, - "lsize_theta_spin", &editor->priv->lsize_theta_spin, - "lsize_r_units_label", &editor->priv->lsize_r_units_label, - NULL); - - /* Get configuration information */ - units_string = gl_prefs_get_units_string (); - editor->priv->units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Modify widgets based on configuration */ - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->lsize_r_spin), digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->lsize_r_spin), - climb_rate, 0); - gtk_label_set_text (GTK_LABEL(editor->priv->lsize_r_units_label), units_string); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->lsize_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->lsize_r_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->lsize_theta_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set line size. */ -/*****************************************************************************/ -void -gl_object_editor_set_lsize (glObjectEditor *editor, - gdouble dx, - gdouble dy) -{ - gdouble r, theta; - - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - /* save a copy in internal units */ - editor->priv->dx = dx; - editor->priv->dy = dy; - - /* convert internal units to displayed units */ - gl_debug (DEBUG_EDITOR, "internal dx,dy = %g, %g", dx, dy); - dx *= editor->priv->units_per_point; - dy *= editor->priv->units_per_point; - gl_debug (DEBUG_EDITOR, "display dx,dy = %g, %g", dx, dy); - - r = LENGTH (dx, dy); - theta = ANGLE (dx, dy); - - /* Set widget values */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin), r); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->lsize_theta_spin), - theta); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set maximum line size. */ -/*****************************************************************************/ -void -gl_object_editor_set_max_lsize (glObjectEditor *editor, - gdouble dx_max, - gdouble dy_max) -{ - gdouble tmp; - - gl_debug (DEBUG_EDITOR, "START"); - - if (editor->priv->lsize_page_vbox) - { - - editor->priv->stop_signals = TRUE; - - /* save a copy in internal units */ - editor->priv->dx_max = dx_max; - editor->priv->dy_max = dy_max; - - /* convert internal units to displayed units */ - gl_debug (DEBUG_EDITOR, "internal dx_max,dy_max = %g, %g", dx_max, dy_max); - dx_max *= editor->priv->units_per_point; - dy_max *= editor->priv->units_per_point; - gl_debug (DEBUG_EDITOR, "display dx_max,dy_max = %g, %g", dx_max, dy_max); - - /* Set widget values */ - tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin)); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin), - 0.0, 2.0*LENGTH (dx_max, dy_max)); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin), tmp); - - editor->priv->stop_signals = FALSE; - - } - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query line size. */ -/*****************************************************************************/ -void -gl_object_editor_get_lsize (glObjectEditor *editor, - gdouble *dx, - gdouble *dy) -{ - gdouble r, theta; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Get values from widgets */ - r = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin)); - theta = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->lsize_theta_spin)); - - /* convert everything back to our internal units (points) */ - r /= editor->priv->units_per_point; - - *dx = COMP_X (r, theta); - *dy = COMP_Y (r, theta); - - /* save a copy in internal units */ - editor->priv->dx = *dx; - editor->priv->dy = *dy; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* PRIVATE. Prefs changed callback. Update units related items. */ -/*****************************************************************************/ -void -lsize_prefs_changed_cb (glObjectEditor *editor) -{ - const gchar *units_string; - gdouble climb_rate; - gint digits; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Get new configuration information */ - units_string = gl_prefs_get_units_string (); - editor->priv->units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Update characteristics of r_spin */ - editor->priv->stop_signals = TRUE; - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->lsize_r_spin), - digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->lsize_r_spin), - climb_rate, 0); - editor->priv->stop_signals = FALSE; - - /* Update r_units_label */ - gtk_label_set_text (GTK_LABEL(editor->priv->lsize_r_units_label), - units_string); - - /* Update values of r_spin/theta_spin */ - gl_object_editor_set_lsize (editor, - editor->priv->dx, - editor->priv->dy); - gl_object_editor_set_max_lsize (editor, - editor->priv->dx_max, - editor->priv->dy_max); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-position-page.c b/glabels2/src/object-editor-position-page.c deleted file mode 100644 index 6ea9a869..00000000 --- a/glabels2/src/object-editor-position-page.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - * object-editor-position-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare position page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_position_page (glObjectEditor *editor) -{ - const gchar *units_string; - gdouble climb_rate; - gint digits; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "pos_page_vbox", &editor->priv->pos_page_vbox, - "pos_x_spin", &editor->priv->pos_x_spin, - "pos_y_spin", &editor->priv->pos_y_spin, - "pos_x_units_label", &editor->priv->pos_x_units_label, - "pos_y_units_label", &editor->priv->pos_y_units_label, - NULL); - - /* Get configuration information */ - units_string = gl_prefs_get_units_string (); - editor->priv->units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Modify widgets based on configuration */ - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->pos_x_spin), digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->pos_x_spin), - climb_rate, 10.0*climb_rate); - gtk_label_set_text (GTK_LABEL(editor->priv->pos_x_units_label), units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->pos_y_spin), digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->pos_y_spin), - climb_rate, 10.0*climb_rate); - gtk_label_set_text (GTK_LABEL(editor->priv->pos_y_units_label), units_string); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->pos_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->pos_x_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->pos_y_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set position. */ -/*****************************************************************************/ -void -gl_object_editor_set_position (glObjectEditor *editor, - gdouble x, - gdouble y) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - /* save a copy in internal units */ - editor->priv->x = x; - editor->priv->y = y; - - /* convert internal units to displayed units */ - gl_debug (DEBUG_EDITOR, "internal x,y = %g, %g", x, y); - x *= editor->priv->units_per_point; - y *= editor->priv->units_per_point; - gl_debug (DEBUG_EDITOR, "display x,y = %g, %g", x, y); - - /* Set widget values */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin), x); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin), y); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set maximum position. */ -/*****************************************************************************/ -void -gl_object_editor_set_max_position (glObjectEditor *editor, - gdouble x_max, - gdouble y_max) -{ - gdouble tmp; - - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - /* save a copy in internal units */ - editor->priv->x_max = x_max; - editor->priv->y_max = y_max; - - /* convert internal units to displayed units */ - gl_debug (DEBUG_EDITOR, "internal x_max,y_max = %g, %g", x_max, y_max); - x_max *= editor->priv->units_per_point; - y_max *= editor->priv->units_per_point; - gl_debug (DEBUG_EDITOR, "display x_max,y_max = %g, %g", x_max, y_max); - - /* Set widget values */ - tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin)); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->pos_x_spin), - -x_max, 2.0*x_max); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin), tmp); - tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin)); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->pos_y_spin), - -y_max, 2.0*y_max); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin), tmp); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query position. */ -/*****************************************************************************/ -void -gl_object_editor_get_position (glObjectEditor *editor, - gdouble *x, - gdouble *y) -{ - gl_debug (DEBUG_EDITOR, "START"); - - /* Get values from widgets */ - *x = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin)); - *y = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin)); - - /* convert everything back to our internal units (points) */ - *x /= editor->priv->units_per_point; - *y /= editor->priv->units_per_point; - - /* save a copy in internal units */ - editor->priv->x = *x; - editor->priv->y = *y; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* PRIVATE. Prefs changed callback. Update units related items. */ -/*****************************************************************************/ -void -position_prefs_changed_cb (glObjectEditor *editor) -{ - const gchar *units_string; - gdouble climb_rate; - gint digits; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Get new configuration information */ - units_string = gl_prefs_get_units_string (); - editor->priv->units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Update characteristics of x_spin/y_spin */ - editor->priv->stop_signals = TRUE; - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->pos_x_spin), - digits); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->pos_y_spin), - digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->pos_x_spin), - climb_rate, 10.0*climb_rate); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->pos_y_spin), - climb_rate, 10.0*climb_rate); - editor->priv->stop_signals = FALSE; - - /* Update units_labels */ - gtk_label_set_text (GTK_LABEL(editor->priv->pos_x_units_label), - units_string); - gtk_label_set_text (GTK_LABEL(editor->priv->pos_y_units_label), - units_string); - - /* Update values of x_spin/y_spin */ - gl_object_editor_set_position (editor, - editor->priv->x, - editor->priv->y); - gl_object_editor_set_max_position (editor, - editor->priv->x_max, - editor->priv->y_max); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-private.h b/glabels2/src/object-editor-private.h deleted file mode 100644 index 68580759..00000000 --- a/glabels2/src/object-editor-private.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - * object-editor-private.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __OBJECT_EDITOR_PRIVATE_H__ -#define __OBJECT_EDITOR_PRIVATE_H__ - -#include - -G_BEGIN_DECLS - -struct _glObjectEditorPrivate { - - GtkBuilder *builder; - GtkWidget *editor_vbox; - - glLabel *label; - - gdouble units_per_point; - - GtkWidget *title_image; - GtkWidget *title_label; - GtkWidget *notebook; - - GtkWidget *pos_page_vbox; - GtkWidget *pos_x_spin; - GtkWidget *pos_y_spin; - GtkWidget *pos_x_units_label; - GtkWidget *pos_y_units_label; - gdouble x; - gdouble y; - gdouble x_max; - gdouble y_max; - - GtkWidget *size_page_vbox; - GtkWidget *size_w_spin; - GtkWidget *size_h_spin; - GtkWidget *size_w_units_label; - GtkWidget *size_h_units_label; - GtkWidget *size_aspect_vbox; - GtkWidget *size_aspect_checkbutton; - GtkWidget *size_reset_image_button; - gdouble size_aspect_ratio; - gdouble w; - gdouble h; - gdouble w_max; - gdouble h_max; - gdouble w_base; - gdouble h_base; - - GtkWidget *lsize_page_vbox; - GtkWidget *lsize_r_spin; - GtkWidget *lsize_theta_spin; - GtkWidget *lsize_r_units_label; - gdouble dx; - gdouble dy; - gdouble dx_max; - gdouble dy_max; - - GtkWidget *fill_page_vbox; - GtkWidget *fill_color_hbox; - GtkWidget *fill_color_combo; - GtkWidget *fill_key_combo; - GtkWidget *fill_key_radio; - GtkWidget *fill_color_radio; - - GtkWidget *line_page_vbox; - GtkWidget *line_width_spin; - GtkWidget *line_color_radio; - GtkWidget *line_color_hbox; - GtkWidget *line_color_combo; - GtkWidget *line_key_radio; - GtkWidget *line_key_combo; - - GtkWidget *img_page_vbox; - GtkWidget *img_file_radio; - GtkWidget *img_key_radio; - GtkWidget *img_file_button; - GtkWidget *img_key_combo; - - GtkWidget *text_page_vbox; - GtkWidget *text_family_hbox; - GtkWidget *text_family_combo; - GtkWidget *text_size_spin; - GtkWidget *text_bold_toggle; - GtkWidget *text_italic_toggle; - GtkWidget *text_color_radio; - GtkWidget *text_color_hbox; - GtkWidget *text_color_combo; - GtkWidget *text_color_key_radio; - GtkWidget *text_color_key_combo; - GtkWidget *text_left_toggle; - GtkWidget *text_center_toggle; - GtkWidget *text_right_toggle; - GtkWidget *text_line_spacing_spin; - GtkWidget *text_auto_shrink_check; - - GtkWidget *edit_page_vbox; - GtkWidget *edit_text_view; - GtkWidget *edit_insert_field_button; - GtkWidget *edit_insert_field_menu; - - GtkWidget *bc_page_vbox; - GtkWidget *bc_style_combo; - GtkWidget *bc_text_check; - GtkWidget *bc_cs_check; - GtkWidget *bc_color_radio; - GtkWidget *bc_color_hbox; - GtkWidget *bc_color_combo; - GtkWidget *bc_key_radio; - GtkWidget *bc_key_combo; - - GtkWidget *data_page_vbox; - GtkWidget *data_literal_radio; - GtkWidget *data_key_radio; - GtkWidget *data_text_entry; - GtkWidget *data_key_combo; - GtkWidget *data_format_label; - GtkWidget *data_ex_label; - GtkWidget *data_digits_label; - GtkWidget *data_digits_spin; - gboolean data_format_fixed_flag; - - GtkWidget *shadow_page_vbox; - GtkWidget *shadow_enable_check; - GtkWidget *shadow_controls_table; - GtkWidget *shadow_x_spin; - GtkWidget *shadow_y_spin; - GtkWidget *shadow_x_units_label; - GtkWidget *shadow_y_units_label; - GtkWidget *shadow_color_radio; - GtkWidget *shadow_key_radio; - GtkWidget *shadow_color_hbox; - GtkWidget *shadow_color_combo; - GtkWidget *shadow_key_combo; - GtkWidget *shadow_opacity_spin; - gdouble shadow_x; - gdouble shadow_y; - gdouble shadow_x_max; - gdouble shadow_y_max; - - /* Prevent recursion */ - gboolean stop_signals; -}; - -enum { - CHANGED, - SIZE_CHANGED, - LAST_SIGNAL -}; - -extern gint gl_object_editor_signals[LAST_SIGNAL]; - - - -void gl_object_editor_prepare_position_page (glObjectEditor *editor); - -void gl_object_editor_prepare_size_page (glObjectEditor *editor, - glObjectEditorOption option); - -void gl_object_editor_prepare_lsize_page (glObjectEditor *editor); - -void gl_object_editor_prepare_fill_page (glObjectEditor *editor); - -void gl_object_editor_prepare_line_page (glObjectEditor *editor); - -void gl_object_editor_prepare_image_page (glObjectEditor *editor); - -void gl_object_editor_prepare_text_page (glObjectEditor *editor); - -void gl_object_editor_prepare_edit_page (glObjectEditor *editor); - -void gl_object_editor_prepare_bc_page (glObjectEditor *editor); - -void gl_object_editor_prepare_data_page (glObjectEditor *editor); - -void gl_object_editor_prepare_shadow_page (glObjectEditor *editor); - - -void gl_object_editor_changed_cb (glObjectEditor *editor); -void gl_object_editor_size_changed_cb (glObjectEditor *editor); - -void lsize_prefs_changed_cb (glObjectEditor *editor); -void size_prefs_changed_cb (glObjectEditor *editor); -void position_prefs_changed_cb (glObjectEditor *editor); -void shadow_prefs_changed_cb (glObjectEditor *editor); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-shadow-page.c b/glabels2/src/object-editor-shadow-page.c deleted file mode 100644 index 4a3cc2e2..00000000 --- a/glabels2/src/object-editor-shadow-page.c +++ /dev/null @@ -1,505 +0,0 @@ -/* - * object-editor-shadow-page.c - * Copyright (C) 2006-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "color-combo.h" -#include "color.h" -#include "combo-util.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void shadow_enable_check_toggled_cb (glObjectEditor *editor); -static void shadow_color_radio_toggled_cb (glObjectEditor *editor); - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare shadow page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_shadow_page (glObjectEditor *editor) -{ - const gchar *units_string; - gdouble climb_rate; - gint digits; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "shadow_page_vbox", &editor->priv->shadow_page_vbox, - "shadow_enable_check", &editor->priv->shadow_enable_check, - "shadow_controls_table", &editor->priv->shadow_controls_table, - "shadow_x_spin", &editor->priv->shadow_x_spin, - "shadow_y_spin", &editor->priv->shadow_y_spin, - "shadow_x_units_label", &editor->priv->shadow_x_units_label, - "shadow_y_units_label", &editor->priv->shadow_y_units_label, - "shadow_color_radio", &editor->priv->shadow_color_radio, - "shadow_key_radio", &editor->priv->shadow_key_radio, - "shadow_color_hbox", &editor->priv->shadow_color_hbox, - "shadow_key_combo", &editor->priv->shadow_key_combo, - "shadow_opacity_spin", &editor->priv->shadow_opacity_spin, - NULL); - - editor->priv->shadow_color_combo = gl_color_combo_new (_("Default"), - GL_COLOR_SHADOW_DEFAULT, - GL_COLOR_SHADOW_DEFAULT); - gtk_container_add (GTK_CONTAINER (editor->priv->shadow_color_hbox), - editor->priv->shadow_color_combo); - - gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->shadow_key_combo)); - - /* Get configuration information */ - units_string = gl_prefs_get_units_string (); - editor->priv->units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Modify widgets based on configuration */ - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->shadow_x_spin), digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->shadow_x_spin), - climb_rate, 10.0*climb_rate); - gtk_label_set_text (GTK_LABEL(editor->priv->shadow_x_units_label), units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->shadow_y_spin), digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->shadow_y_spin), - climb_rate, 10.0*climb_rate); - gtk_label_set_text (GTK_LABEL(editor->priv->shadow_y_units_label), units_string); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->shadow_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_enable_check), - "toggled", - G_CALLBACK (shadow_enable_check_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_x_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_y_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_color_combo), - "color_changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_key_combo), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_color_radio), - "toggled", - G_CALLBACK (shadow_color_radio_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_key_radio), - "toggled", - G_CALLBACK (shadow_color_radio_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_opacity_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set shadow parameters. */ -/*****************************************************************************/ -void -gl_object_editor_set_shadow_state (glObjectEditor *editor, - gboolean state) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_enable_check), - state); - gtk_widget_set_sensitive (editor->priv->shadow_controls_table, state); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -void -gl_object_editor_set_shadow_offset (glObjectEditor *editor, - gdouble x, - gdouble y) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - /* save a copy in internal units */ - editor->priv->shadow_x = x; - editor->priv->shadow_y = y; - - /* convert internal units to displayed units */ - gl_debug (DEBUG_EDITOR, "internal x,y = %g, %g", x, y); - x *= editor->priv->units_per_point; - y *= editor->priv->units_per_point; - gl_debug (DEBUG_EDITOR, "display x,y = %g, %g", x, y); - - /* Set widget values */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin), x); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin), y); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -void -gl_object_editor_set_shadow_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *color_node) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_widget_set_sensitive (editor->priv->shadow_key_radio, merge_flag); - - if ( color_node->color == GL_COLOR_NONE ) { - - gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->shadow_color_combo)); - - } else { - - gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->shadow_color_combo), - color_node->color); - - } - - if (!color_node->field_flag) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->shadow_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->shadow_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->shadow_key_combo, FALSE); - - } else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->shadow_key_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->shadow_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->shadow_key_combo, TRUE); - - gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->shadow_key_combo), - color_node->key); - } - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -void -gl_object_editor_set_shadow_opacity (glObjectEditor *editor, - gdouble alpha) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_opacity_spin), - alpha * 100.0); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set maximum shadow offset. */ -/*****************************************************************************/ -void -gl_object_editor_set_max_shadow_offset (glObjectEditor *editor, - gdouble x_max, - gdouble y_max) -{ - gdouble tmp; - - gl_debug (DEBUG_EDITOR, "START"); - - if (editor->priv->shadow_page_vbox) - { - - editor->priv->stop_signals = TRUE; - - /* save a copy in internal units */ - editor->priv->shadow_x_max = x_max; - editor->priv->shadow_y_max = y_max; - - /* convert internal units to displayed units */ - gl_debug (DEBUG_EDITOR, "internal x_max,y_max = %g, %g", x_max, y_max); - x_max *= editor->priv->units_per_point; - y_max *= editor->priv->units_per_point; - gl_debug (DEBUG_EDITOR, "display x_max,y_max = %g, %g", x_max, y_max); - - /* Set widget values */ - tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin)); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin), - -x_max, x_max); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin), tmp); - tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin)); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin), - -y_max, y_max); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin), tmp); - - editor->priv->stop_signals = FALSE; - - } - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query shadow parameters. */ -/*****************************************************************************/ -gboolean -gl_object_editor_get_shadow_state (glObjectEditor *editor) -{ - gboolean state; - - gl_debug (DEBUG_EDITOR, "START"); - - state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_enable_check)); - - gl_debug (DEBUG_EDITOR, "END"); - - return state; -} - - -void -gl_object_editor_get_shadow_offset (glObjectEditor *editor, - gdouble *x, - gdouble *y) -{ - gl_debug (DEBUG_EDITOR, "START"); - - /* Get values from widgets */ - *x = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin)); - *y = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin)); - - /* convert everything back to our internal units (points) */ - *x /= editor->priv->units_per_point; - *y /= editor->priv->units_per_point; - - /* save a copy in internal units */ - editor->priv->shadow_x = *x; - editor->priv->shadow_y = *y; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -glColorNode* -gl_object_editor_get_shadow_color (glObjectEditor *editor) -{ - guint color; - gboolean is_default; - glColorNode *color_node; - - gl_debug (DEBUG_EDITOR, "START"); - - color_node = gl_color_node_new_default (); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_key_radio))) { - color_node->field_flag = TRUE; - color_node->key = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->shadow_key_combo)); - } else { - color_node->field_flag = FALSE; - color_node->key = NULL; - color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->shadow_color_combo), - &is_default); - - if (!is_default) { - color_node->color = color; - } - } - - gl_debug (DEBUG_EDITOR, "END"); - - return color_node; -} - - -gdouble -gl_object_editor_get_shadow_opacity (glObjectEditor *editor) -{ - gdouble alpha; - - gl_debug (DEBUG_EDITOR, "START"); - - alpha = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_opacity_spin)); - - gl_debug (DEBUG_EDITOR, "END"); - - return alpha / 100.0; -} - - -/*****************************************************************************/ -/* PRIVATE. Prefs changed callback. Update units related items. */ -/*****************************************************************************/ -void -shadow_prefs_changed_cb (glObjectEditor *editor) -{ - const gchar *units_string; - gdouble climb_rate; - gint digits; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Get new configuration information */ - units_string = gl_prefs_get_units_string (); - editor->priv->units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Update characteristics of x_spin/y_spin */ - editor->priv->stop_signals = TRUE; - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->shadow_x_spin), - digits); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->shadow_y_spin), - digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->shadow_x_spin), - climb_rate, 10.0*climb_rate); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->shadow_y_spin), - climb_rate, 10.0*climb_rate); - editor->priv->stop_signals = FALSE; - - /* Update units_labels */ - gtk_label_set_text (GTK_LABEL(editor->priv->shadow_x_units_label), - units_string); - gtk_label_set_text (GTK_LABEL(editor->priv->shadow_y_units_label), - units_string); - - /* Update values of x_spin/y_spin */ - gl_object_editor_set_shadow_offset (editor, - editor->priv->shadow_x, - editor->priv->shadow_y); - gl_object_editor_set_max_shadow_offset (editor, - editor->priv->shadow_x_max, - editor->priv->shadow_y_max); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. shadow enable check callback. */ -/*--------------------------------------------------------------------------*/ -static void -shadow_enable_check_toggled_cb (glObjectEditor *editor) -{ - gboolean state; - - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_enable_check)); - - gtk_widget_set_sensitive (editor->priv->shadow_controls_table, state); - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. shadow color radio callback. */ -/*--------------------------------------------------------------------------*/ -static void -shadow_color_radio_toggled_cb (glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_color_radio))) { - gtk_widget_set_sensitive (editor->priv->shadow_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->shadow_key_combo, FALSE); - } else { - gtk_widget_set_sensitive (editor->priv->shadow_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->shadow_key_combo, TRUE); - - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-size-page.c b/glabels2/src/object-editor-size-page.c deleted file mode 100644 index c6821ea1..00000000 --- a/glabels2/src/object-editor-size-page.c +++ /dev/null @@ -1,476 +0,0 @@ -/* - * object-editor-size-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "wdgt-chain-button.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void aspect_toggle_cb (glObjectEditor *editor); -static void size_reset_cb (glObjectEditor *editor); -static void w_spin_cb (glObjectEditor *editor); -static void h_spin_cb (glObjectEditor *editor); - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare size page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_size_page (glObjectEditor *editor, - glObjectEditorOption option) -{ - const gchar *units_string; - gdouble climb_rate; - gint digits; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "size_page_vbox", &editor->priv->size_page_vbox, - "size_w_spin", &editor->priv->size_w_spin, - "size_h_spin", &editor->priv->size_h_spin, - "size_w_units_label", &editor->priv->size_w_units_label, - "size_h_units_label", &editor->priv->size_h_units_label, - "size_aspect_vbox", &editor->priv->size_aspect_vbox, - "size_reset_image_button", &editor->priv->size_reset_image_button, - NULL); - - editor->priv->size_aspect_checkbutton = gl_wdgt_chain_button_new (GL_WDGT_CHAIN_RIGHT); - gl_wdgt_chain_button_set_active (GL_WDGT_CHAIN_BUTTON(editor->priv->size_aspect_checkbutton), - TRUE); - gtk_box_pack_start (GTK_BOX (editor->priv->size_aspect_vbox), - editor->priv->size_aspect_checkbutton, - FALSE, FALSE, 0); - - - /* Get configuration information */ - units_string = gl_prefs_get_units_string (); - editor->priv->units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Modify widgets based on configuration */ - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->size_w_spin), digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->size_w_spin), - climb_rate, 10.0*climb_rate); - gtk_label_set_text (GTK_LABEL(editor->priv->size_w_units_label), units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->size_h_spin), digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->size_h_spin), - climb_rate, 10.0*climb_rate); - gtk_label_set_text (GTK_LABEL(editor->priv->size_h_units_label), units_string); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->size_page_vbox); - if (option != GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE) { - gtk_widget_hide (editor->priv->size_reset_image_button); - } - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->size_aspect_checkbutton), - "toggled", - G_CALLBACK (aspect_toggle_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->size_w_spin), - "changed", - G_CALLBACK (w_spin_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->size_h_spin), - "changed", - G_CALLBACK (h_spin_cb), - G_OBJECT (editor)); - - if (option == GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE) { - g_signal_connect_swapped (G_OBJECT (editor->priv->size_reset_image_button), - "clicked", - G_CALLBACK (size_reset_cb), - G_OBJECT (editor)); - } - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Maintain aspect ratio checkbox callback. */ -/*--------------------------------------------------------------------------*/ -static void -aspect_toggle_cb (glObjectEditor *editor) -{ - glWdgtChainButton *toggle; - gdouble w, h; - - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - toggle = GL_WDGT_CHAIN_BUTTON (editor->priv->size_aspect_checkbutton); - - if (gl_wdgt_chain_button_get_active (toggle)) { - - w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->size_w_spin)); - h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->size_h_spin)); - - editor->priv->size_aspect_ratio = h / w; - - } - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. W spin button changed callback. */ -/*--------------------------------------------------------------------------*/ -static void -w_spin_cb (glObjectEditor *editor) -{ - gdouble w, h; - glWdgtChainButton *toggle; - - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - toggle = GL_WDGT_CHAIN_BUTTON (editor->priv->size_aspect_checkbutton); - - if (gl_wdgt_chain_button_get_active (toggle)) { - - w = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin)); - - h = w * editor->priv->size_aspect_ratio; - - /* Update our sibling control, blocking recursion. */ - editor->priv->stop_signals = TRUE; - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin), h); - editor->priv->stop_signals = FALSE; - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[SIZE_CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. H spin button changed callback. */ -/*--------------------------------------------------------------------------*/ -static void -h_spin_cb (glObjectEditor *editor) -{ - gdouble w, h; - glWdgtChainButton *toggle; - - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - toggle = GL_WDGT_CHAIN_BUTTON (editor->priv->size_aspect_checkbutton); - - if (gl_wdgt_chain_button_get_active (toggle)) { - - h = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin)); - - w = h / editor->priv->size_aspect_ratio; - - /* Update our sibling control, blocking recursion. */ - editor->priv->stop_signals = TRUE; - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin), w); - editor->priv->stop_signals = FALSE; - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[SIZE_CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Reset image size callback. */ -/*--------------------------------------------------------------------------*/ -static void -size_reset_cb (glObjectEditor *editor) -{ - gdouble w_base, h_base; - gdouble w_max, h_max, wh_max; - gdouble aspect_ratio; - - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - w_base = editor->priv->w_base; - h_base = editor->priv->h_base; - - w_max = editor->priv->w_max; - h_max = editor->priv->h_max; - wh_max = MAX( w_max, h_max ); - - if ( (w_base > wh_max) || (h_base > wh_max) ) { - - aspect_ratio = h_base / w_base; - - if ( aspect_ratio < 1.0 ) { - w_base = wh_max; - h_base = wh_max * aspect_ratio; - - } else { - w_base = wh_max / aspect_ratio; - h_base = wh_max; - } - } - - w_base *= editor->priv->units_per_point; - h_base *= editor->priv->units_per_point; - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin), - w_base); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin), - h_base); - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[SIZE_CHANGED], 0); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set size. */ -/*****************************************************************************/ -void -gl_object_editor_set_size (glObjectEditor *editor, - gdouble w, - gdouble h) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - /* save a copy in internal units */ - editor->priv->w = w; - editor->priv->h = h; - - /* convert internal units to displayed units */ - gl_debug (DEBUG_EDITOR, "internal w,h = %g, %g", w, h); - w *= editor->priv->units_per_point; - h *= editor->priv->units_per_point; - gl_debug (DEBUG_EDITOR, "display w,h = %g, %g", w, h); - - /* Set widget values */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin), w); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin), h); - - /* Update aspect ratio */ - editor->priv->size_aspect_ratio = h / w; - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set maximum size. */ -/*****************************************************************************/ -void -gl_object_editor_set_max_size (glObjectEditor *editor, - gdouble w_max, - gdouble h_max) -{ - gdouble tmp; - gdouble wh_max; - - gl_debug (DEBUG_EDITOR, "START"); - - if (editor->priv->size_page_vbox) - { - - editor->priv->stop_signals = TRUE; - - /* save a copy in internal units */ - editor->priv->w_max = w_max; - editor->priv->h_max = h_max; - - /* convert internal units to displayed units */ - gl_debug (DEBUG_EDITOR, "internal w_max,h_max = %g, %g", w_max, h_max); - w_max *= editor->priv->units_per_point; - h_max *= editor->priv->units_per_point; - wh_max = MAX( w_max, h_max ); - gl_debug (DEBUG_EDITOR, "display w_max,h_max = %g, %g", w_max, h_max); - - /* Set widget values */ - tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin)); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->size_w_spin), - 0.0, 2.0*wh_max); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin), tmp); - tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin)); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->size_h_spin), - 0.0, 2.0*wh_max); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin), tmp); - - editor->priv->stop_signals = FALSE; - - } - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set base or natural size of image. */ -/*****************************************************************************/ -void -gl_object_editor_set_base_size (glObjectEditor *editor, - gdouble w_base, - gdouble h_base) -{ - gl_debug (DEBUG_EDITOR, "Setting w_base = %g", w_base); - gl_debug (DEBUG_EDITOR, "Setting h_base = %g", h_base); - - editor->priv->w_base = w_base; - editor->priv->h_base = h_base; -} - - -/*****************************************************************************/ -/* Query size. */ -/*****************************************************************************/ -void -gl_object_editor_get_size (glObjectEditor *editor, - gdouble *w, - gdouble *h) -{ - gl_debug (DEBUG_EDITOR, "START"); - - - /* Get values from widgets */ - *w = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin)); - *h = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin)); - - /* convert everything back to our internal units (points) */ - *w /= editor->priv->units_per_point; - *h /= editor->priv->units_per_point; - - /* save a copy in internal units */ - editor->priv->w = *w; - editor->priv->h = *h; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* PRIVATE. Prefs changed callback. Update units related items. */ -/*****************************************************************************/ -void -size_prefs_changed_cb (glObjectEditor *editor) -{ - const gchar *units_string; - gdouble climb_rate; - gint digits; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Get new configuration information */ - units_string = gl_prefs_get_units_string (); - editor->priv->units_per_point = gl_prefs_get_units_per_point (); - climb_rate = gl_prefs_get_units_step_size (); - digits = gl_prefs_get_units_precision (); - - /* Update characteristics of w_spin/h_spin */ - editor->priv->stop_signals = TRUE; - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->size_w_spin), - digits); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->size_h_spin), - digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->size_w_spin), - climb_rate, 10.0*climb_rate); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->size_h_spin), - climb_rate, 10.0*climb_rate); - editor->priv->stop_signals = FALSE; - - /* Update units_labels */ - gtk_label_set_text (GTK_LABEL(editor->priv->size_w_units_label), - units_string); - gtk_label_set_text (GTK_LABEL(editor->priv->size_h_units_label), - units_string); - - /* Update values of w_spin/h_spin */ - gl_object_editor_set_size (editor, - editor->priv->w, - editor->priv->h); - gl_object_editor_set_max_size (editor, - editor->priv->w_max, - editor->priv->h_max); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor-text-page.c b/glabels2/src/object-editor-text-page.c deleted file mode 100644 index 615668ea..00000000 --- a/glabels2/src/object-editor-text-page.c +++ /dev/null @@ -1,640 +0,0 @@ -/* - * object-editor-text-page.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "color-combo.h" -#include "color.h" -#include "font-combo.h" -#include "font-util.h" -#include "combo-util.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void align_toggle_cb (GtkToggleButton *toggle, - glObjectEditor *editor); -static void text_radio_toggled_cb (glObjectEditor *editor); - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare size page. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_prepare_text_page (glObjectEditor *editor) -{ - gl_debug (DEBUG_EDITOR, "START"); - - /* Extract widgets from XML tree. */ - gl_builder_util_get_widgets (editor->priv->builder, - "text_page_vbox", &editor->priv->text_page_vbox, - "text_family_hbox", &editor->priv->text_family_hbox, - "text_size_spin", &editor->priv->text_size_spin, - "text_bold_toggle", &editor->priv->text_bold_toggle, - "text_italic_toggle", &editor->priv->text_italic_toggle, - "text_color_hbox", &editor->priv->text_color_hbox, - "text_color_radio", &editor->priv->text_color_radio, - "text_color_key_radio", &editor->priv->text_color_key_radio, - "text_color_key_combo", &editor->priv->text_color_key_combo, - "text_left_toggle", &editor->priv->text_left_toggle, - "text_center_toggle", &editor->priv->text_center_toggle, - "text_right_toggle", &editor->priv->text_right_toggle, - "text_line_spacing_spin", &editor->priv->text_line_spacing_spin, - "text_auto_shrink_check", &editor->priv->text_auto_shrink_check, - NULL); - - editor->priv->text_family_combo = gl_font_combo_new ("Sans"); - gtk_box_pack_start (GTK_BOX (editor->priv->text_family_hbox), - editor->priv->text_family_combo, - TRUE, TRUE, 0); - - editor->priv->text_color_combo = gl_color_combo_new (_("Default"), - GL_COLOR_TEXT_DEFAULT, - gl_prefs->default_text_color); - gtk_box_pack_start (GTK_BOX (editor->priv->text_color_hbox), - editor->priv->text_color_combo, - FALSE, FALSE, 0); - - gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->text_color_key_combo)); - - /* Modify widgets */ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE); - - /* Un-hide */ - gtk_widget_show_all (editor->priv->text_page_vbox); - - /* Connect signals */ - g_signal_connect_swapped (G_OBJECT (editor->priv->text_family_combo), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->text_size_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->text_bold_toggle), - "toggled", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->text_italic_toggle), - "toggled", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_combo), - "color_changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_key_combo), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_radio), - "toggled", - G_CALLBACK (text_radio_toggled_cb), - G_OBJECT (editor)); - g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_key_radio), - "toggled", - G_CALLBACK (text_radio_toggled_cb), - G_OBJECT (editor)); - - g_signal_connect (G_OBJECT (editor->priv->text_left_toggle), - "toggled", - G_CALLBACK (align_toggle_cb), - G_OBJECT (editor)); - g_signal_connect (G_OBJECT (editor->priv->text_center_toggle), - "toggled", - G_CALLBACK (align_toggle_cb), - G_OBJECT (editor)); - g_signal_connect (G_OBJECT (editor->priv->text_right_toggle), - "toggled", - G_CALLBACK (align_toggle_cb), - G_OBJECT (editor)); - - g_signal_connect_swapped (G_OBJECT (editor->priv->text_line_spacing_spin), - "changed", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - - g_signal_connect_swapped (G_OBJECT (editor->priv->text_auto_shrink_check), - "toggled", - G_CALLBACK (gl_object_editor_changed_cb), - G_OBJECT (editor)); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Alignment togglebutton callback. */ -/*--------------------------------------------------------------------------*/ -static void -align_toggle_cb (GtkToggleButton *toggle, - glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - if (gtk_toggle_button_get_active (toggle)) { - - if (GTK_WIDGET (toggle) == GTK_WIDGET (editor->priv->text_left_toggle)) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->text_center_toggle), - FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->text_right_toggle), - FALSE); - } else if (GTK_WIDGET (toggle) == - GTK_WIDGET (editor->priv->text_center_toggle)) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->text_left_toggle), - FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->text_right_toggle), - FALSE); - } else if (GTK_WIDGET (toggle) == - GTK_WIDGET (editor->priv->text_right_toggle)) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->text_left_toggle), - FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->text_center_toggle), - FALSE); - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - } - -} - - -/*****************************************************************************/ -/* Set font family. */ -/*****************************************************************************/ -void -gl_object_editor_set_font_family (glObjectEditor *editor, - const gchar *font_family) -{ - gchar *old_font_family; - - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - old_font_family = gl_font_combo_get_family (GL_FONT_COMBO (editor->priv->text_family_combo)); - - if ( !old_font_family || g_utf8_collate( old_font_family, font_family ) ) - { - gl_font_combo_set_family (GL_FONT_COMBO (editor->priv->text_family_combo), - font_family); - } - - g_free (old_font_family); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query font family. */ -/*****************************************************************************/ -gchar * -gl_object_editor_get_font_family (glObjectEditor *editor) -{ - gchar *font_family; - - gl_debug (DEBUG_EDITOR, "START"); - - font_family = gl_font_combo_get_family (GL_FONT_COMBO (editor->priv->text_family_combo)); - - gl_debug (DEBUG_EDITOR, "END"); - - return font_family; -} - - -/*****************************************************************************/ -/* Set font size. */ -/*****************************************************************************/ -void -gl_object_editor_set_font_size (glObjectEditor *editor, - gdouble font_size) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->text_size_spin), - font_size); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query font size. */ -/*****************************************************************************/ -gdouble -gl_object_editor_get_font_size (glObjectEditor *editor) -{ - gdouble font_size; - - gl_debug (DEBUG_EDITOR, "START"); - - font_size = - gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->text_size_spin)); - - gl_debug (DEBUG_EDITOR, "END"); - - return font_size; -} - - -/*****************************************************************************/ -/* Set font weight. */ -/*****************************************************************************/ -void -gl_object_editor_set_font_weight (glObjectEditor *editor, - PangoWeight font_weight) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_bold_toggle), - (font_weight == PANGO_WEIGHT_BOLD)); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query font weight. */ -/*****************************************************************************/ -PangoWeight -gl_object_editor_get_font_weight (glObjectEditor *editor) -{ - PangoWeight font_weight; - - gl_debug (DEBUG_EDITOR, "START"); - - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (editor->priv->text_bold_toggle))) { - font_weight = PANGO_WEIGHT_BOLD; - } else { - font_weight = PANGO_WEIGHT_NORMAL; - } - - gl_debug (DEBUG_EDITOR, "END"); - - return font_weight; -} - - -/*****************************************************************************/ -/* Set font italic flag. */ -/*****************************************************************************/ -void -gl_object_editor_set_font_italic_flag (glObjectEditor *editor, - gboolean font_italic_flag) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_italic_toggle), - font_italic_flag); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query font italic flag. */ -/*****************************************************************************/ -gboolean -gl_object_editor_get_font_italic_flag (glObjectEditor *editor) -{ - gboolean italic_flag; - - gl_debug (DEBUG_EDITOR, "START"); - - italic_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (editor->priv->text_italic_toggle)); - - gl_debug (DEBUG_EDITOR, "END"); - - return italic_flag; -} - - -/*****************************************************************************/ -/* Set text alignment. */ -/*****************************************************************************/ -void -gl_object_editor_set_text_alignment (glObjectEditor *editor, - PangoAlignment align) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_left_toggle), - (align == PANGO_ALIGN_LEFT)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_center_toggle), - (align == PANGO_ALIGN_CENTER)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_right_toggle), - (align == PANGO_ALIGN_RIGHT)); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query text alignment. */ -/*****************************************************************************/ -PangoAlignment -gl_object_editor_get_text_alignment (glObjectEditor *editor) -{ - PangoAlignment align; - - gl_debug (DEBUG_EDITOR, "START"); - - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (editor->priv->text_left_toggle))) { - align = PANGO_ALIGN_LEFT; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (editor->priv->text_right_toggle))) { - align = PANGO_ALIGN_RIGHT; - } else - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (editor->priv->text_center_toggle))) { - align = PANGO_ALIGN_CENTER; - } else { - align = PANGO_ALIGN_LEFT; /* Should not happen. */ - } - - gl_debug (DEBUG_EDITOR, "END"); - - return align; -} - - -/*****************************************************************************/ -/* Set text color. */ -/*****************************************************************************/ -void -gl_object_editor_set_text_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *text_color_node) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gl_debug (DEBUG_EDITOR, "color field %s(%d) / %X", text_color_node->key, text_color_node->field_flag, text_color_node->color); - - gtk_widget_set_sensitive (editor->priv->text_color_key_radio, merge_flag); - - if ( text_color_node->color == GL_COLOR_NONE ) { - - gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->text_color_combo)); - - } else { - - gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->text_color_combo), - text_color_node->color); - } - - if (!text_color_node->field_flag) { - gl_debug (DEBUG_EDITOR, "color field false"); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->text_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE); - - } else { - gl_debug (DEBUG_EDITOR, "color field true"); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (editor->priv->text_color_key_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->text_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->text_color_key_combo, TRUE); - - gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo), ""); - } - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query text color. */ -/*****************************************************************************/ -glColorNode* -gl_object_editor_get_text_color (glObjectEditor *editor) -{ - guint color; - glColorNode *color_node; - gboolean is_default; - - gl_debug (DEBUG_EDITOR, "START"); - - color_node = gl_color_node_new_default (); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_key_radio))) { - color_node->field_flag = TRUE; - color_node->color = gl_prefs->default_text_color; - color_node->key = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo)); - } else { - color_node->field_flag = FALSE; - color_node->key = NULL; - color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->text_color_combo), - &is_default); - - if (is_default) { - color_node->color = gl_prefs->default_text_color; - } else { - color_node->color = color; - } - } - - gl_debug (DEBUG_EDITOR, "END"); - - return color_node; -} - - -/*****************************************************************************/ -/* Set text line spacing. */ -/*****************************************************************************/ -void -gl_object_editor_set_text_line_spacing (glObjectEditor *editor, - gdouble text_line_spacing) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->text_line_spacing_spin), - text_line_spacing); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query text line spacing. */ -/*****************************************************************************/ -gdouble -gl_object_editor_get_text_line_spacing (glObjectEditor *editor) -{ - gdouble text_line_spacing; - - gl_debug (DEBUG_EDITOR, "START"); - - text_line_spacing = - gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->text_line_spacing_spin)); - - gl_debug (DEBUG_EDITOR, "END"); - - return text_line_spacing; -} - - -/*****************************************************************************/ -/* Set auto shrink checkbox. */ -/*****************************************************************************/ -void -gl_object_editor_set_text_auto_shrink (glObjectEditor *editor, - gboolean auto_shrink) -{ - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->stop_signals = TRUE; - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_auto_shrink_check), - auto_shrink); - - editor->priv->stop_signals = FALSE; - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Query auto shrink checkbox. */ -/*****************************************************************************/ -gboolean gl_object_editor_get_text_auto_shrink (glObjectEditor *editor) -{ - gboolean auto_shrink; - - gl_debug (DEBUG_EDITOR, "START"); - - auto_shrink = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->text_auto_shrink_check)); - - gl_debug (DEBUG_EDITOR, "END"); - - return auto_shrink; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. color radio callback. */ -/*--------------------------------------------------------------------------*/ -static void -text_radio_toggled_cb (glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_radio))) { - gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE); - } else { - gtk_widget_set_sensitive (editor->priv->text_color_combo, FALSE); - gtk_widget_set_sensitive (editor->priv->text_color_key_combo, TRUE); - - } - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor.c b/glabels2/src/object-editor.c deleted file mode 100644 index 3edf5815..00000000 --- a/glabels2/src/object-editor.c +++ /dev/null @@ -1,639 +0,0 @@ -/* - * object-editor.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "object-editor.h" - -#include -#include -#include - -#include "prefs.h" -#include "color-combo.h" -#include "color.h" -#include "wdgt-chain-button.h" -#include "wdgt-merge-menu.h" -#include "marshal.h" -#include "combo-util.h" -#include "builder-util.h" - -#include "object-editor-private.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros */ -/*===========================================*/ - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -typedef void (*ChangedSignal) (GObject * object, gpointer data); - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -gint gl_object_editor_signals[LAST_SIGNAL] = { 0 }; - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_object_editor_finalize (GObject *object); - -static void gl_object_notebook_construct_valist (glObjectEditor *editor, - glLabel *label, - glObjectEditorOption first_option, - va_list args); - -static void prefs_changed_cb (glObjectEditor *editor); - -static void label_changed_cb (glLabel *label, - glObjectEditor *editor); - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glObjectEditor, gl_object_editor, GTK_TYPE_VBOX); - - -static void -gl_object_editor_class_init (glObjectEditorClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_EDITOR, "START"); - - gl_object_editor_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_object_editor_finalize; - - gl_object_editor_signals[CHANGED] = - g_signal_new ("changed", - G_OBJECT_CLASS_TYPE(object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glObjectEditorClass, changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - gl_object_editor_signals[SIZE_CHANGED] = - g_signal_new ("size_changed", - G_OBJECT_CLASS_TYPE(object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glObjectEditorClass, size_changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -static void -gl_object_editor_init (glObjectEditor *editor) -{ - static gchar *object_ids[] = { "editor_vbox", - "adjustment1", "adjustment2", "adjustment3", - "adjustment4", "adjustment5", "adjustment6", - "adjustment7", "adjustment8", "adjustment9", - "adjustment10", "adjustment11", "adjustment12", - "adjustment13", - NULL }; - GError *error = NULL; - - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv = g_new0 (glObjectEditorPrivate, 1); - - editor->priv->builder = gtk_builder_new (); - - gtk_builder_add_objects_from_file (editor->priv->builder, - GLABELS_BUILDER_DIR "object-editor.builder", - object_ids, - &error); - if (error) { - g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); - g_error_free (error); - return; - } - - gl_builder_util_get_widgets (editor->priv->builder, - "editor_vbox", &editor->priv->editor_vbox, - "title_image", &editor->priv->title_image, - "title_label", &editor->priv->title_label, - "notebook", &editor->priv->notebook, - NULL); - - gtk_box_pack_start (GTK_BOX(editor), - editor->priv->editor_vbox, - FALSE, FALSE, 0); - - gtk_widget_show_all (GTK_WIDGET(editor)); - - /* Hide all notebook pages to start with. */ - gtk_widget_hide_all (editor->priv->notebook); - gtk_widget_set_no_show_all (editor->priv->notebook, TRUE); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -static void -gl_object_editor_finalize (GObject *object) -{ - glObjectEditor* editor = GL_OBJECT_EDITOR (object);; - - gl_debug (DEBUG_EDITOR, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_OBJECT_EDITOR (editor)); - g_return_if_fail (editor->priv != NULL); - - g_signal_handlers_disconnect_by_func (G_OBJECT(gl_prefs), - prefs_changed_cb, editor); - g_signal_handlers_disconnect_by_func (G_OBJECT(editor->priv->label), - label_changed_cb, editor); - - g_object_unref (editor->priv->builder); - g_free (editor->priv); - - G_OBJECT_CLASS (gl_object_editor_parent_class)->finalize (object); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* NEW object editor. */ -/*****************************************************************************/ -GtkWidget* -gl_object_editor_new (gchar *image, - gchar *title, - glLabel *label, - glObjectEditorOption first_option, ...) -{ - glObjectEditor *editor; - va_list args; - - gl_debug (DEBUG_EDITOR, "START"); - - editor = GL_OBJECT_EDITOR (g_object_new (GL_TYPE_OBJECT_EDITOR, NULL)); - - if (image) { - gtk_image_set_from_stock (GTK_IMAGE(editor->priv->title_image), - image, - GTK_ICON_SIZE_LARGE_TOOLBAR); - } - - if (title) { - gchar *s; - - s = g_strdup_printf ("%s", - title); - gtk_label_set_text (GTK_LABEL(editor->priv->title_label), s); - g_free (s); - - gtk_label_set_use_markup (GTK_LABEL(editor->priv->title_label), TRUE); - - } - - va_start (args, first_option); - gl_object_notebook_construct_valist (editor, label, first_option, args); - va_end (args); - - gl_debug (DEBUG_EDITOR, "END"); - - return GTK_WIDGET(editor); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct notebook. */ -/*--------------------------------------------------------------------------*/ -static void -gl_object_notebook_construct_valist (glObjectEditor *editor, - glLabel *label, - glObjectEditorOption first_option, - va_list args) -{ - glObjectEditorOption option; - gint pages = 0; - - gl_debug (DEBUG_EDITOR, "START"); - - editor->priv->label = label; - - option = first_option; - - for ( option=first_option; option; option=va_arg (args, glObjectEditorOption) ) { - - switch (option) { - - case GL_OBJECT_EDITOR_EMPTY: - gtk_widget_set_sensitive (editor->priv->title_image, FALSE); - gtk_widget_set_sensitive (editor->priv->title_label, FALSE); - break; - - case GL_OBJECT_EDITOR_POSITION_PAGE: - gl_object_editor_prepare_position_page (editor); - pages++; - break; - - case GL_OBJECT_EDITOR_SIZE_PAGE: - case GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE: - gl_object_editor_prepare_size_page (editor, option); - pages++; - break; - - case GL_OBJECT_EDITOR_SIZE_LINE_PAGE: - gl_object_editor_prepare_lsize_page (editor); - pages++; - break; - - case GL_OBJECT_EDITOR_FILL_PAGE: - gl_object_editor_prepare_fill_page (editor); - pages++; - break; - - case GL_OBJECT_EDITOR_LINE_PAGE: - gl_object_editor_prepare_line_page (editor); - pages++; - break; - - case GL_OBJECT_EDITOR_IMAGE_PAGE: - gl_object_editor_prepare_image_page (editor); - pages++; - break; - - case GL_OBJECT_EDITOR_TEXT_PAGE: - gl_object_editor_prepare_text_page (editor); - pages++; - break; - - case GL_OBJECT_EDITOR_EDIT_PAGE: - gl_object_editor_prepare_edit_page (editor); - pages++; - break; - - case GL_OBJECT_EDITOR_BC_PAGE: - gl_object_editor_prepare_bc_page (editor); - pages++; - break; - - case GL_OBJECT_EDITOR_DATA_PAGE: - gl_object_editor_prepare_data_page (editor); - pages++; - break; - - case GL_OBJECT_EDITOR_SHADOW_PAGE: - gl_object_editor_prepare_shadow_page (editor); - pages++; - break; - - default: - g_message ("option = %d", option); - g_assert_not_reached (); - } - - } - if (pages) { - gtk_widget_show (editor->priv->notebook); - } - - g_signal_connect_swapped (G_OBJECT (gl_prefs), "changed", - G_CALLBACK (prefs_changed_cb), - editor); - if (label) - { - label_changed_cb (label, editor); - g_signal_connect (G_OBJECT (label), "size_changed", - G_CALLBACK (label_changed_cb), - editor); - g_signal_connect (G_OBJECT (label), "merge_changed", - G_CALLBACK (label_changed_cb), - editor); - } - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Widget changed callback. Emit our "changed" signal. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_changed_cb (glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Widget size changed callback. Emit our "size-changed" signal. */ -/*--------------------------------------------------------------------------*/ -void -gl_object_editor_size_changed_cb (glObjectEditor *editor) -{ - if (editor->priv->stop_signals) return; - - gl_debug (DEBUG_EDITOR, "START"); - - /* Emit our "size_changed" signal */ - g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[SIZE_CHANGED], 0); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*****************************************************************************/ -/* Set possible key names from merge object. */ -/*****************************************************************************/ -void -gl_object_editor_set_key_names (glObjectEditor *editor, - glMerge *merge) -{ - GList *keys; - GtkWidget *combo; - GtkWidget *menu; - gboolean fixed_flag; - gboolean state; - - gl_debug (DEBUG_EDITOR, "START"); - - if (editor->priv->text_auto_shrink_check) { - gtk_widget_set_sensitive (editor->priv->text_auto_shrink_check, - merge != NULL); - } - - if (editor->priv->text_page_vbox) { - gtk_widget_set_sensitive (editor->priv->text_color_key_radio, merge != NULL); - if (merge == NULL) { - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(editor->priv->text_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE); - } else { - state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->text_color_key_radio)); - gtk_widget_set_sensitive (editor->priv->text_color_combo, !state); - gtk_widget_set_sensitive (editor->priv->text_color_key_combo, state); - - } - } - - if (editor->priv->edit_insert_field_button) { - gtk_widget_set_sensitive (editor->priv->edit_insert_field_button, - merge != NULL); - } - - if (editor->priv->img_key_combo) { - gtk_widget_set_sensitive (editor->priv->img_key_combo, merge != NULL); - } - - if (editor->priv->img_key_radio) { - gtk_widget_set_sensitive (editor->priv->img_key_radio, merge != NULL); - if (merge == NULL) { - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(editor->priv->img_file_radio), TRUE); - } - } - - if (editor->priv->data_key_combo) { - gtk_widget_set_sensitive (editor->priv->data_key_combo, merge != NULL); - } - - if (editor->priv->data_key_radio) { - gtk_widget_set_sensitive (editor->priv->data_key_radio, merge != NULL); - if (merge == NULL) { - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(editor->priv->data_literal_radio), TRUE); - } - } - - fixed_flag = editor->priv->data_format_fixed_flag; - if (editor->priv->data_format_label) { - gtk_widget_set_sensitive (editor->priv->data_format_label, - (merge != NULL)); - } - if (editor->priv->data_ex_label) { - gtk_widget_set_sensitive (editor->priv->data_ex_label, - (merge != NULL)); - } - if (editor->priv->data_digits_label) { - gtk_widget_set_sensitive (editor->priv->data_digits_label, - (merge != NULL) && !fixed_flag); - } - if (editor->priv->data_digits_spin) { - gtk_widget_set_sensitive (editor->priv->data_digits_spin, - (merge != NULL) && !fixed_flag); - } - - if (editor->priv->fill_page_vbox) { - gtk_widget_set_sensitive (editor->priv->fill_key_radio, merge != NULL); - if (merge == NULL) { - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(editor->priv->fill_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->fill_key_combo, FALSE); - } else { - state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->fill_key_radio)); - gtk_widget_set_sensitive (editor->priv->fill_color_combo, !state); - gtk_widget_set_sensitive (editor->priv->fill_key_combo, state); - - } - } - - if (editor->priv->line_page_vbox) { - gtk_widget_set_sensitive (editor->priv->line_key_radio, merge != NULL); - if (merge == NULL) { - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(editor->priv->line_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->line_key_combo, FALSE); - } else { - state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->line_key_radio)); - gtk_widget_set_sensitive (editor->priv->line_color_combo, !state); - gtk_widget_set_sensitive (editor->priv->line_key_combo, state); - - } - } - - if (editor->priv->bc_page_vbox) { - gtk_widget_set_sensitive (editor->priv->bc_key_radio, merge != NULL); - if (merge == NULL) { - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(editor->priv->bc_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->bc_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->bc_key_combo, FALSE); - } else { - state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->bc_key_radio)); - gtk_widget_set_sensitive (editor->priv->bc_color_combo, !state); - gtk_widget_set_sensitive (editor->priv->bc_key_combo, state); - - } - } - - if (editor->priv->shadow_page_vbox) { - gtk_widget_set_sensitive (editor->priv->shadow_key_radio, merge != NULL); - if (merge == NULL) { - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(editor->priv->shadow_color_radio), TRUE); - gtk_widget_set_sensitive (editor->priv->shadow_color_combo, TRUE); - gtk_widget_set_sensitive (editor->priv->shadow_key_combo, FALSE); - } else { - state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->shadow_key_radio)); - gtk_widget_set_sensitive (editor->priv->shadow_color_combo, !state); - gtk_widget_set_sensitive (editor->priv->shadow_key_combo, state); - - } - } - - keys = gl_merge_get_key_list (merge); - if ( keys == NULL ) { - keys = g_list_append (keys, g_strdup ("")); - } - - combo = editor->priv->img_key_combo; - if (combo) { - gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); - } - - menu = editor->priv->edit_insert_field_menu; - if (menu) { - gl_wdgt_merge_menu_set_fields (GL_WDGT_MERGE_MENU(menu), keys); - } - - combo = editor->priv->data_key_combo; - if (combo) { - gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); - } - - combo = editor->priv->fill_key_combo; - if (combo) { - gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); - } - - combo = editor->priv->text_color_key_combo; - if (combo) { - gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); - } - - combo = editor->priv->line_key_combo; - if (combo) { - gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); - } - - combo = editor->priv->bc_key_combo; - if (combo) { - gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); - } - - combo = editor->priv->shadow_key_combo; - if (combo) { - gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); - } - - gl_merge_free_key_list (&keys); - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prefs changed callback. Update units related items. */ -/*--------------------------------------------------------------------------*/ -static void -prefs_changed_cb (glObjectEditor *editor) -{ - - gl_debug (DEBUG_EDITOR, "START"); - - if (editor->priv->lsize_r_spin) { - lsize_prefs_changed_cb (editor); - } - - if (editor->priv->size_w_spin) { - size_prefs_changed_cb (editor); - } - - if (editor->priv->pos_x_spin) { - position_prefs_changed_cb (editor); - } - - if (editor->priv->shadow_x_spin) { - shadow_prefs_changed_cb (editor); - } - - gl_debug (DEBUG_EDITOR, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -label_changed_cb (glLabel *label, - glObjectEditor *editor) -{ - gdouble label_width, label_height; - glMerge *merge; - - gl_debug (DEBUG_EDITOR, "START"); - - gl_label_get_size (label, &label_width, &label_height); - gl_object_editor_set_max_position (GL_OBJECT_EDITOR (editor), - label_width, label_height); - gl_object_editor_set_max_size (GL_OBJECT_EDITOR (editor), - label_width, label_height); - gl_object_editor_set_max_lsize (GL_OBJECT_EDITOR (editor), - label_width, label_height); - gl_object_editor_set_max_shadow_offset (GL_OBJECT_EDITOR (editor), - label_width, label_height); - - merge = gl_label_get_merge (label); - gl_object_editor_set_key_names (editor, merge); - - gl_debug (DEBUG_EDITOR, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/object-editor.h b/glabels2/src/object-editor.h deleted file mode 100644 index 71d63a31..00000000 --- a/glabels2/src/object-editor.h +++ /dev/null @@ -1,314 +0,0 @@ -/* - * object-editor.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __OBJECT_EDITOR_H__ -#define __OBJECT_EDITOR_H__ - -#include - -#include "text-node.h" -#include "label.h" -#include "merge.h" -#include "bc.h" -#include "color.h" - -G_BEGIN_DECLS - -typedef enum { - GL_OBJECT_EDITOR_EMPTY = 1, - GL_OBJECT_EDITOR_POSITION_PAGE, - GL_OBJECT_EDITOR_SIZE_PAGE, - GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE, - GL_OBJECT_EDITOR_SIZE_LINE_PAGE, - GL_OBJECT_EDITOR_FILL_PAGE, - GL_OBJECT_EDITOR_LINE_PAGE, - GL_OBJECT_EDITOR_IMAGE_PAGE, - GL_OBJECT_EDITOR_TEXT_PAGE, - GL_OBJECT_EDITOR_EDIT_PAGE, - GL_OBJECT_EDITOR_BC_PAGE, - GL_OBJECT_EDITOR_DATA_PAGE, - GL_OBJECT_EDITOR_SHADOW_PAGE, -} glObjectEditorOption; - -#define GL_TYPE_OBJECT_EDITOR (gl_object_editor_get_type ()) -#define GL_OBJECT_EDITOR(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditor)) -#define GL_OBJECT_EDITOR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass)) -#define GL_IS_OBJECT_EDITOR(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_OBJECT_EDITOR)) -#define GL_IS_OBJECT_EDITOR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_OBJECT_EDITOR)) -#define GL_OBJECT_EDITOR_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass)) - - -typedef struct _glObjectEditor glObjectEditor; -typedef struct _glObjectEditorClass glObjectEditorClass; - -typedef struct _glObjectEditorPrivate glObjectEditorPrivate; - -struct _glObjectEditor -{ - GtkVBox parent_instance; - - glObjectEditorPrivate *priv; - -}; - -struct _glObjectEditorClass -{ - GtkVBoxClass parent_class; - - void (*changed) (glObjectEditor *editor, gpointer user_data); - void (*size_changed) (glObjectEditor *editor, gpointer user_data); -}; - - - - -GType gl_object_editor_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_object_editor_new (gchar *image, - gchar *title, - glLabel *label, - glObjectEditorOption first_option, ...); - -void gl_object_editor_set_key_names (glObjectEditor *editor, - glMerge *merge); - - -/* - * Position Page - */ -void gl_object_editor_set_position (glObjectEditor *editor, - gdouble x, - gdouble y); - -void gl_object_editor_set_max_position (glObjectEditor *editor, - gdouble x_max, - gdouble y_max); - -void gl_object_editor_get_position (glObjectEditor *editor, - gdouble *x, - gdouble *y); - -/* - * Size Page - */ -void gl_object_editor_set_size (glObjectEditor *editor, - gdouble w, - gdouble h); - -void gl_object_editor_set_max_size (glObjectEditor *editor, - gdouble w_max, - gdouble h_max); - -void gl_object_editor_set_base_size (glObjectEditor *editor, - gdouble w_max, - gdouble h_max); - -void gl_object_editor_get_size (glObjectEditor *editor, - gdouble *w, - gdouble *h); - - -/* - * Line Size Page - */ -void gl_object_editor_set_lsize (glObjectEditor *editor, - gdouble dx, - gdouble dy); - -void gl_object_editor_set_max_lsize (glObjectEditor *editor, - gdouble dx_max, - gdouble dy_max); - -void gl_object_editor_get_lsize (glObjectEditor *editor, - gdouble *dx, - gdouble *dy); - - -/* - * Fill Page - */ -void gl_object_editor_set_fill_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *color_node); - -glColorNode* gl_object_editor_get_fill_color (glObjectEditor *editor); - - -/* - * Line/Outline Page - */ -void gl_object_editor_set_line_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *color_node); - -glColorNode* gl_object_editor_get_line_color (glObjectEditor *editor); - -void gl_object_editor_set_line_width (glObjectEditor *editor, - gdouble width); - -gdouble gl_object_editor_get_line_width (glObjectEditor *editor); - - -/* - * Image Page - */ -void gl_object_editor_set_image (glObjectEditor *editor, - gboolean merge_flag, - glTextNode *text_node); - -glTextNode *gl_object_editor_get_image (glObjectEditor *editor); - - -/* - * Text Page - */ -void gl_object_editor_set_font_family (glObjectEditor *editor, - const gchar *font_family); - -gchar *gl_object_editor_get_font_family (glObjectEditor *editor); - -void gl_object_editor_set_font_size (glObjectEditor *editor, - gdouble font_size); - -gdouble gl_object_editor_get_font_size (glObjectEditor *editor); - -void gl_object_editor_set_font_weight (glObjectEditor *editor, - PangoWeight font_weight); - -PangoWeight gl_object_editor_get_font_weight (glObjectEditor *editor); - -void gl_object_editor_set_font_italic_flag (glObjectEditor *editor, - gboolean font_italic_flag); - -gboolean gl_object_editor_get_font_italic_flag (glObjectEditor *editor); - -void gl_object_editor_set_text_alignment (glObjectEditor *editor, - PangoAlignment text_alignment); - -PangoAlignment gl_object_editor_get_text_alignment (glObjectEditor *editor); - -void gl_object_editor_set_text_line_spacing (glObjectEditor *editor, - gdouble text_line_spacing); - -gdouble gl_object_editor_get_text_line_spacing (glObjectEditor *editor); - -void gl_object_editor_set_text_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *text_color_node); - -glColorNode* gl_object_editor_get_text_color (glObjectEditor *editor); - -void gl_object_editor_set_text_auto_shrink (glObjectEditor *editor, - gboolean auto_shrink); - -gboolean gl_object_editor_get_text_auto_shrink (glObjectEditor *editor); - - -/* - * Edit Text Page - */ -void gl_object_editor_set_text_buffer (glObjectEditor *editor, - GtkTextBuffer *buffer); - -/* - * Barcode Page - */ -void gl_object_editor_set_bc_style (glObjectEditor *editor, - gchar *id, - gboolean text_flag, - gboolean checksum_flag, - guint format_digits); - -void gl_object_editor_get_bc_style (glObjectEditor *editor, - gchar **id, - gboolean *text_flag, - gboolean *checksum_flag, - guint *format_digits); - -void gl_object_editor_set_bc_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *color_node); - -glColorNode* gl_object_editor_get_bc_color (glObjectEditor *editor); - - -/* - * Barcode Data Page - */ -void gl_object_editor_set_data (glObjectEditor *editor, - gboolean merge_flag, - glTextNode *text_node); - -glTextNode *gl_object_editor_get_data (glObjectEditor *editor); - - -/* - * Shadow Page - */ -void gl_object_editor_set_shadow_state (glObjectEditor *editor, - gboolean state); - -void gl_object_editor_set_shadow_offset (glObjectEditor *editor, - gdouble x, - gdouble y); - -void gl_object_editor_set_shadow_color (glObjectEditor *editor, - gboolean merge_flag, - glColorNode *color_node); - -void gl_object_editor_set_shadow_opacity (glObjectEditor *editor, - gdouble alpha); - -void gl_object_editor_set_max_shadow_offset(glObjectEditor *editor, - gdouble x_max, - gdouble y_max); - - -gboolean gl_object_editor_get_shadow_state (glObjectEditor *editor); - -void gl_object_editor_get_shadow_offset (glObjectEditor *editor, - gdouble *x, - gdouble *y); - -glColorNode* gl_object_editor_get_shadow_color (glObjectEditor *editor); - -gdouble gl_object_editor_get_shadow_opacity (glObjectEditor *editor); - - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/pixbuf-cache.c b/glabels2/src/pixbuf-cache.c deleted file mode 100644 index 77b2fc59..00000000 --- a/glabels2/src/pixbuf-cache.c +++ /dev/null @@ -1,272 +0,0 @@ -/* - * pixbuf-cache.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "pixbuf-cache.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -typedef struct { - gchar *key; - guint references; - GdkPixbuf *pixbuf; -} CacheRecord; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void record_destroy (gpointer val); - -static void add_name_to_list (gpointer key, - gpointer val, - gpointer user_data); - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Destroy cache record. */ -/*---------------------------------------------------------------------------*/ -static void -record_destroy (gpointer val) -{ - CacheRecord *record = (CacheRecord *)val; - - g_return_if_fail (record); - - g_free (record->key); - g_object_unref (record->pixbuf); - g_free (record); -} - - -/*****************************************************************************/ -/* Create a new hash table to keep track of cached pixbufs. */ -/*****************************************************************************/ -GHashTable * -gl_pixbuf_cache_new (void) -{ - GHashTable *pixbuf_cache; - - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - pixbuf_cache = g_hash_table_new_full (g_str_hash, - g_str_equal, - NULL, - record_destroy); - - gl_debug (DEBUG_PIXBUF_CACHE, "END pixbuf_cache=%p", pixbuf_cache); - - return pixbuf_cache; -} - - -/*****************************************************************************/ -/* Free up previously allocated hash table and its contents. */ -/*****************************************************************************/ -void -gl_pixbuf_cache_free (GHashTable *pixbuf_cache) -{ - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - g_hash_table_destroy (pixbuf_cache); - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); -} - - -/*****************************************************************************/ -/* Add pixbuf to cache explicitly (not a reference). */ -/*****************************************************************************/ -void -gl_pixbuf_cache_add_pixbuf (GHashTable *pixbuf_cache, - gchar *name, - GdkPixbuf *pixbuf) -{ - CacheRecord *test_record, *record; - - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - test_record = g_hash_table_lookup (pixbuf_cache, name); - if (test_record != NULL) { - /* pixbuf is already in the cache. */ - gl_debug (DEBUG_PIXBUF_CACHE, "END already in cache"); - return; - } - - record = g_new0 (CacheRecord, 1); - record->key = g_strdup (name); - record->references = 0; /* Nobody has referenced it yet. */ - record->pixbuf = g_object_ref (G_OBJECT (pixbuf)); - - g_hash_table_insert (pixbuf_cache, record->key, record); - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); -} - - -/*****************************************************************************/ -/* Get pixbuf. If not in cache, read it and add to cache. */ -/*****************************************************************************/ -GdkPixbuf * -gl_pixbuf_cache_get_pixbuf (GHashTable *pixbuf_cache, - gchar *name) -{ - CacheRecord *record; - GdkPixbuf *pixbuf; - - gl_debug (DEBUG_PIXBUF_CACHE, "START pixbuf_cache=%p", pixbuf_cache); - - record = g_hash_table_lookup (pixbuf_cache, name); - - if (record != NULL) { - record->references++; - gl_debug (DEBUG_PIXBUF_CACHE, "references=%d", record->references); - gl_debug (DEBUG_PIXBUF_CACHE, "END cached"); - return record->pixbuf; - } - - - pixbuf = gdk_pixbuf_new_from_file (name, NULL); - if ( pixbuf != NULL) { - record = g_new0 (CacheRecord, 1); - record->key = g_strdup (name); - record->references = 1; - record->pixbuf = pixbuf; - - g_hash_table_insert (pixbuf_cache, record->key, record); - } - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); - - return pixbuf; -} - - -/*****************************************************************************/ -/* Remove pixbuf, but only if no references left. */ -/*****************************************************************************/ -void -gl_pixbuf_cache_remove_pixbuf (GHashTable *pixbuf_cache, - gchar *name) -{ - CacheRecord *record; - - if (name == NULL) return; - - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - record = g_hash_table_lookup (pixbuf_cache, name); - if (record == NULL) { - gl_debug (DEBUG_PIXBUF_CACHE, "END not in cache"); - return; - } - - record->references--; - - if ( record->references == 0 ) { - g_hash_table_remove (pixbuf_cache, name); - } - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Add a name to a GList while iterating over cache. */ -/*---------------------------------------------------------------------------*/ -static void -add_name_to_list (gpointer key, - gpointer val, - gpointer user_data) -{ - gchar *name = (gchar *)key; - GList **name_list = (GList **)user_data; - - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - gl_debug (DEBUG_PIXBUF_CACHE, "adding name=%s", name); - - *name_list = g_list_append (*name_list, g_strdup(name)); - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); -} - - -/*****************************************************************************/ -/* Return a list of names for all pixbufs in the cache. */ -/*****************************************************************************/ -GList * -gl_pixbuf_cache_get_name_list (GHashTable *pixbuf_cache) -{ - GList *name_list = NULL; - - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - g_hash_table_foreach (pixbuf_cache, add_name_to_list, &name_list); - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); - - return name_list; -} - - -/*****************************************************************************/ -/* Free up a list of pixbuf names. */ -/*****************************************************************************/ -void -gl_pixbuf_cache_free_name_list (GList *name_list) -{ - GList *p_name; - - gl_debug (DEBUG_PIXBUF_CACHE, "START"); - - for (p_name = name_list; p_name != NULL; p_name = p_name->next) { - g_free (p_name->data); - p_name->data = NULL; - } - - g_list_free (name_list); - - gl_debug (DEBUG_PIXBUF_CACHE, "END"); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/pixbuf-cache.h b/glabels2/src/pixbuf-cache.h deleted file mode 100644 index 333e5c82..00000000 --- a/glabels2/src/pixbuf-cache.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * pixbuf-cache.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __PIXBUF_CACHE_H__ -#define __PIXBUF_CACHE_H__ - -#include -#include - -G_BEGIN_DECLS - -GHashTable *gl_pixbuf_cache_new (void); - -void gl_pixbuf_cache_free (GHashTable *pixbuf_cache); - -void gl_pixbuf_cache_add_pixbuf (GHashTable *pixbuf_cache, - gchar *name, - GdkPixbuf *pixbuf); - -GdkPixbuf *gl_pixbuf_cache_get_pixbuf (GHashTable *pixbuf_cache, - gchar *name); - -void gl_pixbuf_cache_remove_pixbuf (GHashTable *pixbuf_cache, - gchar *name); - -GList *gl_pixbuf_cache_get_name_list (GHashTable *pixbuf_cache); - -void gl_pixbuf_cache_free_name_list (GList *name_list); - -G_END_DECLS - -#endif /*__PIXBUF_CACHE_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/pixmaps/Makefile.am b/glabels2/src/pixmaps/Makefile.am deleted file mode 100644 index 5b192860..00000000 --- a/glabels2/src/pixmaps/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ - -EXTRA_DIST = \ - 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 - diff --git a/glabels2/src/pixmaps/checkerboard.xpm b/glabels2/src/pixmaps/checkerboard.xpm deleted file mode 100644 index 33ab7b57..00000000 --- a/glabels2/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/glabels2/src/pixmaps/collate.xpm b/glabels2/src/pixmaps/collate.xpm deleted file mode 100644 index a781151a..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_barcode.xbm b/glabels2/src/pixmaps/cursor_barcode.xbm deleted file mode 100644 index 6e8d1d62..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_barcode_mask.xbm b/glabels2/src/pixmaps/cursor_barcode_mask.xbm deleted file mode 100644 index 52ed3ba2..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_box.xbm b/glabels2/src/pixmaps/cursor_box.xbm deleted file mode 100644 index 48ae4ea2..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_box_mask.xbm b/glabels2/src/pixmaps/cursor_box_mask.xbm deleted file mode 100644 index b41e0559..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_ellipse.xbm b/glabels2/src/pixmaps/cursor_ellipse.xbm deleted file mode 100644 index 946af9ac..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_ellipse_mask.xbm b/glabels2/src/pixmaps/cursor_ellipse_mask.xbm deleted file mode 100644 index 22fb5442..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_image.xbm b/glabels2/src/pixmaps/cursor_image.xbm deleted file mode 100644 index 32308360..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_image_mask.xbm b/glabels2/src/pixmaps/cursor_image_mask.xbm deleted file mode 100644 index 9c79e82e..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_line.xbm b/glabels2/src/pixmaps/cursor_line.xbm deleted file mode 100644 index f5e2636e..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_line_mask.xbm b/glabels2/src/pixmaps/cursor_line_mask.xbm deleted file mode 100644 index a9359d55..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_text.xbm b/glabels2/src/pixmaps/cursor_text.xbm deleted file mode 100644 index 4378c1a6..00000000 --- a/glabels2/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/glabels2/src/pixmaps/cursor_text_mask.xbm b/glabels2/src/pixmaps/cursor_text_mask.xbm deleted file mode 100644 index 543c2b7f..00000000 --- a/glabels2/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/glabels2/src/pixmaps/nocollate.xpm b/glabels2/src/pixmaps/nocollate.xpm deleted file mode 100644 index a67cc13c..00000000 --- a/glabels2/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/glabels2/src/prefs-dialog.c b/glabels2/src/prefs-dialog.c deleted file mode 100644 index c2d44e1c..00000000 --- a/glabels2/src/prefs-dialog.c +++ /dev/null @@ -1,690 +0,0 @@ -/* - * prefs-dialog.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "prefs-dialog.h" - -#include -#include - -#include "prefs.h" -#include "hig.h" -#include "color-combo.h" -#include "color.h" -#include "font-combo.h" -#include "font-util.h" -#include "builder-util.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - -#define US_LETTER_ID "US-Letter" -#define A4_ID "A4" - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glPrefsDialogPrivate -{ - GtkBuilder *builder; - - /* Units properties */ - GtkWidget *units_points_radio; - GtkWidget *units_inches_radio; - GtkWidget *units_mm_radio; - - /* Page size properties */ - GtkWidget *page_size_us_letter_radio; - GtkWidget *page_size_a4_radio; - - /* Default text properties */ - GtkWidget *text_family_hbox; - GtkWidget *text_family_combo; - GtkWidget *text_size_spin; - GtkWidget *text_bold_toggle; - GtkWidget *text_italic_toggle; - GtkWidget *text_color_hbox; - GtkWidget *text_color_combo; - GtkWidget *text_left_toggle; - GtkWidget *text_center_toggle; - GtkWidget *text_right_toggle; - GtkWidget *text_line_spacing_spin; - - /* Default line properties */ - GtkWidget *line_width_spin; - GtkWidget *line_color_hbox; - GtkWidget *line_color_combo; - - /* Default fill properties */ - GtkWidget *fill_color_hbox; - GtkWidget *fill_color_combo; - - /* Prevent recursion */ - gboolean stop_signals; -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_prefs_dialog_finalize (GObject *object); -static void gl_prefs_dialog_construct (glPrefsDialog *dialog); - -static void response_cb (glPrefsDialog *dialog, - gint response, - gpointer user_data); - -static void construct_locale_page (glPrefsDialog *dialog); -static void construct_object_page (glPrefsDialog *dialog); - -static void align_toggle_cb (GtkToggleButton *toggle, - glPrefsDialog *dialog); - -static void update_locale_page_from_prefs (glPrefsDialog *dialog); -static void update_object_page_from_prefs (glPrefsDialog *dialog); - -static void update_prefs_from_locale_page (glPrefsDialog *dialog); -static void update_prefs_from_object_page (glPrefsDialog *dialog); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glPrefsDialog, gl_prefs_dialog, GTK_TYPE_DIALOG); - - -static void -gl_prefs_dialog_class_init (glPrefsDialogClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_PREFS, ""); - - gl_prefs_dialog_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_prefs_dialog_finalize; -} - - -static void -gl_prefs_dialog_init (glPrefsDialog *dialog) -{ - static gchar *object_ids[] = { "prefs_notebook", - "adjustment1", "adjustment2", "adjustment3", - NULL }; - GError *error = NULL; - - gl_debug (DEBUG_PREFS, "START"); - - dialog->priv = g_new0 (glPrefsDialogPrivate, 1); - - dialog->priv->builder = gtk_builder_new (); - gtk_builder_add_objects_from_file (dialog->priv->builder, - GLABELS_BUILDER_DIR "prefs-dialog.builder", - object_ids, - &error); - if (error) { - g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); - g_error_free (error); - return; - } - - gtk_container_set_border_width (GTK_CONTAINER(dialog), GL_HIG_PAD2); - - gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE); - gtk_dialog_add_button (GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); - - g_signal_connect(G_OBJECT (dialog), "response", - G_CALLBACK (response_cb), NULL); - - gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); - gtk_window_set_title (GTK_WINDOW (dialog), _("gLabels Preferences")); - gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); - - gl_debug (DEBUG_PREFS, "END"); -} - - -static void -gl_prefs_dialog_finalize (GObject *object) -{ - glPrefsDialog* dialog = GL_PREFS_DIALOG (object); - - gl_debug (DEBUG_PREFS, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PREFS_DIALOG (dialog)); - g_return_if_fail (dialog->priv != NULL); - - if (dialog->priv->builder) - { - g_object_unref (G_OBJECT (dialog->priv->builder)); - } - g_free (dialog->priv); - - G_OBJECT_CLASS (gl_prefs_dialog_parent_class)->finalize (object); - - gl_debug (DEBUG_PREFS, "END"); -} - - -/*****************************************************************************/ -/* NEW preferences dialog. */ -/*****************************************************************************/ -GtkWidget* -gl_prefs_dialog_new (GtkWindow *parent) -{ - GtkWidget *dialog; - - gl_debug (DEBUG_PREFS, "START"); - gl_debug (DEBUG_PREFS, "page size = \"%s\"", gl_prefs->default_page_size); - - dialog = GTK_WIDGET (g_object_new (GL_TYPE_PREFS_DIALOG, NULL)); - - if (parent) - gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); - - gl_prefs_dialog_construct (GL_PREFS_DIALOG(dialog)); - - - gl_debug (DEBUG_PREFS, "END"); - - return dialog; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Construct composite widget. */ -/*---------------------------------------------------------------------------*/ -static void -gl_prefs_dialog_construct (glPrefsDialog *dialog) -{ - GtkWidget *notebook; - - g_return_if_fail (GL_IS_PREFS_DIALOG (dialog)); - g_return_if_fail (dialog->priv != NULL); - - gl_builder_util_get_widgets (dialog->priv->builder, - "prefs_notebook", ¬ebook, - NULL); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook, FALSE, FALSE, 0); - - construct_locale_page (dialog); - construct_object_page (dialog); - - update_locale_page_from_prefs (dialog); - update_object_page_from_prefs (dialog); - - gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. "Response" callback. */ -/*---------------------------------------------------------------------------*/ -static void -response_cb (glPrefsDialog *dialog, - gint response, - gpointer user_data) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail(dialog != NULL); - g_return_if_fail(GTK_IS_DIALOG(dialog)); - - switch(response) { - case GTK_RESPONSE_CLOSE: - gtk_widget_hide (GTK_WIDGET(dialog)); - break; - case GTK_RESPONSE_DELETE_EVENT: - break; - default: - g_print ("response = %d", response); - g_assert_not_reached (); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Build Locale Properties Notebook Tab */ -/*--------------------------------------------------------------------------*/ -static void -construct_locale_page (glPrefsDialog *dialog) -{ - - gl_builder_util_get_widgets (dialog->priv->builder, - "units_points_radio", &dialog->priv->units_points_radio, - "units_inches_radio", &dialog->priv->units_inches_radio, - "units_mm_radio", &dialog->priv->units_mm_radio, - "page_size_us_letter_radio", &dialog->priv->page_size_us_letter_radio, - "page_size_a4_radio", &dialog->priv->page_size_a4_radio, - NULL); - - g_signal_connect_swapped ( - G_OBJECT(dialog->priv->units_points_radio), - "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); - g_signal_connect_swapped ( - G_OBJECT(dialog->priv->units_inches_radio), - "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); - g_signal_connect_swapped ( - G_OBJECT(dialog->priv->units_mm_radio), - "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); - g_signal_connect_swapped ( - G_OBJECT(dialog->priv->page_size_us_letter_radio), - "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); - g_signal_connect_swapped ( - G_OBJECT(dialog->priv->page_size_a4_radio), - "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Build Default Object Properties Notebook Tab */ -/*--------------------------------------------------------------------------*/ -static void -construct_object_page (glPrefsDialog *dialog) -{ - gl_builder_util_get_widgets (dialog->priv->builder, - "text_family_hbox", &dialog->priv->text_family_hbox, - "text_size_spin", &dialog->priv->text_size_spin, - "text_bold_toggle", &dialog->priv->text_bold_toggle, - "text_italic_toggle", &dialog->priv->text_italic_toggle, - "text_color_hbox", &dialog->priv->text_color_hbox, - "text_left_toggle", &dialog->priv->text_left_toggle, - "text_center_toggle", &dialog->priv->text_center_toggle, - "text_right_toggle", &dialog->priv->text_right_toggle, - "text_line_spacing_spin", &dialog->priv->text_line_spacing_spin, - "line_width_spin", &dialog->priv->line_width_spin, - "line_color_hbox", &dialog->priv->line_color_hbox, - "fill_color_hbox", &dialog->priv->fill_color_hbox, - NULL); - - dialog->priv->text_family_combo = gl_font_combo_new ("Sans"); - - dialog->priv->text_color_combo = gl_color_combo_new (_("Default"), - GL_COLOR_TEXT_DEFAULT, - gl_prefs->default_text_color); - dialog->priv->line_color_combo = gl_color_combo_new (_("No Line"), - GL_COLOR_NO_LINE, - gl_prefs->default_line_color); - dialog->priv->fill_color_combo = gl_color_combo_new (_("No Fill"), - GL_COLOR_NO_FILL, - gl_prefs->default_fill_color); - - gtk_box_pack_start (GTK_BOX (dialog->priv->text_family_hbox), - dialog->priv->text_family_combo, - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (dialog->priv->text_color_hbox), - dialog->priv->text_color_combo, - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (dialog->priv->line_color_hbox), - dialog->priv->line_color_combo, - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (dialog->priv->fill_color_hbox), - dialog->priv->fill_color_combo, - FALSE, FALSE, 0); - - g_signal_connect_swapped (G_OBJECT(dialog->priv->text_family_combo), - "changed", - G_CALLBACK(update_prefs_from_object_page), - G_OBJECT(dialog)); - g_signal_connect_swapped (G_OBJECT(dialog->priv->text_size_spin), - "changed", - G_CALLBACK(update_prefs_from_object_page), - G_OBJECT(dialog)); - g_signal_connect_swapped (G_OBJECT(dialog->priv->text_bold_toggle), - "toggled", - G_CALLBACK(update_prefs_from_object_page), - G_OBJECT(dialog)); - g_signal_connect_swapped (G_OBJECT(dialog->priv->text_italic_toggle), - "toggled", - G_CALLBACK(update_prefs_from_object_page), - G_OBJECT(dialog)); - g_signal_connect_swapped (G_OBJECT(dialog->priv->text_color_combo), - "color_changed", - G_CALLBACK(update_prefs_from_object_page), - G_OBJECT(dialog)); - - g_signal_connect (G_OBJECT(dialog->priv->text_left_toggle), - "toggled", - G_CALLBACK(align_toggle_cb), - G_OBJECT(dialog)); - g_signal_connect (G_OBJECT(dialog->priv->text_center_toggle), - "toggled", - G_CALLBACK(align_toggle_cb), - G_OBJECT(dialog)); - g_signal_connect (G_OBJECT(dialog->priv->text_right_toggle), - "toggled", - G_CALLBACK(align_toggle_cb), - G_OBJECT(dialog)); - - g_signal_connect_swapped (G_OBJECT(dialog->priv->text_line_spacing_spin), - "changed", - G_CALLBACK(update_prefs_from_object_page), - G_OBJECT(dialog)); - - g_signal_connect_swapped (G_OBJECT(dialog->priv->line_width_spin), - "changed", - G_CALLBACK(update_prefs_from_object_page), - G_OBJECT(dialog)); - g_signal_connect_swapped (G_OBJECT(dialog->priv->line_color_combo), - "color_changed", - G_CALLBACK(update_prefs_from_object_page), - G_OBJECT(dialog)); - - g_signal_connect_swapped (G_OBJECT(dialog->priv->fill_color_combo), - "color_changed", - G_CALLBACK(update_prefs_from_object_page), - G_OBJECT(dialog)); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Alignment togglebutton callback. */ -/*--------------------------------------------------------------------------*/ -static void -align_toggle_cb (GtkToggleButton *toggle, - glPrefsDialog *dialog) -{ - if (gtk_toggle_button_get_active (toggle)) - { - - if (GTK_WIDGET (toggle) == GTK_WIDGET (dialog->priv->text_left_toggle)) - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (dialog->priv->text_center_toggle), - FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (dialog->priv->text_right_toggle), - FALSE); - } - else if (GTK_WIDGET (toggle) == GTK_WIDGET (dialog->priv->text_center_toggle)) - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (dialog->priv->text_left_toggle), - FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (dialog->priv->text_right_toggle), - FALSE); - } - else if (GTK_WIDGET (toggle) == GTK_WIDGET (dialog->priv->text_right_toggle)) - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (dialog->priv->text_left_toggle), - FALSE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (dialog->priv->text_center_toggle), - FALSE); - } - - update_prefs_from_object_page (dialog); - } - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update locale page widgets from current prefs. */ -/*--------------------------------------------------------------------------*/ -static void -update_locale_page_from_prefs (glPrefsDialog *dialog) -{ - dialog->priv->stop_signals = TRUE; - - switch (gl_prefs->units) { - case LGL_UNITS_POINT: - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(dialog->priv->units_points_radio), - TRUE); - break; - case LGL_UNITS_INCH: - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(dialog->priv->units_inches_radio), - TRUE); - break; - case LGL_UNITS_MM: - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(dialog->priv->units_mm_radio), - TRUE); - break; - default: - g_message ("Illegal units"); /* Should not happen */ - break; - } - - if ( g_ascii_strcasecmp(gl_prefs->default_page_size, US_LETTER_ID) == 0) - { - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(dialog->priv->page_size_us_letter_radio), TRUE); - } - else if ( g_ascii_strcasecmp(gl_prefs->default_page_size, A4_ID) == 0) - { - gtk_toggle_button_set_active ( - GTK_TOGGLE_BUTTON(dialog->priv->page_size_a4_radio), TRUE); - } - else - { - g_message ("Unknown default page size"); /* Shouldn't happen */ - } - - dialog->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update object page widgets from current prefs. */ -/*--------------------------------------------------------------------------*/ -static void -update_object_page_from_prefs (glPrefsDialog *dialog) -{ - - dialog->priv->stop_signals = TRUE; - - gl_font_combo_set_family (GL_FONT_COMBO (dialog->priv->text_family_combo), - gl_prefs->default_font_family); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->priv->text_size_spin), - gl_prefs->default_font_size); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_bold_toggle), - (gl_prefs->default_font_weight == PANGO_WEIGHT_BOLD)); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_italic_toggle), - gl_prefs->default_font_italic_flag); - - gl_color_combo_set_color (GL_COLOR_COMBO(dialog->priv->text_color_combo), - gl_prefs->default_text_color); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_left_toggle), - (gl_prefs->default_text_alignment == GTK_JUSTIFY_LEFT)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_center_toggle), - (gl_prefs->default_text_alignment == GTK_JUSTIFY_CENTER)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_right_toggle), - (gl_prefs->default_text_alignment == GTK_JUSTIFY_RIGHT)); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->priv->text_line_spacing_spin), - gl_prefs->default_text_line_spacing); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->priv->line_width_spin), - gl_prefs->default_line_width); - - gl_color_combo_set_color (GL_COLOR_COMBO(dialog->priv->line_color_combo), - gl_prefs->default_line_color); - - - gl_color_combo_set_color (GL_COLOR_COMBO(dialog->priv->fill_color_combo), - gl_prefs->default_fill_color); - - - dialog->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update prefs from current state of locale page widgets. */ -/*--------------------------------------------------------------------------*/ -static void -update_prefs_from_locale_page (glPrefsDialog *dialog) -{ - if (dialog->priv->stop_signals) return; - - if (gtk_toggle_button_get_active ( - GTK_TOGGLE_BUTTON(dialog->priv->units_points_radio))) - { - gl_prefs->units = LGL_UNITS_POINT; - } - if (gtk_toggle_button_get_active ( - GTK_TOGGLE_BUTTON(dialog->priv->units_inches_radio))) - { - gl_prefs->units = LGL_UNITS_INCH; - } - if (gtk_toggle_button_get_active ( - GTK_TOGGLE_BUTTON(dialog->priv->units_mm_radio))) - { - gl_prefs->units = LGL_UNITS_MM; - } - - if (gtk_toggle_button_get_active ( - GTK_TOGGLE_BUTTON(dialog->priv->page_size_us_letter_radio))) - { - g_free (gl_prefs->default_page_size); - gl_prefs->default_page_size = g_strdup (US_LETTER_ID); - } - if (gtk_toggle_button_get_active ( - GTK_TOGGLE_BUTTON(dialog->priv->page_size_a4_radio))) - { - g_free (gl_prefs->default_page_size); - gl_prefs->default_page_size = g_strdup (A4_ID); - } - - gl_prefs_model_save_settings (gl_prefs); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Update prefs from current state of object page widgets. */ -/*--------------------------------------------------------------------------*/ -static void -update_prefs_from_object_page (glPrefsDialog *dialog) -{ - guint color; - gboolean is_default; - - if (dialog->priv->stop_signals) return; - - g_free (gl_prefs->default_font_family); - gl_prefs->default_font_family = - gl_font_combo_get_family (GL_FONT_COMBO (dialog->priv->text_family_combo)); - gl_prefs->default_font_size = - gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->text_size_spin)); - - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (dialog->priv->text_bold_toggle))) - { - gl_prefs->default_font_weight = PANGO_WEIGHT_BOLD; - } - else - { - gl_prefs->default_font_weight = PANGO_WEIGHT_NORMAL; - } - - gl_prefs->default_font_italic_flag = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (dialog->priv->text_italic_toggle)); - - color = gl_color_combo_get_color (GL_COLOR_COMBO(dialog->priv->text_color_combo), - &is_default); - if (!is_default) - { - gl_prefs->default_text_color = color; - } - - if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (dialog->priv->text_left_toggle))) - { - gl_prefs->default_text_alignment = GTK_JUSTIFY_LEFT; - } - else if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (dialog->priv->text_right_toggle))) - { - gl_prefs->default_text_alignment = GTK_JUSTIFY_RIGHT; - } - else if (gtk_toggle_button_get_active - (GTK_TOGGLE_BUTTON (dialog->priv->text_center_toggle))) - { - gl_prefs->default_text_alignment = GTK_JUSTIFY_CENTER; - } - else - { - /* Should not happen. */ - gl_prefs->default_text_alignment = GTK_JUSTIFY_LEFT; - } - - - gl_prefs->default_text_line_spacing = - gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->text_line_spacing_spin)); - - gl_prefs->default_line_width = - gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->line_width_spin)); - - color = gl_color_combo_get_color (GL_COLOR_COMBO(dialog->priv->line_color_combo), - &is_default); - if (!is_default) - { - gl_prefs->default_line_color = color; - } - - - color = gl_color_combo_get_color (GL_COLOR_COMBO(dialog->priv->fill_color_combo), - &is_default); - if (!is_default) - { - gl_prefs->default_fill_color = color; - } - - gl_prefs_model_save_settings (gl_prefs); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/prefs-dialog.h b/glabels2/src/prefs-dialog.h deleted file mode 100644 index 86b11042..00000000 --- a/glabels2/src/prefs-dialog.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * prefs-dialog.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __PREFS_DIALOG_H__ -#define __PREFS_DIALOG_H__ - -#include - -G_BEGIN_DECLS - -#define GL_TYPE_PREFS_DIALOG (gl_prefs_dialog_get_type ()) -#define GL_PREFS_DIALOG(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PREFS_DIALOG, glPrefsDialog)) -#define GL_PREFS_DIALOG_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PREFS_DIALOG, glPrefsDialogClass)) -#define GL_IS_PREFS_DIALOG(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PREFS_DIALOG)) -#define GL_IS_PREFS_DIALOG_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PREFS_DIALOG)) -#define GL_PREFS_DIALOG_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_PREFS_DIALOG, glPrefsDialogClass)) - - -typedef struct _glPrefsDialog glPrefsDialog; -typedef struct _glPrefsDialogClass glPrefsDialogClass; - -typedef struct _glPrefsDialogPrivate glPrefsDialogPrivate; - -struct _glPrefsDialog -{ - GtkDialog parent_instance; - - glPrefsDialogPrivate *priv; - -}; - -struct _glPrefsDialogClass -{ - GtkDialogClass parent_class; -}; - -GType gl_prefs_dialog_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_prefs_dialog_new (GtkWindow *parent); - -G_END_DECLS - -#endif /* __PREFS_DIALOG_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/prefs-model.c b/glabels2/src/prefs-model.c deleted file mode 100644 index 1ec1c0bd..00000000 --- a/glabels2/src/prefs-model.c +++ /dev/null @@ -1,741 +0,0 @@ -/* - * prefs-model.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "prefs-model.h" - -#include -#include -#include - -#include -#include "marshal.h" -#include "str-util.h" -#include "color.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - -/* GConf keys */ -#define BASE_KEY "/apps/glabels" - -#define PREF_UNITS "/units" -#define PREF_DEFAULT_PAGE_SIZE "/default-page-size" - -#define PREF_DEFAULT_FONT_FAMILY "/default-font-family" -#define PREF_DEFAULT_FONT_SIZE "/default-font-size" -#define PREF_DEFAULT_FONT_WEIGHT "/default-font-weight" -#define PREF_DEFAULT_FONT_ITALIC_FLAG "/default-font-italic-flag" -#define PREF_DEFAULT_TEXT_COLOR "/default-text-color" -#define PREF_DEFAULT_TEXT_ALIGNMENT "/default-text-alignment" -#define PREF_DEFAULT_TEXT_LINE_SPACING "/default-text-line-spacing" - -#define PREF_DEFAULT_LINE_WIDTH "/default-line-width" -#define PREF_DEFAULT_LINE_COLOR "/default-line-color" - -#define PREF_DEFAULT_FILL_COLOR "/default-fill-color" - -#define PREF_MAIN_TOOLBAR_VISIBLE "/main-toolbar-visible" -#define PREF_MAIN_TOOLBAR_BUTTONS_STYLE "/main-toolbar-buttons-style" - -#define PREF_DRAWING_TOOLBAR_VISIBLE "/drawing-toolbar-visible" - -#define PREF_PROPERTY_TOOLBAR_VISIBLE "/property-toolbar-visible" - -#define PREF_GRID_VISIBLE "/grid-visible" -#define PREF_MARKUP_VISIBLE "/markup-visible" - -#define PREF_MAX_RECENTS "/max-recents" - -#define PREF_RECENT_TEMPLATES "/recent-templates" -#define PREF_MAX_RECENT_TEMPLATES "/max-recent-templates" - -/* Default values */ -#define DEFAULT_UNITS_STRING_US units_to_string (LGL_UNITS_INCH) -#define DEFAULT_PAGE_SIZE_US "US-Letter" - -#define DEFAULT_UNITS_STRING_METRIC units_to_string (LGL_UNITS_MM) -#define DEFAULT_PAGE_SIZE_METRIC "A4" - -#define DEFAULT_FONT_FAMILY "Sans" -#define DEFAULT_FONT_SIZE 14.0 -#define DEFAULT_FONT_WEIGHT_STRING gl_str_util_weight_to_string (PANGO_WEIGHT_NORMAL) -#define DEFAULT_FONT_ITALIC_FLAG FALSE -#define DEFAULT_TEXT_ALIGN_STRING gl_str_util_align_to_string (PANGO_ALIGN_LEFT) -#define DEFAULT_TEXT_COLOR GL_COLOR (0,0,0) -#define DEFAULT_TEXT_LINE_SPACING 1.0 - -#define DEFAULT_LINE_WIDTH 1.0 -#define DEFAULT_LINE_COLOR GL_COLOR_A (0, 0, 0, 255) - -#define DEFAULT_FILL_COLOR GL_COLOR_A (0, 255, 0, 255) - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -enum { - CHANGED, - LAST_SIGNAL -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - -static guint signals[LAST_SIGNAL] = {0}; - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_prefs_model_finalize (GObject *object); - -static void notify_cb (GConfClient *client, - guint cnxn_id, - GConfEntry *entry, - glPrefsModel *prefs_model); - -static gchar *get_string (GConfClient *client, - const gchar *key, - const gchar *def); - -static gboolean get_bool (GConfClient *client, - const gchar *key, - gboolean def); - -static gint get_int (GConfClient *client, - const gchar *key, - gint def); - -static gdouble get_float (GConfClient *client, - const gchar *key, - gdouble def); - -static lglUnitsType string_to_units (const gchar *string); -static const gchar *units_to_string (lglUnitsType units); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glPrefsModel, gl_prefs_model, G_TYPE_OBJECT); - - -static void -gl_prefs_model_class_init (glPrefsModelClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_PREFS, "START"); - - gl_prefs_model_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_prefs_model_finalize; - - signals[CHANGED] = - g_signal_new ("changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glPrefsModelClass, changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - gl_debug (DEBUG_PREFS, "END"); -} - - -static void -gl_prefs_model_init (glPrefsModel *prefs_model) -{ - gl_debug (DEBUG_PREFS, "START"); - - prefs_model->gconf_client = gconf_client_get_default (); - - g_return_if_fail (prefs_model->gconf_client != NULL); - - gconf_client_add_dir (prefs_model->gconf_client, - BASE_KEY, - GCONF_CLIENT_PRELOAD_ONELEVEL, - NULL); - - gconf_client_notify_add (prefs_model->gconf_client, - BASE_KEY, - (GConfClientNotifyFunc)notify_cb, prefs_model, - NULL, NULL); - - gl_debug (DEBUG_PREFS, "END"); -} - - -static void -gl_prefs_model_finalize (GObject *object) -{ - glPrefsModel *prefs_model = GL_PREFS_MODEL (object); - - gl_debug (DEBUG_PREFS, "START"); - - g_return_if_fail (object && GL_IS_PREFS_MODEL (object)); - - g_object_unref (G_OBJECT(prefs_model->gconf_client)); - g_free (prefs_model->default_page_size); - g_free (prefs_model->default_font_family); - - G_OBJECT_CLASS (gl_prefs_model_parent_class)->finalize (object); - - gl_debug (DEBUG_PREFS, "END"); -} - - -/*****************************************************************************/ -/* New prefs_model object. */ -/*****************************************************************************/ -glPrefsModel * -gl_prefs_model_new (void) -{ - glPrefsModel *prefs_model; - - gl_debug (DEBUG_PREFS, "START"); - - prefs_model = GL_PREFS_MODEL (g_object_new (gl_prefs_model_get_type(), NULL)); - - gl_debug (DEBUG_PREFS, "END"); - - return prefs_model; -} - - -/*****************************************************************************/ -/* Save all settings. */ -/*****************************************************************************/ -void -gl_prefs_model_save_settings (glPrefsModel *prefs_model) -{ - gl_debug (DEBUG_PREFS, "START"); - - g_return_if_fail (prefs_model && GL_IS_PREFS_MODEL(prefs_model)); - g_return_if_fail (prefs_model->gconf_client != NULL); - - /* We are saving settings because presumably some of them have been changed. */ - g_signal_emit (G_OBJECT(prefs_model), signals[CHANGED], 0); - - /* Units */ - gconf_client_set_string (prefs_model->gconf_client, - BASE_KEY PREF_UNITS, - units_to_string(prefs_model->units), - NULL); - lgl_xml_set_default_units (prefs_model->units); - - /* Default page size */ - gconf_client_set_string (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_PAGE_SIZE, - prefs_model->default_page_size, - NULL); - - - /* Text properties */ - gconf_client_set_string (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_FONT_FAMILY, - prefs_model->default_font_family, - NULL); - - gconf_client_set_float (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_FONT_SIZE, - prefs_model->default_font_size, - NULL); - - gconf_client_set_string (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_FONT_WEIGHT, - gl_str_util_weight_to_string(prefs_model->default_font_weight), - NULL); - - gconf_client_set_int (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_TEXT_COLOR, - prefs_model->default_text_color, - NULL); - - gconf_client_set_string (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_TEXT_ALIGNMENT, - gl_str_util_align_to_string(prefs_model->default_text_alignment), - NULL); - - gconf_client_set_float (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_TEXT_LINE_SPACING, - prefs_model->default_text_line_spacing, - NULL); - - /* Line properties */ - gconf_client_set_float (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_LINE_WIDTH, - prefs_model->default_line_width, - NULL); - - gconf_client_set_int (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_LINE_COLOR, - prefs_model->default_line_color, - NULL); - - - /* Fill properties */ - gconf_client_set_int (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_FILL_COLOR, - prefs_model->default_fill_color, - NULL); - - - /* Main Toolbar */ - gconf_client_set_bool (prefs_model->gconf_client, - BASE_KEY PREF_MAIN_TOOLBAR_VISIBLE, - prefs_model->main_toolbar_visible, - NULL); - - gconf_client_set_int (prefs_model->gconf_client, - BASE_KEY PREF_MAIN_TOOLBAR_BUTTONS_STYLE, - prefs_model->main_toolbar_buttons_style, - NULL); - - /* Drawing Toolbar */ - gconf_client_set_bool (prefs_model->gconf_client, - BASE_KEY PREF_DRAWING_TOOLBAR_VISIBLE, - prefs_model->drawing_toolbar_visible, - NULL); - - /* Property Toolbar */ - gconf_client_set_bool (prefs_model->gconf_client, - BASE_KEY PREF_PROPERTY_TOOLBAR_VISIBLE, - prefs_model->property_toolbar_visible, - NULL); - - /* View properties */ - gconf_client_set_bool (prefs_model->gconf_client, - BASE_KEY PREF_GRID_VISIBLE, - prefs_model->grid_visible, - NULL); - - gconf_client_set_bool (prefs_model->gconf_client, - BASE_KEY PREF_MARKUP_VISIBLE, - prefs_model->markup_visible, - NULL); - - /* Recent files */ - gconf_client_set_int (prefs_model->gconf_client, - BASE_KEY PREF_MAX_RECENTS, - prefs_model->max_recents, - NULL); - - /* Recent templates */ - gconf_client_set_list (prefs_model->gconf_client, - BASE_KEY PREF_RECENT_TEMPLATES, - GCONF_VALUE_STRING, - prefs_model->recent_templates, - NULL); - gconf_client_set_int (prefs_model->gconf_client, - BASE_KEY PREF_MAX_RECENT_TEMPLATES, - prefs_model->max_recent_templates, - NULL); - - - gconf_client_suggest_sync (prefs_model->gconf_client, NULL); - - gl_debug (DEBUG_PREFS, "END"); -} - - -/*****************************************************************************/ -/* Load all settings. */ -/*****************************************************************************/ -void -gl_prefs_model_load_settings (glPrefsModel *prefs_model) -{ - const gchar *pgsize, *default_units_string, *default_page_size; - gchar *string; - lglPaper *paper; - GSList *p, *p_next; - - gl_debug (DEBUG_PREFS, "START"); - - g_return_if_fail (prefs_model && GL_IS_PREFS_MODEL(prefs_model)); - g_return_if_fail (prefs_model->gconf_client != NULL); - - /* Make educated guess about locale defaults. */ - pgsize = gtk_paper_size_get_default (); - if ( strcmp (pgsize,GTK_PAPER_NAME_LETTER) == 0 ) - { - default_units_string = DEFAULT_UNITS_STRING_US; - default_page_size = DEFAULT_PAGE_SIZE_US; - } - else - { - default_units_string = DEFAULT_UNITS_STRING_METRIC; - default_page_size = DEFAULT_PAGE_SIZE_METRIC; - } - - /* Units */ - string = - get_string (prefs_model->gconf_client, - BASE_KEY PREF_UNITS, - default_units_string); - prefs_model->units = string_to_units( string ); - g_free( string ); - lgl_xml_set_default_units (prefs_model->units); - - - /* Page size */ - g_free (prefs_model->default_page_size); - prefs_model->default_page_size = - get_string (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_PAGE_SIZE, - default_page_size); - - /* Text properties */ - g_free (prefs_model->default_font_family); - prefs_model->default_font_family = - get_string (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_FONT_FAMILY, - DEFAULT_FONT_FAMILY); - - prefs_model->default_font_size = - get_float (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_FONT_SIZE, - DEFAULT_FONT_SIZE); - - string = - get_string (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_FONT_WEIGHT, - DEFAULT_FONT_WEIGHT_STRING); - prefs_model->default_font_weight = gl_str_util_string_to_weight( string ); - g_free( string ); - - prefs_model->default_text_color = - get_int (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_TEXT_COLOR, - DEFAULT_TEXT_COLOR); - - string = - get_string (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_TEXT_ALIGNMENT, - DEFAULT_TEXT_ALIGN_STRING); - prefs_model->default_text_alignment = gl_str_util_string_to_align( string ); - g_free( string ); - - prefs_model->default_text_line_spacing = - get_float (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_TEXT_LINE_SPACING, - DEFAULT_TEXT_LINE_SPACING); - - gl_debug (DEBUG_PREFS, "text_line_spacing = %f", prefs_model->default_text_line_spacing); - - /* Line properties */ - prefs_model->default_line_width = - get_float (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_LINE_WIDTH, - DEFAULT_LINE_WIDTH); - prefs_model->default_line_color = - get_int (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_LINE_COLOR, - DEFAULT_LINE_COLOR); - - /* Fill properties */ - prefs_model->default_fill_color = - get_int (prefs_model->gconf_client, - BASE_KEY PREF_DEFAULT_FILL_COLOR, - DEFAULT_FILL_COLOR); - - - /* User Inferface/Main Toolbar */ - prefs_model->main_toolbar_visible = - get_bool (prefs_model->gconf_client, - BASE_KEY PREF_MAIN_TOOLBAR_VISIBLE, - TRUE); - - prefs_model->main_toolbar_buttons_style = - get_int (prefs_model->gconf_client, - BASE_KEY PREF_MAIN_TOOLBAR_BUTTONS_STYLE, - GL_TOOLBAR_SYSTEM); - - /* User Inferface/Drawing Toolbar */ - prefs_model->drawing_toolbar_visible = - get_bool (prefs_model->gconf_client, - BASE_KEY PREF_DRAWING_TOOLBAR_VISIBLE, - TRUE); - - /* User Inferface/Property Toolbar */ - prefs_model->property_toolbar_visible = - get_bool (prefs_model->gconf_client, - BASE_KEY PREF_PROPERTY_TOOLBAR_VISIBLE, - TRUE); - - /* View properties */ - prefs_model->grid_visible = - get_bool (prefs_model->gconf_client, - BASE_KEY PREF_GRID_VISIBLE, - TRUE); - - prefs_model->markup_visible = - get_bool (prefs_model->gconf_client, - BASE_KEY PREF_MARKUP_VISIBLE, - TRUE); - - /* Recent files */ - prefs_model->max_recents = - get_int (prefs_model->gconf_client, - BASE_KEY PREF_MAX_RECENTS, - -1); - - /* Recent templates */ - for (p=prefs_model->recent_templates; p != NULL; p=p->next) - { - g_free (p->data); - } - g_slist_free (prefs_model->recent_templates); - prefs_model->recent_templates = - gconf_client_get_list (prefs_model->gconf_client, - BASE_KEY PREF_RECENT_TEMPLATES, - GCONF_VALUE_STRING, - NULL); - prefs_model->max_recent_templates = - get_int (prefs_model->gconf_client, - BASE_KEY PREF_MAX_RECENT_TEMPLATES, - 5); - - - /* Proof read the default page size -- it must be a valid id. */ - /* (For compatability with older versions.) */ - paper = lgl_db_lookup_paper_from_id (prefs_model->default_page_size); - if ( paper == NULL ) { - prefs_model->default_page_size = g_strdup (DEFAULT_PAGE_SIZE_US); - } else { - lgl_paper_free (paper); - paper = NULL; - } - - /* Proof read the recent templates list. Make sure the template names */ - /* are valid. Remove from list if not. */ - for (p=prefs_model->recent_templates; p != NULL; p=p_next) - { - p_next = p->next; - - if ( !lgl_db_does_template_name_exist (p->data) ) - { - g_free (p->data); - prefs_model->recent_templates = g_slist_delete_link (prefs_model->recent_templates, p); - } - } - - gl_debug (DEBUG_PREFS, "max_recents = %d", prefs_model->max_recents); - - - g_signal_emit (G_OBJECT(prefs_model), signals[CHANGED], 0); - - gl_debug (DEBUG_PREFS, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Key changed callback. */ -/*---------------------------------------------------------------------------*/ -static void -notify_cb (GConfClient *client, - guint cnxn_id, - GConfEntry *entry, - glPrefsModel *prefs_model) -{ - gl_debug (DEBUG_PREFS, "Key was changed: %s", entry->key); - - gl_prefs_model_load_settings (prefs_model); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Utilities to get values with defaults. */ -/*---------------------------------------------------------------------------*/ -static gchar* -get_string (GConfClient *client, - const gchar *key, - const gchar *def) -{ - gchar* val; - - val = gconf_client_get_string (client, key, NULL); - - if (val != NULL) { - - return val; - - } else { - - return def ? g_strdup (def) : NULL; - - } -} - - -static gboolean -get_bool (GConfClient *client, - const gchar *key, - gboolean def) -{ - GConfValue* val; - gboolean retval; - - val = gconf_client_get (client, key, NULL); - - if (val != NULL) { - - if ( val->type == GCONF_VALUE_BOOL ) { - retval = gconf_value_get_bool (val); - } else { - retval = def; - } - - gconf_value_free (val); - - return retval; - - } else { - - return def; - - } -} - - -static gint -get_int (GConfClient *client, - const gchar *key, - gint def) -{ - GConfValue* val; - gint retval; - - val = gconf_client_get (client, key, NULL); - - if (val != NULL) { - - if ( val->type == GCONF_VALUE_INT) { - retval = gconf_value_get_int(val); - } else { - retval = def; - } - - gconf_value_free (val); - - return retval; - - } else { - - return def; - - } -} - - -static gdouble -get_float (GConfClient *client, - const gchar *key, - gdouble def) -{ - GConfValue* val; - gdouble retval; - - val = gconf_client_get (client, key, NULL); - - if (val != NULL) { - - if ( val->type == GCONF_VALUE_FLOAT ) { - retval = gconf_value_get_float(val); - } else { - retval = def; - } - - gconf_value_free (val); - - return retval; - - } else { - return def; - - } -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Utilities to deal with units. */ -/*---------------------------------------------------------------------------*/ -static lglUnitsType -string_to_units (const gchar *string) -{ - lglUnitsType units; - - if (g_ascii_strcasecmp (string, "Points") == 0) { - units = LGL_UNITS_POINT; - } else if (g_ascii_strcasecmp (string, "Inches") == 0) { - units = LGL_UNITS_INCH; - } else if (g_ascii_strcasecmp (string, "Millimeters") == 0) { - units = LGL_UNITS_MM; - } else { - units = LGL_UNITS_INCH; - } - - return units; -} - - -static const -gchar *units_to_string (lglUnitsType units) -{ - switch (units) { - case LGL_UNITS_POINT: - return "Points"; - break; - case LGL_UNITS_INCH: - return "Inches"; - break; - case LGL_UNITS_MM: - return "Millimeters"; - break; - default: - return "Inches"; - break; - } -} - - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/prefs-model.h b/glabels2/src/prefs-model.h deleted file mode 100644 index bb5ca180..00000000 --- a/glabels2/src/prefs-model.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * prefs-model.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __PREFS_MODEL_H__ -#define __PREFS_MODEL_H__ - -#include -#include -#include -#include - -G_BEGIN_DECLS - -typedef enum { - GL_TOOLBAR_SYSTEM = 0, - GL_TOOLBAR_ICONS, - GL_TOOLBAR_ICONS_AND_TEXT -} glToolbarSetting; - -#define GL_TYPE_PREFS_MODEL (gl_prefs_model_get_type ()) -#define GL_PREFS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PREFS_MODEL, glPrefsModel)) -#define GL_PREFS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PREFS_MODEL, glPrefsModelClass)) -#define GL_IS_PREFS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PREFS_MODEL)) -#define GL_IS_PREFS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PREFS_MODEL)) -#define GL_PREFS_MODEL_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_PREFS_MODEL, glPrefsModelClass)) - - -typedef struct _glPrefsModel glPrefsModel; -typedef struct _glPrefsModelClass glPrefsModelClass; - -typedef struct _glPrefsModelPrivate glPrefsModelPrivate; - - -struct _glPrefsModel { - GObject *object; - - GConfClient *gconf_client; - - /* Units */ - lglUnitsType units; - - /* Page size */ - gchar *default_page_size; - - /* Text properties */ - gchar *default_font_family; - gdouble default_font_size; - PangoWeight default_font_weight; - gboolean default_font_italic_flag; - guint default_text_color; - PangoAlignment default_text_alignment; - gdouble default_text_line_spacing; - - /* Line properties */ - gdouble default_line_width; - guint default_line_color; - - /* Fill properties */ - guint default_fill_color; - - /* User Interface/Main Toolbar */ - gboolean main_toolbar_visible; - glToolbarSetting main_toolbar_buttons_style; - - /* User Interface/Drawing Toolbar */ - gboolean drawing_toolbar_visible; - - /* User Interface/Property Toolbar */ - gboolean property_toolbar_visible; - - /* View properties */ - gboolean grid_visible; - gboolean markup_visible; - - /* Recent files */ - gint max_recents; - - /* Recent templates */ - GSList *recent_templates; - gint max_recent_templates; -}; - -struct _glPrefsModelClass { - GObjectClass parent_class; - - void (*changed) (glPrefsModel *prefs_model, gpointer user_data); -}; - - -GType gl_prefs_model_get_type (void) G_GNUC_CONST; - -glPrefsModel *gl_prefs_model_new (void); - -void gl_prefs_model_save_settings (glPrefsModel *prefs_model); - -void gl_prefs_model_load_settings (glPrefsModel *prefs_model); - -G_END_DECLS - -#endif /* __PREFS_MODEL_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/prefs.c b/glabels2/src/prefs.c deleted file mode 100644 index 85922bf5..00000000 --- a/glabels2/src/prefs.c +++ /dev/null @@ -1,223 +0,0 @@ -/* - * prefs.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "prefs.h" - -#include -#include - -#include "debug.h" - -glPrefsModel *gl_prefs = NULL; - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - - - -/*****************************************************************************/ -/* Initialize preferences module. */ -/*****************************************************************************/ -void -gl_prefs_init (void) -{ - gl_debug (DEBUG_PREFS, "START"); - - gl_prefs = gl_prefs_model_new (); - - gl_prefs_model_load_settings (gl_prefs); - - gl_debug (DEBUG_PREFS, "END"); -} - - -/****************************************************************************/ -/* Get string representing desired units. */ -/****************************************************************************/ -const gchar * -gl_prefs_get_page_size (void) -{ - return (gl_prefs->default_page_size); -} - -/****************************************************************************/ -/* Get desired units. */ -/****************************************************************************/ -lglUnitsType -gl_prefs_get_units (void) -{ - return gl_prefs->units; -} - -/****************************************************************************/ -/* Get desired units per point. */ -/****************************************************************************/ -gdouble -gl_prefs_get_units_per_point (void) -{ - - switch (gl_prefs->units) { - case LGL_UNITS_POINT: - return 1.0; /* points */ - case LGL_UNITS_INCH: - return 1.0 / 72.0; /* inches */ - case LGL_UNITS_MM: - return 0.35277778; /* mm */ - default: - g_message ("Illegal units"); /* Should not happen */ - return 1.0; - } -} - -/****************************************************************************/ -/* Get precision for desired units. */ -/****************************************************************************/ -gint -gl_prefs_get_units_precision (void) -{ - - switch (gl_prefs->units) { - case LGL_UNITS_POINT: - return 1; /* points */ - case LGL_UNITS_INCH: - return 3; /* inches */ - case LGL_UNITS_MM: - return 1; /* mm */ - default: - g_message ("Illegal units"); /* Should not happen */ - return 1.0; - } -} - -/****************************************************************************/ -/* Get step size for desired units. */ -/****************************************************************************/ -gdouble -gl_prefs_get_units_step_size (void) -{ - - switch (gl_prefs->units) { - case LGL_UNITS_POINT: - return 0.1; /* points */ - case LGL_UNITS_INCH: - return 0.001; /* inches */ - case LGL_UNITS_MM: - return 0.1; /* mm */ - default: - g_message ("Illegal units"); /* Should not happen */ - return 1.0; - } -} - -/****************************************************************************/ -/* Get string representing desired units. */ -/****************************************************************************/ -const gchar * -gl_prefs_get_units_string (void) -{ - - switch (gl_prefs->units) { - case LGL_UNITS_POINT: - return _("points"); - case LGL_UNITS_INCH: - return _("inches"); - case LGL_UNITS_MM: - return _("mm"); - default: - g_message ("Illegal units"); /* Should not happen */ - return _("points"); - } -} - -/****************************************************************************/ -/* Add template to recent template list. */ -/****************************************************************************/ -void -gl_prefs_add_recent_template (const gchar *name) -{ - GSList *p; - - /* - * If already in list, remove that entry. - */ - p = g_slist_find_custom (gl_prefs->recent_templates, - name, - (GCompareFunc)lgl_str_utf8_casecmp); - if (p) - { - gl_prefs->recent_templates = - g_slist_remove_link (gl_prefs->recent_templates, p); - g_free (p->data); - g_slist_free_1 (p); - } - - /* - * Now prepend to list. - */ - gl_prefs->recent_templates = - g_slist_prepend (gl_prefs->recent_templates, g_strdup (name)); - - /* - * Truncate list to maximum size - */ - while (g_slist_length (gl_prefs->recent_templates) > gl_prefs->max_recent_templates) - { - p = g_slist_last (gl_prefs->recent_templates); - gl_prefs->recent_templates = - g_slist_remove_link (gl_prefs->recent_templates, p); - g_free (p->data); - g_slist_free_1 (p); - } - - /* - * Sync to disk. - */ - gl_prefs_model_save_settings (gl_prefs); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/prefs.h b/glabels2/src/prefs.h deleted file mode 100644 index 5787debb..00000000 --- a/glabels2/src/prefs.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * prefs.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __PREFS_H__ -#define __PREFS_H__ - -#include "prefs-model.h" - -G_BEGIN_DECLS - - - -extern glPrefsModel *gl_prefs; - - - -void gl_prefs_init (void); - -const gchar *gl_prefs_get_page_size (void); - -lglUnitsType gl_prefs_get_units (void); - -const gchar *gl_prefs_get_units_string (void); - -gdouble gl_prefs_get_units_per_point (void); - -gdouble gl_prefs_get_units_step_size (void); - -gint gl_prefs_get_units_precision (void); - -void gl_prefs_add_recent_template (const gchar *name); - -G_END_DECLS - -#endif /* __PREFS_H__ */ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/print-op-dialog.c b/glabels2/src/print-op-dialog.c deleted file mode 100644 index bae96d5c..00000000 --- a/glabels2/src/print-op-dialog.c +++ /dev/null @@ -1,744 +0,0 @@ -/* - * print-op-dialog.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "print-op-dialog.h" - -#include -#include -#include -#include -#include - -#include "mini-preview.h" -#include "label.h" -#include "builder-util.h" - -#include "pixmaps/collate.xpm" -#include "pixmaps/nocollate.xpm" - -#include "debug.h" - - -#define MINI_PREVIEW_MIN_HEIGHT 175 -#define MINI_PREVIEW_MIN_WIDTH 150 - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -struct _glPrintOpDialogPrivate { - - GtkBuilder *builder; - - GtkWidget *simple_frame; - GtkWidget *simple_sheets_radio; - GtkWidget *simple_sheets_spin; - GtkWidget *simple_labels_radio; - GtkWidget *simple_first_spin; - GtkWidget *simple_last_spin; - - GtkWidget *merge_frame; - GtkWidget *merge_first_spin; - GtkWidget *merge_copies_spin; - GtkWidget *merge_collate_check; - GtkWidget *merge_collate_image; - - GtkWidget *outline_check; - GtkWidget *reverse_check; - GtkWidget *crop_marks_check; - - GtkWidget *preview; - - gboolean force_outline_flag; - - gint labels_per_sheet; - gboolean merge_flag; - gint n_records; - -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_print_op_dialog_finalize (GObject *object); - -static void gl_print_op_dialog_construct (glPrintOpDialog *op, - glLabel *label); - -static GObject *create_custom_widget_cb (GtkPrintOperation *operation, - glLabel *label); - -static void custom_widget_apply_cb (GtkPrintOperation *operation, - GtkWidget *widget, - glLabel *label); - -static void simple_sheets_radio_cb (GtkToggleButton *togglebutton, - glPrintOpDialog *op); - -static void simple_first_spin_cb (GtkSpinButton *spinbutton, - glPrintOpDialog *op); - -static void simple_last_spin_cb (GtkSpinButton *spinbutton, - glPrintOpDialog *op); - -static void preview_pressed_cb (glMiniPreview *preview, - gint first, - gint last, - glPrintOpDialog *op); - -static void preview_released_cb (glMiniPreview *preview, - gint first, - gint last, - glPrintOpDialog *op); - -static void merge_spin_cb (GtkSpinButton *spinbutton, - glPrintOpDialog *op); - -static void merge_collate_check_cb (GtkToggleButton *togglebutton, - glPrintOpDialog *op); - -static void preview_clicked_cb (glMiniPreview *preview, - gint first, - glPrintOpDialog *op); - -static void option_toggled_cb (GtkToggleButton *togglebutton, - glPrintOpDialog *op); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glPrintOpDialog, gl_print_op_dialog, GL_TYPE_PRINT_OP); - - -static void -gl_print_op_dialog_class_init (glPrintOpDialogClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_PRINT, ""); - - gl_print_op_dialog_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_print_op_dialog_finalize; -} - - -static void -gl_print_op_dialog_init (glPrintOpDialog *op) -{ - gl_debug (DEBUG_PRINT, ""); - - gtk_print_operation_set_use_full_page (GTK_PRINT_OPERATION (op), TRUE); - - gtk_print_operation_set_unit (GTK_PRINT_OPERATION (op), GTK_UNIT_POINTS); - - op->priv = g_new0 (glPrintOpDialogPrivate, 1); - -} - - -static void -gl_print_op_dialog_finalize (GObject *object) -{ - glPrintOpDialog *op = GL_PRINT_OP_DIALOG (object); - - gl_debug (DEBUG_PRINT, ""); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PRINT_OP (op)); - g_return_if_fail (op->priv != NULL); - - g_object_unref (G_OBJECT(op->priv->builder)); - g_free (op->priv); - - G_OBJECT_CLASS (gl_print_op_dialog_parent_class)->finalize (object); - - g_free (op->priv); -} - - -/*****************************************************************************/ -/* NEW print op. */ -/*****************************************************************************/ -glPrintOpDialog * -gl_print_op_dialog_new (glLabel *label) -{ - glPrintOpDialog *op; - - gl_debug (DEBUG_PRINT, ""); - - op = GL_PRINT_OP_DIALOG (g_object_new (GL_TYPE_PRINT_OP_DIALOG, NULL)); - - gl_print_op_dialog_construct (GL_PRINT_OP_DIALOG(op), label); - - return op; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct op. */ -/*--------------------------------------------------------------------------*/ -static void -gl_print_op_dialog_construct (glPrintOpDialog *op, - glLabel *label) -{ - - gl_print_op_construct(GL_PRINT_OP (op), label); - - gtk_print_operation_set_custom_tab_label ( GTK_PRINT_OPERATION (op), - _("Labels")); - - g_signal_connect (G_OBJECT (op), "create-custom-widget", - G_CALLBACK (create_custom_widget_cb), label); - - g_signal_connect (G_OBJECT (op), "custom-widget-apply", - G_CALLBACK (custom_widget_apply_cb), label); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. "Create custom widget" callback */ -/*--------------------------------------------------------------------------*/ -static GObject * -create_custom_widget_cb (GtkPrintOperation *operation, - glLabel *label) -{ - GtkBuilder *builder; - static gchar *object_ids[] = { "print_custom_widget_hbox", - "adjustment1", "adjustment2", - "adjustment3", "adjustment4", - "adjustment5", - NULL }; - GError *error = NULL; - glPrintOpDialog *op = GL_PRINT_OP_DIALOG (operation); - const lglTemplateFrame *frame; - GtkWidget *hbox; - glMerge *merge = NULL; - GdkPixbuf *pixbuf; - - - frame = (lglTemplateFrame *)label->template->frames->data; - op->priv->labels_per_sheet = lgl_template_frame_get_n_labels (frame); - - builder = gtk_builder_new (); - gtk_builder_add_objects_from_file (builder, - GLABELS_BUILDER_DIR "print-op-dialog-custom-widget.builder", - object_ids, - &error); - if (error) { - g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); - g_error_free (error); - return NULL; - } - - gl_builder_util_get_widgets (builder, - "print_custom_widget_hbox", &hbox, - "simple_frame", &op->priv->simple_frame, - "simple_sheets_radio", &op->priv->simple_sheets_radio, - "simple_sheets_spin", &op->priv->simple_sheets_spin, - "simple_labels_radio", &op->priv->simple_labels_radio, - "simple_first_spin", &op->priv->simple_first_spin, - "simple_last_spin", &op->priv->simple_last_spin, - "merge_frame", &op->priv->merge_frame, - "merge_first_spin", &op->priv->merge_first_spin, - "merge_copies_spin", &op->priv->merge_copies_spin, - "merge_collate_check", &op->priv->merge_collate_check, - "merge_collate_image", &op->priv->merge_collate_image, - "outline_check", &op->priv->outline_check, - "reverse_check", &op->priv->reverse_check, - "crop_marks_check", &op->priv->crop_marks_check, - NULL); - - op->priv->builder = builder; - - /* ---- Install preview. ---- */ - op->priv->preview = gl_mini_preview_new (MINI_PREVIEW_MIN_HEIGHT, MINI_PREVIEW_MIN_WIDTH); - gl_mini_preview_set_template (GL_MINI_PREVIEW(op->priv->preview), label->template); - gl_mini_preview_set_label (GL_MINI_PREVIEW(op->priv->preview), label); - gtk_box_pack_start (GTK_BOX(hbox), op->priv->preview, TRUE, TRUE, 0); - gtk_widget_show_all (op->priv->preview); - - - /* ---- Activate either simple or merge print control widgets. ---- */ - merge = gl_label_get_merge (label); - op->priv->merge_flag = (merge != NULL); - if (!op->priv->merge_flag) { - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->simple_sheets_radio), - TRUE); - gtk_widget_set_sensitive (op->priv->simple_first_spin, FALSE); - gtk_widget_set_sensitive (op->priv->simple_last_spin, FALSE); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_sheets_spin), - gl_print_op_get_n_sheets (GL_PRINT_OP(op))); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_first_spin), - 1, op->priv->labels_per_sheet); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_first_spin), - 1); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_last_spin), - 1, op->priv->labels_per_sheet); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_last_spin), - op->priv->labels_per_sheet); - - /* Update preview. */ - gl_mini_preview_set_page (GL_MINI_PREVIEW (op->priv->preview), 0); - gl_mini_preview_set_n_sheets (GL_MINI_PREVIEW (op->priv->preview), - gl_print_op_get_n_sheets (GL_PRINT_OP(op))); - gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), 1); - gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), - op->priv->labels_per_sheet); - - gtk_widget_show_all (op->priv->simple_frame); - gtk_widget_hide_all (op->priv->merge_frame); - - g_signal_connect (G_OBJECT (op->priv->simple_sheets_radio), "toggled", - G_CALLBACK (simple_sheets_radio_cb), op); - g_signal_connect (G_OBJECT (op->priv->simple_first_spin), "changed", - G_CALLBACK (simple_first_spin_cb), op); - g_signal_connect (G_OBJECT (op->priv->simple_last_spin), "changed", - G_CALLBACK (simple_last_spin_cb), op); - g_signal_connect (G_OBJECT (op->priv->preview), "pressed", - G_CALLBACK (preview_pressed_cb), op); - g_signal_connect (G_OBJECT (op->priv->preview), "released", - G_CALLBACK (preview_released_cb), op); - - } else { - - op->priv->n_records = gl_merge_get_record_count (merge); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->merge_first_spin), - 1, op->priv->labels_per_sheet); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->merge_first_spin), - gl_print_op_get_first (GL_PRINT_OP(op))); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->merge_copies_spin), - gl_print_op_get_n_copies (GL_PRINT_OP(op))); - - gtk_widget_set_sensitive (op->priv->merge_collate_check, - (gl_print_op_get_n_copies (GL_PRINT_OP(op)) > 1)); - gtk_widget_set_sensitive (op->priv->merge_collate_image, - (gl_print_op_get_n_copies (GL_PRINT_OP(op)) > 1)); - - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->simple_sheets_radio), - gl_print_op_get_collate_flag (GL_PRINT_OP(op))); - - if ( gl_print_op_get_collate_flag (GL_PRINT_OP(op)) ) - { - pixbuf = gdk_pixbuf_new_from_xpm_data ( (const char **)nocollate_xpm); - } - else - { - pixbuf = gdk_pixbuf_new_from_xpm_data ( (const char **)collate_xpm); - } - - gtk_image_set_from_pixbuf (GTK_IMAGE (op->priv->merge_collate_image), pixbuf); - - /* Update preview. */ - gl_mini_preview_set_page (GL_MINI_PREVIEW (op->priv->preview), 0); - gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), - gl_print_op_get_first (GL_PRINT_OP(op))); - gl_mini_preview_set_n_copies (GL_MINI_PREVIEW (op->priv->preview), - gl_print_op_get_n_copies (GL_PRINT_OP(op))); - gl_mini_preview_set_collate_flag (GL_MINI_PREVIEW (op->priv->preview), - gl_print_op_get_collate_flag (GL_PRINT_OP(op))); - - - gtk_widget_hide_all (op->priv->simple_frame); - gtk_widget_show_all (op->priv->merge_frame); - - g_signal_connect (G_OBJECT (op->priv->merge_first_spin), "changed", - G_CALLBACK (merge_spin_cb), op); - g_signal_connect (G_OBJECT (op->priv->merge_copies_spin), "changed", - G_CALLBACK (merge_spin_cb), op); - g_signal_connect (G_OBJECT (op->priv->merge_collate_check), "toggled", - G_CALLBACK (merge_collate_check_cb), op); - g_signal_connect (G_OBJECT (op->priv->preview), "clicked", - G_CALLBACK (preview_clicked_cb), op); - g_signal_connect (G_OBJECT (op->priv->preview), "pressed", - G_CALLBACK (preview_pressed_cb), op); - g_signal_connect (G_OBJECT (op->priv->preview), "released", - G_CALLBACK (preview_released_cb), op); - - g_object_unref (G_OBJECT(merge)); - - } - - /* --- Set options --- */ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->outline_check), - gl_print_op_get_outline_flag (GL_PRINT_OP(op))); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->reverse_check), - gl_print_op_get_reverse_flag (GL_PRINT_OP(op))); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->crop_marks_check), - gl_print_op_get_crop_marks_flag (GL_PRINT_OP(op))); - - /* --- Do we need to force the outline flag --- */ - if (gl_print_op_is_outline_forced (GL_PRINT_OP (op))) - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(op->priv->outline_check), - TRUE); - - gtk_widget_set_sensitive (op->priv->outline_check, FALSE); - gtk_widget_set_sensitive (op->priv->reverse_check, FALSE); - gtk_widget_set_sensitive (op->priv->crop_marks_check, FALSE); - } - - g_signal_connect (G_OBJECT (op->priv->outline_check), "toggled", - G_CALLBACK (option_toggled_cb), op); - g_signal_connect (G_OBJECT (op->priv->reverse_check), "toggled", - G_CALLBACK (option_toggled_cb), op); - g_signal_connect (G_OBJECT (op->priv->crop_marks_check), "toggled", - G_CALLBACK (option_toggled_cb), op); - - return G_OBJECT (hbox); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. "Custom widget apply" callback */ -/*--------------------------------------------------------------------------*/ -static void -custom_widget_apply_cb (GtkPrintOperation *operation, - GtkWidget *widget, - glLabel *label) -{ - glPrintOpDialog *op = GL_PRINT_OP_DIALOG (operation); - glMerge *merge = NULL; - gint n_records; - gint n_sheets, first, last, n_copies; - gboolean collate_flag; - - gl_print_op_set_outline_flag (GL_PRINT_OP (op), - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (op->priv->outline_check))); - gl_print_op_set_reverse_flag (GL_PRINT_OP (op), - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (op->priv->reverse_check))); - gl_print_op_set_crop_marks_flag (GL_PRINT_OP (op), - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (op->priv->crop_marks_check))); - - - if (!op->priv->merge_flag) - { - - n_sheets = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_sheets_spin)); - gl_print_op_set_n_sheets (GL_PRINT_OP (op), n_sheets); - - first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); - gl_print_op_set_first (GL_PRINT_OP (op), first); - - last = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_last_spin)); - gl_print_op_set_last (GL_PRINT_OP (op), last); - - } - else - { - - merge = gl_label_get_merge (label); - - n_copies = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_copies_spin)); - gl_print_op_set_n_copies (GL_PRINT_OP (op), n_copies); - - first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_first_spin)); - gl_print_op_set_first (GL_PRINT_OP (op), first); - - collate_flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->merge_collate_check)); - gl_print_op_set_collate_flag (GL_PRINT_OP (op), collate_flag); - - n_records = gl_merge_get_record_count (merge); - n_sheets = ceil (first - 1 + (n_copies * n_records)/(double)op->priv->labels_per_sheet); - gl_print_op_set_n_sheets (GL_PRINT_OP (op), n_sheets); - - g_object_unref (G_OBJECT(merge)); - - } - - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Simple sheets radio "toggled" callback */ -/*--------------------------------------------------------------------------*/ -static void -simple_sheets_radio_cb (GtkToggleButton *togglebutton, - glPrintOpDialog *op) -{ - gint first, last; - - if (gtk_toggle_button_get_active (togglebutton)) { - - gtk_widget_set_sensitive (op->priv->simple_sheets_spin, TRUE); - gtk_widget_set_sensitive (op->priv->simple_first_spin, FALSE); - gtk_widget_set_sensitive (op->priv->simple_last_spin, FALSE); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_first_spin), - 1, op->priv->labels_per_sheet); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_first_spin), - 1); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_last_spin), - 1, op->priv->labels_per_sheet); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_last_spin), - op->priv->labels_per_sheet); - - gl_mini_preview_set_n_sheets (GL_MINI_PREVIEW (op->priv->preview), - gl_print_op_get_n_sheets (GL_PRINT_OP(op))); - gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), 1); - gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), - op->priv->labels_per_sheet); - - } else { - - gtk_widget_set_sensitive (op->priv->simple_sheets_spin, FALSE); - gtk_widget_set_sensitive (op->priv->simple_first_spin, TRUE); - gtk_widget_set_sensitive (op->priv->simple_last_spin, TRUE); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_sheets_spin), 1); - - first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); - last = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_last_spin)); - - gl_mini_preview_set_n_sheets (GL_MINI_PREVIEW (op->priv->preview), 1); - gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), first); - gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), last); - - } -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Simple first label spinbutton "changed" callback */ -/*--------------------------------------------------------------------------*/ -static void -simple_first_spin_cb (GtkSpinButton *spinbutton, - glPrintOpDialog *op) -{ - gint first, last; - - first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); - last = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_last_spin)); - - /* Adjust range of last spin button. */ - gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_last_spin), - first, op->priv->labels_per_sheet); - - /* Update preview. */ - gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), first); - gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), last); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Simple last label spinbutton "changed" callback */ -/*--------------------------------------------------------------------------*/ -static void -simple_last_spin_cb (GtkSpinButton *spinbutton, - glPrintOpDialog *op) -{ - gint first, last; - - first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); - last = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_last_spin)); - - /* Adjust range of first spin button. */ - gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_first_spin), - 1, last); - - /* Update preview. */ - gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), first); - gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), last); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Preview "pressed" callback */ -/*--------------------------------------------------------------------------*/ -static void -preview_pressed_cb (glMiniPreview *preview, - gint first, - gint last, - glPrintOpDialog *op) -{ - gint old_first; - - if ( !op->priv->merge_flag ) - { - - /* Update controls. */ - old_first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); - if ( first > old_first ) - { - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_last_spin), last); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_first_spin), first); - } - else - { - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_first_spin), first); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_last_spin), last); - } - if ( (first == 1) && (last == op->priv->labels_per_sheet) ) - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->simple_sheets_radio), TRUE); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_sheets_spin), 1); - } - else - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->simple_labels_radio), TRUE); - } - - } - - gl_mini_preview_highlight_range (GL_MINI_PREVIEW (op->priv->preview), first, last); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Preview "pressed" callback */ -/*--------------------------------------------------------------------------*/ -static void -preview_released_cb (glMiniPreview *preview, - gint first, - gint last, - glPrintOpDialog *op) -{ - - gl_mini_preview_highlight_range (GL_MINI_PREVIEW (op->priv->preview), 0, 0); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. "changed" callback for merge first and copies spin buttons. */ -/*--------------------------------------------------------------------------*/ -static void -merge_spin_cb (GtkSpinButton *spinbutton, - glPrintOpDialog *op) -{ - gint first, n_copies; - - first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_first_spin)); - - n_copies = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_copies_spin)); - - gl_mini_preview_set_first (GL_MINI_PREVIEW(op->priv->preview), first); - gl_mini_preview_set_n_copies (GL_MINI_PREVIEW(op->priv->preview), n_copies); - - gtk_widget_set_sensitive (op->priv->merge_collate_check, (n_copies > 1)); - gtk_widget_set_sensitive (op->priv->merge_collate_image, (n_copies > 1)); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Merge first collate check "toggled" callback */ -/*--------------------------------------------------------------------------*/ -static void -merge_collate_check_cb (GtkToggleButton *togglebutton, - glPrintOpDialog *op) -{ - GdkPixbuf *pixbuf; - - if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->merge_collate_check)) ) - { - pixbuf = gdk_pixbuf_new_from_xpm_data ( (const char **)nocollate_xpm); - gl_mini_preview_set_collate_flag (GL_MINI_PREVIEW (op->priv->preview), TRUE); - } - else - { - pixbuf = gdk_pixbuf_new_from_xpm_data ( (const char **)collate_xpm); - gl_mini_preview_set_collate_flag (GL_MINI_PREVIEW (op->priv->preview), FALSE); - } - - gtk_image_set_from_pixbuf (GTK_IMAGE (op->priv->merge_collate_image), pixbuf); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Preview "clicked" callback */ -/*--------------------------------------------------------------------------*/ -static void -preview_clicked_cb (glMiniPreview *preview, - gint first, - glPrintOpDialog *op) -{ - gint n_copies; - - if ( op->priv->merge_flag ) - { - - /* Update controls. */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->merge_first_spin), first); - - n_copies = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_copies_spin)); - gtk_widget_set_sensitive (op->priv->merge_collate_check, (n_copies > 1)); - gtk_widget_set_sensitive (op->priv->merge_collate_image, (n_copies > 1)); - - } -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Option checkbox "toggled" callback */ -/*--------------------------------------------------------------------------*/ -static void -option_toggled_cb (GtkToggleButton *togglebutton, - glPrintOpDialog *op) -{ - gboolean flag; - - flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->outline_check)); - gl_mini_preview_set_outline_flag (GL_MINI_PREVIEW (op->priv->preview), flag); - - flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->reverse_check)); - gl_mini_preview_set_reverse_flag (GL_MINI_PREVIEW (op->priv->preview), flag); - - flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->crop_marks_check)); - gl_mini_preview_set_crop_marks_flag (GL_MINI_PREVIEW (op->priv->preview), flag); -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/print-op-dialog.h b/glabels2/src/print-op-dialog.h deleted file mode 100644 index d6469bf2..00000000 --- a/glabels2/src/print-op-dialog.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * print-op-dialog.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __PRINT_OP_DIALOG_H__ -#define __PRINT_OP_DIALOG_H__ - -#include "print-op.h" - -G_BEGIN_DECLS - -#define GL_TYPE_PRINT_OP_DIALOG (gl_print_op_dialog_get_type ()) -#define GL_PRINT_OP_DIALOG(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PRINT_OP_DIALOG, glPrintOpDialog)) -#define GL_PRINT_OP_DIALOG_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PRINT_OP_DIALOG, glPrintOpDialogClass)) -#define GL_IS_PRINT_OP_DIALOG(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PRINT_OP_DIALOG)) -#define GL_IS_PRINT_OP_DIALOG_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PRINT_OP_DIALOG)) -#define GL_PRINT_OP_DIALOG_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_PRINT_OP_DIALOG, glPrintOpDialogClass)) - - -typedef struct _glPrintOpDialog glPrintOpDialog; -typedef struct _glPrintOpDialogClass glPrintOpDialogClass; - -typedef struct _glPrintOpDialogPrivate glPrintOpDialogPrivate; - -struct _glPrintOpDialog -{ - glPrintOp parent_instance; - - glPrintOpDialogPrivate *priv; - -}; - -struct _glPrintOpDialogClass -{ - glPrintOpClass parent_class; -}; - - -typedef struct _glPrintOpDialogSettings glPrintOpDialogSettings; - - - -GType gl_print_op_dialog_get_type (void) G_GNUC_CONST; - -glPrintOpDialog *gl_print_op_dialog_new (glLabel *label); - - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/print-op.c b/glabels2/src/print-op.c deleted file mode 100644 index 2c78f488..00000000 --- a/glabels2/src/print-op.c +++ /dev/null @@ -1,591 +0,0 @@ -/* - * print-op.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "print-op.h" - -#include -#include -#include -#include -#include - -#include -#include "print.h" -#include "label.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private data types */ -/*===========================================*/ - -struct _glPrintOpPrivate { - - glLabel *label; - - gboolean force_outline_flag; - - gchar *filename; - - gboolean outline_flag; - gboolean reverse_flag; - gboolean crop_marks_flag; - gboolean merge_flag; - gboolean collate_flag; - - gint first; - gint last; - gint n_sheets; - gint n_copies; - - glPrintState state; -}; - -struct _glPrintOpSettings -{ - - GtkPrintSettings *gtk_settings; - - gboolean outline_flag; - gboolean reverse_flag; - gboolean crop_marks_flag; - gboolean collate_flag; - - gint first; - gint last; - gint n_sheets; - gint n_copies; - -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_print_op_finalize (GObject *object); - -static void set_page_size (glPrintOp *op, - glLabel *label); - -static void begin_print_cb (GtkPrintOperation *operation, - GtkPrintContext *context, - gpointer user_data); - -static void draw_page_cb (GtkPrintOperation *operation, - GtkPrintContext *context, - int page_nr, - gpointer user_data); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glPrintOp, gl_print_op, GTK_TYPE_PRINT_OPERATION); - - -static void -gl_print_op_class_init (glPrintOpClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_PRINT, ""); - - gl_print_op_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_print_op_finalize; -} - - -static void -gl_print_op_init (glPrintOp *op) -{ - gl_debug (DEBUG_PRINT, ""); - - gtk_print_operation_set_use_full_page (GTK_PRINT_OPERATION (op), TRUE); - - gtk_print_operation_set_unit (GTK_PRINT_OPERATION (op), GTK_UNIT_POINTS); - - op->priv = g_new0 (glPrintOpPrivate, 1); - -} - - -static void -gl_print_op_finalize (GObject *object) -{ - glPrintOp *op = GL_PRINT_OP (object); - - gl_debug (DEBUG_PRINT, ""); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_PRINT_OP (op)); - g_return_if_fail (op->priv != NULL); - - g_object_unref (G_OBJECT(op->priv->label)); - g_free (op->priv->filename); - g_free (op->priv); - - G_OBJECT_CLASS (gl_print_op_parent_class)->finalize (object); - - g_free (op->priv); -} - - -/*****************************************************************************/ -/* NEW print op. */ -/*****************************************************************************/ -glPrintOp * -gl_print_op_new (glLabel *label) -{ - glPrintOp *op; - - gl_debug (DEBUG_PRINT, ""); - - op = GL_PRINT_OP (g_object_new (GL_TYPE_PRINT_OP, NULL)); - - gl_print_op_construct (GL_PRINT_OP(op), label); - - return op; -} - - -/*****************************************************************************/ -/* Construct print op. */ -/*****************************************************************************/ -void -gl_print_op_construct (glPrintOp *op, - glLabel *label) -{ - glMerge *merge = NULL; - const lglTemplateFrame *frame; - - op->priv->label = label; - op->priv->force_outline_flag = FALSE; - - merge = gl_label_get_merge (label); - frame = (lglTemplateFrame *)label->template->frames->data; - - op->priv->merge_flag = (merge != NULL); - op->priv->n_sheets = 1; - op->priv->first = 1; - op->priv->last = lgl_template_frame_get_n_labels (frame); - op->priv->n_copies = 1; - - set_page_size (op, label); - - gtk_print_operation_set_custom_tab_label ( GTK_PRINT_OPERATION (op), - _("Labels")); - - g_signal_connect (G_OBJECT (op), "begin-print", - G_CALLBACK (begin_print_cb), label); - - g_signal_connect (G_OBJECT (op), "draw-page", - G_CALLBACK (draw_page_cb), label); -} - - -/*****************************************************************************/ -/* Set outline flag/checkbox. */ -/*****************************************************************************/ -void -gl_print_op_force_outline (glPrintOp *op) -{ - op->priv->force_outline_flag = TRUE; -} - - -/*****************************************************************************/ -/* Set outline flag/checkbox. */ -/*****************************************************************************/ -gboolean -gl_print_op_is_outline_forced (glPrintOp *op) -{ - return op->priv->force_outline_flag; -} - - -/*****************************************************************************/ -/* Set job parameters. */ -/*****************************************************************************/ -void -gl_print_op_set_filename (glPrintOp *op, - gchar *filename) -{ - gtk_print_operation_set_export_filename (GTK_PRINT_OPERATION (op), - filename); -} - - -void -gl_print_op_set_n_sheets (glPrintOp *op, - gint n_sheets) -{ - op->priv->n_sheets = n_sheets; -} - - -void -gl_print_op_set_n_copies (glPrintOp *op, - gint n_copies) -{ - op->priv->n_copies = n_copies; -} - - -void -gl_print_op_set_first (glPrintOp *op, - gint first) -{ - op->priv->first = first; -} - - -void -gl_print_op_set_last (glPrintOp *op, - gint last) -{ - op->priv->last = last; -} - - -void -gl_print_op_set_collate_flag (glPrintOp *op, - gboolean collate_flag) -{ - op->priv->collate_flag = collate_flag; -} - - -void -gl_print_op_set_outline_flag (glPrintOp *op, - gboolean outline_flag) -{ - op->priv->outline_flag = outline_flag; -} - - -void -gl_print_op_set_reverse_flag (glPrintOp *op, - gboolean reverse_flag) -{ - op->priv->reverse_flag = reverse_flag; -} - - -void -gl_print_op_set_crop_marks_flag (glPrintOp *op, - gboolean crop_marks_flag) -{ - op->priv->crop_marks_flag = crop_marks_flag; -} - - -/*****************************************************************************/ -/* Get job parameters. */ -/*****************************************************************************/ -gchar * -gl_print_op_get_filename (glPrintOp *op) -{ - gchar *filename = NULL; - - g_object_get (G_OBJECT (op), - "export_filename", filename, - NULL); - - return filename; -} - - -gint -gl_print_op_get_n_sheets (glPrintOp *op) -{ - return op->priv->n_sheets; -} - - -gint -gl_print_op_get_n_copies (glPrintOp *op) -{ - return op->priv->n_copies; -} - - -gint -gl_print_op_get_first (glPrintOp *op) -{ - return op->priv->first; -} - - -gint -gl_print_op_get_last (glPrintOp *op) -{ - return op->priv->last; -} - - -gboolean -gl_print_op_get_collate_flag (glPrintOp *op) -{ - return op->priv->collate_flag; -} - - -gboolean -gl_print_op_get_outline_flag (glPrintOp *op) -{ - return op->priv->outline_flag; -} - - -gboolean -gl_print_op_get_reverse_flag (glPrintOp *op) -{ - return op->priv->reverse_flag; -} - - -gboolean -gl_print_op_get_crop_marks_flag (glPrintOp *op) -{ - return op->priv->crop_marks_flag; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Set page size. */ -/*--------------------------------------------------------------------------*/ -static void -set_page_size (glPrintOp *op, - glLabel *label) -{ - GtkPaperSize *psize; - GtkPageSetup *su; - lglPaper *paper; - - gl_debug (DEBUG_PRINT, "begin"); - - paper = lgl_db_lookup_paper_from_id (label->template->paper_id); - - if (!paper) - { - const gchar *name; - - name = gtk_paper_size_get_default (); - psize = gtk_paper_size_new (name); - - gl_debug (DEBUG_PRINT, "Using default size = \"%s\"", name); - } - else if (lgl_db_is_paper_id_other (paper->id)) - { - psize = gtk_paper_size_new_custom (paper->id, - paper->name, - label->template->page_width, - label->template->page_height, - GTK_UNIT_POINTS); - gl_debug (DEBUG_PRINT, "Using custom size = %g x %g points", - label->template->page_width, - label->template->page_height); - - } - else - { - psize = gtk_paper_size_new (paper->pwg_size); - gl_debug (DEBUG_PRINT, "Using PWG size \"%s\"", paper->pwg_size); - } - lgl_paper_free (paper); - - su = gtk_page_setup_new (); - gtk_page_setup_set_paper_size (su, psize); - gtk_print_operation_set_default_page_setup (GTK_PRINT_OPERATION (op), su); - g_object_unref (su); - - gtk_paper_size_free (psize); - - gl_debug (DEBUG_PRINT, "end"); -} - - -/*****************************************************************************/ -/* Get print operation settings. */ -/*****************************************************************************/ -glPrintOpSettings * -gl_print_op_get_settings (glPrintOp *print_op) -{ - glPrintOpSettings *settings; - - settings = g_new0 (glPrintOpSettings, 1); - - if ( settings ) - { - settings->gtk_settings = - gtk_print_operation_get_print_settings (GTK_PRINT_OPERATION (print_op)); - - settings->outline_flag = print_op->priv->outline_flag; - settings->reverse_flag = print_op->priv->reverse_flag; - settings->crop_marks_flag = print_op->priv->crop_marks_flag; - settings->collate_flag = print_op->priv->collate_flag; - - settings->first = print_op->priv->first; - settings->last = print_op->priv->last; - settings->n_sheets = print_op->priv->n_sheets; - settings->n_copies = print_op->priv->n_copies; - } - - return settings; -} - - -/*****************************************************************************/ -/* Set print operation settings. */ -/*****************************************************************************/ -void -gl_print_op_set_settings (glPrintOp *print_op, - glPrintOpSettings *settings) -{ - - if ( settings ) - { - gtk_print_operation_set_print_settings (GTK_PRINT_OPERATION (print_op), - settings->gtk_settings); - - print_op->priv->outline_flag = settings->outline_flag; - print_op->priv->reverse_flag = settings->reverse_flag; - print_op->priv->crop_marks_flag = settings->crop_marks_flag; - print_op->priv->collate_flag = settings->collate_flag; - - print_op->priv->first = settings->first; - print_op->priv->last = settings->last; - print_op->priv->n_sheets = settings->n_sheets; - print_op->priv->n_copies = settings->n_copies; - } - -} - - -/*****************************************************************************/ -/* Free print operation settings structure. */ -/*****************************************************************************/ -void -gl_print_op_free_settings(glPrintOpSettings *settings) -{ - - if ( settings ) - { - if ( settings->gtk_settings ) - { - g_object_unref (settings->gtk_settings); - } - - g_free (settings); - } -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. "Begin print" callback */ -/*--------------------------------------------------------------------------*/ -static void -begin_print_cb (GtkPrintOperation *operation, - GtkPrintContext *context, - gpointer user_data) -{ - glPrintOp *op = GL_PRINT_OP (operation); - - gtk_print_operation_set_n_pages (operation, op->priv->n_sheets); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. "Draw page" callback. */ -/*--------------------------------------------------------------------------*/ -static void -draw_page_cb (GtkPrintOperation *operation, - GtkPrintContext *context, - int page_nr, - gpointer user_data) -{ - glPrintOp *op = GL_PRINT_OP (operation); - cairo_t *cr; - - cr = gtk_print_context_get_cairo_context (context); - - if (!op->priv->merge_flag) - { - gl_print_simple_sheet (op->priv->label, - cr, - page_nr, - op->priv->n_sheets, - op->priv->first, - op->priv->last, - op->priv->outline_flag, - op->priv->reverse_flag, - op->priv->crop_marks_flag); - } - else - { - if (op->priv->collate_flag) - { - gl_print_collated_merge_sheet (op->priv->label, - cr, - page_nr, - op->priv->n_copies, - op->priv->first, - op->priv->outline_flag, - op->priv->reverse_flag, - op->priv->crop_marks_flag, - &op->priv->state); - } - else - { - gl_print_uncollated_merge_sheet (op->priv->label, - cr, - page_nr, - op->priv->n_copies, - op->priv->first, - op->priv->outline_flag, - op->priv->reverse_flag, - op->priv->crop_marks_flag, - &op->priv->state); - } - } -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/print-op.h b/glabels2/src/print-op.h deleted file mode 100644 index c01af4ce..00000000 --- a/glabels2/src/print-op.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * print-op.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __PRINT_OP_H__ -#define __PRINT_OP_H__ - -#include -#include "label.h" - -G_BEGIN_DECLS - -#define GL_TYPE_PRINT_OP (gl_print_op_get_type ()) -#define GL_PRINT_OP(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PRINT_OP, glPrintOp)) -#define GL_PRINT_OP_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PRINT_OP, glPrintOpClass)) -#define GL_IS_PRINT_OP(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PRINT_OP)) -#define GL_IS_PRINT_OP_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PRINT_OP)) -#define GL_PRINT_OP_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_PRINT_OP, glPrintOpClass)) - - -typedef struct _glPrintOp glPrintOp; -typedef struct _glPrintOpClass glPrintOpClass; - -typedef struct _glPrintOpPrivate glPrintOpPrivate; - -struct _glPrintOp -{ - GtkPrintOperation parent_instance; - - glPrintOpPrivate *priv; - -}; - -struct _glPrintOpClass -{ - GtkPrintOperationClass parent_class; -}; - - -typedef struct _glPrintOpSettings glPrintOpSettings; - - - -GType gl_print_op_get_type (void) G_GNUC_CONST; - -glPrintOp *gl_print_op_new (glLabel *label); - -void gl_print_op_construct (glPrintOp *print_op, - glLabel *label); - -void gl_print_op_set_filename (glPrintOp *print_op, - gchar *filename); -void gl_print_op_set_n_sheets (glPrintOp *print_op, - gint n_sheets); -void gl_print_op_set_n_copies (glPrintOp *print_op, - gint n_copies); -void gl_print_op_set_first (glPrintOp *print_op, - gint first); -void gl_print_op_set_last (glPrintOp *print_op, - gint last); -void gl_print_op_set_collate_flag (glPrintOp *print_op, - gboolean collate_flag); -void gl_print_op_set_outline_flag (glPrintOp *print_op, - gboolean outline_flag); -void gl_print_op_set_reverse_flag (glPrintOp *print_op, - gboolean reverse_flag); -void gl_print_op_set_crop_marks_flag (glPrintOp *print_op, - gboolean crop_marks_flag); - -gchar *gl_print_op_get_filename (glPrintOp *print_op); -gint gl_print_op_get_n_sheets (glPrintOp *print_op); -gint gl_print_op_get_n_copies (glPrintOp *print_op); -gint gl_print_op_get_first (glPrintOp *print_op); -gint gl_print_op_get_last (glPrintOp *print_op); -gboolean gl_print_op_get_collate_flag (glPrintOp *print_op); -gboolean gl_print_op_get_outline_flag (glPrintOp *print_op); -gboolean gl_print_op_get_reverse_flag (glPrintOp *print_op); -gboolean gl_print_op_get_crop_marks_flag (glPrintOp *print_op); - -void gl_print_op_force_outline (glPrintOp *print_op); -gboolean gl_print_op_is_outline_forced (glPrintOp *print_op); - -glPrintOpSettings *gl_print_op_get_settings (glPrintOp *print_op); -void gl_print_op_set_settings (glPrintOp *print_op, - glPrintOpSettings *settings); -void gl_print_op_free_settings (glPrintOpSettings *settings); - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/print.c b/glabels2/src/print.c deleted file mode 100644 index 2006e0ee..00000000 --- a/glabels2/src/print.c +++ /dev/null @@ -1,593 +0,0 @@ -/* - * print.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "print.h" - -#include -#include -#include -#include - -#include -#include "label.h" -#include "cairo-label-path.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private macros and constants. */ -/*===========================================*/ - -#define OUTLINE_RGB_ARGS 0.0, 0.0, 0.0 - -#define OUTLINE_WIDTH 0.25 - -#define TICK_OFFSET 2.25 -#define TICK_LENGTH 18.0 - - -/*=========================================================================*/ -/* Private types. */ -/*=========================================================================*/ - -typedef struct _PrintInfo { - cairo_t *cr; - - /* gLabels Template */ - lglTemplate *template; - gboolean label_rotate_flag; - - /* page size */ - gdouble page_width; - gdouble page_height; - -} PrintInfo; - - -/*=========================================================================*/ -/* Private function prototypes. */ -/*=========================================================================*/ -static PrintInfo *print_info_new (cairo_t *cr, - glLabel *label); - -static void print_info_free (PrintInfo **pi); - -static void print_crop_marks (PrintInfo *pi); - -static void print_label (PrintInfo *pi, - glLabel *label, - gdouble x, - gdouble y, - glMergeRecord *record, - gboolean outline_flag, - gboolean reverse_flag); - - -static void draw_outline (PrintInfo *pi, - glLabel *label); - -static void clip_to_outline (PrintInfo *pi, - glLabel *label); - - -/*****************************************************************************/ -/* Print simple sheet (no merge data) command. */ -/*****************************************************************************/ -void -gl_print_simple_sheet (glLabel *label, - cairo_t *cr, - gint page, - gint n_sheets, - gint first, - gint last, - gboolean outline_flag, - gboolean reverse_flag, - gboolean crop_marks_flag) -{ - PrintInfo *pi; - const lglTemplateFrame *frame; - gint i_label; - lglTemplateOrigin *origins; - - gl_debug (DEBUG_PRINT, "START"); - - pi = print_info_new (cr, label); - - frame = (lglTemplateFrame *)pi->template->frames->data; - origins = lgl_template_frame_get_origins (frame); - - if (crop_marks_flag) { - print_crop_marks (pi); - } - - for (i_label = first - 1; i_label < last; i_label++) { - - print_label (pi, label, - origins[i_label].x, origins[i_label].y, - NULL, outline_flag, reverse_flag); - - } - - g_free (origins); - - print_info_free (&pi); - - gl_debug (DEBUG_PRINT, "END"); -} - - -/*****************************************************************************/ -/* Print collated merge sheet command */ -/*****************************************************************************/ -void -gl_print_collated_merge_sheet (glLabel *label, - cairo_t *cr, - gint page, - gint n_copies, - gint first, - gboolean outline_flag, - gboolean reverse_flag, - gboolean crop_marks_flag, - glPrintState *state) -{ - glMerge *merge; - const GList *record_list; - PrintInfo *pi; - const lglTemplateFrame *frame; - gint i_label, n_labels_per_page, i_copy; - glMergeRecord *record; - GList *p; - lglTemplateOrigin *origins; - - gl_debug (DEBUG_PRINT, "START"); - - merge = gl_label_get_merge (label); - record_list = gl_merge_get_record_list (merge); - - pi = print_info_new (cr, label); - frame = (lglTemplateFrame *)pi->template->frames->data; - - n_labels_per_page = lgl_template_frame_get_n_labels (frame); - origins = lgl_template_frame_get_origins (frame); - - if (crop_marks_flag) { - print_crop_marks (pi); - } - - if (page == 0) - { - state->i_copy = 0; - state->p_record = (GList *)record_list; - - i_label = first - 1; - } - else - { - i_label = 0; - } - - - for ( p=(GList *)state->p_record; p!=NULL; p=p->next ) { - record = (glMergeRecord *)p->data; - - if ( record->select_flag ) { - for (i_copy = state->i_copy; i_copy < n_copies; i_copy++) { - - print_label (pi, label, - origins[i_label].x, - origins[i_label].y, - record, - outline_flag, reverse_flag); - - i_label++; - if (i_label == n_labels_per_page) - { - g_free (origins); - print_info_free (&pi); - - state->i_copy = (i_copy+1) % n_copies; - if (state->i_copy == 0) - { - state->p_record = p->next; - } - else - { - state->p_record = p; - } - return; - } - } - state->i_copy = 0; - } - } - - g_free (origins); - print_info_free (&pi); - - gl_debug (DEBUG_PRINT, "END"); -} - - -/*****************************************************************************/ -/* Print uncollated merge sheet command */ -/*****************************************************************************/ -void -gl_print_uncollated_merge_sheet (glLabel *label, - cairo_t *cr, - gint page, - gint n_copies, - gint first, - gboolean outline_flag, - gboolean reverse_flag, - gboolean crop_marks_flag, - glPrintState *state) -{ - glMerge *merge; - const GList *record_list; - PrintInfo *pi; - const lglTemplateFrame *frame; - gint i_label, n_labels_per_page, i_copy; - glMergeRecord *record; - GList *p; - lglTemplateOrigin *origins; - - gl_debug (DEBUG_PRINT, "START"); - - merge = gl_label_get_merge (label); - record_list = gl_merge_get_record_list (merge); - - pi = print_info_new (cr, label); - frame = (lglTemplateFrame *)pi->template->frames->data; - - n_labels_per_page = lgl_template_frame_get_n_labels (frame); - origins = lgl_template_frame_get_origins (frame); - - if (crop_marks_flag) { - print_crop_marks (pi); - } - - if (page == 0) - { - state->i_copy = 0; - state->p_record = (GList *)record_list; - - i_label = first - 1; - } - else - { - i_label = 0; - } - - for (i_copy = state->i_copy; i_copy < n_copies; i_copy++) { - - for ( p=state->p_record; p!=NULL; p=p->next ) { - record = (glMergeRecord *)p->data; - - if ( record->select_flag ) { - - print_label (pi, label, - origins[i_label].x, - origins[i_label].y, - record, - outline_flag, reverse_flag); - - i_label++; - if (i_label == n_labels_per_page) - { - g_free (origins); - print_info_free (&pi); - - state->p_record = p->next; - if (state->p_record == NULL) - { - state->p_record = (GList *)record_list; - state->i_copy = i_copy + 1; - } - else - { - state->i_copy = i_copy; - } - return; - } - } - } - state->p_record = (GList *)record_list; - - } - - g_free (origins); - print_info_free (&pi); - - gl_debug (DEBUG_PRINT, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. new print info structure */ -/*---------------------------------------------------------------------------*/ -static PrintInfo * -print_info_new (cairo_t *cr, - glLabel *label) -{ - PrintInfo *pi = g_new0 (PrintInfo, 1); - - gl_debug (DEBUG_PRINT, "START"); - - g_return_val_if_fail (label && GL_IS_LABEL (label), NULL); - - g_return_val_if_fail (label->template, NULL); - g_return_val_if_fail (label->template->paper_id, NULL); - g_return_val_if_fail (label->template->page_width > 0, NULL); - g_return_val_if_fail (label->template->page_height > 0, NULL); - - pi->cr = cr; - - gl_debug (DEBUG_PRINT, - "setting page size = \"%s\"", label->template->paper_id); - - pi->page_width = label->template->page_width; - pi->page_height = label->template->page_height; - - pi->template = label->template; - pi->label_rotate_flag = label->rotate_flag; - - gl_debug (DEBUG_PRINT, "END"); - - return pi; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. free print info structure */ -/*---------------------------------------------------------------------------*/ -static void -print_info_free (PrintInfo **pi) -{ - gl_debug (DEBUG_PRINT, "START"); - - - g_free (*pi); - *pi = NULL; - - gl_debug (DEBUG_PRINT, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Print crop tick marks. */ -/*---------------------------------------------------------------------------*/ -static void -print_crop_marks (PrintInfo *pi) -{ - const lglTemplateFrame *frame; - gdouble w, h, page_w, page_h; - GList *p; - lglTemplateLayout *layout; - gdouble xmin, ymin, xmax, ymax, dx, dy; - gdouble x1, y1, x2, y2, x3, y3, x4, y4; - gint ix, iy, nx, ny; - - gl_debug (DEBUG_PRINT, "START"); - - frame = (lglTemplateFrame *)pi->template->frames->data; - - lgl_template_frame_get_size (frame, &w, &h); - - page_w = pi->page_width; - page_h = pi->page_height; - - cairo_save (pi->cr); - - cairo_set_source_rgb (pi->cr, OUTLINE_RGB_ARGS); - cairo_set_line_width (pi->cr, OUTLINE_WIDTH); - - for (p=frame->all.layouts; p != NULL; p=p->next) { - - layout = (lglTemplateLayout *)p->data; - - xmin = layout->x0; - ymin = layout->y0; - xmax = layout->x0 + layout->dx*(layout->nx - 1) + w; - ymax = layout->y0 + layout->dy*(layout->ny - 1) + h; - - dx = layout->dx; - dy = layout->dy; - - nx = layout->nx; - ny = layout->ny; - - for (ix=0; ix < nx; ix++) { - - x1 = xmin + ix*dx; - x2 = x1 + w; - - y1 = MAX((ymin - TICK_OFFSET), 0.0); - y2 = MAX((y1 - TICK_LENGTH), 0.0); - - y3 = MIN((ymax + TICK_OFFSET), page_h); - y4 = MIN((y3 + TICK_LENGTH), page_h); - - cairo_move_to (pi->cr, x1, y1); - cairo_line_to (pi->cr, x1, y2); - cairo_stroke (pi->cr); - - cairo_move_to (pi->cr, x2, y1); - cairo_line_to (pi->cr, x2, y2); - cairo_stroke (pi->cr); - - cairo_move_to (pi->cr, x1, y3); - cairo_line_to (pi->cr, x1, y4); - cairo_stroke (pi->cr); - - cairo_move_to (pi->cr, x2, y3); - cairo_line_to (pi->cr, x2, y4); - cairo_stroke (pi->cr); - - } - - for (iy=0; iy < ny; iy++) { - - y1 = ymin + iy*dy; - y2 = y1 + h; - - x1 = MAX((xmin - TICK_OFFSET), 0.0); - x2 = MAX((x1 - TICK_LENGTH), 0.0); - - x3 = MIN((xmax + TICK_OFFSET), page_w); - x4 = MIN((x3 + TICK_LENGTH), page_w); - - cairo_move_to (pi->cr, x1, y1); - cairo_line_to (pi->cr, x2, y1); - cairo_stroke (pi->cr); - - cairo_move_to (pi->cr, x1, y2); - cairo_line_to (pi->cr, x2, y2); - cairo_stroke (pi->cr); - - cairo_move_to (pi->cr, x3, y1); - cairo_line_to (pi->cr, x4, y1); - cairo_stroke (pi->cr); - - cairo_move_to (pi->cr, x3, y2); - cairo_line_to (pi->cr, x4, y2); - cairo_stroke (pi->cr); - - } - - } - - cairo_restore (pi->cr); - - gl_debug (DEBUG_PRINT, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Print i'th label. */ -/*---------------------------------------------------------------------------*/ -static void -print_label (PrintInfo *pi, - glLabel *label, - gdouble x, - gdouble y, - glMergeRecord *record, - gboolean outline_flag, - gboolean reverse_flag) -{ - const lglTemplateFrame *frame; - gdouble width, height; - - gl_debug (DEBUG_PRINT, "START"); - - frame = (lglTemplateFrame *)pi->template->frames->data; - - gl_label_get_size (label, &width, &height); - - cairo_save (pi->cr); - - /* Transform coordinate system to be relative to upper corner */ - /* of the current label */ - cairo_translate (pi->cr, x, y); - - clip_to_outline (pi, label); - - cairo_save (pi->cr); - - /* Special transformations. */ - if (label->rotate_flag) { - gl_debug (DEBUG_PRINT, "Rotate flag set"); - cairo_rotate (pi->cr, -M_PI/2.0); - cairo_translate (pi->cr, -width, 0.0); - } - if ( reverse_flag ) { - cairo_translate (pi->cr, width, 0.0); - cairo_scale (pi->cr, -1.0, 1.0); - } - - gl_label_draw (label, pi->cr, FALSE, record); - - cairo_restore (pi->cr); /* From special transformations. */ - - if (outline_flag) { - draw_outline (pi, label); - } - - cairo_restore (pi->cr); /* From translation. */ - - gl_debug (DEBUG_PRINT, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw outline. */ -/*---------------------------------------------------------------------------*/ -static void -draw_outline (PrintInfo *pi, - glLabel *label) -{ - gl_debug (DEBUG_PRINT, "START"); - - cairo_save (pi->cr); - - cairo_set_source_rgb (pi->cr, OUTLINE_RGB_ARGS); - cairo_set_line_width (pi->cr, OUTLINE_WIDTH); - - gl_cairo_label_path (pi->cr, label->template, FALSE, FALSE); - - cairo_stroke (pi->cr); - - cairo_restore (pi->cr); - - gl_debug (DEBUG_PRINT, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Clip to outline. */ -/*---------------------------------------------------------------------------*/ -static void -clip_to_outline (PrintInfo *pi, - glLabel *label) -{ - gl_debug (DEBUG_PRINT, "START"); - - gl_cairo_label_path (pi->cr, label->template, FALSE, TRUE); - - cairo_set_fill_rule (pi->cr, CAIRO_FILL_RULE_EVEN_ODD); - cairo_clip (pi->cr); - - gl_debug (DEBUG_PRINT, "END"); -} - - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/print.h b/glabels2/src/print.h deleted file mode 100644 index 5d79c7ba..00000000 --- a/glabels2/src/print.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * print.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __PRINT_H__ -#define __PRINT_H__ - -#include - -#include "label.h" - -G_BEGIN_DECLS - -typedef struct { - gint i_copy; - GList *p_record; -} glPrintState; - -void gl_print_simple_sheet (glLabel *label, - cairo_t *cr, - gint page, - gint n_sheets, - gint first, - gint last, - gboolean outline_flag, - gboolean reverse_flag, - gboolean crop_marks_flag); - -void gl_print_collated_merge_sheet (glLabel *label, - cairo_t *cr, - gint page, - gint n_copies, - gint first, - gboolean outline_flag, - gboolean reverse_flag, - gboolean crop_marks_flag, - glPrintState *state); - -void gl_print_uncollated_merge_sheet (glLabel *label, - cairo_t *cr, - gint page, - gint n_copies, - gint first, - gboolean outline_flag, - gboolean reverse_flag, - gboolean crop_marks_flag, - glPrintState *state); - -G_END_DECLS - -#endif - - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/recent.c b/glabels2/src/recent.c deleted file mode 100644 index 38244ab1..00000000 --- a/glabels2/src/recent.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * recent.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "recent.h" - -#include -#include - -#include "prefs.h" - -#include "debug.h" - -#define GLABELS_MIME_TYPE "application/x-glabels" - -static GtkRecentManager *model; - - -/*****************************************************************************/ -/* Initialize recent files model. */ -/*****************************************************************************/ -void -gl_recent_init (void) -{ - gl_debug (DEBUG_RECENT, "START"); - - model = gtk_recent_manager_get_default (); - - gl_debug (DEBUG_RECENT, "END"); -} - - -/*****************************************************************************/ -/* Get UTF8 filename from GtkRecentInfo structure. */ -/*****************************************************************************/ -gchar * -gl_recent_get_utf8_filename (GtkRecentInfo *item) -{ - const gchar *uri; - gchar *filename; - gchar *utf8_filename = NULL; - - gl_debug (DEBUG_RECENT, "START"); - - uri = gtk_recent_info_get_uri (item); - - filename = g_filename_from_uri (uri, NULL, NULL); - if ( filename != NULL ) - { - utf8_filename = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); - g_free (filename); - } - - return utf8_filename; - gl_debug (DEBUG_RECENT, "END"); -} - - -/*****************************************************************************/ -/* Add file by UTF8 filename to recent model. */ -/*****************************************************************************/ -void -gl_recent_add_utf8_filename (gchar *utf8_filename) -{ - GtkRecentData *recent_data; - gchar *filename; - gchar *uri; - - static gchar *groups[2] = { - "glabels", - NULL - }; - - gl_debug (DEBUG_RECENT, "START"); - - recent_data = g_slice_new (GtkRecentData); - - recent_data->display_name = NULL; - recent_data->description = NULL; - recent_data->mime_type = GLABELS_MIME_TYPE; - recent_data->app_name = (gchar *) g_get_application_name (); - recent_data->app_exec = g_strjoin (" ", g_get_prgname (), "%f", NULL); - recent_data->groups = groups; - recent_data->is_private = FALSE; - - filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); - if ( filename != NULL ) - { - - uri = g_filename_to_uri (filename, NULL, NULL); - if ( uri != NULL ) - { - - gtk_recent_manager_add_full (model, uri, recent_data); - g_free (uri); - - } - g_free (filename); - - } - - g_free (recent_data->app_exec); - g_slice_free (GtkRecentData, recent_data); - - gl_debug (DEBUG_RECENT, "END"); -} - - -/*****************************************************************************/ -/* Create a menu of recent files. */ -/*****************************************************************************/ -GtkWidget * -gl_recent_create_menu (void) -{ - GtkWidget *recent_menu; - GtkRecentFilter *recent_filter; - - gl_debug (DEBUG_RECENT, "START"); - - recent_menu = - gtk_recent_chooser_menu_new_for_manager (model); - gtk_recent_chooser_menu_set_show_numbers (GTK_RECENT_CHOOSER_MENU (recent_menu), FALSE); - gtk_recent_chooser_set_show_icons (GTK_RECENT_CHOOSER (recent_menu), TRUE); - gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (recent_menu), gl_prefs->max_recents); - gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (recent_menu), GTK_RECENT_SORT_MRU); - gtk_recent_chooser_set_local_only (GTK_RECENT_CHOOSER (recent_menu), TRUE); - - recent_filter = gtk_recent_filter_new (); - gtk_recent_filter_add_mime_type (recent_filter, GLABELS_MIME_TYPE); - gtk_recent_chooser_set_filter (GTK_RECENT_CHOOSER (recent_menu), recent_filter); - - gl_debug (DEBUG_RECENT, "END"); - return recent_menu; -} - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/recent.h b/glabels2/src/recent.h deleted file mode 100644 index f3a19d2a..00000000 --- a/glabels2/src/recent.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * recent.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __RECENT_H__ -#define __RECENT_H__ - -#include - -G_BEGIN_DECLS - -void gl_recent_init (void); - -gchar *gl_recent_get_utf8_filename (GtkRecentInfo *item); - -void gl_recent_add_utf8_filename (gchar *utf8_filename); - -GtkWidget *gl_recent_create_menu (void); - - -G_END_DECLS - -#endif /*__RECENT_H__*/ - - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/rotate-label-button.c b/glabels2/src/rotate-label-button.c deleted file mode 100644 index 65a880f1..00000000 --- a/glabels2/src/rotate-label-button.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - * rotate-label-button.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "rotate-label-button.h" - -#include -#include -#include - -#include -#include "mini-label-preview.h" -#include "hig.h" -#include "marshal.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - -#define SIZE 48 - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -struct _glRotateLabelButtonPrivate { - - GtkWidget *no_rotate_radio; - GtkWidget *rotate_radio; - GtkWidget *no_rotate_preview; - GtkWidget *rotate_preview; -}; - -enum { - CHANGED, - LAST_SIGNAL -}; - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static gint rotate_label_button_signals[LAST_SIGNAL] = { 0 }; - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_rotate_label_button_finalize (GObject *object); - -static void toggled_cb (GtkToggleButton *toggle, - gpointer user_data); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glRotateLabelButton, gl_rotate_label_button, GTK_TYPE_HBOX); - - -static void -gl_rotate_label_button_class_init (glRotateLabelButtonClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_rotate_label_button_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_rotate_label_button_finalize; - - rotate_label_button_signals[CHANGED] = - g_signal_new ("changed", - G_OBJECT_CLASS_TYPE(object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glRotateLabelButtonClass, changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, 0); - -} - - -static void -gl_rotate_label_button_init (glRotateLabelButton *this) -{ - GtkWidget *vbox; - GtkWidget *label; - - this->priv = g_new0 (glRotateLabelButtonPrivate, 1); - - gtk_container_set_border_width (GTK_CONTAINER (this), GL_HIG_PAD2); - - this->priv->no_rotate_radio = gtk_radio_button_new (NULL); - gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (this->priv->no_rotate_radio), - FALSE); - vbox = gtk_vbox_new (FALSE, 1); - this->priv->no_rotate_preview = gl_mini_label_preview_new (SIZE, SIZE); - gtk_box_pack_start (GTK_BOX (vbox), this->priv->no_rotate_preview, FALSE, FALSE, 0); - label = gtk_label_new (_("Normal")); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); - gtk_container_add (GTK_CONTAINER (this->priv->no_rotate_radio), vbox); - - - this->priv->rotate_radio = gtk_radio_button_new_from_widget (GTK_RADIO_BUTTON (this->priv->no_rotate_radio)); - gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (this->priv->rotate_radio), - FALSE); - vbox = gtk_vbox_new (FALSE, 1); - this->priv->rotate_preview = gl_mini_label_preview_new (SIZE, SIZE); - gtk_box_pack_start (GTK_BOX (vbox), this->priv->rotate_preview, FALSE, FALSE, 0); - label = gtk_label_new (_("Rotated")); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); - gtk_container_add (GTK_CONTAINER (this->priv->rotate_radio), vbox); - - gtk_box_pack_start (GTK_BOX (this), - this->priv->no_rotate_radio, - FALSE, FALSE, GL_HIG_PAD1); - gtk_box_pack_start (GTK_BOX (this), - this->priv->rotate_radio, - FALSE, FALSE, GL_HIG_PAD1); - - /* Connect signals to controls */ - g_signal_connect (G_OBJECT (this->priv->no_rotate_radio), - "toggled", - G_CALLBACK (toggled_cb), this); - g_signal_connect (G_OBJECT (this->priv->rotate_radio), - "toggled", - G_CALLBACK (toggled_cb), this); -} - - -static void -gl_rotate_label_button_finalize (GObject *object) -{ - glRotateLabelButton *this = GL_ROTATE_LABEL_BUTTON (object); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_ROTATE_LABEL_BUTTON (object)); - - g_free (this->priv); - - G_OBJECT_CLASS (gl_rotate_label_button_parent_class)->finalize (object); -} - - -GtkWidget * -gl_rotate_label_button_new (void) -{ - glRotateLabelButton *this; - - this = g_object_new (gl_rotate_label_button_get_type (), NULL); - - return GTK_WIDGET (this); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change of check button */ -/*--------------------------------------------------------------------------*/ -static void -toggled_cb (GtkToggleButton *toggle, - gpointer user_data) -{ - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (user_data), - rotate_label_button_signals[CHANGED], 0); - -} - - -/****************************************************************************/ -/* query state of widget. */ -/****************************************************************************/ -gboolean -gl_rotate_label_button_get_state (glRotateLabelButton *this) -{ - return - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON - (this->priv->rotate_radio)); -} - -/****************************************************************************/ -/* set state of widget. */ -/****************************************************************************/ -void -gl_rotate_label_button_set_state (glRotateLabelButton *this, - gboolean state) -{ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (this->priv->rotate_radio), state); -} - -/****************************************************************************/ -/* set template for widget. */ -/****************************************************************************/ -void -gl_rotate_label_button_set_template_name (glRotateLabelButton *this, - gchar *name) -{ - lglTemplate *template; - const lglTemplateFrame *frame; - gdouble raw_w, raw_h; - - if (name == NULL) - { - gtk_widget_set_sensitive (this->priv->no_rotate_radio, FALSE); - gtk_widget_set_sensitive (this->priv->rotate_radio, FALSE); - } - else - { - template = lgl_db_lookup_template_from_name (name); - frame = (lglTemplateFrame *)template->frames->data; - - gl_mini_label_preview_set_by_name (GL_MINI_LABEL_PREVIEW (this->priv->no_rotate_preview), - name, FALSE); - gl_mini_label_preview_set_by_name (GL_MINI_LABEL_PREVIEW (this->priv->rotate_preview), - name, TRUE); - - lgl_template_frame_get_size (frame, &raw_w, &raw_h); - gtk_widget_set_sensitive (this->priv->no_rotate_radio, - (raw_w != raw_h)); - gtk_widget_set_sensitive (this->priv->rotate_radio, - (raw_w != raw_h)); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (this->priv->no_rotate_radio), TRUE); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON - (this->priv->rotate_radio), FALSE); - } - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/rotate-label-button.h b/glabels2/src/rotate-label-button.h deleted file mode 100644 index 049d80e8..00000000 --- a/glabels2/src/rotate-label-button.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * rotate-label-button.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __ROTATE_LABEL_BUTTON_H__ -#define __ROTATE_LABEL_BUTTON_H__ - -#include - -G_BEGIN_DECLS - -#define GL_TYPE_ROTATE_LABEL_BUTTON (gl_rotate_label_button_get_type ()) -#define GL_ROTATE_LABEL_BUTTON(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_ROTATE_LABEL_BUTTON, glRotateLabelButton )) -#define GL_ROTATE_LABEL_BUTTON_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_ROTATE_LABEL_BUTTON, glRotateLabelButtonClass)) -#define GL_IS_ROTATE_LABEL_BUTTON(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_ROTATE_LABEL_BUTTON)) -#define GL_IS_ROTATE_LABEL_BUTTON_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_ROTATE_LABEL_BUTTON)) - - -typedef struct _glRotateLabelButton glRotateLabelButton; -typedef struct _glRotateLabelButtonClass glRotateLabelButtonClass; - -typedef struct _glRotateLabelButtonPrivate glRotateLabelButtonPrivate; - -struct _glRotateLabelButton { - GtkHBox parent_widget; - - glRotateLabelButtonPrivate *priv; -}; - -struct _glRotateLabelButtonClass { - GtkHBoxClass parent_class; - - void (*changed) (glRotateLabelButton *rotate_label_button, - gpointer user_data); -}; - - -GType gl_rotate_label_button_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_rotate_label_button_new (void); - -gboolean gl_rotate_label_button_get_state (glRotateLabelButton *rotate_label); - -void gl_rotate_label_button_set_state (glRotateLabelButton *rotate_label, - gboolean state); - -void gl_rotate_label_button_set_template_name (glRotateLabelButton *rotate_label, - gchar *name); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/stock-pixmaps/Makefile.am b/glabels2/src/stock-pixmaps/Makefile.am deleted file mode 100644 index 00625378..00000000 --- a/glabels2/src/stock-pixmaps/Makefile.am +++ /dev/null @@ -1,95 +0,0 @@ - -IMAGES = \ - stock_arrow_24.png \ - stock_arrow_16.png \ - stock_barcode_24.png \ - stock_barcode_16.png \ - stock_box_24.png \ - stock_box_16.png \ - stock_ellipse_24.png \ - stock_ellipse_16.png \ - stock_image_24.png \ - stock_image_16.png \ - stock_line_24.png \ - stock_line_16.png \ - stock_merge_24.png \ - stock_merge_16.png \ - stock_properties_24.png \ - stock_properties_16.png \ - stock_text_24.png \ - stock_text_16.png \ - stock_order_top_16.png \ - stock_order_bottom_16.png \ - stock_rotate_left_16.png \ - stock_rotate_right_16.png \ - stock_flip_horiz_16.png \ - stock_flip_vert_16.png \ - stock_align_left_16.png \ - stock_align_right_16.png \ - stock_align_hcenter_16.png \ - stock_align_top_16.png \ - stock_align_bottom_16.png \ - stock_align_vcenter_16.png \ - stock_center_horiz_16.png \ - stock_center_vert_16.png \ - stock_bucket_fill_16.png \ - stock_bucket_fill_24.png \ - stock_pencil_16.png \ - stock_pencil_24.png \ - stock_hchain_24.png \ - stock_hchain_broken_24.png \ - stock_vchain_24.png \ - stock_vchain_broken_24.png - -VARIABLES1 = \ - stock_arrow_24 $(srcdir)/stock_arrow_24.png \ - stock_arrow_16 $(srcdir)/stock_arrow_16.png \ - stock_barcode_24 $(srcdir)/stock_barcode_24.png \ - stock_barcode_16 $(srcdir)/stock_barcode_16.png \ - stock_box_24 $(srcdir)/stock_box_24.png \ - stock_box_16 $(srcdir)/stock_box_16.png \ - stock_ellipse_24 $(srcdir)/stock_ellipse_24.png \ - stock_ellipse_16 $(srcdir)/stock_ellipse_16.png \ - stock_image_24 $(srcdir)/stock_image_24.png \ - stock_image_16 $(srcdir)/stock_image_16.png \ - stock_line_24 $(srcdir)/stock_line_24.png \ - stock_line_16 $(srcdir)/stock_line_16.png \ - stock_merge_24 $(srcdir)/stock_merge_24.png \ - stock_merge_16 $(srcdir)/stock_merge_16.png \ - stock_properties_24 $(srcdir)/stock_properties_24.png \ - stock_properties_16 $(srcdir)/stock_properties_16.png \ - stock_text_24 $(srcdir)/stock_text_24.png \ - stock_text_16 $(srcdir)/stock_text_16.png \ - stock_order_top_16 $(srcdir)/stock_order_top_16.png \ - stock_order_bottom_16 $(srcdir)/stock_order_bottom_16.png \ - stock_rotate_left_16 $(srcdir)/stock_rotate_left_16.png \ - stock_rotate_right_16 $(srcdir)/stock_rotate_right_16.png \ - stock_flip_horiz_16 $(srcdir)/stock_flip_horiz_16.png \ - stock_flip_vert_16 $(srcdir)/stock_flip_vert_16.png \ - stock_align_left_16 $(srcdir)/stock_align_left_16.png \ - stock_align_right_16 $(srcdir)/stock_align_right_16.png \ - stock_align_hcenter_16 $(srcdir)/stock_align_hcenter_16.png \ - stock_align_top_16 $(srcdir)/stock_align_top_16.png \ - stock_align_bottom_16 $(srcdir)/stock_align_bottom_16.png \ - stock_align_vcenter_16 $(srcdir)/stock_align_vcenter_16.png \ - stock_center_horiz_16 $(srcdir)/stock_center_horiz_16.png \ - stock_center_vert_16 $(srcdir)/stock_center_vert_16.png \ - stock_bucket_fill_16 $(srcdir)/stock_bucket_fill_16.png \ - stock_bucket_fill_24 $(srcdir)/stock_bucket_fill_24.png \ - stock_pencil_16 $(srcdir)/stock_pencil_16.png \ - stock_pencil_24 $(srcdir)/stock_pencil_24.png \ - stock_hchain_24 $(srcdir)/stock_hchain_24.png \ - stock_hchain_broken_24 $(srcdir)/stock_hchain_broken_24.png \ - stock_vchain_24 $(srcdir)/stock_vchain_24.png \ - stock_vchain_broken_24 $(srcdir)/stock_vchain_broken_24.png - - -noinst_DATA = stockpixbufs.h -CLEANFILES = $(noinst_DATA) - -stockpixbufs.h: $(IMAGES) - $(AM_V_GEN) $(GDK_PIXBUF_CSOURCE) \ - --raw --build-list $(VARIABLES1) > $(srcdir)/stockpixbufs.h || \ - ( rm -f $(srcdir)/stockpixbufs.h && false ) - -EXTRA_DIST = $(IMAGES) stockpixbufs.h diff --git a/glabels2/src/stock-pixmaps/stock_align_bottom_16.png b/glabels2/src/stock-pixmaps/stock_align_bottom_16.png deleted file mode 100644 index da901bc4..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_align_bottom_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_align_hcenter_16.png b/glabels2/src/stock-pixmaps/stock_align_hcenter_16.png deleted file mode 100644 index 684c1259..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_align_hcenter_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_align_left_16.png b/glabels2/src/stock-pixmaps/stock_align_left_16.png deleted file mode 100644 index 1cdcf9bc..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_align_left_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_align_right_16.png b/glabels2/src/stock-pixmaps/stock_align_right_16.png deleted file mode 100644 index 2b4872b0..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_align_right_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_align_top_16.png b/glabels2/src/stock-pixmaps/stock_align_top_16.png deleted file mode 100644 index 5bda931c..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_align_top_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_align_vcenter_16.png b/glabels2/src/stock-pixmaps/stock_align_vcenter_16.png deleted file mode 100644 index a51293f0..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_align_vcenter_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_arrow_16.png b/glabels2/src/stock-pixmaps/stock_arrow_16.png deleted file mode 100644 index 0ae5f368..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_arrow_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_arrow_24.png b/glabels2/src/stock-pixmaps/stock_arrow_24.png deleted file mode 100644 index 6e0e26af..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_arrow_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_barcode_16.png b/glabels2/src/stock-pixmaps/stock_barcode_16.png deleted file mode 100644 index 6e0e2890..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_barcode_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_barcode_24.png b/glabels2/src/stock-pixmaps/stock_barcode_24.png deleted file mode 100644 index 9699c8dd..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_barcode_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_box_16.png b/glabels2/src/stock-pixmaps/stock_box_16.png deleted file mode 100644 index c141c9d5..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_box_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_box_24.png b/glabels2/src/stock-pixmaps/stock_box_24.png deleted file mode 100644 index 9f8e06f8..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_box_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_bucket_fill_16.png b/glabels2/src/stock-pixmaps/stock_bucket_fill_16.png deleted file mode 100644 index 2be70def..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_bucket_fill_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_bucket_fill_24.png b/glabels2/src/stock-pixmaps/stock_bucket_fill_24.png deleted file mode 100644 index 1ee5993e..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_bucket_fill_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_center_horiz_16.png b/glabels2/src/stock-pixmaps/stock_center_horiz_16.png deleted file mode 100644 index fce3e909..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_center_horiz_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_center_vert_16.png b/glabels2/src/stock-pixmaps/stock_center_vert_16.png deleted file mode 100644 index 08b19af0..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_center_vert_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_ellipse_16.png b/glabels2/src/stock-pixmaps/stock_ellipse_16.png deleted file mode 100644 index 9652562e..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_ellipse_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_ellipse_24.png b/glabels2/src/stock-pixmaps/stock_ellipse_24.png deleted file mode 100644 index 12f0468f..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_ellipse_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_flip_horiz_16.png b/glabels2/src/stock-pixmaps/stock_flip_horiz_16.png deleted file mode 100644 index e4770685..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_flip_horiz_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_flip_vert_16.png b/glabels2/src/stock-pixmaps/stock_flip_vert_16.png deleted file mode 100644 index 93027c93..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_flip_vert_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_hchain_24.png b/glabels2/src/stock-pixmaps/stock_hchain_24.png deleted file mode 100644 index 5bc2eedc..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_hchain_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_hchain_broken_24.png b/glabels2/src/stock-pixmaps/stock_hchain_broken_24.png deleted file mode 100644 index 2e961a3e..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_hchain_broken_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_image_16.png b/glabels2/src/stock-pixmaps/stock_image_16.png deleted file mode 100644 index ee9ed3d2..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_image_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_image_24.png b/glabels2/src/stock-pixmaps/stock_image_24.png deleted file mode 100644 index 093c8ad9..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_image_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_line_16.png b/glabels2/src/stock-pixmaps/stock_line_16.png deleted file mode 100644 index cf0e0406..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_line_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_line_24.png b/glabels2/src/stock-pixmaps/stock_line_24.png deleted file mode 100644 index 7bb65234..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_line_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_merge_16.png b/glabels2/src/stock-pixmaps/stock_merge_16.png deleted file mode 100644 index 2a3bfe8b..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_merge_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_merge_24.png b/glabels2/src/stock-pixmaps/stock_merge_24.png deleted file mode 100644 index af612006..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_merge_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_order_bottom_16.png b/glabels2/src/stock-pixmaps/stock_order_bottom_16.png deleted file mode 100644 index f6ed2d00..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_order_bottom_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_order_top_16.png b/glabels2/src/stock-pixmaps/stock_order_top_16.png deleted file mode 100644 index 0884bc1e..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_order_top_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_pencil_16.png b/glabels2/src/stock-pixmaps/stock_pencil_16.png deleted file mode 100644 index 83a14936..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_pencil_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_pencil_24.png b/glabels2/src/stock-pixmaps/stock_pencil_24.png deleted file mode 100644 index a36ce930..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_pencil_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_properties_16.png b/glabels2/src/stock-pixmaps/stock_properties_16.png deleted file mode 100644 index ab42b19c..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_properties_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_properties_24.png b/glabels2/src/stock-pixmaps/stock_properties_24.png deleted file mode 100644 index f5926060..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_properties_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_rotate_left_16.png b/glabels2/src/stock-pixmaps/stock_rotate_left_16.png deleted file mode 100644 index 157884e5..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_rotate_left_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_rotate_right_16.png b/glabels2/src/stock-pixmaps/stock_rotate_right_16.png deleted file mode 100644 index cc5dc49a..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_rotate_right_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_text_16.png b/glabels2/src/stock-pixmaps/stock_text_16.png deleted file mode 100644 index c539bf1e..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_text_16.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_text_24.png b/glabels2/src/stock-pixmaps/stock_text_24.png deleted file mode 100644 index b9e5511a..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_text_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_vchain_24.png b/glabels2/src/stock-pixmaps/stock_vchain_24.png deleted file mode 100644 index 7dc2031f..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_vchain_24.png and /dev/null differ diff --git a/glabels2/src/stock-pixmaps/stock_vchain_broken_24.png b/glabels2/src/stock-pixmaps/stock_vchain_broken_24.png deleted file mode 100644 index 8ef1363c..00000000 Binary files a/glabels2/src/stock-pixmaps/stock_vchain_broken_24.png and /dev/null differ diff --git a/glabels2/src/stock.c b/glabels2/src/stock.c deleted file mode 100644 index 7f312109..00000000 --- a/glabels2/src/stock.c +++ /dev/null @@ -1,225 +0,0 @@ -/* - * stock.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "stock.h" - -#include -#include -#include - -#include "stock-pixmaps/stockpixbufs.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void add_icons (GtkIconFactory *factory, - const gchar *stock_id, - const guchar *inline_24, - const guchar *inline_16); - -static void add_button_icon (GtkIconFactory *factory, - const gchar *stock_id, - const guchar *inline_24); - - -/****************************************************************************/ -/* Initialize our stock icons. */ -/****************************************************************************/ -void -gl_stock_init (void) -{ - GtkIconFactory *factory; - - static GtkStockItem items[] = { - { GL_STOCK_ARROW, N_("_Select Mode"), 0, 0, NULL }, - { GL_STOCK_TEXT, N_("_Text"), 0, 0, NULL }, - { GL_STOCK_LINE, N_("_Line"), 0, 0, NULL }, - { GL_STOCK_BOX, N_("_Box"), 0, 0, NULL }, - { GL_STOCK_ELLIPSE, N_("_Ellipse"), 0, 0, NULL }, - { GL_STOCK_IMAGE, N_("_Image"), 0, 0, NULL }, - { GL_STOCK_BARCODE, N_("Bar_code"), 0, 0, NULL }, - { GL_STOCK_MERGE, N_("_Merge Properties"), 0, 0, NULL }, - { GL_STOCK_PROPERTIES, N_("Object _Properties"), 0, 0, NULL }, - { GL_STOCK_ORDER_TOP, N_("Bring to _Front"), 0, 0, NULL }, - { GL_STOCK_ORDER_BOTTOM, N_("Send to _Back"), 0, 0, NULL }, - { GL_STOCK_ROTATE_LEFT, N_("Rotate _Left"), 0, 0, NULL }, - { GL_STOCK_ROTATE_RIGHT, N_("Rotate _Right"), 0, 0, NULL }, - { GL_STOCK_FLIP_HORIZ, N_("Flip _Horizontally"), 0, 0, NULL }, - { GL_STOCK_FLIP_VERT, N_("Flip _Vertically"), 0, 0, NULL }, - { GL_STOCK_ALIGN_LEFT, N_("_Lefts"), 0, 0, NULL }, - { GL_STOCK_ALIGN_RIGHT, N_("_Rights"), 0, 0, NULL }, - { GL_STOCK_ALIGN_HCENTER, N_("_Centers"), 0, 0, NULL }, - { GL_STOCK_ALIGN_TOP, N_("_Tops"), 0, 0, NULL }, - { GL_STOCK_ALIGN_BOTTOM, N_("Bottoms"), 0, 0, NULL }, - { GL_STOCK_ALIGN_VCENTER, N_("Centers"), 0, 0, NULL }, - { GL_STOCK_CENTER_HORIZ, N_("Label Ce_nter"), 0, 0, NULL }, - { GL_STOCK_CENTER_VERT, N_("Label Ce_nter"), 0, 0, NULL }, - { GL_STOCK_BUCKET_FILL, N_("Fill color"), 0, 0, NULL }, - { GL_STOCK_PENCIL, N_("Line color"), 0, 0, NULL }, - { GL_STOCK_HCHAIN, N_("Linked"), 0, 0, NULL }, - { GL_STOCK_HCHAIN_BROKEN, N_("Not Linked"), 0, 0, NULL }, - { GL_STOCK_VCHAIN, N_("Linked"), 0, 0, NULL }, - { GL_STOCK_VCHAIN_BROKEN, N_("Not Linked"), 0, 0, NULL }, - }; - - gtk_stock_add (items, G_N_ELEMENTS (items)); - - factory = gtk_icon_factory_new (); - gtk_icon_factory_add_default (factory); - - add_icons (factory, GL_STOCK_ARROW, stock_arrow_24, stock_arrow_16); - add_icons (factory, GL_STOCK_TEXT, stock_text_24, stock_text_16); - add_icons (factory, GL_STOCK_LINE, stock_line_24, stock_line_16); - add_icons (factory, GL_STOCK_BOX, stock_box_24, stock_box_16); - add_icons (factory, GL_STOCK_ELLIPSE, stock_ellipse_24, stock_ellipse_16); - add_icons (factory, GL_STOCK_IMAGE, stock_image_24, stock_image_16); - add_icons (factory, GL_STOCK_BARCODE, stock_barcode_24, stock_barcode_16); - add_icons (factory, GL_STOCK_MERGE, stock_merge_24, stock_merge_16); - - add_icons (factory, GL_STOCK_PROPERTIES, - stock_properties_24, - stock_properties_16); - - add_icons (factory, GL_STOCK_ORDER_TOP, NULL, stock_order_top_16); - add_icons (factory, GL_STOCK_ORDER_BOTTOM, NULL, stock_order_bottom_16); - add_icons (factory, GL_STOCK_ROTATE_LEFT, NULL, stock_rotate_left_16); - add_icons (factory, GL_STOCK_ROTATE_RIGHT, NULL, stock_rotate_right_16); - add_icons (factory, GL_STOCK_FLIP_HORIZ, NULL, stock_flip_horiz_16); - add_icons (factory, GL_STOCK_FLIP_VERT, NULL, stock_flip_vert_16); - add_icons (factory, GL_STOCK_ALIGN_LEFT, NULL, stock_align_left_16); - add_icons (factory, GL_STOCK_ALIGN_RIGHT, NULL, stock_align_right_16); - add_icons (factory, GL_STOCK_ALIGN_HCENTER, NULL, stock_align_hcenter_16); - add_icons (factory, GL_STOCK_ALIGN_TOP, NULL, stock_align_top_16); - add_icons (factory, GL_STOCK_ALIGN_BOTTOM, NULL, stock_align_bottom_16); - add_icons (factory, GL_STOCK_ALIGN_VCENTER, NULL, stock_align_vcenter_16); - add_icons (factory, GL_STOCK_CENTER_HORIZ, NULL, stock_center_horiz_16); - add_icons (factory, GL_STOCK_CENTER_VERT, NULL, stock_center_vert_16); - - add_icons (factory, GL_STOCK_BUCKET_FILL, stock_bucket_fill_24, stock_bucket_fill_16); - add_icons (factory, GL_STOCK_PENCIL, stock_pencil_24, stock_pencil_16); - - add_button_icon (factory, GL_STOCK_HCHAIN, stock_hchain_24); - add_button_icon (factory, GL_STOCK_HCHAIN_BROKEN, stock_hchain_broken_24); - add_button_icon (factory, GL_STOCK_VCHAIN, stock_vchain_24); - add_button_icon (factory, GL_STOCK_VCHAIN_BROKEN, stock_vchain_broken_24); - - g_object_unref (G_OBJECT(factory)); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Unpack and associate given icons with stock_id. */ -/*--------------------------------------------------------------------------*/ -static void -add_icons (GtkIconFactory *factory, - const gchar *stock_id, - const guchar *inline_24, - const guchar *inline_16) -{ - GdkPixbuf *pixbuf; - GtkIconSet *icon_set; - GtkIconSource *icon_source; - - if ( inline_24 != NULL ) { - /* Create icon set with default image */ - pixbuf = gdk_pixbuf_new_from_inline (-1, inline_24, FALSE, NULL); - icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); - g_object_unref (G_OBJECT(pixbuf)); - } else { - /* Create an empty icon set */ - icon_set = gtk_icon_set_new (); - } - - if ( inline_16 != NULL ) { - /* Add 16x16 icon for menus to icon set */ - icon_source = gtk_icon_source_new (); - pixbuf = gdk_pixbuf_new_from_inline (-1, inline_16, - FALSE, NULL); - gtk_icon_source_set_pixbuf (icon_source, pixbuf); - g_object_unref (G_OBJECT(pixbuf)); - gtk_icon_source_set_size_wildcarded (icon_source, FALSE); - gtk_icon_source_set_size (icon_source, GTK_ICON_SIZE_MENU); - gtk_icon_set_add_source (icon_set, icon_source); - gtk_icon_source_free (icon_source); - } - - /* Now associate icon set with stock id */ - gtk_icon_factory_add (factory, stock_id, icon_set); - gtk_icon_set_unref (icon_set); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Unpack and associate given button icon with stock_id. */ -/*--------------------------------------------------------------------------*/ -static void -add_button_icon (GtkIconFactory *factory, - const gchar *stock_id, - const guchar *inline_24) -{ - GtkIconSet *icon_set; - GdkPixbuf *pixbuf; - GtkIconSource *icon_source; - - icon_set = gtk_icon_set_new (); - - icon_source = gtk_icon_source_new (); - pixbuf = gdk_pixbuf_new_from_inline (-1, inline_24, FALSE, NULL); - gtk_icon_source_set_pixbuf (icon_source, pixbuf); - g_object_unref (G_OBJECT(pixbuf)); - gtk_icon_source_set_size_wildcarded (icon_source, FALSE); - gtk_icon_source_set_size (icon_source, GTK_ICON_SIZE_BUTTON); - gtk_icon_set_add_source (icon_set, icon_source); - gtk_icon_source_free (icon_source); - - /* Now associate icon set with stock id */ - gtk_icon_factory_add (factory, stock_id, icon_set); - gtk_icon_set_unref (icon_set); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/stock.h b/glabels2/src/stock.h deleted file mode 100644 index 54eb8c8a..00000000 --- a/glabels2/src/stock.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * stock.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __STOCK_H__ -#define __STOCK_H__ - -#include - -G_BEGIN_DECLS - -/* Stock names */ - -#define GL_STOCK_ARROW "gl_stock_arrow" -#define GL_STOCK_TEXT "gl_stock_text" -#define GL_STOCK_LINE "gl_stock_line" -#define GL_STOCK_BOX "gl_stock_box" -#define GL_STOCK_ELLIPSE "gl_stock_ellipse" -#define GL_STOCK_IMAGE "gl_stock_image" -#define GL_STOCK_BARCODE "gl_stock_barcode" -#define GL_STOCK_MERGE "gl_stock_merge" -#define GL_STOCK_PROPERTIES "gl_stock_properties" -#define GL_STOCK_ORDER_TOP "gl_stock_order_top" -#define GL_STOCK_ORDER_BOTTOM "gl_stock_order_bottom" -#define GL_STOCK_ROTATE_LEFT "gl_stock_rotate_left" -#define GL_STOCK_ROTATE_RIGHT "gl_stock_rotate_right" -#define GL_STOCK_FLIP_HORIZ "gl_stock_flip_horiz" -#define GL_STOCK_FLIP_VERT "gl_stock_flip_vert" -#define GL_STOCK_ALIGN_LEFT "gl_stock_align_left" -#define GL_STOCK_ALIGN_RIGHT "gl_stock_align_right" -#define GL_STOCK_ALIGN_HCENTER "gl_stock_align_hcenter" -#define GL_STOCK_ALIGN_TOP "gl_stock_align_top" -#define GL_STOCK_ALIGN_BOTTOM "gl_stock_align_bottom" -#define GL_STOCK_ALIGN_VCENTER "gl_stock_align_vcenter" -#define GL_STOCK_CENTER_HORIZ "gl_stock_center_horiz" -#define GL_STOCK_CENTER_VERT "gl_stock_center_vert" -#define GL_STOCK_BUCKET_FILL "gl_stock_bucket_fill" -#define GL_STOCK_PENCIL "gl_stock_pencil" -#define GL_STOCK_HCHAIN "gl_stock_hchain" -#define GL_STOCK_HCHAIN_BROKEN "gl_stock_hchain_broken" -#define GL_STOCK_VCHAIN "gl_stock_vchain" -#define GL_STOCK_VCHAIN_BROKEN "gl_stock_vchain_broken" - -void gl_stock_init (void); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/str-util.c b/glabels2/src/str-util.c deleted file mode 100644 index d48ec007..00000000 --- a/glabels2/src/str-util.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * str-util.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "str-util.h" - -#include -#include - -#define FRAC_EPSILON 0.00005 - - -/****************************************************************************/ -/* Create fractional representation of number, if possible. */ -/****************************************************************************/ -gchar * -gl_str_util_fraction_to_string (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_EPSILON ) 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); - } -} - - -/****************************************************************************/ -/* Utilities to deal with PangoAlignment types. */ -/****************************************************************************/ -const gchar * -gl_str_util_align_to_string (PangoAlignment align) -{ - switch (align) { - case PANGO_ALIGN_LEFT: - return "Left"; - case PANGO_ALIGN_CENTER: - return "Center"; - case PANGO_ALIGN_RIGHT: - return "Right"; - default: - return "?"; - } -} - - -PangoAlignment -gl_str_util_string_to_align (const gchar *string) -{ - - if (g_strcasecmp (string, "Left") == 0) { - return PANGO_ALIGN_LEFT; - } else if (g_strcasecmp (string, "Center") == 0) { - return PANGO_ALIGN_CENTER; - } else if (g_strcasecmp (string, "Right") == 0) { - return PANGO_ALIGN_RIGHT; - } else { - return PANGO_ALIGN_LEFT; - } - -} - - -/****************************************************************************/ -/* Utilities to deal with PangoWeight types */ -/****************************************************************************/ -const gchar * -gl_str_util_weight_to_string (PangoWeight weight) -{ - switch (weight) { - case PANGO_WEIGHT_NORMAL: - return "Regular"; - case PANGO_WEIGHT_BOLD: - return "Bold"; - default: - return "?"; - } -} - - -PangoWeight -gl_str_util_string_to_weight (const gchar *string) -{ - - if (g_strcasecmp (string, "Regular") == 0) { - return PANGO_WEIGHT_NORMAL; - } else if (g_strcasecmp (string, "Bold") == 0) { - return PANGO_WEIGHT_BOLD; - } else { - return PANGO_WEIGHT_NORMAL; - } - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/str-util.h b/glabels2/src/str-util.h deleted file mode 100644 index 0253392b..00000000 --- a/glabels2/src/str-util.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * str-util.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __STR_UTIL_H__ -#define __STR_UTIL_H__ - -#include -#include - -G_BEGIN_DECLS - -gchar *gl_str_util_fraction_to_string (gdouble x); - -const gchar *gl_str_util_align_to_string (PangoAlignment align); -PangoAlignment gl_str_util_string_to_align (const gchar *string); - -const gchar *gl_str_util_weight_to_string (PangoWeight weight); -PangoWeight gl_str_util_string_to_weight (const gchar *string); - -G_END_DECLS - -#endif /* __STR_UTIL_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/template-designer.c b/glabels2/src/template-designer.c deleted file mode 100644 index d5d6453f..00000000 --- a/glabels2/src/template-designer.c +++ /dev/null @@ -1,1766 +0,0 @@ -/* - * template-designer.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "template-designer.h" - -#include -#include -#include -#include - -#include -#include "prefs.h" -#include "mini-preview.h" -#include "mini-preview-pixbuf-cache.h" -#include "print-op-dialog.h" -#include "combo-util.h" -#include "builder-util.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ -#define ICON_PIXMAP (GLABELS_ICON_DIR "glabels.png") - -#define EX_RECT_IMAGE (GLABELS_PIXMAP_DIR "ex-rect-size.png") -#define EX_ROUND_IMAGE (GLABELS_PIXMAP_DIR "ex-round-size.png") -#define EX_CD_IMAGE (GLABELS_PIXMAP_DIR "ex-cd-size.png") -#define EX_NLAYOUTS_IMAGE1 (GLABELS_PIXMAP_DIR "ex-1layout.png") -#define EX_NLAYOUTS_IMAGE2 (GLABELS_PIXMAP_DIR "ex-2layouts.png") - -#define DEFAULT_MARGIN 9.0 - -#define DEFAULT_RECT_W 252.0 -#define DEFAULT_RECT_H 144.0 -#define DEFAULT_RECT_R 0.0 -#define DEFAULT_RECT_WASTE 0.0 /* Should never exceed 1/2 the distance between items. */ - -#define DEFAULT_ROUND_R 72.0 -#define DEFAULT_ROUND_WASTE 0.0 /* Should never exceed 1/2 the distance between items. */ - -#define DEFAULT_CD_RADIUS 166.5 -#define DEFAULT_CD_HOLE 58.5 -#define DEFAULT_CD_WASTE 9.0 /* Should never exceed 1/2 the distance between items. */ - -#define DELTA 0.01 -#define MAX_PAGE_DIM_POINTS 5000.0 - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glTemplateDesignerPrivate -{ - GtkBuilder *builder; - - /* Assistant pages */ - GtkWidget *start_page; - GtkWidget *name_page; - GtkWidget *pg_size_page; - GtkWidget *shape_page; - GtkWidget *rect_size_page; - GtkWidget *round_size_page; - GtkWidget *cd_size_page; - GtkWidget *nlayouts_page; - GtkWidget *layout_page; - GtkWidget *finish_page; - - /* Name page controls */ - GtkWidget *brand_entry; - GtkWidget *part_num_entry; - GtkWidget *name_warning_image; - GtkWidget *name_warning_label; - GtkWidget *description_entry; - - /* Page size page controls */ - GtkWidget *pg_size_combo; - GtkWidget *pg_w_spin; - GtkWidget *pg_h_spin; - GtkWidget *pg_w_units_label; - GtkWidget *pg_h_units_label; - - /* Shape page controls */ - GtkWidget *shape_rect_radio; - GtkWidget *shape_round_radio; - GtkWidget *shape_cd_radio; - - /* Label size (rectangular) page controls */ - GtkWidget *rect_image; - GtkWidget *rect_w_spin; - GtkWidget *rect_h_spin; - GtkWidget *rect_r_spin; - GtkWidget *rect_x_waste_spin; - GtkWidget *rect_y_waste_spin; - GtkWidget *rect_margin_spin; - GtkWidget *rect_w_units_label; - GtkWidget *rect_h_units_label; - GtkWidget *rect_r_units_label; - GtkWidget *rect_x_waste_units_label; - GtkWidget *rect_y_waste_units_label; - GtkWidget *rect_margin_units_label; - - /* Label size (round) page controls */ - GtkWidget *round_image; - GtkWidget *round_r_spin; - GtkWidget *round_waste_spin; - GtkWidget *round_margin_spin; - GtkWidget *round_r_units_label; - GtkWidget *round_waste_units_label; - GtkWidget *round_margin_units_label; - - /* Label size (cd) page controls */ - GtkWidget *cd_image; - GtkWidget *cd_radius_spin; - GtkWidget *cd_hole_spin; - GtkWidget *cd_w_spin; - GtkWidget *cd_h_spin; - GtkWidget *cd_waste_spin; - GtkWidget *cd_margin_spin; - GtkWidget *cd_radius_units_label; - GtkWidget *cd_hole_units_label; - GtkWidget *cd_w_units_label; - GtkWidget *cd_h_units_label; - GtkWidget *cd_waste_units_label; - GtkWidget *cd_margin_units_label; - - /* Number of layouts controls */ - GtkWidget *nlayouts_image1; - GtkWidget *nlayouts_image2; - GtkWidget *nlayouts_spin; - - /* Layout page controls */ - GtkWidget *layout1_head_label; - GtkWidget *layout1_nx_spin; - GtkWidget *layout1_ny_spin; - GtkWidget *layout1_x0_spin; - GtkWidget *layout1_y0_spin; - GtkWidget *layout1_dx_spin; - GtkWidget *layout1_dy_spin; - GtkWidget *layout2_head_label; - GtkWidget *layout2_nx_spin; - GtkWidget *layout2_ny_spin; - GtkWidget *layout2_x0_spin; - GtkWidget *layout2_y0_spin; - GtkWidget *layout2_dx_spin; - GtkWidget *layout2_dy_spin; - GtkWidget *layout_x0_units_label; - GtkWidget *layout_y0_units_label; - GtkWidget *layout_dx_units_label; - GtkWidget *layout_dy_units_label; - GtkWidget *mini_preview_vbox; - GtkWidget *layout_mini_preview; - GtkWidget *layout_test_button; - - /* Units related stuff */ - const gchar *units_string; - gdouble units_per_point; - gdouble climb_rate; - gint digits; - - /* Prevent recursion */ - gboolean stop_signals; -}; - -/* Page numbers for traversing GtkAssistant */ -enum { - START_PAGE_NUM = 0, - NAME_PAGE_NUM, - PG_SIZE_PAGE_NUM, - SHAPE_PAGE_NUM, - RECT_SIZE_PAGE_NUM, - ROUND_SIZE_PAGE_NUM, - CD_SIZE_PAGE_NUM, - NLAYOUTS_PAGE_NUM, - LAYOUT_PAGE_NUM, - FINISH_PAGE_NUM -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_template_designer_finalize (GObject *object); -static void gl_template_designer_construct (glTemplateDesigner *dialog); - -static void construct_start_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void construct_name_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void construct_pg_size_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void construct_shape_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void construct_rect_size_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void construct_round_size_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void construct_cd_size_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void construct_nlayouts_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void construct_layout_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void construct_finish_page (glTemplateDesigner *dialog, - GdkPixbuf *logo); - -static void cancel_cb (glTemplateDesigner *dialog); -static void apply_cb (glTemplateDesigner *dialog); -static void close_cb (glTemplateDesigner *dialog); -static void prepare_cb (glTemplateDesigner *dialog, - GtkWidget *page); - -static gint forward_page_function (gint current_page, - gpointer data); - -static void name_page_changed_cb (glTemplateDesigner *dialog); - -static void pg_size_page_changed_cb (glTemplateDesigner *dialog); - -static void rect_size_page_prepare_cb (glTemplateDesigner *dialog); - -static void round_size_page_prepare_cb (glTemplateDesigner *dialog); - -static void cd_size_page_prepare_cb (glTemplateDesigner *dialog); - -static void layout_page_prepare_cb (glTemplateDesigner *dialog); - -static void layout_page_changed_cb (glTemplateDesigner *dialog); - -static void print_test_cb (glTemplateDesigner *dialog); - -static lglTemplate *build_template (glTemplateDesigner *dialog); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glTemplateDesigner, gl_template_designer, GTK_TYPE_ASSISTANT); - - -static void -gl_template_designer_class_init (glTemplateDesignerClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_template_designer_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_template_designer_finalize; -} - - -static void -gl_template_designer_init (glTemplateDesigner *dialog) -{ - static gchar *object_ids[] = { "start_page", - "name_page", - "pg_size_page", - "shape_page", - "rect_size_page", - "round_size_page", - "cd_size_page", - "nlayouts_page", - "layout_page", - "finish_page", - "adjustment1", "adjustment2", "adjustment3", - "adjustment4", "adjustment5", "adjustment6", - "adjustment7", "adjustment8", "adjustment9", - "adjustment10", "adjustment11", "adjustment12", - "adjustment13", "adjustment14", "adjustment15", - "adjustment16", "adjustment17", "adjustment18", - "adjustment19", "adjustment20", "adjustment21", - "adjustment22", "adjustment23", "adjustment24", - "adjustment25", "adjustment26", "adjustment27", - "adjustment28", "adjustment29", "adjustment30", - NULL }; - GError *error = NULL; - - gl_debug (DEBUG_TEMPLATE, "START"); - - dialog->priv = g_new0 (glTemplateDesignerPrivate, 1); - - dialog->priv->builder = gtk_builder_new (); - gtk_builder_add_objects_from_file (dialog->priv->builder, - GLABELS_BUILDER_DIR "template-designer.builder", - object_ids, - &error); - if (error) { - g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); - g_error_free (error); - return; - } - - gl_debug (DEBUG_TEMPLATE, "END"); - - return; -} - - -static void -gl_template_designer_finalize (GObject *object) -{ - glTemplateDesigner* dialog = GL_TEMPLATE_DESIGNER (object); - - gl_debug (DEBUG_TEMPLATE, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_TEMPLATE_DESIGNER (dialog)); - g_return_if_fail (dialog->priv != NULL); - - if (dialog->priv->builder) - { - g_object_unref (dialog->priv->builder); - } - g_free (dialog->priv); - - G_OBJECT_CLASS (gl_template_designer_parent_class)->finalize (object); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*****************************************************************************/ -/* NEW preferences dialog. */ -/*****************************************************************************/ -GtkWidget* -gl_template_designer_new (GtkWindow *parent) -{ - GtkWidget *dialog; - - gl_debug (DEBUG_TEMPLATE, "START"); - - dialog = GTK_WIDGET (g_object_new (GL_TYPE_TEMPLATE_DESIGNER, NULL)); - - if (parent) - gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); - - gl_template_designer_construct (GL_TEMPLATE_DESIGNER(dialog)); - - - gl_debug (DEBUG_TEMPLATE, "END"); - - return dialog; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Construct composite widget. */ -/*---------------------------------------------------------------------------*/ -static void -gl_template_designer_construct (glTemplateDesigner *dialog) -{ - GdkPixbuf *logo; - - gl_debug (DEBUG_TEMPLATE, "START"); - - g_return_if_fail (dialog && GL_IS_TEMPLATE_DESIGNER (dialog)); - g_return_if_fail (dialog->priv != NULL); - - /* Initialize units stuff from prefs */ - dialog->priv->units_string = gl_prefs_get_units_string (); - dialog->priv->units_per_point = gl_prefs_get_units_per_point (); - dialog->priv->climb_rate = gl_prefs_get_units_step_size (); - dialog->priv->digits = gl_prefs_get_units_precision (); - - gtk_window_set_title (GTK_WINDOW(dialog), _("gLabels Template Designer")); - - logo = gdk_pixbuf_new_from_file (ICON_PIXMAP, NULL); - - /* Costruct and append pages (must be same order as PAGE_NUM enums. */ - construct_start_page (dialog, logo); - construct_name_page (dialog, logo); - construct_pg_size_page (dialog, logo); - construct_shape_page (dialog, logo); - construct_rect_size_page (dialog, logo); - construct_round_size_page (dialog, logo); - construct_cd_size_page (dialog, logo); - construct_nlayouts_page (dialog, logo); - construct_layout_page (dialog, logo); - construct_finish_page (dialog, logo); - - gtk_assistant_set_forward_page_func (GTK_ASSISTANT (dialog), - forward_page_function, - dialog, - NULL); - - /* signals */ - g_signal_connect_swapped (G_OBJECT(dialog), "cancel", - G_CALLBACK(cancel_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog), "apply", - G_CALLBACK(apply_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog), "close", - G_CALLBACK(close_cb), dialog); - g_signal_connect (G_OBJECT(dialog), "prepare", - G_CALLBACK(prepare_cb), NULL); - - gtk_widget_show_all (GTK_WIDGET(dialog)); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct start page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_start_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "start_page", &dialog->priv->start_page, - NULL); - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->start_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->start_page, - _("Welcome")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->start_page, - logo); - gtk_assistant_set_page_type (GTK_ASSISTANT (dialog), - dialog->priv->start_page, - GTK_ASSISTANT_PAGE_INTRO); - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->start_page, - TRUE); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct name page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_name_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "name_page", &dialog->priv->name_page, - "brand_entry", &dialog->priv->brand_entry, - "part_num_entry", &dialog->priv->part_num_entry, - "name_warning_image", &dialog->priv->name_warning_image, - "name_warning_label", &dialog->priv->name_warning_label, - "description_entry", &dialog->priv->description_entry, - NULL); - - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->name_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->name_page, - _("Name and Description")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->name_page, - logo); - - /* Connect a handler that listens for changes in these widgets */ - /* This controls whether we can progress to the next page. */ - g_signal_connect_swapped (G_OBJECT(dialog->priv->brand_entry), "changed", - G_CALLBACK(name_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->part_num_entry), "changed", - G_CALLBACK(name_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->description_entry), "changed", - G_CALLBACK(name_page_changed_cb), dialog); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct page size page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_pg_size_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - GList *page_sizes; - const gchar *default_page_size_id; - gchar *default_page_size_name; - - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "pg_size_page", &dialog->priv->pg_size_page, - "pg_size_combo", &dialog->priv->pg_size_combo, - "pg_w_spin", &dialog->priv->pg_w_spin, - "pg_h_spin", &dialog->priv->pg_h_spin, - "pg_w_units_label", &dialog->priv->pg_w_units_label, - "pg_h_units_label", &dialog->priv->pg_h_units_label, - NULL); - - - gl_combo_util_add_text_model (GTK_COMBO_BOX (dialog->priv->pg_size_combo)); - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->pg_size_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->pg_size_page, - _("Page Size")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->pg_size_page, - logo); - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->pg_size_page, - TRUE); - - /* Load page size combo */ - page_sizes = lgl_db_get_paper_name_list (); - gl_combo_util_set_strings (GTK_COMBO_BOX (dialog->priv->pg_size_combo), page_sizes); - lgl_db_free_paper_name_list (page_sizes); - default_page_size_id = gl_prefs_get_page_size (); - default_page_size_name = lgl_db_lookup_paper_name_from_id (default_page_size_id); - gl_combo_util_set_active_text (GTK_COMBO_BOX (dialog->priv->pg_size_combo), default_page_size_name); - g_free (default_page_size_name); - - /* Apply units to spinbuttons and units labels. */ - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->pg_w_units_label), - dialog->priv->units_string); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->pg_w_spin), - 0.0, MAX_PAGE_DIM_POINTS*dialog->priv->units_per_point); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->pg_h_units_label), - dialog->priv->units_string); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->pg_h_spin), - 0.0, MAX_PAGE_DIM_POINTS*dialog->priv->units_per_point); - - /* Connect a handler that listens for changes in these widgets */ - /* This controls sensitivity of related widgets. */ - g_signal_connect_swapped (G_OBJECT(dialog->priv->pg_size_combo), "changed", - G_CALLBACK(pg_size_page_changed_cb), dialog); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct shape page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_shape_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "shape_page", &dialog->priv->shape_page, - "shape_rect_radio", &dialog->priv->shape_rect_radio, - "shape_round_radio", &dialog->priv->shape_round_radio, - "shape_cd_radio", &dialog->priv->shape_cd_radio, - NULL); - - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->shape_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->shape_page, - _("Label or Card Shape")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->shape_page, - logo); - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->shape_page, - TRUE); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct rect size page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_rect_size_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - GdkPixbuf *pixbuf; - - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "rect_size_page", &dialog->priv->rect_size_page, - "rect_image", &dialog->priv->rect_image, - "rect_w_spin", &dialog->priv->rect_w_spin, - "rect_h_spin", &dialog->priv->rect_h_spin, - "rect_r_spin", &dialog->priv->rect_r_spin, - "rect_x_waste_spin", &dialog->priv->rect_x_waste_spin, - "rect_y_waste_spin", &dialog->priv->rect_y_waste_spin, - "rect_margin_spin", &dialog->priv->rect_margin_spin, - "rect_w_units_label", &dialog->priv->rect_w_units_label, - "rect_h_units_label", &dialog->priv->rect_h_units_label, - "rect_r_units_label", &dialog->priv->rect_r_units_label, - "rect_x_waste_units_label", &dialog->priv->rect_x_waste_units_label, - "rect_y_waste_units_label", &dialog->priv->rect_y_waste_units_label, - "rect_margin_units_label", &dialog->priv->rect_margin_units_label, - NULL); - - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->rect_size_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->rect_size_page, - _("Label or Card Size")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->rect_size_page, - logo); - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->rect_size_page, - TRUE); - - /* Initialize illustration. */ - pixbuf = gdk_pixbuf_new_from_file (EX_RECT_IMAGE, NULL); - gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->rect_image), pixbuf); - - /* Apply units to spinbuttons and units labels. */ - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->rect_w_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->rect_h_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->rect_r_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->rect_x_waste_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->rect_y_waste_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->rect_margin_units_label), - dialog->priv->units_string); - - /* Load some realistic defaults. */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin), - DEFAULT_RECT_W * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin), - DEFAULT_RECT_H * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin), - DEFAULT_RECT_R * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin), - DEFAULT_RECT_WASTE * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin), - DEFAULT_RECT_WASTE * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin), - DEFAULT_MARGIN * dialog->priv->units_per_point); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct round size page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_round_size_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - GdkPixbuf *pixbuf; - - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "round_size_page", &dialog->priv->round_size_page, - "round_image", &dialog->priv->round_image, - "round_r_spin", &dialog->priv->round_r_spin, - "round_waste_spin", &dialog->priv->round_waste_spin, - "round_margin_spin", &dialog->priv->round_margin_spin, - "round_r_units_label", &dialog->priv->round_r_units_label, - "round_waste_units_label", &dialog->priv->round_waste_units_label, - "round_margin_units_label", &dialog->priv->round_margin_units_label, - NULL); - - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->round_size_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->round_size_page, - _("Label Size (round)")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->round_size_page, - logo); - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->round_size_page, - TRUE); - - /* Initialize illustration. */ - pixbuf = gdk_pixbuf_new_from_file (EX_ROUND_IMAGE, NULL); - gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->round_image), pixbuf); - - /* Apply units to spinbuttons and units labels. */ - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->round_r_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->round_r_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->round_r_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->round_waste_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->round_margin_units_label), - dialog->priv->units_string); - - /* Load some realistic defaults. */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin), - DEFAULT_ROUND_R * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin), - DEFAULT_ROUND_WASTE * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin), - DEFAULT_MARGIN * dialog->priv->units_per_point); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct CD/DVD size page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_cd_size_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - GdkPixbuf *pixbuf; - - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "cd_size_page", &dialog->priv->cd_size_page, - "cd_image", &dialog->priv->cd_image, - "cd_radius_spin", &dialog->priv->cd_radius_spin, - "cd_hole_spin", &dialog->priv->cd_hole_spin, - "cd_w_spin", &dialog->priv->cd_w_spin, - "cd_h_spin", &dialog->priv->cd_h_spin, - "cd_waste_spin", &dialog->priv->cd_waste_spin, - "cd_margin_spin", &dialog->priv->cd_margin_spin, - "cd_radius_units_label", &dialog->priv->cd_radius_units_label, - "cd_hole_units_label", &dialog->priv->cd_hole_units_label, - "cd_w_units_label", &dialog->priv->cd_w_units_label, - "cd_h_units_label", &dialog->priv->cd_h_units_label, - "cd_waste_units_label", &dialog->priv->cd_waste_units_label, - "cd_margin_units_label", &dialog->priv->cd_margin_units_label, - NULL); - - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->cd_size_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->cd_size_page, - _("Label Size (CD/DVD)")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->cd_size_page, - logo); - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->cd_size_page, - TRUE); - - /* Initialize illustration. */ - pixbuf = gdk_pixbuf_new_from_file (EX_CD_IMAGE, NULL); - gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->cd_image), pixbuf); - - /* Apply units to spinbuttons and units labels. */ - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->cd_radius_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->cd_hole_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->cd_w_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->cd_h_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->cd_waste_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->cd_margin_units_label), - dialog->priv->units_string); - - /* Load some realistic defaults. */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin), - DEFAULT_CD_RADIUS * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin), - DEFAULT_CD_HOLE * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin), - DEFAULT_CD_WASTE * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin), - DEFAULT_MARGIN * dialog->priv->units_per_point); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct number of layouts page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_nlayouts_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - GdkPixbuf *pixbuf; - - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "nlayouts_page", &dialog->priv->nlayouts_page, - "nlayouts_image1", &dialog->priv->nlayouts_image1, - "nlayouts_image2", &dialog->priv->nlayouts_image2, - "nlayouts_spin", &dialog->priv->nlayouts_spin, - NULL); - - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->nlayouts_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->nlayouts_page, - _("Number of Layouts")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->nlayouts_page, - logo); - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->nlayouts_page, - TRUE); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->nlayouts_spin), - 1, 2); - - - /* Initialize illustrations. */ - pixbuf = gdk_pixbuf_new_from_file (EX_NLAYOUTS_IMAGE1, NULL); - gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->nlayouts_image1), pixbuf); - pixbuf = gdk_pixbuf_new_from_file (EX_NLAYOUTS_IMAGE2, NULL); - gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->nlayouts_image2), pixbuf); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct layout page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_layout_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "layout_page", &dialog->priv->layout_page, - "layout1_head_label", &dialog->priv->layout1_head_label, - "layout1_nx_spin", &dialog->priv->layout1_nx_spin, - "layout1_ny_spin", &dialog->priv->layout1_ny_spin, - "layout1_x0_spin", &dialog->priv->layout1_x0_spin, - "layout1_y0_spin", &dialog->priv->layout1_y0_spin, - "layout1_dx_spin", &dialog->priv->layout1_dx_spin, - "layout1_dy_spin", &dialog->priv->layout1_dy_spin, - "layout2_head_label", &dialog->priv->layout2_head_label, - "layout2_nx_spin", &dialog->priv->layout2_nx_spin, - "layout2_ny_spin", &dialog->priv->layout2_ny_spin, - "layout2_x0_spin", &dialog->priv->layout2_x0_spin, - "layout2_y0_spin", &dialog->priv->layout2_y0_spin, - "layout2_dx_spin", &dialog->priv->layout2_dx_spin, - "layout2_dy_spin", &dialog->priv->layout2_dy_spin, - "layout_x0_units_label", &dialog->priv->layout_x0_units_label, - "layout_y0_units_label", &dialog->priv->layout_y0_units_label, - "layout_dx_units_label", &dialog->priv->layout_dx_units_label, - "layout_dy_units_label", &dialog->priv->layout_dy_units_label, - "mini_preview_vbox", &dialog->priv->mini_preview_vbox, - "layout_test_button", &dialog->priv->layout_test_button, - NULL); - - dialog->priv->layout_mini_preview = gl_mini_preview_new (175, 200); - gtk_container_add (GTK_CONTAINER (dialog->priv->mini_preview_vbox), - dialog->priv->layout_mini_preview); - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->layout_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->layout_page, - _("Layout(s)")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->layout_page, - logo); - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->layout_page, - TRUE); - - /* Apply units to spinbuttons and units labels. */ - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->layout_x0_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->layout_y0_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->layout_dx_units_label), - dialog->priv->units_string); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin), - dialog->priv->digits); - gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin), - dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); - gtk_label_set_text (GTK_LABEL(dialog->priv->layout_dy_units_label), - dialog->priv->units_string); - - /* Connect a handler that listens for changes in these widgets */ - /* This controls sensitivity of related widgets. */ - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_nx_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_ny_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_x0_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_y0_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_dx_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_dy_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_nx_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_ny_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_x0_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_y0_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_dx_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_dy_spin), "changed", - G_CALLBACK(layout_page_changed_cb), dialog); - - - /* Print button */ - g_signal_connect_swapped (G_OBJECT(dialog->priv->layout_test_button), "clicked", - G_CALLBACK(print_test_cb), dialog); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct finish page. */ -/*--------------------------------------------------------------------------*/ -static void -construct_finish_page (glTemplateDesigner *dialog, - GdkPixbuf *logo) -{ - gl_debug (DEBUG_TEMPLATE, "START"); - - gl_builder_util_get_widgets (dialog->priv->builder, - "finish_page", &dialog->priv->finish_page, - NULL); - - - gtk_assistant_append_page (GTK_ASSISTANT (dialog), - dialog->priv->finish_page); - - gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), - dialog->priv->finish_page, - _("Design Completed")); - gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), - dialog->priv->finish_page, - logo); - gtk_assistant_set_page_type (GTK_ASSISTANT (dialog), - dialog->priv->finish_page, - GTK_ASSISTANT_PAGE_CONFIRM); - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->finish_page, - TRUE); - - gl_debug (DEBUG_TEMPLATE, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. cancel callback. */ -/*--------------------------------------------------------------------------*/ -static void -cancel_cb (glTemplateDesigner *dialog) -{ - - gtk_widget_destroy (GTK_WIDGET(dialog)); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. apply callback */ -/*--------------------------------------------------------------------------*/ -static void -apply_cb (glTemplateDesigner *dialog) -{ - lglTemplate *template; - gchar *name; - - template = build_template (dialog); - lgl_db_register_template (template); - name = lgl_template_get_name (template); - gl_mini_preview_pixbuf_cache_add_by_name (name); - g_free (name); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. close callback */ -/*--------------------------------------------------------------------------*/ -static void -close_cb (glTemplateDesigner *dialog) -{ - - gtk_widget_destroy (GTK_WIDGET(dialog)); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. prepare page callback */ -/*--------------------------------------------------------------------------*/ -static void -prepare_cb (glTemplateDesigner *dialog, - GtkWidget *page) -{ - gint page_num; - - page_num = gtk_assistant_get_current_page (GTK_ASSISTANT (dialog)); - - switch (page_num) - { - - case NAME_PAGE_NUM: - name_page_changed_cb (dialog); /* Use to prepare */ - break; - - case PG_SIZE_PAGE_NUM: - pg_size_page_changed_cb (dialog); /* Use to prepare */ - break; - - case RECT_SIZE_PAGE_NUM: - rect_size_page_prepare_cb (dialog); - break; - - case ROUND_SIZE_PAGE_NUM: - round_size_page_prepare_cb (dialog); - break; - - case CD_SIZE_PAGE_NUM: - cd_size_page_prepare_cb (dialog); - break; - - case LAYOUT_PAGE_NUM: - layout_page_prepare_cb (dialog); - break; - - default: - /* No preparation needed */ - break; - - } -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Handle non-linear forward traversal. */ -/*--------------------------------------------------------------------------*/ -static gint -forward_page_function (gint current_page, - gpointer data) -{ - glTemplateDesigner *dialog = GL_TEMPLATE_DESIGNER (data); - - switch (current_page) - { - case START_PAGE_NUM: - return NAME_PAGE_NUM; - - case NAME_PAGE_NUM: - return PG_SIZE_PAGE_NUM; - - case PG_SIZE_PAGE_NUM: - return SHAPE_PAGE_NUM; - - case SHAPE_PAGE_NUM: - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_rect_radio))) { - return RECT_SIZE_PAGE_NUM; - } - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_round_radio))) { - return ROUND_SIZE_PAGE_NUM; - } - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_cd_radio))) { - return CD_SIZE_PAGE_NUM; - } - break; - - case RECT_SIZE_PAGE_NUM: - case ROUND_SIZE_PAGE_NUM: - case CD_SIZE_PAGE_NUM: - return NLAYOUTS_PAGE_NUM; - - case NLAYOUTS_PAGE_NUM: - return LAYOUT_PAGE_NUM; - - case LAYOUT_PAGE_NUM: - return FINISH_PAGE_NUM; - - case FINISH_PAGE_NUM: - default: - return -1; - } - - return -1; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Widget on name page "changed" callback. */ -/*--------------------------------------------------------------------------*/ -static void -name_page_changed_cb (glTemplateDesigner *dialog) -{ - gchar *brand, *part_num, *desc; - - brand = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->brand_entry), 0, -1)); - part_num = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->part_num_entry), 0, -1)); - desc = gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->description_entry), 0, -1); - - - if (brand && brand[0] && part_num && part_num[0] && - lgl_db_does_template_exist (brand, part_num)) - { - gtk_image_set_from_stock (GTK_IMAGE (dialog->priv->name_warning_image), - GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_BUTTON); - gtk_label_set_markup (GTK_LABEL (dialog->priv->name_warning_label), - _("Brand and part# match an existing template!")); - } - else - { - gtk_image_clear (GTK_IMAGE (dialog->priv->name_warning_image)); - gtk_label_set_text (GTK_LABEL (dialog->priv->name_warning_label), ""); - } - - if (brand && brand[0] && part_num && part_num[0] && desc && desc[0] && - !lgl_db_does_template_exist (brand, part_num)) - { - - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->name_page, - TRUE); - } - else - { - - gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), - dialog->priv->name_page, - FALSE); - } - - g_free (brand); - g_free (part_num); - g_free (desc); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Widget on page size page "changed" callback. */ -/*--------------------------------------------------------------------------*/ -static void -pg_size_page_changed_cb (glTemplateDesigner *dialog) -{ - gchar *page_size_name; - lglPaper *paper; - - - page_size_name = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->priv->pg_size_combo)); - - if (page_size_name && strlen(page_size_name)) { - - paper = lgl_db_lookup_paper_from_name (page_size_name); - - - if ( g_ascii_strcasecmp (paper->id, "Other") == 0 ) { - gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_spin), TRUE); - gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_h_spin), TRUE); - gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_units_label), - TRUE); - gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_h_units_label), - TRUE); - - } else { - gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_spin), FALSE); - gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_h_spin), FALSE); - gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_units_label), - FALSE); - gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_h_units_label), - FALSE); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin), - paper->width * dialog->priv->units_per_point); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin), - paper->height * dialog->priv->units_per_point); - } - - lgl_paper_free (paper); - } - - g_free (page_size_name); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare rectangular size page. */ -/*--------------------------------------------------------------------------*/ -static void -rect_size_page_prepare_cb (glTemplateDesigner *dialog) -{ - gdouble max_w, max_h; - gdouble w, h, r, x_waste, y_waste, margin; - - /* Limit label size based on already chosen page size. */ - max_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)); - max_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)); - - w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin)); - h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin)); - r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin)); - x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin)); - y_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin)); - margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin)); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_w_spin), - dialog->priv->climb_rate, max_w); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_h_spin), - dialog->priv->climb_rate, max_h); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_r_spin), - 0.0, MIN(max_w, max_h)/2.0); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_x_waste_spin), - 0.0, MIN(max_w, max_h)/4.0); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_y_waste_spin), - 0.0, MIN(max_w, max_h)/4.0); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_margin_spin), - 0.0, MIN(max_w, max_h)/4.0); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin), w); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin), h); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin), r); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin), x_waste); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin), y_waste); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin), margin); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare round size page. */ -/*--------------------------------------------------------------------------*/ -static void -round_size_page_prepare_cb (glTemplateDesigner *dialog) -{ - gdouble max_w, max_h; - gdouble r, waste, margin; - - /* Limit label size based on already chosen page size. */ - max_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)); - max_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)); - - r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin)); - waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin)); - margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin)); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->round_r_spin), - dialog->priv->climb_rate, MIN(max_w, max_h)/2.0); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->round_waste_spin), - 0.0, MIN(max_w, max_h)/4.0); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->round_margin_spin), - 0.0, MIN(max_w, max_h)/4.0); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin), r); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin), waste); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin), margin); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare cd/dvd size page. */ -/*--------------------------------------------------------------------------*/ -static void -cd_size_page_prepare_cb (glTemplateDesigner *dialog) -{ - gdouble max_w, max_h; - gdouble radius, hole, w, h, waste, margin; - - /* Limit label size based on already chosen page size. */ - max_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)); - max_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)); - - radius = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin)); - hole = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin)); - w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin)); - h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin)); - waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin)); - margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin)); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_radius_spin), - dialog->priv->climb_rate, MIN(max_w, max_h)/2.0); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_hole_spin), - dialog->priv->climb_rate, MIN(max_w, max_h)/2.0); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_w_spin), - 0.0, max_w); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_h_spin), - 0.0, max_h); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_waste_spin), - 0.0, MIN(max_w, max_h)/4.0); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_margin_spin), - 0.0, MIN(max_w, max_h)/4.0); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin), radius); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin), hole); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin), w); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin), h); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin), waste); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin), margin); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Prepare Layout page cb. */ -/*--------------------------------------------------------------------------*/ -static void -layout_page_prepare_cb (glTemplateDesigner *dialog) -{ - gdouble page_w, page_h; - gdouble w=0, h=0, x_waste=0, y_waste=0; - gint max_nx, max_ny; - gint nlayouts; - gdouble nx_1, ny_1, x0_1, y0_1, dx_1, dy_1; - gdouble nx_2, ny_2, x0_2, y0_2, dx_2, dy_2; - lglTemplate *template; - - if (dialog->priv->stop_signals) return; - dialog->priv->stop_signals = TRUE; - - - /* Limit ranges based on already chosen page and label sizes. */ - page_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)); - page_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)); - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_rect_radio))) { - w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin)); - h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin)); - x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin)); - y_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin)); - } - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_round_radio))) { - w = 2*gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin)); - h = w; - x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin)); - y_waste = x_waste; - } - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_cd_radio))) { - w = 2*gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin)); - h = w; - x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin)); - y_waste = x_waste; - } - max_nx = MAX (floor (page_w/(w + 2*x_waste) + DELTA), 1.0); - max_ny = MAX (floor (page_h/(h + 2*y_waste) + DELTA), 1.0); - - nx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_nx_spin)); - ny_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_ny_spin)); - x0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin)); - y0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin)); - dx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin)); - dy_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin)); - nx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_nx_spin)); - ny_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_ny_spin)); - x0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin)); - y0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin)); - dx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin)); - dy_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin)); - - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_nx_spin), - 1, max_nx); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_ny_spin), - 1, max_ny); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_x0_spin), - x_waste, page_w - w - x_waste); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_y0_spin), - y_waste, page_h - h - y_waste); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_dx_spin), - w + 2*x_waste, page_w - w - 2*x_waste); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_dy_spin), - h + 2*y_waste, page_h - h - 2*y_waste); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_nx_spin), - 1, max_nx); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_ny_spin), - 1, max_ny); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_x0_spin), - x_waste, page_w - w - x_waste); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_y0_spin), - y_waste, page_h - h - y_waste); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_dx_spin), - w + 2*x_waste, page_w - w - 2*x_waste); - gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_dy_spin), - h + 2*y_waste, page_h - h - 2*y_waste); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_nx_spin), nx_1); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_ny_spin), ny_1); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin), x0_1); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin), y0_1); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin), dx_1); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin), dy_1); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_nx_spin), nx_2); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_ny_spin), ny_2); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin), x0_2); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin), y0_2); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin), dx_2); - gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin), dy_2); - - /* Set visibility of layout2 widgets as appropriate. */ - nlayouts = gtk_spin_button_get_value (GTK_SPIN_BUTTON (dialog->priv->nlayouts_spin)); - if ( nlayouts == 1 ) - { - gtk_widget_hide (dialog->priv->layout1_head_label); - gtk_widget_hide (dialog->priv->layout2_head_label); - gtk_widget_hide (dialog->priv->layout2_nx_spin); - gtk_widget_hide (dialog->priv->layout2_ny_spin); - gtk_widget_hide (dialog->priv->layout2_x0_spin); - gtk_widget_hide (dialog->priv->layout2_y0_spin); - gtk_widget_hide (dialog->priv->layout2_dx_spin); - gtk_widget_hide (dialog->priv->layout2_dy_spin); - } - else - { - gtk_widget_show (dialog->priv->layout1_head_label); - gtk_widget_show (dialog->priv->layout2_head_label); - gtk_widget_show (dialog->priv->layout2_nx_spin); - gtk_widget_show (dialog->priv->layout2_ny_spin); - gtk_widget_show (dialog->priv->layout2_x0_spin); - gtk_widget_show (dialog->priv->layout2_y0_spin); - gtk_widget_show (dialog->priv->layout2_dx_spin); - gtk_widget_show (dialog->priv->layout2_dy_spin); - } - - template = build_template (dialog); - gl_mini_preview_set_template (GL_MINI_PREVIEW(dialog->priv->layout_mini_preview), - template); - lgl_template_free (template); - - - dialog->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Layout page widget changed cb. */ -/*--------------------------------------------------------------------------*/ -static void -layout_page_changed_cb (glTemplateDesigner *dialog) -{ - lglTemplate *template; - - if (dialog->priv->stop_signals) return; - dialog->priv->stop_signals = TRUE; - - template = build_template (dialog); - - gl_mini_preview_set_template (GL_MINI_PREVIEW(dialog->priv->layout_mini_preview), - template); - - lgl_template_free (template); - - dialog->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Print test sheet callback. */ -/*--------------------------------------------------------------------------*/ -static void -print_test_cb (glTemplateDesigner *dialog) -{ - GObject *label; - lglTemplate *template; - glPrintOpDialog *print_op; - - label = gl_label_new (); - - template = build_template (dialog); - gl_label_set_template (GL_LABEL(label), template); - - print_op = gl_print_op_dialog_new (GL_LABEL(label)); - gl_print_op_force_outline (GL_PRINT_OP (print_op)); - gtk_print_operation_run (GTK_PRINT_OPERATION (print_op), - GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, - GTK_WINDOW (dialog), - NULL); - - lgl_template_free (template); - g_object_unref (G_OBJECT(label)); -} - - -/*--------------------------------------------------------------------------*/ -/* Build a template based on current assistant settings. */ -/*--------------------------------------------------------------------------*/ -static lglTemplate * -build_template (glTemplateDesigner *dialog) -{ - gdouble upp; - gchar *brand, *part_num, *desc; - gchar *page_size_name; - lglPaper *paper; - lglTemplateFrameShape shape; - lglTemplateFrame *frame=NULL; - gdouble w=0, h=0, r=0, radius=0, hole=0, waste=0, x_waste=0, y_waste=0, margin=0; - gint nlayouts; - gdouble nx_1, ny_1, x0_1, y0_1, dx_1, dy_1; - gdouble nx_2, ny_2, x0_2, y0_2, dx_2, dy_2; - lglTemplate *template; - - upp = dialog->priv->units_per_point; - - brand = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->brand_entry), 0, -1)); - part_num = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->part_num_entry), 0, -1)); - desc = gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->description_entry), 0, -1); - - page_size_name = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->priv->pg_size_combo)); - paper = lgl_db_lookup_paper_from_name (page_size_name); - if ( g_ascii_strcasecmp (paper->id, "Other") == 0 ) { - paper->width = - gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)) - / upp; - paper->height = - gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)) - / upp; - } - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_rect_radio))) { - shape = LGL_TEMPLATE_FRAME_SHAPE_RECT; - w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin)); - h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin)); - r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin)); - x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin)); - y_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin)); - margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin)); - } - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_round_radio))) { - shape = LGL_TEMPLATE_FRAME_SHAPE_ROUND; - r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin)); - waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin)); - margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin)); - } - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_cd_radio))) { - shape = LGL_TEMPLATE_FRAME_SHAPE_CD; - radius = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin)); - hole = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin)); - w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin)); - h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin)); - waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin)); - margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin)); - } - - nlayouts = gtk_spin_button_get_value (GTK_SPIN_BUTTON (dialog->priv->nlayouts_spin)); - nx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_nx_spin)); - ny_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_ny_spin)); - x0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin)); - y0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin)); - dx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin)); - dy_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin)); - nx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_nx_spin)); - ny_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_ny_spin)); - x0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin)); - y0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin)); - dx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin)); - dy_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin)); - - - template = lgl_template_new (brand, part_num, desc, paper->id, paper->width, paper->height); - - switch (shape) { - case LGL_TEMPLATE_FRAME_SHAPE_RECT: - frame = lgl_template_frame_rect_new ("0", - w/upp, h/upp, r/upp, - x_waste/upp, y_waste/upp); - break; - case LGL_TEMPLATE_FRAME_SHAPE_ROUND: - frame = lgl_template_frame_round_new ("0", r/upp, waste/upp); - break; - case LGL_TEMPLATE_FRAME_SHAPE_CD: - frame = lgl_template_frame_cd_new ("0", - radius/upp, hole/upp, - w/upp, h/upp, - waste/upp); - break; - } - lgl_template_add_frame (template, frame); - - lgl_template_frame_add_markup (frame, - lgl_template_markup_margin_new (margin/upp)); - - lgl_template_frame_add_layout (frame, - lgl_template_layout_new (nx_1, ny_1, - x0_1/upp, - y0_1/upp, - dx_1/upp, - dy_1/upp)); - if (nlayouts > 1) { - lgl_template_frame_add_layout (frame, - lgl_template_layout_new (nx_2, ny_2, - x0_2/upp, - y0_2/upp, - dx_2/upp, - dy_2/upp)); - } - - g_free (brand); - g_free (part_num); - g_free (desc); - - g_free (page_size_name); - lgl_paper_free (paper); - - return template; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/template-designer.h b/glabels2/src/template-designer.h deleted file mode 100644 index a86034c1..00000000 --- a/glabels2/src/template-designer.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * template-designer.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __TEMPLATE_DESIGNER_H__ -#define __TEMPLATE_DESIGNER_H__ - -#include - -G_BEGIN_DECLS - -#define GL_TYPE_TEMPLATE_DESIGNER (gl_template_designer_get_type ()) -#define GL_TEMPLATE_DESIGNER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_TEMPLATE_DESIGNER, glTemplateDesigner)) -#define GL_TEMPLATE_DESIGNER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_TEMPLATE_DESIGNER, glTemplateDesignerClass)) -#define GL_IS_TEMPLATE_DESIGNER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_TEMPLATE_DESIGNER)) -#define GL_IS_TEMPLATE_DESIGNER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_TEMPLATE_DESIGNER)) -#define GL_TEMPLATE_DESIGNER_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_TEMPLATE_DESIGNER, glTemplateDesignerClass)) - - -typedef struct _glTemplateDesigner glTemplateDesigner; -typedef struct _glTemplateDesignerClass glTemplateDesignerClass; - -typedef struct _glTemplateDesignerPrivate glTemplateDesignerPrivate; - -struct _glTemplateDesigner -{ - GtkAssistant parent_instance; - - glTemplateDesignerPrivate *priv; - -}; - -struct _glTemplateDesignerClass -{ - GtkAssistantClass parent_class; -}; - -GType gl_template_designer_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_template_designer_new (GtkWindow *parent); - - -G_END_DECLS - -#endif /* __TEMPLATE_DESIGNER_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/text-node.c b/glabels2/src/text-node.c deleted file mode 100644 index dc03ca29..00000000 --- a/glabels2/src/text-node.c +++ /dev/null @@ -1,374 +0,0 @@ -/* - * text-node.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "text-node.h" - -#include - -#include "merge.h" - -#include "debug.h" - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static glTextNode *extract_text_node (gchar *text, - gint *n); - -static gboolean is_empty_field (glTextNode *text_node, - glMergeRecord *record); - - -/****************************************************************************/ -/* Expand single node into representative string. */ -/****************************************************************************/ -gchar * -gl_text_node_expand (glTextNode *text_node, - glMergeRecord *record) -{ - gchar *text; - - if (text_node->field_flag) { - if (record == NULL) { - return g_strdup_printf ("${%s}", text_node->data); - } else { - text = gl_merge_eval_key (record, text_node->data); - if (text != NULL) { - return text; - } else { - return g_strdup_printf ("%s", ""); - } - } - } else { - return g_strdup (text_node->data); - } -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Is node a field that evaluates empty? */ -/*--------------------------------------------------------------------------*/ -static gboolean -is_empty_field (glTextNode *text_node, - glMergeRecord *record) -{ - gchar *text; - gboolean ret = FALSE; - - if ( (record != NULL) && text_node->field_flag) { - text = gl_merge_eval_key (record, text_node->data); - if ( (text == NULL) || (text[0] == 0) ) { - ret = TRUE; - } - g_free (text); - } - - return ret; -} - - -/****************************************************************************/ -/* 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, "${", strlen ("${")) == 0) { - /* We are at the beginning of a "FIELD" node */ - text_node->field_flag = TRUE; - *n = strlen ("${"); - 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, "${", strlen ("${")) == 0) - break; - if (*p == '\n') - break; - } - text_node->data = g_strndup (text, *n); - } - - return text_node; -} - - -/****************************************************************************/ -/* Copy a single text node. */ -/****************************************************************************/ -glTextNode * -gl_text_node_dup (glTextNode *src) -{ - glTextNode *dst; - - if ( src == NULL ) return NULL; - - dst = g_new0 (glTextNode, 1); - - dst->field_flag = src->field_flag; - dst->data = g_strdup (src->data); - - return dst; -} - - -/****************************************************************************/ -/* Free a single text node. */ -/****************************************************************************/ -void -gl_text_node_free (glTextNode **text_node) -{ - if ( *text_node == NULL ) return; - - g_free ((*text_node)->data); - (*text_node)->data = NULL; - g_free (*text_node); - *text_node = NULL; -} - - -/****************************************************************************/ -/* Compare 2 text nodes for equality. */ -/****************************************************************************/ -gboolean -gl_text_node_equal (glTextNode *text_node1, - glTextNode *text_node2) -{ - /* First take care of the case of either or both being NULL. */ - if ( text_node1 == NULL ) { - return ( text_node2 == NULL ); - } else { - if ( text_node2 == NULL ) { - return FALSE; - } - } - - /* Bail if field flags differ. */ - if ( text_node1->field_flag != text_node2->field_flag ) { - return FALSE; - } - - /* Now take care of the case of either or both data fields being NULL. */ - if ( text_node1->data == NULL ) { - return ( text_node2->data == NULL ); - } else { - if ( text_node2->data == NULL ) { - return FALSE; - } - } - - /* Field flags are identical, so now compare the data. */ - return (strcmp (text_node1->data, text_node2->data) == 0); -} - - -/****************************************************************************/ -/* 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) { - - /* special case: something like ${ADDRESS2} = "" on line by itself. */ - /* in such circumstances ignore the line completely. */ - p_node = (GList *)p_line->data; - if (p_node && p_node->next == NULL) { - text_node = (glTextNode *) p_node->data; - if ( is_empty_field (text_node, record) ) { - continue; - } - } - - /* expand each node */ - 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); - } - - /* append newline to each line, except last. */ - if ( p_line->next != NULL ) { - 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; -} - - -/****************************************************************************/ -/* Copy a list of text lines. */ -/****************************************************************************/ -GList * -gl_text_node_lines_dup (GList *src_lines) -{ - GList *dst_lines=NULL; - GList *p_line, *line, *p_node; - glTextNode *node; - - for (p_line = src_lines; p_line != NULL; p_line = p_line->next) - { - line = NULL; - for (p_node = (GList *) p_line->data; p_node != NULL; p_node = p_node->next) - { - node = gl_text_node_dup ((glTextNode *)p_node->data); - line = g_list_append (line, node); - } - dst_lines = g_list_append (dst_lines, line); - } - - return dst_lines; -} - - -/****************************************************************************/ -/* Free a list of text lines. */ -/****************************************************************************/ -void -gl_text_node_lines_free (GList **lines) -{ - GList *p_line, *p_node; - glTextNode *text_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) - { - text_node = (glTextNode *)p_node->data; - p_node->data = NULL; - gl_text_node_free ( &text_node ); - } - 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 ); - - } - } - -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/text-node.h b/glabels2/src/text-node.h deleted file mode 100644 index 68189b6c..00000000 --- a/glabels2/src/text-node.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * text-node.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __TEXT_NODE_H__ -#define __TEXT_NODE_H__ - -#include -#include "merge.h" - -G_BEGIN_DECLS - -typedef struct { - gboolean field_flag; - gchar *data; -} glTextNode; - -gchar *gl_text_node_expand (glTextNode *text_node, - glMergeRecord *record); -glTextNode *gl_text_node_new_from_text (gchar *text); -glTextNode *gl_text_node_dup (glTextNode *text_node); -void gl_text_node_free (glTextNode **text_node); - -gboolean gl_text_node_equal (glTextNode *text_node1, - glTextNode *text_node2); - -gchar *gl_text_node_lines_expand (GList *lines, - glMergeRecord *record); -GList *gl_text_node_lines_new_from_text (gchar *text); -GList *gl_text_node_lines_dup (GList *lines); -void gl_text_node_lines_free (GList **lines); - -/* debug function */ -void gl_text_node_lines_print (GList *lines); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui-commands.c b/glabels2/src/ui-commands.c deleted file mode 100644 index a8e2bbd3..00000000 --- a/glabels2/src/ui-commands.c +++ /dev/null @@ -1,1195 +0,0 @@ -/* - * ui-commands.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "ui-commands.h" - -#include -#include - -#include "view.h" -#include "file.h" -#include "template-designer.h" -#include "print-op-dialog.h" -#include "prefs.h" -#include "prefs-dialog.h" -#include "recent.h" -#include "debug.h" - - -/****************************************************************************/ -/** File/New command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_new (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_file_new (window); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** File/Properties command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_properties (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_file_properties (GL_VIEW(window->view)->label, window); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** File/Template-Designer command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_template_designer (GtkAction *action, - glWindow *window) -{ - GtkWidget *dialog; - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - dialog = gl_template_designer_new (GTK_WINDOW(window)); - - gtk_widget_show (dialog); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** File/Open command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_open (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_file_open (window); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** File/Open-Recent command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_open_recent (GtkRecentChooser *chooser, - glWindow *window) -{ - GtkRecentInfo *item; - gchar *utf8_filename; - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (chooser && GTK_IS_RECENT_CHOOSER(chooser)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - item = gtk_recent_chooser_get_current_item (chooser); - if (!item) - return; - - utf8_filename = gl_recent_get_utf8_filename (item); - - gl_debug (DEBUG_COMMANDS, "Selected %s\n", utf8_filename); - gl_file_open_recent (utf8_filename, window); - - gtk_recent_info_unref (item); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** File/Save command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_save (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_file_save (GL_VIEW(window->view)->label, window); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** File/Save-as command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_save_as (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_file_save_as (GL_VIEW(window->view)->label, window); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** File/Print command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_print (GtkAction *action, - glWindow *window) -{ - glPrintOpDialog *op; - GtkPrintOperationResult result; - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - op = gl_print_op_dialog_new (GL_VIEW(window->view)->label); - - if (window->print_settings) - { - gl_print_op_set_settings (GL_PRINT_OP (op), window->print_settings); - } - - result = gtk_print_operation_run (GTK_PRINT_OPERATION (op), - GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, - GTK_WINDOW (window), - NULL); - - if ( result == GTK_PRINT_OPERATION_RESULT_APPLY ) - { - gl_print_op_free_settings (window->print_settings); - window->print_settings = gl_print_op_get_settings (GL_PRINT_OP (op)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** File/Close command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_close (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_file_close (window); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** File/Quit command. */ -/****************************************************************************/ -void -gl_ui_cmd_file_quit (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_file_exit (); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** Edit/Cut command. */ -/****************************************************************************/ -void -gl_ui_cmd_edit_cut (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_view_cut (GL_VIEW(window->view)); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** Edit/Copy command. */ -/****************************************************************************/ -void -gl_ui_cmd_edit_copy (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_view_copy (GL_VIEW(window->view)); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** Edit/Paste command. */ -/****************************************************************************/ -void -gl_ui_cmd_edit_paste (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_view_paste (GL_VIEW(window->view)); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** Edit/Delete command. */ -/****************************************************************************/ -void -gl_ui_cmd_edit_delete (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_view_delete_selection (GL_VIEW(window->view)); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** Edit/Select-all command. */ -/****************************************************************************/ -void -gl_ui_cmd_edit_select_all (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_view_select_all (GL_VIEW(window->view)); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** Edit/Unselect-all command. */ -/****************************************************************************/ -void -gl_ui_cmd_edit_unselect_all (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gl_view_unselect_all (GL_VIEW(window->view)); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** Edit/Preferences command. */ -/****************************************************************************/ -void -gl_ui_cmd_edit_preferences (GtkAction *action, - glWindow *window) -{ - static GtkWidget *dialog = NULL; - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (dialog != NULL) - { - gtk_window_present (GTK_WINDOW (dialog)); - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW(window)); - - } else { - - dialog = gl_prefs_dialog_new (GTK_WINDOW(window)); - - g_signal_connect (G_OBJECT (dialog), "destroy", - G_CALLBACK (gtk_widget_destroyed), &dialog); - - gtk_widget_show (dialog); - - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** View/Property-bar-toggle command. */ -/*****************************************************************************/ -void -gl_ui_cmd_view_property_bar_toggle (GtkToggleAction *action, - glWindow *window) -{ - gboolean state; - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_TOGGLE_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - state = gtk_toggle_action_get_active (action); - - gl_prefs->property_toolbar_visible = state; - if (state) { - gtk_widget_show (GTK_WIDGET (window->property_bar)); - } else { - gtk_widget_hide (GTK_WIDGET (window->property_bar)); - } - gl_prefs_model_save_settings (gl_prefs); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** View/Grid-toggle command. */ -/*****************************************************************************/ -void -gl_ui_cmd_view_grid_toggle (GtkToggleAction *action, - glWindow *window) -{ - gboolean state; - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_TOGGLE_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - state = gtk_toggle_action_get_active (action); - - if (window->view != NULL) - { - if (state) { - gl_view_show_grid (GL_VIEW(window->view)); - } else { - gl_view_hide_grid (GL_VIEW(window->view)); - } - } - - gl_prefs->grid_visible = state; - gl_prefs_model_save_settings (gl_prefs); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** View/Markup-toggle command. */ -/*****************************************************************************/ -void -gl_ui_cmd_view_markup_toggle (GtkToggleAction *action, - glWindow *window) -{ - gboolean state; - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_TOGGLE_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - state = gtk_toggle_action_get_active (action); - - if (window->view != NULL) - { - if (state) { - gl_view_show_markup (GL_VIEW(window->view)); - } else { - gl_view_hide_markup (GL_VIEW(window->view)); - } - } - - gl_prefs->markup_visible = state; - gl_prefs_model_save_settings (gl_prefs); - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** View/Zoom-in command. */ -/*****************************************************************************/ -void -gl_ui_cmd_view_zoomin (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_zoom_in (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** View/Zoom-out command. */ -/*****************************************************************************/ -void -gl_ui_cmd_view_zoomout (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_zoom_out (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** View/Zoom-1:1 command. */ -/*****************************************************************************/ -void -gl_ui_cmd_view_zoom1to1 (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_set_zoom (GL_VIEW(window->view), 1.0); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** View/Zoom-to-fit command. */ -/*****************************************************************************/ -void -gl_ui_cmd_view_zoom_to_fit (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_zoom_to_fit (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Arrow-mode command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_arrow_mode (GtkAction *action, - glWindow *window) -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_arrow_mode (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Create-text object command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_create_text (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_object_create_mode (GL_VIEW(window->view), - GL_LABEL_OBJECT_TEXT); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Create-box object command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_create_box (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_object_create_mode (GL_VIEW(window->view), - GL_LABEL_OBJECT_BOX); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Create-line object command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_create_line (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_object_create_mode (GL_VIEW(window->view), - GL_LABEL_OBJECT_LINE); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Create-ellipse object command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_create_ellipse (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_object_create_mode (GL_VIEW(window->view), - GL_LABEL_OBJECT_ELLIPSE); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Create-image object command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_create_image (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_object_create_mode (GL_VIEW(window->view), - GL_LABEL_OBJECT_IMAGE); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Create-barcode object command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_create_barcode (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_object_create_mode (GL_VIEW(window->view), - GL_LABEL_OBJECT_BARCODE); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Raise command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_raise (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_raise_selection (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Lower command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_lower (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_lower_selection (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Rotate-left-90-degrees command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_rotate_left (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_rotate_selection_left (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Rotate-right-90-degrees command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_rotate_right (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_rotate_selection_right (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Flip-horizontally command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_flip_horiz (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_flip_selection_horiz (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Flip-vertically command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_flip_vert (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_flip_selection_vert (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Align-left command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_align_left (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_align_selection_left (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Align-right command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_align_right (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_align_selection_right (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Align-horizontal-center command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_align_hcenter (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_align_selection_hcenter (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Align-top command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_align_top (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_align_selection_top (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Align-bottom command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_align_bottom (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_align_selection_bottom (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Align-vertical center command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_align_vcenter (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_align_selection_vcenter (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Center-horizontally command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_center_horiz (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_center_selection_horiz (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Center-vertically command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_center_vert (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->view != NULL) { - gl_view_center_selection_vert (GL_VIEW(window->view)); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/*****************************************************************************/ -/** Objects/Edit- merge-properties command. */ -/*****************************************************************************/ -void -gl_ui_cmd_objects_merge_properties (GtkAction *action, - glWindow *window) - -{ - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (window->merge_dialog) { - - gtk_window_present (GTK_WINDOW(window->merge_dialog)); - gtk_window_set_transient_for (GTK_WINDOW (window->merge_dialog), - GTK_WINDOW (window)); - - } else { - - window->merge_dialog = - g_object_ref ( - gl_merge_properties_dialog_new (GL_VIEW(window->view)->label, - GTK_WINDOW(window)) ); - - g_signal_connect (G_OBJECT(window->merge_dialog), "destroy", - G_CALLBACK (gtk_widget_destroyed), - &window->merge_dialog); - - gtk_widget_show (GTK_WIDGET (window->merge_dialog)); - - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** Help/Contents command. */ -/****************************************************************************/ -void -gl_ui_cmd_help_contents (GtkAction *action, - glWindow *window) -{ - GError *error = NULL; - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (window)), - "ghelp:glabels", - GDK_CURRENT_TIME, - &error); - - if (error != NULL) - { - g_message ("%s", error->message); - - g_error_free (error); - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - -/****************************************************************************/ -/** Help/About command. */ -/****************************************************************************/ -void -gl_ui_cmd_help_about (GtkAction *action, - glWindow *window) -{ - static GtkWidget *about = NULL; - - GdkPixbuf *pixbuf = NULL; - - const gchar *authors[] = { - "Jim Evins", - " ", - _("Glabels includes contributions from:"), - "Frederic Ruaudel", - "Wayne Schuller", - "Emmanuel Pacaud", - "Austin Henry", - " ", - _("See the file AUTHORS for additional credits,"), - _("or visit http://glabels.sourceforge.net/"), - NULL - }; - - const gchar *artists[] = { - "Nestor Di", - "Jim Evins", - NULL - }; - - const gchar *copy_text = "Copyright \xc2\xa9 2001-2009 Jim Evins"; - - const gchar *about_text = _("A label and business card creation program.\n"); - - const gchar *url = "http://glabels.sourceforge.net"; - - const gchar *translator_credits = _("translator-credits"); - - const gchar *license = _( - "gLabels is free software: you can redistribute it and/or modify\n" - "it under the terms of the GNU General Public License as published by\n" - "the Free Software Foundation, either version 3 of the License, or\n" - "(at your option) any later version.\n" - "\n" - "gLabels is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "GNU General Public License for more details.\n"); - - gl_debug (DEBUG_COMMANDS, "START"); - - g_return_if_fail (action && GTK_IS_ACTION(action)); - g_return_if_fail (window && GL_IS_WINDOW(window)); - - if (about != NULL) - { - - gtk_window_present (GTK_WINDOW (about)); - gtk_window_set_transient_for (GTK_WINDOW (about), - GTK_WINDOW (window)); - - } else { - - pixbuf = gdk_pixbuf_new_from_file (GLABELS_PIXMAP_DIR "glabels-splash.png", NULL); - - about = gtk_about_dialog_new (); - gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG(about), _("glabels")); - gtk_about_dialog_set_version (GTK_ABOUT_DIALOG(about), VERSION); - gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG(about), copy_text); - gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG(about), about_text); - gtk_about_dialog_set_website (GTK_ABOUT_DIALOG(about), url); - gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG(about), pixbuf); - - gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG(about), authors); - gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG(about), artists); - gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG(about), - translator_credits); - gtk_about_dialog_set_license (GTK_ABOUT_DIALOG(about), license); - - gtk_window_set_destroy_with_parent (GTK_WINDOW (about), TRUE); - - g_signal_connect (G_OBJECT (about), "response", - G_CALLBACK (gtk_widget_destroy), NULL); - g_signal_connect (G_OBJECT (about), "destroy", - G_CALLBACK (gtk_widget_destroyed), &about); - - gtk_window_set_transient_for (GTK_WINDOW (about), - GTK_WINDOW (window)); - - gtk_window_present (GTK_WINDOW (about)); - - if (pixbuf != NULL) - g_object_unref (pixbuf); - - } - - gl_debug (DEBUG_COMMANDS, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui-commands.h b/glabels2/src/ui-commands.h deleted file mode 100644 index 42cfc89b..00000000 --- a/glabels2/src/ui-commands.h +++ /dev/null @@ -1,208 +0,0 @@ -/* - * ui-commands.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __COMMANDS_H__ -#define __COMMANDS_H__ - -#include -#include "window.h" - -G_BEGIN_DECLS - -void gl_ui_cmd_file_new (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_file_properties (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_file_template_designer (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_file_open (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_file_open_recent (GtkRecentChooser *chooser, - glWindow *window); - -void gl_ui_cmd_file_save (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_file_save_as (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_file_print (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_file_print_preview (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_file_close (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_file_quit (GtkAction *action, - glWindow *window); - - - -void gl_ui_cmd_edit_undo (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_edit_redo (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_edit_cut (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_edit_copy (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_edit_paste (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_edit_delete (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_edit_select_all (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_edit_unselect_all (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_edit_preferences (GtkAction *action, - glWindow *window); - - - -void gl_ui_cmd_view_property_bar_toggle (GtkToggleAction *action, - glWindow *window); - -void gl_ui_cmd_view_property_bar_tips_toggle (GtkToggleAction *action, - glWindow *window); - -void gl_ui_cmd_view_grid_toggle (GtkToggleAction *action, - glWindow *window); - -void gl_ui_cmd_view_markup_toggle (GtkToggleAction *action, - glWindow *window); - - - -void gl_ui_cmd_view_zoomin (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_view_zoomout (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_view_zoom1to1 (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_view_zoom_to_fit (GtkAction *action, - glWindow *window); - - - -void gl_ui_cmd_objects_arrow_mode (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_create_text (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_create_box (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_create_line (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_create_ellipse (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_create_image (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_create_barcode (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_raise (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_lower (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_rotate_left (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_rotate_right (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_flip_horiz (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_flip_vert (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_align_left (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_align_right (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_align_hcenter (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_align_top (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_align_bottom (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_align_vcenter (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_center_horiz (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_center_vert (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_objects_merge_properties (GtkAction *action, - glWindow *window); - - - -void gl_ui_cmd_help_contents (GtkAction *action, - glWindow *window); - -void gl_ui_cmd_help_about (GtkAction *action, - glWindow *window); - -G_END_DECLS - -#endif /* __COMMANDS_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui-property-bar.c b/glabels2/src/ui-property-bar.c deleted file mode 100644 index 30ae6cbf..00000000 --- a/glabels2/src/ui-property-bar.c +++ /dev/null @@ -1,1245 +0,0 @@ -/* - * ui-property-bar.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "ui-property-bar.h" - -#include -#include -#include - -#include "builder-util.h" -#include "font-combo.h" -#include "color-combo-button.h" -#include "stock-pixmaps/stockpixbufs.h" -#include "prefs.h" -#include "color.h" - -#include "debug.h" - - -/*===========================================================================*/ -/* Private macros and constants. */ -/*===========================================================================*/ - - -/*===========================================================================*/ -/* Private data types */ -/*===========================================================================*/ - -struct _glUIPropertyBarPrivate { - - glView *view; - - GtkBuilder *builder; - - GtkWidget *tool_bar; - - /* Font selection */ - GtkWidget *font_family_eventbox; - GtkWidget *font_family_combo; - GtkWidget *font_size_spin; - GtkWidget *font_bold_toggle; - GtkWidget *font_italic_toggle; - - /* Text alignemnt radios */ - GtkWidget *text_align_left_radio; - GtkWidget *text_align_center_radio; - GtkWidget *text_align_right_radio; - - /* Color combos */ - GtkWidget *text_color_eventbox; - GtkWidget *text_color_button; - GtkWidget *fill_color_eventbox; - GtkWidget *fill_color_button; - GtkWidget *line_color_eventbox; - GtkWidget *line_color_button; - - /* Line width */ - GtkWidget *line_width_spin; - - /* Prevent recursion */ - gboolean stop_signals; -}; - - -/*===========================================================================*/ -/* Private globals */ -/*===========================================================================*/ - - -/*===========================================================================*/ -/* Local function prototypes */ -/*===========================================================================*/ - -static void gl_ui_property_bar_finalize (GObject *object); - -static void gl_ui_property_bar_construct (glUIPropertyBar *this); - -static void selection_changed_cb (glUIPropertyBar *this); - -static void font_family_changed_cb (GtkComboBox *combo, - glUIPropertyBar *this); - -static void font_size_changed_cb (GtkSpinButton *spin, - glUIPropertyBar *this); - -static void text_color_changed_cb (glColorComboButton *cc, - guint color, - gboolean is_default, - glUIPropertyBar *this); - -static void fill_color_changed_cb (glColorComboButton *cc, - guint color, - gboolean is_default, - glUIPropertyBar *this); - -static void line_color_changed_cb (glColorComboButton *cc, - guint color, - gboolean is_default, - glUIPropertyBar *this); - -static void line_width_changed_cb (GtkSpinButton *spin, - glUIPropertyBar *this); - -static void font_bold_toggled_cb (GtkToggleToolButton *toggle, - glUIPropertyBar *this); - -static void font_italic_toggled_cb (GtkToggleToolButton *toggle, - glUIPropertyBar *this); - -static void text_align_toggled_cb (GtkToggleToolButton *toggle, - glUIPropertyBar *this); - -static void set_doc_items_sensitive (glUIPropertyBar *this, - gboolean state); - -static void set_text_items_sensitive (glUIPropertyBar *this, - gboolean state); - -static void set_fill_items_sensitive (glUIPropertyBar *this, - gboolean state); - -static void set_line_color_items_sensitive (glUIPropertyBar *this, - gboolean state); - -static void set_line_width_items_sensitive (glUIPropertyBar *this, - gboolean state); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glUIPropertyBar, gl_ui_property_bar, GTK_TYPE_HBOX); - - -static void -gl_ui_property_bar_class_init (glUIPropertyBarClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - gl_ui_property_bar_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_ui_property_bar_finalize; - - gl_debug (DEBUG_PROPERTY_BAR, "END"); -} - - -static void -gl_ui_property_bar_init (glUIPropertyBar *this) -{ - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - this->priv = g_new0 (glUIPropertyBarPrivate, 1); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); -} - - -static void -gl_ui_property_bar_finalize (GObject *object) -{ - glUIPropertyBar *this = GL_UI_PROPERTY_BAR (object); - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_UI_PROPERTY_BAR (object)); - - if (this->priv->view) - { - g_object_unref (G_OBJECT(this->priv->view)); - } - if (this->priv->builder) - { - g_object_unref (G_OBJECT(this->priv->builder)); - } - g_free (this->priv); - - G_OBJECT_CLASS (gl_ui_property_bar_parent_class)->finalize (object); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); -} - - -/****************************************************************************/ -/* Create a NEW property_bar. */ -/****************************************************************************/ -GtkWidget * -gl_ui_property_bar_new (void) -{ - glUIPropertyBar *this; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - this = g_object_new (GL_TYPE_UI_PROPERTY_BAR, NULL); - - gl_ui_property_bar_construct (this); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - return GTK_WIDGET (this); -} - - -/******************************************************************************/ -/* Initialize property toolbar. */ -/******************************************************************************/ -static void -gl_ui_property_bar_construct (glUIPropertyBar *this) -{ - GtkBuilder *builder; - static gchar *object_ids[] = { "property_toolbar", - "adjustment1", "adjustment2", - NULL }; - GError *error = NULL; - GdkPixbuf *pixbuf = NULL; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - this->priv->stop_signals = TRUE; - - builder = gtk_builder_new (); - gtk_builder_add_objects_from_file (builder, - GLABELS_BUILDER_DIR "property-bar.builder", - object_ids, - &error); - if (error) { - g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); - g_error_free (error); - return; - } - - gl_builder_util_get_widgets (builder, - "property_toolbar", &this->priv->tool_bar, - "font_family_eventbox", &this->priv->font_family_eventbox, - "font_size_spin", &this->priv->font_size_spin, - "font_bold_toggle", &this->priv->font_bold_toggle, - "font_italic_toggle", &this->priv->font_italic_toggle, - "text_align_left_radio", &this->priv->text_align_left_radio, - "text_align_center_radio", &this->priv->text_align_center_radio, - "text_align_right_radio", &this->priv->text_align_right_radio, - "text_color_eventbox", &this->priv->text_color_eventbox, - "fill_color_eventbox", &this->priv->fill_color_eventbox, - "line_color_eventbox", &this->priv->line_color_eventbox, - "line_width_spin", &this->priv->line_width_spin, - NULL); - - gtk_container_add (GTK_CONTAINER (this), this->priv->tool_bar); - - this->priv->font_family_combo = gl_font_combo_new (gl_prefs->default_font_family); - gtk_container_add (GTK_CONTAINER (this->priv->font_family_eventbox), - this->priv->font_family_combo); - - pixbuf = gdk_pixbuf_new_from_inline (-1, stock_text_24, FALSE, NULL); - this->priv->text_color_button = - gl_color_combo_button_new (pixbuf, - _("Default"), - GL_COLOR_TEXT_DEFAULT, - gl_prefs->default_text_color); - gl_color_combo_button_set_relief (GL_COLOR_COMBO_BUTTON(this->priv->text_color_button), - GTK_RELIEF_NONE); - g_object_unref (G_OBJECT (pixbuf)); - gtk_container_add (GTK_CONTAINER (this->priv->text_color_eventbox), - this->priv->text_color_button); - - pixbuf = gdk_pixbuf_new_from_inline (-1, stock_bucket_fill_24, FALSE, NULL); - this->priv->fill_color_button = - gl_color_combo_button_new (pixbuf, - _("No Fill"), - GL_COLOR_NO_FILL, - gl_prefs->default_fill_color); - gl_color_combo_button_set_relief (GL_COLOR_COMBO_BUTTON(this->priv->fill_color_button), - GTK_RELIEF_NONE); - g_object_unref (G_OBJECT (pixbuf)); - gtk_container_add (GTK_CONTAINER (this->priv->fill_color_eventbox), - this->priv->fill_color_button); - - pixbuf = gdk_pixbuf_new_from_inline (-1, stock_pencil_24, FALSE, NULL); - this->priv->line_color_button = - gl_color_combo_button_new (pixbuf, - _("No Line"), - GL_COLOR_NO_LINE, - gl_prefs->default_line_color); - gl_color_combo_button_set_relief (GL_COLOR_COMBO_BUTTON(this->priv->line_color_button), - GTK_RELIEF_NONE); - g_object_unref (G_OBJECT (pixbuf)); - gtk_container_add (GTK_CONTAINER (this->priv->line_color_eventbox), - this->priv->line_color_button); - - /* Save reference to gui tree so we don't lose tooltips */ - this->priv->builder = builder; - - set_doc_items_sensitive (this, FALSE); - - /* Font family entry widget */ - g_signal_connect (G_OBJECT (this->priv->font_family_combo), - "changed", G_CALLBACK (font_family_changed_cb), this); - - /* Font size entry widget */ - gtk_spin_button_set_value (GTK_SPIN_BUTTON(this->priv->font_size_spin), - gl_prefs->default_font_size); - - g_signal_connect (G_OBJECT (this->priv->font_size_spin), - "changed", G_CALLBACK (font_size_changed_cb), this); - - - /* Bold and Italic toggles */ - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_bold_toggle), - (gl_prefs->default_font_weight == PANGO_WEIGHT_BOLD)); - g_signal_connect (G_OBJECT (this->priv->font_bold_toggle), - "toggled", G_CALLBACK (font_bold_toggled_cb), this); - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_italic_toggle), - gl_prefs->default_font_italic_flag); - g_signal_connect (G_OBJECT (this->priv->font_italic_toggle), - "toggled", G_CALLBACK (font_italic_toggled_cb), this); - - - /* Text alignment radio group */ - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_left_radio), - (gl_prefs->default_text_alignment == PANGO_ALIGN_LEFT)); - g_signal_connect (G_OBJECT (this->priv->text_align_left_radio), - "toggled", G_CALLBACK (text_align_toggled_cb), this); - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_center_radio), - (gl_prefs->default_text_alignment == PANGO_ALIGN_CENTER)); - g_signal_connect (G_OBJECT (this->priv->text_align_center_radio), - "toggled", G_CALLBACK (text_align_toggled_cb), this); - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio), - (gl_prefs->default_text_alignment == PANGO_ALIGN_RIGHT)); - g_signal_connect (G_OBJECT (this->priv->text_align_right_radio), - "toggled", G_CALLBACK (text_align_toggled_cb), this); - - /* Text color widget */ - gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->text_color_button), - gl_prefs->default_text_color); - g_signal_connect (G_OBJECT (this->priv->text_color_button), - "color_changed", - G_CALLBACK (text_color_changed_cb), this); - - /* Fill color widget */ - gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->fill_color_button), - gl_prefs->default_fill_color); - g_signal_connect (G_OBJECT (this->priv->fill_color_button), - "color_changed", - G_CALLBACK (fill_color_changed_cb), this); - - /* Line color widget */ - gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->line_color_button), - gl_prefs->default_line_color); - g_signal_connect (G_OBJECT (this->priv->line_color_button), - "color_changed", - G_CALLBACK (line_color_changed_cb), this); - - /* Line width entry widget */ - g_signal_connect (G_OBJECT (this->priv->line_width_spin), - "changed", - G_CALLBACK (line_width_changed_cb), this); - - this->priv->stop_signals = FALSE; - - gl_debug (DEBUG_PROPERTY_BAR, "END"); -} - - -/****************************************************************************/ -/* Fill widgets with default values. */ -/****************************************************************************/ -static void -reset_to_default_properties (glView *view, - glUIPropertyBar *this) -{ - - gl_font_combo_set_family (GL_FONT_COMBO (this->priv->font_family_combo), - view->default_font_family); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON(this->priv->font_size_spin), - view->default_font_size); - - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_bold_toggle), - (view->default_font_weight == PANGO_WEIGHT_BOLD)); - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_italic_toggle), - view->default_font_italic_flag); - - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_left_radio), - (view->default_text_alignment == PANGO_ALIGN_LEFT)); - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_center_radio), - (view->default_text_alignment == PANGO_ALIGN_CENTER)); - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio), - (view->default_text_alignment == PANGO_ALIGN_RIGHT)); - - gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON(this->priv->text_color_button), - view->default_text_color); - - gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON(this->priv->fill_color_button), - view->default_fill_color); - - gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON(this->priv->line_color_button), - view->default_line_color); - - gtk_spin_button_set_value (GTK_SPIN_BUTTON(this->priv->line_width_spin), - view->default_line_width); -} - - -/****************************************************************************/ -/* Set view associated with property_bar. */ -/****************************************************************************/ -void -gl_ui_property_bar_set_view (glUIPropertyBar *this, - glView *view) -{ - glLabel *label; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - label = view->label; - g_return_if_fail (label && GL_IS_LABEL (label)); - - set_doc_items_sensitive (this, TRUE); - - this->priv->view = GL_VIEW (g_object_ref (G_OBJECT (view))); - - reset_to_default_properties (view, this); - - g_signal_connect_swapped (G_OBJECT(view), "selection_changed", - G_CALLBACK(selection_changed_cb), this); - - g_signal_connect_swapped (G_OBJECT(view->label), "changed", - G_CALLBACK(selection_changed_cb), this); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. View "selection state changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_text_properties (glView *view, - glUIPropertyBar *this) -{ - gboolean can_text, is_first_object; - gboolean is_same_font_family, is_same_font_size; - gboolean is_same_text_color, is_same_is_italic; - gboolean is_same_is_bold, is_same_align; - GList *p; - glLabelObject *object; - gchar *selection_font_family, *font_family; - gdouble selection_font_size, font_size; - guint selection_text_color, text_color; - glColorNode *text_color_node; - gboolean selection_is_italic, is_italic; - gboolean selection_is_bold, is_bold; - PangoAlignment selection_align, align; - - can_text = gl_view_can_selection_text (view); - set_text_items_sensitive (this, can_text); - - if (!can_text) - return; - - is_same_is_italic = - is_same_is_bold = - is_same_align = - is_same_text_color = - is_same_font_size = - is_same_font_family = TRUE; - selection_font_family = NULL; - selection_font_size = -1; - selection_align = PANGO_ALIGN_LEFT; - selection_is_italic = TRUE; - selection_is_bold = TRUE; - selection_text_color = 0; - - is_first_object = TRUE; - - for (p = view->selected_object_list; p != NULL; p = p->next) - { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - if (!gl_label_object_can_text (object)) - continue; - - font_family = gl_label_object_get_font_family (object); - if (font_family != NULL) - { - if (selection_font_family == NULL) - { - selection_font_family = g_strdup (font_family); - } - else - { - if (strcmp (font_family, selection_font_family) != 0) - { - is_same_font_family = FALSE; - } - } - g_free (font_family); - } - - font_size = gl_label_object_get_font_size (object); - - text_color_node = gl_label_object_get_text_color (object); - if (text_color_node->field_flag) - { - /* If a merge field is set we use the default color for merged color*/ - text_color = GL_COLOR_MERGE_DEFAULT; - - } - else - { - text_color = text_color_node->color; - } - gl_color_node_free (&text_color_node); - - is_italic = gl_label_object_get_font_italic_flag (object); - is_bold = gl_label_object_get_font_weight (object) == PANGO_WEIGHT_BOLD; - align = gl_label_object_get_text_alignment (object); - - if (is_first_object) - { - selection_font_size = font_size; - selection_text_color = text_color; - selection_is_italic = is_italic; - selection_is_bold = is_bold; - selection_align = align; - } - else - { - if (font_size != selection_font_size) - is_same_font_size = FALSE; - if (text_color != selection_text_color) - is_same_text_color = FALSE; - if (is_italic != selection_is_italic) - is_same_is_italic = FALSE; - if (is_bold != selection_is_bold) - is_same_is_bold = FALSE; - if (align != selection_align) - is_same_align = FALSE; - } - is_first_object = FALSE; - } - - if (is_same_font_family && (selection_font_family != NULL)) - gl_debug (DEBUG_PROPERTY_BAR, "same font family = %s", - selection_font_family); - gl_font_combo_set_family (GL_FONT_COMBO (this->priv->font_family_combo), - is_same_font_family?selection_font_family:""); - g_free (selection_font_family); - - if (is_same_font_size) - { - gl_debug (DEBUG_PROPERTY_BAR, "same font size = %g", - selection_font_size); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (this->priv->font_size_spin), - selection_font_size); - } - else - { - gtk_entry_set_text (GTK_ENTRY (this->priv->font_size_spin), ""); - } - - if (is_same_text_color) - { - gl_debug (DEBUG_PROPERTY_BAR, "same text color = %08x", selection_text_color); - gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->text_color_button), - selection_text_color); - } - - if (is_same_is_italic) - { - gl_debug (DEBUG_PROPERTY_BAR, "same italic flag = %d", - selection_is_italic); - } - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_italic_toggle), - selection_is_italic && is_same_is_italic); - - if (is_same_is_bold) - { - gl_debug (DEBUG_PROPERTY_BAR, "same bold flag = %d", - selection_is_bold); - } - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_bold_toggle), - selection_is_bold && is_same_is_bold); - - if (is_same_align) - gl_debug (DEBUG_PROPERTY_BAR, "same align"); - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_left_radio), - (selection_align == PANGO_ALIGN_LEFT) && - is_same_align); - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_center_radio), - (selection_align == PANGO_ALIGN_CENTER) && - is_same_align); - gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio), - (selection_align == PANGO_ALIGN_RIGHT) && - is_same_align); -} - - -static void -update_fill_color (glView *view, - glUIPropertyBar *this) -{ - gboolean can, is_first_object; - gboolean is_same_fill_color; - GList *p; - glLabelObject *object; - guint selection_fill_color, fill_color; - glColorNode *fill_color_node; - - can = gl_view_can_selection_fill (view); - set_fill_items_sensitive (this, can); - - if (!can) - return; - - is_same_fill_color = TRUE; - is_first_object = TRUE; - selection_fill_color = 0; - - for (p = view->selected_object_list; p != NULL; p = p->next) - { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - if (!gl_label_object_can_fill (object)) - continue; - - fill_color_node = gl_label_object_get_fill_color (object); - if (fill_color_node->field_flag) - { - /* If a merge field is set we use the default color for merged color*/ - fill_color = GL_COLOR_FILL_MERGE_DEFAULT; - - } - else - { - fill_color = fill_color_node->color; - } - gl_color_node_free (&fill_color_node); - - if (is_first_object) - { - selection_fill_color = fill_color; - } - else - { - if (fill_color != selection_fill_color) - { - is_same_fill_color = FALSE; - } - } - is_first_object = FALSE; - } - - if (is_same_fill_color) - { - gl_debug (DEBUG_PROPERTY_BAR, "same fill color = %08x", selection_fill_color); - gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->fill_color_button), - selection_fill_color); - } -} - - -static void -update_line_color (glView *view, - glUIPropertyBar *this) -{ - gboolean can, is_first_object; - gboolean is_same_line_color; - GList *p; - glLabelObject *object; - guint selection_line_color, line_color; - glColorNode *line_color_node; - - can = gl_view_can_selection_line_color (view); - set_line_color_items_sensitive (this, can); - - if (!can) - return; - - is_same_line_color = TRUE; - is_first_object = TRUE; - selection_line_color = 0; - - for (p = view->selected_object_list; p != NULL; p = p->next) - { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - if (!gl_label_object_can_line_color (object)) - continue; - - line_color_node = gl_label_object_get_line_color (object); - if (line_color_node->field_flag) - { - /* If a merge field is set we use the default color for merged color*/ - line_color = GL_COLOR_MERGE_DEFAULT; - - } - else - { - line_color = line_color_node->color; - } - gl_color_node_free (&line_color_node); - - if (is_first_object) - { - selection_line_color = line_color; - } - else - { - if (line_color != selection_line_color) - { - is_same_line_color = FALSE; - } - } - is_first_object = FALSE; - } - - if (is_same_line_color) - { - gl_debug (DEBUG_PROPERTY_BAR, "same line color = %08x", selection_line_color); - gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->line_color_button), - selection_line_color); - } -} - - -static void -update_line_width (glView *view, - glUIPropertyBar *this) -{ - gboolean can, is_first_object; - gboolean is_same_line_width; - GList *p; - glLabelObject *object; - gdouble selection_line_width, line_width; - - can = gl_view_can_selection_line_width (view); - set_line_width_items_sensitive (this, can); - - if (!can) - return; - - is_same_line_width = TRUE; - is_first_object = TRUE; - selection_line_width = 0; - - for (p = view->selected_object_list; p != NULL; p = p->next) - { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - if (!gl_label_object_can_line_width (object)) - continue; - - line_width = gl_label_object_get_line_width (object); - - if (is_first_object) - { - selection_line_width = line_width; - } - else - { - if (line_width != selection_line_width) - { - is_same_line_width = FALSE; - } - } - is_first_object = FALSE; - } - - if (is_same_line_width) - { - gl_debug (DEBUG_PROPERTY_BAR, "same line width = %g", selection_line_width); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (this->priv->line_width_spin), - selection_line_width); - } - else - { - gtk_entry_set_text (GTK_ENTRY (this->priv->line_width_spin), ""); - } -} - - -static void -selection_changed_cb (glUIPropertyBar *this) -{ - glView *view = this->priv->view; - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (this && GL_IS_UI_PROPERTY_BAR (this)); - - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - if (gl_view_is_selection_empty (view)) - { - /* No selection: make all controls active. */ - reset_to_default_properties (view, this); - set_doc_items_sensitive (this, TRUE); - } - else - { - update_text_properties (view, this); - update_fill_color (view, this); - update_line_color (view, this); - update_line_width (view, this); - } - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Font family entry changed. */ -/*--------------------------------------------------------------------------*/ -static void -font_family_changed_cb (GtkComboBox *combo, - glUIPropertyBar *this) -{ - gchar *font_family; - - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - font_family = gl_font_combo_get_family (GL_FONT_COMBO (combo)); - if ( strlen(font_family) ) - { - gl_view_set_selection_font_family (this->priv->view, - font_family); - gl_view_set_default_font_family (this->priv->view, - font_family); - } - g_free (font_family); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Font size spin button changed. */ -/*--------------------------------------------------------------------------*/ -static void -font_size_changed_cb (GtkSpinButton *spin, - glUIPropertyBar *this) -{ - gdouble font_size; - - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - font_size = gtk_spin_button_get_value (spin); - - gl_view_set_selection_font_size (this->priv->view, - font_size); - gl_view_set_default_font_size (this->priv->view, - font_size); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Text color combo changed. */ -/*--------------------------------------------------------------------------*/ -static void -text_color_changed_cb (glColorComboButton *cc, - guint color, - gboolean is_default, - glUIPropertyBar *this) -{ - glColorNode *text_color_node; - - g_return_if_fail (this && GL_IS_UI_PROPERTY_BAR (this)); - - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - text_color_node = gl_color_node_new_default (); - text_color_node->color = color; - - gl_debug (DEBUG_PROPERTY_BAR, "Color=%08x, Is_default=%d", - color, is_default); - - if (is_default) - { - text_color_node->color = gl_prefs->default_text_color; - gl_view_set_selection_text_color (this->priv->view, - text_color_node); - gl_view_set_default_text_color (this->priv->view, - gl_prefs->default_text_color); - } - else - { - gl_view_set_selection_text_color (this->priv->view, - text_color_node); - gl_view_set_default_text_color (this->priv->view, - text_color_node->color); - } - - gl_color_node_free (&text_color_node); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Fill color combo changed. */ -/*--------------------------------------------------------------------------*/ -static void -fill_color_changed_cb (glColorComboButton *cc, - guint color, - gboolean is_default, - glUIPropertyBar *this) -{ - glColorNode *fill_color_node; - - g_return_if_fail (this && GL_IS_UI_PROPERTY_BAR (this)); - - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - fill_color_node = gl_color_node_new_default (); - - fill_color_node->color = color; - - gl_debug (DEBUG_PROPERTY_BAR, "Color=%08x, Is_default=%d", - color, is_default); - - if (is_default) - { - - fill_color_node->color = GL_COLOR_NONE; - gl_view_set_selection_fill_color (this->priv->view, - fill_color_node); - gl_view_set_default_fill_color (this->priv->view, - fill_color_node->color); - } - else - { - gl_view_set_selection_fill_color (this->priv->view, - fill_color_node); - gl_view_set_default_fill_color (this->priv->view, - fill_color_node->color); - } - gl_color_node_free (&fill_color_node); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Line color combo changed. */ -/*--------------------------------------------------------------------------*/ -static void -line_color_changed_cb (glColorComboButton *cc, - guint color, - gboolean is_default, - glUIPropertyBar *this) -{ - glColorNode *line_color_node; - - g_return_if_fail (this && GL_IS_UI_PROPERTY_BAR (this)); - - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - line_color_node = gl_color_node_new_default (); - line_color_node->color = color; - - gl_debug (DEBUG_PROPERTY_BAR, "Color=%08x, Is_default=%d", - color, is_default); - - if (is_default) - { - line_color_node->color = GL_COLOR_NONE; - gl_view_set_selection_line_color (this->priv->view, - line_color_node); - gl_view_set_default_line_color (this->priv->view, - line_color_node->color); - } - else - { - gl_view_set_selection_line_color (this->priv->view, - line_color_node); - gl_view_set_default_line_color (this->priv->view, - line_color_node->color); - } - gl_color_node_free (&line_color_node); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Line width spin button changed. */ -/*--------------------------------------------------------------------------*/ -static void -line_width_changed_cb (GtkSpinButton *spin, - glUIPropertyBar *this) -{ - gdouble line_width; - - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - if (this->priv->view) - { - line_width = gtk_spin_button_get_value (spin); - - gl_view_set_selection_line_width (this->priv->view, - line_width); - gl_view_set_default_line_width (this->priv->view, - line_width); - } - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Font bold toggled callback. */ -/*---------------------------------------------------------------------------*/ -static void -font_bold_toggled_cb (GtkToggleToolButton *toggle, - glUIPropertyBar *this) -{ - gboolean state; - PangoWeight weight; - - - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - state = gtk_toggle_tool_button_get_active (toggle); - - weight = state ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL; - - gl_view_set_selection_font_weight (this->priv->view, weight); - gl_view_set_default_font_weight (this->priv->view, weight); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Font italic toggled callback. */ -/*---------------------------------------------------------------------------*/ -static void -font_italic_toggled_cb (GtkToggleToolButton *toggle, - glUIPropertyBar *this) -{ - gboolean state; - - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - state = gtk_toggle_tool_button_get_active (toggle); - - gl_view_set_selection_font_italic_flag (this->priv->view, state); - gl_view_set_default_font_italic_flag (this->priv->view, state); - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Text align toggled callback. */ -/*---------------------------------------------------------------------------*/ -static void -text_align_toggled_cb (GtkToggleToolButton *toggle, - glUIPropertyBar *this) -{ - if (this->priv->stop_signals) return; - this->priv->stop_signals = TRUE; - - gl_debug (DEBUG_PROPERTY_BAR, "START"); - - if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_left_radio))) - { - gl_view_set_selection_text_alignment (this->priv->view, - PANGO_ALIGN_LEFT); - gl_view_set_default_text_alignment (this->priv->view, - PANGO_ALIGN_LEFT); - } - - if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_center_radio))) - { - gl_view_set_selection_text_alignment (this->priv->view, - PANGO_ALIGN_CENTER); - gl_view_set_default_text_alignment (this->priv->view, - PANGO_ALIGN_CENTER); - } - - if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio))) - { - gl_view_set_selection_text_alignment (this->priv->view, - PANGO_ALIGN_RIGHT); - gl_view_set_default_text_alignment (this->priv->view, - PANGO_ALIGN_RIGHT); - } - - gl_debug (DEBUG_PROPERTY_BAR, "END"); - - this->priv->stop_signals = FALSE; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set sensitivity of doc controls. */ -/*---------------------------------------------------------------------------*/ -static void -set_doc_items_sensitive (glUIPropertyBar *this, - gboolean state) -{ - gtk_widget_set_sensitive (this->priv->font_family_combo, state); - gtk_widget_set_sensitive (this->priv->font_size_spin, state); - gtk_widget_set_sensitive (this->priv->font_bold_toggle, state); - gtk_widget_set_sensitive (this->priv->font_italic_toggle, state); - gtk_widget_set_sensitive (this->priv->text_align_left_radio, state); - gtk_widget_set_sensitive (this->priv->text_align_center_radio, state); - gtk_widget_set_sensitive (this->priv->text_align_right_radio, state); - gtk_widget_set_sensitive (this->priv->text_color_button, state); - gtk_widget_set_sensitive (this->priv->fill_color_button, state); - gtk_widget_set_sensitive (this->priv->line_color_button, state); - gtk_widget_set_sensitive (this->priv->line_width_spin, state); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set sensitivity of text related controls. */ -/*---------------------------------------------------------------------------*/ -static void -set_text_items_sensitive (glUIPropertyBar *this, - gboolean state) -{ - gtk_widget_set_sensitive (this->priv->font_family_combo, state); - gtk_widget_set_sensitive (this->priv->font_size_spin, state); - gtk_widget_set_sensitive (this->priv->font_bold_toggle, state); - gtk_widget_set_sensitive (this->priv->font_italic_toggle, state); - gtk_widget_set_sensitive (this->priv->text_align_left_radio, state); - gtk_widget_set_sensitive (this->priv->text_align_center_radio, state); - gtk_widget_set_sensitive (this->priv->text_align_right_radio, state); - gtk_widget_set_sensitive (this->priv->text_color_button, state); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set sensitivity of fill related controls. */ -/*---------------------------------------------------------------------------*/ -static void -set_fill_items_sensitive (glUIPropertyBar *this, - gboolean state) -{ - gtk_widget_set_sensitive (this->priv->fill_color_button, state); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set sensitivity of line color related controls. */ -/*---------------------------------------------------------------------------*/ -static void -set_line_color_items_sensitive (glUIPropertyBar *this, - gboolean state) -{ - gtk_widget_set_sensitive (this->priv->line_color_button, state); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set sensitivity of line width related controls. */ -/*---------------------------------------------------------------------------*/ -static void -set_line_width_items_sensitive (glUIPropertyBar *this, - gboolean state) -{ - gtk_widget_set_sensitive (this->priv->line_width_spin, state); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui-property-bar.h b/glabels2/src/ui-property-bar.h deleted file mode 100644 index 92568277..00000000 --- a/glabels2/src/ui-property-bar.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * ui-property-bar.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __UI_PROPERTY_BAR_H__ -#define __UI_PROPERTY_BAR_H__ - -#include - -#include "view.h" - -G_BEGIN_DECLS - -#define GL_TYPE_UI_PROPERTY_BAR (gl_ui_property_bar_get_type ()) -#define GL_UI_PROPERTY_BAR(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_UI_PROPERTY_BAR, glUIPropertyBar )) -#define GL_UI_PROPERTY_BAR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_UI_PROPERTY_BAR, glUIPropertyBarClass)) -#define GL_IS_UI_PROPERTY_BAR(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_UI_PROPERTY_BAR)) -#define GL_IS_UI_PROPERTY_BAR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_UI_PROPERTY_BAR)) - -typedef struct _glUIPropertyBar glUIPropertyBar; -typedef struct _glUIPropertyBarClass glUIPropertyBarClass; - -typedef struct _glUIPropertyBarPrivate glUIPropertyBarPrivate; - -struct _glUIPropertyBar { - GtkHBox parent_widget; - - glUIPropertyBarPrivate *priv; - -}; - -struct _glUIPropertyBarClass { - GtkHBoxClass parent_class; -}; - -GType gl_ui_property_bar_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_ui_property_bar_new (void); - -void gl_ui_property_bar_set_view (glUIPropertyBar *this, - glView *view); - - -G_END_DECLS - -#endif /* __UI_PROPERTY_BAR_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui-sidebar.c b/glabels2/src/ui-sidebar.c deleted file mode 100644 index 1a821cef..00000000 --- a/glabels2/src/ui-sidebar.c +++ /dev/null @@ -1,231 +0,0 @@ -/* - * ui-sidebar.c - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "ui-sidebar.h" - -#include - -#include "ui-util.h" -#include "object-editor.h" -#include "stock.h" - -#include "debug.h" - - -/*===========================================================================*/ -/* Private macros and constants. */ -/*===========================================================================*/ - -#define DEFAULT_SIDEBAR_WIDTH 340 - - -/*===========================================================================*/ -/* Private data types */ -/*===========================================================================*/ - -struct _glUISidebarPrivate { - - glView *view; - - GtkWidget *child; - GtkWidget *empty_child; -}; - -/*===========================================================================*/ -/* Private globals */ -/*===========================================================================*/ - - -/*===========================================================================*/ -/* Local function prototypes */ -/*===========================================================================*/ - -static void gl_ui_sidebar_finalize (GObject *object); - -static void gl_ui_sidebar_construct (glUISidebar *sidebar); - -static void selection_changed_cb (glView *view, - glUISidebar *sidebar); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glUISidebar, gl_ui_sidebar, GTK_TYPE_VBOX); - - -static void -gl_ui_sidebar_class_init (glUISidebarClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_UI, "START"); - - gl_ui_sidebar_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_ui_sidebar_finalize; - - gl_debug (DEBUG_UI, "END"); -} - - -static void -gl_ui_sidebar_init (glUISidebar *sidebar) -{ - gl_debug (DEBUG_UI, "START"); - - sidebar->priv = g_new0 (glUISidebarPrivate, 1); - - gl_debug (DEBUG_UI, "END"); -} - - -static void -gl_ui_sidebar_finalize (GObject *object) -{ - glUISidebar *sidebar = GL_UI_SIDEBAR (object); - - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_UI_SIDEBAR (object)); - - if (sidebar->priv->view) { - g_object_unref (G_OBJECT(sidebar->priv->view)); - } - g_free (sidebar->priv); - - G_OBJECT_CLASS (gl_ui_sidebar_parent_class)->finalize (object); - - gl_debug (DEBUG_UI, "END"); -} - - -/****************************************************************************/ -/* Create a NEW sidebar. */ -/****************************************************************************/ -GtkWidget * -gl_ui_sidebar_new (void) -{ - glUISidebar *sidebar; - - gl_debug (DEBUG_UI, "START"); - - sidebar = g_object_new (gl_ui_sidebar_get_type (), NULL); - - gtk_widget_set_size_request (GTK_WIDGET (sidebar), DEFAULT_SIDEBAR_WIDTH, -1); - - gl_ui_sidebar_construct (sidebar); - - gl_debug (DEBUG_UI, "END"); - - return GTK_WIDGET(sidebar); -} - - -/******************************************************************************/ -/* Initialize property toolbar. */ -/******************************************************************************/ -static void -gl_ui_sidebar_construct (glUISidebar *sidebar) -{ - gl_debug (DEBUG_UI, "START"); - - sidebar->priv->empty_child = gl_object_editor_new (GL_STOCK_PROPERTIES, - _("Object properties"), - NULL, - GL_OBJECT_EDITOR_EMPTY, - NULL); - - sidebar->priv->child = g_object_ref (sidebar->priv->empty_child); - gtk_widget_show (sidebar->priv->child); - gtk_container_add (GTK_CONTAINER(sidebar), sidebar->priv->child); - - gtk_widget_set_sensitive (GTK_WIDGET (sidebar), FALSE); - - gl_debug (DEBUG_UI, "END"); -} - - -/****************************************************************************/ -/* Set view associated with sidebar. */ -/****************************************************************************/ -void -gl_ui_sidebar_set_view (glUISidebar *sidebar, - glView *view) -{ - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - gtk_widget_set_sensitive (GTK_WIDGET (sidebar), TRUE); - - sidebar->priv->view = GL_VIEW (g_object_ref (G_OBJECT (view))); - - g_signal_connect (G_OBJECT(view), "selection_changed", - G_CALLBACK(selection_changed_cb), sidebar); - - gl_debug (DEBUG_UI, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. View "selection state changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -selection_changed_cb (glView *view, - glUISidebar *sidebar) -{ - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (sidebar && GL_IS_UI_SIDEBAR (sidebar)); - - gtk_container_remove (GTK_CONTAINER(sidebar), sidebar->priv->child); - - if (gl_view_is_selection_empty (view) || !gl_view_is_selection_atomic (view)) { - - sidebar->priv->child = g_object_ref (sidebar->priv->empty_child); - - } else { - - sidebar->priv->child = g_object_ref (gl_view_get_editor (view)); - - } - - gtk_widget_show (sidebar->priv->child); - - gtk_box_pack_start (GTK_BOX(sidebar), sidebar->priv->child, TRUE, TRUE, 0); - - gl_debug (DEBUG_UI, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui-sidebar.h b/glabels2/src/ui-sidebar.h deleted file mode 100644 index 7139525e..00000000 --- a/glabels2/src/ui-sidebar.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * ui-sidebar.h - * Copyright (C) 2003-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __UI_SIDEBAR_H__ -#define __UI_SIDEBAR_H__ - -#include - -#include "view.h" - -G_BEGIN_DECLS - -#define GL_TYPE_UI_SIDEBAR (gl_ui_sidebar_get_type ()) -#define GL_UI_SIDEBAR(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_UI_SIDEBAR, glUISidebar )) -#define GL_UI_SIDEBAR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_UI_SIDEBAR, glUISidebarClass)) -#define GL_IS_UI_SIDEBAR(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_UI_SIDEBAR)) -#define GL_IS_UI_SIDEBAR_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_UI_SIDEBAR)) - -typedef struct _glUISidebar glUISidebar; -typedef struct _glUISidebarClass glUISidebarClass; - -typedef struct _glUISidebarPrivate glUISidebarPrivate; - -struct _glUISidebar { - GtkVBox parent_widget; - - glUISidebarPrivate *priv; -}; - -struct _glUISidebarClass { - GtkVBoxClass parent_class; -}; - -GType gl_ui_sidebar_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_ui_sidebar_new (void); - -void gl_ui_sidebar_set_view (glUISidebar *sidebar, - glView *view); - - -G_END_DECLS - -#endif /* __UI_SIDEBAR_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui-util.c b/glabels2/src/ui-util.c deleted file mode 100644 index 7494dca9..00000000 --- a/glabels2/src/ui-util.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * ui-util.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "ui-util.h" - -#include - -#include "debug.h" - - -/*==========================================================================*/ -/* Private macros and constants. */ -/*==========================================================================*/ - - -/*==========================================================================*/ -/* Private types. */ -/*==========================================================================*/ - - -/*==========================================================================*/ -/* Private globals */ -/*==========================================================================*/ - - -/*==========================================================================*/ -/* Local function prototypes */ -/*==========================================================================*/ - - -/*****************************************************************************/ -/** Set sensitivity of verb. */ -/*****************************************************************************/ -void -gl_ui_util_set_verb_sensitive (GtkUIManager *ui, - gchar *cname, - gboolean sensitive) -{ - GtkAction *action; - - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (cname != NULL); - g_return_if_fail (GTK_IS_UI_MANAGER (ui)); - - action = gtk_ui_manager_get_action (ui, cname); - - if (action) { - gl_debug (DEBUG_UI, "Set action \"%s\" sensitive = %d", cname, sensitive); - gtk_action_set_sensitive (action, sensitive); - } - - gl_debug (DEBUG_UI, "END"); -} - - -/*****************************************************************************/ -/** Set sensitivity of a list of verbs. */ -/*****************************************************************************/ -void -gl_ui_util_set_verb_list_sensitive (GtkUIManager *ui, - gchar **vlist, - gboolean sensitive) -{ - GtkAction *action; - - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (vlist != NULL); - g_return_if_fail (GTK_IS_UI_MANAGER (ui)); - - for ( ; *vlist; ++vlist) - { - action = gtk_ui_manager_get_action (ui, *vlist); - - if (action) { - gtk_action_set_sensitive (action, sensitive); - } - } - - gl_debug (DEBUG_UI, "END"); -} - - -/*****************************************************************************/ -/** Set state of a verb. */ -/*****************************************************************************/ -void -gl_ui_util_set_verb_state (GtkUIManager *ui, - gchar *cname, - gboolean state) -{ - GtkToggleAction *action; - - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (cname != NULL); - g_return_if_fail (GTK_IS_UI_MANAGER (ui)); - - action = GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (ui, cname)); - - if (action) { - gtk_toggle_action_set_active (action, state); - } - - gl_debug (DEBUG_UI, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui-util.h b/glabels2/src/ui-util.h deleted file mode 100644 index fd9ef042..00000000 --- a/glabels2/src/ui-util.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * ui-util.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __GL_UI_UTIL_H__ -#define __GL_UI_UTIL_H__ - -#include - -G_BEGIN_DECLS - -void gl_ui_util_set_verb_sensitive (GtkUIManager *ui, - gchar *cname, - gboolean sensitive); - -void gl_ui_util_set_verb_list_sensitive (GtkUIManager *ui, - gchar **vlist, - gboolean sensitive); - -void gl_ui_util_set_verb_state (GtkUIManager *ui, - gchar *cname, - gboolean state); - -G_END_DECLS - -#endif /* __GL_UI_UTIL_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui.c b/glabels2/src/ui.c deleted file mode 100644 index 62b67d4e..00000000 --- a/glabels2/src/ui.c +++ /dev/null @@ -1,1130 +0,0 @@ -/* - * ui.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "ui.h" - -#include -#include -#include -#include - -#include "ui-util.h" -#include "ui-commands.h" -#include "file.h" -#include "prefs.h" -#include "stock.h" -#include "window.h" -#include "recent.h" - -#include "debug.h" - - -/*==========================================================================*/ -/* Private macros and constants. */ -/*==========================================================================*/ - - -/*==========================================================================*/ -/* Private types. */ -/*==========================================================================*/ - - -/*==========================================================================*/ -/* Local function prototypes */ -/*==========================================================================*/ - -static void view_ui_item_toggled_cb (GtkToggleAction *action, - GtkUIManager *ui); - -static void set_app_main_toolbar_style (GtkUIManager *ui); - -static void set_app_drawing_toolbar_style (GtkUIManager *ui); - -static void set_view_style (GtkUIManager *ui); - -static void connect_proxy_cb (GtkUIManager *ui, - GtkAction *action, - GtkWidget *proxy, - glWindow *window); - -static void disconnect_proxy_cb (GtkUIManager *ui, - GtkAction *action, - GtkWidget *proxy, - glWindow *window); - -static void menu_item_select_cb (GtkMenuItem *proxy, - glWindow *window); - -static void menu_item_deselect_cb (GtkMenuItem *proxy, - glWindow *window); - - -/*==========================================================================*/ -/* Private globals */ -/*==========================================================================*/ - -static GtkActionEntry entries[] = { - - /* Menu entries. */ - { "FileMenu", NULL, N_("_File") }, - { "FileRecentsMenu", NULL, N_("Open Recent _Files") }, - { "EditMenu", NULL, N_("_Edit") }, - { "ViewMenu", NULL, N_("_View") }, - { "ViewMainToolBarMenu", NULL, N_("Customize Main Toolbar") }, - { "ViewDrawingToolBarMenu", NULL, N_("Customize Drawing Toolbar") }, - { "ViewPropertyToolBarMenu", NULL, N_("Customize Properties Toolbar") }, - { "ObjectsMenu", NULL, N_("_Objects") }, - { "ObjectsCreateMenu", NULL, N_("_Create") }, - { "ObjectsOrderMenu", NULL, N_("_Order") }, - { "ObjectsRotateFlipMenu", NULL, N_("_Rotate/Flip") }, - { "ObjectsAlignHorizMenu", NULL, N_("Align _Horizontal") }, - { "ObjectsAlignVertMenu", NULL, N_("Align _Vertical") }, - { "HelpMenu", NULL, N_("_Help") }, - - /* Popup entries. */ - { "ContextMenu", NULL, N_("Context Menu") }, - { "EmptySelectionContextMenu", NULL, N_("Context Menu") }, - - /* File action entries. */ - { "FileNew", - GTK_STOCK_NEW, - N_("_New"), - "N", - N_("Create a new file"), - G_CALLBACK (gl_ui_cmd_file_new) }, - - { "FileOpen", - GTK_STOCK_OPEN, - N_("_Open..."), - "O", - N_("Open a file"), - G_CALLBACK (gl_ui_cmd_file_open) }, - - { "FileSave", - GTK_STOCK_SAVE, - N_("_Save"), - "S", - N_("Save current file"), - G_CALLBACK (gl_ui_cmd_file_save) }, - - { "FileSaveAs", - GTK_STOCK_SAVE, - N_("Save _As..."), - "S", - N_("Save the current file to a different name"), - G_CALLBACK (gl_ui_cmd_file_save_as) }, - - { "FilePrint", - GTK_STOCK_PRINT, - N_("_Print..."), - "P", - N_("Print the current file"), - G_CALLBACK (gl_ui_cmd_file_print) }, - - { "FileProperties", - GTK_STOCK_PROPERTIES, - N_("Properties..."), - NULL, - N_("Modify document properties"), - G_CALLBACK (gl_ui_cmd_file_properties) }, - - { "FileTemplateDesigner", - NULL, - N_("Template _Designer..."), - NULL, - N_("Create a custom template"), - G_CALLBACK (gl_ui_cmd_file_template_designer) }, - - { "FileClose", - GTK_STOCK_CLOSE, - N_("_Close"), - "F4", - N_("Close the current file"), - G_CALLBACK (gl_ui_cmd_file_close) }, - - { "FileQuit", - GTK_STOCK_QUIT, - N_("_Quit"), - "Q", - N_("Quit the program"), - G_CALLBACK (gl_ui_cmd_file_quit) }, - - - /* Edit action entries. */ - { "EditCut", - GTK_STOCK_CUT, - N_("Cut"), - "X", - N_("Cut the selection"), - G_CALLBACK (gl_ui_cmd_edit_cut) }, - - { "EditCopy", - GTK_STOCK_COPY, - N_("Copy"), - "C", - N_("Copy the selection"), - G_CALLBACK (gl_ui_cmd_edit_copy) }, - - { "EditPaste", - GTK_STOCK_PASTE, - N_("Paste"), - "V", - N_("Paste the clipboard"), - G_CALLBACK (gl_ui_cmd_edit_paste) }, - - { "EditDelete", - NULL, - N_("Delete"), - NULL, - N_("Delete the selected objects"), - G_CALLBACK (gl_ui_cmd_edit_delete) }, - - { "EditSelectAll", - NULL, - N_("Select All"), - "A", - N_("Select all objects"), - G_CALLBACK (gl_ui_cmd_edit_select_all) }, - - { "EditUnSelectAll", - NULL, - N_("Un-select All"), - NULL, - N_("Remove all selections"), - G_CALLBACK (gl_ui_cmd_edit_unselect_all) }, - - { "EditPreferences", - GTK_STOCK_PREFERENCES, - N_("Preferences"), - NULL, - N_("Configure the application"), - G_CALLBACK (gl_ui_cmd_edit_preferences) }, - - - /* View action entries. */ - { "ViewZoomIn", - GTK_STOCK_ZOOM_IN, - N_("Zoom in"), - NULL, - N_("Increase magnification"), - G_CALLBACK (gl_ui_cmd_view_zoomin) }, - - { "ViewZoomOut", - GTK_STOCK_ZOOM_OUT, - N_("Zoom out"), - NULL, - N_("Decrease magnification"), - G_CALLBACK (gl_ui_cmd_view_zoomout) }, - - { "ViewZoom1to1", - GTK_STOCK_ZOOM_100, - N_("Zoom 1 to 1"), - NULL, - N_("Restore scale to 100%"), - G_CALLBACK (gl_ui_cmd_view_zoom1to1) }, - - { "ViewZoomToFit", - GTK_STOCK_ZOOM_FIT, - N_("Zoom to fit"), - NULL, - N_("Set scale to fit window"), - G_CALLBACK (gl_ui_cmd_view_zoom_to_fit) }, - - - /* Objects action entries. */ - { "ObjectsArrowMode", - GL_STOCK_ARROW, - N_("Select Mode"), - NULL, - N_("Select, move and modify objects"), - G_CALLBACK (gl_ui_cmd_objects_arrow_mode) }, - - { "ObjectsCreateText", - GL_STOCK_TEXT, - N_("Text"), - NULL, - N_("Create text object"), - G_CALLBACK (gl_ui_cmd_objects_create_text) }, - - { "ObjectsCreateBox", - GL_STOCK_BOX, - N_("Box"), - NULL, - N_("Create box/rectangle object"), - G_CALLBACK (gl_ui_cmd_objects_create_box) }, - - { "ObjectsCreateLine", - GL_STOCK_LINE, - N_("Line"), - NULL, - N_("Create line object"), - G_CALLBACK (gl_ui_cmd_objects_create_line) }, - - { "ObjectsCreateEllipse", - GL_STOCK_ELLIPSE, - N_("Ellipse"), - NULL, - N_("Create ellipse/circle object"), - G_CALLBACK (gl_ui_cmd_objects_create_ellipse) }, - - { "ObjectsCreateImage", - GL_STOCK_IMAGE, - N_("Image"), - NULL, - N_("Create image object"), - G_CALLBACK (gl_ui_cmd_objects_create_image) }, - - { "ObjectsCreateBarcode", - GL_STOCK_BARCODE, - N_("Barcode"), - NULL, - N_("Create barcode object"), - G_CALLBACK (gl_ui_cmd_objects_create_barcode) }, - - { "ObjectsRaise", - GL_STOCK_ORDER_TOP, - N_("Bring to front"), - NULL, - N_("Raise object to top"), - G_CALLBACK (gl_ui_cmd_objects_raise) }, - - { "ObjectsLower", - GL_STOCK_ORDER_BOTTOM, - N_("Send to back"), - NULL, - N_("Lower object to bottom"), - G_CALLBACK (gl_ui_cmd_objects_lower) }, - - { "ObjectsRotateLeft", - GL_STOCK_ROTATE_LEFT, - N_("Rotate left"), - NULL, - N_("Rotate object 90 degrees counter-clockwise"), - G_CALLBACK (gl_ui_cmd_objects_rotate_left) }, - - { "ObjectsRotateRight", - GL_STOCK_ROTATE_RIGHT, - N_("Rotate right"), - NULL, - N_("Rotate object 90 degrees clockwise"), - G_CALLBACK (gl_ui_cmd_objects_rotate_right) }, - - { "ObjectsFlipHorizontal", - GL_STOCK_FLIP_HORIZ, - N_("Flip horizontally"), - NULL, - N_("Flip object horizontally"), - G_CALLBACK (gl_ui_cmd_objects_flip_horiz) }, - - { "ObjectsFlipVertical", - GL_STOCK_FLIP_VERT, - N_("Flip vertically"), - NULL, - N_("Flip object vertically"), - G_CALLBACK (gl_ui_cmd_objects_flip_vert) }, - - { "ObjectsAlignLeft", - GL_STOCK_ALIGN_LEFT, - N_("Align left"), - NULL, - N_("Align objects to left edges"), - G_CALLBACK (gl_ui_cmd_objects_align_left) }, - - { "ObjectsAlignRight", - GL_STOCK_ALIGN_RIGHT, - N_("Align right"), - NULL, - N_("Align objects to right edges"), - G_CALLBACK (gl_ui_cmd_objects_align_right) }, - - { "ObjectsAlignHCenter", - GL_STOCK_ALIGN_HCENTER, - N_("Align horizontal center"), - NULL, - N_("Align objects to horizontal centers"), - G_CALLBACK (gl_ui_cmd_objects_align_hcenter) }, - - { "ObjectsAlignTop", - GL_STOCK_ALIGN_TOP, - N_("Align tops"), - NULL, - N_("Align objects to top edges"), - G_CALLBACK (gl_ui_cmd_objects_align_top) }, - - { "ObjectsAlignBottom", - GL_STOCK_ALIGN_BOTTOM, - N_("Align bottoms"), - NULL, - N_("Align objects to bottom edges"), - G_CALLBACK (gl_ui_cmd_objects_align_bottom) }, - - { "ObjectsAlignVCenter", - GL_STOCK_ALIGN_VCENTER, - N_("Align vertical center"), - NULL, - N_("Align objects to vertical centers"), - G_CALLBACK (gl_ui_cmd_objects_align_vcenter) }, - - { "ObjectsCenterHorizontal", - GL_STOCK_CENTER_HORIZ, - N_("Center horizontally"), - NULL, - N_("Center objects to horizontal label center"), - G_CALLBACK (gl_ui_cmd_objects_center_horiz) }, - - { "ObjectsCenterVertical", - GL_STOCK_CENTER_VERT, - N_("Center vertically"), - NULL, - N_("Center objects to vertical label center"), - G_CALLBACK (gl_ui_cmd_objects_center_vert) }, - - { "ObjectsMergeProperties", - GL_STOCK_MERGE, - N_("Merge properties"), - NULL, - N_("Edit merge properties"), - G_CALLBACK (gl_ui_cmd_objects_merge_properties) }, - - - /* Help actions entries. */ - { "HelpContents", - GTK_STOCK_HELP, - N_("Contents"), - "F1", - N_("Open glabels manual"), - G_CALLBACK (gl_ui_cmd_help_contents) }, - - { "HelpAbout", - GTK_STOCK_ABOUT, - N_("About..."), - NULL, - N_("About glabels"), - G_CALLBACK (gl_ui_cmd_help_about) }, - -}; -static guint n_entries = G_N_ELEMENTS (entries); - -static GtkToggleActionEntry toggle_entries[] = { - - { "ViewPropertyToolBar", - NULL, - N_("Property toolbar"), - NULL, - N_("Change the visibility of the property toolbar in the current window"), - G_CALLBACK (gl_ui_cmd_view_property_bar_toggle), - TRUE }, - - { "ViewGrid", - NULL, - N_("Grid"), - NULL, - N_("Change the visibility of the grid in the current window"), - G_CALLBACK (gl_ui_cmd_view_grid_toggle), - TRUE }, - - { "ViewMarkup", - NULL, - N_("Markup"), - NULL, - N_("Change the visibility of markup lines in the current window"), - G_CALLBACK (gl_ui_cmd_view_markup_toggle), - TRUE }, - -}; -static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries); - -static GtkToggleActionEntry ui_toggle_entries[] = { - - { "ViewMainToolBar", - NULL, - N_("Main toolbar"), - NULL, - N_("Change the visibility of the main toolbar in the current window"), - G_CALLBACK (view_ui_item_toggled_cb), - TRUE }, - - { "ViewDrawingToolBar", - NULL, - N_("Drawing toolbar"), - NULL, - N_("Change the visibility of the drawing toolbar in the current window"), - G_CALLBACK (view_ui_item_toggled_cb), - TRUE }, - -}; -static guint n_ui_toggle_entries = G_N_ELEMENTS (ui_toggle_entries); - -static const gchar *ui_info = -"" -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -"" -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -"" -" " -" " -" " -"" -""; - - -static gchar* doc_verbs [] = { - "/ui/MenuBar/FileMenu/FileProperties", - "/ui/MenuBar/FileMenu/FileSave", - "/ui/MenuBar/FileMenu/FileSaveAs", - "/ui/MenuBar/FileMenu/FilePrint", - "/ui/MenuBar/FileMenu/FileClose", - "/ui/MenuBar/EditMenu/EditCut", - "/ui/MenuBar/EditMenu/EditCopy", - "/ui/MenuBar/EditMenu/EditPaste", - "/ui/MenuBar/EditMenu/EditDelete", - "/ui/MenuBar/EditMenu/EditSelectAll", - "/ui/MenuBar/EditMenu/EditUnSelectAll", - "/ui/MenuBar/ViewMenu/ViewZoomIn", - "/ui/MenuBar/ViewMenu/ViewZoomOut", - "/ui/MenuBar/ViewMenu/ViewZoom1to1", - "/ui/MenuBar/ViewMenu/ViewZoomToFit", - "/ui/MenuBar/ViewMenu/ViewGrid", - "/ui/MenuBar/ViewMenu/ViewMarkup", - "/ui/MenuBar/ObjectsMenu/ObjectsArrowMode", - "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateText", - "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateLine", - "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateBox", - "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateEllipse", - "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateImage", - "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateBarcode", - "/ui/MenuBar/ObjectsMenu/ObjectsOrderMenu/ObjectsRaise", - "/ui/MenuBar/ObjectsMenu/ObjectsOrderMenu/ObjectsLower", - "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsRotateLeft", - "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsRotateRight", - "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsFlipHorizontal", - "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsFlipVertical", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignLeft", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignRight", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignHCenter", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsCenterHorizontal", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignTop", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignBottom", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignVCenter", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsCenterVertical", - "/ui/MenuBar/ObjectsMenu/ObjectsMergeProperties", - - NULL -}; - -static gchar* doc_modified_verbs [] = { - "/ui/MenuBar/FileMenu/FileSave", - - NULL -}; - -static gchar* selection_verbs [] = { - "/ui/MenuBar/EditMenu/EditCut", - "/ui/MenuBar/EditMenu/EditCopy", - "/ui/MenuBar/EditMenu/EditDelete", - "/ui/MenuBar/EditMenu/EditUnSelectAll", - "/ui/MenuBar/ObjectsMenu/ObjectsOrderMenu/ObjectsRaise", - "/ui/MenuBar/ObjectsMenu/ObjectsOrderMenu/ObjectsLower", - "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsRotateLeft", - "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsRotateRight", - "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsFlipHorizontal", - "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsFlipVertical", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsCenterHorizontal", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsCenterVertical", - - NULL -}; - -static gchar* atomic_selection_verbs [] = { - - NULL -}; - -static gchar* multi_selection_verbs [] = { - "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignLeft", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignRight", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignHCenter", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignTop", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignBottom", - "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignVCenter", - - NULL -}; - - -/*****************************************************************************/ -/** Initialize UI component for given window. */ -/*****************************************************************************/ -GtkUIManager * -gl_ui_new (glWindow *window) -{ - GtkUIManager *ui; - GtkActionGroup *actions; - GError *error = NULL; - GtkWidget *recent_menu; - - gl_debug (DEBUG_UI, "START"); - - g_return_val_if_fail (window && GL_IS_WINDOW (window), NULL); - - gl_debug (DEBUG_UI, "window = %p", window); - - ui = gtk_ui_manager_new (); - - g_signal_connect (ui, "connect_proxy", - G_CALLBACK (connect_proxy_cb), window); - g_signal_connect (ui, "disconnect_proxy", - G_CALLBACK (disconnect_proxy_cb), window); - - actions = gtk_action_group_new ("Actions"); - gtk_action_group_set_translation_domain (actions, NULL); - gtk_action_group_add_actions (actions, entries, n_entries, GTK_WINDOW (window)); - gtk_action_group_add_toggle_actions (actions, - toggle_entries, n_toggle_entries, - window); - gtk_action_group_add_toggle_actions (actions, - ui_toggle_entries, n_ui_toggle_entries, - ui); - - gtk_ui_manager_insert_action_group (ui, actions, 0); - gtk_window_add_accel_group (GTK_WINDOW (window), gtk_ui_manager_get_accel_group (ui)); - - gl_debug (DEBUG_UI, "Creating ui from string"); - if (!gtk_ui_manager_add_ui_from_string (ui, ui_info, strlen (ui_info), &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - } - - /* Set the toolbar styles according to prefs */ - set_app_main_toolbar_style (ui); - set_app_drawing_toolbar_style (ui); - - /* Set view grid and markup visibility according to prefs */ - set_view_style (ui); - - /* add an Open Recents Submenu */ - recent_menu = gl_recent_create_menu (); - g_signal_connect (G_OBJECT (recent_menu), "item-activated", - G_CALLBACK (gl_ui_cmd_file_open_recent), window); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (gtk_ui_manager_get_widget (ui, "/MenuBar/FileMenu/FileRecentsMenu")), - recent_menu); - - - gl_ui_util_set_verb_list_sensitive (ui, doc_verbs, FALSE); - - gl_debug (DEBUG_UI, "END"); - - return ui; -} - - -/*****************************************************************************/ -/** Unref wrapper. */ -/*****************************************************************************/ -void -gl_ui_unref (GtkUIManager *ui) -{ - gl_debug (DEBUG_UI, "START"); - - g_object_unref(ui); - - gl_debug (DEBUG_UI, "END"); -} - - -/*****************************************************************************/ -/** Update all verbs of given UI component. */ -/*****************************************************************************/ -void -gl_ui_update_all (GtkUIManager *ui, - glView *view) -{ - glLabel *label; - - gl_debug (DEBUG_UI, "START"); - - gl_ui_util_set_verb_list_sensitive (ui, doc_verbs, TRUE); - - label = view->label; - g_return_if_fail (label != NULL); - - gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/EditMenu/EditUndo", - gl_label_can_undo (label)); - gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/EditMenu/EditRedo", - gl_label_can_redo (label)); - - gl_ui_util_set_verb_list_sensitive (ui, doc_modified_verbs, - gl_label_is_modified (label)); - - gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewZoomIn", - !gl_view_is_zoom_max (view)); - gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewZoomOut", - !gl_view_is_zoom_min (view)); - - gl_ui_util_set_verb_list_sensitive (ui, selection_verbs, - !gl_view_is_selection_empty (view)); - - gl_ui_util_set_verb_list_sensitive (ui, atomic_selection_verbs, - gl_view_is_selection_atomic (view)); - - gl_ui_util_set_verb_list_sensitive (ui, multi_selection_verbs, - !gl_view_is_selection_empty (view) - && !gl_view_is_selection_atomic (view)); - - gl_debug (DEBUG_UI, "END"); -} - - -/*****************************************************************************/ -/** Update all verbs of given UI component to "no document" state. */ -/*****************************************************************************/ -void -gl_ui_update_nodoc (GtkUIManager *ui) -{ - gl_debug (DEBUG_UI, "START"); - - gl_ui_util_set_verb_list_sensitive (ui, doc_verbs, FALSE); - - gl_debug (DEBUG_UI, "END"); -} - - -/*****************************************************************************/ -/** Update label modified verbs of given UI component. */ -/*****************************************************************************/ -void -gl_ui_update_modified_verbs (GtkUIManager *ui, - glLabel *label) -{ - gl_debug (DEBUG_UI, "START"); - - gl_ui_util_set_verb_list_sensitive (ui, - doc_modified_verbs, - gl_label_is_modified (label)); - - gl_debug (DEBUG_UI, "END"); -} - - -/*****************************************************************************/ -/** Update verbs associated with selection state of given UI component. */ -/*****************************************************************************/ -void -gl_ui_update_selection_verbs (GtkUIManager *ui, - glView *view) -{ - gl_debug (DEBUG_UI, "START"); - - gl_ui_util_set_verb_list_sensitive (ui, selection_verbs, - !gl_view_is_selection_empty (view)); - - gl_ui_util_set_verb_list_sensitive (ui, atomic_selection_verbs, - gl_view_is_selection_atomic (view)); - - gl_ui_util_set_verb_list_sensitive (ui, multi_selection_verbs, - !gl_view_is_selection_empty (view) - && !gl_view_is_selection_atomic (view)); - - gl_debug (DEBUG_UI, "END"); -} - - -/*****************************************************************************/ -/** Update verbs associated with zoom level of given UI component. */ -/*****************************************************************************/ -void -gl_ui_update_zoom_verbs (GtkUIManager *ui, - glView *view) -{ - gl_debug (DEBUG_UI, "START"); - - gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewZoomIn", - !gl_view_is_zoom_max (view)); - gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewZoomOut", - !gl_view_is_zoom_min (view)); - - gl_debug (DEBUG_UI, "END"); -} - - -/*****************************************************************************/ -/** Update undo/redo verbs of given UI component. */ -/*****************************************************************************/ -void -gl_ui_update_undo_redo_verbs (GtkUIManager *ui, - glLabel *label) -{ - gl_debug (DEBUG_UI, "START"); - - gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/EditMenu/EditUndo", - gl_label_can_undo (label)); - - gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/EditMenu/EditRedo", - gl_label_can_redo (label)); - - gl_debug (DEBUG_UI, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. View menu item toggled callback. */ -/*---------------------------------------------------------------------------*/ -static void -view_ui_item_toggled_cb (GtkToggleAction *action, - GtkUIManager *ui) -{ - const gchar *name; - gboolean state; - - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (action && GTK_IS_TOGGLE_ACTION (action)); - - name = gtk_action_get_name (GTK_ACTION (action)); - state = gtk_toggle_action_get_active (action); - - gl_debug (DEBUG_UI, "Action = %s, State = %d", name, state); - - if (strcmp (name, "ViewMainToolBar") == 0) - { - gl_prefs->main_toolbar_visible = state; - set_app_main_toolbar_style (ui); - gl_prefs_model_save_settings (gl_prefs); - } - - if (strcmp (name, "ViewDrawingToolBar") == 0) - { - gl_prefs->drawing_toolbar_visible = state; - set_app_drawing_toolbar_style (ui); - gl_prefs_model_save_settings (gl_prefs); - } - - gl_debug (DEBUG_UI, ""); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Set main toolbar style. */ -/*---------------------------------------------------------------------------*/ -static void -set_app_main_toolbar_style (GtkUIManager *ui) -{ - GtkWidget *toolbar; - - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (ui && GTK_IS_UI_MANAGER (ui)); - - /* Updated view menu */ - gl_ui_util_set_verb_state (ui, "/ui/ViewMenu/ViewMainToolBar", - gl_prefs->main_toolbar_visible); - - toolbar = gtk_ui_manager_get_widget (ui, "/MainToolBar"); - - if (gl_prefs->main_toolbar_visible) { - gtk_widget_show_all (toolbar); - } else { - gtk_widget_hide (toolbar); - } - - gl_debug (DEBUG_UI, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Set drawing toolbar style. */ -/*---------------------------------------------------------------------------*/ -static void -set_app_drawing_toolbar_style (GtkUIManager *ui) -{ - GtkWidget *toolbar; - - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (ui && GTK_IS_UI_MANAGER (ui)); - - /* Updated view menu */ - gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenu/ViewDrawingToolBar", - gl_prefs->drawing_toolbar_visible); - - toolbar = gtk_ui_manager_get_widget (ui, "/DrawingToolBar"); - - gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS); - - if (gl_prefs->drawing_toolbar_visible) { - gtk_widget_show_all (toolbar); - } else { - gtk_widget_hide (toolbar); - } - - gl_debug (DEBUG_UI, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Set visibility of grid and markup. */ -/*---------------------------------------------------------------------------*/ -static void -set_view_style (GtkUIManager *ui) -{ - gl_debug (DEBUG_UI, "START"); - - g_return_if_fail (ui && GTK_IS_UI_MANAGER(ui)); - - gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenu/ViewGrid", - gl_prefs->grid_visible); - - gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenu/ViewMarkup", - gl_prefs->markup_visible); - - gl_debug (DEBUG_UI, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Connect proxy callback. */ -/*---------------------------------------------------------------------------*/ -static void -connect_proxy_cb (GtkUIManager *ui, - GtkAction *action, - GtkWidget *proxy, - glWindow *window) -{ - if (GTK_IS_MENU_ITEM (proxy)) - { - g_signal_connect (proxy, "select", - G_CALLBACK (menu_item_select_cb), window); - g_signal_connect (proxy, "deselect", - G_CALLBACK (menu_item_deselect_cb), window); - } -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Disconnect proxy callback. */ -/*---------------------------------------------------------------------------*/ -static void -disconnect_proxy_cb (GtkUIManager *ui, - GtkAction *action, - GtkWidget *proxy, - glWindow *window) -{ - if (GTK_IS_MENU_ITEM (proxy)) - { - g_signal_handlers_disconnect_by_func - (proxy, G_CALLBACK (menu_item_select_cb), window); - g_signal_handlers_disconnect_by_func - (proxy, G_CALLBACK (menu_item_deselect_cb), window); - } -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Menu item select callback. */ -/*---------------------------------------------------------------------------*/ -static void -menu_item_select_cb (GtkMenuItem *proxy, - glWindow *window) -{ - GtkAction *action; - char *message; - - g_return_if_fail (window && GL_IS_WINDOW (window)); - g_return_if_fail (window->status_bar && GTK_IS_STATUSBAR (window->status_bar)); - - action = g_object_get_data (G_OBJECT (proxy), "gtk-action"); - g_return_if_fail (action != NULL); - - g_object_get (G_OBJECT (action), "tooltip", &message, NULL); - if (message) - { - gtk_statusbar_push (GTK_STATUSBAR (window->status_bar), - window->menu_tips_context_id, message); - g_free (message); - } -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Menu item deselect callback. */ -/*---------------------------------------------------------------------------*/ -static void -menu_item_deselect_cb (GtkMenuItem *proxy, - glWindow *window) -{ - g_return_if_fail (window && GL_IS_WINDOW (window)); - g_return_if_fail (window->status_bar && GTK_IS_STATUSBAR (window->status_bar)); - - gtk_statusbar_pop (GTK_STATUSBAR (window->status_bar), - window->menu_tips_context_id); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/ui.h b/glabels2/src/ui.h deleted file mode 100644 index fb681cc5..00000000 --- a/glabels2/src/ui.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * ui.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __GL_UI_H__ -#define __GL_UI_H__ - -#include - -#include "window.h" -#include "view.h" - -G_BEGIN_DECLS - -GtkUIManager *gl_ui_new (glWindow *window); - -void gl_ui_unref (GtkUIManager *ui); - -void gl_ui_update_all (GtkUIManager *ui, - glView *view); - -void gl_ui_update_nodoc (GtkUIManager *ui); - -void gl_ui_update_modified_verbs (GtkUIManager *ui, - glLabel *label); - -void gl_ui_update_selection_verbs (GtkUIManager *ui, - glView *view); - -void gl_ui_update_zoom_verbs (GtkUIManager *ui, - glView *view); - -void gl_ui_update_undo_redo_verbs (GtkUIManager *ui, - glLabel *label); - -G_END_DECLS - -#endif /* __GL_UI_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-barcode.c b/glabels2/src/view-barcode.c deleted file mode 100644 index 84b9cfa4..00000000 --- a/glabels2/src/view-barcode.c +++ /dev/null @@ -1,443 +0,0 @@ -/* - * view-barcode.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "view-barcode.h" - -#include -#include - -#include "color.h" -#include "object-editor.h" -#include "stock.h" - -#include "pixmaps/cursor_barcode.xbm" -#include "pixmaps/cursor_barcode_mask.xbm" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glViewBarcodePrivate { -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_view_barcode_finalize (GObject *object); - -static GtkWidget *construct_properties_editor (glViewObject *view_object); - -static void update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object); - -static void update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor); - -static void update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor); - -static gboolean object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glViewBarcode, gl_view_barcode, GL_TYPE_VIEW_OBJECT); - - -static void -gl_view_barcode_class_init (glViewBarcodeClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); - - gl_debug (DEBUG_VIEW, "START"); - - gl_view_barcode_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_view_barcode_finalize; - - view_object_class->construct_editor = construct_properties_editor; - view_object_class->object_at = object_at; - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_barcode_init (glViewBarcode *view_barcode) -{ - gl_debug (DEBUG_VIEW, "START"); - - view_barcode->priv = g_new0 (glViewBarcodePrivate, 1); - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_barcode_finalize (GObject *object) -{ - glViewBarcode *view_barcode = GL_VIEW_BARCODE (object); - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (object && GL_IS_VIEW_BARCODE (object)); - - g_free (view_barcode->priv); - - G_OBJECT_CLASS (gl_view_barcode_parent_class)->finalize (object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* NEW barcode object view. */ -/*****************************************************************************/ -glViewObject * -gl_view_barcode_new (glLabelBarcode *object, - glView *view) -{ - glViewBarcode *view_barcode; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_BARCODE (object), NULL); - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - view_barcode = g_object_new (gl_view_barcode_get_type(), NULL); - - gl_view_object_set_object (GL_VIEW_OBJECT(view_barcode), - GL_LABEL_OBJECT(object), - GL_VIEW_OBJECT_HANDLES_BOX); - gl_view_object_set_view (GL_VIEW_OBJECT(view_barcode), view); - - gl_debug (DEBUG_VIEW, "END"); - - return GL_VIEW_OBJECT (view_barcode); -} - - -/*****************************************************************************/ -/* Create a properties dialog for a barcode object. */ -/*****************************************************************************/ -static GtkWidget * -construct_properties_editor (glViewObject *view_object) -{ - GtkWidget *editor; - glViewBarcode *view_bc = (glViewBarcode *)view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - object = gl_view_object_get_object (GL_VIEW_OBJECT(view_bc)); - - /* Build editor. */ - editor = gl_object_editor_new (GL_STOCK_BARCODE, _("Barcode object properties"), - object->parent, - GL_OBJECT_EDITOR_POSITION_PAGE, - GL_OBJECT_EDITOR_SIZE_PAGE, - GL_OBJECT_EDITOR_BC_PAGE, - GL_OBJECT_EDITOR_DATA_PAGE, - 0); - - /* Update */ - update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); - update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - - /* Connect signals. */ - g_signal_connect (G_OBJECT (editor), "changed", - G_CALLBACK(update_object_from_editor_cb), object); - g_signal_connect (G_OBJECT (object), "changed", - G_CALLBACK (update_editor_from_object_cb), editor); - g_signal_connect (G_OBJECT (object), "moved", - G_CALLBACK (update_editor_from_move_cb), editor); - - gl_debug (DEBUG_VIEW, "END"); - - return editor; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. editor "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object) -{ - gdouble x, y, w, h; - glTextNode *text_node; - gchar *id; - gboolean text_flag, cs_flag; - glColorNode *color_node; - guint format_digits; - - gl_debug (DEBUG_VIEW, "START"); - - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - - gl_object_editor_get_position (editor, &x, &y); - gl_label_object_set_position (object, x, y); - - gl_object_editor_get_size (editor, &w, &h); - gl_label_object_set_size (object, w, h); - - text_node = gl_object_editor_get_data (editor); - gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node); - gl_text_node_free (&text_node); - - gl_object_editor_get_bc_style (editor, &id, &text_flag, &cs_flag, &format_digits); - color_node = gl_object_editor_get_bc_color (editor); - gl_label_barcode_set_props (GL_LABEL_BARCODE(object), - id, text_flag, cs_flag, format_digits); - gl_label_object_set_line_color (object, color_node); - gl_color_node_free (&color_node); - g_free (id); - - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor) -{ - gdouble w, h; - glTextNode *text_node; - gchar *id; - gboolean text_flag, cs_flag; - glColorNode *color_node; - glMerge *merge; - guint format_digits; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_size (object, &w, &h); - gl_object_editor_set_size (editor, w, h); - - merge = gl_label_get_merge (GL_LABEL(object->parent)); - - gl_label_barcode_get_props (GL_LABEL_BARCODE(object), - &id, &text_flag, &cs_flag, &format_digits); - color_node = gl_label_object_get_line_color (object); - gl_object_editor_set_bc_style (editor, id, text_flag, cs_flag, format_digits); - gl_object_editor_set_bc_color (editor, (merge != NULL), color_node); - gl_color_node_free (&color_node); - g_free (id); - - text_node = gl_label_barcode_get_data (GL_LABEL_BARCODE(object)); - gl_object_editor_set_data (editor, (merge != NULL), text_node); - gl_text_node_free (&text_node); - - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "moved" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor) -{ - gdouble x, y; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_position (object, &x, &y); - gl_object_editor_set_position (editor, x, y); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Is object at (x,y)? */ -/*****************************************************************************/ -static gboolean -object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y) -{ - glLabelObject *object; - gdouble w, h; - - object = gl_view_object_get_object (view_object); - - gl_label_object_get_size (object, &w, &h); - - cairo_rectangle (cr, 0.0, 0.0, w, h); - - if (cairo_in_fill (cr, x, y)) - { - return TRUE; - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/*****************************************************************************/ -GdkCursor * -gl_view_barcode_get_create_cursor (void) -{ - GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - gl_debug (DEBUG_VIEW, "START"); - - pixmap_data = gdk_bitmap_create_from_data (NULL, - (gchar *)cursor_barcode_bits, - cursor_barcode_width, - cursor_barcode_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - (gchar *)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); - - gl_debug (DEBUG_VIEW, "END"); - - return cursor; -} - - -/*****************************************************************************/ -/* Object creation handler: button press event. */ -/*****************************************************************************/ -void -gl_view_barcode_create_button_press_event (glView *view, - gdouble x, - gdouble y) -{ - GObject *object; - glTextNode *text_node; - glColorNode *line_color_node; - - gl_view_unselect_all (view); - - line_color_node = gl_color_node_new_default (); - - object = gl_label_barcode_new (view->label); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - text_node = gl_text_node_new_from_text ("123456789"); - gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node); - line_color_node->color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5); - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), - line_color_node); - - gl_color_node_free (&line_color_node); - - view->create_object = GL_LABEL_OBJECT (object); - view->create_x0 = x; - view->create_y0 = y; -} - - -/*****************************************************************************/ -/* Object creation handler: motion event. */ -/*****************************************************************************/ -void -gl_view_barcode_create_motion_event (glView *view, - gdouble x, - gdouble y) -{ - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); -} - - -/*****************************************************************************/ -/* Object creation handler: button relesase event. */ -/*****************************************************************************/ -void -gl_view_barcode_create_button_release_event (glView *view, - gdouble x, - gdouble y) -{ - glColorNode *line_color_node; - - line_color_node = gl_color_node_new_default (); - - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); - line_color_node->color = gl_view_get_default_line_color(view); - gl_label_object_set_line_color (GL_LABEL_OBJECT(view->create_object), line_color_node); - gl_color_node_free (&line_color_node); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-barcode.h b/glabels2/src/view-barcode.h deleted file mode 100644 index a2b52d08..00000000 --- a/glabels2/src/view-barcode.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * view-barcode.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __VIEW_BARCODE_H__ -#define __VIEW_BARCODE_H__ - -#include "view-object.h" -#include "label-barcode.h" - -G_BEGIN_DECLS - - -#define GL_TYPE_VIEW_BARCODE (gl_view_barcode_get_type ()) -#define GL_VIEW_BARCODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_BARCODE, glViewBarcode)) -#define GL_VIEW_BARCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_BARCODE, glViewBarcodeClass)) -#define GL_IS_VIEW_BARCODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_BARCODE)) -#define GL_IS_VIEW_BARCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_BARCODE)) - -typedef struct _glViewBarcode glViewBarcode; -typedef struct _glViewBarcodeClass glViewBarcodeClass; - -typedef struct _glViewBarcodePrivate glViewBarcodePrivate; - -struct _glViewBarcode { - glViewObject parent_object; - - glViewBarcodePrivate *priv; -}; - -struct _glViewBarcodeClass { - glViewObjectClass parent_class; -}; - - -GType gl_view_barcode_get_type (void) G_GNUC_CONST; - -glViewObject *gl_view_barcode_new (glLabelBarcode *object, - glView *view); - - -/* cursor for creating barcode objects */ -GdkCursor *gl_view_barcode_get_create_cursor (void); - -/* Object creation handlers. */ -void gl_view_barcode_create_button_press_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_barcode_create_motion_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_barcode_create_button_release_event (glView *view, - gdouble x, - gdouble y); - - -G_END_DECLS - -#endif /* __VIEW_BARCODE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-box.c b/glabels2/src/view-box.c deleted file mode 100644 index bcb76931..00000000 --- a/glabels2/src/view-box.c +++ /dev/null @@ -1,504 +0,0 @@ -/* - * view-box.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "view-box.h" - -#include -#include - -#include "color.h" -#include "object-editor.h" -#include "stock.h" - -#include "pixmaps/cursor_box.xbm" -#include "pixmaps/cursor_box_mask.xbm" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glViewBoxPrivate { -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_view_box_finalize (GObject *object); - -static GtkWidget *construct_properties_editor (glViewObject *view_object); - -static void update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object); - -static void update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor); - -static void update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor); - -static gboolean object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glViewBox, gl_view_box, GL_TYPE_VIEW_OBJECT); - - -static void -gl_view_box_class_init (glViewBoxClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); - - gl_debug (DEBUG_VIEW, "START"); - - gl_view_box_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_view_box_finalize; - - view_object_class->construct_editor = construct_properties_editor; - view_object_class->object_at = object_at; - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_box_init (glViewBox *view_box) -{ - gl_debug (DEBUG_VIEW, "START"); - - view_box->priv = g_new0 (glViewBoxPrivate, 1); - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_box_finalize (GObject *object) -{ - glViewBox *view_box = GL_VIEW_BOX (object); - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (object && GL_IS_VIEW_BOX (object)); - - g_free (view_box->priv); - - G_OBJECT_CLASS (gl_view_box_parent_class)->finalize (object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* NEW box object view. */ -/*****************************************************************************/ -glViewObject * -gl_view_box_new (glLabelBox *object, - glView *view) -{ - glViewBox *view_box; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_BOX (object), NULL); - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - view_box = g_object_new (gl_view_box_get_type(), NULL); - - gl_view_object_set_object (GL_VIEW_OBJECT(view_box), - GL_LABEL_OBJECT(object), - GL_VIEW_OBJECT_HANDLES_BOX); - gl_view_object_set_view (GL_VIEW_OBJECT(view_box), view); - - gl_debug (DEBUG_VIEW, "END"); - - return GL_VIEW_OBJECT (view_box); -} - - -/*****************************************************************************/ -/* Create a properties dialog for a box object. */ -/*****************************************************************************/ -static GtkWidget * -construct_properties_editor (glViewObject *view_object) -{ - GtkWidget *editor; - glViewBox *view_box = (glViewBox *)view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - object = gl_view_object_get_object (GL_VIEW_OBJECT(view_box)); - - /* Build editor. */ - editor = gl_object_editor_new (GL_STOCK_BOX, _("Box object properties"), - object->parent, - GL_OBJECT_EDITOR_SHADOW_PAGE, - GL_OBJECT_EDITOR_POSITION_PAGE, - GL_OBJECT_EDITOR_SIZE_PAGE, - GL_OBJECT_EDITOR_FILL_PAGE, - GL_OBJECT_EDITOR_LINE_PAGE, - 0); - - /* Update */ - update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); - update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - - /* Connect signals. */ - g_signal_connect (G_OBJECT (editor), "changed", - G_CALLBACK(update_object_from_editor_cb), object); - g_signal_connect (G_OBJECT (object), "changed", - G_CALLBACK (update_editor_from_object_cb), editor); - g_signal_connect (G_OBJECT (object), "moved", - G_CALLBACK (update_editor_from_move_cb), editor); - - gl_debug (DEBUG_VIEW, "END"); - - return editor; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. editor "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object) -{ - gdouble x, y, w, h; - glColorNode *line_color_node; - gdouble line_width; - glColorNode *fill_color_node; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - - - gl_debug (DEBUG_VIEW, "START"); - - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_object_editor_get_position (editor, &x, &y); - gl_label_object_set_position (object, x, y); - - gl_object_editor_get_size (editor, &w, &h); - gl_label_object_set_size (object, w, h); - - fill_color_node = gl_object_editor_get_fill_color (editor); - gl_label_object_set_fill_color (object, fill_color_node); - gl_color_node_free (&fill_color_node); - - line_color_node = gl_object_editor_get_line_color (editor); - gl_label_object_set_line_color (object, line_color_node); - gl_color_node_free (&line_color_node); - - line_width = gl_object_editor_get_line_width (editor); - gl_label_object_set_line_width (object, line_width); - - shadow_state = gl_object_editor_get_shadow_state (editor); - gl_label_object_set_shadow_state (object, shadow_state); - - gl_object_editor_get_shadow_offset (editor, &shadow_x, &shadow_y); - gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); - - shadow_color_node = gl_object_editor_get_shadow_color (editor); - gl_label_object_set_shadow_color (object, shadow_color_node); - gl_color_node_free (&shadow_color_node); - - shadow_opacity = gl_object_editor_get_shadow_opacity (editor); - gl_label_object_set_shadow_opacity (object, shadow_opacity); - - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor) -{ - gdouble w, h; - glColorNode *line_color_node; - gdouble line_width; - glColorNode *fill_color_node; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - glMerge *merge; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_size (object, &w, &h); - gl_object_editor_set_size (editor, w, h); - merge = gl_label_get_merge (GL_LABEL(object->parent)); - - fill_color_node = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object)); - gl_object_editor_set_fill_color (editor, (merge != NULL), fill_color_node); - gl_color_node_free (&fill_color_node); - - line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); - gl_object_editor_set_line_color (editor, (merge != NULL), line_color_node); - gl_color_node_free (&line_color_node); - - line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); - gl_object_editor_set_line_width (editor, line_width); - - shadow_state = gl_label_object_get_shadow_state (object); - gl_object_editor_set_shadow_state (editor, shadow_state); - - gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); - gl_object_editor_set_shadow_offset (editor, shadow_x, shadow_y); - - shadow_color_node = gl_label_object_get_shadow_color (object); - gl_object_editor_set_shadow_color (editor, (merge != NULL), shadow_color_node); - gl_color_node_free (&shadow_color_node); - - shadow_opacity = gl_label_object_get_shadow_opacity (object); - gl_object_editor_set_shadow_opacity (editor, shadow_opacity); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "moved" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor) -{ - gdouble x, y; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_position (object, &x, &y); - gl_object_editor_set_position (editor, x, y); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Is object at (x,y)? */ -/*****************************************************************************/ -static gboolean -object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y) -{ - glLabelObject *object; - gdouble w, h; - gdouble line_width; - - object = gl_view_object_get_object (view_object); - - gl_label_object_get_size (object, &w, &h); - - cairo_rectangle (cr, 0.0, 0.0, w, h); - - if (cairo_in_fill (cr, x, y)) - { - return TRUE; - } - - line_width = gl_label_object_get_line_width (object); - cairo_set_line_width (cr, line_width); - if (cairo_in_stroke (cr, x, y)) - { - return TRUE; - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/*****************************************************************************/ -GdkCursor * -gl_view_box_get_create_cursor (void) -{ - GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - gl_debug (DEBUG_VIEW, "START"); - - pixmap_data = gdk_bitmap_create_from_data (NULL, - (gchar *)cursor_box_bits, - cursor_box_width, - cursor_box_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - (gchar *)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); - - gl_debug (DEBUG_VIEW, "END"); - - return cursor; -} - - -/*****************************************************************************/ -/* Object creation handler: button press event. */ -/*****************************************************************************/ -void -gl_view_box_create_button_press_event (glView *view, - gdouble x, - gdouble y) -{ - GObject *object; - glColorNode *fill_color_node; - glColorNode *line_color_node; - - gl_view_unselect_all (view); - - fill_color_node = gl_color_node_new_default (); - line_color_node = gl_color_node_new_default (); - - object = gl_label_box_new (view->label); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - gl_label_object_set_size (GL_LABEL_OBJECT(object), 0.0, 0.0); - line_color_node->color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5); - fill_color_node->color = gl_color_set_opacity (gl_view_get_default_fill_color(view), 0.5); - gl_label_object_set_line_width (GL_LABEL_OBJECT(object), - gl_view_get_default_line_width(view)); - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), - line_color_node); - gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), - fill_color_node); - - gl_color_node_free (&fill_color_node); - gl_color_node_free (&line_color_node); - - view->create_object = GL_LABEL_OBJECT (object); - view->create_x0 = x; - view->create_y0 = y; -} - - -/*****************************************************************************/ -/* Object creation handler: motion event. */ -/*****************************************************************************/ -void -gl_view_box_create_motion_event (glView *view, - gdouble x, - gdouble y) -{ - gdouble w, h; - - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), - MIN (x, view->create_x0), MIN (y, view->create_y0)); - w = MAX (x, view->create_x0) - MIN (x, view->create_x0); - h = MAX (y, view->create_y0) - MIN (y, view->create_y0); - gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); -} - - -/*****************************************************************************/ -/* Object creation handler: button relesase event. */ -/*****************************************************************************/ -void -gl_view_box_create_button_release_event (glView *view, - gdouble x, - gdouble y) -{ - glColorNode *fill_color_node; - glColorNode *line_color_node; - gdouble w, h; - - fill_color_node = gl_color_node_new_default (); - line_color_node = gl_color_node_new_default (); - - if ((view->create_x0 == x) && (view->create_y0 == y)) { - x = view->create_x0 + 36.0; - y = view->create_y0 + 36.0; - } - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), - MIN (x, view->create_x0), MIN (y, view->create_y0)); - w = MAX (x, view->create_x0) - MIN (x, view->create_x0); - h = MAX (y, view->create_y0) - MIN (y, view->create_y0); - gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); - line_color_node->color = gl_view_get_default_line_color(view); - gl_label_object_set_line_color (GL_LABEL_OBJECT(view->create_object), line_color_node); - fill_color_node->color = gl_view_get_default_fill_color(view); - gl_label_object_set_fill_color (GL_LABEL_OBJECT(view->create_object), fill_color_node); - gl_color_node_free (&fill_color_node); - gl_color_node_free (&line_color_node); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-box.h b/glabels2/src/view-box.h deleted file mode 100644 index 930ae1ec..00000000 --- a/glabels2/src/view-box.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * view-box.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __VIEW_BOX_H__ -#define __VIEW_BOX_H__ - -#include "view-object.h" -#include "label-box.h" - -G_BEGIN_DECLS - - -#define GL_TYPE_VIEW_BOX (gl_view_box_get_type ()) -#define GL_VIEW_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_BOX, glViewBox)) -#define GL_VIEW_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_BOX, glViewBoxClass)) -#define GL_IS_VIEW_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_BOX)) -#define GL_IS_VIEW_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_BOX)) - -typedef struct _glViewBox glViewBox; -typedef struct _glViewBoxClass glViewBoxClass; - -typedef struct _glViewBoxPrivate glViewBoxPrivate; - -struct _glViewBox { - glViewObject parent_object; - - glViewBoxPrivate *priv; -}; - -struct _glViewBoxClass { - glViewObjectClass parent_class; -}; - - -GType gl_view_box_get_type (void) G_GNUC_CONST; - -glViewObject *gl_view_box_new (glLabelBox *object, - glView *view); - - -/* cursor for creating box objects */ -GdkCursor *gl_view_box_get_create_cursor (void); - -/* Object creation handlers. */ -void gl_view_box_create_button_press_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_box_create_motion_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_box_create_button_release_event (glView *view, - gdouble x, - gdouble y); - - -G_END_DECLS - -#endif /* __VIEW_BOX_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-ellipse.c b/glabels2/src/view-ellipse.c deleted file mode 100644 index a5069b23..00000000 --- a/glabels2/src/view-ellipse.c +++ /dev/null @@ -1,506 +0,0 @@ -/* - * view-ellipse.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "view-ellipse.h" - -#include -#include -#include - -#include "cairo-ellipse-path.h" -#include "color.h" -#include "object-editor.h" -#include "stock.h" - -#include "pixmaps/cursor_ellipse.xbm" -#include "pixmaps/cursor_ellipse_mask.xbm" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glViewEllipsePrivate { -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_view_ellipse_finalize (GObject *object); - -static GtkWidget *construct_properties_editor (glViewObject *view_object); - -static void update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object); - -static void update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor); - -static void update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor); - -static gboolean object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glViewEllipse, gl_view_ellipse, GL_TYPE_VIEW_OBJECT); - - -static void -gl_view_ellipse_class_init (glViewEllipseClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); - - gl_debug (DEBUG_VIEW, "START"); - - gl_view_ellipse_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_view_ellipse_finalize; - - view_object_class->construct_editor = construct_properties_editor; - view_object_class->object_at = object_at; - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_ellipse_init (glViewEllipse *view_ellipse) -{ - gl_debug (DEBUG_VIEW, "START"); - - view_ellipse->priv = g_new0 (glViewEllipsePrivate, 1); - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_ellipse_finalize (GObject *object) -{ - glViewEllipse *view_ellipse = GL_VIEW_ELLIPSE (object); - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (object && GL_IS_VIEW_ELLIPSE (object)); - - g_free (view_ellipse->priv); - - G_OBJECT_CLASS (gl_view_ellipse_parent_class)->finalize (object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* NEW ellipse object view. */ -/*****************************************************************************/ -glViewObject * -gl_view_ellipse_new (glLabelEllipse *object, - glView *view) -{ - glViewEllipse *view_ellipse; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_ELLIPSE (object), NULL); - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - view_ellipse = g_object_new (gl_view_ellipse_get_type(), NULL); - - gl_view_object_set_object (GL_VIEW_OBJECT(view_ellipse), - GL_LABEL_OBJECT(object), - GL_VIEW_OBJECT_HANDLES_BOX); - gl_view_object_set_view (GL_VIEW_OBJECT(view_ellipse), view); - - gl_debug (DEBUG_VIEW, "END"); - - return GL_VIEW_OBJECT (view_ellipse); -} - - -/*****************************************************************************/ -/* Create a properties dialog for a ellipse object. */ -/*****************************************************************************/ -static GtkWidget * -construct_properties_editor (glViewObject *view_object) -{ - GtkWidget *editor; - glViewEllipse *view_ellipse = (glViewEllipse *)view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - object = gl_view_object_get_object (GL_VIEW_OBJECT(view_ellipse)); - - /* Build editor. */ - editor = gl_object_editor_new (GL_STOCK_ELLIPSE, _("Ellipse object properties"), - object->parent, - GL_OBJECT_EDITOR_SHADOW_PAGE, - GL_OBJECT_EDITOR_POSITION_PAGE, - GL_OBJECT_EDITOR_SIZE_PAGE, - GL_OBJECT_EDITOR_FILL_PAGE, - GL_OBJECT_EDITOR_LINE_PAGE, - 0); - - /* Update */ - update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); - update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - - /* Connect signals. */ - g_signal_connect (G_OBJECT (editor), "changed", - G_CALLBACK(update_object_from_editor_cb), object); - g_signal_connect (G_OBJECT (object), "changed", - G_CALLBACK (update_editor_from_object_cb), editor); - g_signal_connect (G_OBJECT (object), "moved", - G_CALLBACK (update_editor_from_move_cb), editor); - - gl_debug (DEBUG_VIEW, "END"); - - return editor; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. editor "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object) -{ - gdouble x, y, w, h; - glColorNode *line_color_node; - gdouble line_width; - glColorNode *fill_color_node; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - - - gl_debug (DEBUG_VIEW, "START"); - - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_object_editor_get_position (editor, &x, &y); - gl_label_object_set_position (object, x, y); - - gl_object_editor_get_size (editor, &w, &h); - gl_label_object_set_size (object, w, h); - - fill_color_node = gl_object_editor_get_fill_color (editor); - gl_label_object_set_fill_color (object, fill_color_node); - gl_color_node_free (&fill_color_node); - - line_color_node = gl_object_editor_get_line_color (editor); - gl_label_object_set_line_color (object, line_color_node); - gl_color_node_free (&line_color_node); - - line_width = gl_object_editor_get_line_width (editor); - gl_label_object_set_line_width (object, line_width); - - shadow_state = gl_object_editor_get_shadow_state (editor); - gl_label_object_set_shadow_state (object, shadow_state); - - gl_object_editor_get_shadow_offset (editor, &shadow_x, &shadow_y); - gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); - - shadow_color_node = gl_object_editor_get_shadow_color (editor); - gl_label_object_set_shadow_color (object, shadow_color_node); - gl_color_node_free (&shadow_color_node); - - shadow_opacity = gl_object_editor_get_shadow_opacity (editor); - gl_label_object_set_shadow_opacity (object, shadow_opacity); - - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor) -{ - gdouble w, h; - glColorNode *line_color_node; - gdouble line_width; - glColorNode *fill_color_node; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - glMerge *merge; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_size (object, &w, &h); - gl_object_editor_set_size (editor, w, h); - merge = gl_label_get_merge (GL_LABEL(object->parent)); - - fill_color_node = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object)); - gl_object_editor_set_fill_color (editor, (merge != NULL), fill_color_node); - gl_color_node_free (&fill_color_node); - - line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); - gl_object_editor_set_line_color (editor, (merge != NULL), line_color_node); - gl_color_node_free (&line_color_node); - - line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); - gl_object_editor_set_line_width (editor, line_width); - - shadow_state = gl_label_object_get_shadow_state (object); - gl_object_editor_set_shadow_state (editor, shadow_state); - - gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); - gl_object_editor_set_shadow_offset (editor, shadow_x, shadow_y); - - shadow_color_node = gl_label_object_get_shadow_color (object); - gl_object_editor_set_shadow_color (editor, (merge != NULL), shadow_color_node); - gl_color_node_free (&shadow_color_node); - - shadow_opacity = gl_label_object_get_shadow_opacity (object); - gl_object_editor_set_shadow_opacity (editor, shadow_opacity); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "moved" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor) -{ - gdouble x, y; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_position (object, &x, &y); - gl_object_editor_set_position (editor, x, y); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Is object at (x,y)? */ -/*****************************************************************************/ -static gboolean -object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y) -{ - glLabelObject *object; - gdouble w, h; - gdouble line_width; - - object = gl_view_object_get_object (view_object); - - gl_label_object_get_size (object, &w, &h); - - gl_cairo_ellipse_path (cr, w/2, h/2); - - if (cairo_in_fill (cr, x, y)) - { - return TRUE; - } - - line_width = gl_label_object_get_line_width (object); - cairo_set_line_width (cr, line_width); - if (cairo_in_stroke (cr, x, y)) - { - return TRUE; - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/*****************************************************************************/ -GdkCursor * -gl_view_ellipse_get_create_cursor (void) -{ - GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - gl_debug (DEBUG_VIEW, "START"); - - pixmap_data = gdk_bitmap_create_from_data (NULL, - (gchar *)cursor_ellipse_bits, - cursor_ellipse_width, - cursor_ellipse_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - (gchar *)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); - - gl_debug (DEBUG_VIEW, "END"); - - return cursor; -} - - -/*****************************************************************************/ -/* Object creation handler: button press event. */ -/*****************************************************************************/ -void -gl_view_ellipse_create_button_press_event (glView *view, - gdouble x, - gdouble y) -{ - GObject *object; - glColorNode *fill_color_node; - glColorNode *line_color_node; - - gl_view_unselect_all (view); - - fill_color_node = gl_color_node_new_default (); - line_color_node = gl_color_node_new_default (); - - object = gl_label_ellipse_new (view->label); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - gl_label_object_set_size (GL_LABEL_OBJECT(object), 0.0, 0.0); - line_color_node->color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5); - fill_color_node->color = gl_color_set_opacity (gl_view_get_default_fill_color(view), 0.5); - gl_label_object_set_line_width (GL_LABEL_OBJECT(object), - gl_view_get_default_line_width(view)); - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), - line_color_node); - gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), - fill_color_node); - - gl_color_node_free (&fill_color_node); - gl_color_node_free (&line_color_node); - - view->create_object = GL_LABEL_OBJECT (object); - view->create_x0 = x; - view->create_y0 = y; -} - - -/*****************************************************************************/ -/* Object creation handler: motion event. */ -/*****************************************************************************/ -void -gl_view_ellipse_create_motion_event (glView *view, - gdouble x, - gdouble y) -{ - gdouble w, h; - - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), - MIN (x, view->create_x0), MIN (y, view->create_y0)); - w = MAX (x, view->create_x0) - MIN (x, view->create_x0); - h = MAX (y, view->create_y0) - MIN (y, view->create_y0); - gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); -} - - -/*****************************************************************************/ -/* Object creation handler: button relesase event. */ -/*****************************************************************************/ -void -gl_view_ellipse_create_button_release_event (glView *view, - gdouble x, - gdouble y) -{ - glColorNode *fill_color_node; - glColorNode *line_color_node; - gdouble w, h; - - fill_color_node = gl_color_node_new_default (); - line_color_node = gl_color_node_new_default (); - - if ((view->create_x0 == x) && (view->create_y0 == y)) { - x = view->create_x0 + 36.0; - y = view->create_y0 + 36.0; - } - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), - MIN (x, view->create_x0), MIN (y, view->create_y0)); - w = MAX (x, view->create_x0) - MIN (x, view->create_x0); - h = MAX (y, view->create_y0) - MIN (y, view->create_y0); - gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); - line_color_node->color = gl_view_get_default_line_color(view); - gl_label_object_set_line_color (GL_LABEL_OBJECT(view->create_object), line_color_node); - fill_color_node->color = gl_view_get_default_fill_color(view); - gl_label_object_set_fill_color (GL_LABEL_OBJECT(view->create_object), fill_color_node); - gl_color_node_free (&fill_color_node); - gl_color_node_free (&line_color_node); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-ellipse.h b/glabels2/src/view-ellipse.h deleted file mode 100644 index a73c8990..00000000 --- a/glabels2/src/view-ellipse.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * view-ellipse.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __VIEW_ELLIPSE_H__ -#define __VIEW_ELLIPSE_H__ - -#include "view-object.h" -#include "label-ellipse.h" - -G_BEGIN_DECLS - - -#define GL_TYPE_VIEW_ELLIPSE (gl_view_ellipse_get_type ()) -#define GL_VIEW_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_ELLIPSE, glViewEllipse)) -#define GL_VIEW_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_ELLIPSE, glViewEllipseClass)) -#define GL_IS_VIEW_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_ELLIPSE)) -#define GL_IS_VIEW_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_ELLIPSE)) - -typedef struct _glViewEllipse glViewEllipse; -typedef struct _glViewEllipseClass glViewEllipseClass; - -typedef struct _glViewEllipsePrivate glViewEllipsePrivate; - -struct _glViewEllipse { - glViewObject parent_object; - - glViewEllipsePrivate *priv; -}; - -struct _glViewEllipseClass { - glViewObjectClass parent_class; -}; - - -GType gl_view_ellipse_get_type (void) G_GNUC_CONST; - -glViewObject *gl_view_ellipse_new (glLabelEllipse *object, - glView *view); - - -/* cursor for creating ellipse objects */ -GdkCursor *gl_view_ellipse_get_create_cursor (void); - -/* Object creation handlers. */ -void gl_view_ellipse_create_button_press_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_ellipse_create_motion_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_ellipse_create_button_release_event (glView *view, - gdouble x, - gdouble y); - - -G_END_DECLS - -#endif /* __VIEW_ELLIPSE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-image.c b/glabels2/src/view-image.c deleted file mode 100644 index 5b76460c..00000000 --- a/glabels2/src/view-image.c +++ /dev/null @@ -1,439 +0,0 @@ -/* - * view-image.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "view-image.h" - -#include -#include - -#include "color.h" -#include "object-editor.h" -#include "stock.h" - -#include "pixmaps/cursor_image.xbm" -#include "pixmaps/cursor_image_mask.xbm" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glViewImagePrivate { -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_view_image_finalize (GObject *object); - -static GtkWidget *construct_properties_editor (glViewObject *view_object); - -static void update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object); - -static void update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor); - -static void update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor); - -static gboolean object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glViewImage, gl_view_image, GL_TYPE_VIEW_OBJECT); - - -static void -gl_view_image_class_init (glViewImageClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); - - gl_debug (DEBUG_VIEW, "START"); - - gl_view_image_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_view_image_finalize; - - view_object_class->construct_editor = construct_properties_editor; - view_object_class->object_at = object_at; - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_image_init (glViewImage *view_image) -{ - gl_debug (DEBUG_VIEW, "START"); - - view_image->priv = g_new0 (glViewImagePrivate, 1); - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_image_finalize (GObject *object) -{ - glViewImage *view_image = GL_VIEW_IMAGE (object); - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (object && GL_IS_VIEW_IMAGE (object)); - - g_free (view_image->priv); - - G_OBJECT_CLASS (gl_view_image_parent_class)->finalize (object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* NEW image object view. */ -/*****************************************************************************/ -glViewObject * -gl_view_image_new (glLabelImage *object, - glView *view) -{ - glViewImage *view_image; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_IMAGE (object), NULL); - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - view_image = g_object_new (gl_view_image_get_type(), NULL); - - gl_view_object_set_object (GL_VIEW_OBJECT(view_image), - GL_LABEL_OBJECT(object), - GL_VIEW_OBJECT_HANDLES_BOX); - gl_view_object_set_view (GL_VIEW_OBJECT(view_image), view); - - gl_debug (DEBUG_VIEW, "END"); - - return GL_VIEW_OBJECT (view_image); -} - - -/*****************************************************************************/ -/* Create a properties dialog for a image object. */ -/*****************************************************************************/ -static GtkWidget * -construct_properties_editor (glViewObject *view_object) -{ - GtkWidget *editor; - glViewImage *view_image = (glViewImage *)view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - object = gl_view_object_get_object (GL_VIEW_OBJECT(view_image)); - - /* Build editor. */ - editor = gl_object_editor_new (GL_STOCK_IMAGE, _("Image object properties"), - object->parent, - GL_OBJECT_EDITOR_POSITION_PAGE, - GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE, - GL_OBJECT_EDITOR_IMAGE_PAGE, - 0); - - /* Update */ - update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); - update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - - /* Connect signals. */ - g_signal_connect (G_OBJECT (editor), "changed", - G_CALLBACK(update_object_from_editor_cb), object); - g_signal_connect (G_OBJECT (object), "changed", - G_CALLBACK (update_editor_from_object_cb), editor); - g_signal_connect (G_OBJECT (object), "moved", - G_CALLBACK (update_editor_from_move_cb), editor); - - gl_debug (DEBUG_VIEW, "END"); - - return editor; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. editor "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object) -{ - gdouble x, y, w, h; - glTextNode *filename; - const GdkPixbuf *pixbuf; - gdouble image_w, image_h; - gdouble new_w, new_h; - - gl_debug (DEBUG_VIEW, "START"); - - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - - gl_object_editor_get_position (editor, &x, &y); - gl_label_object_set_position (object, x, y); - - gl_object_editor_get_size (editor, &w, &h); - gl_label_object_set_size (object, w, h); - - filename = gl_object_editor_get_image (editor); - gl_label_image_set_filename (GL_LABEL_IMAGE(object), filename); - gl_text_node_free (&filename); - - /* Setting filename may have modified the size. */ - gl_label_object_get_size (object, &new_w, &new_h); - if ( (new_w != w) || (new_h != h) ) - { - gl_object_editor_set_size (editor, new_w, new_h); - } - - /* It may also have a new base size. */ - pixbuf = gl_label_image_get_pixbuf (GL_LABEL_IMAGE(object), NULL); - image_w = gdk_pixbuf_get_width (pixbuf); - image_h = gdk_pixbuf_get_height (pixbuf); - gl_object_editor_set_base_size (editor, image_w, image_h); - - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor) -{ - gdouble w, h; - const GdkPixbuf *pixbuf; - gdouble image_w, image_h; - glTextNode *filename; - glMerge *merge; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_size (object, &w, &h); - gl_object_editor_set_size (editor, w, h); - - pixbuf = gl_label_image_get_pixbuf (GL_LABEL_IMAGE(object), NULL); - image_w = gdk_pixbuf_get_width (pixbuf); - image_h = gdk_pixbuf_get_height (pixbuf); - gl_object_editor_set_base_size (editor, image_w, image_h); - - filename = gl_label_image_get_filename (GL_LABEL_IMAGE(object)); - merge = gl_label_get_merge (GL_LABEL(object->parent)); - if ( filename != NULL ) { - gl_object_editor_set_image (editor, (merge != NULL), filename); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "moved" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor) -{ - gdouble x, y; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_position (object, &x, &y); - gl_object_editor_set_position (editor, x, y); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Is object at (x,y)? */ -/*****************************************************************************/ -static gboolean -object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y) -{ - glLabelObject *object; - gdouble w, h; - - object = gl_view_object_get_object (view_object); - - gl_label_object_get_size (object, &w, &h); - - cairo_rectangle (cr, 0.0, 0.0, w, h); - - if (cairo_in_fill (cr, x, y)) - { - return TRUE; - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/*****************************************************************************/ -GdkCursor * -gl_view_image_get_create_cursor (void) -{ - GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - gl_debug (DEBUG_VIEW, "START"); - - pixmap_data = gdk_bitmap_create_from_data (NULL, - (gchar *)cursor_image_bits, - cursor_image_width, - cursor_image_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - (gchar *)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); - - gl_debug (DEBUG_VIEW, "END"); - - return cursor; -} - - -/*****************************************************************************/ -/* Object creation handler: button press event. */ -/*****************************************************************************/ -void -gl_view_image_create_button_press_event (glView *view, - gdouble x, - gdouble y) -{ - GObject *object; - - gl_view_unselect_all (view); - - object = gl_label_image_new (view->label); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - gl_label_object_set_size (GL_LABEL_OBJECT(object), 0.0, 0.0); - - view->create_object = GL_LABEL_OBJECT (object); - view->create_x0 = x; - view->create_y0 = y; -} - - -/*****************************************************************************/ -/* Object creation handler: motion event. */ -/*****************************************************************************/ -void -gl_view_image_create_motion_event (glView *view, - gdouble x, - gdouble y) -{ - gdouble w, h; - - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), - MIN (x, view->create_x0), MIN (y, view->create_y0)); - w = MAX (x, view->create_x0) - MIN (x, view->create_x0); - h = MAX (y, view->create_y0) - MIN (y, view->create_y0); - gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); -} - - -/*****************************************************************************/ -/* Object creation handler: button relesase event. */ -/*****************************************************************************/ -void -gl_view_image_create_button_release_event (glView *view, - gdouble x, - gdouble y) -{ - gdouble w, h; - - if ((view->create_x0 == x) && (view->create_y0 == y)) { - x = view->create_x0 + 36.0; - y = view->create_y0 + 36.0; - } - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), - MIN (x, view->create_x0), MIN (y, view->create_y0)); - w = MAX (x, view->create_x0) - MIN (x, view->create_x0); - h = MAX (y, view->create_y0) - MIN (y, view->create_y0); - gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-image.h b/glabels2/src/view-image.h deleted file mode 100644 index 49b8773c..00000000 --- a/glabels2/src/view-image.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * view-image.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __VIEW_IMAGE_H__ -#define __VIEW_IMAGE_H__ - -#include "view-object.h" -#include "label-image.h" - -G_BEGIN_DECLS - - -#define GL_TYPE_VIEW_IMAGE (gl_view_image_get_type ()) -#define GL_VIEW_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_IMAGE, glViewImage)) -#define GL_VIEW_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_IMAGE, glViewImageClass)) -#define GL_IS_VIEW_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_IMAGE)) -#define GL_IS_VIEW_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_IMAGE)) - -typedef struct _glViewImage glViewImage; -typedef struct _glViewImageClass glViewImageClass; - -typedef struct _glViewImagePrivate glViewImagePrivate; - -struct _glViewImage { - glViewObject parent_object; - - glViewImagePrivate *priv; -}; - -struct _glViewImageClass { - glViewObjectClass parent_class; -}; - - -GType gl_view_image_get_type (void) G_GNUC_CONST; - -glViewObject *gl_view_image_new (glLabelImage *object, - glView *view); - - -/* cursor for creating image objects */ -GdkCursor *gl_view_image_get_create_cursor (void); - -/* Object creation handlers. */ -void gl_view_image_create_button_press_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_image_create_motion_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_image_create_button_release_event (glView *view, - gdouble x, - gdouble y); - - -G_END_DECLS - -#endif /* __VIEW_IMAGE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-line.c b/glabels2/src/view-line.c deleted file mode 100644 index 3cb62f12..00000000 --- a/glabels2/src/view-line.c +++ /dev/null @@ -1,474 +0,0 @@ -/* - * view-line.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "view-line.h" - -#include -#include - -#include "color.h" -#include "object-editor.h" -#include "stock.h" - -#include "pixmaps/cursor_line.xbm" -#include "pixmaps/cursor_line_mask.xbm" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glViewLinePrivate { -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_view_line_finalize (GObject *object); - -static GtkWidget *construct_properties_editor (glViewObject *view_object); - -static void update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object); - -static void update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor); - -static void update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor); - -static gboolean object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glViewLine, gl_view_line, GL_TYPE_VIEW_OBJECT); - - -static void -gl_view_line_class_init (glViewLineClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); - - gl_debug (DEBUG_VIEW, "START"); - - gl_view_line_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_view_line_finalize; - - view_object_class->construct_editor = construct_properties_editor; - view_object_class->object_at = object_at; - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_line_init (glViewLine *view_line) -{ - gl_debug (DEBUG_VIEW, "START"); - - view_line->priv = g_new0 (glViewLinePrivate, 1); - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_line_finalize (GObject *object) -{ - glViewLine *view_line = GL_VIEW_LINE (object); - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (object && GL_IS_VIEW_LINE (object)); - - g_free (view_line->priv); - - G_OBJECT_CLASS (gl_view_line_parent_class)->finalize (object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* NEW line object view. */ -/*****************************************************************************/ -glViewObject * -gl_view_line_new (glLabelLine *object, - glView *view) -{ - glViewLine *view_line; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_LINE (object), NULL); - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - view_line = g_object_new (gl_view_line_get_type(), NULL); - - gl_view_object_set_object (GL_VIEW_OBJECT(view_line), - GL_LABEL_OBJECT(object), - GL_VIEW_OBJECT_HANDLES_LINE); - gl_view_object_set_view (GL_VIEW_OBJECT(view_line), view); - - gl_debug (DEBUG_VIEW, "END"); - - return GL_VIEW_OBJECT (view_line); -} - - -/*****************************************************************************/ -/* Create a properties dialog for a line object. */ -/*****************************************************************************/ -static GtkWidget * -construct_properties_editor (glViewObject *view_object) -{ - GtkWidget *editor; - glViewLine *view_line = (glViewLine *)view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - object = gl_view_object_get_object (GL_VIEW_OBJECT(view_line)); - - /* Build editor. */ - editor = gl_object_editor_new (GL_STOCK_LINE, _("Line object properties"), - object->parent, - GL_OBJECT_EDITOR_SHADOW_PAGE, - GL_OBJECT_EDITOR_POSITION_PAGE, - GL_OBJECT_EDITOR_SIZE_LINE_PAGE, - GL_OBJECT_EDITOR_LINE_PAGE, - 0); - - /* Update */ - update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); - update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - - /* Connect signals. */ - g_signal_connect (G_OBJECT (editor), "changed", - G_CALLBACK(update_object_from_editor_cb), object); - g_signal_connect (G_OBJECT (object), "changed", - G_CALLBACK (update_editor_from_object_cb), editor); - g_signal_connect (G_OBJECT (object), "moved", - G_CALLBACK (update_editor_from_move_cb), editor); - - gl_debug (DEBUG_VIEW, "END"); - - return editor; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. editor "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object) -{ - gdouble x, y, w, h; - glColorNode *line_color_node; - gdouble line_width; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - - - gl_debug (DEBUG_VIEW, "START"); - - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_object_editor_get_position (editor, &x, &y); - gl_label_object_set_position (object, x, y); - - gl_object_editor_get_lsize (editor, &w, &h); - gl_label_object_set_size (object, w, h); - - line_color_node = gl_object_editor_get_line_color (editor); - gl_label_object_set_line_color (object, line_color_node); - gl_color_node_free (&line_color_node); - - line_width = gl_object_editor_get_line_width (editor); - gl_label_object_set_line_width (object, line_width); - - shadow_state = gl_object_editor_get_shadow_state (editor); - gl_label_object_set_shadow_state (object, shadow_state); - - gl_object_editor_get_shadow_offset (editor, &shadow_x, &shadow_y); - gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); - - shadow_color_node = gl_object_editor_get_shadow_color (editor); - gl_label_object_set_shadow_color (object, shadow_color_node); - gl_color_node_free (&shadow_color_node); - - shadow_opacity = gl_object_editor_get_shadow_opacity (editor); - gl_label_object_set_shadow_opacity (object, shadow_opacity); - - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor) -{ - gdouble w, h; - glColorNode *line_color_node; - gdouble line_width; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - glMerge *merge; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_size (object, &w, &h); - gl_object_editor_set_lsize (editor, w, h); - merge = gl_label_get_merge (GL_LABEL(object->parent)); - - line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); - gl_object_editor_set_line_color (editor, (merge != NULL), line_color_node); - gl_color_node_free (&line_color_node); - - line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); - gl_object_editor_set_line_width (editor, line_width); - - shadow_state = gl_label_object_get_shadow_state (object); - gl_object_editor_set_shadow_state (editor, shadow_state); - - gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); - gl_object_editor_set_shadow_offset (editor, shadow_x, shadow_y); - - shadow_color_node = gl_label_object_get_shadow_color (object); - gl_object_editor_set_shadow_color (editor, (merge != NULL), shadow_color_node); - gl_color_node_free (&shadow_color_node); - - shadow_opacity = gl_label_object_get_shadow_opacity (object); - gl_object_editor_set_shadow_opacity (editor, shadow_opacity); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "moved" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor) -{ - gdouble x, y; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_position (object, &x, &y); - gl_object_editor_set_position (editor, x, y); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Is object at (x,y)? */ -/*****************************************************************************/ -static gboolean -object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y) -{ - glLabelObject *object; - gdouble w, h; - gdouble line_width; - - object = gl_view_object_get_object (view_object); - - gl_label_object_get_size (object, &w, &h); - - cairo_move_to (cr, 0.0, 0.0); - cairo_line_to (cr, w, h); - - line_width = gl_label_object_get_line_width (object); - cairo_set_line_width (cr, line_width); - if (cairo_in_stroke (cr, x, y)) - { - return TRUE; - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/*****************************************************************************/ -GdkCursor * -gl_view_line_get_create_cursor (void) -{ - GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - gl_debug (DEBUG_VIEW, "START"); - - pixmap_data = gdk_bitmap_create_from_data (NULL, - (gchar *)cursor_line_bits, - cursor_line_width, - cursor_line_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - (gchar *)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); - - gl_debug (DEBUG_VIEW, "END"); - - return cursor; -} - - -/*****************************************************************************/ -/* Object creation handler: button press event. */ -/*****************************************************************************/ -void -gl_view_line_create_button_press_event (glView *view, - gdouble x, - gdouble y) -{ - GObject *object; - glColorNode *line_color_node; - - gl_view_unselect_all (view); - - line_color_node = gl_color_node_new_default (); - - object = gl_label_line_new (view->label); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - gl_label_object_set_size (GL_LABEL_OBJECT(object), 0.0, 0.0); - line_color_node->color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5); - gl_label_object_set_line_width (GL_LABEL_OBJECT(object), - gl_view_get_default_line_width(view)); - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), - line_color_node); - - gl_color_node_free (&line_color_node); - - view->create_object = GL_LABEL_OBJECT (object); - view->create_x0 = x; - view->create_y0 = y; -} - - -/*****************************************************************************/ -/* Object creation handler: motion event. */ -/*****************************************************************************/ -void -gl_view_line_create_motion_event (glView *view, - gdouble x, - gdouble y) -{ - gdouble w, h; - - w = x - view->create_x0; - h = y - view->create_y0; - gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); -} - - -/*****************************************************************************/ -/* Object creation handler: button relesase event. */ -/*****************************************************************************/ -void -gl_view_line_create_button_release_event (glView *view, - gdouble x, - gdouble y) -{ - glColorNode *line_color_node; - gdouble w, h; - - line_color_node = gl_color_node_new_default (); - - if ((view->create_x0 == x) && (view->create_y0 == y)) { - x = view->create_x0 + 36.0; - y = view->create_y0 + 36.0; - } - w = x - view->create_x0; - h = y - view->create_y0; - gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); - line_color_node->color = gl_view_get_default_line_color(view); - gl_label_object_set_line_color (GL_LABEL_OBJECT(view->create_object), line_color_node); - gl_color_node_free (&line_color_node); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-line.h b/glabels2/src/view-line.h deleted file mode 100644 index 9fc54ab2..00000000 --- a/glabels2/src/view-line.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * view-line.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __VIEW_LINE_H__ -#define __VIEW_LINE_H__ - -#include "view-object.h" -#include "label-line.h" - -G_BEGIN_DECLS - - -#define GL_TYPE_VIEW_LINE (gl_view_line_get_type ()) -#define GL_VIEW_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_LINE, glViewLine)) -#define GL_VIEW_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_LINE, glViewLineClass)) -#define GL_IS_VIEW_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_LINE)) -#define GL_IS_VIEW_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_LINE)) - -typedef struct _glViewLine glViewLine; -typedef struct _glViewLineClass glViewLineClass; - -typedef struct _glViewLinePrivate glViewLinePrivate; - -struct _glViewLine { - glViewObject parent_object; - - glViewLinePrivate *priv; -}; - -struct _glViewLineClass { - glViewObjectClass parent_class; -}; - - -GType gl_view_line_get_type (void) G_GNUC_CONST; - -glViewObject *gl_view_line_new (glLabelLine *object, - glView *view); - - -/* cursor for creating line objects */ -GdkCursor *gl_view_line_get_create_cursor (void); - -/* Object creation handlers. */ -void gl_view_line_create_button_press_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_line_create_motion_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_line_create_button_release_event (glView *view, - gdouble x, - gdouble y); - - -G_END_DECLS - -#endif /* __VIEW_LINE_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-object.c b/glabels2/src/view-object.c deleted file mode 100644 index e50de60f..00000000 --- a/glabels2/src/view-object.c +++ /dev/null @@ -1,786 +0,0 @@ -/* - * view-object.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include "view-object.h" - -#include - -#include "debug.h" - - -/*========================================================*/ -/* Private constants and macros. */ -/*========================================================*/ - -#define HANDLE_FILL_RGBA_ARGS 0.0, 0.75, 0.0, 0.4 -#define HANDLE_OUTLINE_RGBA_ARGS 0.0, 0.0, 0.0, 0.8 - -#define HANDLE_OUTLINE_WIDTH_PIXELS 1.0 -#define HANDLE_PIXELS 7 - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glViewObjectPrivate { - - glLabelObject *object; - - glView *view; - glViewObjectHandlesStyle handles_style; - - GtkWidget *property_editor; -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_view_object_finalize (GObject *object); - -static void object_removed_cb (glViewObject *view_object, - glLabelObject *object); - -static void object_top_cb (glViewObject *view_object, - glLabelObject *object); - -static void object_bottom_cb (glViewObject *view_object, - glLabelObject *object); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glViewObject, gl_view_object, G_TYPE_OBJECT); - - -static void -gl_view_object_class_init (glViewObjectClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_VIEW, "START"); - - gl_view_object_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_view_object_finalize; - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_object_init (glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - view_object->priv = g_new0 (glViewObjectPrivate, 1); - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_object_finalize (GObject *object) -{ - glViewObject *view_object = GL_VIEW_OBJECT (object); - glView *view; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (object && GL_IS_VIEW_OBJECT (object)); - - view = view_object->priv->view; - view->object_list = g_list_remove (view->object_list, object); - view->selected_object_list = - g_list_remove (view->selected_object_list, object); - - g_object_unref (view_object->priv->object); - if (view_object->priv->property_editor) { - gl_debug (DEBUG_VIEW, "Destroy editor"); - g_object_unref (G_OBJECT(view_object->priv->property_editor)); - } - g_free (view_object->priv); - - G_OBJECT_CLASS (gl_view_object_parent_class)->finalize (object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* NEW object view. */ -/*****************************************************************************/ -GObject * -gl_view_object_new (void) -{ - glViewObject *view_object; - - gl_debug (DEBUG_VIEW, "START"); - - view_object = g_object_new (gl_view_object_get_type(), NULL); - - gl_debug (DEBUG_VIEW, "END"); - - return G_OBJECT (view_object); -} - - -/*****************************************************************************/ -/* Set parent view to which this object view belongs. */ -/*****************************************************************************/ -void -gl_view_object_set_view (glViewObject *view_object, - glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); - g_return_if_fail (view && GL_IS_VIEW (view)); - - view_object->priv->view = view; - - view->object_list = g_list_append (view->object_list, view_object); - - g_signal_connect_swapped (G_OBJECT (view_object->priv->object), "changed", - G_CALLBACK (gl_view_update), view); - g_signal_connect_swapped (G_OBJECT (view_object->priv->object), "moved", - G_CALLBACK (gl_view_update), view); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Set Label object to follow. */ -/*****************************************************************************/ -void -gl_view_object_set_object (glViewObject *view_object, - glLabelObject *object, - glViewObjectHandlesStyle style) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - view_object->priv->object = g_object_ref (G_OBJECT (object)); - view_object->priv->handles_style = style; - - g_signal_connect_swapped (G_OBJECT (object), "removed", - G_CALLBACK (object_removed_cb), view_object); - g_signal_connect_swapped (G_OBJECT (object), "top", - G_CALLBACK (object_top_cb), view_object); - g_signal_connect_swapped (G_OBJECT (object), "bottom", - G_CALLBACK (object_bottom_cb), view_object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle object "removed" signal. */ -/*---------------------------------------------------------------------------*/ -static void -object_removed_cb (glViewObject *view_object, - glLabelObject *object) -{ - glView *view; - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - view = gl_view_object_get_view (view_object); - view->object_list = g_list_remove (view->object_list, view_object); - g_object_unref (G_OBJECT (view_object)); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle object "top" signal. */ -/*---------------------------------------------------------------------------*/ -static void -object_top_cb (glViewObject *view_object, - glLabelObject *object) -{ - glView *view; - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - view = gl_view_object_get_view (view_object); - - /* Move to end of list, representing front most object */ - view->object_list = g_list_remove (view->object_list, view_object); - view->object_list = g_list_append (view->object_list, view_object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle object "removed" signal. */ -/*---------------------------------------------------------------------------*/ -static void -object_bottom_cb (glViewObject *view_object, - glLabelObject *object) -{ - glView *view; - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - view = gl_view_object_get_view (view_object); - - /* Move to front of list, representing rear most object */ - view->object_list = g_list_remove (view->object_list, view_object); - view->object_list = g_list_prepend (view->object_list, view_object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Return parent view associated with this view. */ -/*****************************************************************************/ -glView * -gl_view_object_get_view (glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), NULL); - - gl_debug (DEBUG_VIEW, "END"); - - return view_object->priv->view; -} - - -/*****************************************************************************/ -/* Return label object that we are following. */ -/*****************************************************************************/ -glLabelObject * -gl_view_object_get_object (glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), NULL); - - gl_debug (DEBUG_VIEW, "END"); - - return view_object->priv->object; -} - - -/*****************************************************************************/ -/* Get property editor. */ -/*****************************************************************************/ -GtkWidget * -gl_view_object_get_editor (glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), NULL); - - if ( GL_VIEW_OBJECT_GET_CLASS(view_object)->construct_editor != NULL ) { - - if (view_object->priv->property_editor == NULL) { - view_object->priv->property_editor = - GL_VIEW_OBJECT_GET_CLASS(view_object)->construct_editor (view_object); - } - g_signal_connect (G_OBJECT (view_object->priv->property_editor), - "destroy", - G_CALLBACK (gtk_widget_destroyed), - &view_object->priv->property_editor); - - gtk_widget_show (view_object->priv->property_editor); - - } - - - gl_debug (DEBUG_VIEW, "END"); - - return view_object->priv->property_editor; -} - - -/*****************************************************************************/ -/* Select object. */ -/*****************************************************************************/ -void -gl_view_object_select (glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - gl_view_select_object(view_object->priv->view, view_object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Is object at (x,y)? */ -/*****************************************************************************/ -gboolean -gl_view_object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y) -{ - glLabelObject *object = view_object->priv->object; - gdouble x0, y0; - cairo_matrix_t matrix; - gboolean return_val = FALSE; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), FALSE); - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); - - gl_label_object_get_position (object, &x0, &y0); - gl_label_object_get_matrix (object, &matrix); - - cairo_save (cr); - cairo_translate (cr, x0, y0); - cairo_transform (cr, &matrix); - - cairo_device_to_user (cr, &x, &y); - - if ( GL_VIEW_OBJECT_GET_CLASS(view_object)->object_at != NULL ) { - - return_val = GL_VIEW_OBJECT_GET_CLASS(view_object)->object_at (view_object, cr, x, y); - - } - - cairo_restore (cr); - - return return_val; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* Create handle path */ -/*--------------------------------------------------------------------------*/ -static void -create_handle_path (cairo_t *cr, - glLabelObject *object, - gdouble scale, - gdouble x_handle, - gdouble y_handle) -{ - gl_debug (DEBUG_VIEW, "START"); - - cairo_rectangle (cr, - x_handle - HANDLE_PIXELS/scale/2, y_handle - HANDLE_PIXELS/scale/2, - HANDLE_PIXELS/scale, HANDLE_PIXELS/scale); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Draw object handles */ -/*****************************************************************************/ -void -gl_view_object_draw_handles (glViewObject *view_object, - cairo_t *cr) -{ - glLabelObject *object = view_object->priv->object; - gdouble x0, y0; - cairo_matrix_t matrix; - gdouble scale; - gdouble w, h; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - scale = view_object->priv->view->home_scale * view_object->priv->view->zoom; - - gl_label_object_get_position (object, &x0, &y0); - gl_label_object_get_matrix (object, &matrix); - - gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); - - cairo_save (cr); - - cairo_translate (cr, x0, y0); - cairo_transform (cr, &matrix); - - switch (view_object->priv->handles_style) - { - case GL_VIEW_OBJECT_HANDLES_BOX: - - /* North */ - cairo_new_path (cr); - create_handle_path (cr, object, scale, w/2, 0); - - /* North East */ - cairo_new_sub_path (cr); - create_handle_path (cr, object, scale, w, 0); - - /* East */ - cairo_new_sub_path (cr); - create_handle_path (cr, object, scale, w, h/2); - - /* South East */ - cairo_new_sub_path (cr); - create_handle_path (cr, object, scale, w, h); - - /* South */ - cairo_new_sub_path (cr); - create_handle_path (cr, object, scale, w/2, h); - - /* South West */ - cairo_new_sub_path (cr); - create_handle_path (cr, object, scale, 0, h); - - /* West */ - cairo_new_sub_path (cr); - create_handle_path (cr, object, scale, 0, h/2); - - /* North West */ - cairo_new_sub_path (cr); - create_handle_path (cr, object, scale, 0, 0); - - break; - - case GL_VIEW_OBJECT_HANDLES_LINE: - /* P1 */ - cairo_new_path (cr); - create_handle_path (cr, object, scale, 0, 0); - - /* P2 */ - cairo_new_sub_path (cr); - create_handle_path (cr, object, scale, w, h); - - break; - } - - cairo_set_source_rgba (cr, HANDLE_FILL_RGBA_ARGS); - cairo_fill_preserve (cr); - - cairo_set_line_width (cr, HANDLE_OUTLINE_WIDTH_PIXELS/scale); - cairo_set_source_rgba (cr, HANDLE_OUTLINE_RGBA_ARGS); - cairo_stroke (cr); - - cairo_restore (cr); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Is there an object handle at (x,y). */ -/*****************************************************************************/ -glViewObjectHandle -gl_view_object_handle_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y) -{ - glLabelObject *object = view_object->priv->object; - gdouble x0, y0; - cairo_matrix_t matrix; - gdouble scale; - gdouble w, h; - glViewObjectHandle handle = GL_VIEW_OBJECT_HANDLE_NONE; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), handle); - g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), handle); - - scale = view_object->priv->view->home_scale * view_object->priv->view->zoom; - - gl_label_object_get_position (object, &x0, &y0); - gl_label_object_get_matrix (object, &matrix); - - gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); - - cairo_save (cr); - - cairo_translate (cr, x0, y0); - cairo_transform (cr, &matrix); - - cairo_device_to_user (cr, &x, &y); - - switch (view_object->priv->handles_style) - { - case GL_VIEW_OBJECT_HANDLES_BOX: - - /* South East */ - create_handle_path (cr, object, scale, w, h); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_SE; break;} - - /* South West */ - create_handle_path (cr, object, scale, 0, h); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_SW; break;} - - /* North East */ - create_handle_path (cr, object, scale, w, 0); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_NE; break;} - - /* North West */ - create_handle_path (cr, object, scale, 0, 0); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_NW; break;} - - /* East */ - create_handle_path (cr, object, scale, w, h/2); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_E; break;} - - /* South */ - create_handle_path (cr, object, scale, w/2, h); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_S; break;} - - /* West */ - create_handle_path (cr, object, scale, 0, h/2); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_W; break;} - - /* North */ - create_handle_path (cr, object, scale, w/2, 0); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_N; break;} - - break; - - case GL_VIEW_OBJECT_HANDLES_LINE: - /* P2 */ - create_handle_path (cr, object, scale, w, h); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_P2; break;} - - /* P1 */ - create_handle_path (cr, object, scale, 0, 0); - if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_P1; break;} - - break; - - } - - cairo_restore (cr); - - return handle; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Resize object. */ -/*---------------------------------------------------------------------------*/ -void -gl_view_object_resize_event (glViewObject *view_object, - glViewObjectHandle handle, - gboolean honor_aspect, - cairo_t *cr, - gdouble x, - gdouble y) -{ - glLabelObject *object; - cairo_matrix_t matrix; - gdouble x0, y0, x1, y1, x2, y2; - gdouble w, h; - gdouble dx=0, dy=0; - - gl_debug (DEBUG_VIEW, "x,y world = %g, %g", x, y); - - object = view_object->priv->object; - - /* - * Change to item relative coordinates - */ - cairo_save (cr); - gl_label_object_get_position (object, &x0, &y0); - cairo_translate (cr, x0, y0); - gl_label_object_get_matrix (object, &matrix); - cairo_transform (cr, &matrix); - - /* - * Initialize origin and 2 corners in object relative coordinates. - */ - x0 = 0.0; - y0 = 0.0; - - x1 = 0.0; - y1 = 0.0; - - gl_label_object_get_size (object, &x2, &y2); - - gl_debug (DEBUG_VIEW, "x0,y0 object = %g, %g", x0, y0); - gl_debug (DEBUG_VIEW, "x1,y1 object = %g, %g", x1, y1); - gl_debug (DEBUG_VIEW, "x2,y2 object = %g, %g", x2, y2); - - /* - * Translate x,y into object relative coordinates. - */ - cairo_device_to_user (cr, &x, &y); - - gl_debug (DEBUG_VIEW, "x,y object = %g, %g", x, y); - - /* - * Get new size - */ - switch (handle) - { - - case GL_VIEW_OBJECT_HANDLE_NW: - w = MAX (x2 - x, 0); - h = MAX (y2 - y, 0); - break; - - case GL_VIEW_OBJECT_HANDLE_N: - w = x2 - x1; - h = MAX (y2 - y, 0); - break; - - case GL_VIEW_OBJECT_HANDLE_NE: - w = MAX (x - x1, 0); - h = MAX (y2 - y, 0); - break; - - case GL_VIEW_OBJECT_HANDLE_E: - w = MAX (x - x1, 0); - h = y2 - y1; - break; - - case GL_VIEW_OBJECT_HANDLE_SE: - w = MAX (x - x1, 0); - h = MAX (y - y1, 0); - break; - - case GL_VIEW_OBJECT_HANDLE_S: - w = x2 - x1; - h = MAX (y - y1, 0); - break; - - case GL_VIEW_OBJECT_HANDLE_SW: - w = MAX (x2 - x, 0); - h = MAX (y - y1, 0); - break; - - case GL_VIEW_OBJECT_HANDLE_W: - w = MAX (x2 - x, 0); - h = y2 - y1; - break; - case GL_VIEW_OBJECT_HANDLE_P1: - x1 = x; - y1 = y; - dx = (x2 - x); - dy = (y2 - y); - x0 = x0 + x1; - y0 = y0 + y1; - break; - - case GL_VIEW_OBJECT_HANDLE_P2: - dx = x - x1; - dy = y - y1; - x0 = x0 + x1; - y0 = y0 + y1; - break; - - default: - g_print ("Invalid handle.\n"); /* Should not happen! */ - - } - if ( (handle != GL_VIEW_OBJECT_HANDLE_P1) && (handle != GL_VIEW_OBJECT_HANDLE_P2) ) - { - if ( honor_aspect ) - { - gl_label_object_set_size_honor_aspect (object, w, h); - } - else - { - gl_label_object_set_size (object, w, h); - } - - /* - * Query the new size in case it was constrained. - */ - gl_label_object_get_size (object, &w, &h); - - /* - * Get new position - */ - switch (handle) - { - - case GL_VIEW_OBJECT_HANDLE_NW: - x0 += x2 - w; - y0 += y2 - h; - break; - - case GL_VIEW_OBJECT_HANDLE_N: - case GL_VIEW_OBJECT_HANDLE_NE: - /* x unchanged */ - y0 += y2 - h; - break; - - case GL_VIEW_OBJECT_HANDLE_E: - case GL_VIEW_OBJECT_HANDLE_SE: - case GL_VIEW_OBJECT_HANDLE_S: - /* unchanged */ - break; - - case GL_VIEW_OBJECT_HANDLE_SW: - case GL_VIEW_OBJECT_HANDLE_W: - x0 += x2 - w; - /* y unchanged */ - break; - - default: - g_print ("Invalid handle.\n"); /* Should not happen! */ - } - } - else - { - gl_label_object_set_size (object, dx, dy); - } - - /* - * Put new origin back into world coordinates and set. - */ - cairo_user_to_device (cr, &x0, &y0); - cairo_restore (cr); - cairo_device_to_user (cr, &x0, &y0); - gl_label_object_set_position (object, x0, y0); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-object.h b/glabels2/src/view-object.h deleted file mode 100644 index cb2a894b..00000000 --- a/glabels2/src/view-object.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * view-object.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __VIEW_OBJECT_H__ -#define __VIEW_OBJECT_H__ - -#include -#include "label-object.h" - -typedef enum { - GL_VIEW_OBJECT_HANDLES_BOX, - GL_VIEW_OBJECT_HANDLES_LINE, -} glViewObjectHandlesStyle; - -typedef enum { - GL_VIEW_OBJECT_HANDLE_NONE = 0, - GL_VIEW_OBJECT_HANDLE_N, - GL_VIEW_OBJECT_HANDLE_E, - GL_VIEW_OBJECT_HANDLE_W, - GL_VIEW_OBJECT_HANDLE_S, - GL_VIEW_OBJECT_HANDLE_NW, - GL_VIEW_OBJECT_HANDLE_NE, - GL_VIEW_OBJECT_HANDLE_SE, - GL_VIEW_OBJECT_HANDLE_SW, - GL_VIEW_OBJECT_HANDLE_P1, - GL_VIEW_OBJECT_HANDLE_P2, -} glViewObjectHandle; - - -#define GL_TYPE_VIEW_OBJECT (gl_view_object_get_type ()) -#define GL_VIEW_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_OBJECT, glViewObject)) -#define GL_VIEW_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_OBJECT, glViewObjectClass)) -#define GL_IS_VIEW_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_OBJECT)) -#define GL_IS_VIEW_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_OBJECT)) -#define GL_VIEW_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_VIEW_OBJECT, glViewObjectClass)) - -typedef struct _glViewObject glViewObject; -typedef struct _glViewObjectClass glViewObjectClass; - -typedef struct _glViewObjectPrivate glViewObjectPrivate; - - -#include "view.h" - -#include "cairo.h" - -struct _glViewObject { - GObject parent_object; - - glViewObjectPrivate *priv; -}; - -struct _glViewObjectClass { - GObjectClass parent_class; - - /* - * Methods - */ - - GtkWidget * (*construct_editor) (glViewObject *view_object); - - gboolean (*object_at) (glViewObject *view_object, - cairo_t *cr, - gdouble x_device, - gdouble y_device); -}; - - - - -G_BEGIN_DECLS - -GType gl_view_object_get_type (void) G_GNUC_CONST; - -GObject *gl_view_object_new (void); - - -void gl_view_object_set_view (glViewObject *view_object, - glView *view); - -void gl_view_object_set_object (glViewObject *view_object, - glLabelObject *object, - glViewObjectHandlesStyle style); - -gboolean gl_view_object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y); - -void gl_view_object_draw_handles (glViewObject *view_object, - cairo_t *cr); - -glViewObjectHandle gl_view_object_handle_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y); - -glView *gl_view_object_get_view (glViewObject *view_object); - -glLabelObject *gl_view_object_get_object (glViewObject *view_object); - -GtkWidget *gl_view_object_get_editor (glViewObject *view_object); - -void gl_view_object_select (glViewObject *view_object); - -void gl_view_object_resize_event (glViewObject *view_object, - glViewObjectHandle handle, - gboolean honor_aspect, - cairo_t *cr, - gdouble x, - gdouble y); - - -G_END_DECLS - -#endif /* __VIEW_OBJECT_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-text.c b/glabels2/src/view-text.c deleted file mode 100644 index e45c7dc1..00000000 --- a/glabels2/src/view-text.c +++ /dev/null @@ -1,549 +0,0 @@ -/* - * view-text.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "view-text.h" - -#include -#include - -#include "color.h" -#include "object-editor.h" -#include "stock.h" - -#include "pixmaps/cursor_text.xbm" -#include "pixmaps/cursor_text_mask.xbm" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - -struct _glViewTextPrivate { -}; - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static void gl_view_text_finalize (GObject *object); - -static GtkWidget *construct_properties_editor (glViewObject *view_object); - -static void update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object); - -static void update_object_from_editor_size_cb (glObjectEditor *editor, - glLabelObject *object); - -static void update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor); - -static void update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor); - -static gboolean object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y); - - -/*****************************************************************************/ -/* Boilerplate object stuff. */ -/*****************************************************************************/ -G_DEFINE_TYPE (glViewText, gl_view_text, GL_TYPE_VIEW_OBJECT); - - -static void -gl_view_text_class_init (glViewTextClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); - - gl_debug (DEBUG_VIEW, "START"); - - gl_view_text_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_view_text_finalize; - - view_object_class->construct_editor = construct_properties_editor; - view_object_class->object_at = object_at; - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_text_init (glViewText *view_text) -{ - gl_debug (DEBUG_VIEW, "START"); - - view_text->priv = g_new0 (glViewTextPrivate, 1); - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_text_finalize (GObject *object) -{ - glViewText *view_text = GL_VIEW_TEXT (object); - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (object && GL_IS_VIEW_TEXT (object)); - - g_free (view_text->priv); - - G_OBJECT_CLASS (gl_view_text_parent_class)->finalize (object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* NEW text object view. */ -/*****************************************************************************/ -glViewObject * -gl_view_text_new (glLabelText *object, - glView *view) -{ - glViewText *view_text; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (object && GL_IS_LABEL_TEXT (object), NULL); - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - view_text = g_object_new (gl_view_text_get_type(), NULL); - - gl_view_object_set_object (GL_VIEW_OBJECT(view_text), - GL_LABEL_OBJECT(object), - GL_VIEW_OBJECT_HANDLES_BOX); - gl_view_object_set_view (GL_VIEW_OBJECT(view_text), view); - - gl_debug (DEBUG_VIEW, "END"); - - return GL_VIEW_OBJECT (view_text); -} - - -/*****************************************************************************/ -/* Create a properties dialog for a text object. */ -/*****************************************************************************/ -static GtkWidget * -construct_properties_editor (glViewObject *view_object) -{ - GtkWidget *editor; - glViewText *view_text = (glViewText *)view_object; - glLabelObject *object; - GtkTextBuffer *buffer; - - gl_debug (DEBUG_VIEW, "START"); - - object = gl_view_object_get_object (GL_VIEW_OBJECT(view_text)); - - /* Build editor. */ - editor = gl_object_editor_new (GL_STOCK_TEXT, _("Text object properties"), - object->parent, - GL_OBJECT_EDITOR_SHADOW_PAGE, - GL_OBJECT_EDITOR_POSITION_PAGE, - GL_OBJECT_EDITOR_SIZE_PAGE, - GL_OBJECT_EDITOR_TEXT_PAGE, - GL_OBJECT_EDITOR_EDIT_PAGE, - 0); - - buffer = gl_label_text_get_buffer (GL_LABEL_TEXT(object)); - gl_object_editor_set_text_buffer (GL_OBJECT_EDITOR(editor), buffer); - - /* Update */ - update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); - update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); - - /* Connect signals. */ - g_signal_connect (G_OBJECT (editor), "changed", - G_CALLBACK(update_object_from_editor_cb), object); - g_signal_connect (G_OBJECT (editor), "size_changed", - G_CALLBACK(update_object_from_editor_size_cb), object); - g_signal_connect (G_OBJECT (object), "changed", - G_CALLBACK (update_editor_from_object_cb), editor); - g_signal_connect (G_OBJECT (object), "moved", - G_CALLBACK (update_editor_from_move_cb), editor); - - gl_debug (DEBUG_VIEW, "END"); - - return editor; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. editor "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_object_from_editor_cb (glObjectEditor *editor, - glLabelObject *object) -{ - gdouble x, y; - gchar *font_family; - gdouble font_size; - PangoWeight font_weight; - gboolean font_italic_flag; - glColorNode *color_node; - PangoAlignment align; - gdouble text_line_spacing; - gboolean auto_shrink; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - - gl_debug (DEBUG_VIEW, "START"); - - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_object_editor_get_position (editor, &x, &y); - font_family = gl_object_editor_get_font_family (editor); - font_size = gl_object_editor_get_font_size (editor); - font_weight = gl_object_editor_get_font_weight (editor); - font_italic_flag = gl_object_editor_get_font_italic_flag (editor); - color_node = gl_object_editor_get_text_color (editor); - align = gl_object_editor_get_text_alignment (editor); - text_line_spacing = gl_object_editor_get_text_line_spacing (editor); - auto_shrink = gl_object_editor_get_text_auto_shrink (editor); - - gl_label_object_set_position (object, x, y); - gl_label_object_set_font_family (object, font_family); - gl_label_object_set_font_size (object, font_size); - gl_label_object_set_font_weight (object, font_weight); - gl_label_object_set_font_italic_flag (object, font_italic_flag); - gl_label_object_set_text_color (object, color_node); - gl_label_object_set_text_alignment (object, align); - gl_label_object_set_text_line_spacing (object, text_line_spacing); - gl_label_text_set_auto_shrink (GL_LABEL_TEXT (object), auto_shrink); - - gl_color_node_free (&color_node); - g_free (font_family); - - shadow_state = gl_object_editor_get_shadow_state (editor); - gl_label_object_set_shadow_state (object, shadow_state); - - gl_object_editor_get_shadow_offset (editor, &shadow_x, &shadow_y); - gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); - - shadow_color_node = gl_object_editor_get_shadow_color (editor); - gl_label_object_set_shadow_color (object, shadow_color_node); - gl_color_node_free (&shadow_color_node); - - shadow_opacity = gl_object_editor_get_shadow_opacity (editor); - gl_label_object_set_shadow_opacity (object, shadow_opacity); - - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. editor "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_object_from_editor_size_cb (glObjectEditor *editor, - glLabelObject *object) -{ - gdouble w, h; - - gl_debug (DEBUG_VIEW, "START"); - - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_block_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_object_editor_get_size (editor, &w, &h); - - gl_label_object_set_size (object, w, h); - - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_object_cb, - editor); - g_signal_handlers_unblock_by_func (G_OBJECT(object), - update_editor_from_move_cb, - editor); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_object_cb (glLabelObject *object, - glObjectEditor *editor) -{ - gdouble w, h; - gchar *font_family; - gdouble font_size; - PangoWeight font_weight; - gboolean font_italic_flag; - glColorNode *color_node; - PangoAlignment align; - gdouble text_line_spacing; - gboolean auto_shrink; - gboolean shadow_state; - gdouble shadow_x, shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - glMerge *merge; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_size (object, &w, &h); - gl_object_editor_set_size (editor, w, h); - merge = gl_label_get_merge (GL_LABEL(object->parent)); - - font_family = gl_label_object_get_font_family (object); - font_size = gl_label_object_get_font_size (object); - font_weight = gl_label_object_get_font_weight (object); - font_italic_flag = gl_label_object_get_font_italic_flag (object); - color_node = gl_label_object_get_text_color (object); - align = gl_label_object_get_text_alignment (object); - text_line_spacing = gl_label_object_get_text_line_spacing (object); - auto_shrink = gl_label_text_get_auto_shrink (GL_LABEL_TEXT (object)); - - gl_object_editor_set_font_family (editor, font_family); - gl_object_editor_set_font_size (editor, font_size); - gl_object_editor_set_font_weight (editor, font_weight); - gl_object_editor_set_font_italic_flag (editor, font_italic_flag); - gl_object_editor_set_text_color (editor, (merge != NULL), color_node); - gl_object_editor_set_text_alignment (editor, align); - gl_object_editor_set_text_line_spacing (editor, text_line_spacing); - gl_object_editor_set_text_auto_shrink (editor, auto_shrink); - - gl_color_node_free (&color_node); - g_free (font_family); - - shadow_state = gl_label_object_get_shadow_state (object); - gl_object_editor_set_shadow_state (editor, shadow_state); - - gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); - gl_object_editor_set_shadow_offset (editor, shadow_x, shadow_y); - - shadow_color_node = gl_label_object_get_shadow_color (object); - gl_object_editor_set_shadow_color (editor, (merge != NULL), shadow_color_node); - gl_color_node_free (&shadow_color_node); - - shadow_opacity = gl_label_object_get_shadow_opacity (object); - gl_object_editor_set_shadow_opacity (editor, shadow_opacity); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. label object "moved" callback. */ -/*---------------------------------------------------------------------------*/ -static void -update_editor_from_move_cb (glLabelObject *object, - gdouble dx, - gdouble dy, - glObjectEditor *editor) -{ - gdouble x, y; - - gl_debug (DEBUG_VIEW, "START"); - - gl_label_object_get_position (object, &x, &y); - gl_object_editor_set_position (editor, x, y); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Is object at (x,y)? */ -/*****************************************************************************/ -static gboolean -object_at (glViewObject *view_object, - cairo_t *cr, - gdouble x, - gdouble y) -{ - glLabelObject *object; - gdouble w, h; - - object = gl_view_object_get_object (view_object); - - gl_label_object_get_size (object, &w, &h); - - cairo_rectangle (cr, 0.0, 0.0, w, h); - - if (cairo_in_fill (cr, x, y)) - { - return TRUE; - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Return apropos cursor for create object mode. */ -/*****************************************************************************/ -GdkCursor * -gl_view_text_get_create_cursor (void) -{ - GdkCursor *cursor = NULL; - GdkPixmap *pixmap_data, *pixmap_mask; - GdkColor fg = { 0, 0, 0, 0 }; - GdkColor bg = { 0, 65535, 65535, 65535 }; - - gl_debug (DEBUG_VIEW, "START"); - - pixmap_data = gdk_bitmap_create_from_data (NULL, - (gchar *)cursor_text_bits, - cursor_text_width, - cursor_text_height); - pixmap_mask = gdk_bitmap_create_from_data (NULL, - (gchar *)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); - - gl_debug (DEBUG_VIEW, "END"); - - return cursor; -} - - -/*****************************************************************************/ -/* Object creation handler: button press event. */ -/*****************************************************************************/ -void -gl_view_text_create_button_press_event (glView *view, - gdouble x, - gdouble y) -{ - GObject *object; - GList *lines; - gchar *family; - glColorNode *color_node; - - gl_view_unselect_all (view); - - object = gl_label_text_new (view->label); - color_node = gl_color_node_new_default (); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - family = gl_view_get_default_font_family (view); - gl_label_object_set_font_family (GL_LABEL_OBJECT(object), family); - gl_label_object_set_font_size (GL_LABEL_OBJECT(object), - gl_view_get_default_font_size (view)); - gl_label_object_set_font_weight (GL_LABEL_OBJECT(object), - gl_view_get_default_font_weight (view)); - gl_label_object_set_font_italic_flag (GL_LABEL_OBJECT(object), - gl_view_get_default_font_italic_flag (view)); - - color_node->color = gl_color_set_opacity (gl_view_get_default_text_color (view), 0.5); - gl_label_object_set_text_color (GL_LABEL_OBJECT(object), - color_node); - gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object), - gl_view_get_default_text_alignment (view)); - gl_label_object_set_text_line_spacing (GL_LABEL_OBJECT(object), gl_view_get_default_text_line_spacing (view)); - - g_free (family); - lines = gl_text_node_lines_new_from_text (_("Text")); - gl_label_text_set_lines (GL_LABEL_TEXT(object), lines); - gl_color_node_free (&color_node); - - view->create_object = GL_LABEL_OBJECT (object); - view->create_x0 = x; - view->create_y0 = y; -} - - -/*****************************************************************************/ -/* Object creation handler: motion event. */ -/*****************************************************************************/ -void -gl_view_text_create_motion_event (glView *view, - gdouble x, - gdouble y) -{ - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); -} - - -/*****************************************************************************/ -/* Object creation handler: button relesase event. */ -/*****************************************************************************/ -void -gl_view_text_create_button_release_event (glView *view, - gdouble x, - gdouble y) -{ - glColorNode *color_node; - - color_node = gl_color_node_new_default (); - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); - color_node->color = gl_view_get_default_text_color(view); - gl_label_object_set_text_color (GL_LABEL_OBJECT(view->create_object), color_node); - gl_color_node_free (&color_node); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view-text.h b/glabels2/src/view-text.h deleted file mode 100644 index 150ffb82..00000000 --- a/glabels2/src/view-text.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * view-text.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __VIEW_TEXT_H__ -#define __VIEW_TEXT_H__ - -#include "view-object.h" -#include "label-text.h" - -G_BEGIN_DECLS - - -#define GL_TYPE_VIEW_TEXT (gl_view_text_get_type ()) -#define GL_VIEW_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_TEXT, glViewText)) -#define GL_VIEW_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_TEXT, glViewTextClass)) -#define GL_IS_VIEW_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_TEXT)) -#define GL_IS_VIEW_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_TEXT)) - -typedef struct _glViewText glViewText; -typedef struct _glViewTextClass glViewTextClass; - -typedef struct _glViewTextPrivate glViewTextPrivate; - -struct _glViewText { - glViewObject parent_object; - - glViewTextPrivate *priv; -}; - -struct _glViewTextClass { - glViewObjectClass parent_class; -}; - - -GType gl_view_text_get_type (void) G_GNUC_CONST; - -glViewObject *gl_view_text_new (glLabelText *object, - glView *view); - - -/* cursor for creating text objects */ -GdkCursor *gl_view_text_get_create_cursor (void); - -/* Object creation handlers. */ -void gl_view_text_create_button_press_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_text_create_motion_event (glView *view, - gdouble x, - gdouble y); - -void gl_view_text_create_button_release_event (glView *view, - gdouble x, - gdouble y); - - -G_END_DECLS - -#endif /* __VIEW_TEXT_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view.c b/glabels2/src/view.c deleted file mode 100644 index 06e9d310..00000000 --- a/glabels2/src/view.c +++ /dev/null @@ -1,3737 +0,0 @@ -/* - * view.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "view.h" - -#include -#include -#include -#include -#include - -#include "label.h" -#include "cairo-label-path.h" -#include "cairo-markup-path.h" -#include "view-object.h" -#include "view-box.h" -#include "view-ellipse.h" -#include "view-line.h" -#include "view-image.h" -#include "view-text.h" -#include "view-barcode.h" -#include "xml-label.h" -#include "color.h" -#include "prefs.h" -#include "marshal.h" - -#include "debug.h" - - -/*==========================================================================*/ -/* Private macros and constants. */ -/*==========================================================================*/ - -#define BG_COLOR GL_COLOR (192, 192, 192) - -#define PAPER_RGB_ARGS 1.0, 1.0, 1.0 -#define GRID_RGB_ARGS 0.753, 0.753, 0.753 -#define MARKUP_RGB_ARGS 0.94, 0.39, 0.39 -#define OUTLINE_RGB_ARGS 0.68, 0.85, 0.90 -#define SELECT_LINE_RGBA_ARGS 0.0, 0.0, 1.0, 0.5 -#define SELECT_FILL_RGBA_ARGS 0.75, 0.75, 1.0, 0.5 - -#define GRID_LINE_WIDTH_PIXELS 1.0 -#define MARKUP_LINE_WIDTH_PIXELS 1.0 -#define OUTLINE_WIDTH_PIXELS 3.0 -#define SELECT_LINE_WIDTH_PIXELS 3.0 - -#define ZOOMTOFIT_PAD 16 - -#define POINTS_PER_MM 2.83464566929 - - -/*==========================================================================*/ -/* Private types. */ -/*==========================================================================*/ - -enum { - SELECTION_CHANGED, - CONTEXT_MENU_ACTIVATE, - ZOOM_CHANGED, - POINTER_MOVED, - POINTER_EXIT, - MODE_CHANGED, - LAST_SIGNAL -}; - - -/*==========================================================================*/ -/* Private globals */ -/*==========================================================================*/ - -static guint signals[LAST_SIGNAL] = {0}; - -/* "CLIPBOARD" selection */ -static GdkAtom clipboard_atom = GDK_NONE; - -static gdouble zooms[] = { - 8.00, - 6.00, - 4.00, - 3.00, - 2.00, - 1.50, - 1.00, - 0.75, - 0.67, - 0.50, - 0.33, - 0.25, - 0.20, - 0.15, - 0.10, -}; -#define N_ZOOMS G_N_ELEMENTS(zooms) - - -/*==========================================================================*/ -/* Local function prototypes */ -/*==========================================================================*/ - -static void gl_view_finalize (GObject *object); - -static void gl_view_construct (glView *view, - glLabel *label); - -static gdouble get_home_scale (glView *view); - -static gboolean expose_cb (glView *view, - GdkEventExpose *event); - -static void realize_cb (glView *view); - -static void size_allocate_cb (glView *view, - GtkAllocation *allocation); - -static void screen_changed_cb (glView *view); - -static void label_changed_cb (glView *view); - -static void label_resized_cb (glView *view); - -static void label_object_added_cb (glView *view, - glLabelObject *object); - -static void draw_layers (glView *view, - cairo_t *cr); - -static void draw_bg_layer (glView *view, - cairo_t *cr); -static void draw_grid_layer (glView *view, - cairo_t *cr); -static void draw_markup_layer (glView *view, - cairo_t *cr); -static void draw_objects_layer (glView *view, - cairo_t *cr); -static void draw_fg_layer (glView *view, - cairo_t *cr); -static void draw_highlight_layer (glView *view, - cairo_t *cr); -static void draw_select_region_layer (glView *view, - cairo_t *cr); - -static void select_object_real (glView *view, - glViewObject *view_object); -static void unselect_object_real (glView *view, - glViewObject *view_object); - -static glViewObject *view_view_object_at (glView *view, - cairo_t *cr, - gdouble x, - gdouble y); - -static void set_zoom_real (glView *view, - gdouble zoom, - gboolean scale_to_fit_flag); - -static void selection_clear_cb (GtkWidget *widget, - GdkEventSelection *event, - glView *view); - -static void selection_get_cb (GtkWidget *widget, - GtkSelectionData *selection_data, - guint info, - guint time, - glView *view); - -static void selection_received_cb (GtkWidget *widget, - GtkSelectionData *selection_data, - guint time, - glView *view); - -static gboolean focus_in_event_cb (glView *view, - GdkEventFocus *event); - -static gboolean focus_out_event_cb (glView *view, - GdkEventFocus *event); - -static gboolean enter_notify_event_cb (glView *view, - GdkEventCrossing *event); - -static gboolean leave_notify_event_cb (glView *view, - GdkEventCrossing *event); - -static gboolean motion_notify_event_cb (glView *view, - GdkEventMotion *event); - -static gboolean button_press_event_cb (glView *view, - GdkEventButton *event); - -static gboolean button_release_event_cb (glView *view, - GdkEventButton *event); - -static gboolean key_press_event_cb (glView *view, - GdkEventKey *event); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glView, gl_view, GTK_TYPE_VBOX); - - -static void -gl_view_class_init (glViewClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_VIEW, "START"); - - gl_view_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_view_finalize; - - signals[SELECTION_CHANGED] = - g_signal_new ("selection_changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glViewClass, selection_changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - signals[CONTEXT_MENU_ACTIVATE] = - g_signal_new ("context_menu_activate", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glViewClass, context_menu_activate), - NULL, NULL, - gl_marshal_VOID__INT_UINT, - G_TYPE_NONE, - 2, G_TYPE_INT, G_TYPE_UINT); - - signals[ZOOM_CHANGED] = - g_signal_new ("zoom_changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glViewClass, zoom_changed), - NULL, NULL, - gl_marshal_VOID__DOUBLE, - G_TYPE_NONE, - 1, G_TYPE_DOUBLE); - - signals[POINTER_MOVED] = - g_signal_new ("pointer_moved", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glViewClass, pointer_moved), - NULL, NULL, - gl_marshal_VOID__DOUBLE_DOUBLE, - G_TYPE_NONE, - 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); - - signals[POINTER_EXIT] = - g_signal_new ("pointer_exit", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glViewClass, pointer_exit), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - signals[MODE_CHANGED] = - g_signal_new ("mode_changed", - G_OBJECT_CLASS_TYPE (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glViewClass, mode_changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_init (glView *view) -{ - GtkWidget *wscroll; - GdkColor *bg_color; - - gl_debug (DEBUG_VIEW, "START"); - - view->label = NULL; - view->grid_visible = TRUE; - view->grid_spacing = 9; - view->markup_visible = TRUE; - view->default_font_family = NULL; - view->mode = GL_VIEW_MODE_ARROW; - view->object_list = NULL; - view->selected_object_list = NULL; - view->zoom = 1.0; - view->home_scale = get_home_scale (view); - - /* - * Canvas - */ - view->canvas = gtk_layout_new (NULL, NULL); - 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 (view), wscroll, TRUE, TRUE, 0); - gtk_container_add (GTK_CONTAINER (wscroll), view->canvas); - - bg_color = gl_color_to_gdk_color (BG_COLOR); - gtk_widget_modify_bg (GTK_WIDGET (view->canvas), GTK_STATE_NORMAL, bg_color); - g_free (bg_color); - - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (view->canvas), GTK_CAN_FOCUS); - - gtk_widget_add_events (GTK_WIDGET (view->canvas), - (GDK_FOCUS_CHANGE_MASK | - GDK_ENTER_NOTIFY_MASK | - GDK_LEAVE_NOTIFY_MASK | - GDK_POINTER_MOTION_MASK | - GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_KEY_PRESS_MASK)); - - g_signal_connect_swapped (G_OBJECT (view->canvas), "expose-event", - G_CALLBACK (expose_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "realize", - G_CALLBACK (realize_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "size-allocate", - G_CALLBACK (size_allocate_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "screen-changed", - G_CALLBACK (screen_changed_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "focus-in-event", - G_CALLBACK (focus_in_event_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "focus-out-event", - G_CALLBACK (focus_out_event_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "enter-notify-event", - G_CALLBACK (enter_notify_event_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "leave-notify-event", - G_CALLBACK (leave_notify_event_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "motion-notify-event", - G_CALLBACK (motion_notify_event_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "button-press-event", - G_CALLBACK (button_press_event_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "button-release-event", - G_CALLBACK (button_release_event_cb), view); - g_signal_connect_swapped (G_OBJECT (view->canvas), "key-press-event", - G_CALLBACK (key_press_event_cb), view); - - /* - * Clipboard - */ - view->have_selection = FALSE; - view->selection_data = NULL; - view->invisible = gtk_invisible_new (); - if (!clipboard_atom) { - clipboard_atom = gdk_atom_intern ("GLABELS_CLIPBOARD", FALSE); - } - gtk_selection_add_target (view->invisible, - clipboard_atom, GDK_SELECTION_TYPE_STRING, 1); - g_signal_connect (G_OBJECT (view->invisible), - "selection_clear_event", - G_CALLBACK (selection_clear_cb), view); - g_signal_connect (G_OBJECT (view->invisible), "selection_get", - G_CALLBACK (selection_get_cb), view); - g_signal_connect (G_OBJECT (view->invisible), - "selection_received", - G_CALLBACK (selection_received_cb), view); - - /* - * Defaults from preferences - */ - gl_view_set_default_font_family (view, gl_prefs->default_font_family); - gl_view_set_default_font_size (view, gl_prefs->default_font_size); - gl_view_set_default_font_weight (view, gl_prefs->default_font_weight); - gl_view_set_default_font_italic_flag (view, gl_prefs->default_font_italic_flag); - gl_view_set_default_text_color (view, gl_prefs->default_text_color); - gl_view_set_default_text_alignment (view, gl_prefs->default_text_alignment); - gl_view_set_default_text_line_spacing (view, gl_prefs->default_text_line_spacing); - gl_view_set_default_line_width (view, gl_prefs->default_line_width); - gl_view_set_default_line_color (view, gl_prefs->default_line_color); - gl_view_set_default_fill_color (view, gl_prefs->default_fill_color); - - gl_debug (DEBUG_VIEW, "END"); -} - - -static void -gl_view_finalize (GObject *object) -{ - glView *view = GL_VIEW (object); - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_VIEW (object)); - - if (view->default_font_family) { - g_free (view->default_font_family); - } - - G_OBJECT_CLASS (gl_view_parent_class)->finalize (object); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* NEW view object. */ -/****************************************************************************/ -GtkWidget * -gl_view_new (glLabel *label) -{ - glView *view; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (label && GL_IS_LABEL (label), NULL); - - view = g_object_new (GL_TYPE_VIEW, NULL); - - gl_view_construct (view, label); - - gl_debug (DEBUG_VIEW, "END"); - - return GTK_WIDGET (view); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Construct composite widget. */ -/*---------------------------------------------------------------------------*/ -static void -gl_view_construct (glView *view, - glLabel *label) -{ - GList *p_obj; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (GL_IS_VIEW (view)); - - view->label = label; - - for (p_obj = label->objects; p_obj != NULL; p_obj = p_obj->next) - { - object = GL_LABEL_OBJECT (p_obj->data); - - if (GL_IS_LABEL_BOX (object)) { - gl_view_box_new (GL_LABEL_BOX(object), view); - } else if (GL_IS_LABEL_ELLIPSE (object)) { - gl_view_ellipse_new (GL_LABEL_ELLIPSE(object), view); - } else if (GL_IS_LABEL_LINE (object)) { - gl_view_line_new (GL_LABEL_LINE(object), view); - } else if (GL_IS_LABEL_IMAGE (object)) { - gl_view_image_new (GL_LABEL_IMAGE(object), view); - } else if (GL_IS_LABEL_TEXT (object)) { - gl_view_text_new (GL_LABEL_TEXT(object), view); - } else if (GL_IS_LABEL_BARCODE (object)) { - gl_view_barcode_new (GL_LABEL_BARCODE(object), view); - } else { - /* Should not happen! */ - g_message ("Invalid label object type."); - } - } - - g_signal_connect_swapped (G_OBJECT (view->label), "changed", - G_CALLBACK (label_changed_cb), view); - g_signal_connect_swapped (G_OBJECT (view->label), "size_changed", - G_CALLBACK (label_resized_cb), view); - g_signal_connect_swapped (G_OBJECT (view->label), "object_added", - G_CALLBACK (label_object_added_cb), view); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIAVTE. Calculate 1:1 scale for screen. */ -/*---------------------------------------------------------------------------*/ -static gdouble -get_home_scale (glView *view) -{ - GdkScreen *screen; - gdouble screen_width_pixels; - gdouble screen_width_mm; - gdouble screen_height_pixels; - gdouble screen_height_mm; - gdouble x_pixels_per_mm; - gdouble y_pixels_per_mm; - gdouble scale; - - if (view->canvas == NULL) return 1.0; - - if (!gtk_widget_has_screen (GTK_WIDGET (view->canvas))) return 1.0; - - screen = gtk_widget_get_screen (GTK_WIDGET (view->canvas)); - - gl_debug (DEBUG_VIEW, "Screen = %p", screen); - - screen_width_pixels = gdk_screen_get_width (screen); - screen_width_mm = gdk_screen_get_width_mm (screen); - screen_height_pixels = gdk_screen_get_height (screen); - screen_height_mm = gdk_screen_get_height_mm (screen); - - x_pixels_per_mm = screen_width_pixels / screen_width_mm; - y_pixels_per_mm = screen_height_pixels / screen_height_mm; - - gl_debug (DEBUG_VIEW, "Horizontal dot pitch: %g pixels/mm (%g dpi)", - x_pixels_per_mm, x_pixels_per_mm * 25.4); - gl_debug (DEBUG_VIEW, "Vertical dot pitch: %g pixels/mm (%g dpi)", - y_pixels_per_mm, y_pixels_per_mm * 25.4); - - scale = (x_pixels_per_mm + y_pixels_per_mm) / 2.0; - - gl_debug (DEBUG_VIEW, "Average dot pitch: %g pixels/mm (%g dpi)", - scale, scale * 25.4); - - scale /= POINTS_PER_MM; - - gl_debug (DEBUG_VIEW, "Scale = %g pixels/point", scale); - - /* Make sure scale is somewhat sane. */ - if ( (scale < 0.25) || (scale > 4.0) ) return 1.0; - - return scale; -} - - -/*---------------------------------------------------------------------------*/ -/* Schedule canvas update. */ -/*---------------------------------------------------------------------------*/ -void -gl_view_update (glView *view) -{ - GtkWidget *widget; - GdkRegion *region; - - gl_debug (DEBUG_VIEW, "START"); - - widget = GTK_WIDGET (view->canvas); - - if (!widget->window) return; - - if ( !view->update_scheduled_flag ) - { - view->update_scheduled_flag = TRUE; - - region = gdk_drawable_get_clip_region (widget->window); - /* redraw the cairo canvas completely by exposing it */ - gdk_window_invalidate_region (widget->window, region, TRUE); - gdk_region_destroy (region); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* Schedule canvas region update. */ -/*---------------------------------------------------------------------------*/ -void -gl_view_update_region (glView *view, - cairo_t *cr, - glLabelRegion *region) -{ - GtkWidget *widget; - GdkRectangle rect; - gdouble x, y, w, h; - - gl_debug (DEBUG_VIEW, "START"); - - widget = GTK_WIDGET (view->canvas); - - if (!widget->window) return; - - x = MIN (region->x1, region->x2); - y = MIN (region->y1, region->y2); - w = fabs (region->x2 - region->x1); - h = fabs (region->y2 - region->y1); - - cairo_user_to_device (cr, &x, &y); - cairo_user_to_device_distance (cr, &w, &h); - - rect.x = x - 3; - rect.y = y - 3; - rect.width = w + 6; - rect.height = h + 6; - - gdk_window_invalidate_rect (widget->window, &rect, TRUE); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Expose handler. */ -/*---------------------------------------------------------------------------*/ -static gboolean -expose_cb (glView *view, - GdkEventExpose *event) -{ - cairo_t *cr; - - gl_debug (DEBUG_VIEW, "START"); - - view->update_scheduled_flag = FALSE; - - /* get a cairo_t */ - cr = gdk_cairo_create (GTK_LAYOUT (view->canvas)->bin_window); - - cairo_rectangle (cr, - event->area.x, event->area.y, - event->area.width, event->area.height); - cairo_clip (cr); - - draw_layers (view, cr); - - cairo_destroy (cr); - - gl_debug (DEBUG_VIEW, "END"); - - return FALSE; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Realize handler. */ -/*---------------------------------------------------------------------------*/ -static void -realize_cb (glView *view) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - - gl_debug (DEBUG_VIEW, "START"); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Size allocation changed callback. */ -/*---------------------------------------------------------------------------*/ -static void -size_allocate_cb (glView *view, - GtkAllocation *allocation) -{ - gl_debug (DEBUG_VIEW, "START"); - - GTK_LAYOUT (view->canvas)->hadjustment->page_size = allocation->width; - GTK_LAYOUT (view->canvas)->hadjustment->page_increment = allocation->width / 2; - - GTK_LAYOUT (view->canvas)->vadjustment->page_size = allocation->height; - GTK_LAYOUT (view->canvas)->vadjustment->page_increment = allocation->height / 2; - - g_signal_emit_by_name (GTK_LAYOUT (view->canvas)->hadjustment, "changed"); - g_signal_emit_by_name (GTK_LAYOUT (view->canvas)->vadjustment, "changed"); - - if (view->zoom_to_fit_flag) { - /* Maintain best fit zoom */ - gl_view_zoom_to_fit (view); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Screen changed callback. */ -/*---------------------------------------------------------------------------*/ -static void -screen_changed_cb (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - if (gtk_widget_has_screen (GTK_WIDGET (view->canvas))) { - - view->home_scale = get_home_scale (view); - - if (view->zoom_to_fit_flag) { - /* Maintain best fit zoom */ - gl_view_zoom_to_fit (view); - } - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle label changed event. */ -/*---------------------------------------------------------------------------*/ -static void -label_changed_cb (glView *view) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - - gl_debug (DEBUG_VIEW, "START"); - - gl_view_update (view); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle label resize event. */ -/*---------------------------------------------------------------------------*/ -static void -label_resized_cb (glView *view) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - - gl_debug (DEBUG_VIEW, "START"); - - g_signal_emit_by_name (GTK_LAYOUT (view->canvas)->hadjustment, "changed"); - g_signal_emit_by_name (GTK_LAYOUT (view->canvas)->vadjustment, "changed"); - - gl_view_update (view); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle new label object. */ -/*---------------------------------------------------------------------------*/ -static void -label_object_added_cb (glView *view, - glLabelObject *object) -{ - glViewObject *view_object; - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); - - if (GL_IS_LABEL_BOX (object)) { - view_object = gl_view_box_new (GL_LABEL_BOX(object), view); - } else if (GL_IS_LABEL_ELLIPSE (object)) { - view_object = gl_view_ellipse_new (GL_LABEL_ELLIPSE(object), view); - } else if (GL_IS_LABEL_LINE (object)) { - view_object = gl_view_line_new (GL_LABEL_LINE(object), view); - } else if (GL_IS_LABEL_IMAGE (object)) { - view_object = gl_view_image_new (GL_LABEL_IMAGE(object), view); - } else if (GL_IS_LABEL_TEXT (object)) { - view_object = gl_view_text_new (GL_LABEL_TEXT(object), view); - } else if (GL_IS_LABEL_BARCODE (object)) { - view_object = gl_view_barcode_new (GL_LABEL_BARCODE(object), view); - } else { - /* Should not happen! */ - view_object = NULL; - g_message ("Invalid label object type."); - } - - gl_view_select_object (view, view_object); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Create, draw and order layers. */ -/*---------------------------------------------------------------------------*/ -static void -draw_layers (glView *view, - cairo_t *cr) -{ - gdouble scale; - gdouble w, h; - gint canvas_w, canvas_h; - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (view->label && GL_IS_LABEL (view->label)); - - gl_debug (DEBUG_VIEW, "START"); - - scale = view->zoom * view->home_scale; - - gl_label_get_size (view->label, &w, &h); - - scale = view->home_scale * view->zoom; - gtk_layout_set_size (GTK_LAYOUT (view->canvas), w*scale+8, h*scale+8); - - gdk_drawable_get_size (GTK_LAYOUT (view->canvas)->bin_window, &canvas_w, &canvas_h); - - view->x0 = (canvas_w/scale - w) / 2.0; - view->y0 = (canvas_h/scale - h) / 2.0; - view->w = w; - view->h = h; - - cairo_save (cr); - - cairo_scale (cr, scale, scale); - cairo_translate (cr, view->x0, view->y0); - - draw_bg_layer (view, cr); - draw_grid_layer (view, cr); - draw_markup_layer (view, cr); - draw_objects_layer (view, cr); - draw_fg_layer (view, cr); - draw_highlight_layer (view, cr); - draw_select_region_layer (view, cr); - - cairo_restore (cr); - - gl_debug (DEBUG_VIEW, "END"); - -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw background */ -/*---------------------------------------------------------------------------*/ -static void -draw_bg_layer (glView *view, - cairo_t *cr) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (view->label && GL_IS_LABEL (view->label)); - - gl_cairo_label_path (cr, view->label->template, view->label->rotate_flag, FALSE); - - cairo_set_source_rgb (cr, PAPER_RGB_ARGS); - cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); - cairo_fill (cr); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw grid lines. */ -/*---------------------------------------------------------------------------*/ -static void -draw_grid_layer (glView *view, - cairo_t *cr) -{ - gdouble w, h; - gdouble x, y; - gdouble x0, y0; - const lglTemplateFrame *frame; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (view->label && GL_IS_LABEL(view->label)); - - if (view->grid_visible) - { - - frame = (lglTemplateFrame *)view->label->template->frames->data; - - gl_label_get_size (view->label, &w, &h); - - if (frame->shape == LGL_TEMPLATE_FRAME_SHAPE_RECT) { - x0 = 0.0; - y0 = 0.0; - } else { - /* round labels, adjust grid to line up with center of label. */ - x0 = fmod (w/2.0, view->grid_spacing); - y0 = fmod (h/2.0, view->grid_spacing); - } - - - cairo_save (cr); - - cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); - cairo_set_line_width (cr, GRID_LINE_WIDTH_PIXELS/(view->home_scale * view->zoom)); - cairo_set_source_rgb (cr, GRID_RGB_ARGS); - - for ( x=x0+view->grid_spacing; x < w; x += view->grid_spacing ) - { - cairo_move_to (cr, x, 0); - cairo_line_to (cr, x, h); - cairo_stroke (cr); - } - - for ( y=y0+view->grid_spacing; y < h; y += view->grid_spacing ) - { - cairo_move_to (cr, 0, y); - cairo_line_to (cr, w, y); - cairo_stroke (cr); - } - - cairo_restore (cr); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw markup layer. */ -/*---------------------------------------------------------------------------*/ -static void -draw_markup_layer (glView *view, - cairo_t *cr) -{ - glLabel *label; - const lglTemplateFrame *frame; - GList *p; - lglTemplateMarkup *markup; - gdouble width, height; - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (view->label && GL_IS_LABEL (view->label)); - - if (view->markup_visible) - { - - label = view->label; - frame = (lglTemplateFrame *)view->label->template->frames->data; - - cairo_save (cr); - - if (label->rotate_flag) - { - lgl_template_frame_get_size (frame, &width, &height); - cairo_rotate (cr, -M_PI/2.0); - cairo_translate (cr, -width, 0.0); - } - - cairo_set_line_width (cr, MARKUP_LINE_WIDTH_PIXELS/(view->home_scale * view->zoom)); - cairo_set_source_rgb (cr, MARKUP_RGB_ARGS); - - for ( p=frame->all.markups; p != NULL; p=p->next ) - { - markup = (lglTemplateMarkup *)p->data; - - gl_cairo_markup_path (cr, markup, label); - - cairo_stroke (cr); - } - - cairo_restore (cr); - } - -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw objects layer. */ -/*---------------------------------------------------------------------------*/ -static void -draw_objects_layer (glView *view, - cairo_t *cr) -{ - gl_label_draw (view->label, cr, TRUE, NULL); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw foreground */ -/*---------------------------------------------------------------------------*/ -static void -draw_fg_layer (glView *view, - cairo_t *cr) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (view->label && GL_IS_LABEL (view->label)); - - gl_cairo_label_path (cr, view->label->template, view->label->rotate_flag, FALSE); - - cairo_set_line_width (cr, OUTLINE_WIDTH_PIXELS/(view->home_scale * view->zoom)); - cairo_set_source_rgb (cr, OUTLINE_RGB_ARGS); - cairo_stroke (cr); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Create highlight layer. */ -/*---------------------------------------------------------------------------*/ -static void -draw_highlight_layer (glView *view, - cairo_t *cr) -{ - GList *p_obj; - glViewObject *view_object; - - g_return_if_fail (view && GL_IS_VIEW (view)); - - cairo_save (cr); - - cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); - - for (p_obj = view->selected_object_list; p_obj != NULL; p_obj = p_obj->next) - { - view_object = GL_VIEW_OBJECT (p_obj->data); - - gl_view_object_draw_handles (view_object, cr); - } - - cairo_restore (cr); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Draw select region layer. */ -/*---------------------------------------------------------------------------*/ -static void -draw_select_region_layer (glView *view, - cairo_t *cr) -{ - gdouble x1, y1; - gdouble w, h; - - g_return_if_fail (view && GL_IS_VIEW (view)); - - if (view->select_region_visible) - { - x1 = MIN (view->select_region.x1, view->select_region.x2); - y1 = MIN (view->select_region.y1, view->select_region.y2); - w = fabs (view->select_region.x2 - view->select_region.x1); - h = fabs (view->select_region.y2 - view->select_region.y1); - - cairo_save (cr); - - cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); - - cairo_rectangle (cr, x1, y1, w, h); - - cairo_set_source_rgba (cr, SELECT_FILL_RGBA_ARGS); - cairo_fill_preserve (cr); - - cairo_set_line_width (cr, SELECT_LINE_WIDTH_PIXELS/(view->home_scale * view->zoom)); - cairo_set_source_rgba (cr, SELECT_LINE_RGBA_ARGS); - cairo_stroke (cr); - - cairo_restore (cr); - } -} - - -/*****************************************************************************/ -/* Show grid. */ -/*****************************************************************************/ -void -gl_view_show_grid (glView *view) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->grid_visible = TRUE; - gl_view_update (view); -} - - -/*****************************************************************************/ -/* Hide grid. */ -/*****************************************************************************/ -void -gl_view_hide_grid (glView *view) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->grid_visible = FALSE; - gl_view_update (view); -} - - -/*****************************************************************************/ -/* Set grid spacing. */ -/*****************************************************************************/ -void -gl_view_set_grid_spacing (glView *view, - gdouble spacing) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->grid_spacing = spacing; - gl_view_update (view); -} - - -/*****************************************************************************/ -/* Show markup. */ -/*****************************************************************************/ -void -gl_view_show_markup (glView *view) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->markup_visible = TRUE; - gl_view_update (view); -} - - -/*****************************************************************************/ -/* Hide markup. */ -/*****************************************************************************/ -void -gl_view_hide_markup (glView *view) -{ - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->markup_visible = FALSE; - gl_view_update (view); -} - - -/*****************************************************************************/ -/* Set arrow mode. */ -/*****************************************************************************/ -void -gl_view_arrow_mode (glView *view) -{ - GdkCursor *cursor; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (view->canvas->window, cursor); - gdk_cursor_unref (cursor); - - view->mode = GL_VIEW_MODE_ARROW; - view->state = GL_VIEW_IDLE; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Set create text object mode. */ -/*****************************************************************************/ -void -gl_view_object_create_mode (glView *view, - glLabelObjectType type) -{ - GdkCursor *cursor = NULL; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - switch (type) - { - case GL_LABEL_OBJECT_BOX: - cursor = gl_view_box_get_create_cursor (); - break; - case GL_LABEL_OBJECT_ELLIPSE: - cursor = gl_view_ellipse_get_create_cursor (); - break; - case GL_LABEL_OBJECT_LINE: - cursor = gl_view_line_get_create_cursor (); - break; - case GL_LABEL_OBJECT_IMAGE: - cursor = gl_view_image_get_create_cursor (); - break; - case GL_LABEL_OBJECT_TEXT: - cursor = gl_view_text_get_create_cursor (); - break; - case GL_LABEL_OBJECT_BARCODE: - cursor = gl_view_barcode_get_create_cursor (); - break; - default: - g_message ("Invalid label object type.");/*Should not happen!*/ - break; - } - - gdk_window_set_cursor (view->canvas->window, cursor); - gdk_cursor_unref (cursor); - - view->mode = GL_VIEW_MODE_OBJECT_CREATE; - view->state = GL_VIEW_IDLE; - view->create_type = type; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Select given object (adding to current selection). */ -/*****************************************************************************/ -void -gl_view_select_object (glView *view, - glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - select_object_real (view, view_object); - - g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Unselect given object (removing from current selection). */ -/*****************************************************************************/ -void -gl_view_unselect_object (glView *view, - glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - unselect_object_real (view, view_object); - - g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Select all items. */ -/*****************************************************************************/ -void -gl_view_select_all (glView *view) -{ - GList *p, *p_next; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - /* 1st unselect anything already selected. */ - for (p = view->selected_object_list; p != NULL; p = p_next) { - p_next = p->next; - unselect_object_real (view, GL_VIEW_OBJECT (p->data)); - } - - /* Finally select all objects. */ - for (p = view->object_list; p != NULL; p = p->next) { - select_object_real (view, GL_VIEW_OBJECT (p->data)); - } - - g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Remove all selections */ -/*****************************************************************************/ -void -gl_view_unselect_all (glView *view) -{ - GList *p; - GList *p_next; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p_next) { - p_next = p->next; - unselect_object_real (view, GL_VIEW_OBJECT (p->data)); - } - - g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Select all objects within given rectangular region (adding to selection). */ -/*****************************************************************************/ -void -gl_view_select_region (glView *view, - glLabelRegion *region) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - gdouble r_x1, r_y1; - gdouble r_x2, r_y2; - glLabelRegion obj_extent; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - r_x1 = MIN (region->x1, region->x2); - r_y1 = MIN (region->y1, region->y2); - r_x2 = MAX (region->x1, region->x2); - r_y2 = MAX (region->y1, region->y2); - - for (p = view->object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT(p->data); - if (!gl_view_is_object_selected (view, view_object)) - { - - object = gl_view_object_get_object (view_object); - - gl_label_object_get_extent (object, &obj_extent); - if ((obj_extent.x1 >= r_x1) && - (obj_extent.x2 <= r_x2) && - (obj_extent.y1 >= r_y1) && - (obj_extent.y2 <= r_y2)) - { - select_object_real (view, view_object); - } - - } - } - - g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Select an object. */ -/*---------------------------------------------------------------------------*/ -static void -select_object_real (glView *view, - glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (GL_IS_VIEW_OBJECT (view_object)); - - if (!gl_view_is_object_selected (view, view_object)) { - view->selected_object_list = - g_list_append (view->selected_object_list, view_object); - } - gtk_widget_grab_focus (GTK_WIDGET (view->canvas)); - - gl_view_update (view); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Un-select object. */ -/*---------------------------------------------------------------------------*/ -static void -unselect_object_real (glView *view, - glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (GL_IS_VIEW_OBJECT (view_object)); - - view->selected_object_list = - g_list_remove (view->selected_object_list, view_object); - - gl_view_update (view); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Return object at (x,y). */ -/*---------------------------------------------------------------------------*/ -static glViewObject * -view_view_object_at (glView *view, - cairo_t *cr, - gdouble x, - gdouble y) -{ - GList *p_obj; - glViewObject *view_object; - - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - for (p_obj = g_list_last (view->object_list); p_obj != NULL; p_obj = p_obj->prev) - { - - view_object = GL_VIEW_OBJECT (p_obj->data); - - if (gl_view_object_at (view_object, cr, x, y)) - { - return view_object; - } - - } - - return NULL; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Return object handle at (x,y). */ -/*---------------------------------------------------------------------------*/ -static glViewObject * -view_handle_at (glView *view, - cairo_t *cr, - gdouble x, - gdouble y, - glViewObjectHandle *handle) -{ - GList *p_obj; - glViewObject *view_object; - - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - for (p_obj = g_list_last (view->selected_object_list); p_obj != NULL; p_obj = p_obj->prev) - { - - view_object = GL_VIEW_OBJECT (p_obj->data); - - if ((*handle = gl_view_object_handle_at (view_object, cr, x, y))) - { - return view_object; - } - - } - - return NULL; -} - - -/*****************************************************************************/ -/* Is the object in our current selection? */ -/*****************************************************************************/ -gboolean -gl_view_is_object_selected (glView *view, - glViewObject *view_object) -{ - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); - g_return_val_if_fail (GL_IS_VIEW_OBJECT (view_object), FALSE); - - if (g_list_find (view->selected_object_list, view_object) == NULL) { - return FALSE; - } - return TRUE; -} - - -/*****************************************************************************/ -/* Is our current selection empty? */ -/*****************************************************************************/ -gboolean -gl_view_is_selection_empty (glView *view) -{ - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); - - if (view->selected_object_list == NULL) { - return TRUE; - } else { - return FALSE; - } -} - - -/*****************************************************************************/ -/* Is our current selection atomic? I.e. only one item selected. */ -/*****************************************************************************/ -gboolean -gl_view_is_selection_atomic (glView *view) -{ - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); - - if (view->selected_object_list == NULL) - return FALSE; - if (view->selected_object_list->next == NULL) - return TRUE; - return FALSE; -} - - -/*****************************************************************************/ -/* Delete selected objects. (Bypass clipboard) */ -/*****************************************************************************/ -void -gl_view_delete_selection (glView *view) -{ - GList *object_list; - GList *p; - GList *p_next; - glViewObject *view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - object_list = view->selected_object_list; - view->selected_object_list = NULL; - g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); - - for (p = object_list; p != NULL; p = p_next) { - p_next = p->next; - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_remove (object); - } - - g_list_free (object_list); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Get object property editor of first selected object. */ -/*****************************************************************************/ -GtkWidget * -gl_view_get_editor (glView *view) -{ - glViewObject *view_object; - GtkWidget *editor = NULL; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - if (!gl_view_is_selection_empty (view)) { - - view_object = GL_VIEW_OBJECT(view->selected_object_list->data); - editor = gl_view_object_get_editor (view_object); - - } - - gl_debug (DEBUG_VIEW, "END"); - - return editor; -} - - -/*****************************************************************************/ -/* Raise selected items to top. */ -/*****************************************************************************/ -void -gl_view_raise_selection (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_raise_to_top (object); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Lower selected items to bottom. */ -/*****************************************************************************/ -void -gl_view_lower_selection (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_lower_to_bottom (object); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Rotate selected objects by given angle. */ -/*****************************************************************************/ -void -gl_view_rotate_selection (glView *view, - gdouble theta_degs) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_rotate (object, theta_degs); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Rotate selected objects 90 degrees left. */ -/*****************************************************************************/ -void -gl_view_rotate_selection_left (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_rotate (object, -90.0); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Rotate selected objects 90 degrees right. */ -/*****************************************************************************/ -void -gl_view_rotate_selection_right (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_rotate (object, 90.0); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Flip selected objects horizontally. */ -/*****************************************************************************/ -void -gl_view_flip_selection_horiz (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_flip_horiz (object); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Flip selected objects vertically. */ -/*****************************************************************************/ -void -gl_view_flip_selection_vert (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_flip_vert (object); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Align selected objects to left most edge. */ -/*****************************************************************************/ -void -gl_view_align_selection_left (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - gdouble dx, x1_min; - glLabelRegion obj_extent; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - g_return_if_fail (!gl_view_is_selection_empty (view) && - !gl_view_is_selection_atomic (view)); - - /* find left most edge */ - p = view->selected_object_list; - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - x1_min = obj_extent.x1; - for (p = p->next; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - if ( obj_extent.x1 < x1_min ) x1_min = obj_extent.x1; - } - - /* now adjust the object positions to line up the left edges */ - for (p = view->selected_object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dx = x1_min - obj_extent.x1; - gl_label_object_set_position_relative (object, dx, 0.0); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Align selected objects to right most edge. */ -/*****************************************************************************/ -void -gl_view_align_selection_right (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - gdouble dx, x2_max; - glLabelRegion obj_extent; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - g_return_if_fail (!gl_view_is_selection_empty (view) && - !gl_view_is_selection_atomic (view)); - - /* find right most edge */ - p = view->selected_object_list; - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - x2_max = obj_extent.x2; - for (p = p->next; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - if ( obj_extent.x2 > x2_max ) x2_max = obj_extent.x2; - } - - /* now adjust the object positions to line up the right edges */ - for (p = view->selected_object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dx = x2_max - obj_extent.x2; - gl_label_object_set_position_relative (object, dx, 0.0); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Align selected objects to horizontal center of objects. */ -/*****************************************************************************/ -void -gl_view_align_selection_hcenter (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - gdouble dx; - gdouble dxmin; - gdouble xsum, xavg; - glLabelRegion obj_extent; - gdouble xcenter; - gint n; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - g_return_if_fail (!gl_view_is_selection_empty (view) && - !gl_view_is_selection_atomic (view)); - - /* find average center of objects */ - xsum = 0.0; - n = 0; - for (p = view->selected_object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - xsum += (obj_extent.x1 + obj_extent.x2) / 2.0; - n++; - } - xavg = xsum / n; - - /* find center of object closest to average center */ - p = view->selected_object_list; - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dxmin = fabs (xavg - (obj_extent.x1 + obj_extent.x2)/2.0); - xcenter = (obj_extent.x1 + obj_extent.x2)/2.0; - for (p = p->next; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dx = fabs (xavg - (obj_extent.x1 + obj_extent.x2)/2.0); - if ( dx < dxmin ) - { - dxmin = dx; - xcenter = (obj_extent.x1 + obj_extent.x2)/2.0; - } - } - - /* now adjust the object positions to line up this center */ - for (p = view->selected_object_list; p != NULL; p = p->next) { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dx = xcenter - (obj_extent.x1 + obj_extent.x2)/2.0; - gl_label_object_set_position_relative (object, dx, 0.0); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Align selected objects to top most edge. */ -/*****************************************************************************/ -void -gl_view_align_selection_top (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - gdouble dy, y1_min; - glLabelRegion obj_extent; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - g_return_if_fail (!gl_view_is_selection_empty (view) && - !gl_view_is_selection_atomic (view)); - - /* find top most edge */ - p = view->selected_object_list; - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - y1_min = obj_extent.y1; - for (p = p->next; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - if ( obj_extent.y1 < y1_min ) y1_min = obj_extent.y1; - } - - /* now adjust the object positions to line up the top edges */ - for (p = view->selected_object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dy = y1_min - obj_extent.y1; - gl_label_object_set_position_relative (object, 0.0, dy); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Align selected objects to bottom most edge. */ -/*****************************************************************************/ -void -gl_view_align_selection_bottom (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - gdouble dy, y2_max; - glLabelRegion obj_extent; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - g_return_if_fail (!gl_view_is_selection_empty (view) && - !gl_view_is_selection_atomic (view)); - - /* find bottom most edge */ - p = view->selected_object_list; - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - y2_max = obj_extent.y2; - for (p = p->next; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - if ( obj_extent.y2 > y2_max ) y2_max = obj_extent.y2; - } - - /* now adjust the object positions to line up the bottom edges */ - for (p = view->selected_object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dy = y2_max - obj_extent.y2; - gl_label_object_set_position_relative (object, 0.0, dy); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Align selected objects to viertical center of objects. */ -/*****************************************************************************/ -void -gl_view_align_selection_vcenter (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - gdouble dy; - gdouble dymin; - gdouble ysum, yavg; - glLabelRegion obj_extent; - gdouble ycenter; - gint n; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - g_return_if_fail (!gl_view_is_selection_empty (view) && - !gl_view_is_selection_atomic (view)); - - /* find average center of objects */ - ysum = 0.0; - n = 0; - for (p = view->selected_object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - ysum += (obj_extent.y1 + obj_extent.y2) / 2.0; - n++; - } - yavg = ysum / n; - - /* find center of object closest to average center */ - p = view->selected_object_list; - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dymin = fabs (yavg - (obj_extent.y1 + obj_extent.y2)/2.0); - ycenter = (obj_extent.y1 + obj_extent.y2)/2.0; - for (p = p->next; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dy = fabs (yavg - (obj_extent.y1 + obj_extent.y2)/2.0); - if ( dy < dymin ) - { - dymin = dy; - ycenter = (obj_extent.y1 + obj_extent.y2)/2.0; - } - } - - /* now adjust the object positions to line up this center */ - for (p = view->selected_object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - dy = ycenter - (obj_extent.y1 + obj_extent.y2)/2.0; - gl_label_object_set_position_relative (object, 0.0, dy); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Center selected objects to in center of label. */ -/*****************************************************************************/ -void -gl_view_center_selection_horiz (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - gdouble dx; - gdouble x_label_center; - gdouble x_obj_center; - glLabelRegion obj_extent; - gdouble w, h; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - g_return_if_fail (!gl_view_is_selection_empty (view)); - - gl_label_get_size (view->label, &w, &h); - x_label_center = w / 2.0; - - /* adjust the object positions */ - for (p = view->selected_object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - x_obj_center = (obj_extent.x1 + obj_extent.x2) / 2.0; - dx = x_label_center - x_obj_center; - gl_label_object_set_position_relative (object, dx, 0.0); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Center selected objects to in center of label. */ -/*****************************************************************************/ -void -gl_view_center_selection_vert (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - gdouble dy; - gdouble y_label_center; - gdouble y_obj_center; - glLabelRegion obj_extent; - gdouble w, h; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - g_return_if_fail (!gl_view_is_selection_empty (view)); - - gl_label_get_size (view->label, &w, &h); - y_label_center = h / 2.0; - - /* adjust the object positions */ - for (p = view->selected_object_list; p != NULL; p = p->next) - { - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - gl_label_object_get_extent (object, &obj_extent); - y_obj_center = (obj_extent.y1 + obj_extent.y2) / 2.0; - dy = y_label_center - y_obj_center; - gl_label_object_set_position_relative (object, 0.0, dy); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Move selected objects */ -/*****************************************************************************/ -void -gl_view_move_selection (glView *view, - gdouble dx, - gdouble dy) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) - { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_position_relative (object, dx, dy); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Can text properties be set for selection? */ -/*****************************************************************************/ -gboolean -gl_view_can_selection_text (glView *view) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); - - for (p = view->selected_object_list; p != NULL; p = p->next) - { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - if (gl_label_object_can_text (object)) - { - return TRUE; - } - - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Set font family for all text contained in selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_font_family (glView *view, - const gchar *font_family) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_font_family (object, font_family); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Set font size for all text contained in selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_font_size (glView *view, - gdouble font_size) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_font_size (object, font_size); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Set font weight for all text contained in selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_font_weight (glView *view, - PangoWeight font_weight) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_font_weight (object, font_weight); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Set font italic flag for all text contained in selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_font_italic_flag (glView *view, - gboolean font_italic_flag) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_font_italic_flag (object, font_italic_flag); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Set text alignment for all text contained in selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_text_alignment (glView *view, - PangoAlignment text_alignment) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_text_alignment (object, text_alignment); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Set text line spacing for all text contained in selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_text_line_spacing (glView *view, - gdouble text_line_spacing) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_text_line_spacing (object, text_line_spacing); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Set text color for all text contained in selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_text_color (glView *view, - glColorNode *text_color_node) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_text_color (object, text_color_node); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Can fill properties be set for selection? */ -/*****************************************************************************/ -gboolean -gl_view_can_selection_fill (glView *view) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - if (gl_label_object_can_fill (object)) { - return TRUE; - } - - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Set fill color for all selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_fill_color (glView *view, - glColorNode *fill_color_node) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_fill_color (object, fill_color_node); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Can line color properties be set for selection? */ -/*****************************************************************************/ -gboolean -gl_view_can_selection_line_color (glView *view) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - if (gl_label_object_can_line_color (object)) { - return TRUE; - } - - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Set line color for all selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_line_color (glView *view, - glColorNode *line_color_node) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_line_color (object, line_color_node); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Can line width properties be set for selection? */ -/*****************************************************************************/ -gboolean -gl_view_can_selection_line_width (glView *view) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - if (gl_label_object_can_line_width (object)) { - return TRUE; - } - - } - - return FALSE; -} - - -/*****************************************************************************/ -/* Set line width for all selected objects. */ -/*****************************************************************************/ -void -gl_view_set_selection_line_width (glView *view, - gdouble line_width) -{ - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); - gl_label_object_set_line_width (object, line_width); - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* "Cut" selected items and place in clipboard selections. */ -/*****************************************************************************/ -void -gl_view_cut (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - gl_view_copy (view); - gl_view_delete_selection (view); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* "Copy" selected items to clipboard selections. */ -/*****************************************************************************/ -void -gl_view_copy (glView *view) -{ - GList *p; - glViewObject *view_object; - glLabelObject *object; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - if (view->selected_object_list) { - - if ( view->selection_data ) { - g_object_unref (view->selection_data); - } - view->selection_data = GL_LABEL(gl_label_new ()); - gl_label_set_template (view->selection_data, view->label->template); - gl_label_set_rotate_flag (view->selection_data, view->label->rotate_flag); - - for (p = view->selected_object_list; p != NULL; p = p->next) { - - view_object = GL_VIEW_OBJECT (p->data); - object = gl_view_object_get_object (view_object); - - gl_label_object_dup (object, view->selection_data); - - } - - gtk_selection_owner_set (view->invisible, - clipboard_atom, GDK_CURRENT_TIME); - view->have_selection = TRUE; - - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* "Paste" from private clipboard selection. */ -/*****************************************************************************/ -void -gl_view_paste (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - gtk_selection_convert (GTK_WIDGET (view->invisible), - clipboard_atom, GDK_SELECTION_TYPE_STRING, - GDK_CURRENT_TIME); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Zoom in one "notch" */ -/*****************************************************************************/ -void -gl_view_zoom_in (glView *view) -{ - gint i, i_min; - gdouble dist, dist_min; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - /* Find index of current scale (or best match) */ - i_min = 1; /* start with 2nd largest scale */ - dist_min = fabs (zooms[1] - view->zoom); - for (i = 2; i < N_ZOOMS; i++) { - dist = fabs (zooms[i] - view->zoom); - if (dist < dist_min) { - i_min = i; - dist_min = dist; - } - } - - /* zoom in one "notch" */ - i = MAX (0, i_min - 1); - gl_debug (DEBUG_VIEW, "zoom[%d] = %g", i, zooms[i]); - set_zoom_real (view, zooms[i], FALSE); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Zoom out one "notch" */ -/*****************************************************************************/ -void -gl_view_zoom_out (glView *view) -{ - gint i, i_min; - gdouble dist, dist_min; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - /* Find index of current scale (or best match) */ - i_min = 0; /* start with largest scale */ - dist_min = fabs (zooms[0] - view->zoom); - for (i = 1; i < N_ZOOMS; i++) { - dist = fabs (zooms[i] - view->zoom); - if (dist < dist_min) { - i_min = i; - dist_min = dist; - } - } - - /* zoom out one "notch" */ - if (i_min >= N_ZOOMS) - return; - i = i_min + 1; - if (i >= N_ZOOMS) - return; - set_zoom_real (view, zooms[i], FALSE); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*****************************************************************************/ -/* Set zoom to best fit. */ -/*****************************************************************************/ -void -gl_view_zoom_to_fit (glView *view) -{ - gint w_view, h_view; - gdouble w_label, h_label; - gdouble x_scale, y_scale, scale; - - gl_debug (DEBUG_VIEW, ""); - - if ( ! GTK_WIDGET_VISIBLE(view)) { - set_zoom_real (view, 1.0, TRUE); - return; - } - - w_view = GTK_WIDGET(view)->allocation.width; - h_view = GTK_WIDGET(view)->allocation.height; - - gl_label_get_size (GL_LABEL(view->label), &w_label, &h_label); - - gl_debug (DEBUG_VIEW, "View size: %d, %d", w_view, h_view); - gl_debug (DEBUG_VIEW, "Label size: %g, %g", w_label, h_label); - - /* Calculate best scale */ - x_scale = (double)(w_view - ZOOMTOFIT_PAD) / w_label; - y_scale = (double)(h_view - ZOOMTOFIT_PAD) / h_label; - scale = MIN (x_scale, y_scale); - gl_debug (DEBUG_VIEW, "Candidate zooms: %g, %g => %g", x_scale, y_scale, scale); - - /* Limit */ - gl_debug (DEBUG_VIEW, "Scale: %g", scale); - scale = MIN (scale, zooms[0]*view->home_scale); - scale = MAX (scale, zooms[N_ZOOMS-1]*view->home_scale); - gl_debug (DEBUG_VIEW, "Limitted scale: %g", scale); - - set_zoom_real (view, scale/view->home_scale, TRUE); -} - - -/*****************************************************************************/ -/* Set current zoom factor to explicit value. */ -/*****************************************************************************/ -void -gl_view_set_zoom (glView *view, - gdouble zoom) -{ - gl_debug (DEBUG_VIEW, "START"); - - set_zoom_real (view, zoom, FALSE); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Set canvas scale. */ -/*---------------------------------------------------------------------------*/ -static void -set_zoom_real (glView *view, - gdouble zoom, - gboolean zoom_to_fit_flag) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (zoom > 0.0); - - /* Limit, if needed */ - gl_debug (DEBUG_VIEW, "Zoom requested: %g", zoom); - zoom = MIN (zoom, zooms[0]); - zoom = MAX (zoom, zooms[N_ZOOMS-1]); - gl_debug (DEBUG_VIEW, "Limitted zoom: %g", zoom); - - if ( zoom != view->zoom ) { - - view->zoom = zoom; - view->zoom_to_fit_flag = zoom_to_fit_flag; - - gl_view_update (view); - - g_signal_emit (G_OBJECT(view), signals[ZOOM_CHANGED], 0, zoom); - - } - - gl_debug (DEBUG_VIEW, "END"); - -} - - -/*****************************************************************************/ -/* Get current zoom factor. */ -/*****************************************************************************/ -gdouble -gl_view_get_zoom (glView *view) -{ - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (view && GL_IS_VIEW (view), 1.0); - - return view->zoom; -} - - -/*****************************************************************************/ -/* Is this the maximum zoom level. */ -/*****************************************************************************/ -gboolean -gl_view_is_zoom_max (glView *view) -{ - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (GL_IS_VIEW (view), FALSE); - - return view->zoom >= zooms[0]; -} - - -/*****************************************************************************/ -/* Is this the minimum zoom level. */ -/*****************************************************************************/ -gboolean -gl_view_is_zoom_min (glView *view) -{ - gl_debug (DEBUG_VIEW, ""); - - g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); - - return view->zoom <= zooms[N_ZOOMS-1]; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle "selection-clear" signal. */ -/*---------------------------------------------------------------------------*/ -static void -selection_clear_cb (GtkWidget *widget, - GdkEventSelection *event, - glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->have_selection = FALSE; - g_object_unref (view->selection_data); - view->selection_data = NULL; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle "selection-get" signal. */ -/*---------------------------------------------------------------------------*/ -static void -selection_get_cb (GtkWidget *widget, - GtkSelectionData *selection_data, - guint info, - guint time, - glView *view) -{ - gchar *buffer; - glXMLLabelStatus status; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - if (view->have_selection) { - - buffer = gl_xml_label_save_buffer (view->selection_data, - &status); - gtk_selection_data_set (selection_data, - GDK_SELECTION_TYPE_STRING, 8, - (guchar *)buffer, strlen (buffer)); - g_free (buffer); - } - - gl_debug (DEBUG_VIEW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Handle "selection-received" signal. (Result of Paste) */ -/*---------------------------------------------------------------------------*/ -static void -selection_received_cb (GtkWidget *widget, - GtkSelectionData *selection_data, - guint time, - glView *view) -{ - glLabel *label = NULL; - glXMLLabelStatus status; - GList *p, *p_next; - glLabelObject *object, *newobject; - - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - if (selection_data->length < 0) { - return; - } - if (selection_data->type != GDK_SELECTION_TYPE_STRING) { - return; - } - - gl_view_unselect_all (view); - - label = gl_xml_label_open_buffer ((gchar *)selection_data->data, &status); - for (p = label->objects; p != NULL; p = p_next) { - p_next = p->next; - - object = (glLabelObject *) p->data; - newobject = gl_label_object_dup (object, view->label); - - gl_debug (DEBUG_VIEW, "object pasted"); - } - g_object_unref (label); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default font family. */ -/****************************************************************************/ -void -gl_view_set_default_font_family (glView *view, - const gchar *font_family) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - if (view->default_font_family) { - g_free (view->default_font_family); - } - view->default_font_family = g_strdup (font_family); - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default font size. */ -/****************************************************************************/ -void -gl_view_set_default_font_size (glView *view, - gdouble font_size) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->default_font_size = font_size; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default font weight. */ -/****************************************************************************/ -void -gl_view_set_default_font_weight (glView *view, - PangoWeight font_weight) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->default_font_weight = font_weight; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default font italic flag. */ -/****************************************************************************/ -void -gl_view_set_default_font_italic_flag (glView *view, - gboolean font_italic_flag) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->default_font_italic_flag = font_italic_flag; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default text color. */ -/****************************************************************************/ -void -gl_view_set_default_text_color (glView *view, - guint text_color) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->default_text_color = text_color; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default text alignment. */ -/****************************************************************************/ -void -gl_view_set_default_text_alignment (glView *view, - PangoAlignment text_alignment) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->default_text_alignment = text_alignment; - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default text line spacing. */ -/****************************************************************************/ -void -gl_view_set_default_text_line_spacing (glView *view, - gdouble text_line_spacing) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->default_text_line_spacing = text_line_spacing; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default line width. */ -/****************************************************************************/ -void -gl_view_set_default_line_width (glView *view, - gdouble line_width) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->default_line_width = line_width; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default line color. */ -/****************************************************************************/ -void -gl_view_set_default_line_color (glView *view, - guint line_color) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->default_line_color = line_color; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Set default fill color. */ -/****************************************************************************/ -void -gl_view_set_default_fill_color (glView *view, - guint fill_color) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - - view->default_fill_color = fill_color; - - gl_debug (DEBUG_VIEW, "END"); -} - - -/****************************************************************************/ -/* Get default font family. */ -/****************************************************************************/ -gchar * -gl_view_get_default_font_family (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); - - gl_debug (DEBUG_VIEW, "END"); - - return g_strdup (view->default_font_family); -} - - -/****************************************************************************/ -/* Get default font size. */ -/****************************************************************************/ -gdouble -gl_view_get_default_font_size (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), 12.0); - - gl_debug (DEBUG_VIEW, "END"); - - return view->default_font_size; -} - - -/****************************************************************************/ -/* Get default font weight. */ -/****************************************************************************/ -PangoWeight -gl_view_get_default_font_weight (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), PANGO_WEIGHT_NORMAL); - - gl_debug (DEBUG_VIEW, "END"); - - return view->default_font_weight; -} - - -/****************************************************************************/ -/* Get default font italic flag. */ -/****************************************************************************/ -gboolean -gl_view_get_default_font_italic_flag (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); - - gl_debug (DEBUG_VIEW, "END"); - - return view->default_font_italic_flag; -} - - -/****************************************************************************/ -/* Get default text color. */ -/****************************************************************************/ -guint -gl_view_get_default_text_color (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), 0); - - gl_debug (DEBUG_VIEW, "END"); - - return view->default_text_color; -} - - -/****************************************************************************/ -/* Get default text alignment. */ -/****************************************************************************/ -PangoAlignment -gl_view_get_default_text_alignment (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), PANGO_ALIGN_LEFT); - - gl_debug (DEBUG_VIEW, "END"); - - return view->default_text_alignment; -} - - -/****************************************************************************/ -/* Get default text line spacing. */ -/****************************************************************************/ -gdouble -gl_view_get_default_text_line_spacing (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), 1.0); - - gl_debug (DEBUG_VIEW, "END"); - - return view->default_text_line_spacing; -} - - -/****************************************************************************/ -/* Get default line width. */ -/****************************************************************************/ -gdouble -gl_view_get_default_line_width (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), 1.0); - - gl_debug (DEBUG_VIEW, "END"); - - return view->default_line_width; -} - - -/****************************************************************************/ -/* Get default line color. */ -/****************************************************************************/ -guint -gl_view_get_default_line_color (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), 0); - - gl_debug (DEBUG_VIEW, "END"); - - return view->default_line_color; -} - - -/****************************************************************************/ -/* Get default fill color. */ -/****************************************************************************/ -guint -gl_view_get_default_fill_color (glView *view) -{ - gl_debug (DEBUG_VIEW, "START"); - - g_return_val_if_fail (view && GL_IS_VIEW (view), 0); - - gl_debug (DEBUG_VIEW, "END"); - - return view->default_fill_color; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Focus in event handler. */ -/*---------------------------------------------------------------------------*/ -static gboolean -focus_in_event_cb (glView *view, - GdkEventFocus *event) -{ - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (view->canvas), GTK_HAS_FOCUS); - - return FALSE; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Focus out event handler. */ -/*---------------------------------------------------------------------------*/ -static gboolean -focus_out_event_cb (glView *view, - GdkEventFocus *event) -{ - GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (view->canvas), GTK_HAS_FOCUS); - - return FALSE; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Enter notify event handler. */ -/*---------------------------------------------------------------------------*/ -static gboolean -enter_notify_event_cb (glView *view, - GdkEventCrossing *event) -{ - gtk_widget_grab_focus(GTK_WIDGET (view->canvas)); - - return FALSE; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Leave notify event handler. */ -/*---------------------------------------------------------------------------*/ -static gboolean -leave_notify_event_cb (glView *view, - GdkEventCrossing *event) -{ - - g_signal_emit (G_OBJECT(view), signals[POINTER_EXIT], 0); - - return FALSE; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Motion notify event handler. */ -/*---------------------------------------------------------------------------*/ -static gboolean -motion_notify_event_cb (glView *view, - GdkEventMotion *event) -{ - gboolean return_value = FALSE; - cairo_t *cr; - gdouble scale; - gdouble x, y; - GdkCursor *cursor; - glViewObjectHandle handle; - - cr = gdk_cairo_create (GTK_LAYOUT (view->canvas)->bin_window); - - /* - * Translate to label coordinates - */ - scale = view->zoom * view->home_scale; - cairo_scale (cr, scale, scale); - cairo_translate (cr, view->x0, view->y0); - - x = event->x; - y = event->y; - cairo_device_to_user (cr, &x, &y); - - /* - * Emit signal regardless of mode - */ - g_signal_emit (G_OBJECT(view), signals[POINTER_MOVED], 0, x, y); - - /* - * Handle event as appropriate for mode - */ - switch (view->mode) - { - - case GL_VIEW_MODE_ARROW: - switch (view->state) - { - - case GL_VIEW_IDLE: - if ( gl_view_is_selection_atomic (view) && - view_handle_at (view, cr, event->x, event->y, &handle) ) - { - cursor = gdk_cursor_new (GDK_CROSSHAIR); - } - else if (view_view_object_at (view, cr, event->x, event->y)) - { - cursor = gdk_cursor_new (GDK_FLEUR); - } - else - { - cursor = gdk_cursor_new (GDK_LEFT_PTR); - } - gdk_window_set_cursor (view->canvas->window, cursor); - gdk_cursor_unref (cursor); - break; - - case GL_VIEW_ARROW_SELECT_REGION: -#ifdef CLIP_UPDATES - gl_view_update_region (view, cr, &view->select_region); -#endif - view->select_region.x2 = x; - view->select_region.y2 = y; -#ifdef CLIP_UPDATES - gl_view_update_region (view, cr, &view->select_region); -#else - gl_view_update (view); -#endif - break; - - case GL_VIEW_ARROW_MOVE: - gl_view_move_selection (view, - (x - view->move_last_x), - (y - view->move_last_y)); - view->move_last_x = x; - view->move_last_y = y; - break; - - case GL_VIEW_ARROW_RESIZE: - gl_view_object_resize_event (view->resize_object, - view->resize_handle, - view->resize_honor_aspect, - cr, - event->x, - event->y); - break; - - default: - g_message ("Invalid arrow state."); /*Should not happen!*/ - } - return_value = TRUE; - break; - - - case GL_VIEW_MODE_OBJECT_CREATE: - if (view->state != GL_VIEW_IDLE) - { - switch (view->create_type) - { - case GL_LABEL_OBJECT_BOX: - gl_view_box_create_motion_event (view, x, y); - break; - case GL_LABEL_OBJECT_ELLIPSE: - gl_view_ellipse_create_motion_event (view, x, y); - break; - case GL_LABEL_OBJECT_LINE: - gl_view_line_create_motion_event (view, x, y); - break; - case GL_LABEL_OBJECT_IMAGE: - gl_view_image_create_motion_event (view, x, y); - break; - case GL_LABEL_OBJECT_TEXT: - gl_view_text_create_motion_event (view, x, y); - break; - case GL_LABEL_OBJECT_BARCODE: - gl_view_barcode_create_motion_event (view, x, y); - break; - default: - g_message ("Invalid create type."); /*Should not happen!*/ - } - } - break; - - - default: - g_message ("Invalid view mode."); /*Should not happen!*/ - - } - - cairo_destroy (cr); - - /* - * FIXME: we re-establish grabs here if the grab has been lost. We seem to be - * losing grabs when we emit signals that lead to the manipulation of - * the GtkUIManager. Needs more investigation - */ - if (view->grabbed_flag && !gdk_pointer_is_grabbed ()) - { - gdk_pointer_grab (GTK_LAYOUT (view->canvas)->bin_window, - FALSE, - (GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK), - NULL, - NULL, - event->time); - } - - return return_value; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Button press event handler. */ -/*---------------------------------------------------------------------------*/ -static gboolean -button_press_event_cb (glView *view, - GdkEventButton *event) -{ - gboolean return_value = FALSE; - cairo_t *cr; - gdouble scale; - gdouble x, y; - glViewObject *view_object; - glViewObjectHandle handle; - - cr = gdk_cairo_create (GTK_LAYOUT (view->canvas)->bin_window); - - /* - * Translate to label coordinates - */ - scale = view->zoom * view->home_scale; - cairo_scale (cr, scale, scale); - cairo_translate (cr, view->x0, view->y0); - - x = event->x; - y = event->y; - cairo_device_to_user (cr, &x, &y); - - switch (event->button) - { - - case 1: - /* - * Handle event as appropriate for mode - */ - switch (view->mode) - { - case GL_VIEW_MODE_ARROW: - if ( gl_view_is_selection_atomic (view) && - (view_object = view_handle_at (view, cr, event->x, event->y, &handle)) ) - { - view->resize_object = view_object; - view->resize_handle = handle; - view->resize_honor_aspect = event->state & GDK_CONTROL_MASK; - - view->state = GL_VIEW_ARROW_RESIZE; - } - else if ((view_object = view_view_object_at (view, cr, event->x, event->y))) - { - if (event->state & GDK_CONTROL_MASK) - { - if (gl_view_is_object_selected (view, view_object)) - { - /* Un-selecting a selected item */ - gl_view_unselect_object (view, view_object); - } else { - /* Add to current selection */ - gl_view_select_object (view, view_object); - } - } - else - { - if (!gl_view_is_object_selected (view, view_object)) - { - /* remove any selections before adding */ - gl_view_unselect_all (view); - /* Add to current selection */ - gl_view_select_object (view, view_object); - } - } - view->move_last_x = x; - view->move_last_y = y; - - view->state = GL_VIEW_ARROW_MOVE; - } - else - { - if (!(event->state & GDK_CONTROL_MASK)) - { - gl_view_unselect_all (view); - } - - view->select_region_visible = TRUE; - view->select_region.x1 = x; - view->select_region.y1 = y; - view->select_region.x2 = x; - view->select_region.y2 = y; - - view->state = GL_VIEW_ARROW_SELECT_REGION; - } - - - return_value = TRUE; - break; - - case GL_VIEW_MODE_OBJECT_CREATE: - switch (view->create_type) - { - case GL_LABEL_OBJECT_BOX: - gl_view_box_create_button_press_event (view, x, y); - break; - case GL_LABEL_OBJECT_ELLIPSE: - gl_view_ellipse_create_button_press_event (view, x, y); - break; - case GL_LABEL_OBJECT_LINE: - gl_view_line_create_button_press_event (view, x, y); - break; - case GL_LABEL_OBJECT_IMAGE: - gl_view_image_create_button_press_event (view, x, y); - break; - case GL_LABEL_OBJECT_TEXT: - gl_view_text_create_button_press_event (view, x, y); - break; - case GL_LABEL_OBJECT_BARCODE: - gl_view_barcode_create_button_press_event (view, x, y); - break; - default: - g_message ("Invalid create type."); /*Should not happen!*/ - } - view->state = GL_VIEW_CREATE_DRAG; - return_value = TRUE; - break; - - default: - g_message ("Invalid view mode."); /*Should not happen!*/ - } - - view->grabbed_flag = TRUE; - gdk_pointer_grab (GTK_LAYOUT (view->canvas)->bin_window, - FALSE, - (GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK), - NULL, - NULL, - event->time); - break; - - case 3: - g_signal_emit (G_OBJECT (view), - signals[CONTEXT_MENU_ACTIVATE], 0, - event->button, event->time); - return_value = TRUE; - break; - - } - - cairo_destroy (cr); - - return return_value; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Button release event handler. */ -/*---------------------------------------------------------------------------*/ -static gboolean -button_release_event_cb (glView *view, - GdkEventButton *event) -{ - gboolean return_value = FALSE; - cairo_t *cr; - gdouble scale; - gdouble x, y; - GdkCursor *cursor; - - cr = gdk_cairo_create (GTK_LAYOUT (view->canvas)->bin_window); - - /* - * Translate to label coordinates - */ - scale = view->zoom * view->home_scale; - cairo_scale (cr, scale, scale); - cairo_translate (cr, view->x0, view->y0); - - x = event->x; - y = event->y; - cairo_device_to_user (cr, &x, &y); - - switch (event->button) - { - - case 1: - view->grabbed_flag = FALSE; - gdk_pointer_ungrab (event->time); - /* - * Handle event as appropriate for mode - */ - switch (view->mode) - { - case GL_VIEW_MODE_ARROW: - switch (view->state) - { - case GL_VIEW_ARROW_RESIZE: - view->resize_object = NULL; - - view->state = GL_VIEW_IDLE; - break; - - case GL_VIEW_ARROW_SELECT_REGION: -#ifdef CLIP_UPDATES - gl_view_update_region (view, cr, &view->select_region); -#else - gl_view_update (view); -#endif - - view->select_region_visible = FALSE; - view->select_region.x2 = x; - view->select_region.y2 = y; - - gl_view_select_region (view, &view->select_region); - - view->state = GL_VIEW_IDLE; - break; - - default: - view->state = GL_VIEW_IDLE; - break; - - } - - return_value = TRUE; - break; - - - case GL_VIEW_MODE_OBJECT_CREATE: - switch (view->create_type) - { - case GL_LABEL_OBJECT_BOX: - gl_view_box_create_button_release_event (view, x, y); - break; - case GL_LABEL_OBJECT_ELLIPSE: - gl_view_ellipse_create_button_release_event (view, x, y); - break; - case GL_LABEL_OBJECT_LINE: - gl_view_line_create_button_release_event (view, x, y); - break; - case GL_LABEL_OBJECT_IMAGE: - gl_view_image_create_button_release_event (view, x, y); - break; - case GL_LABEL_OBJECT_TEXT: - gl_view_text_create_button_release_event (view, x, y); - break; - case GL_LABEL_OBJECT_BARCODE: - gl_view_barcode_create_button_release_event (view, x, y); - break; - default: - g_message ("Invalid create type."); /*Should not happen!*/ - } - view->mode = GL_VIEW_MODE_ARROW; - view->state = GL_VIEW_IDLE; - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (view->canvas->window, cursor); - gdk_cursor_unref (cursor); - break; - - - default: - g_message ("Invalid view mode."); /*Should not happen!*/ - } - - } - - cairo_destroy (cr); - - return return_value; -} - - -/*---------------------------------------------------------------------------*/ -/* PRIVATE. Key press event handler. */ -/*---------------------------------------------------------------------------*/ -static gboolean -key_press_event_cb (glView *view, - GdkEventKey *event) -{ - GdkCursor *cursor; - - gl_debug (DEBUG_VIEW, ""); - - if ( (view->mode == GL_VIEW_MODE_ARROW) && - (view->state == GL_VIEW_IDLE) ) - { - switch (event->keyval) { - - case GDK_Left: - case GDK_KP_Left: - gl_view_move_selection (view, -1.0 / (view->zoom), 0.0); - break; - case GDK_Up: - case GDK_KP_Up: - gl_view_move_selection (view, 0.0, -1.0 / (view->zoom)); - break; - case GDK_Right: - case GDK_KP_Right: - gl_view_move_selection (view, 1.0 / (view->zoom), 0.0); - break; - case GDK_Down: - case GDK_KP_Down: - gl_view_move_selection (view, 0.0, 1.0 / (view->zoom)); - break; - case GDK_Delete: - case GDK_KP_Delete: - gl_view_delete_selection (view); - cursor = gdk_cursor_new (GDK_LEFT_PTR); - gdk_window_set_cursor (GTK_WIDGET (view->canvas)->window -, cursor); - gdk_cursor_unref (cursor); - break; - default: - return FALSE; - - } - } - return TRUE; /* We handled this or we were dragging. */ -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/view.h b/glabels2/src/view.h deleted file mode 100644 index 54d4b4f1..00000000 --- a/glabels2/src/view.h +++ /dev/null @@ -1,368 +0,0 @@ -/* - * view.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __VIEW_H__ -#define __VIEW_H__ - -#include - -#include "label-object.h" - -typedef enum { - GL_VIEW_MODE_ARROW, - GL_VIEW_MODE_OBJECT_CREATE -} glViewMode; - -typedef enum { - GL_VIEW_IDLE = 0, - GL_VIEW_ARROW_SELECT_REGION, - GL_VIEW_ARROW_MOVE, - GL_VIEW_ARROW_RESIZE, - GL_VIEW_CREATE_DRAG, -} glViewState; - -#define GL_TYPE_VIEW (gl_view_get_type ()) -#define GL_VIEW(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_VIEW, glView )) -#define GL_VIEW_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW, glViewClass)) -#define GL_IS_VIEW(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW)) -#define GL_IS_VIEW_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW)) - -typedef struct _glView glView; -typedef struct _glViewClass glViewClass; - -#include "view-object.h" -#include "color.h" - -struct _glView { - GtkVBox parent_widget; - - glLabel *label; - - GtkWidget *canvas; - gdouble zoom; - gboolean zoom_to_fit_flag; - gdouble home_scale; - gdouble x0, y0; - gdouble w, h; - - gboolean update_scheduled_flag; - gboolean grid_visible; - gdouble grid_spacing; - - gboolean markup_visible; - - glViewMode mode; - glLabelObjectType create_type; - glViewState state; - gboolean grabbed_flag; - - /* GL_VIEW_ARROW_MOVE state */ - gdouble move_last_x; - gdouble move_last_y; - - /* GL_VIEW_ARROW_SELECT_REGION state */ - gboolean select_region_visible; - glLabelRegion select_region; - - /* GL_VIEW_ARROW_RESIZE state */ - glViewObject *resize_object; - glViewObjectHandle resize_handle; - gboolean resize_honor_aspect; - - /* GL_VIEW_CREATE_DRAG state */ - glLabelObject *create_object; - gdouble create_x0; - gdouble create_y0; - - GList *object_list; /* glViewObjects */ - GList *selected_object_list; /* glViewObjects */ - - /* Clipboard selection stuff */ - gint have_selection; - glLabel *selection_data; - GtkWidget *invisible; - - /* Default object text properties */ - gchar *default_font_family; - gdouble default_font_size; - PangoWeight default_font_weight; - gboolean default_font_italic_flag; - guint default_text_color; - PangoAlignment default_text_alignment; - gdouble default_text_line_spacing; - - /* Default object line properties */ - gdouble default_line_width; - guint default_line_color; - - /* Default object fill properties */ - guint default_fill_color; - -}; - -struct _glViewClass { - GtkVBoxClass parent_class; - - /* Selection changed signal */ - void (*selection_changed) (glView *view, - gpointer user_data); - - /* Signal to launch a context menu */ - void (*context_menu_activate) (glView *view, - gint button, - guint32 activate_time, - gpointer user_data); - - /* Signals to support a status bar */ - void (*zoom_changed) (glView *view, - gdouble zoom, - gpointer user_data); - void (*pointer_moved) (glView *view, - gdouble x, - gdouble y, - gpointer user_data); - void (*pointer_exit) (glView *view, - gpointer user_data); - void (*mode_changed) (glView *view, - gpointer user_data); -}; - -G_BEGIN_DECLS - -GType gl_view_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_view_new (glLabel *label); - - -void gl_view_update (glView *view); - -void gl_view_update_region (glView *view, - cairo_t *cr, - glLabelRegion *region); - -void gl_view_show_grid (glView *view); - -void gl_view_hide_grid (glView *view); - -void gl_view_set_grid_spacing (glView *view, - gdouble spacing); - -void gl_view_show_markup (glView *view); - -void gl_view_hide_markup (glView *view); - -void gl_view_arrow_mode (glView *view); - -void gl_view_object_create_mode (glView *view, - glLabelObjectType type); - - -void gl_view_select_object (glView *view, - glViewObject *view_object); - -void gl_view_unselect_object (glView *view, - glViewObject *view_object); - -void gl_view_select_all (glView *view); - -void gl_view_unselect_all (glView *view); - -void gl_view_select_region (glView *view, - glLabelRegion *region); - -gboolean gl_view_is_object_selected (glView *view, - glViewObject *view_object); - -gboolean gl_view_is_selection_empty (glView *view); - -gboolean gl_view_is_selection_atomic (glView *view); - -void gl_view_delete_selection (glView *view); - -GtkWidget *gl_view_get_editor (glView *view); - -void gl_view_raise_selection (glView *view); - -void gl_view_lower_selection (glView *view); - -void gl_view_rotate_selection (glView *view, - gdouble theta_degs); - -void gl_view_rotate_selection_left (glView *view); - -void gl_view_rotate_selection_right (glView *view); - -void gl_view_flip_selection_horiz (glView *view); - -void gl_view_flip_selection_vert (glView *view); - -void gl_view_align_selection_left (glView *view); - -void gl_view_align_selection_right (glView *view); - -void gl_view_align_selection_hcenter (glView *view); - -void gl_view_align_selection_top (glView *view); - -void gl_view_align_selection_bottom (glView *view); - -void gl_view_align_selection_vcenter (glView *view); - -void gl_view_center_selection_horiz (glView *view); - -void gl_view_center_selection_vert (glView *view); - -void gl_view_move_selection (glView *view, - gdouble dx, - gdouble dy); - -gboolean gl_view_can_selection_text (glView *view); - -void gl_view_set_selection_font_family (glView *view, - const gchar *font_family); - -void gl_view_set_selection_font_size (glView *view, - gdouble font_size); - -void gl_view_set_selection_font_weight (glView *view, - PangoWeight font_weight); - -void gl_view_set_selection_text_line_spacing (glView *view, - gdouble text_line_spacing); - -void gl_view_set_selection_font_italic_flag (glView *view, - gboolean font_italic_flag); - -void gl_view_set_selection_text_alignment (glView *view, - PangoAlignment text_alignment); - -void gl_view_set_selection_text_color (glView *view, - glColorNode *text_color_node); - -gboolean gl_view_can_selection_fill (glView *view); - -void gl_view_set_selection_fill_color (glView *view, - glColorNode *fill_color); - -gboolean gl_view_can_selection_line_color (glView *view); - -void gl_view_set_selection_line_color (glView *view, - glColorNode *line_color_node); - -gboolean gl_view_can_selection_line_width (glView *view); - -void gl_view_set_selection_line_width (glView *view, - gdouble line_width); - - -void gl_view_cut (glView *view); - -void gl_view_copy (glView *view); - -void gl_view_paste (glView *view); - - -void gl_view_zoom_in (glView *view); - -void gl_view_zoom_out (glView *view); - -void gl_view_zoom_to_fit (glView *view); - -void gl_view_set_zoom (glView *view, - gdouble zoom); - -gdouble gl_view_get_zoom (glView *view); - -gboolean gl_view_is_zoom_max (glView *view); - -gboolean gl_view_is_zoom_min (glView *view); - - -void gl_view_set_default_font_family (glView *view, - const gchar *font_family); - -void gl_view_set_default_font_size (glView *view, - gdouble font_size); - -void gl_view_set_default_font_weight (glView *view, - PangoWeight font_weight); - -void gl_view_set_default_font_italic_flag (glView *view, - gboolean font_italic_flag); - -void gl_view_set_default_text_color (glView *view, - guint text_color); - -void gl_view_set_default_text_alignment (glView *view, - PangoAlignment text_alignment); - -void gl_view_set_default_line_width (glView *view, - gdouble line_width); - -void gl_view_set_default_line_color (glView *view, - guint line_color); - -void gl_view_set_default_fill_color (glView *view, - guint fill_color); -void gl_view_set_default_text_line_spacing (glView *view, - gdouble text_line_spacing); - - - -gchar *gl_view_get_default_font_family (glView *view); - -gdouble gl_view_get_default_font_size (glView *view); - -PangoWeight gl_view_get_default_font_weight (glView *view); - -gboolean gl_view_get_default_font_italic_flag (glView *view); - -guint gl_view_get_default_text_color (glView *view); - -PangoAlignment gl_view_get_default_text_alignment (glView *view); - -gdouble gl_view_get_default_text_line_spacing (glView *view); - -gdouble gl_view_get_default_line_width (glView *view); - -guint gl_view_get_default_line_color (glView *view); - -guint gl_view_get_default_fill_color (glView *view); - - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/warning-handler.c b/glabels2/src/warning-handler.c deleted file mode 100644 index 8f5f1b7a..00000000 --- a/glabels2/src/warning-handler.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * warning-handler.c - * Copyright (C) 2005-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "warning-handler.h" - -#include -#include -#include -#include - -static void warning_handler (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer user_data); - - -/***************************************************************************/ -/* Initialize error handler. */ -/***************************************************************************/ -void -gl_warning_handler_init (void) -{ - g_log_set_handler ("LibGlabels", - G_LOG_LEVEL_WARNING, - warning_handler, - "libglabels"); - - g_log_set_handler (G_LOG_DOMAIN, - G_LOG_LEVEL_WARNING, - warning_handler, - "glabels"); -} - - -/*-------------------------------------------------------------------------*/ -/* PRIVATE. Actual error handler. */ -/*-------------------------------------------------------------------------*/ -static void -warning_handler (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer user_data) -{ - GtkWidget *dialog; - - dialog = gtk_message_dialog_new (NULL, - GTK_DIALOG_MODAL, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_CLOSE, - _("gLabels Error!")); - gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), - "%s", message); - - gtk_dialog_run (GTK_DIALOG (dialog)); - - gtk_widget_destroy (GTK_WIDGET (dialog)); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/warning-handler.h b/glabels2/src/warning-handler.h deleted file mode 100644 index e7f51d0f..00000000 --- a/glabels2/src/warning-handler.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * warning-handler.h - * Copyright (C) 2005-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __WARNING_HANDLER_H__ -#define __WARNING_HANDLER_H__ - -#include - -G_BEGIN_DECLS - -void gl_warning_handler_init (void); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/wdgt-chain-button.c b/glabels2/src/wdgt-chain-button.c deleted file mode 100644 index e6cfdfe3..00000000 --- a/glabels2/src/wdgt-chain-button.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * wdgt-chain-button.c - * Modified version of gimpchainbutton.h for gLabels: - * - * LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpchainbutton.h - * Copyright (C) 1999-2000 Sven Neumann - * - * Modified or gLabels by Jim Evins - * - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include "wdgt-chain-button.h" - -#include - -#include "stock.h" - - -enum -{ - TOGGLED, - LAST_SIGNAL -}; - - -static void gl_wdgt_chain_button_clicked_callback (GtkWidget *widget, - glWdgtChainButton *button); -static gboolean gl_wdgt_chain_button_draw_lines (GtkWidget *widget, - GdkEventExpose *eevent, - glWdgtChainButton *button); - - -static const gchar *gl_wdgt_chain_stock_items[] = -{ - GL_STOCK_HCHAIN, - GL_STOCK_HCHAIN_BROKEN, - GL_STOCK_VCHAIN, - GL_STOCK_VCHAIN_BROKEN -}; - - -static guint gl_wdgt_chain_button_signals[LAST_SIGNAL] = { 0 }; - - - -G_DEFINE_TYPE (glWdgtChainButton, gl_wdgt_chain_button, GTK_TYPE_TABLE); - - -static void -gl_wdgt_chain_button_class_init (glWdgtChainButtonClass *class) -{ - gl_wdgt_chain_button_parent_class = g_type_class_peek_parent (class); - - gl_wdgt_chain_button_signals[TOGGLED] = - g_signal_new ("toggled", - G_TYPE_FROM_CLASS (class), - G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (glWdgtChainButtonClass, toggled), - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - class->toggled = NULL; -} - -static void -gl_wdgt_chain_button_init (glWdgtChainButton *button) -{ - button->position = GL_WDGT_CHAIN_TOP; - button->active = FALSE; - - button->line1 = gtk_drawing_area_new (); - button->line2 = gtk_drawing_area_new (); - button->image = gtk_image_new (); - - button->button = gtk_button_new (); - - gtk_button_set_relief (GTK_BUTTON (button->button), GTK_RELIEF_NONE); - gtk_container_add (GTK_CONTAINER (button->button), button->image); - gtk_widget_show (button->image); - - g_signal_connect (button->button, "clicked", - G_CALLBACK (gl_wdgt_chain_button_clicked_callback), - button); - g_signal_connect (button->line1, "expose_event", - G_CALLBACK (gl_wdgt_chain_button_draw_lines), - button); - g_signal_connect (button->line2, "expose_event", - G_CALLBACK (gl_wdgt_chain_button_draw_lines), - button); -} - - -/** - * gl_wdgt_chain_button_new: - * @position: The position you are going to use for the button - * with respect to the widgets you want to chain. - * - * Creates a new #glWdgtChainButton widget. - * - * This returns a button showing either a broken or a linked chain and - * small clamps attached to both sides that visually group the two widgets - * you want to connect. This widget looks best when attached - * to a table taking up two columns (or rows respectively) next - * to the widgets that it is supposed to connect. It may work - * for more than two widgets, but the look is optimized for two. - * - * Returns: Pointer to the new #glWdgtChainButton, which is inactive - * by default. Use gl_wdgt_chain_button_set_active() to - * change its state. - */ -GtkWidget * -gl_wdgt_chain_button_new (glWdgtChainPosition position) -{ - glWdgtChainButton *button; - - button = g_object_new (GL_WDGT_TYPE_CHAIN_BUTTON, NULL); - - button->position = position; - - gtk_image_set_from_stock - (GTK_IMAGE (button->image), - gl_wdgt_chain_stock_items[((position & GL_WDGT_CHAIN_LEFT) << 1) + ! button->active], - GTK_ICON_SIZE_BUTTON); - - if (position & GL_WDGT_CHAIN_LEFT) /* are we a vertical chainbutton? */ - { - gtk_table_resize (GTK_TABLE (button), 3, 1); - gtk_table_attach (GTK_TABLE (button), button->button, 0, 1, 1, 2, - GTK_SHRINK, GTK_SHRINK, 0, 0); - gtk_table_attach_defaults (GTK_TABLE (button), - button->line1, 0, 1, 0, 1); - gtk_table_attach_defaults (GTK_TABLE (button), - button->line2, 0, 1, 2, 3); - } - else - { - gtk_table_resize (GTK_TABLE (button), 1, 3); - gtk_table_attach (GTK_TABLE (button), button->button, 1, 2, 0, 1, - GTK_SHRINK, GTK_SHRINK, 0, 0); - gtk_table_attach_defaults (GTK_TABLE (button), - button->line1, 0, 1, 0, 1); - gtk_table_attach_defaults (GTK_TABLE (button), - button->line2, 2, 3, 0, 1); - } - - gtk_widget_show (button->button); - gtk_widget_show (button->line1); - gtk_widget_show (button->line2); - - return GTK_WIDGET (button); -} - -/** - * gl_wdgt_chain_button_set_active: - * @button: Pointer to a #glWdgtChainButton. - * @active: The new state. - * - * Sets the state of the #glWdgtChainButton to be either locked (%TRUE) or - * unlocked (%FALSE) and changes the showed pixmap to reflect the new state. - */ -void -gl_wdgt_chain_button_set_active (glWdgtChainButton *button, - gboolean active) -{ - g_return_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button)); - - if (button->active != active) - { - guint num; - - button->active = active ? TRUE : FALSE; - - num = ((button->position & GL_WDGT_CHAIN_LEFT) << 1) + (active ? 0 : 1); - - gtk_image_set_from_stock (GTK_IMAGE (button->image), - gl_wdgt_chain_stock_items[num], - GTK_ICON_SIZE_BUTTON); - } -} - -/** - * gl_wdgt_chain_button_get_active - * @button: Pointer to a #glWdgtChainButton. - * - * Checks the state of the #glWdgtChainButton. - * - * Returns: %TRUE if the #glWdgtChainButton is active (locked). - */ -gboolean -gl_wdgt_chain_button_get_active (glWdgtChainButton *button) -{ - g_return_val_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button), FALSE); - - return button->active; -} - -static void -gl_wdgt_chain_button_clicked_callback (GtkWidget *widget, - glWdgtChainButton *button) -{ - g_return_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button)); - - gl_wdgt_chain_button_set_active (button, ! button->active); - - g_signal_emit (button, gl_wdgt_chain_button_signals[TOGGLED], 0); -} - -static gboolean -gl_wdgt_chain_button_draw_lines (GtkWidget *widget, - GdkEventExpose *eevent, - glWdgtChainButton *button) -{ - GdkPoint points[3]; - GdkPoint buf; - GtkShadowType shadow; - glWdgtChainPosition position; - gint which_line; - -#define SHORT_LINE 4 - /* don't set this too high, there's no check against drawing outside - the widgets bounds yet (and probably never will be) */ - - g_return_val_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button), FALSE); - - points[0].x = widget->allocation.width / 2; - points[0].y = widget->allocation.height / 2; - - which_line = (widget == button->line1) ? 1 : -1; - - position = button->position; - - if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) - switch (position) - { - case GL_WDGT_CHAIN_LEFT: - position = GL_WDGT_CHAIN_RIGHT; - break; - case GL_WDGT_CHAIN_RIGHT: - position = GL_WDGT_CHAIN_LEFT; - break; - default: - break; - } - - switch (position) - { - case GL_WDGT_CHAIN_LEFT: - points[0].x += SHORT_LINE; - points[1].x = points[0].x - SHORT_LINE; - points[1].y = points[0].y; - points[2].x = points[1].x; - points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0; - shadow = GTK_SHADOW_ETCHED_IN; - break; - case GL_WDGT_CHAIN_RIGHT: - points[0].x -= SHORT_LINE; - points[1].x = points[0].x + SHORT_LINE; - points[1].y = points[0].y; - points[2].x = points[1].x; - points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0; - shadow = GTK_SHADOW_ETCHED_OUT; - break; - case GL_WDGT_CHAIN_TOP: - points[0].y += SHORT_LINE; - points[1].x = points[0].x; - points[1].y = points[0].y - SHORT_LINE; - points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0; - points[2].y = points[1].y; - shadow = GTK_SHADOW_ETCHED_OUT; - break; - case GL_WDGT_CHAIN_BOTTOM: - points[0].y -= SHORT_LINE; - points[1].x = points[0].x; - points[1].y = points[0].y + SHORT_LINE; - points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0; - points[2].y = points[1].y; - shadow = GTK_SHADOW_ETCHED_IN; - break; - default: - return FALSE; - } - - if ( ((shadow == GTK_SHADOW_ETCHED_OUT) && (which_line == -1)) || - ((shadow == GTK_SHADOW_ETCHED_IN) && (which_line == 1)) ) - { - buf = points[0]; - points[0] = points[2]; - points[2] = buf; - } - - gtk_paint_polygon (widget->style, - widget->window, - GTK_STATE_NORMAL, - shadow, - &eevent->area, - widget, - "chainbutton", - points, - 3, - FALSE); - - return TRUE; -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/wdgt-chain-button.h b/glabels2/src/wdgt-chain-button.h deleted file mode 100644 index 3af93a00..00000000 --- a/glabels2/src/wdgt-chain-button.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * wdgt-chain-button.h - * Modified version of gimpchainbutton.h for gLabels: - * - * LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball - * - * gimpchainbutton.h - * Copyright (C) 1999-2000 Sven Neumann - * - * Modified or gLabels by Jim Evins - * - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -/* - * This implements a widget derived from GtkTable that visualizes - * it's state with two different pixmaps showing a closed and a - * broken chain. It's intented to be used with the GimpSizeEntry - * widget. The usage is quite similar to the one the GtkToggleButton - * provides. - */ - -#ifndef __WDGT_CHAIN_BUTTON_H__ -#define __WDGT_CHAIN_BUTTON_H__ - -#include - -G_BEGIN_DECLS - - -typedef enum -{ - GL_WDGT_CHAIN_TOP, - GL_WDGT_CHAIN_LEFT, - GL_WDGT_CHAIN_BOTTOM, - GL_WDGT_CHAIN_RIGHT -} glWdgtChainPosition; - - -#define GL_WDGT_TYPE_CHAIN_BUTTON (gl_wdgt_chain_button_get_type ()) -#define GL_WDGT_CHAIN_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_WDGT_TYPE_CHAIN_BUTTON, glWdgtChainButton)) -#define GL_WDGT_CHAIN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_WDGT_TYPE_CHAIN_BUTTON, glWdgtChainButtonClass)) -#define GL_WDGT_IS_CHAIN_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_WDGT_TYPE_CHAIN_BUTTON)) -#define GL_WDGT_IS_CHAIN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_WDGT_TYPE_CHAIN_BUTTON)) -#define GL_WDGT_CHAIN_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_WDGT_TYPE_CHAIN_BUTTON, glWdgtChainButtonClass)) - - -typedef struct _glWdgtChainButton glWdgtChainButton; -typedef struct _glWdgtChainButtonClass glWdgtChainButtonClass; - -struct _glWdgtChainButton -{ - GtkTable parent_instance; - - glWdgtChainPosition position; - gboolean active; - - GtkWidget *button; - GtkWidget *line1; - GtkWidget *line2; - GtkWidget *image; -}; - -struct _glWdgtChainButtonClass -{ - GtkTableClass parent_class; - - void (* toggled) (glWdgtChainButton *button); -}; - - -GType gl_wdgt_chain_button_get_type (void) G_GNUC_CONST; - -GtkWidget * gl_wdgt_chain_button_new (glWdgtChainPosition position); - -void gl_wdgt_chain_button_set_active (glWdgtChainButton *button, - gboolean active); -gboolean gl_wdgt_chain_button_get_active (glWdgtChainButton *button); - - -G_END_DECLS - -#endif /* __WDGT_CHAIN_BUTTON_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/wdgt-media-select.c b/glabels2/src/wdgt-media-select.c deleted file mode 100644 index 0ad67804..00000000 --- a/glabels2/src/wdgt-media-select.c +++ /dev/null @@ -1,901 +0,0 @@ -/* - * wdgt-media-select.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "wdgt-media-select.h" - -#include -#include -#include - -#include -#include "mini-preview-pixbuf-cache.h" -#include "prefs.h" -#include "str-util.h" -#include "combo-util.h" -#include "builder-util.h" -#include "color.h" -#include "marshal.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - -enum { - NAME_COLUMN, - PREVIEW_COLUMN, - PREVIEW_COLUMN_STOCK, - PREVIEW_COLUMN_STOCK_SIZE, - DESCRIPTION_COLUMN, - N_COLUMNS -}; - -struct _glWdgtMediaSelectPrivate { - - GtkBuilder *builder; - - GtkWidget *notebook; - guint current_page_num; - - gint recent_page_num; - GtkWidget *recent_tab_vbox; - GtkWidget *recent_treeview; - GtkListStore *recent_store; - - gint search_all_page_num; - GtkWidget *search_all_tab_vbox; - GtkWidget *brand_combo; - GtkWidget *page_size_combo; - GtkWidget *category_combo; - GtkWidget *search_all_treeview; - GtkListStore *search_all_store; - - /* Prevent recursion */ - gboolean stop_signals; -}; - -enum { - CHANGED, - LAST_SIGNAL -}; - -typedef void (*glWdgtMediaSelectSignal) (GObject * object, gpointer data); - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static gint wdgt_media_select_signals[LAST_SIGNAL] = { 0 }; - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_wdgt_media_select_finalize (GObject *object); - -static void gl_wdgt_media_select_construct (glWdgtMediaSelect *media_select); - -static void filter_changed_cb (GtkComboBox *combo, - gpointer user_data); -static void selection_changed_cb (GtkTreeSelection *selection, - gpointer user_data); -static void page_changed_cb (GtkNotebook *notebook, - GtkNotebookPage *page, - guint page_num, - gpointer user_data); - -static gchar *get_layout_desc (const lglTemplate *template); -static gchar *get_label_size_desc (const lglTemplate *template); -static void load_recent_list (GtkListStore *store, - GtkTreeSelection *selection, - GSList *list); -static void load_search_all_list (GtkListStore *store, - GtkTreeSelection *selection, - GList *list); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glWdgtMediaSelect, gl_wdgt_media_select, GTK_TYPE_VBOX); - - -static void -gl_wdgt_media_select_class_init (glWdgtMediaSelectClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - gl_wdgt_media_select_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_wdgt_media_select_finalize; - - wdgt_media_select_signals[CHANGED] = - g_signal_new ("changed", - G_OBJECT_CLASS_TYPE(object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glWdgtMediaSelectClass, changed), - NULL, NULL, - gl_marshal_VOID__VOID, - G_TYPE_NONE, 0); - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -static void -gl_wdgt_media_select_init (glWdgtMediaSelect *media_select) -{ - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - media_select->priv = g_new0 (glWdgtMediaSelectPrivate, 1); - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -static void -gl_wdgt_media_select_finalize (GObject *object) -{ - glWdgtMediaSelect *media_select = GL_WDGT_MEDIA_SELECT (object); - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_WDGT_MEDIA_SELECT (object)); - - if (media_select->priv->builder) - { - g_object_unref (media_select->priv->builder); - } - g_object_unref (media_select->priv->recent_store); - g_object_unref (media_select->priv->search_all_store); - g_free (media_select->priv); - - G_OBJECT_CLASS (gl_wdgt_media_select_parent_class)->finalize (object); - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -GtkWidget * -gl_wdgt_media_select_new (void) -{ - glWdgtMediaSelect *media_select; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - media_select = g_object_new (gl_wdgt_media_select_get_type (), NULL); - - gl_wdgt_media_select_construct (media_select); - - gl_debug (DEBUG_MEDIA_SELECT, "END"); - - return GTK_WIDGET (media_select); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Construct composite widget. */ -/*--------------------------------------------------------------------------*/ -static void -gl_wdgt_media_select_construct (glWdgtMediaSelect *media_select) -{ - GtkBuilder *builder; - static gchar *object_ids[] = { "wdgt_media_select_hbox", NULL }; - GError *error = NULL; - GtkWidget *hbox; - GList *brands = NULL; - GList *page_sizes = NULL; - GList *categories = NULL; - GList *search_all_names = NULL; - const gchar *page_size_id; - gchar *page_size_name; - GtkCellRenderer *renderer; - GtkTreeViewColumn *column; - GtkTreeSelection *recent_selection; - GtkTreeSelection *search_all_selection; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - g_return_if_fail (GL_IS_WDGT_MEDIA_SELECT (media_select)); - g_return_if_fail (media_select->priv != NULL); - - builder = gtk_builder_new (); - gtk_builder_add_objects_from_file (builder, - GLABELS_BUILDER_DIR "wdgt-media-select.builder", - object_ids, - &error); - if (error) { - g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); - g_error_free (error); - return; - } - - gl_builder_util_get_widgets (builder, - "wdgt_media_select_hbox", &hbox, - "notebook", &media_select->priv->notebook, - - "recent_tab_vbox", &media_select->priv->recent_tab_vbox, - - "recent_treeview", &media_select->priv->recent_treeview, - "search_all_tab_vbox", &media_select->priv->search_all_tab_vbox, - "brand_combo", &media_select->priv->brand_combo, - "page_size_combo", &media_select->priv->page_size_combo, - "category_combo", &media_select->priv->category_combo, - "search_all_treeview", &media_select->priv->search_all_treeview, - NULL); - - gtk_container_add (GTK_CONTAINER (media_select), hbox); - media_select->priv->builder = builder; - - media_select->priv->recent_page_num = - gtk_notebook_page_num (GTK_NOTEBOOK (media_select->priv->notebook), - media_select->priv->recent_tab_vbox); - media_select->priv->search_all_page_num = - gtk_notebook_page_num (GTK_NOTEBOOK (media_select->priv->notebook), - media_select->priv->search_all_tab_vbox); - - /* Recent templates treeview */ - media_select->priv->recent_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING); - gtk_tree_view_set_model (GTK_TREE_VIEW (media_select->priv->recent_treeview), - GTK_TREE_MODEL (media_select->priv->recent_store)); - renderer = gtk_cell_renderer_pixbuf_new (); - column = gtk_tree_view_column_new_with_attributes ("", renderer, - "pixbuf", PREVIEW_COLUMN, - "stock-id", PREVIEW_COLUMN_STOCK, - "stock-size", PREVIEW_COLUMN_STOCK_SIZE, - NULL); - gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); - gtk_tree_view_append_column (GTK_TREE_VIEW (media_select->priv->recent_treeview), column); - renderer = gtk_cell_renderer_text_new (); - column = gtk_tree_view_column_new_with_attributes ("", renderer, - "markup", DESCRIPTION_COLUMN, - NULL); - gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); - gtk_tree_view_append_column (GTK_TREE_VIEW (media_select->priv->recent_treeview), column); - recent_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->recent_treeview)); - load_recent_list (media_select->priv->recent_store, recent_selection, gl_prefs->recent_templates); - - page_size_id = gl_prefs_get_page_size (); - page_size_name = lgl_db_lookup_paper_name_from_id (page_size_id); - - /* Brand selection control */ - gl_combo_util_add_text_model (GTK_COMBO_BOX (media_select->priv->brand_combo)); - brands = lgl_db_get_brand_list (NULL, NULL); - brands = g_list_prepend (brands, g_strdup (_("Any"))); - gl_combo_util_set_strings (GTK_COMBO_BOX (media_select->priv->brand_combo), brands); - lgl_db_free_brand_list (brands); - gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->brand_combo), - _("Any")); - - /* Page size selection control */ - gl_combo_util_add_text_model (GTK_COMBO_BOX (media_select->priv->page_size_combo)); - page_sizes = lgl_db_get_paper_name_list (); - page_sizes = g_list_prepend (page_sizes, g_strdup (_("Any"))); - gl_combo_util_set_strings (GTK_COMBO_BOX (media_select->priv->page_size_combo), page_sizes); - lgl_db_free_paper_name_list (page_sizes); - gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->page_size_combo), - page_size_name); - - /* Category selection control */ - gl_combo_util_add_text_model (GTK_COMBO_BOX (media_select->priv->category_combo)); - categories = lgl_db_get_category_name_list (); - categories = g_list_prepend (categories, g_strdup (_("Any"))); - gl_combo_util_set_strings (GTK_COMBO_BOX (media_select->priv->category_combo), categories); - gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->category_combo), - _("Any")); - lgl_db_free_category_name_list (categories); - - /* Search all treeview */ - media_select->priv->search_all_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING); - gtk_tree_view_set_model (GTK_TREE_VIEW (media_select->priv->search_all_treeview), - GTK_TREE_MODEL (media_select->priv->search_all_store)); - renderer = gtk_cell_renderer_pixbuf_new (); - column = gtk_tree_view_column_new_with_attributes ("", renderer, - "pixbuf", PREVIEW_COLUMN, - "stock-id", PREVIEW_COLUMN_STOCK, - "stock-size", PREVIEW_COLUMN_STOCK_SIZE, - NULL); - gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); - gtk_tree_view_append_column (GTK_TREE_VIEW (media_select->priv->search_all_treeview), column); - renderer = gtk_cell_renderer_text_new (); - column = gtk_tree_view_column_new_with_attributes ("", renderer, - "markup", DESCRIPTION_COLUMN, - NULL); - gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); - gtk_tree_view_append_column (GTK_TREE_VIEW (media_select->priv->search_all_treeview), column); - search_all_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->search_all_treeview)); - search_all_names = lgl_db_get_template_name_list_all (NULL, page_size_id, NULL); - load_search_all_list (media_select->priv->search_all_store, search_all_selection, search_all_names); - lgl_db_free_template_name_list (search_all_names); - - /* Connect signals to controls */ - g_signal_connect (G_OBJECT (media_select->priv->brand_combo), "changed", - G_CALLBACK (filter_changed_cb), - media_select); - g_signal_connect (G_OBJECT (media_select->priv->page_size_combo), "changed", - G_CALLBACK (filter_changed_cb), - media_select); - g_signal_connect (G_OBJECT (media_select->priv->category_combo), "changed", - G_CALLBACK (filter_changed_cb), - media_select); - g_signal_connect (G_OBJECT (recent_selection), "changed", - G_CALLBACK (selection_changed_cb), - media_select); - g_signal_connect (G_OBJECT (search_all_selection), "changed", - G_CALLBACK (selection_changed_cb), - media_select); - g_signal_connect (G_OBJECT (media_select->priv->notebook), "switch-page", - G_CALLBACK (page_changed_cb), - media_select); - - g_free (page_size_name); - - gtk_widget_show_all (GTK_WIDGET (media_select)); - if ( gl_prefs->recent_templates ) - { - gtk_notebook_set_current_page (GTK_NOTEBOOK (media_select->priv->notebook), - media_select->priv->recent_page_num); - } - else - { - gtk_notebook_set_current_page (GTK_NOTEBOOK (media_select->priv->notebook), - media_select->priv->search_all_page_num); - } - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change in selection */ -/*--------------------------------------------------------------------------*/ -static void -filter_changed_cb (GtkComboBox *combo, - gpointer user_data) -{ - glWdgtMediaSelect *media_select = GL_WDGT_MEDIA_SELECT (user_data); - gchar *brand; - gchar *page_size_name, *page_size_id; - gchar *category_name, *category_id; - GList *search_all_names; - GtkTreeSelection *selection; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - - media_select->priv->stop_signals = TRUE; - - /* Update template selections for new filter settings */ - brand = gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->brand_combo)); - page_size_name = gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->page_size_combo)); - category_name = gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->category_combo)); - if ( brand && strlen(brand) && - page_size_name && strlen(page_size_name) && - category_name && strlen(category_name) ) - { - gl_debug (DEBUG_MEDIA_SELECT, "brand = \"%s\"", brand); - gl_debug (DEBUG_MEDIA_SELECT, "page_size_name = \"%s\"", page_size_name); - gl_debug (DEBUG_MEDIA_SELECT, "category_name = \"%s\"", category_name); - if (!g_utf8_collate (brand, _("Any"))) - { - g_free (brand); - brand = NULL; - } - page_size_id = lgl_db_lookup_paper_id_from_name (page_size_name); - category_id = lgl_db_lookup_category_id_from_name (category_name); - gl_debug (DEBUG_MEDIA_SELECT, "page_size_id = \"%s\"", page_size_id); - gl_debug (DEBUG_MEDIA_SELECT, "category_id = \"%s\"", category_id); - search_all_names = lgl_db_get_template_name_list_all (brand, page_size_id, category_id); - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->search_all_treeview)); - load_search_all_list (media_select->priv->search_all_store, selection, search_all_names); - lgl_db_free_template_name_list (search_all_names); - g_free (page_size_id); - g_free (category_id); - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (user_data), - wdgt_media_select_signals[CHANGED], 0); - } - g_free (brand); - g_free (page_size_name); - g_free (category_name); - - - media_select->priv->stop_signals = FALSE; - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change in selection */ -/*--------------------------------------------------------------------------*/ -static void -selection_changed_cb (GtkTreeSelection *selection, - gpointer user_data) -{ - glWdgtMediaSelect *media_select = GL_WDGT_MEDIA_SELECT (user_data); - - if (media_select->priv->stop_signals) return; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (user_data), - wdgt_media_select_signals[CHANGED], 0); - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. modify widget due to change in selection */ -/*--------------------------------------------------------------------------*/ -static void -page_changed_cb (GtkNotebook *notebook, - GtkNotebookPage *page, - guint page_num, - gpointer user_data) -{ - glWdgtMediaSelect *media_select = GL_WDGT_MEDIA_SELECT (user_data); - - if (media_select->priv->stop_signals) return; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - /* - * Store new current page, because this signal is emitted before the actual page change. - */ - media_select->priv->current_page_num = page_num; - - /* Emit our "changed" signal */ - g_signal_emit (G_OBJECT (user_data), - wdgt_media_select_signals[CHANGED], 0); - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -/****************************************************************************/ -/* query selected label template name. */ -/****************************************************************************/ -gchar * -gl_wdgt_media_select_get_name (glWdgtMediaSelect *media_select) -{ - gint page_num; - GtkTreeSelection *selection; - GtkTreeIter iter; - GtkTreeModel *model; - gchar *name; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - page_num = media_select->priv->current_page_num; - if (page_num == media_select->priv->recent_page_num) - { - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->recent_treeview)); - } - else if (page_num == media_select->priv->search_all_page_num) - { - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->search_all_treeview)); - } - else - { - g_print ("notebook page = %d\n", page_num); - g_assert_not_reached (); - } - - if (gtk_tree_selection_get_mode (selection) == GTK_SELECTION_NONE) - { - name = NULL; - } - else - { - gtk_tree_selection_get_selected (selection, &model, &iter); - gtk_tree_model_get (model, &iter, NAME_COLUMN, &name, -1); - } - - gl_debug (DEBUG_MEDIA_SELECT, "END"); - return name; -} - - -/****************************************************************************/ -/* set selected label template name. */ -/****************************************************************************/ -void -gl_wdgt_media_select_set_name (glWdgtMediaSelect *media_select, - gchar *name) -{ - GtkTreeSelection *selection; - GtkTreeModel *model; - GtkTreeIter iter; - GtkTreePath *path; - gchar *name_i; - gboolean flag; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->search_all_treeview)); - g_return_if_fail (GTK_IS_TREE_SELECTION (selection)); - - model = GTK_TREE_MODEL (media_select->priv->search_all_store); - - for ( flag = gtk_tree_model_get_iter_first (model, &iter); - flag; - flag = gtk_tree_model_iter_next(model, &iter) ) - { - gtk_tree_model_get (model, &iter, NAME_COLUMN, &name_i, -1); - if (strcasecmp(name, name_i) == 0) - { - gtk_tree_selection_select_iter (selection, &iter); - path = gtk_tree_model_get_path (model, &iter); - gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (media_select->priv->search_all_treeview), - path, - NULL, - TRUE, 0.5, 0.0); - gtk_tree_path_free (path); - break; - } - } - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -/****************************************************************************/ -/* query current filter parameters. */ -/****************************************************************************/ -void -gl_wdgt_media_select_get_filter_parameters (glWdgtMediaSelect *media_select, - gchar **page_size_id, - gchar **category_id) -{ - gchar *page_size_name, *category_name; - - gl_debug (DEBUG_MEDIA_SELECT, ""); - - g_free (*page_size_id); - g_free (*category_id); - - page_size_name = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->page_size_combo)); - - *page_size_id = lgl_db_lookup_paper_id_from_name (page_size_name); - - category_name = - gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->category_combo)); - - *category_id = lgl_db_lookup_category_id_from_name (category_name); - - g_free (page_size_name); - g_free (category_name); -} - - -/****************************************************************************/ -/* set filter parameters. */ -/****************************************************************************/ -void -gl_wdgt_media_select_set_filter_parameters (glWdgtMediaSelect *media_select, - const gchar *page_size_id, - const gchar *category_id) -{ - gchar *page_size_name; - gchar *category_name; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - page_size_name = lgl_db_lookup_paper_name_from_id (page_size_id); - if (page_size_name == NULL) - { - page_size_name = g_strdup (_("Any")); - } - - gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->page_size_combo), - page_size_name); - - category_name = lgl_db_lookup_category_name_from_id (category_id); - if (category_name == NULL) - { - category_name = g_strdup (_("Any")); - } - - gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->category_combo), - category_name); - g_free (page_size_name); - g_free (category_name); - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Get a description of the layout and number of labels. */ -/*--------------------------------------------------------------------------*/ -static gchar * -get_layout_desc (const lglTemplate *template) -{ - const lglTemplateFrame *frame; - gint n_labels; - gchar *string; - - frame = (lglTemplateFrame *)template->frames->data; - - n_labels = lgl_template_frame_get_n_labels (frame); - - string = g_strdup_printf (_("%d per sheet"), n_labels); - - return string; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Get label size description. */ -/*--------------------------------------------------------------------------*/ -static gchar * -get_label_size_desc (const lglTemplate *template) -{ - lglUnitsType units; - const gchar *units_string; - gdouble units_per_point; - const lglTemplateFrame *frame; - gchar *string = NULL; - - units = gl_prefs_get_units (); - units_string = gl_prefs_get_units_string (); - units_per_point = gl_prefs_get_units_per_point (); - - frame = (lglTemplateFrame *)template->frames->data; - - switch (frame->shape) { - case LGL_TEMPLATE_FRAME_SHAPE_RECT: - if ( units == LGL_UNITS_INCH ) { - gchar *xstr, *ystr; - - xstr = gl_str_util_fraction_to_string (frame->rect.w*units_per_point); - ystr = gl_str_util_fraction_to_string (frame->rect.h*units_per_point); - string = g_strdup_printf (_("%s x %s %s"), - xstr, ystr, units_string); - g_free (xstr); - g_free (ystr); - } else { - string = g_strdup_printf (_("%.5g x %.5g %s"), - frame->rect.w*units_per_point, - frame->rect.h*units_per_point, - units_string); - } - break; - case LGL_TEMPLATE_FRAME_SHAPE_ROUND: - if ( units == LGL_UNITS_INCH ) { - gchar *dstr; - - dstr = gl_str_util_fraction_to_string (2.0*frame->round.r*units_per_point); - string = g_strdup_printf (_("%s %s diameter"), - dstr, units_string); - g_free (dstr); - } else { - string = g_strdup_printf (_("%.5g %s diameter"), - 2.0*frame->round.r*units_per_point, - units_string); - } - break; - case LGL_TEMPLATE_FRAME_SHAPE_CD: - if ( units == LGL_UNITS_INCH ) { - gchar *dstr; - - dstr = gl_str_util_fraction_to_string (2.0*frame->cd.r1*units_per_point); - string = g_strdup_printf (_("%s %s diameter"), - dstr, units_string); - g_free (dstr); - } else { - string = g_strdup_printf (_("%.5g %s diameter"), - 2.0*frame->cd.r1*units_per_point, - units_string); - } - break; - default: - break; - } - - return string; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Load list store from template name list. */ -/*--------------------------------------------------------------------------*/ -static void -load_recent_list (GtkListStore *store, - GtkTreeSelection *selection, - GSList *list) -{ - GSList *p; - GtkTreeIter iter; - lglTemplate *template; - GdkPixbuf *pixbuf; - gchar *size; - gchar *layout; - gchar *description; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - gtk_list_store_clear (store); - - if (list) - { - - for ( p=list; p!=NULL; p=p->next ) - { - - gl_debug (DEBUG_MEDIA_SELECT, "p->data = \"%s\"", p->data); - - template = lgl_db_lookup_template_from_name (p->data); - pixbuf = gl_mini_preview_pixbuf_cache_get_pixbuf (p->data); - - size = get_label_size_desc (template); - layout = get_layout_desc (template); - description = g_strdup_printf ("%s: %s\n%s\n%s", - (gchar *)p->data, - template->description, - size, - layout); - g_free (size); - g_free (layout); - - lgl_template_free (template); - - gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, - NAME_COLUMN, p->data, - PREVIEW_COLUMN, pixbuf, - DESCRIPTION_COLUMN, description, - -1); - - g_object_unref (G_OBJECT (pixbuf)); - g_free (description); - } - - gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); - gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); - gtk_tree_selection_select_iter (selection, &iter); - - } - else - { - gchar *text = g_strdup_printf ("%s\n%s", - _("No recent templates found."), - _("Try selecting a template from the \"Search all templates\" page.")); - gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, - NAME_COLUMN, "empty", - PREVIEW_COLUMN_STOCK, GTK_STOCK_DIALOG_WARNING, - PREVIEW_COLUMN_STOCK_SIZE, GTK_ICON_SIZE_DIALOG, - DESCRIPTION_COLUMN, text, - -1); - g_free (text); - - gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); - - } - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Load list store from template name list. */ -/*--------------------------------------------------------------------------*/ -static void -load_search_all_list (GtkListStore *store, - GtkTreeSelection *selection, - GList *list) -{ - GList *p; - GtkTreeIter iter; - lglTemplate *template; - GdkPixbuf *pixbuf; - gchar *size; - gchar *layout; - gchar *description; - - gl_debug (DEBUG_MEDIA_SELECT, "START"); - - gtk_list_store_clear (store); - - if (list) - { - - for ( p=list; p!=NULL; p=p->next ) - { - - gl_debug (DEBUG_MEDIA_SELECT, "p->data = \"%s\"", p->data); - - template = lgl_db_lookup_template_from_name (p->data); - pixbuf = gl_mini_preview_pixbuf_cache_get_pixbuf (p->data); - - size = get_label_size_desc (template); - layout = get_layout_desc (template); - description = g_strdup_printf ("%s: %s\n%s\n%s", - (gchar *)p->data, - template->description, - size, - layout); - g_free (size); - g_free (layout); - - lgl_template_free (template); - - gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, - NAME_COLUMN, p->data, - PREVIEW_COLUMN, pixbuf, - DESCRIPTION_COLUMN, description, - -1); - - g_object_unref (G_OBJECT (pixbuf)); - g_free (description); - } - - gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); - gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); - gtk_tree_selection_select_iter (selection, &iter); - - } - else - { - gchar *text = g_strdup_printf ("%s\n%s", - _("No match."), - _("Try selecting a different brand, page size or category.")); - gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, - NAME_COLUMN, "empty", - PREVIEW_COLUMN_STOCK, GTK_STOCK_DIALOG_WARNING, - PREVIEW_COLUMN_STOCK_SIZE, GTK_ICON_SIZE_DIALOG, - DESCRIPTION_COLUMN, text, - -1); - g_free (text); - - gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); - - } - - gl_debug (DEBUG_MEDIA_SELECT, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/wdgt-media-select.h b/glabels2/src/wdgt-media-select.h deleted file mode 100644 index f2c30073..00000000 --- a/glabels2/src/wdgt-media-select.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * wdgt-media-select.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __WDGT_MEDIA_SELECT_H__ -#define __WDGT_MEDIA_SELECT_H__ - -#include - -G_BEGIN_DECLS - -#define GL_TYPE_WDGT_MEDIA_SELECT (gl_wdgt_media_select_get_type ()) -#define GL_WDGT_MEDIA_SELECT(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_WDGT_MEDIA_SELECT, glWdgtMediaSelect )) -#define GL_WDGT_MEDIA_SELECT_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_WDGT_MEDIA_SELECT, glWdgtMediaSelectClass)) -#define GL_IS_WDGT_MEDIA_SELECT(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_WDGT_MEDIA_SELECT)) -#define GL_IS_WDGT_MEDIA_SELECT_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_WDGT_MEDIA_SELECT)) - -typedef struct _glWdgtMediaSelect glWdgtMediaSelect; -typedef struct _glWdgtMediaSelectClass glWdgtMediaSelectClass; - -typedef struct _glWdgtMediaSelectPrivate glWdgtMediaSelectPrivate; - -struct _glWdgtMediaSelect { - GtkVBox parent_widget; - - glWdgtMediaSelectPrivate *priv; -}; - -struct _glWdgtMediaSelectClass { - GtkVBoxClass parent_class; - - void (*changed) (glWdgtMediaSelect * media_select, gpointer user_data); -}; - -GType gl_wdgt_media_select_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_wdgt_media_select_new (void); - -gchar *gl_wdgt_media_select_get_name (glWdgtMediaSelect *media_select); - -void gl_wdgt_media_select_set_name (glWdgtMediaSelect *media_select, - gchar *name); - -void gl_wdgt_media_select_get_filter_parameters (glWdgtMediaSelect *media_select, - gchar **page_size_id, - gchar **category_id); - -void gl_wdgt_media_select_set_filter_parameters (glWdgtMediaSelect *media_select, - const gchar *page_size_id, - const gchar *category_id); - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/wdgt-merge-menu.c b/glabels2/src/wdgt-merge-menu.c deleted file mode 100644 index 9f0d132e..00000000 --- a/glabels2/src/wdgt-merge-menu.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * wdgt-merge-menu.c - * Copyright (C) 2008-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "wdgt-merge-menu.h" - -#include -#include - -#include "marshal.h" - -#include "debug.h" - - -/*===========================================*/ -/* Private types */ -/*===========================================*/ - - -struct _glWdgtMergeMenuPrivate { - - GList *menu_items; -}; - -enum { - FIELD_SELECTED, - LAST_SIGNAL -}; - -typedef void (*glWdgtMergeMenuSignal) (GObject * object, gpointer data); - - -/*===========================================*/ -/* Private globals */ -/*===========================================*/ - -static gint signals[LAST_SIGNAL] = { 0 }; - - -/*===========================================*/ -/* Local function prototypes */ -/*===========================================*/ - -static void gl_wdgt_merge_menu_finalize (GObject *object); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glWdgtMergeMenu, gl_wdgt_merge_menu, GTK_TYPE_MENU); - - -static void -gl_wdgt_merge_menu_class_init (glWdgtMergeMenuClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - gl_debug (DEBUG_MERGE_MENU, "START"); - - gl_wdgt_merge_menu_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_wdgt_merge_menu_finalize; - - signals[FIELD_SELECTED] = - g_signal_new ("field_selected", - G_OBJECT_CLASS_TYPE(object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (glWdgtMergeMenuClass, field_selected), - NULL, NULL, - gl_marshal_VOID__STRING, - G_TYPE_NONE, 1, G_TYPE_STRING); - - gl_debug (DEBUG_MERGE_MENU, "END"); -} - - -static void -gl_wdgt_merge_menu_init (glWdgtMergeMenu *merge_menu) -{ - gl_debug (DEBUG_MERGE_MENU, "START"); - - merge_menu->priv = g_new0 (glWdgtMergeMenuPrivate, 1); - - gl_debug (DEBUG_MERGE_MENU, "END"); -} - - -static void -gl_wdgt_merge_menu_finalize (GObject *object) -{ - glWdgtMergeMenu *merge_menu = GL_WDGT_MERGE_MENU (object); - GList *p; - GtkWidget *menu_item; - gchar *field; - - gl_debug (DEBUG_MERGE_MENU, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_WDGT_MERGE_MENU (object)); - - for ( p = merge_menu->priv->menu_items; p != NULL; p = p->next ) - { - menu_item = GTK_WIDGET (p->data); - field = g_object_get_data (G_OBJECT (menu_item), "field"); - g_free (field); - } - g_list_free (merge_menu->priv->menu_items); - g_free (merge_menu->priv); - - G_OBJECT_CLASS (gl_wdgt_merge_menu_parent_class)->finalize (object); - - gl_debug (DEBUG_MERGE_MENU, "END"); -} - - -GtkWidget * -gl_wdgt_merge_menu_new (void) -{ - glWdgtMergeMenu *merge_menu; - - gl_debug (DEBUG_MERGE_MENU, "START"); - - merge_menu = g_object_new (gl_wdgt_merge_menu_get_type (), NULL); - - gl_debug (DEBUG_MERGE_MENU, "END"); - - return GTK_WIDGET (merge_menu); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Menu item activation callback. */ -/*--------------------------------------------------------------------------*/ -static void -activate_cb (GtkMenuItem *menu_item, - glWdgtMergeMenu *merge_menu) -{ - gchar *field; - - gl_debug (DEBUG_MERGE_MENU, "START"); - - field = g_object_get_data (G_OBJECT (menu_item), "field"); - gl_debug (DEBUG_MERGE_MENU, "Field activated: \"%s\"\n", field ); - - g_signal_emit (G_OBJECT (merge_menu), signals[FIELD_SELECTED], 0, field); - - gl_debug (DEBUG_MERGE_MENU, "END"); -} - - -/****************************************************************************/ -/* set field names. */ -/****************************************************************************/ -void -gl_wdgt_merge_menu_set_fields (glWdgtMergeMenu *merge_menu, - GList *field_list) -{ - GList *p; - GtkWidget *menu_item; - gchar *field; - - gl_debug (DEBUG_MERGE_MENU, "START"); - - /* - * Remove all old menu items. - */ - for ( p = merge_menu->priv->menu_items; p != NULL; p = p->next ) - { - menu_item = GTK_WIDGET (p->data); - field = g_object_get_data (G_OBJECT (menu_item), "field"); - g_free (field); - gtk_widget_destroy (menu_item); - } - g_list_free (merge_menu->priv->menu_items); - merge_menu->priv->menu_items = NULL; - - /* - * Add new menu items. - */ - for ( p = field_list; p != NULL; p = p->next ) - { - menu_item = gtk_menu_item_new_with_label (p->data); - g_object_set_data (G_OBJECT (menu_item), "field", g_strdup (p->data)); - g_signal_connect (G_OBJECT (menu_item), "activate", - G_CALLBACK (activate_cb), merge_menu); - gtk_menu_shell_append (GTK_MENU_SHELL (merge_menu), menu_item); - merge_menu->priv->menu_items = - g_list_append (merge_menu->priv->menu_items, menu_item); - } - - gl_debug (DEBUG_MERGE_MENU, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/wdgt-merge-menu.h b/glabels2/src/wdgt-merge-menu.h deleted file mode 100644 index 2c406dcd..00000000 --- a/glabels2/src/wdgt-merge-menu.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * wdgt-merge-menu.h - * Copyright (C) 2008-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __WDGT_MERGE_MENU_H__ -#define __WDGT_MERGE_MENU_H__ - -#include - -G_BEGIN_DECLS - -#define GL_TYPE_WDGT_MERGE_MENU (gl_wdgt_merge_menu_get_type ()) -#define GL_WDGT_MERGE_MENU(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_WDGT_MERGE_MENU, glWdgtMergeMenu )) -#define GL_WDGT_MERGE_MENU_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_WDGT_MERGE_MENU, glWdgtMergeMenuClass)) -#define GL_IS_WDGT_MERGE_MENU(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_WDGT_MERGE_MENU)) -#define GL_IS_WDGT_MERGE_MENU_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_WDGT_MERGE_MENU)) - - -typedef struct _glWdgtMergeMenu glWdgtMergeMenu; -typedef struct _glWdgtMergeMenuClass glWdgtMergeMenuClass; - -typedef struct _glWdgtMergeMenuPrivate glWdgtMergeMenuPrivate; - - -struct _glWdgtMergeMenu { - GtkMenu parent_widget; - - glWdgtMergeMenuPrivate *priv; -}; - - -struct _glWdgtMergeMenuClass { - GtkMenuClass parent_class; - - void (*field_selected) (glWdgtMergeMenu *merge_menu, - gchar *field, - gpointer user_data); -}; - - -GType gl_wdgt_merge_menu_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_wdgt_merge_menu_new (void); - -void gl_wdgt_merge_menu_set_fields (glWdgtMergeMenu *merge_menu, - GList *field_list); - - -G_END_DECLS - -#endif - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/window.c b/glabels2/src/window.c deleted file mode 100644 index 0960d32e..00000000 --- a/glabels2/src/window.c +++ /dev/null @@ -1,637 +0,0 @@ -/* - * window.c - * Copyright (C) 2002-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "window.h" - -#include -#include - -#include "ui.h" -#include "ui-commands.h" -#include "file-util.h" -#include "xml-label.h" -#include "prefs.h" -#include "file.h" - -#include "debug.h" - - -/*===========================================================================*/ -/* Private macros and constants. */ -/*===========================================================================*/ - -#define DEFAULT_WINDOW_WIDTH 788 -#define DEFAULT_WINDOW_HEIGHT 600 - -#define CURSOR_INFO_WIDTH 150 -#define ZOOM_INFO_WIDTH 50 - - -/*===========================================================================*/ -/* Private globals */ -/*===========================================================================*/ - -static GList *window_list = NULL; - - -/*===========================================================================*/ -/* Local function prototypes */ -/*===========================================================================*/ - -static void gl_window_finalize (GObject *object); -static void gl_window_destroy (GtkObject *gtk_object); - -static void set_window_title (glWindow *window, - glLabel *label); - -static gboolean window_delete_event_cb (glWindow *window, - GdkEvent *event, - gpointer user_data); - -static void selection_changed_cb (glView *view, - glWindow *window); - -static void context_menu_activate_cb (glView *view, - gint button, - guint32 activate_time, - glWindow *window); - -static void zoom_changed_cb (glView *view, - gdouble zoom, - glWindow *window); - -static void pointer_moved_cb (glView *view, - gdouble x, - gdouble y, - glWindow *window); - -static void pointer_exit_cb (glView *view, - glWindow *window); - -static void name_changed_cb (glLabel *label, - glWindow *window); - -static void modified_changed_cb (glLabel *label, - glWindow *window); - - -/****************************************************************************/ -/* Boilerplate Object stuff. */ -/****************************************************************************/ -G_DEFINE_TYPE (glWindow, gl_window, GTK_TYPE_WINDOW); - - -static void -gl_window_class_init (glWindowClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (class); - - gl_debug (DEBUG_WINDOW, "START"); - - gl_window_parent_class = g_type_class_peek_parent (class); - - object_class->finalize = gl_window_finalize; - - gtk_object_class->destroy = gl_window_destroy; - - gl_debug (DEBUG_WINDOW, "END"); -} - - -static void -gl_window_init (glWindow *window) -{ - GtkWidget *vbox1; - GtkUIManager *ui; - GtkWidget *status_hbox; - - gl_debug (DEBUG_WINDOW, "START"); - - vbox1 = gtk_vbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (window), vbox1); - - window->ui = ui = gl_ui_new (window); - gtk_box_pack_start (GTK_BOX (vbox1), - gtk_ui_manager_get_widget (ui, "/MenuBar"), - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox1), - gtk_ui_manager_get_widget (ui, "/MainToolBar"), - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox1), - gtk_ui_manager_get_widget (ui, "/DrawingToolBar"), - FALSE, FALSE, 0); - - window->hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox1), window->hbox, TRUE, TRUE, 0); - - window->sidebar = GL_UI_SIDEBAR (gl_ui_sidebar_new ()); - gtk_box_pack_end (GTK_BOX (window->hbox), GTK_WIDGET (window->sidebar), FALSE, FALSE, 0); - - window->property_bar = GL_UI_PROPERTY_BAR (gl_ui_property_bar_new ()); - gtk_box_pack_start (GTK_BOX (vbox1), GTK_WIDGET (window->property_bar), FALSE, FALSE, 0); - - status_hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox1), status_hbox, FALSE, FALSE, 0); - - window->status_bar = gtk_statusbar_new (); - gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (window->status_bar), FALSE); - gtk_box_pack_start (GTK_BOX (status_hbox), - window->status_bar, - TRUE, TRUE, 0); - window->zoom_info = gtk_label_new (NULL); - gtk_widget_set_size_request (window->zoom_info, ZOOM_INFO_WIDTH, -1); - window->zoom_info_frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME(window->zoom_info_frame), GTK_SHADOW_IN); - gtk_container_add (GTK_CONTAINER(window->zoom_info_frame), window->zoom_info); - gtk_widget_show_all (window->zoom_info_frame); - gtk_box_pack_end (GTK_BOX (status_hbox), - window->zoom_info_frame, - FALSE, FALSE, 0); - - window->cursor_info = gtk_label_new (NULL); - gtk_widget_set_size_request (window->cursor_info, CURSOR_INFO_WIDTH, -1); - window->cursor_info_frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME(window->cursor_info_frame), GTK_SHADOW_IN); - gtk_container_add (GTK_CONTAINER(window->cursor_info_frame), window->cursor_info); - gtk_widget_show_all (window->cursor_info_frame); - gtk_box_pack_end (GTK_BOX (status_hbox), - window->cursor_info_frame, - FALSE, FALSE, 0); - - gtk_window_set_default_size (GTK_WINDOW (window), - DEFAULT_WINDOW_WIDTH, - DEFAULT_WINDOW_HEIGHT); - - g_signal_connect (G_OBJECT(window), "delete-event", - G_CALLBACK(window_delete_event_cb), NULL); - - window->menu_tips_context_id = - gtk_statusbar_get_context_id (GTK_STATUSBAR (window->status_bar), "menu_tips"); - - window->print_settings = NULL; - window->merge_dialog = NULL; - window->context_menu = GTK_MENU (gtk_ui_manager_get_widget (ui, "/ContextMenu")); - window->empty_selection_context_menu = - GTK_MENU (gtk_ui_manager_get_widget (ui, "/EmptySelectionContextMenu")); - - window->view = NULL; - - window_list = g_list_append (window_list, window); - - gl_debug (DEBUG_WINDOW, "END"); -} - - -static void -gl_window_finalize (GObject *object) -{ - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (object != NULL); - g_return_if_fail (GL_IS_WINDOW (object)); - - G_OBJECT_CLASS (gl_window_parent_class)->finalize (object); - - gl_debug (DEBUG_WINDOW, "END"); -} - - -static void -gl_window_destroy (GtkObject *gtk_object) -{ - glWindow *window; - - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (gtk_object != NULL); - g_return_if_fail (GL_IS_WINDOW (gtk_object)); - - window = GL_WINDOW (gtk_object); - window_list = g_list_remove (window_list, window); - - if (window->ui) { - gl_ui_unref(window->ui); - window->ui = NULL; - } - - if (GTK_OBJECT_CLASS (gl_window_parent_class)->destroy) { - GTK_OBJECT_CLASS (gl_window_parent_class)->destroy (gtk_object); - } - - gl_debug (DEBUG_WINDOW, "END"); -} - - -/****************************************************************************/ -/** Create a glabels window. */ -/****************************************************************************/ -GtkWidget * -gl_window_new (void) -{ - glWindow *window; - - gl_debug (DEBUG_WINDOW, "START"); - - window = g_object_new (GL_TYPE_WINDOW, - "title", _("(none) - gLabels"), - NULL); - - gl_debug (DEBUG_WINDOW, "window=%p", window); - gl_debug (DEBUG_WINDOW, "view=%p", window->view); - - gl_debug (DEBUG_WINDOW, "END"); - - return GTK_WIDGET(window); -} - - -/****************************************************************************/ -/** Create a glabels window from a label. */ -/****************************************************************************/ -GtkWidget* -gl_window_new_from_label (glLabel *label) -{ - glWindow *window; - - gl_debug (DEBUG_WINDOW, "START"); - - window = GL_WINDOW (gl_window_new ()); - - gl_window_set_label (window, label); - - gl_debug (DEBUG_WINDOW, "END"); - - return GTK_WIDGET(window); -} - - -/****************************************************************************/ -/** Create a glabels window from a glabels file. */ -/****************************************************************************/ -GtkWidget* -gl_window_new_from_file (const gchar *filename) -{ - glWindow *window; - glLabel *label; - gchar *abs_filename; - glXMLLabelStatus status; - - gl_debug (DEBUG_WINDOW, "START"); - - window = GL_WINDOW (gl_window_new ()); - - abs_filename = gl_file_util_make_absolute (filename); - label = gl_xml_label_open (abs_filename, &status); - g_free (abs_filename); - - gl_window_set_label (window, label); - - gl_debug (DEBUG_WINDOW, "END"); - - return GTK_WIDGET(window); -} - - -/****************************************************************************/ -/** Is window empty? */ -/****************************************************************************/ -gboolean -gl_window_is_empty (glWindow *window) -{ - g_return_val_if_fail (GL_IS_WINDOW (window), FALSE); - - gl_debug (DEBUG_WINDOW, "return %d", (window->view == NULL) ); - return ( window->view == NULL ); -} - - -/****************************************************************************/ -/** Create view from label and place in window. */ -/****************************************************************************/ -void -gl_window_set_label (glWindow *window, - glLabel *label) -{ - gchar *string; - - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (GL_IS_WINDOW (window)); - g_return_if_fail (GL_IS_LABEL (label)); - - gl_label_clear_modified (label); - - set_window_title (window, label); - - if ( window->view != NULL ) { - gtk_widget_destroy (window->view); - window->view = NULL; - } - - window->view = gl_view_new (label); - gtk_box_pack_start (GTK_BOX (window->hbox), window->view,TRUE, TRUE, 0); - - gtk_widget_show_all (window->view); - - gl_view_zoom_to_fit (GL_VIEW(window->view)); - - if (gl_prefs->grid_visible) { - gl_view_show_grid (GL_VIEW(window->view)); - } else { - gl_view_hide_grid (GL_VIEW(window->view)); - } - - if (gl_prefs->markup_visible) { - gl_view_show_markup (GL_VIEW(window->view)); - } else { - gl_view_hide_markup (GL_VIEW(window->view)); - } - - gl_ui_update_all (window->ui, GL_VIEW(window->view)); - - gl_ui_property_bar_set_view (window->property_bar, GL_VIEW(window->view)); - gl_ui_sidebar_set_view (window->sidebar, GL_VIEW(window->view)); - - string = g_strdup_printf ("%3.0f%%", - 100.0*gl_view_get_zoom (GL_VIEW(window->view))); - gtk_label_set_text (GTK_LABEL(window->zoom_info), string); - g_free (string); - - g_signal_connect (G_OBJECT(window->view), "selection_changed", - G_CALLBACK(selection_changed_cb), window); - - g_signal_connect (G_OBJECT(window->view), "context_menu_activate", - G_CALLBACK(context_menu_activate_cb), window); - - g_signal_connect (G_OBJECT(window->view), "zoom_changed", - G_CALLBACK(zoom_changed_cb), window); - - g_signal_connect (G_OBJECT(window->view), "pointer_moved", - G_CALLBACK(pointer_moved_cb), window); - - g_signal_connect (G_OBJECT(window->view), "pointer_exit", - G_CALLBACK(pointer_exit_cb), window); - - g_signal_connect (G_OBJECT(label), "name_changed", - G_CALLBACK(name_changed_cb), window); - - g_signal_connect (G_OBJECT(label), "modified_changed", - G_CALLBACK(modified_changed_cb), window); - - gl_debug (DEBUG_WINDOW, "END"); -} - - -/****************************************************************************/ -/** Return list of glabels windows. */ -/****************************************************************************/ -const GList * -gl_window_get_window_list (void) -{ - gl_debug (DEBUG_WINDOW, ""); - return window_list; -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Set window title based on name and state of label. */ -/*---------------------------------------------------------------------------*/ -static void -set_window_title (glWindow *window, - glLabel *label) -{ - gchar *name, *title; - - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (window && GL_IS_WINDOW (window)); - g_return_if_fail (label && GL_IS_LABEL (label)); - - name = gl_label_get_short_name (label); - g_return_if_fail (name != NULL); - - if (gl_label_is_modified (label)) { - title = g_strdup_printf ("%s %s - gLabels", - name, _("(modified)")); - } else { - title = g_strdup_printf ("%s - gLabels", name); - } - - gtk_window_set_title (GTK_WINDOW(window), title); - - g_free (name); - g_free (title); - - gl_debug (DEBUG_WINDOW, "END"); -} - - -/*-------------------------------------------------------------------------*/ -/** PRIVATE. Window "delete-event" callback. */ -/*-------------------------------------------------------------------------*/ -static gboolean -window_delete_event_cb (glWindow *window, - GdkEvent *event, - gpointer user_data) -{ - gl_debug (DEBUG_WINDOW, "START"); - - g_return_val_if_fail (window && GL_IS_WINDOW (window), TRUE); - - gl_file_close (window); - - gl_debug (DEBUG_WINDOW, "END"); - - return TRUE; -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. View "selection state changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -selection_changed_cb (glView *view, - glWindow *window) -{ - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (window && GL_IS_WINDOW (window)); - - gl_ui_update_selection_verbs (window->ui, view); - - gl_debug (DEBUG_WINDOW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. View "context menu activate" callback. */ -/*---------------------------------------------------------------------------*/ -static void -context_menu_activate_cb (glView *view, - gint button, - guint32 activate_time, - glWindow *window) -{ - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (window && GL_IS_WINDOW (window)); - - if (gl_view_is_selection_empty (view)) { - - gtk_menu_popup (GTK_MENU (window->empty_selection_context_menu), - NULL, NULL, NULL, NULL, button, activate_time); - - } else { - - gtk_menu_popup (GTK_MENU (window->context_menu), - NULL, NULL, NULL, NULL, button, activate_time); - - } - - gl_debug (DEBUG_WINDOW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. View "zoom state changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -zoom_changed_cb (glView *view, - gdouble zoom, - glWindow *window) -{ - gchar *string; - - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (window && GL_IS_WINDOW (window)); - - string = g_strdup_printf ("%3.0f%%", 100.0*zoom); - gtk_label_set_text (GTK_LABEL(window->zoom_info), string); - g_free (string); - - gl_ui_update_zoom_verbs (window->ui, view); - - gl_debug (DEBUG_WINDOW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. View "pointer moved" callback. */ -/*---------------------------------------------------------------------------*/ -static void -pointer_moved_cb (glView *view, - gdouble x, - gdouble y, - glWindow *window) -{ - gchar *string; - gdouble units_per_point; - gint units_precision; - - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (window && GL_IS_WINDOW (window)); - - units_per_point = gl_prefs_get_units_per_point (); - units_precision = gl_prefs_get_units_precision (); - - string = g_strdup_printf ("%.*f, %.*f", - units_precision, x*units_per_point, - units_precision, y*units_per_point); - gtk_label_set_text (GTK_LABEL(window->cursor_info), string); - g_free (string); - - gl_debug (DEBUG_WINDOW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. View "pointer exit" callback. */ -/*---------------------------------------------------------------------------*/ -static void -pointer_exit_cb (glView *view, - glWindow *window) -{ - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (view && GL_IS_VIEW (view)); - g_return_if_fail (window && GL_IS_WINDOW (window)); - - gtk_label_set_text (GTK_LABEL(window->cursor_info), ""); - - gl_debug (DEBUG_WINDOW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Label "name changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -name_changed_cb (glLabel *label, - glWindow *window) -{ - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (label && GL_IS_LABEL (label)); - g_return_if_fail (window && GL_IS_WINDOW (window)); - - set_window_title (window, label); - - gl_debug (DEBUG_WINDOW, "END"); -} - - -/*---------------------------------------------------------------------------*/ -/** PRIVATE. Label "modified state changed" callback. */ -/*---------------------------------------------------------------------------*/ -static void -modified_changed_cb (glLabel *label, - glWindow *window) -{ - gl_debug (DEBUG_WINDOW, "START"); - - g_return_if_fail (label && GL_IS_LABEL (label)); - g_return_if_fail (window && GL_IS_WINDOW (window)); - - set_window_title (window, label); - - gl_ui_update_modified_verbs (window->ui, label); - - gl_debug (DEBUG_WINDOW, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/window.h b/glabels2/src/window.h deleted file mode 100644 index 999bd4ca..00000000 --- a/glabels2/src/window.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * window.h - * Copyright (C) 2002-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __WINDOW_H__ -#define __WINDOW_H__ - -#include - -#include "view.h" -#include "label.h" -#include "ui-property-bar.h" -#include "ui-sidebar.h" -#include "print-op.h" -#include "merge-properties-dialog.h" - -G_BEGIN_DECLS - -#define GL_TYPE_WINDOW (gl_window_get_type ()) -#define GL_WINDOW(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_WINDOW, glWindow )) -#define GL_WINDOW_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_WINDOW, glWindowClass)) -#define GL_IS_WINDOW(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_WINDOW)) -#define GL_IS_WINDOW_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_WINDOW)) - -typedef struct _glWindow glWindow; -typedef struct _glWindowClass glWindowClass; - -struct _glWindow { - GtkWindow parent_widget; - - GtkUIManager *ui; - - GtkWidget *view; - - GtkWidget *hbox; - - glUIPropertyBar *property_bar; - glUISidebar *sidebar; - - GtkWidget *status_bar; - GtkWidget *cursor_info; - GtkWidget *cursor_info_frame; - GtkWidget *zoom_info; - GtkWidget *zoom_info_frame; - - guint menu_tips_context_id; - - glPrintOpSettings *print_settings; - glMergePropertiesDialog *merge_dialog; - GtkMenu *context_menu; - GtkMenu *empty_selection_context_menu; -}; - -struct _glWindowClass { - GtkWindowClass parent_class; -}; - -GType gl_window_get_type (void) G_GNUC_CONST; - -GtkWidget *gl_window_new (void); - -GtkWidget *gl_window_new_from_file (const gchar *filename); - -GtkWidget *gl_window_new_from_label (glLabel *label); - -gboolean gl_window_is_empty (glWindow *window); - -void gl_window_set_label (glWindow *window, - glLabel *label); - -const GList *gl_window_get_window_list (void); - -G_END_DECLS - -#endif /* __WINDOW_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/xml-label-04.c b/glabels2/src/xml-label-04.c deleted file mode 100644 index 7fe639d1..00000000 --- a/glabels2/src/xml-label-04.c +++ /dev/null @@ -1,520 +0,0 @@ -/* - * xml-label-04.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "xml-label-04.h" - -#include - -#include -#include "label-text.h" -#include "label-box.h" -#include "label-line.h" -#include "label-ellipse.h" -#include "label-image.h" -#include "label-barcode.h" -#include "str-util.h" - -#include "debug.h" - - -static gboolean xml04_parse_media_description (xmlNodePtr node, - glLabel *label); -static void xml04_parse_object (xmlNodePtr node, - glLabelObject *object); -static void xml04_parse_text_props (xmlNodePtr node, - glLabelText *object); -static void xml04_parse_box_props (xmlNodePtr node, - glLabelBox *object); -static void xml04_parse_line_props (xmlNodePtr node, - glLabelLine *object); -static void xml04_parse_ellipse_props (xmlNodePtr node, - glLabelEllipse *object); -static void xml04_parse_image_props (xmlNodePtr node, - glLabelImage *object); -static void xml04_parse_barcode_props (xmlNodePtr node, - glLabelBarcode *object); -static void xml04_parse_merge_properties (xmlNodePtr node, - glLabel *label); - - -/****************************************************************************/ -/* PRIVATE. Parse xml doc structure and create label. */ -/****************************************************************************/ -glLabel *gl_xml_label_04_parse (xmlNodePtr root, - glXMLLabelStatus *status) -{ - glLabel *label; - xmlNodePtr node; - GObject *object; - gboolean rotate_flag; - - gl_debug (DEBUG_XML, "START"); - - *status = XML_LABEL_OK; - - if (!xmlStrEqual (root->name, (xmlChar *)"Label")) { - g_message (_("Bad root node = \"%s\""), root->name); - *status = XML_LABEL_ERROR_OPEN_PARSE; - return NULL; - } - - label = GL_LABEL (gl_label_new ()); - - rotate_flag = lgl_xml_get_prop_boolean (root, "rotate", FALSE); - gl_label_set_rotate_flag (label, rotate_flag); - - for (node = root->xmlChildrenNode; node != NULL; node = node->next) { - - gl_debug (DEBUG_XML, "node name = \"%s\"", node->name); - - if (!xmlNodeIsText (node)) { - if (xmlStrEqual (node->name, (xmlChar *)"Media_Type")) { - if (!xml04_parse_media_description (node, label)) { - *status = XML_LABEL_UNKNOWN_MEDIA; - } - } else if (xmlStrEqual (node->name, (xmlChar *)"Text")) { - object = gl_label_text_new (label); - xml04_parse_object (node, GL_LABEL_OBJECT(object)); - xml04_parse_text_props (node, GL_LABEL_TEXT(object)); - } else if (xmlStrEqual (node->name, (xmlChar *)"Box")) { - object = gl_label_box_new (label); - xml04_parse_object (node, GL_LABEL_OBJECT(object)); - xml04_parse_box_props (node, GL_LABEL_BOX(object)); - } else if (xmlStrEqual (node->name, (xmlChar *)"Line")) { - object = gl_label_line_new (label); - xml04_parse_object (node, GL_LABEL_OBJECT(object)); - xml04_parse_line_props (node, GL_LABEL_LINE(object)); - } else if (xmlStrEqual (node->name, (xmlChar *)"Ellipse")) { - object = gl_label_ellipse_new (label); - xml04_parse_object (node, GL_LABEL_OBJECT(object)); - xml04_parse_ellipse_props (node, - GL_LABEL_ELLIPSE(object)); - } else if (xmlStrEqual (node->name, (xmlChar *)"Image")) { - object = gl_label_image_new (label); - xml04_parse_object (node, GL_LABEL_OBJECT(object)); - xml04_parse_image_props (node, GL_LABEL_IMAGE(object)); - } else if (xmlStrEqual (node->name, (xmlChar *)"Barcode")) { - object = gl_label_barcode_new (label); - xml04_parse_object (node, GL_LABEL_OBJECT(object)); - xml04_parse_barcode_props (node, - GL_LABEL_BARCODE(object)); - } else if (xmlStrEqual (node->name, (xmlChar *)"Merge_Properties")) { - xml04_parse_merge_properties (node, label); - } else { - g_message (_("bad node = \"%s\""), node->name); - } - } - } - - gl_debug (DEBUG_XML, "END"); - - return label; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse Media Description node. */ -/*--------------------------------------------------------------------------*/ -static gboolean -xml04_parse_media_description (xmlNodePtr node, - glLabel *label) -{ - xmlChar *template_name; - lglTemplate *template; - gboolean ret; - - gl_debug (DEBUG_XML, "START"); - - template_name = xmlNodeGetContent (node); - - template = lgl_db_lookup_template_from_name ((gchar *)template_name); - if (template == NULL) { - g_message ("Undefined template \"%s\"", template_name); - /* Get a default */ - template = lgl_db_lookup_template_from_name (NULL); - ret = FALSE; - } else { - ret = TRUE; - } - - gl_label_set_template (label, template); - - lgl_template_free (template); - xmlFree (template_name); - - gl_debug (DEBUG_XML, "END"); - - return ret; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Object Node */ -/*--------------------------------------------------------------------------*/ -static void -xml04_parse_object (xmlNodePtr object_node, - glLabelObject *object) -{ - gdouble x, y; - - gl_debug (DEBUG_XML, "START"); - - x = lgl_xml_get_prop_double (object_node, "x", 0); - y = lgl_xml_get_prop_double (object_node, "y", 0); - - gl_label_object_set_position (object, x, y); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Text Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml04_parse_text_props (xmlNodePtr object_node, - glLabelText *object) -{ - xmlChar *font_family; - gdouble font_size; - PangoWeight font_weight; - gboolean font_italic_flag; - glColorNode *color_node; - PangoAlignment align; - xmlNodePtr line_node, text_node; - glTextNode *node_text; - GList *nodes, *lines; - gdouble w, h, x, y; - xmlChar *string; - - gl_debug (DEBUG_XML, "START"); - - font_family = xmlGetProp (object_node, (xmlChar *)"font_family"); - font_size = lgl_xml_get_prop_double (object_node, "font_size", 0); - string = xmlGetProp (object_node, (xmlChar *)"font_weight"); - font_weight = gl_str_util_string_to_weight ((gchar *)string); - xmlFree (string); - font_italic_flag = lgl_xml_get_prop_boolean (object_node, "font_italic", FALSE); - - string = xmlGetProp (object_node, (xmlChar *)"justify"); - align = gl_str_util_string_to_align ((gchar *)string); - xmlFree (string); - - color_node = gl_color_node_new_default (); - color_node->color = lgl_xml_get_prop_uint (object_node, "color", 0); - - gl_label_object_set_font_family (GL_LABEL_OBJECT(object), (gchar *)font_family); - gl_label_object_set_font_size (GL_LABEL_OBJECT(object), font_size); - gl_label_object_set_font_weight (GL_LABEL_OBJECT(object), font_weight); - gl_label_object_set_font_italic_flag (GL_LABEL_OBJECT(object), font_italic_flag); - gl_label_object_set_text_color (GL_LABEL_OBJECT(object), color_node); - gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object), align); - - gl_color_node_free (&color_node); - - lines = NULL; - for (line_node = object_node->xmlChildrenNode; line_node != NULL; - line_node = line_node->next) { - - if (xmlStrEqual (line_node->name, (xmlChar *)"Line")) { - - gl_debug (DEBUG_XML, "->Line node"); - - nodes = NULL; - for (text_node = line_node->xmlChildrenNode; - text_node != NULL; text_node = text_node->next) { - - if (xmlStrEqual (text_node->name, (xmlChar *)"Field")) { - gl_debug (DEBUG_XML, "->Line->Field node"); - node_text = g_new0 (glTextNode, 1); - node_text->field_flag = TRUE; - node_text->data = - (gchar *)xmlGetProp (text_node, (xmlChar *)"name"); - nodes = - g_list_append (nodes, node_text); - } else if (xmlNodeIsText (text_node)) { - gl_debug (DEBUG_XML, "->Line->\"literal\" node"); - node_text = g_new0 (glTextNode, 1); - node_text->field_flag = FALSE; - node_text->data = - (gchar *)xmlNodeGetContent (text_node); - gl_debug (DEBUG_XML, "text = \"%s\"", - node_text->data); - nodes = - g_list_append (nodes, node_text); - } else { - g_message ("Unexpected Text Line child: \"%s\"", - text_node->name); - } - - } - lines = g_list_append (lines, nodes); - - } else if (!xmlNodeIsText (line_node)) { - g_message ("Unexpected Text child: \"%s\"", - line_node->name); - } - - } - - gl_label_text_set_lines (object, lines); - - gl_text_node_lines_free (&lines); - xmlFree (font_family); - - /* Adjust location. In 0.4.x, text was anchored at x,y */ - gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y); - gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); - switch (align) { - case PANGO_ALIGN_LEFT: - /* nothing */ - break; - case PANGO_ALIGN_CENTER: - x -= w/2.0; - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - break; - case PANGO_ALIGN_RIGHT: - x -= w; - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - break; - default: - /* should not happen */ - break; - } - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Box Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml04_parse_box_props (xmlNodePtr node, - glLabelBox *object) -{ - gdouble w, h, line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - - gl_debug (DEBUG_XML, "START"); - - w = lgl_xml_get_prop_double (node, "w", 0); - h = lgl_xml_get_prop_double (node, "h", 0); - - line_width = lgl_xml_get_prop_double (node, "line_width", 0); - - line_color_node = gl_color_node_new_default (); - line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); - - fill_color_node = gl_color_node_new_default (); - fill_color_node->color = lgl_xml_get_prop_uint (node, "fill_color", 0); - - gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); - gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); - gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color_node); - - gl_color_node_free (&line_color_node); - gl_color_node_free (&fill_color_node); - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Line Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml04_parse_line_props (xmlNodePtr node, - glLabelLine *object) -{ - gdouble w, h, line_width; - glColorNode *line_color_node; - - gl_debug (DEBUG_XML, "START"); - - w = lgl_xml_get_prop_double (node, "dx", 0); - h = lgl_xml_get_prop_double (node, "dy", 0); - - line_width = lgl_xml_get_prop_double (node, "line_width", 0); - - line_color_node = gl_color_node_new_default (); - line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); - - gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); - gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); - - gl_color_node_free (&line_color_node); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Ellipse Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml04_parse_ellipse_props (xmlNodePtr node, - glLabelEllipse *object) -{ - gdouble w, h, line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - - gl_debug (DEBUG_XML, "START"); - - w = lgl_xml_get_prop_double (node, "w", 0); - h = lgl_xml_get_prop_double (node, "h", 0); - - line_width = lgl_xml_get_prop_double (node, "line_width", 0); - - line_color_node = gl_color_node_new_default (); - line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); - - fill_color_node = gl_color_node_new_default (); - fill_color_node->color = lgl_xml_get_prop_uint (node, "fill_color", 0); - - gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); - gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); - gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color_node); - - gl_color_node_free (&line_color_node); - gl_color_node_free (&fill_color_node); - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Image Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml04_parse_image_props (xmlNodePtr node, - glLabelImage *object) -{ - gdouble w, h; - glTextNode *filename; - - gl_debug (DEBUG_XML, "START"); - - filename = g_new0 (glTextNode, 1); - filename->field_flag = FALSE; - filename->data = (gchar *)xmlGetProp (node, (xmlChar *)"filename"); - gl_label_image_set_filename (object, filename); - gl_text_node_free (&filename); - - w = lgl_xml_get_prop_double (node, "w", 0); - h = lgl_xml_get_prop_double (node, "h", 0); - gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Label->Barcode Node Properties */ -/*--------------------------------------------------------------------------*/ -static void -xml04_parse_barcode_props (xmlNodePtr node, - glLabelBarcode *object) -{ - xmlChar *id; - gboolean text_flag; - glColorNode *color_node; - gdouble scale; - xmlNodePtr child; - glTextNode *text_node; - - gl_debug (DEBUG_XML, "START"); - - color_node = gl_color_node_new_default (); - color_node->color = lgl_xml_get_prop_uint (node, "color", 0); - - id = xmlGetProp (node, (xmlChar *)"style"); - - text_flag = lgl_xml_get_prop_boolean (node, "text", FALSE); - scale = lgl_xml_get_prop_double (node, "scale", 1.0); - if (scale == 0.0) { - scale = 0.5; /* Set to a valid value */ - } - gl_label_barcode_set_props (object, (gchar *)id, text_flag, TRUE, 0); - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), color_node); - - child = node->xmlChildrenNode; - text_node = g_new0 (glTextNode, 1); - if (xmlStrEqual (child->name, (xmlChar *)"Field")) { - text_node->field_flag = TRUE; - text_node->data = (gchar *)xmlGetProp (child, (xmlChar *)"name"); - } else if (xmlNodeIsText (child)) { - text_node->field_flag = FALSE; - text_node->data = (gchar *)xmlNodeGetContent (child); - } else { - g_message ("Unexpected Barcode child: \"%s\"", child->name); - } - gl_label_barcode_set_data (object, text_node); - - gl_color_node_free (&color_node); - gl_text_node_free (&text_node); - xmlFree (id); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML merge properties tag. */ -/*--------------------------------------------------------------------------*/ -static void -xml04_parse_merge_properties (xmlNodePtr node, - glLabel *label) -{ - glMerge *merge; - xmlChar *string; - - gl_debug (DEBUG_XML, "START"); - - string = xmlGetProp (node, (xmlChar *)"type"); - merge = gl_merge_new ((gchar *)string); - xmlFree (string); - - string = xmlGetProp (node, (xmlChar *)"src"); - gl_merge_set_src (merge, (gchar *)string); - xmlFree (string); - - gl_label_set_merge (label, merge); - - g_object_unref (G_OBJECT(merge)); - - gl_debug (DEBUG_XML, "END"); -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/xml-label-04.h b/glabels2/src/xml-label-04.h deleted file mode 100644 index 81114815..00000000 --- a/glabels2/src/xml-label-04.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * xml-label-04.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __XML_LABEL_04_H__ -#define __XML_LABEL_04_H__ - -#include -#include - -#include "xml-label.h" - -G_BEGIN_DECLS - -extern glLabel *gl_xml_label_04_parse (xmlNodePtr root, - glXMLLabelStatus *status); - -G_END_DECLS - - -#endif /* __XML_LABEL_04_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/xml-label.c b/glabels2/src/xml-label.c deleted file mode 100644 index 12aec421..00000000 --- a/glabels2/src/xml-label.c +++ /dev/null @@ -1,1833 +0,0 @@ -/* - * xml-label.c - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#include - -#include "xml-label.h" - -#include -#include -#include -#include -#include -#include - -#include -#include "label.h" -#include "label-object.h" -#include "label-text.h" -#include "label-box.h" -#include "label-line.h" -#include "label-ellipse.h" -#include "label-image.h" -#include "label-barcode.h" -#include "xml-label-04.h" -#include "str-util.h" - -#include "debug.h" - - -/*========================================================*/ -/* Private macros and constants. */ -/*========================================================*/ -#define COMPAT01_NAME_SPACE "http://snaught.com/glabels/0.1/" -#define COMPAT04_NAME_SPACE "http://snaught.com/glabels/0.4/" -#define COMPAT20_NAME_SPACE "http://snaught.com/glabels/2.0/" - - -/*========================================================*/ -/* Private types. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private globals. */ -/*========================================================*/ - - -/*========================================================*/ -/* Private function prototypes. */ -/*========================================================*/ - -static glLabel *xml_doc_to_label (xmlDocPtr doc, - glXMLLabelStatus *status); - -static glLabel *xml_parse_label (xmlNodePtr root, - glXMLLabelStatus *status); - -static void xml_parse_objects (xmlNodePtr node, - glLabel *label); - -static void xml_parse_object_text (xmlNodePtr node, - glLabel *label); - -static void xml_parse_object_box (xmlNodePtr node, - glLabel *label); - -static void xml_parse_object_ellipse (xmlNodePtr node, - glLabel *label); - -static void xml_parse_object_line (xmlNodePtr node, - glLabel *label); - -static void xml_parse_object_image (xmlNodePtr node, - glLabel *label); - -static void xml_parse_object_barcode (xmlNodePtr node, - glLabel *label); - -static void xml_parse_merge_fields (xmlNodePtr node, - glLabel *label); - -static void xml_parse_data (xmlNodePtr node, - glLabel *label); - -static void xml_parse_pixdata (xmlNodePtr node, - glLabel *label); - -static void xml_parse_toplevel_span (xmlNodePtr node, - glLabelObject *object); - -static void xml_parse_affine_attrs (xmlNodePtr node, - glLabelObject *object); - -static void xml_parse_shadow_attrs (xmlNodePtr node, - glLabelObject *object); - -static xmlDocPtr xml_label_to_doc (glLabel *label, - glXMLLabelStatus *status); - -static void xml_create_objects (xmlNodePtr root, - xmlNsPtr ns, - glLabel *label); - -static void xml_create_object_text (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object); - -static void xml_create_object_box (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object); - -static void xml_create_object_line (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object); - -static void xml_create_object_ellipse(xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object); - -static void xml_create_object_image (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object); - -static void xml_create_object_barcode(xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object); - -static void xml_create_merge_fields (xmlNodePtr root, - xmlNsPtr ns, - glLabel *label); - -static void xml_create_data (xmlNodePtr root, - xmlNsPtr ns, - glLabel *label); - -static void xml_create_pixdata (xmlNodePtr root, - xmlNsPtr ns, - glLabel *label, - gchar *name); - -static void xml_create_toplevel_span (xmlNodePtr node, - xmlNsPtr ns, - glLabelText *object_text); - -static void xml_create_affine_attrs (xmlNodePtr node, - glLabelObject *object); - -static void xml_create_shadow_attrs (xmlNodePtr node, - glLabelObject *object); - - -/****************************************************************************/ -/* Open and read label from xml file. */ -/****************************************************************************/ -glLabel * -gl_xml_label_open (const gchar *utf8_filename, - glXMLLabelStatus *status) -{ - xmlDocPtr doc; - glLabel *label; - gchar *filename; - - gl_debug (DEBUG_XML, "START"); - - filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); - g_return_val_if_fail (filename, NULL); - - doc = xmlReadFile (filename, NULL, XML_PARSE_HUGE); - if (!doc) { - g_message (_("xmlParseFile error")); - *status = XML_LABEL_ERROR_OPEN_PARSE; - return NULL; - } - - xmlXIncludeProcess (doc); - xmlReconciliateNs (doc, xmlDocGetRootElement (doc)); - - label = xml_doc_to_label (doc, status); - - xmlFreeDoc (doc); - - if (label) { - gl_label_set_filename (label, utf8_filename); - gl_label_clear_modified (label); - } - - g_free (filename); - gl_debug (DEBUG_XML, "END"); - - return label; -} - - -/****************************************************************************/ -/* Read label from xml buffer. */ -/****************************************************************************/ -glLabel * -gl_xml_label_open_buffer (const gchar *buffer, - glXMLLabelStatus *status) -{ - xmlDocPtr doc; - glLabel *label; - - gl_debug (DEBUG_XML, "START"); - - doc = xmlReadDoc ((xmlChar *) buffer, NULL, NULL, XML_PARSE_HUGE); - if (!doc) { - g_message (_("xmlParseFile error")); - *status = XML_LABEL_ERROR_OPEN_PARSE; - return NULL; - } - - label = xml_doc_to_label (doc, status); - - xmlFreeDoc (doc); - - if (label) { - gl_label_clear_modified (label); - } - - gl_debug (DEBUG_XML, "END"); - - return label; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse xml doc structure and create label. */ -/*--------------------------------------------------------------------------*/ -static glLabel * -xml_doc_to_label (xmlDocPtr doc, - glXMLLabelStatus *status) -{ - xmlNodePtr root; - glLabel *label; - - gl_debug (DEBUG_XML, "START"); - - LIBXML_TEST_VERSION; - - *status = XML_LABEL_OK; - - root = xmlDocGetRootElement (doc); - if (!root || !root->name) { - g_message (_("No document root")); - *status = XML_LABEL_ERROR_OPEN_PARSE; - return NULL; - } - - /* Try compatability mode 0.1 */ - if (xmlSearchNsByHref (doc, root, (xmlChar *)COMPAT01_NAME_SPACE)) - { - g_message (_("Importing from glabels 0.1 format")); - g_message ("TODO"); - label = NULL; /* TODO */ - return label; - } - - /* Try compatability mode 0.4 */ - if (xmlSearchNsByHref (doc, root, (xmlChar *)COMPAT04_NAME_SPACE)) - { - g_message (_("Importing from glabels 0.4 format")); - label = gl_xml_label_04_parse (root, status); - return label; - } - - /* Test for current namespaces. */ - if ( !xmlSearchNsByHref (doc, root, (xmlChar *)COMPAT20_NAME_SPACE) && - !xmlSearchNsByHref (doc, root, (xmlChar *)LGL_XML_NAME_SPACE) ) - { - g_message (_("Unknown glabels Namespace -- Using %s"), - LGL_XML_NAME_SPACE); - } - - label = xml_parse_label (root, status); - if (label) - { - gl_label_set_compression (label, xmlGetDocCompressMode (doc)); - } - - gl_debug (DEBUG_XML, "END"); - - return label; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse xml root node and create label. */ -/*--------------------------------------------------------------------------*/ -static glLabel * -xml_parse_label (xmlNodePtr root, - glXMLLabelStatus *status) -{ - xmlNodePtr child_node; - glLabel *label; - lglTemplate *template; - - gl_debug (DEBUG_XML, "START"); - - *status = XML_LABEL_OK; - - if (!lgl_xml_is_node (root, "Glabels-document")) { - g_message (_("Bad root node = \"%s\""), root->name); - *status = XML_LABEL_ERROR_OPEN_PARSE; - return NULL; - } - - label = GL_LABEL(gl_label_new ()); - - /* Pass 1, extract data nodes to pre-load cache. */ - for (child_node = root->xmlChildrenNode; child_node != NULL; child_node = child_node->next) { - if (lgl_xml_is_node (child_node, "Data")) { - xml_parse_data (child_node, label); - } - } - - /* Pass 2, now extract everything else. */ - for (child_node = root->xmlChildrenNode; - child_node != NULL; - child_node = child_node->next) { - - if (lgl_xml_is_node (child_node, "Template")) { - template = lgl_xml_template_parse_template_node (child_node); - if (!template) { - g_object_unref (label); - *status = XML_LABEL_UNKNOWN_MEDIA; - return NULL; - } - lgl_db_register_template (template); - gl_label_set_template (label, template); - lgl_template_free (template); - } else if (lgl_xml_is_node (child_node, "Objects")) { - xml_parse_objects (child_node, label); - } else if (lgl_xml_is_node (child_node, "Merge")) { - xml_parse_merge_fields (child_node, label); - } else if (lgl_xml_is_node (child_node, "Data")) { - /* Handled in pass 1. */ - } else { - if (!xmlNodeIsText (child_node)) { - g_message (_("bad node in Document node = \"%s\""), - child_node->name); - g_object_unref (label); - *status = XML_LABEL_ERROR_OPEN_PARSE; - return NULL; - } - } - } - - gl_debug (DEBUG_XML, "END"); - - return label; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse Objects node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_objects (xmlNodePtr node, - glLabel *label) -{ - gboolean rotate_flag; - xmlNodePtr child; - - gl_debug (DEBUG_XML, "START"); - - rotate_flag = lgl_xml_get_prop_boolean (node, "rotate", FALSE); - gl_label_set_rotate_flag (label, rotate_flag); - - for (child = node->xmlChildrenNode; child != NULL; child = child->next) { - - if (lgl_xml_is_node (child, "Object-text")) { - xml_parse_object_text (child, label); - } else if (lgl_xml_is_node (child, "Object-box")) { - xml_parse_object_box (child, label); - } else if (lgl_xml_is_node (child, "Object-ellipse")) { - xml_parse_object_ellipse (child, label); - } else if (lgl_xml_is_node (child, "Object-line")) { - xml_parse_object_line (child, label); - } else if (lgl_xml_is_node (child, "Object-image")) { - xml_parse_object_image (child, label); - } else if (lgl_xml_is_node (child, "Object-barcode")) { - xml_parse_object_barcode (child, label); - } else { - if (!xmlNodeIsText (child)) { - g_message (_("bad node = \"%s\""), child->name); - break; - } - } - } - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Objects->Object-text Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_object_text (xmlNodePtr node, - glLabel *label) -{ - GObject *object; - gdouble x, y; - gdouble w, h; - gchar *string; - PangoAlignment align; - gboolean auto_shrink; - xmlNodePtr child; - - gl_debug (DEBUG_XML, "START"); - - object = gl_label_text_new (label); - - /* position attrs */ - x = lgl_xml_get_prop_length (node, "x", 0.0); - y = lgl_xml_get_prop_length (node, "y", 0.0); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - - /* implied size attrs */ - w = lgl_xml_get_prop_length (node, "w", 0); - h = lgl_xml_get_prop_length (node, "h", 0); - gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); - - /* justify attr */ - string = lgl_xml_get_prop_string (node, "justify", NULL); - align = gl_str_util_string_to_align (string); - g_free (string); - gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object), align); - - /* auto_shrink attr */ - auto_shrink = lgl_xml_get_prop_boolean (node, "auto_shrink", FALSE); - gl_label_text_set_auto_shrink (GL_LABEL_TEXT(object), auto_shrink); - - /* affine attrs */ - xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); - - /* shadow attrs */ - xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); - - /* Process children */ - for (child = node->xmlChildrenNode; child != NULL; child = child->next) { - if (lgl_xml_is_node (child, "Span")) { - xml_parse_toplevel_span (child, GL_LABEL_OBJECT(object)); - break; - } else { - if (!xmlNodeIsText (child)) { - g_message ("Unexpected Object-text child: \"%s\"", - child->name); - } - } - } - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Objects->Object-box Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_object_box (xmlNodePtr node, - glLabel *label) -{ - GObject *object; - gdouble x, y; - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - gchar *string; - glColorNode *fill_color_node; - - gl_debug (DEBUG_XML, "START"); - - object = gl_label_box_new (label); - - /* position attrs */ - x = lgl_xml_get_prop_length (node, "x", 0.0); - y = lgl_xml_get_prop_length (node, "y", 0.0); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - - /* size attrs */ - w = lgl_xml_get_prop_length (node, "w", 0); - h = lgl_xml_get_prop_length (node, "h", 0); - gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); - - /* line attrs */ - line_width = lgl_xml_get_prop_length (node, "line_width", 1.0); - gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); - - line_color_node = gl_color_node_new_default (); - string = lgl_xml_get_prop_string (node, "line_color_field", NULL); - if ( string ) { - line_color_node->field_flag = TRUE; - line_color_node->key = string; - } else { - line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); - } - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); - gl_color_node_free (&line_color_node); - - - /* fill attrs */ - fill_color_node = gl_color_node_new_default (); - string = lgl_xml_get_prop_string (node, "fill_color_field", NULL); - if ( string ) { - fill_color_node->field_flag = TRUE; - fill_color_node->key = string; - } else { - fill_color_node->color = lgl_xml_get_prop_uint (node, "fill_color", 0); - } - gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color_node); - gl_color_node_free (&fill_color_node); - - /* affine attrs */ - xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); - - /* shadow attrs */ - xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Objects->Object-ellipse Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_object_ellipse (xmlNodePtr node, - glLabel *label) -{ - GObject *object; - gdouble x, y; - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - gchar *string; - glColorNode *fill_color_node; - - gl_debug (DEBUG_XML, "START"); - - object = gl_label_ellipse_new (label); - - /* position attrs */ - x = lgl_xml_get_prop_length (node, "x", 0.0); - y = lgl_xml_get_prop_length (node, "y", 0.0); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - - /* size attrs */ - w = lgl_xml_get_prop_length (node, "w", 0); - h = lgl_xml_get_prop_length (node, "h", 0); - gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); - - /* line attrs */ - line_width = lgl_xml_get_prop_length (node, "line_width", 1.0); - gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); - - line_color_node = gl_color_node_new_default (); - string = lgl_xml_get_prop_string (node, "line_color_field", NULL); - if ( string ) { - line_color_node->field_flag = TRUE; - line_color_node->key = string; - } else { - line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); - } - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); - gl_color_node_free (&line_color_node); - - - /* fill attrs */ - fill_color_node = gl_color_node_new_default (); - string = lgl_xml_get_prop_string (node, "fill_color_field", NULL); - if ( string ) { - fill_color_node->field_flag = TRUE; - fill_color_node->key = string; - } else { - fill_color_node->color = lgl_xml_get_prop_uint (node, "fill_color", 0); - } - gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color_node); - gl_color_node_free (&fill_color_node); - - /* affine attrs */ - xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); - - /* shadow attrs */ - xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Objects->Object-line Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_object_line (xmlNodePtr node, - glLabel *label) -{ - GObject *object; - gdouble x, y; - gdouble dx, dy; - gdouble line_width; - glColorNode *line_color_node; - gchar *string; - - gl_debug (DEBUG_XML, "START"); - - object = gl_label_line_new (label); - - /* position attrs */ - x = lgl_xml_get_prop_length (node, "x", 0.0); - y = lgl_xml_get_prop_length (node, "y", 0.0); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - - /* length attrs */ - dx = lgl_xml_get_prop_length (node, "dx", 0); - dy = lgl_xml_get_prop_length (node, "dy", 0); - gl_label_object_set_size (GL_LABEL_OBJECT(object), dx, dy); - - /* line attrs */ - line_width = lgl_xml_get_prop_length (node, "line_width", 1.0); - gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); - - line_color_node = gl_color_node_new_default (); - string = lgl_xml_get_prop_string (node, "line_color_field", NULL); - if ( string ) { - line_color_node->field_flag = TRUE; - line_color_node->key = string; - } else { - line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); - } - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); - gl_color_node_free (&line_color_node); - - /* affine attrs */ - xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); - - /* shadow attrs */ - xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Objects->Object-image Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_object_image (xmlNodePtr node, - glLabel *label) -{ - GObject *object; - gdouble x, y; - gdouble w, h; - gchar *string; - glTextNode *filename; - - gl_debug (DEBUG_XML, "START"); - - object = gl_label_image_new (label); - - /* position attrs */ - x = lgl_xml_get_prop_length (node, "x", 0.0); - y = lgl_xml_get_prop_length (node, "y", 0.0); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - - /* src or field attr */ - string = lgl_xml_get_prop_string (node, "src", NULL); - if ( string ) { - filename = g_new0 (glTextNode, 1); - filename->field_flag = FALSE; - filename->data = g_strdup ((gchar *)string); - gl_label_image_set_filename (GL_LABEL_IMAGE(object), filename); - gl_text_node_free (&filename); - xmlFree (string); - } else { - string = lgl_xml_get_prop_string (node, "field", NULL); - if ( string ) { - filename = g_new0 (glTextNode, 1); - filename->field_flag = TRUE; - filename->data = g_strdup ((gchar *)string); - gl_label_image_set_filename (GL_LABEL_IMAGE(object), filename); - gl_text_node_free (&filename); - xmlFree (string); - } else { - g_message ("Missing Object-image src or field attr"); - } - } - - /* size attrs */ - w = lgl_xml_get_prop_length (node, "w", 0); - h = lgl_xml_get_prop_length (node, "h", 0); - gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); - - /* affine attrs */ - xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); - - /* shadow attrs */ - xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML Objects->Object-barcode Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_object_barcode (xmlNodePtr node, - glLabel *label) -{ - GObject *object; - gdouble x, y; - gdouble w, h; - gchar *string; - glTextNode *text_node; - gchar *id; - gboolean text_flag; - gboolean checksum_flag; - glColorNode *color_node; - guint format_digits; - - gl_debug (DEBUG_XML, "START"); - - object = gl_label_barcode_new (label); - - /* position attrs */ - x = lgl_xml_get_prop_length (node, "x", 0.0); - y = lgl_xml_get_prop_length (node, "y", 0.0); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); - - /* size attrs */ - w = lgl_xml_get_prop_length (node, "w", 0); - h = lgl_xml_get_prop_length (node, "h", 0); - gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); - - /* prop attrs */ - id = lgl_xml_get_prop_string (node, "style", NULL); - text_flag = lgl_xml_get_prop_boolean (node, "text", FALSE); - checksum_flag = lgl_xml_get_prop_boolean (node, "checksum", TRUE); - format_digits = lgl_xml_get_prop_uint (node, "format", 10); - gl_label_barcode_set_props (GL_LABEL_BARCODE(object), - (gchar *)id, text_flag, checksum_flag, format_digits); - g_free (id); - - color_node = gl_color_node_new_default (); - string = lgl_xml_get_prop_string (node, "color_field", NULL); - if ( string ) { - color_node->field_flag = TRUE; - color_node->key = string; - } else { - color_node->color = lgl_xml_get_prop_uint (node, "color", 0); - } - gl_label_object_set_line_color (GL_LABEL_OBJECT(object), color_node); - gl_color_node_free (&color_node); - - /* data or field attr */ - string = lgl_xml_get_prop_string (node, "data", NULL); - if ( string ) { - text_node = g_new0 (glTextNode, 1); - text_node->field_flag = FALSE; - text_node->data = string; - gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node); - gl_text_node_free (&text_node); - } else { - string = lgl_xml_get_prop_string (node, "field", NULL); - if ( string ) { - text_node = g_new0 (glTextNode, 1); - text_node->field_flag = TRUE; - text_node->data = string; - gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node); - gl_text_node_free (&text_node); - } else { - g_message ("Missing Object-barcode data or field attr"); - } - } - - /* affine attrs */ - xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); - - /* shadow attrs */ - xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML merge fields tag. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_merge_fields (xmlNodePtr node, - glLabel *label) -{ - gchar *string; - glMerge *merge; - - gl_debug (DEBUG_XML, "START"); - - string = lgl_xml_get_prop_string (node, "type", NULL); - merge = gl_merge_new (string); - g_free (string); - - string = lgl_xml_get_prop_string (node, "src", NULL); - gl_merge_set_src (merge, string); - g_free (string); - - gl_label_set_merge (label, merge); - - g_object_unref (G_OBJECT(merge)); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML data tag. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_data (xmlNodePtr node, - glLabel *label) -{ - xmlNodePtr child; - - gl_debug (DEBUG_XML, "START"); - - for (child = node->xmlChildrenNode; child != NULL; child = child->next) { - - if (lgl_xml_is_node (child, "Pixdata")) { - xml_parse_pixdata (child, label); - } else { - if (!xmlNodeIsText (child)) { - g_message (_("bad node in Data node = \"%s\""), - child->name); - } - } - } - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse XML pixbuf data tag. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_pixdata (xmlNodePtr node, - glLabel *label) -{ - gchar *name, *base64; - guchar *stream; - gsize stream_length; - gboolean ret; - GdkPixdata *pixdata; - GdkPixbuf *pixbuf; - GHashTable *pixbuf_cache; - - gl_debug (DEBUG_XML, "START"); - - name = lgl_xml_get_prop_string (node, "name", NULL); - base64 = lgl_xml_get_node_content (node); - - stream = g_base64_decode ((gchar *)base64, &stream_length); - pixdata = g_new0 (GdkPixdata, 1); - ret = gdk_pixdata_deserialize (pixdata, stream_length, stream, NULL); - - if (ret) { - pixbuf = gdk_pixbuf_from_pixdata (pixdata, TRUE, NULL); - - pixbuf_cache = gl_label_get_pixbuf_cache (label); - gl_pixbuf_cache_add_pixbuf (pixbuf_cache, (gchar *)name, pixbuf); - } - - g_free (name); - g_free (base64); - - g_free (stream); - g_free (pixdata); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse top-level Span tag. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_toplevel_span (xmlNodePtr node, - glLabelObject *object) -{ - gchar *font_family; - gdouble font_size; - PangoWeight font_weight; - gboolean font_italic_flag; - glColorNode *color_node; - gdouble text_line_spacing; - gchar *string; - GList *lines, *text_nodes; - xmlNodePtr child; - glTextNode *text_node; - - gl_debug (DEBUG_XML, "START"); - - /* Font family attr */ - font_family = lgl_xml_get_prop_string (node, "font_family", "Sans"); - gl_label_object_set_font_family (object, font_family); - g_free (font_family); - - /* Font size attr */ - font_size = lgl_xml_get_prop_double (node, "font_size", 0.0); - gl_label_object_set_font_size (object, font_size); - - /* Font weight attr */ - string = lgl_xml_get_prop_string (node, "font_weight", NULL); - font_weight = gl_str_util_string_to_weight (string); - g_free (string); - gl_label_object_set_font_weight (object, font_weight); - - /* Font italic flag attr */ - font_italic_flag = lgl_xml_get_prop_boolean (node, "font_italic", FALSE); - gl_label_object_set_font_italic_flag (object, font_italic_flag); - - /* Text color attr */ - color_node = gl_color_node_new_default (); - string = lgl_xml_get_prop_string (node, "color_field", NULL); - if ( string ) { - color_node->field_flag = TRUE; - color_node->key = string; - } else { - color_node->color = lgl_xml_get_prop_uint (node, "color", 0); - } - gl_label_object_set_text_color (object, color_node); - gl_color_node_free (&color_node); - - - /* Text line spacing attr */ - text_line_spacing = lgl_xml_get_prop_double (node, "line_spacing", 1.0); - gl_label_object_set_text_line_spacing (object, text_line_spacing); - - /* Now descend children, and build lines of text nodes */ - lines = NULL; - text_nodes = NULL; - for (child = node->xmlChildrenNode; child != NULL; child = child->next) { - - if (xmlNodeIsText (child)) { - gchar *data = lgl_xml_get_node_content (child); - - /* Hack: if the first char is LF, it's an xml formatting string */ - if (data[0] != '\n') { - /* Literal text */ - text_node = g_new0 (glTextNode, 1); - text_node->field_flag = FALSE; - text_node->data = g_strdup ((gchar *)data); - text_nodes = g_list_append (text_nodes, text_node); - } - g_free (data); - - } else if (lgl_xml_is_node (child, "Span")) { - - g_message ("Unexpected rich text (not supported, yet!)"); - - } else if (lgl_xml_is_node (child, "Field")) { - - /* Field node */ - string = lgl_xml_get_prop_string (child, "name", NULL); - text_node = g_new0 (glTextNode, 1); - text_node->field_flag = TRUE; - text_node->data = string; - text_nodes = g_list_append (text_nodes, text_node); - - } else if (lgl_xml_is_node (child, "NL")) { - - /* Store line. */ - lines = g_list_append (lines, text_nodes); - text_nodes = NULL; - - } else { - g_message ("Unexpected Span child: \"%s\"", child->name); - } - - } - if ( text_nodes ) { - /* Store last line. */ - lines = g_list_append (lines, text_nodes); - text_nodes = NULL; - } - gl_label_text_set_lines (GL_LABEL_TEXT(object), lines); - gl_text_node_lines_free (&lines); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse affine attributes. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_affine_attrs (xmlNodePtr node, - glLabelObject *object) -{ - gdouble a[6]; - cairo_matrix_t matrix; - - a[0] = lgl_xml_get_prop_double (node, "a0", 0.0); - a[1] = lgl_xml_get_prop_double (node, "a1", 0.0); - a[2] = lgl_xml_get_prop_double (node, "a2", 0.0); - a[3] = lgl_xml_get_prop_double (node, "a3", 0.0); - a[4] = lgl_xml_get_prop_double (node, "a4", 0.0); - a[5] = lgl_xml_get_prop_double (node, "a5", 0.0); - - cairo_matrix_init (&matrix, a[0], a[1], a[2], a[3], a[4], a[5]); - - gl_label_object_set_matrix (object, &matrix); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Parse shadow attributes. */ -/*--------------------------------------------------------------------------*/ -static void -xml_parse_shadow_attrs (xmlNodePtr node, - glLabelObject *object) -{ - gboolean shadow_state; - gdouble shadow_x; - gdouble shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - gchar *string; - - shadow_state = lgl_xml_get_prop_boolean (node, "shadow", FALSE); - gl_label_object_set_shadow_state (object, shadow_state); - - if (shadow_state) - { - shadow_x = lgl_xml_get_prop_length (node, "shadow_x", 0.0); - shadow_y = lgl_xml_get_prop_length (node, "shadow_y", 0.0); - gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); - - shadow_color_node = gl_color_node_new_default (); - string = lgl_xml_get_prop_string (node, "shadow_color_field", NULL); - if ( string ) { - shadow_color_node->field_flag = TRUE; - shadow_color_node->key = string; - } else { - shadow_color_node->color = lgl_xml_get_prop_uint (node, "shadow_color", 0); - } - gl_label_object_set_shadow_color (object, shadow_color_node); - gl_color_node_free (&shadow_color_node); - - shadow_opacity = lgl_xml_get_prop_double (node, "shadow_opacity", 1.0); - gl_label_object_set_shadow_opacity (object, shadow_opacity); - } -} - - -/****************************************************************************/ -/* Save label to xml label file. */ -/****************************************************************************/ -void -gl_xml_label_save (glLabel *label, - const gchar *utf8_filename, - glXMLLabelStatus *status) -{ - xmlDocPtr doc; - gint xml_ret; - gchar *filename; - - gl_debug (DEBUG_XML, "START"); - - doc = xml_label_to_doc (label, status); - - filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); - if (!filename) - g_message (_("Utf8 conversion error.")); - else { - xmlSetDocCompressMode (doc, gl_label_get_compression (label)); - xml_ret = xmlSaveFormatFile (filename, doc, TRUE); - xmlFreeDoc (doc); - if (xml_ret == -1) { - - g_message (_("Problem saving xml file.")); - *status = XML_LABEL_ERROR_SAVE_FILE; - - } else { - - gl_label_set_filename (label, utf8_filename); - gl_label_clear_modified (label); - - } - g_free (filename); - } - - gl_debug (DEBUG_XML, "END"); -} - - -/****************************************************************************/ -/* Save label to xml buffer. */ -/****************************************************************************/ -gchar * -gl_xml_label_save_buffer (glLabel *label, - glXMLLabelStatus *status) -{ - xmlDocPtr doc; - gint size; - guchar *buffer; - - gl_debug (DEBUG_XML, "START"); - - doc = xml_label_to_doc (label, status); - - xmlDocDumpMemory (doc, &buffer, &size); - xmlFreeDoc (doc); - - gl_label_clear_modified (label); - - gl_debug (DEBUG_XML, "END"); - - return (gchar *)buffer; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Convert label to xml doc structure. */ -/*--------------------------------------------------------------------------*/ -static xmlDocPtr -xml_label_to_doc (glLabel *label, - glXMLLabelStatus *status) -{ - xmlDocPtr doc; - xmlNsPtr ns; - glMerge *merge; - - gl_debug (DEBUG_XML, "START"); - - LIBXML_TEST_VERSION; - - doc = xmlNewDoc ((xmlChar *)"1.0"); - doc->xmlRootNode = xmlNewDocNode (doc, NULL, (xmlChar *)"Glabels-document", NULL); - - ns = xmlNewNs (doc->xmlRootNode, (xmlChar *)LGL_XML_NAME_SPACE, NULL); - xmlSetNs (doc->xmlRootNode, ns); - - lgl_xml_template_create_template_node (label->template, doc->xmlRootNode, ns); - - xml_create_objects (doc->xmlRootNode, ns, label); - - merge = gl_label_get_merge (label); - gl_debug (DEBUG_XML, "merge=%p", merge); - if (merge != NULL) { - xml_create_merge_fields (doc->xmlRootNode, ns, label); - g_object_unref (G_OBJECT(merge)); - } - - xml_create_data (doc->xmlRootNode, ns, label); - - gl_debug (DEBUG_XML, "END"); - - *status = XML_LABEL_OK; - return doc; -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Objects Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_objects (xmlNodePtr root, - xmlNsPtr ns, - glLabel *label) -{ - xmlNodePtr node; - GList *p; - glLabelObject *object; - - gl_debug (DEBUG_XML, "START"); - - node = xmlNewChild (root, ns, (xmlChar *)"Objects", NULL); - lgl_xml_set_prop_string (node, "id", "0"); - lgl_xml_set_prop_boolean (node, "rotate", label->rotate_flag); - - for (p = label->objects; p != NULL; p = p->next) { - - object = GL_LABEL_OBJECT(p->data); - - if ( GL_IS_LABEL_TEXT(object) ) { - xml_create_object_text (node, ns, object); - } else if ( GL_IS_LABEL_BOX(object) ) { - xml_create_object_box (node, ns, object); - } else if ( GL_IS_LABEL_ELLIPSE(object) ) { - xml_create_object_ellipse (node, ns, object); - } else if ( GL_IS_LABEL_LINE(object) ) { - xml_create_object_line (node, ns, object); - } else if ( GL_IS_LABEL_IMAGE(object) ) { - xml_create_object_image (node, ns, object); - } else if ( GL_IS_LABEL_BARCODE(object) ) { - xml_create_object_barcode (node, ns, object); - } else { - g_message ("Unknown label object"); - } - - } - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Objects->Object-text Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_object_text (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object) -{ - xmlNodePtr node; - gdouble x, y; - gdouble w, h; - PangoAlignment align; - gboolean auto_shrink; - - gl_debug (DEBUG_XML, "START"); - - node = xmlNewChild (root, ns, (xmlChar *)"Object-text", NULL); - - /* position attrs */ - gl_label_object_get_position (object, &x, &y); - lgl_xml_set_prop_length (node, "x", x); - lgl_xml_set_prop_length (node, "y", y); - - /* size attrs */ - gl_label_object_get_raw_size ( object, &w, &h); - lgl_xml_set_prop_length (node, "w", w); - lgl_xml_set_prop_length (node, "h", h); - - /* justify attr */ - align = gl_label_object_get_text_alignment (object); - lgl_xml_set_prop_string (node, "justify", gl_str_util_align_to_string (align)); - - /* auto_shrink attr */ - auto_shrink = gl_label_text_get_auto_shrink (GL_LABEL_TEXT (object)); - lgl_xml_set_prop_boolean (node, "auto_shrink", auto_shrink); - - /* affine attrs */ - xml_create_affine_attrs (node, object); - - /* shadow attrs */ - xml_create_shadow_attrs (node, object); - - /* Add children */ - xml_create_toplevel_span (node, ns, GL_LABEL_TEXT(object)); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Objects->Object-box Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_object_box (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object) -{ - xmlNodePtr node; - gdouble x, y; - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - - gl_debug (DEBUG_XML, "START"); - - node = xmlNewChild (root, ns, (xmlChar *)"Object-box", NULL); - - /* position attrs */ - gl_label_object_get_position (object, &x, &y); - lgl_xml_set_prop_length (node, "x", x); - lgl_xml_set_prop_length (node, "y", y); - - /* size attrs */ - gl_label_object_get_size (object, &w, &h); - lgl_xml_set_prop_length (node, "w", w); - lgl_xml_set_prop_length (node, "h", h); - - /* line attrs */ - line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); - lgl_xml_set_prop_length (node, "line_width", line_width); - - line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); - if (line_color_node->field_flag) - { - lgl_xml_set_prop_string (node, "line_color_field", line_color_node->key); - } - else - { - lgl_xml_set_prop_uint_hex (node, "line_color", line_color_node->color); - } - gl_color_node_free (&line_color_node); - - /* fill attrs (color or field) */ - fill_color_node = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object)); - if (fill_color_node->field_flag) - { - lgl_xml_set_prop_string (node, "fill_color_field", fill_color_node->key); - } - else - { - lgl_xml_set_prop_uint_hex (node, "fill_color", fill_color_node->color); - } - gl_color_node_free (&fill_color_node); - - /* affine attrs */ - xml_create_affine_attrs (node, object); - - /* shadow attrs */ - xml_create_shadow_attrs (node, object); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Objects->Object-ellipse Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_object_ellipse (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object) -{ - xmlNodePtr node; - gdouble x, y; - gdouble w, h; - gdouble line_width; - glColorNode *line_color_node; - glColorNode *fill_color_node; - - gl_debug (DEBUG_XML, "START"); - - node = xmlNewChild (root, ns, (xmlChar *)"Object-ellipse", NULL); - - /* position attrs */ - gl_label_object_get_position (object, &x, &y); - lgl_xml_set_prop_length (node, "x", x); - lgl_xml_set_prop_length (node, "y", y); - - /* size attrs */ - gl_label_object_get_size (object, &w, &h); - lgl_xml_set_prop_length (node, "w", w); - lgl_xml_set_prop_length (node, "h", h); - - /* line attrs */ - line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); - lgl_xml_set_prop_length (node, "line_width", line_width); - - line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); - if (line_color_node->field_flag) - { - lgl_xml_set_prop_string (node, "line_color_field", line_color_node->key); - } - else - { - lgl_xml_set_prop_uint_hex (node, "line_color", line_color_node->color); - } - gl_color_node_free (&line_color_node); - - - /* fill attrs (color or field) */ - fill_color_node = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object)); - if (fill_color_node->field_flag) - { - lgl_xml_set_prop_string (node, "fill_color_field", fill_color_node->key); - } - else - { - lgl_xml_set_prop_uint_hex (node, "fill_color", fill_color_node->color); - } - gl_color_node_free (&fill_color_node); - - /* affine attrs */ - xml_create_affine_attrs (node, object); - - /* shadow attrs */ - xml_create_shadow_attrs (node, object); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Objects->Object-line Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_object_line (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object) -{ - xmlNodePtr node; - gdouble x, y; - gdouble dx, dy; - gdouble line_width; - glColorNode *line_color_node; - - gl_debug (DEBUG_XML, "START"); - - node = xmlNewChild (root, ns, (xmlChar *)"Object-line", NULL); - - /* position attrs */ - gl_label_object_get_position (object, &x, &y); - lgl_xml_set_prop_length (node, "x", x); - lgl_xml_set_prop_length (node, "y", y); - - /* length attrs */ - gl_label_object_get_size (object, &dx, &dy); - lgl_xml_set_prop_length (node, "dx", dx); - lgl_xml_set_prop_length (node, "dy", dy); - - /* line attrs */ - line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); - lgl_xml_set_prop_length (node, "line_width", line_width); - - line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); - if (line_color_node->field_flag) - { - lgl_xml_set_prop_string (node, "line_color_field", line_color_node->key); - } - else - { - lgl_xml_set_prop_uint_hex (node, "line_color", line_color_node->color); - } - gl_color_node_free (&line_color_node); - - - /* affine attrs */ - xml_create_affine_attrs (node, object); - - /* shadow attrs */ - xml_create_shadow_attrs (node, object); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Objects->Object-image Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_object_image (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object) -{ - xmlNodePtr node; - gdouble x, y; - gdouble w, h; - glTextNode *filename; - - gl_debug (DEBUG_XML, "START"); - - node = xmlNewChild (root, ns, (xmlChar *)"Object-image", NULL); - - /* position attrs */ - gl_label_object_get_position (object, &x, &y); - lgl_xml_set_prop_length (node, "x", x); - lgl_xml_set_prop_length (node, "y", y); - - /* size attrs */ - gl_label_object_get_size (object, &w, &h); - lgl_xml_set_prop_length (node, "w", w); - lgl_xml_set_prop_length (node, "h", h); - - /* src OR field attr */ - filename = gl_label_image_get_filename (GL_LABEL_IMAGE(object)); - if (filename->field_flag) { - lgl_xml_set_prop_string (node, "field", filename->data); - } else { - lgl_xml_set_prop_string (node, "src", filename->data); - } - gl_text_node_free (&filename); - - /* affine attrs */ - xml_create_affine_attrs (node, object); - - /* shadow attrs */ - xml_create_shadow_attrs (node, object); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Objects->Object-barcode Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_object_barcode (xmlNodePtr root, - xmlNsPtr ns, - glLabelObject *object) -{ - xmlNodePtr node; - gdouble x, y; - gdouble w, h; - glTextNode *text_node; - gchar *id; - gboolean text_flag; - gboolean checksum_flag; - glColorNode *color_node; - guint format_digits; - - gl_debug (DEBUG_XML, "START"); - - node = xmlNewChild (root, ns, (xmlChar *)"Object-barcode", NULL); - - /* position attrs */ - gl_label_object_get_position (object, &x, &y); - lgl_xml_set_prop_length (node, "x", x); - lgl_xml_set_prop_length (node, "y", y); - - /* size attrs */ - gl_label_object_get_raw_size (object, &w, &h); - lgl_xml_set_prop_length (node, "w", w); - lgl_xml_set_prop_length (node, "h", h); - - /* Barcode properties attrs */ - gl_label_barcode_get_props (GL_LABEL_BARCODE(object), - &id, &text_flag, &checksum_flag, &format_digits); - lgl_xml_set_prop_string (node, "style", id); - lgl_xml_set_prop_boolean (node, "text", text_flag); - lgl_xml_set_prop_boolean (node, "checksum", checksum_flag); - - g_free (id); - - color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); - if (color_node->field_flag) - { - lgl_xml_set_prop_string (node, "color_field", color_node->key); - } - else - { - lgl_xml_set_prop_uint_hex (node, "color", color_node->color); - } - gl_color_node_free (&color_node); - - - /* data OR field attr */ - text_node = gl_label_barcode_get_data (GL_LABEL_BARCODE(object)); - if (text_node->field_flag) { - lgl_xml_set_prop_string (node, "field", text_node->data); - lgl_xml_set_prop_int (node, "format", format_digits); - } else { - lgl_xml_set_prop_string (node, "data", text_node->data); - } - gl_text_node_free (&text_node); - - /* affine attrs */ - xml_create_affine_attrs (node, object); - - /* shadow attrs */ - xml_create_shadow_attrs (node, object); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label Merge Fields Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_merge_fields (xmlNodePtr root, - xmlNsPtr ns, - glLabel *label) -{ - xmlNodePtr node; - gchar *string; - glMerge *merge; - - gl_debug (DEBUG_XML, "START"); - - merge = gl_label_get_merge (label); - - node = xmlNewChild (root, ns, (xmlChar *)"Merge", NULL); - - string = gl_merge_get_name (merge); - lgl_xml_set_prop_string (node, "type", string); - g_free (string); - - string = gl_merge_get_src (merge); - lgl_xml_set_prop_string (node, "src", string); - g_free (string); - - g_object_unref (G_OBJECT(merge)); - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label Data Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_data (xmlNodePtr root, - xmlNsPtr ns, - glLabel *label) -{ - xmlNodePtr node; - GList *name_list, *p; - GHashTable *pixbuf_cache; - - gl_debug (DEBUG_XML, "START"); - - node = xmlNewChild (root, ns, (xmlChar *)"Data", NULL); - - pixbuf_cache = gl_label_get_pixbuf_cache (label); - name_list = gl_pixbuf_cache_get_name_list (pixbuf_cache); - - for (p = name_list; p != NULL; p=p->next) { - xml_create_pixdata (node, ns, label, p->data); - } - - gl_pixbuf_cache_free_name_list (name_list); - - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Add XML Label Data Pixbuf Node */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_pixdata (xmlNodePtr root, - xmlNsPtr ns, - glLabel *label, - gchar *name) -{ - xmlNodePtr node; - GHashTable *pixbuf_cache; - GdkPixbuf *pixbuf; - GdkPixdata *pixdata; - guchar *stream; - guint stream_length; - gchar *base64; - - gl_debug (DEBUG_XML, "START"); - - pixbuf_cache = gl_label_get_pixbuf_cache (label); - - pixbuf = gl_pixbuf_cache_get_pixbuf (pixbuf_cache, name); - if ( pixbuf != NULL ) { - - pixdata = g_new0 (GdkPixdata, 1); - gdk_pixdata_from_pixbuf (pixdata, pixbuf, FALSE); - stream = gdk_pixdata_serialize (pixdata, &stream_length); - base64 = g_base64_encode (stream, stream_length); - - node = xmlNewChild (root, ns, (xmlChar *)"Pixdata", (xmlChar *)base64); - lgl_xml_set_prop_string (node, "name", name); - lgl_xml_set_prop_string (node, "encoding", "Base64"); - - gl_pixbuf_cache_remove_pixbuf (pixbuf_cache, name); - - g_free (pixdata); - g_free (stream); - g_free (base64); - } - - - gl_debug (DEBUG_XML, "END"); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Create top-level Span node. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_toplevel_span (xmlNodePtr root, - xmlNsPtr ns, - glLabelText *object_text) -{ - xmlNodePtr node; - gchar *font_family; - gdouble font_size; - PangoWeight font_weight; - gboolean font_italic_flag; - glColorNode *color_node; - PangoAlignment align; - gdouble text_line_spacing; - GList *lines, *p_line, *p_node; - glTextNode *text_node; - xmlNodePtr child; - - node = xmlNewChild (root, ns, (xmlChar *)"Span", NULL); - - /* All span attrs at top level. */ - font_family = gl_label_object_get_font_family (GL_LABEL_OBJECT(object_text)); - font_size = gl_label_object_get_font_size (GL_LABEL_OBJECT(object_text)); - text_line_spacing = gl_label_object_get_text_line_spacing (GL_LABEL_OBJECT(object_text)); - font_weight = gl_label_object_get_font_weight (GL_LABEL_OBJECT(object_text)); - font_italic_flag = gl_label_object_get_font_italic_flag (GL_LABEL_OBJECT(object_text)); - - color_node = gl_label_object_get_text_color (GL_LABEL_OBJECT(object_text)); - if (color_node->field_flag) - { - lgl_xml_set_prop_string (node, "color_field", color_node->key); - } - else - { - lgl_xml_set_prop_uint_hex (node, "color", color_node->color); - } - gl_color_node_free (&color_node); - - align = gl_label_object_get_text_alignment (GL_LABEL_OBJECT(object_text)); - lgl_xml_set_prop_string (node, "font_family", font_family); - lgl_xml_set_prop_double (node, "font_size", font_size); - lgl_xml_set_prop_string (node, "font_weight", gl_str_util_weight_to_string (font_weight)); - lgl_xml_set_prop_boolean (node, "font_italic", font_italic_flag); - - lgl_xml_set_prop_double (node, "line_spacing", text_line_spacing); - - /* Build children. */ - lines = gl_label_text_get_lines (GL_LABEL_TEXT(object_text)); - 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; - - if (text_node->field_flag) { - child = xmlNewChild (node, ns, (xmlChar *)"Field", NULL); - lgl_xml_set_prop_string (child, "name", text_node->data); - } else { - xmlNodeAddContent (node, (xmlChar *)text_node->data); - } - - } - - if ( p_line->next ) { - child = xmlNewChild (node, ns, (xmlChar *)"NL", NULL); - } - - } - - gl_text_node_lines_free (&lines); - g_free (font_family); - -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Create affine attributes. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_affine_attrs (xmlNodePtr node, - glLabelObject *object) -{ - cairo_matrix_t matrix; - - gl_label_object_get_matrix (object, &matrix); - - lgl_xml_set_prop_double (node, "a0", matrix.xx); - lgl_xml_set_prop_double (node, "a1", matrix.yx); - lgl_xml_set_prop_double (node, "a2", matrix.xy); - lgl_xml_set_prop_double (node, "a3", matrix.yy); - lgl_xml_set_prop_double (node, "a4", matrix.x0); - lgl_xml_set_prop_double (node, "a5", matrix.y0); -} - - -/*--------------------------------------------------------------------------*/ -/* PRIVATE. Create shadow attributes. */ -/*--------------------------------------------------------------------------*/ -static void -xml_create_shadow_attrs (xmlNodePtr node, - glLabelObject *object) -{ - gboolean shadow_state; - gdouble shadow_x; - gdouble shadow_y; - glColorNode *shadow_color_node; - gdouble shadow_opacity; - - shadow_state = gl_label_object_get_shadow_state (object); - - if (shadow_state) - { - lgl_xml_set_prop_boolean (node, "shadow", shadow_state); - - gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); - lgl_xml_set_prop_length (node, "shadow_x", shadow_x); - lgl_xml_set_prop_length (node, "shadow_y", shadow_y); - - shadow_color_node = gl_label_object_get_shadow_color (object); - if (shadow_color_node->field_flag) - { - lgl_xml_set_prop_string (node, "shadow_color_field", shadow_color_node->key); - } - else - { - lgl_xml_set_prop_uint_hex (node, "shadow_color", shadow_color_node->color); - } - gl_color_node_free (&shadow_color_node); - - shadow_opacity = gl_label_object_get_shadow_opacity (object); - lgl_xml_set_prop_double (node, "shadow_opacity", shadow_opacity); - } -} - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/src/xml-label.h b/glabels2/src/xml-label.h deleted file mode 100644 index 21730c51..00000000 --- a/glabels2/src/xml-label.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * xml-label.h - * Copyright (C) 2001-2009 Jim Evins . - * - * This file is part of gLabels. - * - * 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 3 of the License, or - * (at your option) any later version. - * - * gLabels 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 gLabels. If not, see . - */ - -#ifndef __XML_LABEL_H__ -#define __XML_LABEL_H__ - -#include "label.h" - -G_BEGIN_DECLS - - -typedef enum { - XML_LABEL_UNKNOWN_MEDIA = 1, - XML_LABEL_OK = 0, - XML_LABEL_ERROR_OPEN_PARSE = -10, - XML_LABEL_ERROR_SAVE_FILE = -20, -} glXMLLabelStatus; - - -extern glLabel *gl_xml_label_open (const gchar * filename, - glXMLLabelStatus *status); -extern glLabel *gl_xml_label_open_buffer (const gchar * buffer, - glXMLLabelStatus *status); - -extern void gl_xml_label_save (glLabel * label, - const gchar * filename, - glXMLLabelStatus *status); -extern gchar *gl_xml_label_save_buffer (glLabel * label, - glXMLLabelStatus *status); - - -G_END_DECLS - - -#endif /* __XML_LABEL_H__ */ - - - -/* - * Local Variables: -- emacs - * mode: C -- emacs - * c-basic-offset: 8 -- emacs - * tab-width: 8 -- emacs - * indent-tabs-mode: nil -- emacs - * End: -- emacs - */ diff --git a/glabels2/templates/Makefile.am b/glabels2/templates/Makefile.am deleted file mode 100644 index e740e61b..00000000 --- a/glabels2/templates/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -## Process this file with automake to produce Makefile.in - -dtddir = $(datadir)/glabels/dtd - -dtd_DATA = \ - glabels-2.2.dtd - -templatesdir = $(datadir)/glabels/templates - -templates_DATA = \ - paper-sizes.xml \ - categories.xml \ - avery-us-templates.xml \ - avery-iso-templates.xml \ - avery-other-templates.xml \ - zweckform-iso-templates.xml \ - brother-other-templates.xml \ - dymo-other-templates.xml \ - misc-us-templates.xml \ - misc-iso-templates.xml \ - misc-other-templates.xml - -EXTRA_DIST = $(templates_DATA) $(dtd_DATA) - - diff --git a/glabels2/templates/avery-iso-templates.xml b/glabels2/templates/avery-iso-templates.xml deleted file mode 100644 index 1e413872..00000000 --- a/glabels2/templates/avery-iso-templates.xml +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/avery-other-templates.xml b/glabels2/templates/avery-other-templates.xml deleted file mode 100644 index 6e5a6698..00000000 --- a/glabels2/templates/avery-other-templates.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/avery-us-templates.xml b/glabels2/templates/avery-us-templates.xml deleted file mode 100644 index 6626ed0f..00000000 --- a/glabels2/templates/avery-us-templates.xml +++ /dev/null @@ -1,836 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/brother-other-templates.xml b/glabels2/templates/brother-other-templates.xml deleted file mode 100644 index 7175f7bb..00000000 --- a/glabels2/templates/brother-other-templates.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/categories.xml b/glabels2/templates/categories.xml deleted file mode 100644 index 606d05ec..00000000 --- a/glabels2/templates/categories.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/dymo-other-templates.xml b/glabels2/templates/dymo-other-templates.xml deleted file mode 100644 index 49592b50..00000000 --- a/glabels2/templates/dymo-other-templates.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/glabels-2.2.dtd b/glabels2/templates/glabels-2.2.dtd deleted file mode 100644 index 9525e77d..00000000 --- a/glabels2/templates/glabels-2.2.dtd +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/misc-iso-templates.xml b/glabels2/templates/misc-iso-templates.xml deleted file mode 100644 index 1dfd88ac..00000000 --- a/glabels2/templates/misc-iso-templates.xml +++ /dev/null @@ -1,670 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/misc-other-templates.xml b/glabels2/templates/misc-other-templates.xml deleted file mode 100644 index b1a1c968..00000000 --- a/glabels2/templates/misc-other-templates.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/glabels2/templates/misc-us-templates.xml b/glabels2/templates/misc-us-templates.xml deleted file mode 100644 index 4df17aca..00000000 --- a/glabels2/templates/misc-us-templates.xml +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/paper-sizes.xml b/glabels2/templates/paper-sizes.xml deleted file mode 100644 index b0210210..00000000 --- a/glabels2/templates/paper-sizes.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/glabels2/templates/zweckform-iso-templates.xml b/glabels2/templates/zweckform-iso-templates.xml deleted file mode 100644 index 4b19a29e..00000000 --- a/glabels2/templates/zweckform-iso-templates.xml +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gtk-doc.make b/gtk-doc.make new file mode 100644 index 00000000..0f87cc79 --- /dev/null +++ b/gtk-doc.make @@ -0,0 +1,196 @@ +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### + +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = $(LIBTOOL) --mode=execute +else +GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +GTKDOC_RUN = sh -c +endif + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) + +EXTRA_DIST = \ + $(content_files) \ + $(HTML_IMAGES) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + +DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ + $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +REPORT_FILES = \ + $(DOC_MODULE)-undocumented.txt \ + $(DOC_MODULE)-undeclared.txt \ + $(DOC_MODULE)-unused.txt + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) + +if ENABLE_GTK_DOC +all-local: html-build.stamp +else +all-local: +endif + +docs: html-build.stamp + +$(REPORT_FILES): sgml-build.stamp + +#### scan #### + +scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) + @echo 'gtk-doc: Scanning header files' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && \ + gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) + if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + else \ + cd $(srcdir) ; \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp + @true + +#### templates #### + +tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + @echo 'gtk-doc: Rebuilding template files' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +tmpl/*.sgml: + @true + + +#### xml #### + +sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) + @echo 'gtk-doc: Building XML' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && \ + gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) + touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +#### html #### + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building HTML' + @-chmod -R u+w $(srcdir) + rm -rf $(srcdir)/html + mkdir $(srcdir)/html + mkhtml_options=""; \ + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ + if test "$(?)" = "0"; then \ + mkhtml_options=--path="$(srcdir)"; \ + fi + cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) + @echo 'gtk-doc: Fixing cross-references' + cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + touch html-build.stamp + +############## + +clean-local: + rm -f *~ *.bak + rm -rf .libs + +distclean-local: + cd $(srcdir) && \ + rm -rf xml $(REPORT_FILES) \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + +maintainer-clean-local: clean + cd $(srcdir) && rm -rf xml html + +install-data-local: + installfiles=`echo $(srcdir)/html/*`; \ + if test "$$installfiles" = '$(srcdir)/html/*'; \ + then echo '-- Nothing to install' ; \ + else \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + $(mkinstalldirs) $${installdir} ; \ + for i in $$installfiles; do \ + echo '-- Installing '$$i ; \ + $(INSTALL_DATA) $$i $${installdir}; \ + done; \ + if test -n "$(DOC_MODULE_VERSION)"; then \ + mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ + mv -f $${installdir}/$(DOC_MODULE).devhelp \ + $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ + fi; \ + ! which gtkdoc-rebase >/dev/null 2>&1 || \ + gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ + fi + +uninstall-local: + if test -n "$(DOC_MODULE_VERSION)"; then \ + installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ + else \ + installdir="$(DESTDIR)$(TARGET_DIR)"; \ + fi; \ + rm -rf $${installdir} + +# +# Require gtk-doc when making dist +# +if ENABLE_GTK_DOC +dist-check-gtkdoc: +else +dist-check-gtkdoc: + @echo "*** gtk-doc must be installed and enabled in order to make dist" + @false +endif + +dist-hook: dist-check-gtkdoc dist-hook-local + mkdir $(distdir)/tmpl + mkdir $(distdir)/xml + mkdir $(distdir)/html + -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl + -cp $(srcdir)/xml/*.xml $(distdir)/xml + cp $(srcdir)/html/* $(distdir)/html + -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ + -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ + cd $(distdir) && rm -f $(DISTCLEANFILES) + ! which gtkdoc-rebase >/dev/null 2>&1 || \ + gtkdoc-rebase --online --relative --html-dir=$(distdir)/html + +.PHONY : dist-hook-local docs diff --git a/help/C/figures/glabels-template-cd.png b/help/C/figures/glabels-template-cd.png new file mode 100644 index 00000000..0a3de3bf Binary files /dev/null and b/help/C/figures/glabels-template-cd.png differ diff --git a/help/C/figures/glabels-template-label.png b/help/C/figures/glabels-template-label.png new file mode 100644 index 00000000..87a724b9 Binary files /dev/null and b/help/C/figures/glabels-template-label.png differ diff --git a/help/C/figures/glabels-template-layout.png b/help/C/figures/glabels-template-layout.png new file mode 100644 index 00000000..c7127952 Binary files /dev/null and b/help/C/figures/glabels-template-layout.png differ diff --git a/help/C/figures/main-window-empty.png b/help/C/figures/main-window-empty.png new file mode 100644 index 00000000..305bd609 Binary files /dev/null and b/help/C/figures/main-window-empty.png differ diff --git a/help/C/figures/merge-ex1-1.png b/help/C/figures/merge-ex1-1.png new file mode 100644 index 00000000..f8673c1d Binary files /dev/null and b/help/C/figures/merge-ex1-1.png differ diff --git a/help/C/figures/merge-ex1-2.png b/help/C/figures/merge-ex1-2.png new file mode 100644 index 00000000..a87675aa Binary files /dev/null and b/help/C/figures/merge-ex1-2.png differ diff --git a/help/C/figures/merge-ex1-3.png b/help/C/figures/merge-ex1-3.png new file mode 100644 index 00000000..f31ecafe Binary files /dev/null and b/help/C/figures/merge-ex1-3.png differ diff --git a/help/C/figures/merge-ex1-4.png b/help/C/figures/merge-ex1-4.png new file mode 100644 index 00000000..71e11864 Binary files /dev/null and b/help/C/figures/merge-ex1-4.png differ diff --git a/help/C/figures/merge-ex2-1.png b/help/C/figures/merge-ex2-1.png new file mode 100644 index 00000000..1c64ed76 Binary files /dev/null and b/help/C/figures/merge-ex2-1.png differ diff --git a/help/C/figures/merge-ex2-2.png b/help/C/figures/merge-ex2-2.png new file mode 100644 index 00000000..e1d8f2af Binary files /dev/null and b/help/C/figures/merge-ex2-2.png differ diff --git a/help/C/figures/merge-ex2-3.png b/help/C/figures/merge-ex2-3.png new file mode 100644 index 00000000..baac803a Binary files /dev/null and b/help/C/figures/merge-ex2-3.png differ diff --git a/help/C/figures/merge-ex2-4.png b/help/C/figures/merge-ex2-4.png new file mode 100644 index 00000000..62d750c6 Binary files /dev/null and b/help/C/figures/merge-ex2-4.png differ diff --git a/help/C/figures/object-editor-sidebar.png b/help/C/figures/object-editor-sidebar.png new file mode 100644 index 00000000..f0624a26 Binary files /dev/null and b/help/C/figures/object-editor-sidebar.png differ diff --git a/help/C/figures/print-copies.png b/help/C/figures/print-copies.png new file mode 100644 index 00000000..d34d03c9 Binary files /dev/null and b/help/C/figures/print-copies.png differ diff --git a/help/C/figures/print-merge.png b/help/C/figures/print-merge.png new file mode 100644 index 00000000..de654d09 Binary files /dev/null and b/help/C/figures/print-merge.png differ diff --git a/help/C/glabels.xml b/help/C/glabels.xml new file mode 100644 index 00000000..e74eb322 --- /dev/null +++ b/help/C/glabels.xml @@ -0,0 +1,2127 @@ + + + + + + gLabels
    "> + +]> + + + + + +
    + + + + &app; Manual V&manrevision; + + + User manual for the gLabels label and business card creation program + + + + 2003-2007 + Jim Evins + + + Jim Evins + + + &legal; + + + + + Jim + Evins + + + + + + + + + + + + + + + + + + + + + gLabels Manual V&manrevision; + &date; + + Jim Evins + evins@snaught.com + + Jim Evins + + + + + This manual describes version &appversion; of gLabels. + + + Feedback + To report a bug or make a suggestion regarding the &app; application or + this manual, follow the directions in the gLabels Contact Page. + + + + + + + gLabels + + + glabels + + + + + + + + + + Introduction + + The &app; application 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. + + + + + + + + + + + Getting Started + + + To Start &app; + You can start &app; in the following ways: + + + + Applications menu + + Choose + + Office + gLabels + . + + + + Command line + + Type glabels, + then press Return: + + + + + + + When You Start &app; + When you start &app;, the following window is displayed. + + +
    + &app; Start Up Window + + + + + + +
    + + + + + + The &app; window contains the following elements: + + + + Menubar. + + The menus on the menubar contain all of the commands you + need to create and edit labels and business cards in + &app;. + + + + Main toolbar. + + The main toolbar contains a subset of common File and Edit + commands that you can access from the menubar. + + + + Drawing toolbar. + + The drawing toolbar contains a subset of commands for + editing the current glabels document. + + + + Display area. + + The display area is the main drawing interface to + &app;. + + + + Object sidebar. + + The object sidebar provides an interface for viewing and + editing all properties of an individual object. + + + + Properties toolbar. + + The properties toolbar contains a set of tools to + manipulate the properties of selected objects and set default + properties for new objects. + + + + Statusbar. + + The statusbar displays information about current + &app; activity and contextual + information about the menu items. + + + +
    +
    + + + + + + + + Usage + + + + To Create a New Label or Card + + To create a new label or business card, choose + File New + + to display the New Label or Card dialog. Select + the media type and orientation for the new document, + then click OK. A new document is + displayed in the display area of the &app; + window. + + If your particular media type is missing from this dialog, + see + + + + + + To Open a File + + To open a file, choose + File Open + to display the Open File dialog. + Select the file that you want to open, then click + OK. The file is displayed in the display area + of the &app; window. + + You can also open multiple files in + &app;. The application creates a separate + application window for each open file. + + The application records the paths and filenames of the + most recent files that you have edited and displays the files as menu + items on the + FileRecent Files + menu. + + + + + + To Open Multiple Files from a Command Line + + You can run &app; from a command line + and open a single file or multiple files. To open multiple files from + a command line, type the following command, then press + Return: + + glabels + file1.glabels file2.glabels file3.glabels + + + When the application starts, the files that you specify are + displayed in separate &app; windows. + + + + + + To Save a File + + You can save files in the following ways: + + + + + To save changes to an existing file, choose + File + Save . + + + + + To save a new file or to save an existing file under a new + filename, choose File + Save As . Enter a name + for the file in the Save As dialog box, + then click OK. + + + + + + + + + To Change Label Properties + + To change the media type and/or orientation of a label, choose + File + Properties to display the + Label properties dialog. Select the + new media type and orientation for the document, then click + OK. + + + + + + To Create a Custom Template + + To create a new custom template, choose + File + Template Designer ... + to display the Template Designer dialog. + This dialog will assist you in creating a custom template for + most types of label or card stationery that you may encounter. + + If you prefer, you can create your templates manually. + For this option see + + + + + + + To Close a File + + To close the current document, choose + File + Close to close the application + window. If the current document is modified, a confirmation dialog + will be presented, allowing you to save the document or cancel + the command. If the window being closed is the only open window, + &app; will exit. + + + + + + To Quit <application>&app;</application> + + To quit &app;, choose + File + Quit . This is equivalent + to closing all open windows. See + . + + + + + + To Print Labels or Cards + + To print labels or cards, choose + File Print + to display the Print dialog. + Once print options have been selected, click Print + to print the labels or cards. To simply preview the results, + click Print Preview instead. + + The Print dialog allows you to specify the + following print options: + + + The Labels Tab of the Print Dialog + + + + + Print control (Simple) + + + For simple labels or cards (no document merge), the job + tabbed section contains the following copy controls. + + + + + + The number of copies of the label can be selected by + choosing the number of full sheets to print, or a specific + subset of labels on a single sheet. + + The mini-preview can also be used to graphically select + the subset of labels by clicking the first label on the + mini-preview and dragging to the last label. + + + + + + Print control (Merge) + + + For labels or cards using the document merge (also known + as "mail merge") capability, the job tabbed section contains + the following merge controls instead of copy controls. + + + + + + The total number of labels or cards printed is the + product of the number of records in the merge source and + the number of copies selected. If multiple copies are + selected, these can be either collated (copies of the + same record grouped together) or un-collated (one copy + each record is printed before next copy). + + Printing can begin on any label on the first sheet. + This can be selected with the Start on + label spinbutton. + + The mini-preview can also be used to graphically select + this first label, by clicking on the desired label in the + mini-preview. + + + + + Options + + The following options can also be selected. + + + print outlines + Print outlines of labels. This option is useful for + dry-runs, to test printer alignment. + + + print in reverse + Prints the labels as mirror images. This option is + useful for printing on clear labels that will be viewed + from the reverse side (e.g. in a car window). + + + print crop marks + Prints crop marks along the edge of the sheet. + This option is useful for printing on blank stock, to + be cut after printing. This option does not work well + with all templates. + + + + + + + + + + + + To Create New Objects + + Objects are created by choosing the appropriate selection under + the Objects + Create Object submenu or + the Drawing Toolbar. This will place the + display area into object creation mode as indicated by its cursor. + To return to the default object selection mode without creating + an object, choose Objects + Select Mode . This will + return the display area's cursor to the default selection arrow. + + The following describes the object creation mode for each object + type: + + + + + Text + + Click the desired location of the upper left corner of the + text object. New text objects are initialized with the + string "Text." To change this text, or other properties, see + . + + + + + Box + + Click the desired location of the upper left corner of the + box object and drag to the desired location of the lower right + corner. If you simply click in a single location, a square + box will be created. To change properties of the box object, see + . + + + + + Line + + Click the desired location of one end of the + line object and drag to the desired location of the other end. + If you simply click in a single location, a diagonal line + will be created. To change properties of the line object, see + . + + + + + Ellipse + + Click the desired location of the upper left corner of the + ellipse object and drag to the desired location of the lower + right corner. If you simply click in a single location, a circle + will be created. To change properties of the ellipse object, see + . + + + + + Image + + Click the desired location of the upper left corner of the + image object and drag to the desired location of the lower + right corner. If you simply click in a single location, a square + will be created. New image objects are initialized with a + simple checkerboard image. To change this image, or other + properties of the image object, see + . + + + + + Barcode + + Click the desired location of the upper left corner of the + barcode object. New barcode objects are initialized to a + POSTNET barcode with representative data. To change data + and properties of the barcode object, see + . + + + + + + + + + + + To Select Objects + + A prerequisite for performing operations on objects is the + selection of individual objects or groups of objects. The + display area must be in the object selection mode to create new + selections, as indicated by an arrow cursor. The object + selection mode is selected by the + Objects + Select Mode menu item, + or the corresponding command on the Drawing + Toolbar. + + + + + Selecting a single object + + A single object can be selected simply by clicking + on the desired object in the display area. + Once selected the object will be highlighted with a set of + resizing handles. + + + + + Aggregate object selections + + Multiple objects can be selected by first selecting the first + object as above and then by holding the Ctrl + key while selecting additional objects. + Individual objects can be added to an existing selection + at any time by holding the Ctrl key while + selecting the desired objects. All objects can also be + selected by using the Edit + Select All + menu item. All objects in an aggregate object selection will be + highlighted. + + + + + Area selections + + Multiple objects can also be selected by clicking an empty + area and dragging to form a rectangular area. When released, + all objects contained in the area will form an aggregate + selection. An area selection can be used to add to an existing + selection by holding the Ctrl key while + performing the selection. + + + + + Unselecting objects + + Individual objects can be removed from an existing + selection by holding the Ctrl key while + clicking on a previously selected object. An entire selection + can be dismissed by using the + Edit Un-select All + menu item + or by simply clicking any empty space in the display area. + Once an object is unselected its highlight is removed. + + + + + + + + + + Clipboard Commands + + Object selections can be manipulated using the standard clipboard + operations Cut, + Copy, Paste, + and Delete. + + + + + + + + CtrlX + + Cut + + + + Moves selected objects to the clipboard. The objects are + then available for pasting back into the current document or + another document. + + + + + + + + CtrlC + + Copy + + + + Copies selected objects to the clipboard without deleting + them. The objects are then available for pasting back into + the current document or another document. + + + + + + + + CtrlV + + Paste + + + + Pastes objects from the clipboard into the current document. + &app; can only paste objects from + another &app; document. + + + + + + + + Delete + + Delete + + + + Deletes selected objects without placing them on the + clipboard. + + + + + + + + + + To Edit Object Properties + + Most object properties can be modified through the object + editor sidebar, illustrated below. To use the object editor, + a single object must first be selected. See + . + + +
    + Object Editor Sidebar + + + + + + +
    + + + The object editor will contain a subset of the following + tabbed sections, depending on object type: + + + Text Tabbed Section (Text objects) + + This section contains a small editor for changing the content + of a text object. It also contains a dropdown menu of available + document merge keys, that can be inserted into text. + + + + + Image Tabbed Section (Image objecs) + + This section contains a file entry with preview to select + image files. The browse button can be used to easily locate + image files. Alternatively, a document merge key can be used + instead to provide a filename at print time. + + + + + Data Tabbed Section (Barcode objecs) + + This section contains a text entry to enter literal barcode + data. Alternatively, a document merge key can be used to + provide this data at print time. + + + + + Style Tabbed Section (Text objects) + + This section contains controls to select text properties, + including font family, font size, font weight, color, and + text justification. + + + + + Style Tabbed Section (Barcode objecs) + + This section contains controls to select barcode properties, + including barcode style, color, whether to print text, and whether + to include a checksum digit. + + + + + Line Tabbed Section + + This section contains controls to select properties of lines + and outlines. These properties include line width and color. + + + + + Fill Tabbed Section + + This section contains controls to select fill properties of box + and ellipse objects. Currently the only fill property is fill + color. + + + + + Size Tabbed Section (All except line objects) + + This section contains controls to select the width and height + of an object. A checkbox is provided, so that the current aspect + ratio can be locked while manipulating the width and height controls. + Image objects also provide a button to reset the size to the + image's natural size (Assumes 72DPI). + + + + + Size Tabbed Section (Line objects) + + This section contains controls to select the length and angle + of a line object. + + + + + Position Tabbed Section + + This section contains controls to change the position of an + object. + + + + + + Shadow Tabbed Section (All except image and barcode objects) + + This section contains controls to add a shadow to an object. + + + + +
    + + + + Other Manipulations of Objects + + Objects can also be manipulated in the following ways. + + + Moving and Resizing Objects + + Objects can be moved by simply clicking on a selected + object and dragging the object to its new location. If the object + is part of an aggregate selection, all objects in the selection + will move with the object being dragged, maintaining their relative + positions to one another. If no object is selected, clicking on + an object will create a new selection containing that object. + See . + + A selected object can be resized by clicking one of its resize + handle and dragging it to obtain the new size. + + + + + Changing Stacking Order + + Stacking order refers to relative position in the z-axis of + objects. That is when objects overlap, which object will appear + on top of the other. By default, newer objects will appear above + older objects. To change this order, select one or more objects + and choose Objects + Order + Bring to Front + to raise the selection to the top of the stacking + order, or choose Objects + Order + Send to Back + to lower the selection to the bottom of the + stacking order. These menuitems are also available by right-clicking + the display area when there is a non-empty selection. + + + + + Rotating and Flipping Objects + + Objects can be rotated 90 degrees in either direction, or flipped + horizontally or vertically, by choosing the appropriate menuitem + in the Objects + Rotate/Flip sub-menu. These + menuitems are also available by right-clicking + the display area when there is a non-empty selection. + + + + + Aligning Objects + + Objects can be aligned horizontally or vertically, relative to + one another, or relative to the center line of the label, by + choosing the appropriate menuitem from the + Objects + Align Horizontal + or Objects + Align Horizontal sub-menus. + These menuitems are also available by right-clicking + the display area when there is a non-empty selection. + + + + + Using the Property Bar + + The property bar can be used to change some common properties + of objects en-masse. These properties include font family, font + size, font weight, text alignment, text color, fill color, line + or outline color, and line width. The property bar also controls + the defaults for these properties for any newly created objects. + + + + + + + + + + + Performing a Document Merge + + Document Merge (sometimes called "Mail Merge") is a powerful + feature that allows a unique label or card to be printed for each + record in an external data source. + + 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 back-ends only exist for + text files and the evolution data server -- others are planned. The currently + supported text-file format is very simple: each line is a record; + fields are delimited by commas (CSV), tabs, 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 common way of creating CSV files is + to export them from a spreadsheet program. + + A label must then be configured to "point at" this data file. + To configure the merge properties of a document, choose + Objects + Merge Properties menu item + to display the merge properties dialog. This + dialog is used to select the exact data file format and file + name (location) of the merge data. + + Finally, once the label has been configured for a data file, + field keys can be inserted into text objects and used as source + or data for barcode objects and image filenames for image objects. + See for more information + on using merge data for these object types. + + 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, barcode, and + image objects. + + See for a detailed + tutorial on the document merge feature. + + + + + +
    + + + + + + + + Settings + To configure &app;, choose + + Settings + Preferences + . The + Preferences dialog contains the following tabbed + sections: + + + + + + + + + + + + + + Locale + + + + Units + + Use this radio button group to specify your prefered units. + Select one of the following options: + + + + Points + Use points (1 point = 1/72 in = 0.352778 mm). + + + + Inches + Use inches. + + + + Millimeters + Use millimeters. + + + Default: + Inches. + + + + + Default page size + + Use this radio button group to specify your prefered page size. + This will make it quicker for you to locate media types when creating a new + label or card. + + + + US Letter + Most of your media will be of the US Letter page size (8.5 x 11 inches). + + + + ISO A4 + Most of your media will be of the ISO A4 page size (210 x 297 mm). + + + Default: + US Letter. + + + + + + + + Object defaults + + + + Text + + Use these controls to set the default properties of new text objects. + These properties are + + + + Font + These controls are used to select font family and font size, and + whether the font should bold or in italics. + + + + Color + This control selects the default text color. + + + + Alignment + These controls are used to select the default text alignment (left, center or right). + + + + + + + Line + + Use these controls to set the default properties of lines and outlines of + new objects. These properties are + + + + Width + This control selects the default line width. + + + + Color + This control selects the default line color. + + + + + + + Fill + + Use these controls to set the default fill properties of + new objects. These properties are + + + + Color + This control selects the default fill color. + + + + + + + + + + + + + + Document Merge Tutorial + + Document Merge (sometimes called "Mail Merge") is a powerful + feature that allows a unique label or card to be printed for each + record in an external data source. It is however, the most mis-understood + feature of glabels. The following examples + will step through a couple of common tasks using the document merge + feature. + + + Example 1: Name Tags + + In this example we are organizing an orientation party for the new + crew members of our ship. We have a list of freshman crew members that we + created in gnumeric and exported as the following + CSV file. We could have created this file by using a text editor, but heck it + is the 23rd century. + + +Name,Department,SN +"Jim Kirk",Management,"SC937-0176 CEC" +"Mr. Spock",Sciences,S179-276SP +"Leonard McCoy",Medicine,unknown +"Montgomery Scott",Engineering,SE-197-54T + + + In glabels we have created a new glabels + document using the Avery 5395 "Name Badge Labels" template. Next we use the + Objects + Merge Properties menu item to display + the merge properties dialog. We use this dialog to + select the source type (in our case CSV) and the merge source (filename) as + shown. + + +
    + Merge properties dialog + + + + + + +
    + + + Before applying the merge source, we uncheck the first record since it is only + column headers from our original gnumeric spreadsheet + and would simply waste our first label. We could also unselect any other records + that we didn't want to print a label for. + + We can also view each record in more detail by clicking on the appropriate + expander (the little triangles) as shown. Once we are satisfied with the + selections in this dialog we click OK to accept the + changes. + + Now we start adding objects to our glabels document as shown. + + +
    + Adding objects + + + + + + +
    + + + In this example we have added three text objects and a barcode object. The + first text object contains only simple literal text ("Hello, my name is"). The + second text object contains a single merge field ("${1}") corresponding to the + first field of a record (first column of a line) which contains the new crew + member's full name. The third text field contains both literal text + ("Department: ") followed by a single merge field ("${2}") corresponding to + the second field or the crew member's department. The barcode object is + configured to use field (or key) "3" which contains our crew member's + starfleet serial number. + + Now we can print our name tags by selecting the + File + Print menu item. This will display + print dialog as shown below. + + +
    + Printing name tags + + + + + + +
    + + + Just to make sure our labels are going to look okay, we select the + Print outlines option and click + Print Preview. This will display a print preview dialog + as shown below. + + +
    + Name tags preview + + + + + + +
    + + + Everything looks good, so we can now load up our printer with + the appropriate label stock, print our name tags and start beaming our guests + aboard. + +
    + + + Example 2: Address Labels + + In this example we are going to throw a party and need to print mailing + address labels for our invitations. We have a list of our closest friends + that we created in gnumeric and exported as the + following CSV file. It should be noted that not everyone has a middle initial or + a two line address. + + +LAST,FIRST,MI,ADDR1,ADDR2,CITY,STATE,ZIP +,,,,,,, +Critter,Ess,S,"123 Faux St.",,Alexandria,VA,22310 +Doe,John,,"Apt 1X","451 Mystery St.",Trenton,NJ,08601 +Summers,Joyce,,"1630 Revello Dr",,Sunnydale,CA,95037 +McGarret,Steve,O,"404 Piikoi Street",,Honolulu,HI,96813 +Kramer,Cosmo,,"Apt 5B","129 W. 81 St.","New York",NY,10024-7207 + + + In glabels we have created a new glabels + document using the Avery 5512 "Address Labels" template. Next we use the + Objects + Merge Properties menu item to display + the merge properties dialog. We use this dialog to + select the source type (in our case CSV) and the merge source (filename) as + shown. + + +
    + Merge properties dialog + + + + + + +
    + + + Before applying the merge source, we uncheck the first record since it is only + column headers from our original gnumeric spreadsheet + and would simply waste our first label. We also unselect the second record + which is empty (an artifact of our original spreadsheet). We could also unselect + any other records that we didn't want to print a label for. + + We can also view each record in more detail by clicking on the appropriate + expander (the little triangles) as shown. Once we are satisfied with the + selections in this dialog we click OK to accept the + changes. + + Now we start adding objects to our glabels document as shown. + + +
    + Adding objects + + + + + + +
    + + + In this example we have a single text object. This text object contains + all of our merge fields organized on multiple lines as a mailing address. + Notice that fields ${4} and ${5} (corresponding to ADDR1 and ADDR2) are each + located with no other text on their own lines. When + glabels encounters a field as the only text on + a line, it will not expand the line if the field is empty. + + Now we can print our address labels by selecting the + File + Print menu item. This will display + print dialog as shown below. + + +
    + Printing address labels + + + + + + +
    + + + Just to make sure our labels are going to look okay, we select the + Print outlines option and click + Print Preview. This will display a print preview dialog + as shown below. + + +
    + Address labels preview + + + + + + +
    + + + Everything looks good, so we can now load up our printer with + the appropriate label stock, print our address labels and start mailing + our party invitations. + +
    + +
    + + + + + + + Manually Creating New Templates + + Predefined templates are defined by XML files located in + ${prefix}/share/glabels/, + where ${prefix} is usually something like + /usr/local or /usr depending + on the configuration option prefix. gLabels will + use all files of the form *-templates.xml + or *.template, that it finds in + ${prefix}/share/glabels/ and + ${HOME}/.glabels/. + Additional templates can be added by creating additional + *.template files in either of these directories. + + + The format for these files is defined in the DTD: + glabels-2.2.dtd. (This DTD also describes other + XML formats used by glabels.) + + + Assumptions/caveats + + + A sheet contains only one size of label or card (if a sheet + contains more than one size of item, it can be split into + multiple templates for multiple pass printing) + + + Distances can be expressed in units of pt, + in, mm, + cm, or pc. For example: + "1.0in" or "2.54cm". If no + units are specified, computer points (pt) will + be assumed (1 pt = + 1/72 in = 0.352778 mm). + + + + + + + Template Files + + +<?xml version="1.0"?> +<Glabels-templates> + + ...templates... + +</Glabels-templates> + + + + + + Example Template + + <Template brand="Avery" part="8160" size="US-Letter" description="Mailing Labels"> + <Label-rectangle id="0" width="189pt" height="72pt" round="5pt"> + <Markup-margin size="5pt"/> + <Layout nx="3" ny="10" x0="11.25pt" y0="36pt" dx="200pt" dy="72pt"/> + </Label-rectangle> + <Alias brand="Avery" part="5160"/> + <Alias brand="Avery" part="6233"/> + </Template> + + + + + Template Node + + A Template node describes a single stationary + product. It must contain one instance of any type of Label node + (Label-rectangle, + Label-round, or Label-cd). + This node can be followed by zero or more + Alias nodes. + + + + + + + + + Property + + + Description + + + + + + brand + + Brand or manufacturer of stationary product. + E.g. "Avery" + + + + part + + Part number or name of stationary product. + E.g. "8160" + + + + size + + Size of sheet. E.g., "US-Letter," "A4", ... + + + + description + + Description of stationary product. E.g, + "Mailing Labels." + + + + _description + + Translatable description of stationary product. + E.g, "Mailing Labels." (Only useful for predefined + templates) + + + + width + + Page width. Only valid if size="Other" + + + + height + + Page height. Only valid if size="Other" + + + + + + + + + + Label-rectangle Node + + A Label-rectangle node describes the + dimensions of a single label or business card that is rectangular + in shape (may have rounded edges). + + + + + + + + + Property + + + Description + + + + + + id + + Reserved for future use. Should always be 0. + + + + width + Width of label/card + + + height + Height of label/card + + + round + + Radius of corners. For items with square edges + (business cards), the radius should be 0. + + + + x_waste + + Amount of horizontal waste (over-print) to allow. This is useful + for minimizing alignment problems when using non-white + backgrounds (e.g. images). + + + + y_waste + + Amount of vertical waste (over-print) to allow. This is useful + for minimizing alignment problems when using non-white + backgrounds (e.g. images). + + + + + + + +
    + Label-rectangle Parameters + + + + + + +
    + + +
    + + + Label-round Node + + A Label-round node describes the dimensions + of a simple round label (not a CD). + + + + + + + + + Property + + + Description + + + + + + id + + Reserved for future use. Should always be 0. + + + + radius + Radius (1/2 diameter) of label + + + waste + + Amount of waste (over-print) to allow. This is useful + for minimizing alignment problems when using non-white + backgrounds (e.g. images). + + + + + + + + + + Label-cd Node + + A Label-cd node describes the dimensions + of a CD, DVD, or business card CD. + + + + + + + + + Property + + + Description + + + + + + id + + Reserved for future use. Should always be 0. + + + + radius + Outer radius of label + + + hole + Radius of concentric hole + + + width + + If present, the label is clipped to the given width. + (Useful for "business card CDs"). + + + + height + + If present, the label is clipped to the given height. + (Useful for "business card CDs"). + + + + waste + + Amount of waste (over-print) to allow. This is useful + for minimizing alignment problems when using non-white + backgrounds (e.g. images). + + + + + + + +
    + CD Label Parameters + + + + + + +
    + + +
    + + + Markup-margin Node + + A Markup-margin describes a margin along + all edges of a label. + + + + + + + + + Property + + + Description + + + + + + size + + Size of the margin. I.e. the distance of the margin + line from the edge of the card/label. + + + + + + + + + + Markup-line Node + + A Markup-line describes a markup line. + + + + + + + + + Property + + + Description + + + + + + x1 + + x coordinate of 1st endpoint of the line segment. + + + + y1 + + y coordinate of 1st endpoint of the line segment. + + + + x2 + + x coordinate of 2nd endpoint of the line segment. + + + + y2 + + y coordinate of 2nd endpoint of the line segment. + + + + + + + + + + Markup-circle Node + + A Markup-circle describes a markup circle. + + + + + + + + + + Property + + + Description + + + + + + x0 + + x coordinate of circle origin (center). + + + + y0 + + y coordinate of circle origin (center). + + + + radius + Radius of circle. + + + + + + + + + Markup-rect Node + + A Markup-rect describes a markup rectangle. + + + + + + + + + + Property + + + Description + + + + + + x1 + + x coordinate of upper left corner of rectangle. + + + + y1 + + y coordinate of upper left corner of rectangle. + + + + w + + Width of rectangle. + + + + h + + Height of rectangle. + + + + r + Radius of rounded corners of rectangle. + + + + + + + + + Layout Node + + A label node may contain multiple Layout + children. If labels are arranged in a simple grid pattern, only + one layout is needed. However, if labels are arranged in multiple + grids, such as a running bond pattern, multiple + layout tags can be used. Note: a single label + can always be treated as a grid of one. + + + + + + + + + Property + + + Description + + + + + + nx + + Number of labels/cards across in the grid + (horizontal) + + + + ny + + Number of labels/cards up and down in the grid + (vertical) + + + + x0 + + Distance from left edge of sheet to the left edge of + the left column of cards/labels in the layout. + + + + y0 + + Distance from the top edge of sheet to the top edge of + the top row of labels/cards in the layout. + + + + dx + Horizontal pitch of grid. + + + dy + Vertical pitch of grid. + + + + + + +
    + Layout Parameters + + + + + + +
    + + +
    + + + Alias Node + + An Alias node provides the name of a + product with the same size and layout characteristics as the + parent template. + + + + + + + + + Property + + + Description + + + + + + brand + + The brand or manufacturer of the equivalent product. + + + + part + + The part number or name of the equivalent product. + + + + + + + + +
    + + + + + + + + + + + + + + About &app; + &app; was written by Jim Evins + (evins@snaught.com). To find more information about + &app;, please visit the + gLabels Web + page. + + To report a bug or make a suggestion regarding this application or + this manual, follow the directions at the + gLabels Contact Page. + + + This program is distributed 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. A copy of this license can be found at this + link, or in the file + COPYING included with the source code of this program. + + + + + + + +
    diff --git a/help/C/legal.xml b/help/C/legal.xml new file mode 100644 index 00000000..ac97e1de --- /dev/null +++ b/help/C/legal.xml @@ -0,0 +1,76 @@ + + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License (GFDL), 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 can find + a copy of the GFDL at this link or in the file COPYING-DOCS + distributed with this manual. + + This manual is part of a collection of GNOME manuals + distributed under the GFDL. If you want to distribute this + manual separately from the collection, you can do so by + adding a copy of the license to the manual, as described in + section 6 of the license. + + + + 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 the members of + the GNOME Documentation Project are made aware of those + trademarks, then the names are in capital letters or initial + capital letters. + + + + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED + UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE + WITH THE FURTHER UNDERSTANDING THAT: + + + + DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR + IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES + THAT THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR + A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE + RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE + OF THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR + MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY + CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY + SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS + LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED + VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER + EXCEPT UNDER THIS DISCLAIMER; AND + + + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL + THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), + CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, + INITIAL WRITER, ANY CONTRIBUTOR, OR ANY + DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION + OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH + PARTIES, BE LIABLE TO ANY PERSON FOR ANY + DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER + INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS + OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR + MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR + LOSSES ARISING OUT OF OR RELATING TO USE OF THE + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, + EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF + THE POSSIBILITY OF SUCH DAMAGES. + + + + + + diff --git a/help/Makefile.am b/help/Makefile.am new file mode 100644 index 00000000..708fb593 --- /dev/null +++ b/help/Makefile.am @@ -0,0 +1,24 @@ +include $(top_srcdir)/gnome-doc-utils.make + +dist-hook: doc-dist-hook + +DOC_MODULE = glabels +DOC_ENTITIES = legal.xml +DOC_INCLUDES = +DOC_FIGURES = figures/glabels-template-cd.png \ + figures/glabels-template-label.png \ + figures/glabels-template-layout.png \ + figures/main-window-empty.png \ + figures/merge-ex1-1.png \ + figures/merge-ex1-2.png \ + figures/merge-ex1-3.png \ + figures/merge-ex1-4.png \ + figures/merge-ex2-1.png \ + figures/merge-ex2-2.png \ + figures/merge-ex2-3.png \ + figures/merge-ex2-4.png \ + figures/object-editor-sidebar.png \ + figures/print-copies.png \ + figures/print-merge.png + +DOC_LINGUAS = de diff --git a/help/de/de.po b/help/de/de.po new file mode 100644 index 00000000..cd4b7106 --- /dev/null +++ b/help/de/de.po @@ -0,0 +1,2650 @@ +# German translation of the gLabels2 documentation. +# Mario Blättermann , 2008, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: glabels2\n" +"POT-Creation-Date: 2008-12-23 09:45+0100\n" +"PO-Revision-Date: 2009-09-06 18:51+0100\n" +"Last-Translator: Mario Blättermann \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: German\n" +"X-Poedit-Country: GERMANY\n" + +#: ../C/legal.xml:2(para) +msgid "" +"Permission is granted to copy, distribute and/or modify this document under " +"the terms of the GNU Free Documentation License (GFDL), 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 can find a copy " +"of the GFDL at this link or in " +"the file COPYING-DOCS distributed with this manual." +msgstr "" +"Das vorliegende Dokument kann gemäß den Bedingungen der GNU Free " +"Documentation License (GFDL), Version 1.1 oder jeder späteren, von der Free " +"Software Foundation veröffentlichten Version ohne unveränderbare Abschnitte " +"sowie ohne Texte auf dem vorderen und hinteren Buchdeckel kopiert, verteilt " +"und/oder modifiziert werden. Eine Kopie der GFDL finden Sie unter diesem " +"Link oder in der mit diesem " +"Handbuch gelieferten Datei COPYING-DOCS." + +#: ../C/legal.xml:12(para) +msgid "" +"This manual is part of a collection of GNOME manuals distributed under the " +"GFDL. If you want to distribute this manual separately from the collection, " +"you can do so by adding a copy of the license to the manual, as described in " +"section 6 of the license." +msgstr "" +"Dieses Handbuch ist Teil einer Sammlung von GNOME-Handbüchern, die unter der " +"GFDL veröffentlicht werden. Wenn Sie dieses Handbuch getrennt von der " +"Sammlung weiterverbreiten möchten, können Sie das tun, indem Sie eine Kopie " +"der Lizenz zum Handbuch hinzufügen, wie es in Abschnitt 6 der Lizenz " +"beschrieben ist." + +#: ../C/legal.xml:19(para) +msgid "" +"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 the members of the GNOME Documentation Project are made " +"aware of those trademarks, then the names are in capital letters or initial " +"capital letters." +msgstr "" +"Viele der Namen, die von Unternehmen verwendet werden, um ihre Produkte und " +"Dienstleistungen von anderen zu unterscheiden, sind eingetragene " +"Warenzeichen. An den Stellen, an denen diese Namen in einer GNOME-" +"Dokumentation erscheinen, werden die Namen in Großbuchstaben oder mit einem " +"großen Anfangsbuchstaben geschrieben, wenn das GNOME-Dokumentationsprojekt " +"auf diese Warenzeichen hingewiesen wird." + +#: ../C/legal.xml:35(para) +msgid "" +"DOCUMENT IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTY OF ANY KIND, " +"EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT " +"THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS " +"MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK " +"AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED " +"VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION " +"PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY " +"CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR " +"CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS " +"LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS " +"AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND" +msgstr "" +"DIESES DOKUMENT WIRD »WIE VORLIEGEND« GELIEFERT, OHNE GARANTIEN IRGENDEINER " +"ART, SOWOHL AUSDRÜCKLICH GENANNTE ALS AUCH ANGEDEUTETE. DIES BEZIEHT SICH " +"AUCH OHNE EINSCHRÄNKUNG AUF GARANTIEN, DASS DIESES DOKUMENT ODER VERÄNDERTE " +"FASSUNGEN DIESES DOKUMENTS FREI VON HANDELSDEFEKTEN, FÜR EINEN BESTIMMTEN " +"ZWECK GEEIGNET IST ODER DASS ES KEINE RECHTE DRITTER VERLETZT. DAS VOLLE " +"RISIKO WAS QUALITÄT, GENAUIGKEIT UND LEISTUNG DES DOKUMENTS ODER VERÄNDERTE " +"FASSUNGEN DES DOKUMENTS LIEGT BEI IHNEN. SOLLTE EIN DOKUMENT ODER EINE " +"VERÄNDERTE FASSUNG DAVON FEHLER IRGENDEINER ART BEINHALTEN, TRAGEN SIE (NICHT " +"DER URSPRUNGSAUTOR, DER AUTOR ODER EIN MITWIRKENDER) DIE KOSTEN FÜR " +"NOTWENDIGE DIENSTLEISTUNGEN, REPARATUREN ODER FEHLERKORREKTUREN. DIESER " +"HAFTUNGSAUSSCHLUSS IST EIN ESSENZIELLER TEIL DIESER LIZENZ. DIE VERWENDUNG " +"EINES DOKUMENTS ODER EINER VERÄNDERTEN VERSION DES DOKUMENTS IST NICHT " +"GESTATTET AUßER UNTER BEACHTUNG DIESES HAFTUNGSAUSSCHLUSSES UND" + +#: ../C/legal.xml:55(para) +msgid "" +"UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING " +"NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY " +"CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE " +"DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR " +"ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY " +"CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK " +"STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR " +"LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED " +"VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE " +"POSSIBILITY OF SUCH DAMAGES." +msgstr "" +"UNTER KEINEN UMSTÄNDEN UND AUF BASIS KEINER RECHTSGRUNDLAGE, EGAL OB DURCH " +"UNERLAUBTEN HANDLUNGEN (EINSCHLIEßLICH FAHRLÄSSIGKEIT), VERTRAG ODER " +"ANDERWEITIG KANN DER AUTOR, URSPRUNGSAUTOR, EIN MITWIRKENDER ODER EIN " +"VERTRIEBSPARTNER DIESES DOKUMENTS ODER EINER VERÄNDERTEN FASSUNG DES " +"DOKUMENTS ODER EIN ZULIEFERER EINER DIESER PARTEIEN, HAFTBAR GEMACHT WERDEN " +"FÜR DIREKTE, INDIREKTE, SPEZIELLE, VERSEHENTLICHE ODER FOLGESCHÄDEN JEGLICHER " +"ART, EINSCHLIEßLICH UND OHNE EINSCHRÄNKUNGEN SCHÄDEN DURCH VERLUST VON " +"KULANZ, ARBEITSAUSFALL, COMPUTERVERSAGEN ODER COMPUTERFEHLFUNKTIONEN ODER " +"ALLE ANDEREN SCHÄDEN ODER VERLUSTE, DIE SICH AUS ODER IN VERBINDUNG MIT DER " +"VERWENDUNG DES DOKUMENTS UND VERÄNDERTER FASSUNGEN DES DOKUMENTS ERGEBEN, " +"AUCH WENN DIE OBEN GENANNTEN PARTEIEN ÜBER DIE MÖGLICHKEIT SOLCHER SCHÄDEN " +"INFORMIERT WAREN." + +#: ../C/legal.xml:28(para) +msgid "" +"DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS " +"OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT: " +"" +msgstr "" +"DAS DOKUMENT UND VERÄNDERTE FASSUNGEN DES DOKUMENTS WERDEN UNTER DEN " +"BEDINGUNGEN DER GNU FREE DOCUMENTATION LICENSE ZUR VERFÜGUNG GESTELLT MIT DEM " +"WEITERGEHENDEN VERSTÄNDNIS, DASS: " + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:194(None) +msgid "" +"@@image: 'figures/main-window-empty.png'; md5=0ca03656fde7f33222bb6f016fdf79c4" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:446(None) +msgid "" +"@@image: 'figures/print-copies.png'; md5=45f2eae7cd262a36ed6b20a254b94447" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:478(None) +msgid "@@image: 'figures/print-merge.png'; md5=df81b305a7e76484df98034c1c035604" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:789(None) +msgid "" +"@@image: 'figures/object-editor-sidebar.png'; " +"md5=08e152bad535a2b3d1ff7ed73de5b483" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1230(None) +msgid "@@image: 'figures/merge-ex1-1.png'; md5=731c7bcd2ff66d18300e87f1c3d9ec0e" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1255(None) +msgid "@@image: 'figures/merge-ex1-2.png'; md5=27ed61afe77cda96c208fcda51990c89" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1283(None) +msgid "@@image: 'figures/merge-ex1-3.png'; md5=8f686530b1196b04595be50a9f8d4728" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1301(None) +msgid "@@image: 'figures/merge-ex1-4.png'; md5=9cec0c679929cc904f81f435cd3bd060" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1347(None) +msgid "@@image: 'figures/merge-ex2-1.png'; md5=d48a99d65408584eae2603a0c07610da" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1373(None) +msgid "@@image: 'figures/merge-ex2-2.png'; md5=2912c145fd9caac56ad7cf8c4437636b" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1398(None) +msgid "@@image: 'figures/merge-ex2-3.png'; md5=59a1dc5ff94656877a6220f73fe25b3c" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1416(None) +msgid "@@image: 'figures/merge-ex2-4.png'; md5=67391b05421901a36d276736c1f664dd" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1652(None) +msgid "" +"@@image: 'figures/glabels-template-label.png'; " +"md5=b7db4090373462b8d45feb22d4cd5646" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:1773(None) +msgid "" +"@@image: 'figures/glabels-template-cd.png'; " +"md5=145b49a5380de63ffa9451d2bbb81934" +msgstr "translated" + +#. When image changes, this message will be marked fuzzy or untranslated for you. +#. It doesn't matter what you translate it to: it's not used at all. +#: ../C/glabels.xml:2035(None) +msgid "" +"@@image: 'figures/glabels-template-layout.png'; " +"md5=a8adcff0584be1f0275bc2a169a580df" +msgstr "translated" + +#: ../C/glabels.xml:31(title) +msgid "gLabels Manual V2.2" +msgstr "gLabels-Handbuch V2.2" + +#: ../C/glabels.xml:34(year) +msgid "2003-2007" +msgstr "2003-2007" + +#: ../C/glabels.xml:35(holder) ../C/glabels.xml:51(publishername) +#: ../C/glabels.xml:102(para) +msgid "Jim Evins" +msgstr "Jim Evins" + +#: ../C/glabels.xml:61(firstname) +msgid "Jim" +msgstr "Jim" + +#: ../C/glabels.xml:62(surname) +msgid "Evins" +msgstr "Evins" + +#: ../C/glabels.xml:96(revnumber) +msgid "gLabels Manual V2.2" +msgstr "gLabels-Handbuch V2.2" + +#: ../C/glabels.xml:99(para) +msgid "Jim Evins evins@snaught.com" +msgstr "Jim Evins evins@snaught.com" + +#: ../C/glabels.xml:107(releaseinfo) +msgid "This manual describes version 2.2 of gLabels." +msgstr "Dieses Handbuch beschreibt Version 2.2 von gLabels." + +#: ../C/glabels.xml:110(title) +msgid "Feedback" +msgstr "Rückmeldungen" + +#: ../C/glabels.xml:111(para) +msgid "" +"To report a bug or make a suggestion regarding the gLabels application or this manual, follow the directions in the gLabels Contact " +"Page." +msgstr "" +"Um einen Fehler zu melden oder einen Vorschlag zur Anwendung " +"gLabels oder zu diesem Handbuch zu machen, folgen " +"Sie den Anweisungen auf der gLabels-Kontaktseite." + +#: ../C/glabels.xml:120(primary) +msgid "gLabels" +msgstr "gLabels" + +#: ../C/glabels.xml:123(primary) +msgid "glabels" +msgstr "glabels" + +#: ../C/glabels.xml:134(title) +msgid "Introduction" +msgstr "Einführung" + +#: ../C/glabels.xml:136(para) +msgid "" +"The gLabels application 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." +msgstr "" +"Die Anwendung gLabels ist ein ressourcenschonendes " +"Programm zum Erstellen von Etiketten und Visitenkarten für die " +"GNOME-Arbeitsumgebung. Es wurde für die " +"verschiedensten mit Laser- oder Tintenstrahldruckern bedruckbaren (auch " +"selbstklebenden) Etiketten sowie Visitenkarten entworfen, so wie Sie sie in " +"den meisten Schreibwarengeschäften finden." + +#: ../C/glabels.xml:157(title) +msgid "Getting Started" +msgstr "Erste Schritte" + +#: ../C/glabels.xml:160(title) +msgid "To Start gLabels" +msgstr "gLabels starten" + +#: ../C/glabels.xml:161(para) +msgid "" +"You can start gLabels " +"in the following ways:" +msgstr "" +"Sie können gLabels auf folgende Arten starten:" + +#: ../C/glabels.xml:165(term) +msgid "Applications menu" +msgstr "Menü Anwendungen" + +#: ../C/glabels.xml:167(para) +msgid "" +"Choose OfficegLabels." +msgstr "" +"Wählen Sie BüroanwendungengLabels." + +#: ../C/glabels.xml:175(term) +msgid "Command line" +msgstr "Befehlszeile" + +#: ../C/glabels.xml:177(para) +msgid "Type glabels, then press Return:" +msgstr "" +"Geben Sie glabels ein, und drücken Sie dann die " +"Eingabetaste." + +#: ../C/glabels.xml:185(title) +msgid "When You Start gLabels" +msgstr "Beim Start von gLabels" + +#: ../C/glabels.xml:186(para) +msgid "" +"When you start gLabels, " +"the following window is displayed." +msgstr "" +"Wenn Sie gLabels starten, wird folgendes Fenster " +"angezeigt." + +#: ../C/glabels.xml:190(title) +msgid "gLabels Start Up Window" +msgstr "gLabels-Startfenster" + +#. for example, the items on the menubar and on the toolbar. This section is optional. +#: ../C/glabels.xml:204(para) +msgid "" +"The gLabels window contains the following elements:" +msgstr "" +"Das gLabels-Fenster enthält folgende Elemente:" + +#: ../C/glabels.xml:208(term) +msgid "Menubar." +msgstr "Menüleiste." + +#: ../C/glabels.xml:210(para) +msgid "" +"The menus on the menubar contain all of the commands you need to create and " +"edit labels and business cards in gLabels." +msgstr "" +"Die Menüs in der Menüleiste enthalten alle Befehle, die Sie zum Erstellen und " +"Bearbeiten von Etiketten und Visitenkarten in gLabels benötigen." + +#: ../C/glabels.xml:216(term) +msgid "Main toolbar." +msgstr "Haupt-Werkzeugleiste." + +#: ../C/glabels.xml:218(para) +msgid "" +"The main toolbar contains a subset of common File and Edit commands that you " +"can access from the menubar." +msgstr "" +"Die Haupt-Werkzeugleiste enthält eine Auswahl der Befehle, die Sie über die " +"Menüleiste in den Menüs »Datei« und »Bearbeiten« erreichen." + +#: ../C/glabels.xml:223(term) +msgid "Drawing toolbar." +msgstr "Zeichenwerkzeugleiste." + +#: ../C/glabels.xml:225(para) +msgid "" +"The drawing toolbar contains a subset of commands for editing the current " +"glabels document." +msgstr "" +"Die Zeichenwerkzeugleiste enthält eine Auswahl von Befehlen zum Bearbeiten " +"des aktuellen gLabels-Dokuments." + +#: ../C/glabels.xml:230(term) +msgid "Display area." +msgstr "Anzeigebereich." + +#: ../C/glabels.xml:232(para) +msgid "" +"The display area is the main drawing interface to " +"gLabels." +msgstr "" +"Der Anzeigebereich ist die Zeichenfläche für gLabels." + +#: ../C/glabels.xml:237(term) +msgid "Object sidebar." +msgstr "Objekt-Seitenleiste." + +#: ../C/glabels.xml:239(para) +msgid "" +"The object sidebar provides an interface for viewing and editing all " +"properties of an individual object." +msgstr "" +"Die Objekt-Seitenleiste stellt eine Schnittstelle zum Betrachten und " +"Bearbeiten der Eigenschaften eines bestimmten Objekts zur Verfügung." + +#: ../C/glabels.xml:244(term) +msgid "Properties toolbar." +msgstr "Eingenschaften-Werkzeugleiste." + +#: ../C/glabels.xml:246(para) +msgid "" +"The properties toolbar contains a set of tools to manipulate the properties " +"of selected objects and set default properties for new objects." +msgstr "" +"Die Eigenschaften-Werkzeugleiste enthält eine Reihe von Werkzeugen zum " +"Manipulieren der Eigenschaften ausgewählter Objekte sowie zum Setzen der " +"Standardeigenschaften für neue Objekte." + +#: ../C/glabels.xml:252(term) +msgid "Statusbar." +msgstr "Statusleiste." + +#: ../C/glabels.xml:254(para) +msgid "" +"The statusbar displays information about current " +"gLabels activity and " +"contextual information about the menu items." +msgstr "" +"In der Statusleiste werden Informationen über die aktuelle " +"gLabels-Aktivität und Kontextinformationen über " +"die Menüpunkte angezeigt." + +#: ../C/glabels.xml:270(title) +msgid "Usage" +msgstr "Benutzung" + +#: ../C/glabels.xml:274(title) +msgid "To Create a New Label or Card" +msgstr "Erstellen eines neuen Etiketts oder einer neuen Karte" + +#: ../C/glabels.xml:276(para) +msgid "" +"To create a new label or business card, choose FileNew to display the " +"New Label or Card dialog. Select the media type and " +"orientation for the new document, then click OK. A new " +"document is displayed in the display area of the " +"gLabels window." +msgstr "" +"Um ein neues Etikett oder eine neue Visitenkarte anzulegen, wählen Sie " +"DateiNeu, um den Dialog Neues Etikett oder neue Karte " +"anzuzeigen. Wählen Sie den Medientyp und die Ausrichtung für das neue " +"Dokument aus und klicken Sie anschließend auf OK. Ein " +"neues Dokument erscheint im Anzeigebereich des " +"gLabels-Fensters." + +#: ../C/glabels.xml:285(para) +msgid "" +"If your particular media type is missing from this dialog, see " +msgstr "" +"Falls Ihr spezieller Medientyp in diesem Dialog nicht angezeigt wird, siehe " +"." + +#: ../C/glabels.xml:292(title) +msgid "To Open a File" +msgstr "Öffnen einer Datei" + +#: ../C/glabels.xml:294(para) +msgid "" +"To open a file, choose FileOpen to display the Open File " +"dialog. Select the file that you want to open, then click OK. The file is displayed in the display area of the " +"gLabels window." +msgstr "" +"Um eine Datei zu öffnen, wählen Sie DateiÖffnen, um den Dialog " +"Datei öffnen anzuzeigen. Wählen Sie die gewünschte Datei " +"aus und klicken Sie dann auf Öffnen. Die Datei wird im " +"Anzeigebereich des gLabels-Fensters geöffnet." + +#: ../C/glabels.xml:301(para) +msgid "" +"You can also open multiple files in gLabels. The application creates a separate application " +"window for each open file." +msgstr "" +"Sie können in gLabels auch mehrere Dateien öffnen. " +"Die Anwendung erzeugt ein separates Fenster für jede geöffnete Datei." + +#: ../C/glabels.xml:305(para) +msgid "" +"The application records the paths and filenames of the most recent files that " +"you have edited and displays the files as menu items on the " +"FileRecent Files menu." +msgstr "" +"Die Anwendung speichert die Pfade und Dateinamen der von Ihnen zuletzt " +"bearbeiteten Dateien. Diese Dateien werden als Einträge im Menü " +"DateiZuletzt benutzt angezeigt." + +#: ../C/glabels.xml:315(title) +msgid "To Open Multiple Files from a Command Line" +msgstr "Öffnen mehrerer Dateien aus einer Befehlszeile" + +#: ../C/glabels.xml:317(para) +msgid "" +"You can run gLabels " +"from a command line and open a single file or multiple files. To open " +"multiple files from a command line, type the following command, then press " +"Return:" +msgstr "" +"Sie können gLabels aus einer Befehlszeile starten " +"und eine Datei oder mehrere Dateien öffnen. Um mehrere Dateien aus einer " +"Befehlszeile zu öffnen, geben Sie den folgenden Befehl ein und drücken dann " +"die Eingabetaste:" + +#: ../C/glabels.xml:323(replaceable) +msgid "file1.glabels file2.glabels file3.glabels" +msgstr "Datei1.glabels Datei2.glabels Datei3.glabels" + +#: ../C/glabels.xml:322(command) +msgid "glabels " +msgstr "glabels " + +#: ../C/glabels.xml:326(para) +msgid "" +"When the application starts, the files that you specify are displayed in " +"separate gLabels " +"windows." +msgstr "" +"Wenn die Anwendung startet, werden die von Ihnen angegebenen Dateien in " +"separaten gLabels-Fenstern angezeigt." + +#: ../C/glabels.xml:333(title) +msgid "To Save a File" +msgstr "Speichern einer Datei" + +#: ../C/glabels.xml:335(para) +msgid "You can save files in the following ways:" +msgstr "Sie können Dateien auf folgende Arten speichern:" + +#: ../C/glabels.xml:340(para) +msgid "" +"To save changes to an existing file, choose FileSave." +msgstr "" +"Um die Änderungen in der bereits vorhandenen Datei zu speichern, wählen Sie " +"DateiSpeichern." + +#: ../C/glabels.xml:347(para) +msgid "" +"To save a new file or to save an existing file under a new filename, choose " +"FileSave As. Enter a name for the file in the Save As " +"dialog box, then click OK." +msgstr "" +"Um eine neue Datei oder eine bestehende Datei unter einem neuen Dateinamen zu " +"speichern, wählen Sie DateiSpeichern unter. Geben Sie " +"einen Namen für die Datei im Dialogfeld Speichern unter " +"ein und klicken Sie anschließend auf OK. " + +#: ../C/glabels.xml:360(title) +msgid "To Change Label Properties" +msgstr "Ändern der Eigenschaften eines Etiketts" + +#: ../C/glabels.xml:362(para) +msgid "" +"To change the media type and/or orientation of a label, choose " +"FileProperties to display the Label properties dialog. " +"Select the new media type and orientation for the document, then click " +"OK." +msgstr "" +"Um den Medientyp oder die Ausrichtung des Etiketts zu ändern, wählen Sie " +"DateiEigenschaften, um den Dialog Etikett-Eigenschaften " +"anzuzeigen. Wählen Sie den neuen Medientyp für das Dokument aus und klicken " +"Sie anschließend auf OK." + +#: ../C/glabels.xml:373(title) +msgid "To Create a Custom Template" +msgstr "Erstellen einer benutzerdefinierten Vorlage" + +#: ../C/glabels.xml:375(para) +msgid "" +"To create a new custom template, choose FileTemplate Designer ... to " +"display the Template Designer dialog. This dialog will " +"assist you in creating a custom template for most types of label or card " +"stationery that you may encounter." +msgstr "" +"Um eine neue benutzerdefinierte Vorlage zu erstellen, wählen Sie " +"DateiVorlagen-Designer …, um den Vorlagen-Designer-" +"Dialog anzuzeigen. Dieser Dialog hilft Ihnen bei der Erstellung einer " +"benutzerdefinierten Vorlage für die meisten Typen von Etiketten oder " +"Visitenkarten, die Ihnen in Schreibwarengeschäften begegnen könnten." + +#: ../C/glabels.xml:382(para) +msgid "" +"If you prefer, you can create your templates manually. For this option see " +"" +msgstr "" +"Falls Sie dies bevorzugen, können Sie Ihre Vorlagen auch manuell erstellen. " +"Weitere Informationen hierzu finden Sie in ." + +#: ../C/glabels.xml:390(title) +msgid "To Close a File" +msgstr "Schließen einer Datei" + +#: ../C/glabels.xml:392(para) +msgid "" +"To close the current document, choose FileClose to close the " +"application window. If the current document is modified, a confirmation " +"dialog will be presented, allowing you to save the document or cancel the " +"command. If the window being closed is the only open window, " +"gLabels will exit." +msgstr "" +"Um das aktuelle Dokument zu schließen, wählen Sie DateiSchließen, um das " +"Anwendungsfenster zu schließen. Falls das aktuelle Dokument bearbeitet wurde, " +"wird ein Bestätigungsdialog geöffnet, in welchem Sie das Dokument speichern " +"oder den Vorgang abbrechen können. Falls das zu schließende Fenster das " +"einzige offene Fenster ist, wird gLabels dadurch beendet." + +#: ../C/glabels.xml:404(title) +msgid "To Quit gLabels" +msgstr "gLabels beenden" + +#: ../C/glabels.xml:406(para) +msgid "" +"To quit gLabels, choose " +"FileQuit. This is equivalent to closing all open windows. See ." +msgstr "" +"Um gLabels zu beenden, " +"wählen Sie DateiBeenden. Dadurch werden alle offenen Fenster geschlossen. " +"Siehe ." + +#: ../C/glabels.xml:416(title) +msgid "To Print Labels or Cards" +msgstr "Drucken von Etiketten oder Karten" + +#: ../C/glabels.xml:418(para) +msgid "" +"To print labels or cards, choose FilePrint to display the " +"Print dialog. Once print options have been selected, " +"click Print to print the labels or cards. To simply " +"preview the results, click Print Preview instead." +msgstr "" +"Um Etiketten oder Visitenkarten zu drucken, wählen Sie " +"DateiDrucken, um den Drucken-Dialog anzuzeigen. Nachdem " +"Sie die Druckoptionen ausgewählt haben, klicken Sie auf Drucken, um die Etiketten oder Visitenkarten zu drucken. Um zunächst eine " +"Vorschau auf die Druckergebnisse zu erhalten, klicken Sie auf " +"Druckvorschau." + +#: ../C/glabels.xml:425(para) +msgid "" +"The Print dialog allows you to specify the following " +"print options:" +msgstr "" +"Im Dialog Drucken können Sie die folgenden Optionen zum " +"Drucken festlegen:" + +#: ../C/glabels.xml:429(title) +msgid "The Labels Tab of the Print Dialog" +msgstr "Der Reiter »Etiketten« des Druckdialogs" + +#: ../C/glabels.xml:434(guilabel) +msgid "Print control (Simple)" +msgstr "Drucksteuerung (einfach)" + +#: ../C/glabels.xml:437(para) +msgid "" +"For simple labels or cards (no document merge), the job tabbed section " +"contains the following copy controls." +msgstr "" +"Für einfache Etiketten oder Karten (keine Dokumentmischung) enthält der " +"Reiter »Labels« die folgenden Einstellmöglichkeiten." + +#: ../C/glabels.xml:442(title) +msgid "Print Copy Controls" +msgstr "Angeben der Kopien" + +#. ==== End of Figure ==== +#: ../C/glabels.xml:453(para) +msgid "" +"The number of copies of the label can be selected by choosing the number of " +"full sheets to print, or a specific subset of labels on a single sheet." +msgstr "" +"Die Anzahl der Kopien können Sie wählen, indem Sie die Anzahl der vollständig " +"zu druckenden Seiten oder eine Teilmenge von Etiketten auf einer einzelnen " +"Seite auswählen." + +#: ../C/glabels.xml:457(para) +msgid "" +"The mini-preview can also be used to graphically select the subset of labels " +"by clicking the first label on the mini-preview and dragging to the last " +"label." +msgstr "" +"Die verkleinerte Vorschau können Sie auch dazu verwenden, einen Teil der " +"Etiketten grafisch auszuwählen, indem Sie auf das erste Etikett klicken und " +"es auf das letzte Etikett ziehen." + +#: ../C/glabels.xml:465(guilabel) +msgid "Print control (Merge)" +msgstr "Drucksteuerung (Mischen)" + +#: ../C/glabels.xml:468(para) +msgid "" +"For labels or cards using the document merge (also known as \"mail merge\") " +"capability, the job tabbed section contains the following merge controls " +"instead of copy controls." +msgstr "" +"Für Etiketten oder Karten unter Verwendung der Dokumentmischung enthält " +"dieser Reiter die folgenden Einstellungen zur Mischung von Dokumenten " +"anstelle der Festlegung der Kopien." + +#: ../C/glabels.xml:474(title) +msgid "Print Document Merge Controls" +msgstr "Steuerung der Einmischung von Dokumenten" + +#. ==== End of Figure ==== +#: ../C/glabels.xml:485(para) +msgid "" +"The total number of labels or cards printed is the product of the number of " +"records in the merge source and the number of copies selected. If multiple " +"copies are selected, these can be either collated (copies of the same record " +"grouped together) or un-collated (one copy each record is printed before next " +"copy)." +msgstr "" +"Die Gesamtzahl der gedruckten Etiketten oder Karten ergibt sich als Produkt " +"aus der Anzahl der Datensätze in der Einmischquelle und der Anzahl der " +"gewählten Kopien. Falls mehrere Kopien gewählt wurden, können diese entweder " +"zusammengefasst werden (durch Gruppieren der Kopien des gleichen Datensatzes) " +"oder nicht zusammengefasst (eine Kopie jedes Datensatzes wird immer vor der " +"nächsten Kopie gedruckt)." + +#: ../C/glabels.xml:492(para) +msgid "" +"Printing can begin on any label on the first sheet. This can be selected with " +"the Start on label spinbutton." +msgstr "" +"Der Druck kann mit jedem beliebigen Etikett der ersten Seite begonnen werden. " +"Dies können Sie im Einstellfeld Start bei Etikett " +"auswählen." + +#: ../C/glabels.xml:496(para) +msgid "" +"The mini-preview can also be used to graphically select this first label, by " +"clicking on the desired label in the mini-preview." +msgstr "" +"In der verkleinerten Vorschau können Sie das erste Etikett grafisch " +"auswählen, indem Sie das gewünschte Etikett anklicken." + +#: ../C/glabels.xml:503(guilabel) +msgid "Options" +msgstr "Optionen" + +#: ../C/glabels.xml:505(para) +msgid "The following options can also be selected." +msgstr "Die folgenden Optionen können ebenfalls gewählt werden." + +#: ../C/glabels.xml:508(guilabel) +msgid "print outlines" +msgstr "Begrenzungen drucken" + +#: ../C/glabels.xml:509(para) +msgid "" +"Print outlines of labels. This option is useful for dry-runs, to test printer " +"alignment." +msgstr "" +"Begrenzungen der Etiketten drucken. Diese Option ist nützlich, wenn Sie die " +"Lage des Papiers im Drucker prüfen wollen." + +#: ../C/glabels.xml:513(guilabel) +msgid "print in reverse" +msgstr "Spiegelbildlich drucken" + +#: ../C/glabels.xml:514(para) +msgid "" +"Prints the labels as mirror images. This option is useful for printing on " +"clear labels that will be viewed from the reverse side (e.g. in a car window)." +msgstr "" +"Druckt die Etiketten spiegelbildlich. Diese Option ist nützlich für das " +"Drucken durchsichtiger Aufkleber, die von der Rückseite aus betrachtet werden " +"(z.B. hinter Autoscheiben)." + +#: ../C/glabels.xml:519(guilabel) +msgid "print crop marks" +msgstr "Schnitt" + +#: ../C/glabels.xml:520(para) +msgid "" +"Prints crop marks along the edge of the sheet. This option is useful for " +"printing on blank stock, to be cut after printing. This option does not work " +"well with all templates." +msgstr "" +"Druckt Schnittmarken entlang der Papierränder. Diese Option ist nützlich zum " +"Drucken auf Papier, das erst nach dem Druck beschnitten werden soll. Diese " +"Option funktioniert eventuell nicht mit allen Vorlagen." + +#: ../C/glabels.xml:535(title) +msgid "To Create New Objects" +msgstr "Erstellen neuer Objekte" + +#: ../C/glabels.xml:537(para) +msgid "" +"Objects are created by choosing the appropriate selection under the " +"ObjectsCreate Object submenu or the Drawing Toolbar. This will place the display area into object creation mode as " +"indicated by its cursor. To return to the default object selection mode " +"without creating an object, choose ObjectsSelect Mode. This will return " +"the display area's cursor to the default selection arrow." +msgstr "" +"Objekte können ausgewählt werden, indem Sie das entsprechende Objekt in " +"ObjekteErzeugen auswählen oder über die Zeichenwerkzeugleiste. Dadurch wird der Anzeigebereich in den Objekterzeugungsmodus " +"versetzt, was am Mauszeiger erkennbar ist. Um zum vorgegebenen " +"Objektauswahlmodus zurückzukehren, ohne ein Objekt zu erzeugen, wählen Sie " +"ObjekteAuswahlmodus. Dadurch wird der Mauszeiger im Anzeigebereich " +"wieder in den vorgegebenen Auswahlzeiger geändert." + +#: ../C/glabels.xml:547(para) +msgid "The following describes the object creation mode for each object type:" +msgstr "" +"Nachfolgend wird der Modus zur Erstellung der Objekte für jeden Objekttyp " +"beschrieben:" + +#: ../C/glabels.xml:553(term) ../C/glabels.xml:1122(guilabel) +msgid "Text" +msgstr "Text" + +#: ../C/glabels.xml:555(para) +msgid "" +"Click the desired location of the upper left corner of the text object. New " +"text objects are initialized with the string \"Text.\" To change this text, " +"or other properties, see ." +msgstr "" +"Klicken Sie auf die gewünschte Stelle in der linken oberen Ecke des " +"Textobjekts. Neue Textobjekte erhalten anfänglich den Inhalt »Text«. Wie Sie " +"diesen Text oder andere Eigenschaften ändern können, finden Sie in ." + +#: ../C/glabels.xml:563(term) +msgid "Box" +msgstr "Rechteck" + +#: ../C/glabels.xml:565(para) +msgid "" +"Click the desired location of the upper left corner of the box object and " +"drag to the desired location of the lower right corner. If you simply click " +"in a single location, a square box will be created. To change properties of " +"the box object, see ." +msgstr "" +"Klicken Sie auf die gewünschte Stelle für die linke obere Ecke des " +"Rechteckobjekts und ziehen Sie zur gewünschten rechten unteren Ecke. Wenn Sie " +"einfach auf eine Stelle klicken, wird ein quadratisches Objekt erzeugt. Wie " +"Sie die Eigenschaften des Rechteckobjekts ändern können, finden Sie in ." + +#: ../C/glabels.xml:574(term) ../C/glabels.xml:1148(guilabel) +msgid "Line" +msgstr "Linie" + +#: ../C/glabels.xml:576(para) +msgid "" +"Click the desired location of one end of the line object and drag to the " +"desired location of the other end. If you simply click in a single location, " +"a diagonal line will be created. To change properties of the line object, see " +"." +msgstr "" +"Klicken Sie auf die gewünschte Stelle für das Ende des Linienobjekts und " +"ziehen Sie zur gewünschten Stelle des anderen Endes. Wenn Sie einfach auf " +"eine Stelle klicken, wird eine diagonale Linie erzeugt. Wie Sie die " +"Eigenschaften des Linienobjekts ändern können, finden Sie in ." + +#: ../C/glabels.xml:585(term) +msgid "Ellipse" +msgstr "Ellipse" + +#: ../C/glabels.xml:587(para) +msgid "" +"Click the desired location of the upper left corner of the ellipse object and " +"drag to the desired location of the lower right corner. If you simply click " +"in a single location, a circle will be created. To change properties of the " +"ellipse object, see ." +msgstr "" +"Klicken Sie auf die gewünschte Stelle für die linke obere Ecke des " +"Ellipsenobjekts und ziehen Sie zur gewünschten rechten unteren Ecke. Wenn Sie " +"einfach auf eine Stelle klicken, wird ein Kreis erzeugt. Wie Sie die " +"Eigenschaften des Ellipsenobjekts ändern können, finden Sie in ." + +#: ../C/glabels.xml:596(term) +msgid "Image" +msgstr "Image" + +#: ../C/glabels.xml:598(para) +msgid "" +"Click the desired location of the upper left corner of the image object and " +"drag to the desired location of the lower right corner. If you simply click " +"in a single location, a square will be created. New image objects are " +"initialized with a simple checkerboard image. To change this image, or other " +"properties of the image object, see ." +msgstr "" +"Klicken Sie auf die gewünschte Stelle für die linke obere Ecke des " +"Bildobjekts und ziehen Sie zur gewünschten rechten unteren Ecke. Wenn Sie " +"einfach auf eine Stelle klicken, wird ein quadratisches Objekt erzeugt. Neue " +"Bildobjekte erhalten anfänglich ein Schachbrettmuster. Wie Sie dies oder " +"andere Eigenschaften des Bildobjekts ändern können, finden Sie in ." + +#: ../C/glabels.xml:609(term) +msgid "Barcode" +msgstr "Strichcode" + +#: ../C/glabels.xml:611(para) +msgid "" +"Click the desired location of the upper left corner of the barcode object. " +"New barcode objects are initialized to a POSTNET barcode with representative " +"data. To change data and properties of the barcode object, see ." +msgstr "" +"Klicken Sie auf die gewünschte Stelle für die linke obere Ecke des " +"Strichcodeobjekts und ziehen Sie zur gewünschten rechten unteren Ecke. Neue " +"Objekte erhalten anfänglich einen POSTNET-Strichcode mit Beispieldaten. Wie " +"Sie die Eigenschaften des Strichcodeobjekts ändern können, finden Sie in " +"." + +#: ../C/glabels.xml:626(title) +msgid "To Select Objects" +msgstr "Auswählen von Objekten" + +#: ../C/glabels.xml:628(para) +msgid "" +"A prerequisite for performing operations on objects is the selection of " +"individual objects or groups of objects. The display area must be in the " +"object selection mode to create new selections, as indicated by an arrow " +"cursor. The object selection mode is selected by the " +"ObjectsSelect Mode menu item, or the corresponding command on the Drawing " +"Toolbar." +msgstr "" +"Eine Voraussetzung zum Ausführen von Operationen auf Objekten ist die Auswahl " +"individueller Objekte oder Gruppen von Objekten. Der Anzeigebereich muss sich " +"im Objektauswahlmodus befinden, was durch einen pfeilförmigen Mauszeiger " +"angezeigt wird. Der Objektauswahlmodus wird über den Menüeintrag " +"ObjekteAuswahlmodus aktiviert oder über das entsprechende Objekt in der " +"Zeichenwerkzeugleiste." + +#: ../C/glabels.xml:641(term) +msgid "Selecting a single object" +msgstr "Auswahl eines einzelnen Objekts" + +#: ../C/glabels.xml:643(para) +msgid "" +"A single object can be selected simply by clicking on the desired object in " +"the display area. Once selected the object will be highlighted with a set of " +"resizing handles." +msgstr "" +"Ein einzelnes Objekt können Sie auswählen, indem Sie das gewünschte Objekt im " +"Anzeigebereich anklicken. Nach dem Anklicken wird das Objekt durch " +"Anfasspunkte zur Größenänderung hervorgehoben." + +#: ../C/glabels.xml:651(term) +msgid "Aggregate object selections" +msgstr "Auswahl mehrerer Objekte" + +#: ../C/glabels.xml:653(para) +msgid "" +"Multiple objects can be selected by first selecting the first object as above " +"and then by holding the Ctrl key while selecting additional " +"objects. Individual objects can be added to an existing selection at any time " +"by holding the Ctrl key while selecting the desired objects. " +"All objects can also be selected by using the EditSelect All menu item. All " +"objects in an aggregate object selection will be highlighted." +msgstr "" +"Sie können mehrere Objekte auswählen, indem Sie zunächst das erste Objekt " +"auswählen, wie oben beschrieben. Halten Sie dann bei der Auswahl weiterer " +"Objekte die Strg-Taste gedrückt. Zusätzliche Objekte können " +"Sie jederzeit zur Auswahl hinzufügen, wenn Sie wiederum die Strg-Taste gedrückt halten und die gewünschten Objekte auswählen. Alle " +"Objekte lassen sich über den Menüeintrag BearbeitenAlle auswählen auswählen. " +"Alle Objekte in einer zusammenhängenden Objektauswahl werden hervorgehoben " +"dargestellt." + +#: ../C/glabels.xml:667(term) +msgid "Area selections" +msgstr "Bereichsauswahl" + +#: ../C/glabels.xml:669(para) +msgid "" +"Multiple objects can also be selected by clicking an empty area and dragging " +"to form a rectangular area. When released, all objects contained in the area " +"will form an aggregate selection. An area selection can be used to add to an " +"existing selection by holding the Ctrl key while performing " +"the selection." +msgstr "" +"Sie können auch mehrere Objekte auswählen, indem Sie in einen leeren Bereich " +"klicken und mit der Maus die Form eines Rechtecks aufziehen. Daraufhin bilden " +"alle Objekte in diesem Bereich eine zusammenhängende Auswahl. Eine " +"Bereichsauswahl kann zum Hinzufügen einer vorhandenen Auswahl benutzt werden, " +"wenn Sie bei der Auswahl die Strg-Taste gedrückt halten." + +#: ../C/glabels.xml:679(term) +msgid "Unselecting objects" +msgstr "Auswahl von Objekten aufheben" + +#: ../C/glabels.xml:681(para) +msgid "" +"Individual objects can be removed from an existing selection by holding the " +"Ctrl key while clicking on a previously selected object. An " +"entire selection can be dismissed by using the EditUn-select All menu item or by " +"simply clicking any empty space in the display area. Once an object is " +"unselected its highlight is removed." +msgstr "" +"Sie können individuelle Objekte aus einer vorhandenen Auswahl entfernen, wenn " +"Sie beim Klicken auf ein zuvor ausgewähltes Objekt die Strg-" +"Taste gedrückt halten. Die gesamte Auswahl können Sie rückgängig machen, " +"indem Sie im Menü BearbeitenAlle " +"Markierungen löschen wählen. Sobald ein Objekt " +"nicht mehr ausgewählt ist, wird es nicht mehr hervorgehoben dargestellt." + +#: ../C/glabels.xml:698(title) +msgid "Clipboard Commands" +msgstr "Befehle für die Zwischenablage" + +#: ../C/glabels.xml:700(para) +msgid "" +"Object selections can be manipulated using the standard clipboard operations " +"Cut, Copy, " +"Paste, and Delete." +msgstr "" +"Objektauswahlen können durch die Standardoperationen der Zwischenablage " +"Ausschneiden, Kopieren, " +"Einfügen und Löschen " +"manipuliert werden." + +#: ../C/glabels.xml:711(keycap) ../C/glabels.xml:727(keycap) +#: ../C/glabels.xml:743(keycap) +msgid "Ctrl" +msgstr "Strg" + +#: ../C/glabels.xml:711(keycap) +msgid "X" +msgstr "X" + +#: ../C/glabels.xml:713(guimenuitem) +msgid "Cut" +msgstr "Ausschneiden" + +#: ../C/glabels.xml:717(para) +msgid "" +"Moves selected objects to the clipboard. The objects are then available for " +"pasting back into the current document or another document." +msgstr "" +"Verschiebt die ausgewählten Objekte in die Zwischenablage. Diese Objekte sind " +"dann verfügbar, um später in das aktuelle Dokument oder ein anderes Dokument " +"eingefügt zu werden." + +#: ../C/glabels.xml:727(keycap) +msgid "C" +msgstr "C" + +#: ../C/glabels.xml:729(guimenuitem) +msgid "Copy" +msgstr "Kopieren" + +#: ../C/glabels.xml:733(para) +msgid "" +"Copies selected objects to the clipboard without deleting them. The objects " +"are then available for pasting back into the current document or another " +"document." +msgstr "" +"Kopiert die ausgewählten Objekte in die Zwischenablage, ohne sie zu " +"entfernen. Diese Objekte sind dann verfügbar, um später in das aktuelle " +"Dokument oder ein anderes Dokument eingefügt zu werden." + +#: ../C/glabels.xml:743(keycap) +msgid "V" +msgstr "V" + +#: ../C/glabels.xml:745(guimenuitem) +msgid "Paste" +msgstr "Einfügen" + +#: ../C/glabels.xml:749(para) +msgid "" +"Pastes objects from the clipboard into the current document. " +"gLabels can only paste " +"objects from another gLabels document." +msgstr "" +"Fügt Objekte aus der Zwischenablage in das aktuelle Dokument ein. " +"gLabels kann nur Objekte aus anderen " +"gLabels-Dokumenten einfügen." + +#: ../C/glabels.xml:759(keycap) ../C/glabels.xml:761(guimenuitem) +msgid "Delete" +msgstr "Löschen" + +#: ../C/glabels.xml:765(para) +msgid "Deletes selected objects without placing them on the clipboard." +msgstr "" +"Entfernt die ausgewählten Objekte, ohne sie in die Zwischenablage zu " +"verschieben." + +#: ../C/glabels.xml:776(title) +msgid "To Edit Object Properties" +msgstr "Bearbeiten der Objekteigenschaften" + +#: ../C/glabels.xml:778(para) +msgid "" +"Most object properties can be modified through the object editor sidebar, " +"illustrated below. To use the object editor, a single object must first be " +"selected. See ." +msgstr "" +"Die meisten Objekteigenschaften können Sie über die Objekteditor-Seitenleiste " +"verändern, wie unten illustriert. Um den Objekteditor zu verwenden, muss " +"zunächst ein einzelnes Objekt ausgewählt werden. Siehe ." + +#: ../C/glabels.xml:785(title) +msgid "Object Editor Sidebar" +msgstr "Objekteditor-Seitenleiste" + +#. ==== End of Figure ==== +#: ../C/glabels.xml:796(para) +msgid "" +"The object editor will contain a subset of the following tabbed sections, " +"depending on object type:" +msgstr "" +"Der Objekteditor bietet eine Auswahl der folgenden Reiter, abhängig vom " +"Objekttyp:" + +#: ../C/glabels.xml:800(title) +msgid "Text Tabbed Section (Text objects)" +msgstr "Text-Reiter (Textobjekte)" + +#: ../C/glabels.xml:802(para) +msgid "" +"This section contains a small editor for changing the content of a text " +"object. It also contains a dropdown menu of available document merge keys, " +"that can be inserted into text." +msgstr "" +"Dieser Abschnitt bietet einen kleinen Editor zum Bearbeiten des Inhalts eines " +"Textobjekts. Weiterhin ist ein Ausklappmenü mit den verfügbaren Schlüsseln " +"zur Dokumentmischung enthalten, die in den Text eingefügt werden können." + +#: ../C/glabels.xml:809(title) +msgid "Image Tabbed Section (Image objecs)" +msgstr "Bild-Reiter (Bild-Objekte)" + +#: ../C/glabels.xml:811(para) +msgid "" +"This section contains a file entry with preview to select image files. The " +"browse button can be used to easily locate image files. Alternatively, a " +"document merge key can be used instead to provide a filename at print time." +msgstr "" +"Dieser Abschnitt enthält einen Dateiwähler mit Vorschau zur Auswahl von " +"Bilddateien. Der »Durchsuchen«-Knopf kann zum Suchen von Bilddateien benutzt " +"werden. Alternativ können Sie einen Schlüssel zur Dokumenteinmischung " +"anstelle eines Dateinamens angeben, der bei der Ausgabe des Dokuments ersetzt " +"wird." + +#: ../C/glabels.xml:819(title) +msgid "Data Tabbed Section (Barcode objecs)" +msgstr "Daten-Reiter (Strichcode-Objekte)" + +#: ../C/glabels.xml:821(para) +msgid "" +"This section contains a text entry to enter literal barcode data. " +"Alternatively, a document merge key can be used to provide this data at print " +"time." +msgstr "" +"Dieser Abschnitt enthält ein Textfeld zur Eingabe von Strichcode-Daten. " +"Alternativ kann hier ein Schlüssel zur Dokumentmischung eingetragen werden, " +"der beim Druck für die Bereitstellung der richtigen Daten sorgt." + +#: ../C/glabels.xml:828(title) +msgid "Style Tabbed Section (Text objects)" +msgstr "Stil-Reiter (Text-Objekte)" + +#: ../C/glabels.xml:830(para) +msgid "" +"This section contains controls to select text properties, including font " +"family, font size, font weight, color, and text justification." +msgstr "" +"Dieser Abschnitt enthält Einstellmöglichkeiten für die Texteigenschaften, wie " +"Schriftfamilie, Schriftgröße, Schriftstärke, Schriftfarbe und Ausrichtung des " +"Texts." + +#: ../C/glabels.xml:837(title) +msgid "Style Tabbed Section (Barcode objecs)" +msgstr "Stil-Reiter (Strichcode-Objekte)" + +#: ../C/glabels.xml:839(para) +msgid "" +"This section contains controls to select barcode properties, including " +"barcode style, color, whether to print text, and whether to include a " +"checksum digit." +msgstr "" +"Dieser Abschnitt enthält Einstellmöglichkeiten für die Eigenschaften des " +"Strichcodes, wie Stil, Farbe, Drucken von Text oder Beinhalten einer " +"Prüfsumme." + +#: ../C/glabels.xml:846(title) +msgid "Line Tabbed Section" +msgstr "Linie-Reiter" + +#: ../C/glabels.xml:848(para) +msgid "" +"This section contains controls to select properties of lines and outlines. " +"These properties include line width and color." +msgstr "" +"Dieser Abschnitt enthält Einstellmöglichkeiten für die Auswahl von " +"Eigenschaften von Linien und Begrenzungen, wie Linienbreite und -farbe." + +#: ../C/glabels.xml:854(title) +msgid "Fill Tabbed Section" +msgstr "Füllung-Reiter" + +#: ../C/glabels.xml:856(para) +msgid "" +"This section contains controls to select fill properties of box and ellipse " +"objects. Currently the only fill property is fill color." +msgstr "" +"Dieser Abschnitt enthält Einstellmöglichkeiten für die Auswahl der " +"Füllungseigenschaften von Rechteck- und Ellipsenobjekten. Derzeit ist nur die " +"Einstellung der Füllungsfarbe möglich." + +#: ../C/glabels.xml:863(title) +msgid "Size Tabbed Section (All except line objects)" +msgstr "Reiter »Größe« (alle außer Linienobjekte)" + +#: ../C/glabels.xml:865(para) +msgid "" +"This section contains controls to select the width and height of an object. A " +"checkbox is provided, so that the current aspect ratio can be locked while " +"manipulating the width and height controls. Image objects also provide a " +"button to reset the size to the image's natural size (Assumes 72DPI)." +msgstr "" +"Dieser Abschnitt enthält Einstellmöglichkeiten für die Höhe und die Breite " +"eines Objekts. Mit einem Ankreuzfeld können Sie die Werte aneinander koppeln, " +"so dass das Seitenverhältnis beim Ändern der Höhe oder Breite erhalten " +"bleibt. Für Bildobjekte gibt es außerdem einen Knopf zum Zurücksetzen des " +"Bildes auf Originalgröße, wobei eine Auflösung von 72 dpi angenommen wird." + +#: ../C/glabels.xml:874(title) +msgid "Size Tabbed Section (Line objects)" +msgstr "Reiter »Größe« (Linienobjekte)" + +#: ../C/glabels.xml:876(para) +msgid "" +"This section contains controls to select the length and angle of a line " +"object." +msgstr "" +"Dieser Abschnitt enthält Einstellmöglichkeiten für die Länge und den Winkel " +"eines Linienobjekts." + +#: ../C/glabels.xml:882(title) +msgid "Position Tabbed Section" +msgstr "Reiter »Position«" + +#: ../C/glabels.xml:884(para) +msgid "This section contains controls to change the position of an object." +msgstr "" +"Dieser Abschnitt beschreibt die Möglichkeiten zur Positionierung eines " +"Objekts." + +#: ../C/glabels.xml:891(title) +msgid "Shadow Tabbed Section (All except image and barcode objects)" +msgstr "Reiter »Schattierung« (alle außer Bild- und Strichcodeobjekten)" + +#: ../C/glabels.xml:893(para) +msgid "This section contains controls to add a shadow to an object." +msgstr "" +"Dieser Abschnitt enthält Einstellmöglichkeiten für die Schattierung eines " +"Objekts." + +#: ../C/glabels.xml:902(title) +msgid "Other Manipulations of Objects" +msgstr "Andere Manipulationen von Objekten" + +#: ../C/glabels.xml:904(para) +msgid "Objects can also be manipulated in the following ways." +msgstr "Objekte können auf die folgenden Arten manipuliert werden." + +#: ../C/glabels.xml:907(title) +msgid "Moving and Resizing Objects" +msgstr "Verschieben und Größenänderung von Objekten" + +#: ../C/glabels.xml:909(para) +msgid "" +"Objects can be moved by simply clicking on a selected object and dragging the " +"object to its new location. If the object is part of an aggregate selection, " +"all objects in the selection will move with the object being dragged, " +"maintaining their relative positions to one another. If no object is " +"selected, clicking on an object will create a new selection containing that " +"object. See ." +msgstr "" +"Objekte können Sie durch einfaches Anklicken und Ziehen des ausgewählten " +"Objekts zur neuen Position verschieben. Falls dieses Objekt Teil einer " +"Mehrfachauswahl ist, werden durch Ziehen dieses Objektes alle Objekte " +"verschoben, wobei deren Abstände untereinander erhalten bleiben. Falls kein " +"Objekt ausgewählt ist, wird durch Anklicken eines Objekts eine neue Auswahl " +"erzeugt, die dieses Objekt enthält. Siehe ." + +#: ../C/glabels.xml:917(para) +msgid "" +"A selected object can be resized by clicking one of its resize handle and " +"dragging it to obtain the new size." +msgstr "" +"Die Größe eines ausgewählten Objekts kann geändert werden, indem Sie auf " +"einen der Größenänderungs-Anfasspunkte klicken und diesen ziehen, um die " +"gewünschte Größe zu erreichen." + +#: ../C/glabels.xml:923(title) +msgid "Changing Stacking Order" +msgstr "Ändern der Reihenfolge der Ebenen" + +#: ../C/glabels.xml:925(para) +msgid "" +"Stacking order refers to relative position in the z-axis of objects. That is " +"when objects overlap, which object will appear on top of the other. By " +"default, newer objects will appear above older objects. To change this order, " +"select one or more objects and choose ObjectsOrderBring to Front to raise the selection to the top of the stacking " +"order, or choose ObjectsOrderSend to Back to lower the " +"selection to the bottom of the stacking order. These menuitems are also " +"available by right-clicking the display area when there is a non-empty " +"selection." +msgstr "" +"Die Stapelreihenfolge bezieht sich auf die relative Position in der Z-Achse " +"von Objekten. Das beschreibt beim Überlappen von Objekten, welches der " +"Objekte über den anderen erscheint. Per Vorgabe werden neue Objekte immer " +"oberhalb von bereits vorhandenen Objekten platziert. Um diese Anordnung zu " +"ändern, wählen Sie ObjekteAnordnungGanz nach vorn, um die Auswahl im Stapel nach oben zu verschieben, " +"oder ObjekteAnordnungGanz nach hinten, um die " +"Auswahl im Stapel nach unten zu verschieben. Diese Menüeinträge sind auch " +"durch einen Klick mit der rechten Maustaste auf den Ansichtsbereich " +"verfügbar, falls sich dort eine nicht leere Auswahl befindet." + +#: ../C/glabels.xml:943(title) +msgid "Rotating and Flipping Objects" +msgstr "Drehen und Spiegeln von Objekten" + +#: ../C/glabels.xml:945(para) +msgid "" +"Objects can be rotated 90 degrees in either direction, or flipped " +"horizontally or vertically, by choosing the appropriate menuitem in the " +"ObjectsRotate/Flip sub-menu. These menuitems are also available by right-clicking " +"the display area when there is a non-empty selection." +msgstr "" +"Objekte können um 90 Grad in jeder Richtung gedreht oder horizontal oder " +"vertikal gespiegelt werden. Wählen Sie hierzu den entsprechenden Eintrag im " +"Menü ObjekteDrehen/Spiegeln. Diese Menüeinträge sind auch verfügbar, wenn Sie " +"mit der rechten Maustaste in eine nicht leere Auswahl im Ansichtsbereich " +"klicken." + +#: ../C/glabels.xml:955(title) +msgid "Aligning Objects" +msgstr "Ausrichten von Objekten" + +#: ../C/glabels.xml:957(para) +msgid "" +"Objects can be aligned horizontally or vertically, relative to one another, " +"or relative to the center line of the label, by choosing the appropriate " +"menuitem from the ObjectsAlign " +"Horizontal or ObjectsAlign Horizontal sub-menus. " +"These menuitems are also available by right-clicking the display area when " +"there is a non-empty selection." +msgstr "" +"Objekte können horizontal oder vertikal zu einem anderen Objekt oder relativ " +"zu einer Mittellinie des Etiketts angeordnet werden, indem Sie " +"ObjekteHorizontal oder ObjekteVertikal wählen. Diese Menüeinträge sind auch verfügbar, " +"wenn Sie mit der rechten Maustaste in eine nicht leere Auswahl im " +"Ansichtsbereich klicken." + +#: ../C/glabels.xml:970(title) +msgid "Using the Property Bar" +msgstr "Verwendung der Eigenschaftsleiste" + +#: ../C/glabels.xml:972(para) +msgid "" +"The property bar can be used to change some common properties of objects en-" +"masse. These properties include font family, font size, font weight, text " +"alignment, text color, fill color, line or outline color, and line width. The " +"property bar also controls the defaults for these properties for any newly " +"created objects." +msgstr "" +"Mit der Eigenschaftsleiste können Sie einige Eigenschaften von Objekten in " +"einem Arbeitsgang ändern. Diese Eigenschaften umfassen Schriftfamilie, " +"Schriftgröße, Schriftstärke, Textausrichtung, Textfarbe, Füllfarbe, Farbe von " +"Linien oder Begrenzungen sowie Linienbreiten. Die Eigenschaftsleiste regelt " +"auch die Vorgaben für diese Eigenschaften, wenn neue Objekte erzeugt werden." + +#: ../C/glabels.xml:987(title) +msgid "Performing a Document Merge" +msgstr "Ausführung einer Dokumentmischung" + +#: ../C/glabels.xml:989(para) +msgid "" +"Document Merge (sometimes called \"Mail Merge\") is a powerful feature that " +"allows a unique label or card to be printed for each record in an external " +"data source." +msgstr "" +"Dokumentmischung ist ein mächtiges Funktionsmerkmal, das es Ihnen ermöglicht, " +"ein einzelnes Etikett oder eine einzelne Karte für jeden Datensatz aus einer " +"externen Datenquelle zu erstellen." + +#: ../C/glabels.xml:993(para) +msgid "" +"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 back-" +"ends only exist for text files and the evolution data server -- others are " +"planned. The currently supported text-file format is very simple: each line " +"is a record; fields are delimited by commas (CSV), tabs, 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 common way of creating CSV files is to export them from a " +"spreadsheet program." +msgstr "" +"Der erste Schritt zur Ausführung einer Dokumentmischung ist die Vorbereitung " +"eines Quelldokuments, welches die Daten zum Mischen enthält. Diese Daten " +"können aus E-Mail-Adressen oder anderen Daten bestehen, aus denen Sie die " +"einzelnen Etiketten oder Karten erstellen wollen. Gegenwärtig können als " +"Datenquellen entweder Textdateien oder die Daten des Evolution-Adressbuchs " +"verwendet werden, andere sind bereits in Planung. Das derzeit unterstützte " +"Textformat ist recht einfach: Jede Zeile stellt einen Datensatz dar, wobei " +"die einzelnen Felder durch Kommata (CSV), Tabulatoren oder Semikola getrennt " +"werden. Neue Zeilen werden durch einen Zeilenumbruch »\\n« erzeugt. Diese " +"Datei kann mit einem Texteditor, einem anderen Programm oder einem Skript " +"erstellt werden. Ein üblicher Weg der Erstellung ist der Export einer CSV-" +"Datei aus einer Tabellenkalkulation." + +#: ../C/glabels.xml:1005(para) +msgid "" +"A label must then be configured to \"point at\" this data file. To configure " +"the merge properties of a document, choose ObjectsMerge Properties menu item to " +"display the merge properties dialog. This dialog is used " +"to select the exact data file format and file name (location) of the merge " +"data." +msgstr "" +"Ein Etikett muss erstellt werden, das auf diese Datenquelle »zeigt«. Um die " +"Mischeigenschaften für ein Dokument festzulegen, wählen Sie " +"ObjekteMischeinstellungen. Der Dialog Mischeinstellungen " +"wird geöffnet. In diesem Dialog wählen Sie das genaue Dateiformat und den " +"Dateinamen (den Ort) der einzumischenden Daten aus." + +#: ../C/glabels.xml:1013(para) +msgid "" +"Finally, once the label has been configured for a data file, field keys can " +"be inserted into text objects and used as source or data for barcode objects " +"and image filenames for image objects. See for more information on using merge data for these object " +"types." +msgstr "" +"Zum Schluss, sobald das Etikett für die Datenquelle eingerichtet wurde, " +"können die Feldschlüssel in Textobjekte eingefügt werden, um sie als " +"Datenquelle für Strichcodeobjekte oder Bilder für Bildobjekte zu verwenden. " +"Weitere Informationen über die Verwendung der Mischdaten für diese " +"Objekttypen finden Sie in ." + +#: ../C/glabels.xml:1019(para) +msgid "" +"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, barcode, and image objects." +msgstr "" +"Da Ihr Etikett nun konfiguriert ist, druckt gLabels genau ein Etikett für jeden Datensatz des Quelldokuments, wobei " +"alle Text-, Bild- und Strichcode-Objekte durch die Einträge der Felder jedes " +"Datensatzes ersetzt werden." + +#: ../C/glabels.xml:1024(para) +msgid "" +"See for a detailed tutorial on the " +"document merge feature." +msgstr "" +"In finden Sie eine ausführliche " +"Anleitung für dieses Funktionsmerkmal." + +#: ../C/glabels.xml:1039(title) +msgid "Settings" +msgstr "Einstellungen" + +#: ../C/glabels.xml:1040(para) +msgid "" +"To configure gLabels, choose " +"SettingsPreferences. The Preferences dialog " +"contains the following tabbed sections:" +msgstr "" +"Um gLabels zu konfigurieren, wählen Sie " +"EinstellungenEinstellungen. Der Dialog Einstellungen " +"enthält die folgenden Reiter:" + +#: ../C/glabels.xml:1061(title) +msgid "Locale" +msgstr "Lokale Einstellungen" + +#: ../C/glabels.xml:1065(guilabel) +msgid "Units" +msgstr "Einheiten" + +#: ../C/glabels.xml:1067(para) +msgid "" +"Use this radio button group to specify your prefered units. Select one of the " +"following options:" +msgstr "" +"Verwenden Sie diese Radioknöpfe, um Ihre bevorzugten Maßeinheiten " +"festzulegen. Wählen Sie aus den folgenden Optionen:" + +#: ../C/glabels.xml:1072(guilabel) +msgid "Points" +msgstr "Punkte" + +#: ../C/glabels.xml:1073(para) +msgid "Use points (1 point = 1/72 in = 0.352778 mm)." +msgstr "Punkte verwenden (1 Punkt = 1/72 Zoll = 0.352778 mm)." + +#: ../C/glabels.xml:1077(guilabel) +msgid "Inches" +msgstr "Zoll" + +#: ../C/glabels.xml:1078(para) +msgid "Use inches." +msgstr "Zoll verwenden." + +#: ../C/glabels.xml:1082(guilabel) +msgid "Millimeters" +msgstr "Millimeter" + +#: ../C/glabels.xml:1083(para) +msgid "Use millimeters." +msgstr "Millimeter verwenden." + +#: ../C/glabels.xml:1086(para) +msgid "Default: Inches." +msgstr "Standard: Zoll." + +#: ../C/glabels.xml:1092(guilabel) +msgid "Default page size" +msgstr "Vorgegebene Seitengröße" + +#: ../C/glabels.xml:1094(para) +msgid "" +"Use this radio button group to specify your prefered page size. This will " +"make it quicker for you to locate media types when creating a new label or " +"card." +msgstr "" +"Verwenden Sie diese Radioknöpfe zur Auswahl Ihrer bevorzugten Papiergröße. " +"Dadurch lassen sich beim Erstellen neuer Etiketten oder Visitenkarten die " +"entsprechenden Papiertypen schneller finden." + +#: ../C/glabels.xml:1100(guilabel) +msgid "US Letter" +msgstr "US-Letter" + +#: ../C/glabels.xml:1101(para) +msgid "Most of your media will be of the US Letter page size (8.5 x 11 inches)." +msgstr "Die meisten Ihrer Medien haben das US-Letter-Format (8.5 x 11 inches)." + +#: ../C/glabels.xml:1105(guilabel) +msgid "ISO A4" +msgstr "ISO A4" + +#: ../C/glabels.xml:1106(para) +msgid "Most of your media will be of the ISO A4 page size (210 x 297 mm)." +msgstr "Die meisten Ihrer Medien haben das ISO-A4-Format (210 x 297 mm)." + +#: ../C/glabels.xml:1109(para) +msgid "Default: US Letter." +msgstr "Standard: US-Letter." + +#: ../C/glabels.xml:1118(title) +msgid "Object defaults" +msgstr "Objekt-Voreinstellungen" + +#: ../C/glabels.xml:1124(para) +msgid "" +"Use these controls to set the default properties of new text objects. These " +"properties are" +msgstr "" +"Verwenden Sie diese Einstellmöglichkeiten, um die Standardeigenschaften neuer " +"Textobjekte festzulegen. Diese Eigenschaften sind" + +#: ../C/glabels.xml:1129(guilabel) +msgid "Font" +msgstr "Schrift" + +#: ../C/glabels.xml:1130(para) +msgid "" +"These controls are used to select font family and font size, and whether the " +"font should bold or in italics." +msgstr "" +"Verwenden Sie diese Einstellmöglichkeiten, um die Schriftfamilie und -größe " +"festzulegen, sowie um anzugeben, ob die Schrift fett oder kursiv dargestellt " +"werden soll." + +#: ../C/glabels.xml:1135(guilabel) ../C/glabels.xml:1160(guilabel) +#: ../C/glabels.xml:1175(guilabel) +msgid "Color" +msgstr "Farbe" + +#: ../C/glabels.xml:1136(para) +msgid "This control selects the default text color." +msgstr "Diese Einstellung wählt die Standard-Textfarbe aus." + +#: ../C/glabels.xml:1140(guilabel) +msgid "Alignment" +msgstr "Ausrichtung" + +#: ../C/glabels.xml:1141(para) +msgid "" +"These controls are used to select the default text alignment (left, center or " +"right)." +msgstr "" +"Mit diesen Einstellungen wählen Sie die vorgegebene Textausrichtung (links, " +"mittig oder rechts)." + +#: ../C/glabels.xml:1150(para) +msgid "" +"Use these controls to set the default properties of lines and outlines of new " +"objects. These properties are" +msgstr "" +"Verwenden sie diese Einstellmöglichkeiten, um die Standardeigenschaften von " +"Begrenzungen und neuen Objekten festzulegen. Diese Eigenschaften sind" + +#: ../C/glabels.xml:1155(guilabel) +msgid "Width" +msgstr "Breite" + +#: ../C/glabels.xml:1156(para) +msgid "This control selects the default line width." +msgstr "Diese Einstellung wählt die Standard-Linienbreite aus." + +#: ../C/glabels.xml:1161(para) +msgid "This control selects the default line color." +msgstr "Diese Einstellung wählt die Standard-Linienfarbe aus." + +#: ../C/glabels.xml:1168(guilabel) +msgid "Fill" +msgstr "Füllen" + +#: ../C/glabels.xml:1170(para) +msgid "" +"Use these controls to set the default fill properties of new objects. These " +"properties are" +msgstr "" +"Verwenden Sie diese Einstellmöglichkeiten zum Angeben der " +"Füllungseigenschaften eines neuen Objekts. Diese Eigenschaften sind" + +#: ../C/glabels.xml:1176(para) +msgid "This control selects the default fill color." +msgstr "Diese Einstellung wählt die Standard-Füllfarbe aus." + +#: ../C/glabels.xml:1190(title) +msgid "Document Merge Tutorial" +msgstr "Anleitung zur Dokumentmischung" + +#: ../C/glabels.xml:1192(para) +msgid "" +"Document Merge (sometimes called \"Mail Merge\") is a powerful feature that " +"allows a unique label or card to be printed for each record in an external " +"data source. It is however, the most mis-understood feature of " +"glabels. The following examples will step through " +"a couple of common tasks using the document merge feature." +msgstr "" +"Dokumentmischung ist ein mächtiges Funktionsmerkmal, das es Ihnen ermöglicht, " +"ein einzelnes Etikett oder eine einzelne Karte für jeden Datensatz aus einer " +"externen Datenquelle zu erstellen. Es ist allerdings die am häufigsten " +"missverstandene Funktion in glabels. Die folgenden " +"Beispiele führen Sie schrittweise durch viele der Aufgaben, die Sie mit der " +"Dokumentmischung ausführen können." + +#: ../C/glabels.xml:1200(title) +msgid "Example 1: Name Tags" +msgstr "Beispiel 1: Namensschilder" + +#: ../C/glabels.xml:1202(para) +msgid "" +"In this example we are organizing an orientation party for the new crew " +"members of our ship. We have a list of freshman crew members that we created " +"in gnumeric and exported as the following CSV " +"file. We could have created this file by using a text editor, but heck it is " +"the 23rd century." +msgstr "" +"In diesem Beispiel organisieren Sie eine Orientierungsparty für die neuen " +"Mannschaftsmitglieder Ihres Schiffes. Eine Liste der neuen Mitglieder haben " +"Sie in gnumeric erstellt und in die folgende CSV-" +"Datei exportiert. Sie könnten diese Datei auch in einem Texteditor erstellen, " +"aber schließlich leben wir im 23. Jahrhundert..." + +#: ../C/glabels.xml:1208(programlisting) +#, no-wrap +msgid "" +"\n" +"Name,Department,SN\n" +"\"Jim Kirk\",Management,\"SC937-0176 CEC\"\n" +"\"Mr. Spock\",Sciences,S179-276SP\n" +"\"Leonard McCoy\",Medicine,unknown\n" +"\"Montgomery Scott\",Engineering,SE-197-54T\n" +" " +msgstr "" +"\n" +"Name,Department,SN\n" +"\"Jim Kirk\",Management,\"SC937-0176 CEC\"\n" +"\"Mr. Spock\",Sciences,S179-276SP\n" +"\"Leonard McCoy\",Medicine,unknown\n" +"\"Montgomery Scott\",Engineering,SE-197-54T\n" +" " + +#: ../C/glabels.xml:1216(para) +msgid "" +"In glabels we have created a new glabels document " +"using the Avery 5395 \"Name Badge Labels\" template. Next we use the " +"ObjectsMerge Properties menu item to display the merge " +"properties dialog. We use this dialog to select the source type " +"(in our case CSV) and the merge source (filename) as shown." +msgstr "" +"In glabels haben Sie ein neues Dokument unter " +"Verwendung der Dokumentvorlage »Avery 5395 Namensschild-Etiketten« erzeugt. " +"Zunächst öffnen Sie mittels ObjekteMischeinstellungen den Dialog " +"Mischeinstellungen. In diesem Dialog wählen Sie wie " +"gezeigt die Datenquelle aus, in diesem Fall CSV, sowie die Mischquelle " +"(Dateiname)." + +#: ../C/glabels.xml:1226(title) ../C/glabels.xml:1343(title) +msgid "Merge properties dialog" +msgstr "Mischeinstellungen-Dialog" + +#. ==== End of Figure ==== +#: ../C/glabels.xml:1237(para) +msgid "" +"Before applying the merge source, we uncheck the first record since it is " +"only column headers from our original gnumeric " +"spreadsheet and would simply waste our first label. We could also unselect " +"any other records that we didn't want to print a label for." +msgstr "" +"Bevor Sie eine neue Einmischquelle anwenden, sollten Sie den ersten Datensatz " +"deaktivieren, weil dieser nur Spaltenköpfe aus der originalen " +"gnumeric-Tabelle enthält. Dadurch würde nur das " +"erste Etikett verschwendet. Weiterhin können Sie alle anderen Datensätze " +"entfernen, die Sie nicht für ein Etikett verwenden wollen." + +#: ../C/glabels.xml:1242(para) ../C/glabels.xml:1360(para) +msgid "" +"We can also view each record in more detail by clicking on the appropriate " +"expander (the little triangles) as shown. Once we are satisfied with the " +"selections in this dialog we click OK to accept the " +"changes." +msgstr "" +"Sie können jeden Datensatz detailliert betrachten, indem Sie auf die kleinen " +"Dreiecke klicken. Sobald Sie mit der Auswahl zufrieden sind, klicken Sie auf " +"OK, um die Änderungen anzuwenden." + +#: ../C/glabels.xml:1247(para) ../C/glabels.xml:1365(para) +msgid "Now we start adding objects to our glabels document as shown." +msgstr "" +"Nun beginnen wir mit dem Hinzufügen von Objekten zu unserem gLabels-Dokument, " +"wie gezeigt." + +#: ../C/glabels.xml:1251(title) ../C/glabels.xml:1369(title) +msgid "Adding objects" +msgstr "Hinzufügen von Objekten" + +#. ==== End of Figure ==== +#: ../C/glabels.xml:1262(para) +msgid "" +"In this example we have added three text objects and a barcode object. The " +"first text object contains only simple literal text (\"Hello, my name is\"). " +"The second text object contains a single merge field (\"${1}\") corresponding " +"to the first field of a record (first column of a line) which contains the " +"new crew member's full name. The third text field contains both literal text " +"(\"Department: \") followed by a single merge field (\"${2}\") corresponding " +"to the second field or the crew member's department. The barcode object is " +"configured to use field (or key) \"3\" which contains our crew member's " +"starfleet serial number." +msgstr "" +"In diesem Beispiel haben Sie drei Textobjekte und ein Strichcodeobjekt " +"hinzugefügt. Das erste Textobjekt enthält nur einfachen Text (»Hello, my name " +"is«). Das zweite Textobjekt enthält ein einfaches Mischfeld (»${1}«), welches " +"zum ersten Feld eines Datensatzes (erste Spalte einer Zeile) korrespondiert, " +"die den vollen Namen eines Mannschaftsmitglieds enthält. Das dritte Feld " +"enthält sowohl einfachen Text (»Department:«) als auch ein einzelnes Mischfeld " +"(»${2}«), welches zum zweiten Feld oder zum Arbeitsgebiet eines " +"Mannschaftsmitglieds korrespondiert. Das Strichcodefeld ist so eingestellt, " +"das Feld (oder den Schlüssel) »3« zu verwenden, das die Sternenflotten-" +"Seriennummer des Mannschaftsmitglieds enthält." + +#: ../C/glabels.xml:1272(para) +msgid "" +"Now we can print our name tags by selecting the FilePrint menu item. This will " +"display print dialog as shown below." +msgstr "" +"Nun können Sie Ihre Namensschilder drucken, indem Sie " +"DateiDrucken wählen. Der unten angezeigte Druckdialog wird geöffnet." + +#: ../C/glabels.xml:1279(title) +msgid "Printing name tags" +msgstr "Drucken der Namensschilder" + +#. ==== End of Figure ==== +#: ../C/glabels.xml:1290(para) ../C/glabels.xml:1405(para) +msgid "" +"Just to make sure our labels are going to look okay, we select the " +"Print outlines option and click Print " +"Preview. This will display a print preview dialog as shown below." +msgstr "" +"Um sicher zu stellen, dass Ihre Etiketten gut aussehen, wählen Sie die Option " +"Begrenzungen drucken und klicken auf " +"Druckvorschau. Der Druckvorschaudialog wird geöffnet, " +"wie unten angezeigt." + +#: ../C/glabels.xml:1297(title) +msgid "Name tags preview" +msgstr "Vorschau der Namensschilder" + +#. ==== End of Figure ==== +#: ../C/glabels.xml:1308(para) +msgid "" +"Everything looks good, so we can now load up our printer with the appropriate " +"label stock, print our name tags and start beaming our guests aboard." +msgstr "" +"Alles sieht gut aus, also können wir jetzt den Drucker mit den entsprechenden " +"Etiketten bestücken, die Namensschilder drucken und die Gäste an Bord beamen." + +#: ../C/glabels.xml:1315(title) +msgid "Example 2: Address Labels" +msgstr "Beispiel 2: Adressetiketten" + +#: ../C/glabels.xml:1317(para) +msgid "" +"In this example we are going to throw a party and need to print mailing " +"address labels for our invitations. We have a list of our closest friends " +"that we created in gnumeric and exported as the " +"following CSV file. It should be noted that not everyone has a middle initial " +"or a two line address." +msgstr "" +"In diesem Beispiel planen Sie eine Party. Dafür benötigen Sie Adressetiketten " +"für die Einladungen. Sie haben eine Liste Ihrer besten Freunde in " +"gnumeric erstellt, die Sie in die folgende CSV-" +"Datei exportiert haben. Es ist zu beachten, dass nicht jeder einen zweiten " +"Vornamen oder eine zweizeilige Adresse hat." + +#: ../C/glabels.xml:1323(programlisting) +#, no-wrap +msgid "" +"\n" +"LAST,FIRST,MI,ADDR1,ADDR2,CITY,STATE,ZIP\n" +",,,,,,,\n" +"Critter,Ess,S,\"123 Faux St.\",,Alexandria,VA,22310\n" +"Doe,John,,\"Apt 1X\",\"451 Mystery St.\",Trenton,NJ,08601\n" +"Summers,Joyce,,\"1630 Revello Dr\",,Sunnydale,CA,95037\n" +"McGarret,Steve,O,\"404 Piikoi Street\",,Honolulu,HI,96813\n" +"Kramer,Cosmo,,\"Apt 5B\",\"129 W. 81 St.\",\"New York\",NY,10024-7207\n" +" " +msgstr "" +"\n" +"LAST,FIRST,MI,ADDR1,ADDR2,CITY,STATE,ZIP\n" +",,,,,,,\n" +"Critter,Ess,S,\"123 Faux St.\",,Alexandria,VA,22310\n" +"Doe,John,,\"Apt 1X\",\"451 Mystery St.\",Trenton,NJ,08601\n" +"Summers,Joyce,,\"1630 Revello Dr\",,Sunnydale,CA,95037\n" +"McGarret,Steve,O,\"404 Piikoi Street\",,Honolulu,HI,96813\n" +"Kramer,Cosmo,,\"Apt 5B\",\"129 W. 81 St.\",\"New York\",NY,10024-7207\n" +" " + +#: ../C/glabels.xml:1333(para) +msgid "" +"In glabels we have created a new glabels document " +"using the Avery 5512 \"Address Labels\" template. Next we use the " +"ObjectsMerge Properties menu item to display the merge " +"properties dialog. We use this dialog to select the source type " +"(in our case CSV) and the merge source (filename) as shown." +msgstr "" +"In glabels haben Sie ein neues Dokument unter " +"Verwendung der Dokumentvorlage »Avery 5512 Adressetiketten« erzeugt. Zunächst " +"öffnen Sie mittels ObjekteMischeinstellungen den Dialog " +"Mischeinstellungen. In diesem Dialog wählen Sie wie " +"gezeigt die Datenquelle aus, in diesem Fall CSV, sowie die Mischquelle " +"(Dateiname)." + +#. ==== End of Figure ==== +#: ../C/glabels.xml:1354(para) +msgid "" +"Before applying the merge source, we uncheck the first record since it is " +"only column headers from our original gnumeric " +"spreadsheet and would simply waste our first label. We also unselect the " +"second record which is empty (an artifact of our original spreadsheet). We " +"could also unselect any other records that we didn't want to print a label " +"for." +msgstr "" +"Bevor Sie eine neue Einmischquelle anwenden, sollten Sie den ersten Datensatz " +"deaktivieren, weil dieser nur Spaltenköpfe aus der originalen " +"gnumeric-Tabelle enthält. Dadurch würde nur das " +"erste Etikett verschwendet. Weiterhin können Sie alle anderen Datensätze " +"entfernen, die Sie nicht für ein Etikett verwenden wollen." + +#. ==== End of Figure ==== +#: ../C/glabels.xml:1380(para) +msgid "" +"In this example we have a single text object. This text object contains all " +"of our merge fields organized on multiple lines as a mailing address. Notice " +"that fields ${4} and ${5} (corresponding to ADDR1 and ADDR2) are each located " +"with no other text on their own lines. When glabels encounters a field as the only text on a line, it will not " +"expand the line if the field is empty." +msgstr "" +"In diesem Beispiel haben Sie ein einzelnes Textobjekt. Dieses Textobjekt " +"enthält alle Einmischfelder, angeordnet in mehreren Zeilen wie eine " +"Versandadresse. Beachten Sie, dass die Felder ${4} und ${5} (korrespondierend " +"zu ADDR1 und ADDR2) jeweils keinen weiteren Text in deren Zeilen enthalten. " +"Wenn glabels ein solches Feld als »nur Text« in " +"einer Zeile erkennt, wird die Zeile nicht expandiert, falls das Feld leer ist." + +#: ../C/glabels.xml:1387(para) +msgid "" +"Now we can print our address labels by selecting the " +"FilePrint menu item. This will display print dialog as shown below." +msgstr "" +"Nun können Sie Ihre Adressetiketten drucken, indem Sie " +"DateiDrucken wählen. Der unten angezeigte Druckdialog wird geöffnet." + +#: ../C/glabels.xml:1394(title) +msgid "Printing address labels" +msgstr "Adressetiketten drucken" + +#: ../C/glabels.xml:1412(title) +msgid "Address labels preview" +msgstr "Adressetiketten-Vorschau" + +#. ==== End of Figure ==== +#: ../C/glabels.xml:1423(para) +msgid "" +"Everything looks good, so we can now load up our printer with the appropriate " +"label stock, print our address labels and start mailing our party invitations." +msgstr "" +"Alles sieht gut aus, also können wir jetzt den Drucker mit den entsprechenden " +"Etiketten bestücken, die Adressetiketten drucken und die Einladungen zur " +"Party versenden." + +#: ../C/glabels.xml:1436(title) +msgid "Manually Creating New Templates" +msgstr "Manuelles Erstellen neuer Vorlagen" + +#: ../C/glabels.xml:1438(para) +msgid "" +"Predefined templates are defined by XML files located in ${prefix}/" +"share/glabels/, where ${prefix} is usually " +"something like /usr/local or /usr " +"depending on the configuration option prefix. gLabels " +"will use all files of the form *-templates.xml or " +"*.template, that it finds in ${prefix}/share/" +"glabels/ and ${HOME}/.glabels/. Additional " +"templates can be added by creating additional *.template " +"files in either of these directories." +msgstr "" +"Vordefinierte Vorlagen sind als XML-Dateien verfügbar, die in " +"${prefix}/share/glabels/ gespeichert sind, wobei " +"${prefix} üblicherweise /usr/local oder " +"/usr ist, abhängig von der Konfigurationsoption " +"prefix. gLabels verwendet " +"alle Dateien der Form *-templates.xml oder *." +"template, die es in ${prefix}/share/glabels/ " +"und ${HOME}/.glabels/ findet. Zusätzliche Vorlagen " +"können unter Verwendung der Dateiendung *.template in " +"einem dieser Ordner gespeichert werden." + +#: ../C/glabels.xml:1451(para) +msgid "" +"The format for these files is defined in the DTD: glabels-2.2.dtd. (This DTD also describes other XML formats used by glabels.)" +msgstr "" +"Das Format dieser Dateien ist in einer DTD definiert: glabels-2.2." +"dtd. Diese DTD beschreibt außerdem weitere von gLabels benutzte XML-" +"Formate." + +#: ../C/glabels.xml:1457(title) +msgid "Assumptions/caveats" +msgstr "Voraussetzungen" + +#: ../C/glabels.xml:1460(para) +msgid "" +"A sheet contains only one size of label or card (if a sheet contains more " +"than one size of item, it can be split into multiple templates for multiple " +"pass printing)" +msgstr "" +"Eine Seite enthält nur eine Etiketten- oder Kartengröße. Falls eine Seite " +"mehrere Größen enthält, kann sie für das Drucken in mehreren Durchläufen über " +"mehrere Vorlagen verteilt werden." + +#: ../C/glabels.xml:1465(para) +msgid "" +"Distances can be expressed in units of pt, in, mm, cm, or pc. For example: \"1.0in\" or \"2.54cm\". If no units are specified, computer points (pt) will be assumed (1 pt = 1/72 in = 0.352778 mm)." +msgstr "" +"Abstände können in den Einheiten pt, in, mm, cm oder " +"pc ausgedrückt werden. Beispiel: »1.0in« oder »2.54cm«. Falls keine Einheiten angegeben " +"werden, nimmt der Rechner Punkt an. ein Punkt (pt) " +"entspricht = 1/72 in = 0.352778 mm." + +#: ../C/glabels.xml:1478(title) +msgid "Template Files" +msgstr "Vorlagedateien" + +#: ../C/glabels.xml:1480(programlisting) +#, no-wrap +msgid "" +"\n" +"<?xml version=\"1.0\"?>\n" +"<Glabels-templates>\n" +"\n" +" ...templates...\n" +"\n" +"</Glabels-templates>\n" +" " +msgstr "" +"\n" +"<?xml version=\"1.0\"?>\n" +"<Glabels-templates>\n" +"\n" +" ...Vorlagen...\n" +"\n" +"</Glabels-templates>\n" +" " + +#: ../C/glabels.xml:1492(title) +msgid "Example Template" +msgstr "Beispielvorlage" + +#: ../C/glabels.xml:1493(programlisting) +#, no-wrap +msgid "" +"\n" +" <Template brand=\"Avery\" part=\"8160\" size=\"US-Letter\" description=\"Mailing Labels\">\n" +" <Label-rectangle id=\"0\" width=\"189pt\" height=\"72pt\" round=\"5pt\">\n" +" <Markup-margin size=\"5pt\"/>\n" +" <Layout nx=\"3\" ny=\"10\" x0=\"11.25pt\" y0=\"36pt\" dx=\"200pt\" dy=\"72pt\"/>\n" +" </Label-rectangle>\n" +" <Alias brand=\"Avery\" part=\"5160\"/>\n" +" <Alias brand=\"Avery\" part=\"6233\"/>\n" +" </Template>\n" +" " +msgstr "" +"\n" +" <Template brand=\"Avery\" part=\"8160\" size=\"US-Letter\" description=\"Mailing Labels\">\n" +" <Label-rectangle id=\"0\" width=\"189pt\" height=\"72pt\" round=\"5pt\">\n" +" <Markup-margin size=\"5pt\"/>\n" +" <Layout nx=\"3\" ny=\"10\" x0=\"11.25pt\" y0=\"36pt\" dx=\"200pt\" dy=\"72pt\"/>\n" +" </Label-rectangle>\n" +" <Alias brand=\"Avery\" part=\"5160\"/>\n" +" <Alias brand=\"Avery\" part=\"6233\"/>\n" +" </Template>\n" +" " + +#: ../C/glabels.xml:1506(title) +msgid "Template Node" +msgstr "Knoten »Template«" + +#: ../C/glabels.xml:1508(para) +msgid "" +"A Template node describes a single stationary product. " +"It must contain one instance of any type of Label node (Label-" +"rectangle, Label-round, or Label-" +"cd). This node can be followed by zero or more Alias nodes." +msgstr "" +"Ein Template-Knoten beschreibt ein einzelnes Produkt. Es " +"muss eine Instanz eines der anderen Label-Knoten (Label-rectangle, Label-round, or Label-cd) enthalten. Auf diesen Knoten können einer, mehrere oder kein " +"Alias-Knoten folgen." + +#: ../C/glabels.xml:1522(para) ../C/glabels.xml:1597(para) +#: ../C/glabels.xml:1674(para) ../C/glabels.xml:1719(para) +#: ../C/glabels.xml:1795(para) ../C/glabels.xml:1828(para) +#: ../C/glabels.xml:1879(para) ../C/glabels.xml:1922(para) +#: ../C/glabels.xml:1981(para) ../C/glabels.xml:2058(para) +msgid "Property" +msgstr "Eigenschaft" + +#: ../C/glabels.xml:1525(para) ../C/glabels.xml:1600(para) +#: ../C/glabels.xml:1677(para) ../C/glabels.xml:1722(para) +#: ../C/glabels.xml:1798(para) ../C/glabels.xml:1831(para) +#: ../C/glabels.xml:1882(para) ../C/glabels.xml:1925(para) +#: ../C/glabels.xml:1984(para) ../C/glabels.xml:2061(para) +msgid "Description" +msgstr "Beschreibung" + +#: ../C/glabels.xml:1531(para) ../C/glabels.xml:2067(para) +msgid "brand" +msgstr "brand" + +#: ../C/glabels.xml:1533(para) +msgid "Brand or manufacturer of stationary product. E.g. \"Avery\"" +msgstr "Marke oder Hersteller des Produkts, z.B. »Avery«" + +#: ../C/glabels.xml:1538(para) ../C/glabels.xml:2073(para) +msgid "part" +msgstr "part" + +#: ../C/glabels.xml:1540(para) +msgid "Part number or name of stationary product. E.g. \"8160\"" +msgstr "Bestellnummer oder Name des Produkts, z.B. »8160«" + +#: ../C/glabels.xml:1545(para) ../C/glabels.xml:1804(para) +msgid "size" +msgstr "size" + +#: ../C/glabels.xml:1547(para) +msgid "Size of sheet. E.g., \"US-Letter,\" \"A4\", ..." +msgstr "Größe des Papiers, z.B. »US-Letter«, »A4«, …" + +#: ../C/glabels.xml:1551(para) +msgid "description" +msgstr "description" + +#: ../C/glabels.xml:1553(para) +msgid "Description of stationary product. E.g, \"Mailing Labels.\"" +msgstr "Beschreibung des Produkts, z.B. »Mailing Labels«." + +#: ../C/glabels.xml:1558(para) +msgid "_description" +msgstr "_description" + +#: ../C/glabels.xml:1560(para) +msgid "" +"Translatable description of stationary product. E.g, \"Mailing Labels." +"\" (Only useful for predefined templates)" +msgstr "" +"Übersetzbare Beschreibung des Produkts, z.B. »Mailing Labels« (nur sinnvoll " +"für vordefinierte Vorlagen)" + +#: ../C/glabels.xml:1566(para) ../C/glabels.xml:1612(para) +#: ../C/glabels.xml:1742(para) +msgid "width" +msgstr "width" + +#: ../C/glabels.xml:1568(para) +msgid "Page width. Only valid if size=\"Other\"" +msgstr "Seitenbreite. Nur gültig, wenn als Größe »Other« festgelegt ist." + +#: ../C/glabels.xml:1572(para) ../C/glabels.xml:1616(para) +#: ../C/glabels.xml:1749(para) +msgid "height" +msgstr "height" + +#: ../C/glabels.xml:1574(para) +msgid "Page height. Only valid if size=\"Other\"" +msgstr "Seitenhöhe. Nur gültig, wenn als Größe »Other« festgelegt ist." + +#: ../C/glabels.xml:1584(title) +msgid "Label-rectangle Node" +msgstr "Knoten »Label-rectangle«" + +#: ../C/glabels.xml:1586(para) +msgid "" +"A Label-rectangle node describes the dimensions of a " +"single label or business card that is rectangular in shape (may have rounded " +"edges)." +msgstr "" +"Ein Label-rectangle-Knoten beschreibt die Abmessungen " +"eines einzelnen Etiketts oder einer einzelnen Karte in rechteckiger Form, " +"wobei abgerundete Ecken möglich sind." + +#: ../C/glabels.xml:1606(para) ../C/glabels.xml:1683(para) +#: ../C/glabels.xml:1728(para) +msgid "id" +msgstr "id" + +#: ../C/glabels.xml:1608(para) ../C/glabels.xml:1685(para) +#: ../C/glabels.xml:1730(para) +msgid "Reserved for future use. Should always be 0." +msgstr "Für zukünftige Verwendung reserviert. Sollte immer 0 sein." + +#: ../C/glabels.xml:1613(para) +msgid "Width of label/card" +msgstr "Breite des Etiketts oder der Karte" + +#: ../C/glabels.xml:1617(para) +msgid "Height of label/card" +msgstr "Höhe des Etiketts oder der Karte" + +#: ../C/glabels.xml:1620(para) +msgid "round" +msgstr "round" + +#: ../C/glabels.xml:1622(para) +msgid "" +"Radius of corners. For items with square edges (business cards), the radius " +"should be 0." +msgstr "" +"Radius der Ecken. Für Objekte mit nicht abgerundeten Ecken (Visitenkarten) " +"sollte der Radius 0 sein." + +#: ../C/glabels.xml:1627(para) +msgid "x_waste" +msgstr "x_waste" + +#: ../C/glabels.xml:1629(para) +msgid "" +"Amount of horizontal waste (over-print) to allow. This is useful for " +"minimizing alignment problems when using non-white backgrounds (e.g. images)." +msgstr "" +"Erlaubte Breite des horizontalen Überdruckens. Dies minimiert " +"Ausrichtungsprobleme auf anderen als weißen Hintergründen (z.B. Bilder)." + +#: ../C/glabels.xml:1635(para) +msgid "y_waste" +msgstr "y_waste" + +#: ../C/glabels.xml:1637(para) +msgid "" +"Amount of vertical waste (over-print) to allow. This is useful for minimizing " +"alignment problems when using non-white backgrounds (e.g. images)." +msgstr "" +"Erlaubte Breite des vertikalen Überdruckens. Dies minimiert " +"Ausrichtungsprobleme auf anderen als weißen Hintergründen (z.B. Bilder)." + +#: ../C/glabels.xml:1648(title) +msgid "Label-rectangle Parameters" +msgstr "Parameter zu Label-rectangle " + +#: ../C/glabels.xml:1662(title) +msgid "Label-round Node" +msgstr "Knoten »Label-round«" + +#: ../C/glabels.xml:1664(para) +msgid "" +"A Label-round node describes the dimensions of a simple " +"round label (not a CD)." +msgstr "" +"Ein Label-round-Knoten beschreibt die Abmessungen eines " +"einfachen Rundetiketts (nicht einer CD)." + +#: ../C/glabels.xml:1689(para) ../C/glabels.xml:1734(para) +#: ../C/glabels.xml:1900(para) +msgid "radius" +msgstr "radius" + +#: ../C/glabels.xml:1690(para) +msgid "Radius (1/2 diameter) of label" +msgstr "Radius (halber Durchmesser) des Etiketts" + +#: ../C/glabels.xml:1693(para) ../C/glabels.xml:1756(para) +msgid "waste" +msgstr "waste" + +#: ../C/glabels.xml:1695(para) ../C/glabels.xml:1758(para) +msgid "" +"Amount of waste (over-print) to allow. This is useful for minimizing " +"alignment problems when using non-white backgrounds (e.g. images)." +msgstr "" +"Erlaubte Breite des Überdruckens. Dies minimiert Ausrichtungsprobleme auf " +"anderen als weißen Hintergründen (z.B. Bilder)." + +#: ../C/glabels.xml:1707(title) +msgid "Label-cd Node" +msgstr "Knoten »Label-cd«" + +#: ../C/glabels.xml:1709(para) +msgid "" +"A Label-cd node describes the dimensions of a CD, DVD, " +"or business card CD." +msgstr "" +"Ein Label-cd-Knoten beschreibt die Abmessungen einer CD, " +"DVD oder Visitenkarten-CD." + +#: ../C/glabels.xml:1735(para) +msgid "Outer radius of label" +msgstr "Äußerer Radius des Etiketts" + +#: ../C/glabels.xml:1738(para) +msgid "hole" +msgstr "hole" + +#: ../C/glabels.xml:1739(para) +msgid "Radius of concentric hole" +msgstr "Radius des Mittellochs" + +#: ../C/glabels.xml:1744(para) +msgid "" +"If present, the label is clipped to the given width. (Useful for \"business " +"card CDs\")." +msgstr "" +"Falls vorhanden, wird das Etikett auf die angegebene Größe begrenzt (nützlich " +"für »Visitenkarten-CDs«)" + +#: ../C/glabels.xml:1751(para) +msgid "" +"If present, the label is clipped to the given height. (Useful for \"business " +"card CDs\")." +msgstr "" +"Falls vorhanden, wird das Etikett auf die angegebene Höhe begrenzt (nützlich " +"für »Visitenkarten-CDs«)" + +#: ../C/glabels.xml:1769(title) +msgid "CD Label Parameters" +msgstr "CD-Label-Parameter" + +#: ../C/glabels.xml:1783(title) +msgid "Markup-margin Node" +msgstr "Knoten »Markup-margin«" + +#: ../C/glabels.xml:1785(para) +msgid "" +"A Markup-margin describes a margin along all edges of a " +"label." +msgstr "" +"Ein Markup-margin-Knoten beschreibt die Ränder entlang " +"der Seiten eines Etiketts." + +#: ../C/glabels.xml:1806(para) +msgid "" +"Size of the margin. I.e. the distance of the margin line from the edge of the " +"card/label." +msgstr "" +"Randbreite. Die Breite des Bereichs zwischen der Randlinie und dem Rand des " +"Etiketts/der Karte." + +#: ../C/glabels.xml:1817(title) +msgid "Markup-line Node" +msgstr "Knoten »Markup-line«" + +#: ../C/glabels.xml:1819(para) +msgid "A Markup-line describes a markup line." +msgstr "" +"Ein Markup-line-Knoten beschreibt eine Markierungslinie." + +#: ../C/glabels.xml:1837(para) ../C/glabels.xml:1931(para) +msgid "x1" +msgstr "x1" + +#: ../C/glabels.xml:1839(para) +msgid "x coordinate of 1st endpoint of the line segment." +msgstr "x-Koordinate des Anfangspunkts des Linienabschnitts." + +#: ../C/glabels.xml:1843(para) ../C/glabels.xml:1937(para) +msgid "y1" +msgstr "y1" + +#: ../C/glabels.xml:1845(para) +msgid "y coordinate of 1st endpoint of the line segment." +msgstr "y-Koordinate des Anfangspunkts des Linienabschnitts." + +#: ../C/glabels.xml:1849(para) +msgid "x2" +msgstr "x2" + +#: ../C/glabels.xml:1851(para) +msgid "x coordinate of 2nd endpoint of the line segment." +msgstr "x-Koordinate des Endpunkts des Linienabschnitts." + +#: ../C/glabels.xml:1855(para) +msgid "y2" +msgstr "y2" + +#: ../C/glabels.xml:1857(para) +msgid "y coordinate of 2nd endpoint of the line segment." +msgstr "y-Koordinate des Endpunkts des Linienabschnitts." + +#: ../C/glabels.xml:1867(title) +msgid "Markup-circle Node" +msgstr "Knoten »Markup-circle«" + +#: ../C/glabels.xml:1869(para) +msgid "A Markup-circle describes a markup circle." +msgstr "" +"Ein Markup-circle-Knoten beschreibt einen " +"Markierungskreis." + +#: ../C/glabels.xml:1888(para) ../C/glabels.xml:2004(para) +msgid "x0" +msgstr "x0" + +#: ../C/glabels.xml:1890(para) +msgid "x coordinate of circle origin (center)." +msgstr "x-Koordinate des Kreismittelpunkts." + +#: ../C/glabels.xml:1894(para) ../C/glabels.xml:2011(para) +msgid "y0" +msgstr "y0" + +#: ../C/glabels.xml:1896(para) +msgid "y coordinate of circle origin (center)." +msgstr "y-Koordinate des Kreismittelpunkts." + +#: ../C/glabels.xml:1901(para) +msgid "Radius of circle." +msgstr "Radius des Kreises." + +#: ../C/glabels.xml:1910(title) +msgid "Markup-rect Node" +msgstr "Knoten »Markup-rect«" + +#: ../C/glabels.xml:1912(para) +msgid "A Markup-rect describes a markup rectangle." +msgstr "" +"Ein Markup-rect-Knoten beschreibt ein " +"Markierungsrechteck." + +#: ../C/glabels.xml:1933(para) +msgid "x coordinate of upper left corner of rectangle." +msgstr "x-Koordinate der oberen linken Ecke des Rechtecks." + +#: ../C/glabels.xml:1939(para) +msgid "y coordinate of upper left corner of rectangle." +msgstr "y-Koordinate der oberen linken Ecke des Rechtecks." + +#: ../C/glabels.xml:1943(para) +msgid "w" +msgstr "w" + +#: ../C/glabels.xml:1945(para) +msgid "Width of rectangle." +msgstr "Breite des Rechtecks." + +#: ../C/glabels.xml:1949(para) +msgid "h" +msgstr "h" + +#: ../C/glabels.xml:1951(para) +msgid "Height of rectangle." +msgstr "Höhe des Rechtecks." + +#: ../C/glabels.xml:1955(para) +msgid "r" +msgstr "r" + +#: ../C/glabels.xml:1956(para) +msgid "Radius of rounded corners of rectangle." +msgstr "Radius der abgerundeten Ecken des Rechtecks." + +#: ../C/glabels.xml:1965(title) +msgid "Layout Node" +msgstr "Knoten »Layout«" + +#: ../C/glabels.xml:1967(para) +msgid "" +"A label node may contain multiple Layout children. If " +"labels are arranged in a simple grid pattern, only one layout is needed. " +"However, if labels are arranged in multiple grids, such as a running bond " +"pattern, multiple layout tags can be used. Note: a " +"single label can always be treated as a grid of one." +msgstr "" +"Ein Label-Knoten kann mehrere Layout-Unterknoten " +"enthalten. Wenn die Etiketten in einem einfachen rechteckigen Raster " +"angeordnet sind, dann wird nur ein Layout benötigt. Falls die Etiketten " +"jedoch in komplizierteren Rasteranordnungen vorliegen, können mehrere " +"Layout-Unterknoten verwendet werden. Beachten Sie, dass " +"ein einzelnes Etikett immer auch als ein Raster aus Etiketten betrachtet " +"werden kann." + +#: ../C/glabels.xml:1990(para) +msgid "nx" +msgstr "nx" + +#: ../C/glabels.xml:1992(para) +msgid "Number of labels/cards across in the grid (horizontal)" +msgstr "Anzahl der Etiketten/Karten im Raster in horizontaler Richtung" + +#: ../C/glabels.xml:1997(para) +msgid "ny" +msgstr "ny" + +#: ../C/glabels.xml:1999(para) +msgid "Number of labels/cards up and down in the grid (vertical)" +msgstr "Anzahl der Etiketten/Karten im Raster in vertikaler Richtung" + +#: ../C/glabels.xml:2006(para) +msgid "" +"Distance from left edge of sheet to the left edge of the left column of cards/" +"labels in the layout." +msgstr "" +"Abstand von linken Rand des Papiers zum linken Rand der linken Reihe der " +"Karten/Etiketten im Layout." + +#: ../C/glabels.xml:2013(para) +msgid "" +"Distance from the top edge of sheet to the top edge of the top row of labels/" +"cards in the layout." +msgstr "" +"Abstand von oberen Rand des Papiers zum oberen Rand der oberen Reihe der " +"Karten/Etiketten im Layout." + +#: ../C/glabels.xml:2018(para) +msgid "dx" +msgstr "dx" + +#: ../C/glabels.xml:2019(para) +msgid "Horizontal pitch of grid." +msgstr "Horizontaler Rasterabstand des Zeichengitters." + +#: ../C/glabels.xml:2022(para) +msgid "dy" +msgstr "dy" + +#: ../C/glabels.xml:2023(para) +msgid "Vertical pitch of grid." +msgstr "Vertikaler Rasterabstand des Zeichengitters." + +#: ../C/glabels.xml:2031(title) +msgid "Layout Parameters" +msgstr "Layout-Parameter" + +#: ../C/glabels.xml:2045(title) +msgid "Alias Node" +msgstr "Knoten »Alias«" + +#: ../C/glabels.xml:2047(para) +msgid "" +"An Alias node provides the name of a product with the " +"same size and layout characteristics as the parent template." +msgstr "" +"Ein Alias-Knoten beschreibt den Namen eines Produkts mit " +"der gleichen Größe und dem gleichen Layout einer anderen Vorlage." + +#: ../C/glabels.xml:2069(para) +msgid "The brand or manufacturer of the equivalent product." +msgstr "Die Marke oder der Hersteller des entsprechenden Produkts." + +#: ../C/glabels.xml:2075(para) +msgid "The part number or name of the equivalent product." +msgstr "Die Bestellnummer oder der Name des entsprechenden Produkts." + +#: ../C/glabels.xml:2111(title) +msgid "About gLabels" +msgstr "Info zu gLabels" + +#: ../C/glabels.xml:2112(para) +msgid "" +"gLabels was written by Jim Evins " +"(evins@snaught.com). To find more information about " +"gLabels, please visit the gLabels Web page." +msgstr "" +"gLabels wurde von Jim Evins (evins@snaught." +"com) geschrieben. Weitere Informationen zu gLabels finden Sie auf der gLabels-Webseite." + +#: ../C/glabels.xml:2117(para) +msgid "" +"To report a bug or make a suggestion regarding this application or this " +"manual, follow the directions at the gLabels Contact Page." +msgstr "" +"Um einen Fehler zu melden oder einen Vorschlag zu dieser Anwendung oder zu " +"diesem Handbuch zu machen, folgen Sie den Anweisungen auf der gLabels-" +"Kontaktseite." + +#: ../C/glabels.xml:2123(para) +msgid "" +"This program is distributed 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. A copy of this license can be " +"found at this link, or in the " +"file COPYING included with the source code of this program." +msgstr "" +"Dieses Programm ist freie Software. Sie können es unter den Bedingungen der " +"GNU General Public License, wie von der Free Software " +"Foundation veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß " +"Version 2 der Lizenz oder (nach Ihrer Option) jeder späteren Version. Eine " +"Kopie der GNU General Public License finden Sie unter " +"diesem Link, oder in der Datei " +"COPYING, die im Quellcode dieses Programms enthalten ist." + +#. Put one translator per line, in the form of NAME , YEAR1, YEAR2. +#: ../C/glabels.xml:0(None) +msgid "translator-credits" +msgstr "Mario Blättermann , 2008, 2009" diff --git a/help/de/figures/main-window-empty.png b/help/de/figures/main-window-empty.png new file mode 100644 index 00000000..b7ad788e Binary files /dev/null and b/help/de/figures/main-window-empty.png differ diff --git a/help/de/figures/merge-ex1-1.png b/help/de/figures/merge-ex1-1.png new file mode 100644 index 00000000..2e539fc2 Binary files /dev/null and b/help/de/figures/merge-ex1-1.png differ diff --git a/help/de/figures/merge-ex1-2.png b/help/de/figures/merge-ex1-2.png new file mode 100644 index 00000000..c60b3bec Binary files /dev/null and b/help/de/figures/merge-ex1-2.png differ diff --git a/help/de/figures/merge-ex1-3.png b/help/de/figures/merge-ex1-3.png new file mode 100644 index 00000000..01b345d5 Binary files /dev/null and b/help/de/figures/merge-ex1-3.png differ diff --git a/help/de/figures/merge-ex1-4.png b/help/de/figures/merge-ex1-4.png new file mode 100644 index 00000000..814c73d6 Binary files /dev/null and b/help/de/figures/merge-ex1-4.png differ diff --git a/help/de/figures/merge-ex2-1.png b/help/de/figures/merge-ex2-1.png new file mode 100644 index 00000000..8cb49995 Binary files /dev/null and b/help/de/figures/merge-ex2-1.png differ diff --git a/help/de/figures/merge-ex2-2.png b/help/de/figures/merge-ex2-2.png new file mode 100644 index 00000000..0fc1b06f Binary files /dev/null and b/help/de/figures/merge-ex2-2.png differ diff --git a/help/de/figures/merge-ex2-3.png b/help/de/figures/merge-ex2-3.png new file mode 100644 index 00000000..8ea450a2 Binary files /dev/null and b/help/de/figures/merge-ex2-3.png differ diff --git a/help/de/figures/merge-ex2-4.png b/help/de/figures/merge-ex2-4.png new file mode 100644 index 00000000..0bc3c6b0 Binary files /dev/null and b/help/de/figures/merge-ex2-4.png differ diff --git a/help/de/figures/object-editor-sidebar.png b/help/de/figures/object-editor-sidebar.png new file mode 100644 index 00000000..94ad2346 Binary files /dev/null and b/help/de/figures/object-editor-sidebar.png differ diff --git a/help/de/figures/print-copies.png b/help/de/figures/print-copies.png new file mode 100644 index 00000000..7e539441 Binary files /dev/null and b/help/de/figures/print-copies.png differ diff --git a/help/de/figures/print-merge.png b/help/de/figures/print-merge.png new file mode 100644 index 00000000..3a9efc3e Binary files /dev/null and b/help/de/figures/print-merge.png differ diff --git a/help/glabels.omf.in b/help/glabels.omf.in new file mode 100644 index 00000000..ccbdae2d --- /dev/null +++ b/help/glabels.omf.in @@ -0,0 +1,12 @@ + + + + + + manual + + + + + diff --git a/iec16022-0.2.1/BUGS b/iec16022-0.2.1/BUGS new file mode 100644 index 00000000..9de2b176 --- /dev/null +++ b/iec16022-0.2.1/BUGS @@ -0,0 +1,6 @@ +iec16022 -f i -c aaaaabbbbbccccc +Barcode too long for 32x8 +No barcode produced + +We should find a suit barcode and not error here. + diff --git a/iec16022-0.2.1/CHANGELOG b/iec16022-0.2.1/CHANGELOG new file mode 100644 index 00000000..7c02bce3 --- /dev/null +++ b/iec16022-0.2.1/CHANGELOG @@ -0,0 +1,26 @@ +0.2.1 + - Fix 'Barcode too long' bug. Thanks to Alessandro Zummo. + - Use Lindent to start cleaning up the code mess. + +2006-11-11 Stefan Schmidt + +0.2 + - Rewrite Makefile. + - Documentation update. + - Exclude double include of header files. + - Layout cahnges. Place return value in front of function name. + - 80 character per line. + - Print version number before usage. + - Tests + +2006-02-06 Stefan Schmidt + + +0.1 + - Initial release. + - INSTALL, README, TODO, CREDITS, Makefile, LICENSE and CHANGELOG files + added. + - Fix some include issues. + - Fix some signed/unsigned issues. + +2006-01-08 Stefan Schmidt diff --git a/iec16022-0.2.1/CREDITS b/iec16022-0.2.1/CREDITS new file mode 100644 index 00000000..37e2bcc8 --- /dev/null +++ b/iec16022-0.2.1/CREDITS @@ -0,0 +1,10 @@ +Adrian Kennard, Andrews & Arnold Ltd for the original source code. You can +find it at http://aa.gg/free/ + +Cliff Hones for the RS coding. + +Jan Luebbe for writing the manual page and maintaining +the debian package. + +Daniel Willman for maintaining the gentoo +ebuild. diff --git a/iec16022-0.2.1/INSTALL b/iec16022-0.2.1/INSTALL new file mode 100644 index 00000000..102a61e1 --- /dev/null +++ b/iec16022-0.2.1/INSTALL @@ -0,0 +1,8 @@ +To install this software you need the following libraries installed: +- libpopt +- zlib + +Installing iec16022 is really simple. Just do a 'make' and 'make install'. + +In standard configuration the binary will be installed in /usr/local/bin. You +can change the prefix and DESTDIR in the Makefile. diff --git a/iec16022-0.2.1/LICENSE b/iec16022-0.2.1/LICENSE new file mode 100644 index 00000000..3912109b --- /dev/null +++ b/iec16022-0.2.1/LICENSE @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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. + + + Copyright (C) + + 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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. + + , 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/iec16022-0.2.1/Makefile.am b/iec16022-0.2.1/Makefile.am new file mode 100644 index 00000000..566bdc09 --- /dev/null +++ b/iec16022-0.2.1/Makefile.am @@ -0,0 +1,35 @@ +INCLUDES = \ + -DLIB \ + $(GLABELS_CFLAGS) + + +IEC_FILES = \ + iec16022ecc200.c \ + reedsol.c + +noinst_LTLIBRARIES = libiec16022.la + +libiec16022_la_SOURCES = $(IEC_FILES) + +EXTRA_DIST = \ + BUGS \ + CHANGELOG \ + CREDITS \ + iec16022.1 \ + iec16022.c \ + iec16022ecc200.h \ + image.c \ + image.h \ + INSTALL \ + LICENSE \ + Makefile.dist \ + README \ + README.glabels \ + reedsol.h \ + TODO \ + test/testsuite-example.bin \ + test/testsuite-example.eps \ + test/testsuite-example.hex \ + test/testsuite-example.png \ + test/testsuite-example.text \ + test/testsuite.sh diff --git a/iec16022-0.2.1/Makefile.dist b/iec16022-0.2.1/Makefile.dist new file mode 100644 index 00000000..4929afdb --- /dev/null +++ b/iec16022-0.2.1/Makefile.dist @@ -0,0 +1,40 @@ +CC=/usr/bin/cc +INSTALL=/usr/bin/install +GZIP=/bin/gzip + +prefix=/usr/local +bindir=$(prefix)/bin +mandir=$(prefix)/share/man + +CFLAGS=-Wall + +.PHONY: test clean + +all: iec16022 manpage + +iec16022: iec16022ecc200.o image.o iec16022.c + $(CC) -c iec16022.c + $(CC) -o iec16022 $(CFLAGS) reedsol.o iec16022.o image.o iec16022ecc200.o -lz -lpopt + +manpage: iec16022.1 + $(GZIP) -f --best < iec16022.1 > iec16022.1.gz + +install: all + $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 + $(INSTALL) -m 755 iec16022 $(DESTDIR)$(bindir) + $(INSTALL) -m 644 iec16022.1.gz $(DESTDIR)$(mandir)/man1 + +test: iec16022 + cd test; ./testsuite.sh + +iec16022ecc200.o: iec16022ecc200.c iec16022ecc200.h reedsol.o + $(CC) -c iec16022ecc200.c + +image.o: image.c image.h + $(CC) -c image.c + +reedsol.o: reedsol.c reedsol.h + $(CC) -DLIB -c reedsol.c + +clean: + rm -f iec16022 iec16022.1.gz *.o diff --git a/iec16022-0.2.1/README b/iec16022-0.2.1/README new file mode 100644 index 00000000..072c0aef --- /dev/null +++ b/iec16022-0.2.1/README @@ -0,0 +1,13 @@ +With iec16022 you can produce 2d barcodes. Also known as Data Matrix. These +barcodes are defined in ISO/IEC 16022. + +The code was originally written by Andrews & Arnold Ltd. You can download this +code from http://aa.gg/free/. +The current maintainer of the code is Stefan Schmidt. + +Website: http://www.datenfreihafen.org/projects/iec16022.html +Maillinglist: https://sirius.lasnet.de/mailman/listinfo/iec16022 +SVN repository: https://svn.datenfreihafen.org/iec16022/ + + +Stefan Schmidt diff --git a/iec16022-0.2.1/README.glabels b/iec16022-0.2.1/README.glabels new file mode 100644 index 00000000..ad1dced7 --- /dev/null +++ b/iec16022-0.2.1/README.glabels @@ -0,0 +1,6 @@ +The following changes have been made to the stock iec16022 0.2.1 distribution +to facilitate compilation with glabels: + + Makefile renamed to Makefile.dist + added Makefile.am, which is configured from ../configure.in + diff --git a/iec16022-0.2.1/TODO b/iec16022-0.2.1/TODO new file mode 100644 index 00000000..6c0a97bc --- /dev/null +++ b/iec16022-0.2.1/TODO @@ -0,0 +1,9 @@ +- Fix compiler warnings. +- Test on 64bit, powerpc, arm, etc. Anyone? +- Test stamp feature. Anyone? +- Use autotools + +Some things to think about: +--------------------------- +- Use libpng? +- Merge iec16022 in barcode? diff --git a/iec16022-0.2.1/iec16022.1 b/iec16022-0.2.1/iec16022.1 new file mode 100644 index 00000000..681c3a7f --- /dev/null +++ b/iec16022-0.2.1/iec16022.1 @@ -0,0 +1,52 @@ +.TH iec16022 1 2006-01-14 "iec16022 0.1" +.SH NAME +iec16022 \- program to generate 2d barcodes +.SH SYNOPSIS +.B iec16022 +.RI [ options ] +.SH DESCRIPTION +This manual page documents briefly the +.B iec16022 +command. +.PP +.B iec16022 +generates 2d barcodes conforming to the ISO/IEC 16022 standard (which is +also known as Data Matrix and Semacode). +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +.TP +.B \-s, \-\-size WxH +Sets the size of the generated barcode. +.TP +.B \-c, \-\-barcode text +Specifies the text to be encoded. +.TP +.B \-\-ecc 000|050|080|100|140|200 +Sets the type of ecc to be used. +.TP +.B \-i, \-\-infile filename +Read input data from file. +.TP +.B \-o, \-\-outfile filenmae +Save output to file (instead of standard output). +.TP +.B \-f, \-\-format Text|EPS|Bin|Hex|Stamp|PNG +Set the output type. +.TP +.B \-?, \-\-help +Show summary of options. +.TP +.B \-\-usage +Show short overview of options. +.SH EXAMPLE +To produce a datamatrix barcode for foobar in PNG format you need the following +arguments: +.TP +.B iec16022 -f PNG -c foobar -o foobar.png +.SH AUTHOR +iec16022 was written by Adrian Kennard, Andrews & Arnold Ltd. +.PP +This manual page was written by Jan Luebbe , +for the Debian project (but may be used by others). diff --git a/iec16022-0.2.1/iec16022.c b/iec16022-0.2.1/iec16022.c new file mode 100644 index 00000000..6fb7c30a --- /dev/null +++ b/iec16022-0.2.1/iec16022.c @@ -0,0 +1,462 @@ +/** + * + * IEC16022 bar code generation + * Adrian Kennard, Andrews & Arnold Ltd + * with help from Cliff Hones on the RS coding + * + * (c) 2004 Adrian Kennard, Andrews & Arnold Ltd + * (c) 2006 Stefan Schmidt + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#define IEC16022_VERSION "0.2" + +#include +#include +#include +#include +#include +#include +#include +#include "image.h" +#include "iec16022ecc200.h" + + // simple checked response malloc +void *safemalloc(int n) +{ + void *p = malloc(n); + if (!p) { + fprintf(stderr, "Malloc(%d) failed\n", n); + exit(1); + } + return p; +} + +// hex dump - bottom left pixel first +void dumphex(unsigned char *grid, int W, int H, unsigned char p) +{ + int c = 0, y; + for (y = 0; y < H; y++) { + int v = 0, x, b = 128; + for (x = 0; x < W; x++) { + if (grid[y * W + x]) + v |= b; + b >>= 1; + if (!b) { + printf("%02X", v ^ p); + v = 0; + b = 128; + c++; + } + } + if (b != 128) { + printf("%02X", v ^ p); + c++; + } + printf(" "); + c++; + if (c >= 80) { + printf("\n"); + c = 0; + } + } + if (c) + printf("\n"); +} + +int main(int argc, const char *argv[]) +{ + char c; + int W = 0, H = 0; + int ecc = 0; + int barcodelen = 0; + char *encoding = 0; + char *outfile = 0; + char *infile = 0; + char *barcode = 0; + char *format = "Text"; + char *size = 0; + char *eccstr = 0; + int len = 0, maxlen = 0, ecclen = 0; + unsigned char *grid = 0; + poptContext optCon; // context for parsing command-line options + const struct poptOption optionsTable[] = { + { + "size", 's', POPT_ARG_STRING, &size, 0, "Size", "WxH"}, + { + "barcode", 'c', POPT_ARG_STRING, &barcode, 0, "Barcode", + "text"}, + { + "ecc", 0, POPT_ARG_STRING, &eccstr, 0, "ECC", + "000/050/080/100/140/200"}, + { + "infile", 'i', POPT_ARG_STRING, &infile, 0, "Barcode file", + "filename"}, + { + "outfile", 'o', POPT_ARG_STRING, &outfile, 0, + "Output filename", + "filename"}, + { + "encoding", 'e', POPT_ARG_STRING, &encoding, 0, + "Encoding template", + "[CTXEAB]* for ecc200 or 11/27/41/37/128/256"}, + { + "format", 'f', POPT_ARGFLAG_SHOW_DEFAULT | POPT_ARG_STRING, + &format, 0, + "Output format", "Text/EPS/PNG/Bin/Hex/Stamp"}, + POPT_AUTOHELP { + NULL, 0, 0, NULL, 0} + }; + optCon = poptGetContext(NULL, argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, "[barcode]"); + if ((c = poptGetNextOpt(optCon)) < -1) { + /* an error occurred during option processing */ + fprintf(stderr, "%s: %s\n", poptBadOption(optCon, + POPT_BADOPTION_NOALIAS), + poptStrerror(c)); + return 1; + } + + if (poptPeekArg(optCon) && !barcode && !infile) + barcode = (char *)poptGetArg(optCon); + if (poptPeekArg(optCon) || !barcode && !infile || barcode && infile) { + fprintf(stderr, "Version: %s\n", IEC16022_VERSION); + poptPrintUsage(optCon, stderr, 0); + return -1; + } + if (outfile && !freopen(outfile, "w", stdout)) { + perror(outfile); + return 1; + } + + if (infile) { // read from file + FILE *f = fopen(infile, "rb"); + barcode = safemalloc(4001); + if (!f) { + perror(infile); + return 1; + } + barcodelen = fread(barcode, 1, 4000, f); + if (barcodelen < 0) { + perror(infile); + return 1; + } + barcode[barcodelen] = 0; // null terminate anyway + close(f); + } else + barcodelen = strlen(barcode); + // check parameters + if (size) { + char *x = strchr(size, 'x'); + W = atoi(size); + if (x) + H = atoi(x + 1); + if (!H) + W = H; + } + if (eccstr) + ecc = atoi(eccstr); + if (W & 1) { // odd size + if (W != H || W < 9 || W > 49) { + fprintf(stderr, "Invalid size %dx%d\n", W, H); + return 1; + } + if (!eccstr) { + if (W >= 17) + ecc = 140; + else if (W >= 13) + ecc = 100; + else if (W >= 11) + ecc = 80; + else + ecc = 0; + } + if (ecc && ecc != 50 && ecc != 80 && ecc != 100 && ecc != 140 || + ecc == 50 && W < 11 || ecc == 80 && W < 13 || ecc == 100 + && W < 13 || ecc == 140 && W < 17) { + fprintf(stderr, "ECC%03d invalid for %dx%d\n", ecc, W, + H); + return 1; + } + + } else if (W) { // even size + if (W < H) { + int t = W; + W = H; + H = t; + } + if (!eccstr) + ecc = 200; + if (ecc != 200) { + fprintf(stderr, "ECC%03d invalid for %dx%d\n", ecc, W, + H); + return 1; + } + } + + else { // auto size + if (!eccstr) + // default is even sizes only unless explicit ecc set to force odd + // sizes + ecc = 200; + } + + if (tolower(*format) == 's') { // special stamp format checks & defaults + if (!W) + W = H = 32; + if (ecc != 200 || W != 32 || H != 32) + fprintf(stderr, "Stamps must be 32x32\n"); + if (encoding) + fprintf(stderr, "Stamps should use auto encoding\n"); + else { + int n; + for (n = 0; n < barcodelen && (barcode[n] == ' ' || + isdigit(barcode[n]) + || isupper(barcode[n])); + n++) ; + if (n < barcodelen) + fprintf(stderr, + "Has invalid characters for a stamp\n"); + else { + // Generate simplistic encoding rules as used by the windows app + // TBA - does not always match the windows app... + n = 0; + encoding = safemalloc(barcodelen + 1); + while (n < barcodelen) { + // ASCII + while (1) { + if (n == barcodelen + || n + 3 <= barcodelen + && (!isdigit(barcode[n]) + || + !isdigit(barcode + [n + 1]))) + break; + encoding[n++] = 'A'; + if (n < barcodelen + && isdigit(barcode[n - 1]) + && isdigit(barcode[n])) + encoding[n++] = 'A'; + } + // C40 + while (1) { + int r = 0; + while (n + r < barcodelen + && + isdigit(barcode[n + r])) + r++; + if (n + 3 > barcodelen + || r >= 6) + break; + encoding[n++] = 'C'; + encoding[n++] = 'C'; + encoding[n++] = 'C'; + } + } + encoding[n] = 0; + //fprintf (stderr, "%s\n%s\n", barcode, encoding); + } + } + } + // processing stamps + if ((W & 1) || ecc < 200) { // odd sizes + fprintf(stderr, "Not done odd sizes yet, sorry\n"); + } else { // even sizes + grid = + iec16022ecc200(&W, &H, &encoding, barcodelen, barcode, &len, + &maxlen, &ecclen); + } + + // output + if (!grid || !W) { + fprintf(stderr, "No barcode produced\n"); + return 1; + } + switch (tolower(*format)) { + case 'i': // info + printf("Size : %dx%d\n", W, H); + printf("Encoded : %d of %d bytes with %d bytes of ecc\n", len, + maxlen, ecclen); + printf("Barcode : %s\n", barcode); + printf("Encoding: %s\n", encoding); + break; + case 'h': // hex + dumphex(grid, W, H, 0); + break; + case 'b': // bin + { + int y; + for (y = 0; y < H; y++) { + int v = 0, x, b = 128; + for (x = 0; x < W; x++) { + if (grid[y * W + x]) + v |= b; + b >>= 1; + if (!b) { + putchar(v); + v = 0; + b = 128; + } + } + if (b != 128) + putchar(v); + } + } + break; + case 't': // text + { + int y; + for (y = H - 1; y >= 0; y--) { + int x; + for (x = 0; x < W; x++) + printf("%c", + grid[W * y + x] ? '*' : ' '); + printf("\n"); + } + } + break; + case 'e': // EPS + printf("%%!PS-Adobe-3.0 EPSF-3.0\n" + "%%%%Creator: IEC16022 barcode/stamp generator\n" + "%%%%BarcodeData: %s\n" "%%%%BarcodeSize: %dx%d\n" + "%%%%BarcodeFormat: ECC200\n" + "%%%%DocumentData: Clean7Bit\n" "%%%%LanguageLevel: 1\n" + "%%%%Pages: 1\n" "%%%%BoundingBox: 0 0 %d %d\n" + "%%%%EndComments\n" "%%%%Page: 1 1\n" + "%d %d 1[1 0 0 1 -1 -1]{<\n", barcode, W, H, W + 2, + H + 2, W, H); + dumphex(grid, W, H, 0xFF); + printf(">}image\n"); + break; + case 's': // Stamp + { + char temp[74], c; + time_t now; + struct tm t = { + 0 + }; + int v; + if (barcodelen < 74) { + fprintf(stderr, + "Does not look like a stamp barcode\n"); + return 1; + } + memcpy(temp, barcode, 74); + c = temp[5]; + temp[56] = 0; + t.tm_year = atoi(temp + 54) + 100; + t.tm_mday = 1; + now = mktime(&t); + temp[54] = 0; + now += 86400 * (atoi(temp + 51) - 1); + t = *gmtime(&now); + temp[46] = 0; + v = atoi(temp + 36); + printf("%%!PS-Adobe-3.0 EPSF-3.0\n" + "%%%%Creator: IEC16022 barcode/stamp generator\n" + "%%%%BarcodeData: %s\n" "%%%%BarcodeSize: %dx%d\n" "%%%%DocumentData: Clean7Bit\n" "%%%%LanguageLevel: 1\n" "%%%%Pages: 1\n" "%%%%BoundingBox: 0 0 190 80\n" "%%%%EndComments\n" "%%%%Page: 1 1\n" "10 dict begin/f{findfont exch scalefont \ + setfont}bind def/rm/rmoveto load def/m/moveto load \ + def/rl/rlineto load def\n" "/l/lineto load def/cp/closepath load def/c{dup stringwidth \ + pop -2 div 0 rmoveto show}bind def\n" "gsave 72 25.4 div dup scale 0 0 m 67 0 rl 0 28 rl -67 0 rl \ + cp clip 1 setgray fill 0 setgray 0.5 0 translate 0.3 \ + setlinewidth\n" "32 32 1[2 0 0 2 0 -11]{<\n", barcode, W, H); + dumphex(grid, W, H, 0xFF); + printf(">}image\n" + "3.25/Helvetica-Bold f 8 25.3 m(\\243%d.%02d)c\n" + "2.6/Helvetica f 8 22.3 m(%.4s %.4s)c\n" + "1.5/Helvetica f 8 3.3 m(POST BY)c\n" + "3.3/Helvetica f 8 0.25 m(%02d.%02d.%02d)c\n", + v / 100, v % 100, temp + 6, temp + 10, t.tm_mday, + t.tm_mon + 1, t.tm_year % 100); + if (c == '1' || c == '2' || c == 'A' || c == 'S') { + if (c == '2') + printf + ("42 0 m 10 0 rl 0 28 rl -10 0 rl cp 57 0 m 5 0 rl 0 \ + 28 rl -5 0 rl cp"); + else + printf + ("42 0 m 5 0 rl 0 28 rl -5 0 rl cp 52 0 m 10 0 rl 0 \ + 28 rl -10 0 rl cp"); + printf + (" 21 0 m 16 0 rl 0 28 rl -16 0 rl cp fill\n" + "21.3 0.3 m 15.4 0 rl 0 13 rl -15.4 0 rl cp 1 setgray \ + fill gsave 21.3 0.3 15.4 27.4 rectclip newpath\n"); + switch (c) { + case '1': + printf + ("27/Helvetica-Bold f 27 8.7 m(1)show grestore 0 setgray \ + 1.5/Helvetica-Bold f 22 3.3 m(POSTAGE PAID GB)show \ + 1.7/Helvetica f 29 1.5 m(DumbStamp.co.uk)c\n"); + break; + case '2': + printf + ("21/Helvetica-Bold f 23.5 13 m(2)1.25 1 scale show grestore \ + 0 setgray 1.5/Helvetica-Bold f 22 3.3 \ + m(POSTAGE PAID GB)show 1.7/Helvetica f 29 1.5 \ + m(DumbStamp.co.uk)c\n"); + break; + case 'A': + printf + ("16/Helvetica-Bold f 29 14.75 m 1.1 1 scale(A)c grestore 0 \ + setgray 1.5/Helvetica-Bold f 22 3.3 m(POSTAGE PAID GB)show \ + 1.7/Helvetica f 22 1.5 m(Par Avion)show\n"); + break; + case 'S': + printf + ("10/Helvetica-Bold f 29 17 m(SU)c grestore 0 setgray \ + 1.5/Helvetica-Bold f 22 1.5 m(POSTAGE PAID GB)show\n"); + break; + } + printf + ("2.3/Helvetica-Bold f 29 10 m(LOYAL MAIL)c\n"); + } else if (c == 'P') { // Standard Parcels + printf("21 0 m 41 0 rl 0 28 rl -41 0 rl cp fill\n" "37.7 0.3 m 24 0 rl 0 27.4 rl -24 0 rl cp 1 setgray fill \ + gsave 21.3 0.3 16.4 27.4 rectclip newpath\n" "22.5/Helvetica-Bold f 37.75 -1.25 m 90 rotate(SP)show \ + grestore 0 setgray\n" + "3.5/Helvetica-Bold f 49.7 21.5 m(LOYAL MAIL)c\n" "2.3/Helvetica-Bold f 49.7 7 m(POSTAGE PAID GB)c\n" "2.6/Helveica f 49.7 4.25 m(DumbStamp.co.uk)c\n"); + } else if (c == '3') + printf("21.15 0.15 40.7 27.7 rectstroke\n" + "21 0 m 41 0 rl 0 5 rl -41 0 rl cp fill\n" + "0 1 2{0 1 18{dup 1.525 mul 22.9 add 24 3 index 1.525 mul \ + add 3 -1 roll 9 add 29 div 0 360 arc fill}for pop}for\n" "50.5 23.07 m 11.5 0 rl 0 5 rl -11.5 0 rl cp fill\n" + "5.85/Helvetica f 23.7 15.6 m(Loyal Mail)show\n" "4.75/Helvetica-Bold f 24 11 m(special)show 4.9/Helvetica \ + f(delivery)show\n" "gsave 1 setgray 3.2/Helvetica-Bold f 24 1.6 \ + m(next day)show 26 10.15 m 2 0 rl stroke grestore\n" "21.15 9.9 m 53.8 9.9 l stroke 53.8 9.9 0.4 0 360 \ + arc fill\n"); + printf("end grestore\n"); + } + break; + case 'p': // png + { + int x, y; + Image *i = ImageNew(W + 2, H + 2, 2); + i->Colour[0] = 0xFFFFFF; + i->Colour[1] = 0; + for (y = 0; y < H; y++) + for (x = 0; x < W; x++) + if (grid[y * W + x]) + ImagePixel(i, x + 1, H - y) = 1; + ImageWritePNG(i, fileno(stdout), 0, -1, barcode); + ImageFree(i); + } + break; + default: + fprintf(stderr, "Unknown output format %s\n", format); + break; + } + return 0; +} diff --git a/iec16022-0.2.1/iec16022ecc200.c b/iec16022-0.2.1/iec16022ecc200.c new file mode 100644 index 00000000..0b28db70 --- /dev/null +++ b/iec16022-0.2.1/iec16022ecc200.c @@ -0,0 +1,963 @@ +/** + * + * IEC16022 bar code generation + * Adrian Kennard, Andrews & Arnold Ltd + * with help from Cliff Hones on the RS coding + * + * (c) 2004 Adrian Kennard, Andrews & Arnold Ltd + * (c) 2006 Stefan Schmidt + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include "reedsol.h" +#include "iec16022ecc200.h" + +static struct ecc200matrix_s { + int H, W; + int FH, FW; + int bytes; + int datablock, rsblock; +} ecc200matrix[] = { + 10, 10, 10, 10, 3, 3, 5, // + 12, 12, 12, 12, 5, 5, 7, // + 8, 18, 8, 18, 5, 5, 7, // + 14, 14, 14, 14, 8, 8, 10, // + 8, 32, 8, 16, 10, 10, 11, // + 16, 16, 16, 16, 12, 12, 12, // + 12, 26, 12, 26, 16, 16, 14, // + 18, 18, 18, 18, 18, 18, 14, // + 20, 20, 20, 20, 22, 22, 18, // + 12, 36, 12, 18, 22, 22, 18, // + 22, 22, 22, 22, 30, 30, 20, // + 16, 36, 16, 18, 32, 32, 24, // + 24, 24, 24, 24, 36, 36, 24, // + 26, 26, 26, 26, 44, 44, 28, // + 16, 48, 16, 24, 49, 49, 28, // + 32, 32, 16, 16, 62, 62, 36, // + 36, 36, 18, 18, 86, 86, 42, // + 40, 40, 20, 20, 114, 114, 48, // + 44, 44, 22, 22, 144, 144, 56, // + 48, 48, 24, 24, 174, 174, 68, // + 52, 52, 26, 26, 204, 102, 42, // + 64, 64, 16, 16, 280, 140, 56, // + 72, 72, 18, 18, 368, 92, 36, // + 80, 80, 20, 20, 456, 114, 48, // + 88, 88, 22, 22, 576, 144, 56, // + 96, 96, 24, 24, 696, 174, 68, // + 104, 104, 26, 26, 816, 136, 56, // + 120, 120, 20, 20, 1050, 175, 68, // + 132, 132, 22, 22, 1304, 163, 62, // + 144, 144, 24, 24, 1558, 156, 62, // 156*4+155*2 + 0 // terminate +}; + + // simple checked response malloc +static void *safemalloc(int n) +{ + void *p = malloc(n); + if (!p) { + fprintf(stderr, "Malloc(%d) failed\n", n); + exit(1); + } + return p; +} + +// Annex M placement alorithm low level +static void ecc200placementbit(int *array, int NR, int NC, int r, int c, + int p, char b) +{ + if (r < 0) { + r += NR; + c += 4 - ((NR + 4) % 8); + } + if (c < 0) { + c += NC; + r += 4 - ((NC + 4) % 8); + } + array[r * NC + c] = (p << 3) + b; +} + +static void ecc200placementblock(int *array, int NR, int NC, int r, + int c, int p) +{ + ecc200placementbit(array, NR, NC, r - 2, c - 2, p, 7); + ecc200placementbit(array, NR, NC, r - 2, c - 1, p, 6); + ecc200placementbit(array, NR, NC, r - 1, c - 2, p, 5); + ecc200placementbit(array, NR, NC, r - 1, c - 1, p, 4); + ecc200placementbit(array, NR, NC, r - 1, c - 0, p, 3); + ecc200placementbit(array, NR, NC, r - 0, c - 2, p, 2); + ecc200placementbit(array, NR, NC, r - 0, c - 1, p, 1); + ecc200placementbit(array, NR, NC, r - 0, c - 0, p, 0); +} + +static void ecc200placementcornerA(int *array, int NR, int NC, int p) +{ + ecc200placementbit(array, NR, NC, NR - 1, 0, p, 7); + ecc200placementbit(array, NR, NC, NR - 1, 1, p, 6); + ecc200placementbit(array, NR, NC, NR - 1, 2, p, 5); + ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4); + ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3); + ecc200placementbit(array, NR, NC, 1, NC - 1, p, 2); + ecc200placementbit(array, NR, NC, 2, NC - 1, p, 1); + ecc200placementbit(array, NR, NC, 3, NC - 1, p, 0); +} + +static void ecc200placementcornerB(int *array, int NR, int NC, int p) +{ + ecc200placementbit(array, NR, NC, NR - 3, 0, p, 7); + ecc200placementbit(array, NR, NC, NR - 2, 0, p, 6); + ecc200placementbit(array, NR, NC, NR - 1, 0, p, 5); + ecc200placementbit(array, NR, NC, 0, NC - 4, p, 4); + ecc200placementbit(array, NR, NC, 0, NC - 3, p, 3); + ecc200placementbit(array, NR, NC, 0, NC - 2, p, 2); + ecc200placementbit(array, NR, NC, 0, NC - 1, p, 1); + ecc200placementbit(array, NR, NC, 1, NC - 1, p, 0); +} + +static void ecc200placementcornerC(int *array, int NR, int NC, int p) +{ + ecc200placementbit(array, NR, NC, NR - 3, 0, p, 7); + ecc200placementbit(array, NR, NC, NR - 2, 0, p, 6); + ecc200placementbit(array, NR, NC, NR - 1, 0, p, 5); + ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4); + ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3); + ecc200placementbit(array, NR, NC, 1, NC - 1, p, 2); + ecc200placementbit(array, NR, NC, 2, NC - 1, p, 1); + ecc200placementbit(array, NR, NC, 3, NC - 1, p, 0); +} + +static void ecc200placementcornerD(int *array, int NR, int NC, int p) +{ + ecc200placementbit(array, NR, NC, NR - 1, 0, p, 7); + ecc200placementbit(array, NR, NC, NR - 1, NC - 1, p, 6); + ecc200placementbit(array, NR, NC, 0, NC - 3, p, 5); + ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4); + ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3); + ecc200placementbit(array, NR, NC, 1, NC - 3, p, 2); + ecc200placementbit(array, NR, NC, 1, NC - 2, p, 1); + ecc200placementbit(array, NR, NC, 1, NC - 1, p, 0); +} + +// Annex M placement alorithm main function +static void ecc200placement(int *array, int NR, int NC) +{ + int r, c, p; + // invalidate + for (r = 0; r < NR; r++) + for (c = 0; c < NC; c++) + array[r * NC + c] = 0; + // start + p = 1; + r = 4; + c = 0; + do { + // check corner + if (r == NR && !c) + ecc200placementcornerA(array, NR, NC, p++); + if (r == NR - 2 && !c && NC % 4) + ecc200placementcornerB(array, NR, NC, p++); + if (r == NR - 2 && !c && (NC % 8) == 4) + ecc200placementcornerC(array, NR, NC, p++); + if (r == NR + 4 && c == 2 && !(NC % 8)) + ecc200placementcornerD(array, NR, NC, p++); + // up/right + do { + if (r < NR && c >= 0 && !array[r * NC + c]) + ecc200placementblock(array, NR, NC, r, c, p++); + r -= 2; + c += 2; + } + while (r >= 0 && c < NC); + r++; + c += 3; + // down/left + do { + if (r >= 0 && c < NC && !array[r * NC + c]) + ecc200placementblock(array, NR, NC, r, c, p++); + r += 2; + c -= 2; + } + while (r < NR && c >= 0); + r += 3; + c++; + } + while (r < NR || c < NC); + // unfilled corner + if (!array[NR * NC - 1]) + array[NR * NC - 1] = array[NR * NC - NC - 2] = 1; +} + +// calculate and append ecc code, and if necessary interleave +static void ecc200(unsigned char *binary, int bytes, int datablock, int rsblock) +{ + int blocks = (bytes + 2) / datablock, b; + rs_init_gf(0x12d); + rs_init_code(rsblock, 1); + for (b = 0; b < blocks; b++) { + unsigned char buf[256], ecc[256]; + int n, p = 0; + for (n = b; n < bytes; n += blocks) + buf[p++] = binary[n]; + rs_encode(p, buf, ecc); + p = rsblock - 1; // comes back reversed + for (n = b; n < rsblock * blocks; n += blocks) + binary[bytes + n] = ecc[p--]; + } +} + +/* + * perform encoding for ecc200, source s len sl, to target t len tl, using + * optional encoding control string e return 1 if OK, 0 if failed. Does all + * necessary padding to tl + */ + +char ecc200encode(unsigned char *t, int tl, unsigned char *s, int sl, + char *encoding, int *lenp) +{ + char enc = 'a'; // start in ASCII encoding mode + int tp = 0, sp = 0; + if (strlen(encoding) < sl) { + fprintf(stderr, "Encoding string too short\n"); + return 0; + } + // do the encoding + while (sp < sl && tp < tl) { + char newenc = enc; // suggest new encoding + if (tl - tp <= 1 && (enc == 'c' || enc == 't') || tl - tp <= 2 + && enc == 'x') + enc = 'a'; // auto revert to ASCII + newenc = tolower(encoding[sp]); + switch (newenc) { // encode character + case 'c': // C40 + case 't': // Text + case 'x': // X12 + { + char out[6], p = 0; + const char *e, + *s2 = "!\"#$%&'()*+,-./:;<=>?@[\\]_", + *s3 = 0; + if (newenc == 'c') { + e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + s3 = "`abcdefghijklmnopqrstuvwxyz{|}~\177"; + } + if (newenc == 't') { + e = " 0123456789abcdefghijklmnopqrstuvwxyz"; + s3 = "`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~\177"; + } + if (newenc == 'x') + e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\r*>"; + do { + unsigned char c = s[sp++]; + char *w; + if (c & 0x80) { + if (newenc == 'x') { + fprintf(stderr, + "Cannot encode char 0x%02X in X12\n", + c); + return 0; + } + c &= 0x7f; + out[p++] = 1; + out[p++] = 30; + } + w = strchr(e, c); + if (w) + out[p++] = ((w - e) + 3) % 40; + else { + if (newenc == 'x') { + fprintf(stderr, + "Cannot encode char 0x%02X in X12\n", + c); + return 0; + } + if (c < 32) { // shift 1 + out[p++] = 0; + out[p++] = c; + } else { + w = strchr(s2, c); + if (w) { // shift 2 + out[p++] = 1; + out[p++] = + (w - s2); + } else { + w = strchr(s3, + c); + if (w) { + out[p++] + = 2; + out[p++] + = + (w - + s3); + } else { + fprintf + (stderr, + "Could not encode 0x%02X, should \ + not happen\n", c); + return + 0; + } + } + } + } + if (p == 2 && tp + 2 == tl && sp == sl) + out[p++] = 0; // shift 1 pad at end + while (p >= 3) { + int v = + out[0] * 1600 + + out[1] * 40 + out[2] + 1; + if (enc != newenc) { + if (enc == 'c' + || enc == 't' + || enc == 'x') + t[tp++] = 254; // escape C40/text/X12 + else if (enc == 'x') + t[tp++] = 0x7C; // escape EDIFACT + if (newenc == 'c') + t[tp++] = 230; + if (newenc == 't') + t[tp++] = 239; + if (newenc == 'x') + t[tp++] = 238; + enc = newenc; + } + t[tp++] = (v >> 8); + t[tp++] = (v & 0xFF); + p -= 3; + out[0] = out[3]; + out[1] = out[4]; + out[2] = out[5]; + } + } + while (p && sp < sl); + } + break; + case 'e': // EDIFACT + { + unsigned char out[4], p = 0; + if (enc != newenc) { // can only be from C40/Text/X12 + t[tp++] = 254; + enc = 'a'; + } + while (sp < sl && tolower(encoding[sp]) == 'e' + && p < 4) + out[p++] = s[sp++]; + if (p < 4) { + out[p++] = 0x1F; + enc = 'a'; + } // termination + t[tp] = ((s[0] & 0x3F) << 2); + t[tp++] |= ((s[1] & 0x30) >> 4); + t[tp] = ((s[1] & 0x0F) << 4); + if (p == 2) + tp++; + else { + t[tp++] |= ((s[2] & 0x3C) >> 2); + t[tp] = ((s[2] & 0x03) << 6); + t[tp++] |= (s[3] & 0x3F); + } + } + break; + case 'a': // ASCII + if (enc != newenc) { + if (enc == 'c' || enc == 't' || enc == 'x') + t[tp++] = 254; // escape C40/text/X12 + else + t[tp++] = 0x7C; // escape EDIFACT + } + enc = 'a'; + if (sl - sp >= 2 && isdigit(s[sp]) + && isdigit(s[sp + 1])) { + t[tp++] = + (s[sp] - '0') * 10 + s[sp + 1] - '0' + 130; + sp += 2; + } else if (s[sp] > 127) { + t[tp++] = 235; + t[tp++] = s[sp++] - 127; + } else + t[tp++] = s[sp++] + 1; + break; + case 'b': // Binary + { + int l = 0; // how much to encode + if (encoding) { + int p; + for (p = sp; + p < sl + && tolower(encoding[p]) == 'b'; + p++) + l++; + } + t[tp++] = 231; // base256 + if (l < 250) + t[tp++] = l; + else { + t[tp++] = 249 + (l / 250); + t[tp++] = (l % 250); + } + while (l-- && tp < tl) { + t[tp] = s[sp++] + (((tp + 1) * 149) % 255) + 1; // see annex H + tp++; + } + enc = 'a'; // reverse to ASCII at end + } + break; + default: + fprintf(stderr, "Unknown encoding %c\n", newenc); + return 0; // failed + } + } + if (lenp) + *lenp = tp; + if (tp < tl && enc != 'a') { + if (enc == 'c' || enc == 'x' || enc == 't') + t[tp++] = 254; // escape X12/C40/Text + else + t[tp++] = 0x7C; // escape EDIFACT + } + if (tp < tl) + t[tp++] = 129; // pad + while (tp < tl) { // more padding + int v = 129 + (((tp + 1) * 149) % 253) + 1; // see Annex H + if (v > 254) + v -= 254; + t[tp++] = v; + } + if (tp > tl || sp < sl) + return 0; // did not fit + /* + * for (tp = 0; tp < tl; tp++) fprintf (stderr, "%02X ", t[tp]); \ + * fprintf (stderr, "\n"); + */ + return 1; // OK +} + +// Auto encoding format functions +static char encchr[] = "ACTXEB"; + +enum { + E_ASCII, + E_C40, + E_TEXT, + E_X12, + E_EDIFACT, + E_BINARY, + E_MAX +}; + +unsigned char switchcost[E_MAX][E_MAX] = { + 0, 1, 1, 1, 1, 2, // From E_ASCII + 1, 0, 2, 2, 2, 3, // From E_C40 + 1, 2, 0, 2, 2, 3, // From E_TEXT + 1, 2, 2, 0, 2, 3, // From E_X12 + 1, 2, 2, 2, 0, 3, // From E_EDIFACT + 0, 1, 1, 1, 1, 0, // From E_BINARY +}; + +/* + * Creates a encoding list (malloc) + * returns encoding string + * if lenp not null, target len stored + * if error, null returned + * if exact specified, then assumes shortcuts applicable for exact fit + * in target + * 1. No unlatch to return to ASCII for last encoded byte after C40 or + * Text or X12 + * 2. No unlatch to return to ASCII for last 1 or 2 encoded bytes after + * EDIFACT + * 3. Final C40 or text encoding exactly in last 2 bytes can have a shift + * 0 to pad to make a tripple + * Only use the encoding from an exact request if the len matches the target, + * otherwise free the result and try again with exact=0 + */ + +static char *encmake(int l, unsigned char *s, int *lenp, char exact) +{ + char *encoding = 0; + int p = l; + char e; + struct { + // number of bytes of source that can be encoded in a row at this point + // using this encoding mode + short s; + // number of bytes of target generated encoding from this point to end if + // already in this encoding mode + short t; + } enc[MAXBARCODE][E_MAX]; + memset(&enc, 0, sizeof(enc)); + if (!l) + return ""; // no length + if (l > MAXBARCODE) + return 0; // not valid + while (p--) { + char b = 0, sub; + int sl, tl, bl, t; + // consider each encoding from this point + // ASCII + sl = tl = 1; + if (isdigit(s[p]) && p + 1 < l && isdigit(s[p + 1])) + sl = 2; // double digit + else if (s[p] & 0x80) + tl = 2; // high shifted + bl = 0; + if (p + sl < l) + for (e = 0; e < E_MAX; e++) + if (enc[p + sl][e].t && ((t = enc[p + sl][e].t + + switchcost[E_ASCII] + [e]) < bl || !bl)) { + bl = t; + b = e; + } + enc[p][E_ASCII].t = tl + bl; + enc[p][E_ASCII].s = sl; + if (bl && b == E_ASCII) + enc[p][b].s += enc[p + sl][b].s; + // C40 + sub = tl = sl = 0; + do { + unsigned char c = s[p + sl++]; + if (c & 0x80) { // shift + upper + sub += 2; + c &= 0x7F; + } + if (c != ' ' && !isdigit(c) && !isupper(c)) + sub++; // shift + sub++; + while (sub >= 3) { + sub -= 3; + tl += 2; + } + } while (sub && p + sl < l); + if (exact && sub == 2 && p + sl == l) { + // special case, can encode last block with shift 0 at end (Is this + // valid when not end of target buffer?) + sub = 0; + tl += 2; + } + if (!sub) { // can encode C40 + bl = 0; + if (p + sl < l) + for (e = 0; e < E_MAX; e++) + if (enc[p + sl][e].t + && + ((t = + enc[p + sl][e].t + + switchcost[E_C40][e]) < bl + || !bl)) { + bl = t; + b = e; + } + if (exact && enc[p + sl][E_ASCII].t == 1 && 1 < bl) { + // special case, switch to ASCII for last bytes + bl = 1; + b = E_ASCII; + } + enc[p][E_C40].t = tl + bl; + enc[p][E_C40].s = sl; + if (bl && b == E_C40) + enc[p][b].s += enc[p + sl][b].s; + } + // Text + sub = tl = sl = 0; + do { + unsigned char c = s[p + sl++]; + if (c & 0x80) { // shift + upper + sub += 2; + c &= 0x7F; + } + if (c != ' ' && !isdigit(c) && !islower(c)) + sub++; // shift + sub++; + while (sub >= 3) { + sub -= 3; + tl += 2; + } + } while (sub && p + sl < l); + if (exact && sub == 2 && p + sl == l) { + // special case, can encode last block with shift 0 at end (Is this + // valid when not end of target buffer?) + sub = 0; + tl += 2; + } + if (!sub && sl) { // can encode Text + bl = 0; + if (p + sl < l) + for (e = 0; e < E_MAX; e++) + if (enc[p + sl][e].t + && + ((t = + enc[p + sl][e].t + + switchcost[E_TEXT][e]) < bl + || !bl)) { + bl = t; + b = e; + } + if (exact && enc[p + sl][E_ASCII].t == 1 && 1 < bl) { // special case, switch to ASCII for last bytes + bl = 1; + b = E_ASCII; + } + enc[p][E_TEXT].t = tl + bl; + enc[p][E_TEXT].s = sl; + if (bl && b == E_TEXT) + enc[p][b].s += enc[p + sl][b].s; + } + // X12 + sub = tl = sl = 0; + do { + unsigned char c = s[p + sl++]; + if (c != 13 && c != '*' && c != '>' && c != ' ' + && !isdigit(c) && !isupper(c)) { + sl = 0; + break; + } + sub++; + while (sub >= 3) { + sub -= 3; + tl += 2; + } + } while (sub && p + sl < l); + if (!sub && sl) { // can encode X12 + bl = 0; + if (p + sl < l) + for (e = 0; e < E_MAX; e++) + if (enc[p + sl][e].t + && + ((t = + enc[p + sl][e].t + + switchcost[E_X12][e]) < bl + || !bl)) { + bl = t; + b = e; + } + if (exact && enc[p + sl][E_ASCII].t == 1 && 1 < bl) { + // special case, switch to ASCII for last bytes + bl = 1; + b = E_ASCII; + } + enc[p][E_X12].t = tl + bl; + enc[p][E_X12].s = sl; + if (bl && b == E_X12) + enc[p][b].s += enc[p + sl][b].s; + } + // EDIFACT + sl = bl = 0; + if (s[p + 0] >= 32 && s[p + 0] <= 94) { // can encode 1 + char bs = 0; + if (p + 1 == l && (!bl || bl < 2)) { + bl = 2; + bs = 1; + } else + for (e = 0; e < E_MAX; e++) + if (e != E_EDIFACT && enc[p + 1][e].t + && + ((t = + 2 + enc[p + 1][e].t + + switchcost[E_ASCII][e]) + < bl || !bl)) // E_ASCII as allowed for unlatch + { + bs = 1; + bl = t; + b = e; + } + if (p + 1 < l && s[p + 1] >= 32 && s[p + 1] <= 94) { // can encode 2 + if (p + 2 == l && (!bl || bl < 2)) { + bl = 3; + bs = 2; + } else + for (e = 0; e < E_MAX; e++) + if (e != E_EDIFACT + && enc[p + 2][e].t + && + ((t = + 3 + enc[p + 2][e].t + + switchcost[E_ASCII][e]) + < bl || !bl)) // E_ASCII as allowed for unlatch + { + bs = 2; + bl = t; + b = e; + } + if (p + 2 < l && s[p + 2] >= 32 && s[p + 2] <= 94) { // can encode 3 + if (p + 3 == l && (!bl || bl < 3)) { + bl = 3; + bs = 3; + } else + for (e = 0; e < E_MAX; e++) + if (e != E_EDIFACT + && enc[p + 3][e].t + && + ((t = + 3 + enc[p + + 3][e].t + + switchcost + [E_ASCII][e]) + < bl || !bl)) // E_ASCII as allowed for unlatch + { + bs = 3; + bl = t; + b = e; + } + if (p + 4 < l && s[p + 3] >= 32 && s[p + 3] <= 94) { // can encode 4 + if (p + 4 == l + && (!bl || bl < 3)) { + bl = 3; + bs = 4; + } else { + for (e = 0; e < E_MAX; + e++) + if (enc[p + 4] + [e].t + && + ((t = + 3 + + enc[p + + 4][e]. + t + + switchcost + [E_EDIFACT] + [e]) < bl + || !bl)) { + bs = 4; + bl = t; + b = e; + } + if (exact + && enc[p + + 4][E_ASCII].t + && enc[p + + 4][E_ASCII]. + t <= 2 + && (t = + 3 + enc[p + + 4] + [E_ASCII].t) < + bl) { + // special case, switch to ASCII for last 1 ot two bytes + bs = 4; + bl = t; + b = E_ASCII; + } + } + } + } + } + enc[p][E_EDIFACT].t = bl; + enc[p][E_EDIFACT].s = bs; + if (bl && b == E_EDIFACT) + enc[p][b].s += enc[p + bs][b].s; + } + // Binary + bl = 0; + for (e = 0; e < E_MAX; e++) + if (enc[p + 1][e].t + && + ((t = + enc[p + 1][e].t + switchcost[E_BINARY][e] + + ((e == E_BINARY + && enc[p + 1][e].t == 249) ? 1 : 0)) + < bl || !bl)) { + bl = t; + b = e; + } + enc[p][E_BINARY].t = 1 + bl; + enc[p][E_BINARY].s = 1; + if (bl && b == E_BINARY) + enc[p][b].s += enc[p + 1][b].s; + /* + * fprintf (stderr, "%d:", p); for (e = 0; e < E_MAX; e++) fprintf \ + * (stderr, " %c*%d/%d", encchr[e], enc[p][e].s, enc[p][e].t); \ + * fprintf (stderr, "\n"); + */ + } + encoding = safemalloc(l + 1); + p = 0; + { + char cur = E_ASCII; // starts ASCII + while (p < l) { + int t, m = 0; + char b = 0; + for (e = 0; e < E_MAX; e++) + if (enc[p][e].t + && ((t = enc[p][e].t + switchcost[cur][e]) < + m || t == m && e == cur || !m)) { + b = e; + m = t; + } + cur = b; + m = enc[p][b].s; + if (!p && lenp) + *lenp = enc[p][b].t; + while (p < l && m--) + encoding[p++] = encchr[b]; + } + } + encoding[p] = 0; + return encoding; +} + +/* + * Main encoding function + * Returns the grid (malloced) containing the matrix. L corner at 0,0. + * Takes suggested size in *Wptr, *Hptr, or 0,0. Fills in actual size. + * Takes barcodelen and barcode to be encoded + * Note, if *encodingptr is null, then fills with auto picked (malloced) + * encoding + * If lenp not null, then the length of encoded data before any final + * unlatch or pad is stored + * If maxp not null, then the max storage of this size code is stored + * If eccp not null, then the number of ecc bytes used in this size is + * stored + * Returns 0 on error (writes to stderr with details). + */ + +unsigned char *iec16022ecc200(int *Wptr, int *Hptr, char **encodingptr, + int barcodelen, unsigned char *barcode, + int *lenp, int *maxp, int *eccp) +{ + unsigned char binary[3000]; // encoded raw data and ecc to place in barcode + int W = 0, H = 0; + char *encoding = 0; + unsigned char *grid = 0; + struct ecc200matrix_s *matrix; + memset(binary, 0, sizeof(binary)); + if (encodingptr) + encoding = *encodingptr; + if (Wptr) + W = *Wptr; + if (Hptr) + H = *Hptr; + + // encoding + if (W) { // known size + for (matrix = ecc200matrix; matrix->W && (matrix->W != W || + matrix->H != H); + matrix++) ; + if (!matrix->W) { + fprintf(stderr, "Invalid size %dx%d\n", W, H); + return 0; + } + if (!encoding) { + int len; + char *e = encmake(barcodelen, barcode, &len, 1); + if (e && len != matrix->bytes) { // try not an exact fit + free(e); + e = encmake(barcodelen, barcode, &len, 0); + if (len > matrix->bytes) { + fprintf(stderr, + "Cannot make barcode fit %dx%d\n", + W, H); + return 0; + } + } + encoding = e; + } + } else { + // find a suitable encoding + if (encoding == NULL) + encoding = encmake(barcodelen, barcode, NULL, 1); + + if (encoding) { // find one that fits chosen encoding + for (matrix = ecc200matrix; matrix->W; matrix++) + if (ecc200encode + (binary, matrix->bytes, barcode, barcodelen, + encoding, 0)) + break; + } else { + int len; + char *e; + e = encmake(barcodelen, barcode, &len, 1); + for (matrix = ecc200matrix; + matrix->W && matrix->bytes != len; matrix++) ; + if (e && !matrix->W) { // try for non exact fit + free(e); + e = encmake(barcodelen, barcode, &len, 0); + for (matrix = ecc200matrix; + matrix->W && matrix->bytes < len; + matrix++) ; + } + encoding = e; + } + if (!matrix->W) { + fprintf(stderr, + "Cannot find suitable size, barcode too long\n"); + return 0; + } + W = matrix->W; + H = matrix->H; + } + if (!ecc200encode(binary, matrix->bytes, barcode, barcodelen, + encoding, lenp)) { + fprintf(stderr, "Barcode too long for %dx%d\n", W, H); + return 0; + } + // ecc code + ecc200(binary, matrix->bytes, matrix->datablock, matrix->rsblock); + { // placement + int x, y, NC, NR, *places; + NC = W - 2 * (W / matrix->FW); + NR = H - 2 * (H / matrix->FH); + places = safemalloc(NC * NR * sizeof(int)); + ecc200placement(places, NR, NC); + grid = safemalloc(W * H); + memset(grid, 0, W * H); + for (y = 0; y < H; y += matrix->FH) { + for (x = 0; x < W; x++) + grid[y * W + x] = 1; + for (x = 0; x < W; x += 2) + grid[(y + matrix->FH - 1) * W + x] = 1; + } + for (x = 0; x < W; x += matrix->FW) { + for (y = 0; y < H; y++) + grid[y * W + x] = 1; + for (y = 0; y < H; y += 2) + grid[y * W + x + matrix->FW - 1] = 1; + } + for (y = 0; y < NR; y++) { + for (x = 0; x < NC; x++) { + int v = places[(NR - y - 1) * NC + x]; + //fprintf (stderr, "%4d", v); + if (v == 1 || v > 7 + && (binary[(v >> 3) - 1] & (1 << (v & 7)))) + grid[(1 + y + + 2 * (y / (matrix->FH - 2))) * W + + 1 + x + + 2 * (x / (matrix->FW - 2))] = 1; + } + //fprintf (stderr, "\n"); + } + free(places); + } + if (Wptr) + *Wptr = W; + if (Hptr) + *Hptr = H; + if (encodingptr) + *encodingptr = encoding; + if (maxp) + *maxp = matrix->bytes; + if (eccp) + *eccp = + (matrix->bytes + 2) / matrix->datablock * matrix->rsblock; + return grid; +} diff --git a/iec16022-0.2.1/iec16022ecc200.h b/iec16022-0.2.1/iec16022ecc200.h new file mode 100644 index 00000000..08678f08 --- /dev/null +++ b/iec16022-0.2.1/iec16022ecc200.h @@ -0,0 +1,47 @@ +/** + * + * IEC16022 bar code generation + * Adrian Kennard, Andrews & Arnold Ltd + * with help from Cliff Hones on the RS coding + * + * (c) 2004 Adrian Kennard, Andrews & Arnold Ltd + * (c) 2006 Stefan Schmidt + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * + * Main encoding function + * Returns the grid (malloced) containing the matrix. L corner at 0,0. + * Takes suggested size in *Wptr, *Hptr, or 0,0. Fills in actual size. + * Takes barcodelen and barcode to be encoded + * Note, if *encodingptr is null, then fills with auto picked (malloced) + * encoding. + * If lenp not null, then the length of encoded data before any final unlatch + * or pad is stored. + * If maxp not null, then the max storage of this size code is stored + * If eccp not null, then the number of ecc bytes used in this size is stored + * Returns 0 on error (writes to stderr with details). + * + */ + +#ifndef __IEC16022ECC200_H +#define __IEC16022ECC200_H + +unsigned char *iec16022ecc200(int *Wptr, int *Hptr, char **encodingptr, + int barcodelen, unsigned char *barcode, + int *lenp, int *maxp, int *eccp); +#define MAXBARCODE 3116 + +#endif /* __IEC16022ECC200_H */ diff --git a/iec16022-0.2.1/image.c b/iec16022-0.2.1/image.c new file mode 100644 index 00000000..f7dc3056 --- /dev/null +++ b/iec16022-0.2.1/image.c @@ -0,0 +1,668 @@ +/** + * + * Image handling tools, (c) AJK 2001-2005 + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include "image.h" + +#define INTERLACE +#define CLEAR +#define USEZLIB + +#ifdef USEZLIB +#include +#endif + +unsigned char const bbc[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // + 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00, // ! + 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, // " + 0x36, 0x36, 0x7F, 0x36, 0x7F, 0x36, 0x36, 0x00, // # + 0x0C, 0x3F, 0x68, 0x3E, 0x0B, 0x7E, 0x18, 0x00, // $ + 0x60, 0x66, 0x0C, 0x18, 0x30, 0x66, 0x06, 0x00, // % + 0x38, 0x6C, 0x6C, 0x38, 0x6D, 0x66, 0x3B, 0x00, // & + 0x0C, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, // ' + 0x0C, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0C, 0x00, // ( + 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00, // ) + 0x00, 0x18, 0x7E, 0x3C, 0x7E, 0x18, 0x00, 0x00, // * + 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, // + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, // , + 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, // - + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, // . + 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00, 0x00, // / + 0x18, 0x24, 0x66, 0x66, 0x66, 0x24, 0x18, 0x00, // 0 (non crossed) + 0x18, 0x38, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00, // 1 + 0x3C, 0x66, 0x06, 0x0C, 0x18, 0x30, 0x7E, 0x00, // 2 + 0x3C, 0x66, 0x06, 0x1C, 0x06, 0x66, 0x3C, 0x00, // 3 + 0x0C, 0x1C, 0x3C, 0x6C, 0x7E, 0x0C, 0x0C, 0x00, // 4 + 0x7E, 0x60, 0x7C, 0x06, 0x06, 0x66, 0x3C, 0x00, // 5 + 0x1C, 0x30, 0x60, 0x7C, 0x66, 0x66, 0x3C, 0x00, // 6 + 0x7E, 0x06, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00, // 7 + 0x3C, 0x66, 0x66, 0x3C, 0x66, 0x66, 0x3C, 0x00, // 8 + 0x3C, 0x66, 0x66, 0x3E, 0x06, 0x0C, 0x38, 0x00, // 9 + 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, // : + 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x30, // ; + 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x00, // < + 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00, // = + 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x00, // > + 0x3C, 0x66, 0x0C, 0x18, 0x18, 0x00, 0x18, 0x00, // ? + 0x3C, 0x66, 0x6E, 0x6A, 0x6E, 0x60, 0x3C, 0x00, // @ + 0x3C, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00, // A + 0x7C, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x7C, 0x00, // B + 0x3C, 0x66, 0x60, 0x60, 0x60, 0x66, 0x3C, 0x00, // C + 0x78, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0x78, 0x00, // D + 0x7E, 0x60, 0x60, 0x7C, 0x60, 0x60, 0x7E, 0x00, // E + 0x7E, 0x60, 0x60, 0x7C, 0x60, 0x60, 0x60, 0x00, // F + 0x3C, 0x66, 0x60, 0x6E, 0x66, 0x66, 0x3C, 0x00, // G + 0x66, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00, // H + 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00, // I + 0x3E, 0x0C, 0x0C, 0x0C, 0x0C, 0x6C, 0x38, 0x00, // J + 0x66, 0x6C, 0x78, 0x70, 0x78, 0x6C, 0x66, 0x00, // K + 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7E, 0x00, // L + 0x63, 0x77, 0x7F, 0x6B, 0x6B, 0x63, 0x63, 0x00, // M + 0x66, 0x66, 0x76, 0x7E, 0x6E, 0x66, 0x66, 0x00, // N + 0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, // O + 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, 0x60, 0x00, // P + 0x3C, 0x66, 0x66, 0x66, 0x6A, 0x6C, 0x36, 0x00, // Q + 0x7C, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0x66, 0x00, // R + 0x3C, 0x66, 0x60, 0x3C, 0x06, 0x66, 0x3C, 0x00, // S + 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // T + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, // U + 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00, // V + 0x63, 0x63, 0x6B, 0x6B, 0x7F, 0x77, 0x63, 0x00, // W + 0x66, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x66, 0x00, // X + 0x66, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x00, // Y + 0x7E, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x7E, 0x00, // Z + 0x7C, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7C, 0x00, // [ + 0x00, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x00, 0x00, // + 0x3E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x3E, 0x00, // ] + 0x18, 0x3C, 0x66, 0x42, 0x00, 0x00, 0x00, 0x00, // ^ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, // _ + 0x1C, 0x36, 0x30, 0x7C, 0x30, 0x30, 0x7E, 0x00, // ` + 0x00, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, // a + 0x60, 0x60, 0x7C, 0x66, 0x66, 0x66, 0x7C, 0x00, // b + 0x00, 0x00, 0x3C, 0x66, 0x60, 0x66, 0x3C, 0x00, // c + 0x06, 0x06, 0x3E, 0x66, 0x66, 0x66, 0x3E, 0x00, // d + 0x00, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, // e + 0x1C, 0x30, 0x30, 0x7C, 0x30, 0x30, 0x30, 0x00, // f + 0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x3C, // g + 0x60, 0x60, 0x7C, 0x66, 0x66, 0x66, 0x66, 0x00, // h + 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x3C, 0x00, // i + 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x70, // j + 0x60, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0x00, // k + 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, // l + 0x00, 0x00, 0x36, 0x7F, 0x6B, 0x6B, 0x63, 0x00, // m + 0x00, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x66, 0x00, // n + 0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00, // o + 0x00, 0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, // p + 0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x07, // q + 0x00, 0x00, 0x6C, 0x76, 0x60, 0x60, 0x60, 0x00, // r + 0x00, 0x00, 0x3E, 0x60, 0x3C, 0x06, 0x7C, 0x00, // s + 0x30, 0x30, 0x7C, 0x30, 0x30, 0x30, 0x1C, 0x00, // t + 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00, // u + 0x00, 0x00, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00, // v + 0x00, 0x00, 0x63, 0x6B, 0x6B, 0x7F, 0x36, 0x00, // w + 0x00, 0x00, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x00, // x + 0x00, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x06, 0x3C, // y + 0x00, 0x00, 0x7E, 0x0C, 0x18, 0x30, 0x7E, 0x00, // z + 0x0C, 0x18, 0x18, 0x70, 0x18, 0x18, 0x0C, 0x00, // { + 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, // | + 0x30, 0x18, 0x18, 0x0E, 0x18, 0x18, 0x30, 0x00, // } + 0x31, 0x6B, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, // ~ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // +}; + +const char smallc[] = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-+&()/[];%"; +unsigned char const small[] = { + 0x00, 0x00, 0x00, // + 0x1F, 0x11, 0x1F, //0 + 0x11, 0x1F, 0x10, //1 + 0x1D, 0x15, 0x17, //2 + 0x11, 0x15, 0x1F, //3 + 0x07, 0x04, 0x1F, //4 + 0x17, 0x15, 0x1D, //5 + 0x1F, 0x15, 0x1D, //6 + 0x01, 0x01, 0x1F, //7 + 0x1F, 0x15, 0x1F, //8 + 0x17, 0x15, 0x1F, //9 + 0x1E, 0x05, 0x1E, //A + 0x1F, 0x15, 0x0A, //B + 0x0E, 0x11, 0x11, //C + 0x1F, 0x11, 0x0E, //D + 0x1F, 0x15, 0x11, //E + 0x1F, 0x05, 0x01, //F + 0x0E, 0x11, 0x19, //G + 0x1F, 0x04, 0x1F, //H + 0x11, 0x1F, 0x11, //I + 0x11, 0x0F, 0x01, //J + 0x1F, 0x04, 0x1B, //K + 0x1F, 0x10, 0x10, //L + 0x1F, 0x03, 0x1F, //M + 0x1F, 0x01, 0x1F, //N + 0x0E, 0x11, 0x0E, //O + 0x1F, 0x05, 0x02, //P + 0x0E, 0x19, 0x1E, //Q + 0x1F, 0x05, 0x1A, //R + 0x12, 0x15, 0x09, //S + 0x01, 0x1F, 0x01, //T + 0x1F, 0x10, 0x1F, //U + 0x0F, 0x10, 0x0F, //V + 0x1F, 0x18, 0x1F, //W + 0x1B, 0x04, 0x1B, //X + 0x03, 0x1C, 0x03, //Y + 0x19, 0x15, 0x13, //Z + 0x04, 0x04, 0x04, //- + 0x04, 0x0E, 0x04, //+ + 0x04, 0x0E, 0x04, //& (+) + 0x00, 0x0E, 0x11, //( + 0x11, 0x0E, 0x00, //) + 0x08, 0x04, 0x02, /// + 0x00, 0x1F, 0x11, //[ + 0x11, 0x1F, 0x00, //] + 0x10, 0x0A, 0x00, //; + 0x09, 0x04, 0x12, //% +}; + +Image *ImageNew(int w, int h, int c) +{ // create a new blank image + Image *i; + if (!w || !h) + return 0; + i = malloc(sizeof(*i)); + if (!i) + return 0; + memset(i, 0, sizeof(*i)); + i->W = w; + i->L = w + 1; + i->H = h; + i->C = c; + i->Image = malloc((w + 1) * h); + if (!i->Image) { + free(i); + return 0; + } + memset(i->Image, 0, (w + 1) * h); + if (c) { + i->Colour = malloc(sizeof(Colour) * c); + if (!i->Colour) { + free(i->Image); + free(i); + return 0; + } + memset(i->Colour, 0, sizeof(Colour) * c); + } + return i; +} + +void ImageFree(Image * i) +{ // free an image + if (i) { + if (i->Image) + free(i->Image); + if (i->Colour) + free(i->Colour); + free(i); + } +} + +#define MAXLZW 4096 +typedef short LZW[256]; +typedef LZW LZWTree[MAXLZW]; +typedef struct strPrivate { + int cols; // number of colours, power of 2 + unsigned char colbits; // number of bits for colours + int fh; // file handle + int lzwnext; // next code + int lzwlast; // last code in current bit size + int lzwbits; // current bit size + LZWTree lzw; // encode tree + unsigned char block[256]; // block so far, with count at start + int blockv; // pending value + int blockb; // bits used in pending value + short lzwcode; // which code we are on now +} Private; + +static LZWFlush(Private * p) +{ // flush this block + write(p->fh, p->block, *p->block + 1); + *p->block = 0; +} + +static LZWOut(Private * p, short v) +{ // output a value + p->blockv |= (v << p->blockb); + p->blockb += p->lzwbits; + while (p->blockb >= 8) { + p->block[++*p->block] = p->blockv; // last partial byte + p->blockv >>= 8; + p->blockb -= 8; + if (*p->block == 255) + LZWFlush(p); + } +} + +static LZWClear(Private * p) +{ + int c; + p->lzwbits = p->colbits + 1; + p->lzwnext = p->cols + 2; + p->lzwlast = (1 << p->lzwbits) - 1; + p->lzwcode = p->cols; // starting point + for (c = 0; c < p->cols; c++) { + p->lzw[p->cols][c] = c; // links to literal entries + // links from literals, dead ends initially + memset(&p->lzw[c], -1, p->cols * 2); + } +} + +static ImageStart(Private * p) +{ + unsigned char b = p->colbits; + write(p->fh, &b, 1); + *p->block = 0; + p->blockb = 0; + p->blockv = 0; + LZWClear(p); + LZWOut(p, p->cols); // clear code +} + +static ImageEnd(Private * p) +{ + LZWOut(p, p->lzwcode); // last prefix + LZWOut(p, p->cols + 1); // end code + if (p->blockb) + p->block[++*p->block] = p->blockv; // last partial byte + LZWFlush(p); +} + +static ImageOut(Private * p, unsigned char c) +{ + short next = p->lzw[p->lzwcode][c]; + if (next == -1) { // dead end + LZWOut(p, p->lzwcode); // prefix +#ifdef CLEAR + if (p->lzwnext + 1 == MAXLZW) { + LZWOut(p, p->cols); // clear code + LZWClear(p); + } else +#endif + if (p->lzwnext < MAXLZW) { + memset(p->lzw[p->lzwnext], -1, p->cols * 2); // init dead ends + p->lzw[p->lzwcode][c] = p->lzwnext; + if (p->lzwnext > p->lzwlast) { // bigger code + p->lzwbits++; + p->lzwlast = (1 << p->lzwbits) - 1; + } + p->lzwnext++; + } + p->lzwcode = c; + } else + p->lzwcode = next; // not a dead end +} + +// write GIF image +void ImageWriteGif(Image * i, int fh, int back, int trans, char *comment) +{ + struct strPrivate p; + p.fh = fh; + // count colours, min 4 + for (p.colbits = 2, p.cols = 4; p.cols < i->C; + p.cols *= 2, p.colbits++) ; + { // headers + char buf[1500]; + int n = 0; + strcpy(buf, "GIF87a"); +#ifndef INTERLACE + if (comment || trans >= 0) +#endif + buf[4] = '9'; // needs gif89 format + n = 6; + buf[n++] = (i->W & 255); + buf[n++] = (i->W >> 8); + buf[n++] = (i->H & 255); + buf[n++] = (i->H >> 8); + buf[n++] = (i->Colour ? 0x80 : 0) + 0x70 + (p.colbits - 1); + buf[n++] = back; // background + buf[n++] = 0; // aspect + if (i->Colour) { + int c; + for (c = 0; c < p.cols; c++) { + if (c < i->C) { + buf[n++] = (i->Colour[c] >> 16 & 255); + buf[n++] = (i->Colour[c] >> 8 & 255); + buf[n++] = (i->Colour[c] & 255); + } else { // extra, unused, colour + buf[n++] = 0; + buf[n++] = 0; + buf[n++] = 0; + } + } + } + // comment + if (comment && strlen(comment) < 256) { // comment + buf[n++] = 0x21; //extension + buf[n++] = 0xFE; //comment + buf[n++] = strlen(comment); + strcpy(buf + n, comment); + n += buf[n - 1]; + buf[n++] = 0; // end of block + } + if (trans >= 0) { // transparrent + buf[n++] = 0x21; // extension + buf[n++] = 0xF9; // graphic control + buf[n++] = 4; // len + buf[n++] = 1; // transparrent + buf[n++] = 0; // delay + buf[n++] = 0; + buf[n++] = trans; + buf[n++] = 0; // terminator + } + // image + buf[n++] = 0x2C; + buf[n++] = 0; // offset X + buf[n++] = 0; + buf[n++] = 0; // offset Y + buf[n++] = 0; + buf[n++] = (i->W & 255); + buf[n++] = (i->W >> 8); + buf[n++] = (i->H & 255); + buf[n++] = (i->H >> 8); +#ifdef INTERLACE + buf[n++] = 0x40; // interlaced, no local colour table +#else + buf[n++] = 0x00; // non interlaced, no local colour table +#endif + write(fh, buf, n); + } + // image data + { + unsigned char *b; + int x, y; + ImageStart(&p); +#ifdef INTERLACE + for (y = 0; y < i->H; y += 8) + for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) + ImageOut(&p, *b++); + for (y = 4; y < i->H; y += 8) + for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) + ImageOut(&p, *b++); + for (y = 2; y < i->H; y += 4) + for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) + ImageOut(&p, *b++); + for (y = 1; y < i->H; y += 2) + for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) + ImageOut(&p, *b++); +#else + for (y = 0; y < i->H; y++) + for (b = &ImagePixel(i, 0, y), x = 0; x < i->W; x++) + ImageOut(&p, *b++); +#endif + ImageEnd(&p); + } + write(fh, "\0", 1); // end of image data + write(fh, "\x3B", 1); // trailer +} + +void ImageText(Image * i, int x, int y, int col, char *text) +{ // writes 8x8 text + if (i && text) + while (*text) { + if (*text >= ' ' && *text) { + int r; + unsigned const char *b = + bbc + (*text - ' ') * 8; + for (r = 0; r < 8; r++) { + unsigned char v = *b++; + unsigned char *p = + &ImagePixel(i, x, y + r); + unsigned char m; + for (m = 0x80; m; m >>= 1, p++) + if (v & m) + *p = col; + } + } + x += 8; + text++; + } +} + +void ImageSmall(Image * i, int x, int y, int col, char *text) +{ // writes 4x6 digits + if (i && text) + while (*text) { + char *p = strchr(smallc, toupper(*text)); + if (p) { + int r; + char m = 1; + unsigned const char *b = + small + (p - smallc) * 3; + for (r = 0; r < 5; r++) { + int c; + for (c = 0; c < 3; c++) + if (b[c] & m) + ImagePixel(i, x + c, + y + r) = col; + m <<= 1; + } + x += 4; + } else if (*text == '.') { + ImagePixel(i, x, y + 4) = col; + x += 2; + } else if (*text == ':') { + ImagePixel(i, x, y + 1) = col; + ImagePixel(i, x, y + 3) = col; + x += 2; + } + text++; + } +} + +void ImageRect(Image * i, int x, int y, int w, int h, int c) +{ // fill a box + if (i && w && h) { + while (h--) { + unsigned char *p = &ImagePixel(i, x, y); + int n = w; + while (n--) + *p++ = c; + y++; + } + } +} + +// PNG code + + /* Table of CRCs of all 8-bit messages. */ +static unsigned int crc_table[256]; + + /* Make the table for a fast CRC. */ +void make_crc_table(void) +{ + unsigned int c; + int n, k; + for (n = 0; n < 256; n++) { + c = (unsigned int)n; + for (k = 0; k < 8; k++) { + if (c & 1) + c = 0xedb88320L ^ (c >> 1); + else + c = c >> 1; + } + crc_table[n] = c; + } +} + + /* Update a running CRC with the bytes buf[0..len-1]--the CRC + should be initialized to all 1's, and the transmitted value + is the 1's complement of the final running CRC (see the + crc() routine below)). */ + +unsigned int update_crc(unsigned int crc, unsigned char *buf, int len) +{ + unsigned int c = crc; + int n; + + for (n = 0; n < len; n++) + c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8); + + return c; +} + + /* Return the CRC of the bytes buf[0..len-1]. */ +unsigned int crc(unsigned char *buf, int len) +{ + return update_crc(0xffffffffL, buf, len) ^ 0xffffffffL; +} + +unsigned int writecrc(int fh, char *ptr, int len, unsigned int c) +{ + write(fh, ptr, len); + while (len--) + c = crc_table[(c ^ *ptr++) & 0xff] ^ (c >> 8); + return c; +} + +void writechunk(int fh, char *typ, void *ptr, int len) +{ + unsigned int v = htonl(len), crc; + write(fh, &v, 4); + crc = writecrc(fh, typ, 4, ~0); + if (len) + crc = writecrc(fh, ptr, len, crc); + v = htonl(~crc); + write(fh, &v, 4); +} + +#ifndef USEZLIB +unsigned int adlersum(unsigned char *p, int l, unsigned int adler) +{ + unsigned int s1 = (adler & 65535), s2 = (adler >> 16); + while (l--) { + s1 += *p++; + s2 += s1; + } + s1 %= 65521; // can be delayed due to sensible "l" values... + s2 %= 65521; + return (s2 << 16) + s1; +} +#endif + +// write PNG image +void ImageWritePNG(Image * i, int fh, int back, int trans, char *comment) +{ + make_crc_table(); + write(fh, "\211PNG\r\n\032\n", 8); // PNG header + { // IHDR + struct { + unsigned int width; + unsigned int height; + unsigned char depth; + unsigned char colour; + unsigned char compress; + unsigned char filter; + unsigned char interlace; + } ihdr = { + 0, 0, 8, 3, 0, 0}; + ihdr.width = htonl(i->W); + ihdr.height = htonl(i->H); + writechunk(fh, "IHDR", &ihdr, 13); + } + { // PLTE + unsigned int v = htonl(i->C * 3), crc, n; + write(fh, &v, 4); + crc = writecrc(fh, "PLTE", 4, ~0); + for (n = 0; n < i->C; n++) { + v = htonl(i->Colour[n] << 8); + crc = writecrc(fh, (void *)&v, 3, crc); + } + v = htonl(~crc); + write(fh, &v, 4); + } + if (back >= 0) { // bKGD + unsigned char b = back; + writechunk(fh, "bKGD", &b, 1); + } + if (*comment) { // tEXt + char c[] = "Comment"; + unsigned int v = htonl(strlen(c) + strlen(comment) + 1), crc; + write(fh, &v, 4); + crc = writecrc(fh, "tEXt", 4, ~0); + crc = writecrc(fh, c, strlen(c) + 1, crc); + crc = writecrc(fh, comment, strlen(comment), crc); + v = htonl(~crc); + write(fh, &v, 4); + } + { // tRNS + unsigned char alpha[256]; + int n; + for (n = 0; n < i->C; n++) + // 4th palette byte treated as 0=opaque, 255-transparren + alpha[n] = 255 - (i->Colour[n] >> 24); + if (trans >= 0 && trans < i->C) + // manual set of specific transparrent colour + alpha[trans] = 0; + writechunk(fh, "tRNS", alpha, i->C); + } +#ifndef USEZLIB + { // IDAT + unsigned int v = htonl(i->H * (i->L + 5) + 6), + crc, adler = 1, n; + unsigned char *p = i->Image; + write(fh, &v, 4); + crc = writecrc(fh, "IDAT", 4, ~0); + crc = writecrc(fh, "\170\001", 2, crc); // zlib header for deflate + n = i->H; + while (n--) { + unsigned char h[5]; + h[0] = (n ? 0 : 1); // last chunk in deflate, un compressed + h[1] = (i->L & 255); // Len, LSB first as per deflate spec + h[2] = (i->L / 256); + h[3] = ~(i->L & 255); // Inverse of Len + h[4] = ~(i->L / 256); + *p = 0; // filter 0 (NONE) + crc = writecrc(fh, h, 5, crc); + crc = writecrc(fh, p, i->L, crc); + adler = adlersum(p, i->L, adler); + p += i->L; + } + v = htonl(adler); + crc = writecrc(fh, (void *)&v, 4, crc); + v = htonl(~crc); + write(fh, &v, 4); + } +#else + { // IDAT + unsigned char *temp; + unsigned long n; + for (n = 0; n < i->H; n++) + i->Image[n * i->L] = 0; // filter 0 + n = i->H * i->L * 1001 / 1000 + 12; + temp = malloc(n); + if (compress2(temp, &n, i->Image, i->L * i->H, 9) != Z_OK) + fprintf(stderr, "Deflate error\n"); + else + writechunk(fh, "IDAT", temp, n); + free(temp); + } +#endif + writechunk(fh, "IEND", 0, 0); // IEND +} diff --git a/iec16022-0.2.1/image.h b/iec16022-0.2.1/image.h new file mode 100644 index 00000000..92d6d06e --- /dev/null +++ b/iec16022-0.2.1/image.h @@ -0,0 +1,49 @@ +/** + * + * Image handling tools, (c) AJK 2001-2005 + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef __IMAGE_H +#define __IMAGE_H + +typedef unsigned int Colour; // RGB value + +// Image object +typedef struct { + int W, // width + L, // Line length in Image (W+1) + H; // height + unsigned char *Image; // image array, one byte per pixel + int C; // colours (can be non power of 2, max 256) + Colour *Colour; // colour map (must have entry for each colour) +} Image; + +// macros and functions + +#define ImagePixel(i,x,y) ((i)->Image[1+(i)->L*(y)+(x)]) + +Image *ImageNew(int w, int h, int c); // create a new blank image +void ImageFree(Image * i); // free an image +void ImageWriteGif(Image * i, int fh, int back, int trans, char *comment); +void ImageWritePNG(Image * i, int fh, int back, int trans, char *comment); +void ImageText(Image * i, int x, int y, int c, char *text); // write 8x8 text +void ImageSmall(Image * i, int x, int y, int c, char *text); // write 4x6 text +void ImageRect(Image * i, int x, int y, int w, int h, int c); // fill a box +#define ImageWrite ImageWritePNG // default + +#endif /* __IMAGE_H */ diff --git a/iec16022-0.2.1/reedsol.c b/iec16022-0.2.1/reedsol.c new file mode 100644 index 00000000..a9502412 --- /dev/null +++ b/iec16022-0.2.1/reedsol.c @@ -0,0 +1,172 @@ +/** + * + * This is a simple Reed-Solomon encoder + * (C) Cliff Hones 2004 + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +// It is not written with high efficiency in mind, so is probably +// not suitable for real-time encoding. The aim was to keep it +// simple, general and clear. +// +// + +// Usage: +// First call rs_init_gf(poly) to set up the Galois Field parameters. +// Then call rs_init_code(size, index) to set the encoding size +// Then call rs_encode(datasize, data, out) to encode the data. +// +// These can be called repeatedly as required - but note that +// rs_init_code must be called following any rs_init_gf call. +// +// If the parameters are fixed, some of the statics below can be +// replaced with constants in the obvious way, and additionally +// malloc/free can be avoided by using static arrays of a suitable +// size. + +#include // only needed for debug (main) +#include // only needed for malloc/free + +static int gfpoly; +static int symsize; // in bits +static int logmod; // 2**symsize - 1 +static int rlen; + +static int *log = NULL, *alog = NULL, *rspoly = NULL; + +// rs_init_gf(poly) initialises the parameters for the Galois Field. +// The symbol size is determined from the highest bit set in poly +// This implementation will support sizes up to 30 bits (though that +// will result in very large log/antilog tables) - bit sizes of +// 8 or 4 are typical +// +// The poly is the bit pattern representing the GF characteristic +// polynomial. e.g. for ECC200 (8-bit symbols) the polynomial is +// a**8 + a**5 + a**3 + a**2 + 1, which translates to 0x12d. + +void rs_init_gf(int poly) +{ + int m, b, p, v; + + // Return storage from previous setup + if (log) { + free(log); + free(alog); + free(rspoly); + rspoly = NULL; + } + // Find the top bit, and hence the symbol size + for (b = 1, m = 0; b <= poly; b <<= 1) + m++; + b >>= 1; + m--; + gfpoly = poly; + symsize = m; + + // Calculate the log/alog tables + logmod = (1 << m) - 1; + log = (int *)malloc(sizeof(int) * (logmod + 1)); + alog = (int *)malloc(sizeof(int) * logmod); + + for (p = 1, v = 0; v < logmod; v++) { + alog[v] = p; + log[p] = v; + p <<= 1; + if (p & b) + p ^= poly; + } +} + +// rs_init_code(nsym, index) initialises the Reed-Solomon encoder +// nsym is the number of symbols to be generated (to be appended +// to the input data). index is usually 1 - it is the index of +// the constant in the first term (i) of the RS generator polynomial: +// (x + 2**i)*(x + 2**(i+1))*... [nsym terms] +// For ECC200, index is 1. + +void rs_init_code(int nsym, int index) +{ + int i, k; + + if (rspoly) + free(rspoly); + rspoly = (int *)malloc(sizeof(int) * (nsym + 1)); + + rlen = nsym; + + rspoly[0] = 1; + for (i = 1; i <= nsym; i++) { + rspoly[i] = 1; + for (k = i - 1; k > 0; k--) { + if (rspoly[k]) + rspoly[k] = + alog[(log[rspoly[k]] + index) % logmod]; + rspoly[k] ^= rspoly[k - 1]; + } + rspoly[0] = alog[(log[rspoly[0]] + index) % logmod]; + index++; + } +} + +// Note that the following uses byte arrays, so is only suitable for +// symbol sizes up to 8 bits. Just change the data type of data and res +// to unsigned int * for larger symbols. + +void rs_encode(int len, unsigned char *data, unsigned char *res) +{ + int i, k, m; + for (i = 0; i < rlen; i++) + res[i] = 0; + for (i = 0; i < len; i++) { + m = res[rlen - 1] ^ data[i]; + for (k = rlen - 1; k > 0; k--) { + if (m && rspoly[k]) + res[k] = + res[k - + 1] ^ alog[(log[m] + + log[rspoly[k]]) % logmod]; + else + res[k] = res[k - 1]; + } + if (m && rspoly[0]) + res[0] = alog[(log[m] + log[rspoly[0]]) % logmod]; + else + res[0] = 0; + } +} + +#ifndef LIB +// The following tests the routines with the ISO/IEC 16022 Annexe R data +int main(void) +{ + register int i; + + unsigned char data[9] = { 142, 164, 186 }; + unsigned char out[5]; + + rs_init_gf(0x12d); + rs_init_code(5, 1); + + rs_encode(3, data, out); + + printf("Result of Annexe R encoding:\n"); + for (i = 4; i >= 0; i--) + printf(" %d\n", out[i]); + + return 0; +} +#endif diff --git a/iec16022-0.2.1/reedsol.h b/iec16022-0.2.1/reedsol.h new file mode 100644 index 00000000..0181a8df --- /dev/null +++ b/iec16022-0.2.1/reedsol.h @@ -0,0 +1,29 @@ +/** + * + * This is a simple Reed-Solomon encoder + * (C) Cliff Hones 2004 + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef __REEDSOL_H +#define __REEDSOL_H + +void rs_init_gf(int poly); +void rs_init_code(int nsym, int index); +void rs_encode(int len, unsigned char *data, unsigned char *res); + +#endif /* __REEDSOL_H */ diff --git a/iec16022-0.2.1/test/testsuite-example.bin b/iec16022-0.2.1/test/testsuite-example.bin new file mode 100644 index 00000000..02a4436d --- /dev/null +++ b/iec16022-0.2.1/test/testsuite-example.bin @@ -0,0 +1 @@ +ÿÿÿÿ¿`ïÁ϶mÜ>ýÜÏÃðŠ¼N¯·«9š‚±¤Ë»¾ƒÐ@¨ÄÌEÙù£,Æ<°Ü-öb°:Çw×ɪªªªÿÿÿÿŸÀŽöÊÕï—¦‘¸%kûhŽÔ«-¨Û£0ËQ³kâÛ€Éôå£ÂÍ~„ögëTåགྷ絪ªªª \ No newline at end of file diff --git a/iec16022-0.2.1/test/testsuite-example.eps b/iec16022-0.2.1/test/testsuite-example.eps new file mode 100644 index 00000000..9f97c228 --- /dev/null +++ b/iec16022-0.2.1/test/testsuite-example.eps @@ -0,0 +1,15 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: IEC16022 barcode/stamp generator +%%BarcodeData: Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o +%%BarcodeSize: 32x32 +%%BarcodeFormat: ECC200 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Pages: 1 +%%BoundingBox: 0 0 34 34 +%%EndComments +%%Page: 1 1 +32 32 1[1 0 0 1 -1 -1]{< +00000000 409F10E5 3E304992 23C102F9 23E0303C 0F7543B1 504854C6 657D4E5B 3444417C 2FBF573B 33BA2606 5CD339C3 4FE823D2 099D4FC5 38882836 55555555 +00000000 603F7109 352A10F0 68596EFB 47DA7094 0497712B 54D257E4 24ED5CCF 34AE4C94 1DE524E1 7F360B1A 5C3D3281 7BE60998 14AB1A1F 427C184A 55555555 +>}image diff --git a/iec16022-0.2.1/test/testsuite-example.hex b/iec16022-0.2.1/test/testsuite-example.hex new file mode 100644 index 00000000..874101c1 --- /dev/null +++ b/iec16022-0.2.1/test/testsuite-example.hex @@ -0,0 +1,2 @@ +FFFFFFFF BF60EF1A C1CFB66D DC3EFD06 DC1FCFC3 F08ABC4E AFB7AB39 9A82B1A4 CBBBBE83 D040A8C4 CC45D9F9 A32CC63C B017DC2D F662B03A C777D7C9 AAAAAAAA +FFFFFFFF 9FC08EF6 CAD5EF0F 97A69104 B8258F6B FB688ED4 AB2DA81B DB12A330 CB51B36B E21ADB1E 80C9F4E5 A3C2CD7E 8419F667 EB54E5E0 BD83E7B5 AAAAAAAA diff --git a/iec16022-0.2.1/test/testsuite-example.png b/iec16022-0.2.1/test/testsuite-example.png new file mode 100644 index 00000000..050d1f0e Binary files /dev/null and b/iec16022-0.2.1/test/testsuite-example.png differ diff --git a/iec16022-0.2.1/test/testsuite-example.text b/iec16022-0.2.1/test/testsuite-example.text new file mode 100644 index 00000000..097a7d1c --- /dev/null +++ b/iec16022-0.2.1/test/testsuite-example.text @@ -0,0 +1,32 @@ +* * * * * * * * * * * * * * * * +* **** ** ***** **** ** * * +*** * ** * * * *** * **** +* * ** ***** ** ** *** +* * **** * ** ** * ****** +* ** * ***** * *** * * +*** * ** * ** ** ** **** +** * ** * * ** ** ** ** * ** +** ** ** * * * * ** ** +* * * ** * ** ** * * ** ** +***** ** ** * * *** ** * * +* *** * * ** **** ** * ** +* * **** * ** * * * * +** * * ** * * **** **** **** +* ******* * *** **** ** +******************************** +* * * * * * * * * * * * * * * * +** *** *** ***** * ***** * * +**** ** ** * * ** *** * +* ** * ***** *** * ** * +* * ** * ** ** ** **** +** ** * * *** ** ****** * +** * * * * * ** * +** * *** *** *** ***** * ** +* ** * * * * ** ** * * +* * ***** ** **** * * ** *** * +**** * * * * **** * *** +** *** ******* ****** ** +** *** ***** ****** * ** +** *** ***** ** ** ** ** * +* ****** ** *** **** ** * +******************************** diff --git a/iec16022-0.2.1/test/testsuite.sh b/iec16022-0.2.1/test/testsuite.sh new file mode 100755 index 00000000..82a100af --- /dev/null +++ b/iec16022-0.2.1/test/testsuite.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +FAILED=0 + +../iec16022 -o testsuite-test.text -f Text -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" +../iec16022 -o testsuite-test.eps -f EPS -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" +../iec16022 -o testsuite-test.png -f PNG -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" +../iec16022 -o testsuite-test.bin -f Bin -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" +../iec16022 -o testsuite-test.hex -f Hex -c "Aolash3l dee6Ieke OhBohm1C MengaR9m zaHaoQu2 huW3Uer8 ieg7chaJ haiKua1o" + +diff -b testsuite-test.text testsuite-example.text && echo "Text test passed" || echo "Text test FAILED" || FAILED=1 +diff -b testsuite-test.eps testsuite-example.eps && echo "EPS test passed" || echo "EPS test FAILED" || FAILED=1 +diff -b testsuite-test.png testsuite-example.png && echo "PNG test passed" || echo "PNG test FAILED" || FAILED=1 +diff -b testsuite-test.bin testsuite-example.bin && echo "Bin test passed" || echo "Bin test FAILED" || FAILED=1 +diff -b testsuite-test.hex testsuite-example.hex && echo "Hex test passed" || echo "Hex test FAILED" || FAILED=1 + +rm testsuite-test.* + +exit $FAILED diff --git a/libglabels/Makefile.am b/libglabels/Makefile.am new file mode 100644 index 00000000..2d1228ab --- /dev/null +++ b/libglabels/Makefile.am @@ -0,0 +1,58 @@ +templatesdir = $(datadir)/glabels/templates + +INCLUDES = \ + $(LIBGLABELS_CFLAGS) \ + -DDATADIR=\""$(datadir)"\" \ + -DLIBGLABELS_TEMPLATE_DIR=\""$(templatesdir)"\" \ + $(DISABLE_DEPRECATED_CFLAGS) + +libglabels_la_LDFLAGS=\ + -version-info $(LIBGLABELS_VERSION_INFO) \ + $(LIBGLABELS_LIBS) \ + -no-undefined + +lib_LTLIBRARIES = libglabels.la + +libglabelsincludedir=$(includedir)/libglabels + +libglabels_la_SOURCES = \ + libglabels-private.h \ + db.h \ + db.c \ + enums.h \ + paper.h \ + paper.c \ + category.h \ + category.c \ + template.h \ + template.c \ + xml-paper.h \ + xml-paper.c \ + xml-category.h \ + xml-category.c \ + xml-template.h \ + xml-template.c \ + xml.h \ + xml.c \ + str.h \ + str.c + +libglabelsinclude_HEADERS = \ + libglabels.h \ + db.h \ + enums.h \ + paper.h \ + category.h \ + template.h \ + xml-paper.h \ + xml-category.h \ + xml-template.h \ + xml.h \ + str.h + +EXTRA_DIST = \ + libglabels.pc.in + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libglabels.pc + diff --git a/libglabels/category.c b/libglabels/category.c new file mode 100644 index 00000000..f7f4052c --- /dev/null +++ b/libglabels/category.c @@ -0,0 +1,132 @@ +/* + * category.c + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#include + +#include "category.h" + +#include +#include +#include + +#include "libglabels-private.h" + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + + +/*===========================================*/ +/* Functions. */ +/*===========================================*/ + +/** + * lgl_category_new: + * @id: Id of category definition. (E.g. label, card, etc.) Should be + * unique. + * @name: Localized name of category. + * + * Allocates and constructs a new #lglCategory structure. + * + * Returns: a pointer to a newly allocated #lglCategory structure. + * + */ +lglCategory * +lgl_category_new (gchar *id, + gchar *name) +{ + lglCategory *category; + + category = g_new0 (lglCategory,1); + category->id = g_strdup (id); + category->name = g_strdup (name); + + return category; +} + + +/** + * lgl_category_dup: + * @orig: #lglCategory structure to be duplicated. + * + * Duplicates an existing #lglCategory structure. + * + * Returns: a pointer to a newly allocated #lglCategory structure. + * + */ +lglCategory *lgl_category_dup (const lglCategory *orig) +{ + lglCategory *category; + + g_return_val_if_fail (orig, NULL); + + category = g_new0 (lglCategory,1); + + category->id = g_strdup (orig->id); + category->name = g_strdup (orig->name); + + return category; +} + + +/** + * lgl_category_free: + * @category: pointer to #lglCategory structure to be freed. + * + * Free all memory associated with an existing #lglCategory structure. + * + */ +void lgl_category_free (lglCategory *category) +{ + + if ( category != NULL ) { + + g_free (category->id); + category->id = NULL; + + g_free (category->name); + category->name = NULL; + + g_free (category); + } + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/category.h b/libglabels/category.h new file mode 100644 index 00000000..3c19bf2e --- /dev/null +++ b/libglabels/category.h @@ -0,0 +1,62 @@ +/* + * category.h + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __CATEGORY_H__ +#define __CATEGORY_H__ + +#include + +G_BEGIN_DECLS + +/* + * Template class + */ +typedef struct _lglCategory lglCategory; + +struct _lglCategory { + gchar *id; /* Unique ID of category */ + gchar *name; /* Localized name of category */ +}; + + +/* + * Category construction + */ +lglCategory *lgl_category_new (gchar *id, + gchar *name); + +lglCategory *lgl_category_dup (const lglCategory *orig); +void lgl_category_free (lglCategory *category); + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/db.c b/libglabels/db.c new file mode 100644 index 00000000..4a582e8d --- /dev/null +++ b/libglabels/db.c @@ -0,0 +1,1614 @@ +/* + * db.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#include + +#include "db.h" + +#include +#include +#include +#include +#include + +#include "libglabels-private.h" + +#include "xml-paper.h" +#include "xml-category.h" +#include "xml-template.h" + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +static GList *papers = NULL; +static GList *categories = NULL; +static GList *templates = NULL; + +static GHashTable *template_cache = NULL; + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void init_template_cache (void); +static void add_to_template_cache (lglTemplate *template); + +static GList *read_papers (void); +static GList *read_paper_files_from_dir (GList *papers, + const gchar *dirname); + +static GList *read_categories (void); +static GList *read_category_files_from_dir (GList *categories, + const gchar *dirname); + +static GList *read_templates (void); +static GList *read_template_files_from_dir (GList *templates, + const gchar *dirname); + +static lglTemplate *template_full_page (const gchar *page_size); + + +/*===========================================*/ +/* Module initialization */ +/*===========================================*/ + +/** + * lgl_db_init: + * + * Initialize all libglabels subsystems. It is not necessary for an application to call + * lgl_db_init(), because libglabels will initialize on demand. An application programmer may + * choose to call lgl_db_init() at startup to minimize the impact of the first libglabels call + * on GUI response time. + * + * This function initializes its paper definitions, category definitions, and its template + * database.. It will search both system and user template directories to locate + * this data. + */ +void +lgl_db_init (void) +{ + lglPaper *paper_other; + lglCategory *category_user_defined; + GList *page_sizes; + GList *p; + + /* + * Paper definitions + */ + if (!papers) + { + + papers = read_papers (); + + /* Create and append an "Other" entry. */ + paper_other = lgl_paper_new ("Other", _("Other"), 0.0, 0.0, NULL); + papers = g_list_append (papers, paper_other); + + } + + /* + * Categories + */ + if (!categories) + { + categories = read_categories (); + + /* Create and append a "User defined" entry. */ + category_user_defined = lgl_category_new ("user-defined", _("User defined")); + categories = g_list_append (categories, category_user_defined); + } + + /* + * Templates + */ + if (!templates) + { + + templates = read_templates (); + + /* Create and append generic full page templates. */ + page_sizes = lgl_db_get_paper_id_list (); + for ( p=page_sizes; p != NULL; p=p->next ) + { + if ( !lgl_db_is_paper_id_other (p->data) ) + { + templates = g_list_append (templates, + template_full_page (p->data)); + } + } + lgl_db_free_paper_id_list (page_sizes); + + init_template_cache (); + } +} + + +/*===========================================*/ +/* Paper db functions. */ +/*===========================================*/ + +/** + * lgl_db_get_paper_id_list: + * + * Get a list of all paper ids known to libglabels. + * + * Returns: a list of paper ids. + * + */ +GList * +lgl_db_get_paper_id_list (void) +{ + GList *ids = NULL; + GList *p; + lglPaper *paper; + + if (!papers) + { + lgl_db_init (); + } + + for ( p=papers; p != NULL; p=p->next ) + { + paper = (lglPaper *)p->data; + ids = g_list_append (ids, g_strdup (paper->id)); + } + + return ids; +} + + +/** + * lgl_db_free_paper_id_list: + * @ids: List of id strings to be freed. + * + * Free up all storage associated with an id list obtained with + * lgl_db_get_paper_id_list(). + * + */ +void +lgl_db_free_paper_id_list (GList *ids) +{ + GList *p; + + for (p = ids; p != NULL; p = p->next) + { + g_free (p->data); + p->data = NULL; + } + + g_list_free (ids); +} + + +/** + * lgl_db_get_paper_name_list: + * + * Get a list of all localized paper names known to libglabels. + * + * Returns: a list of localized paper names. + * + */ +GList * +lgl_db_get_paper_name_list (void) +{ + GList *names = NULL; + GList *p; + lglPaper *paper; + + if (!papers) + { + lgl_db_init (); + } + + for ( p=papers; p != NULL; p=p->next ) + { + paper = (lglPaper *)p->data; + names = g_list_append (names, g_strdup (paper->name)); + } + + return names; +} + + +/** + * lgl_db_free_paper_name_list: + * @names: List of localized paper name strings to be freed. + * + * Free up all storage associated with a name list obtained with + * lgl_db_get_paper_name_list(). + * + */ +void +lgl_db_free_paper_name_list (GList *names) +{ + GList *p; + + for (p = names; p != NULL; p = p->next) + { + g_free (p->data); + p->data = NULL; + } + + g_list_free (names); +} + + +/** + * lgl_db_lookup_paper_from_name: + * @name: localized paper name string + * + * Lookup paper definition from localized paper name string. + * + * Returns: pointer to a newly allocated #lglPaper structure. + * + */ +lglPaper * +lgl_db_lookup_paper_from_name (const gchar *name) +{ + GList *p; + lglPaper *paper; + + if (!papers) + { + lgl_db_init (); + } + + if (name == NULL) + { + /* If no name, return first paper as a default */ + return lgl_paper_dup ((lglPaper *) papers->data); + } + + for (p = papers; p != NULL; p = p->next) + { + paper = (lglPaper *) p->data; + if (UTF8_EQUAL (paper->name, name)) + { + return lgl_paper_dup (paper); + } + } + + return NULL; +} + + +/** + * lgl_db_lookup_paper_from_id: + * @id: paper id string + * + * Lookup paper definition from id string. + * + * Returns: pointer to a newly allocated #lglPaper structure. + * + */ +lglPaper * +lgl_db_lookup_paper_from_id (const gchar *id) +{ + GList *p; + lglPaper *paper; + + if (!papers) + { + lgl_db_init (); + } + + if (id == NULL) + { + /* If no id, return first paper as a default */ + return lgl_paper_dup ((lglPaper *) papers->data); + } + + for (p = papers; p != NULL; p = p->next) + { + paper = (lglPaper *) p->data; + if (ASCII_EQUAL (paper->id, id)) + { + return lgl_paper_dup (paper); + } + } + + return NULL; +} + + +/** + * lgl_db_lookup_paper_id_from_name: + * @name: localized paper name stringp + * + * Lookup paper name string from localized paper name string. + * + * Returns: pointer to a newly allocated id string. + * + */ +gchar * +lgl_db_lookup_paper_id_from_name (const gchar *name) +{ + lglPaper *paper = NULL; + gchar *id = NULL; + + if (name != NULL) + { + paper = lgl_db_lookup_paper_from_name (name); + if ( paper != NULL ) + { + id = g_strdup (paper->id); + lgl_paper_free (paper); + paper = NULL; + } + } + + return id; +} + + +/** + * lgl_db_lookup_paper_name_from_id: + * @id: paper id string + * + * Lookup localized paper name string from paper id string. + * + * Returns: pointer to a newly allocated localized paper name string. + * + */ +gchar * +lgl_db_lookup_paper_name_from_id (const gchar *id) +{ + lglPaper *paper = NULL; + gchar *name = NULL; + + if (id != NULL) + { + paper = lgl_db_lookup_paper_from_id (id); + if ( paper != NULL ) + { + name = g_strdup (paper->name); + lgl_paper_free (paper); + paper = NULL; + } + } + + return name; +} + + +/** + * lgl_db_is_paper_id_known: + * @id: paper id to test + * + * Determine if given paper id is known to libglabels. + * + * Returns: TRUE if id is known, otherwise FALSE. + * + */ +gboolean +lgl_db_is_paper_id_known (const gchar *id) +{ + GList *p; + lglPaper *paper; + + if (!papers) + { + lgl_db_init (); + } + + if (id == NULL) + { + return FALSE; + } + + for (p = papers; p != NULL; p = p->next) + { + paper = (lglPaper *) p->data; + if (ASCII_EQUAL (paper->id, id)) + { + return TRUE; + } + } + + return FALSE; +} + + +/** + * lgl_db_is_paper_id_other: + * @id: paper id to test + * + * Determine if given paper id is the special id "Other." + * + * Returns: TRUE if id is "Other", otherwise FALSE. + * + */ +gboolean +lgl_db_is_paper_id_other (const gchar *id) +{ + if (id == NULL) + { + return FALSE; + } + + return (ASCII_EQUAL (id, "Other")); +} + + +static GList * +read_papers (void) +{ + gchar *data_dir; + GList *papers = NULL; + + data_dir = LGL_SYSTEM_DATA_DIR; + papers = read_paper_files_from_dir (papers, data_dir); + g_free (data_dir); + + data_dir = LGL_USER_DATA_DIR; + papers = read_paper_files_from_dir (papers, data_dir); + g_free (data_dir); + + if (papers == NULL) { + g_critical (_("Unable to locate paper size definitions. Libglabels may not be installed correctly!")); + } + + return papers; +} + + +static GList * +read_paper_files_from_dir (GList *papers, + const gchar *dirname) +{ + GDir *dp; + const gchar *filename, *extension; + gchar *full_filename = NULL; + GError *gerror = NULL; + GList *new_papers = NULL; + + if (dirname == NULL) { + return papers; + } + + if (!g_file_test (dirname, G_FILE_TEST_EXISTS)) { + return papers; + } + + dp = g_dir_open (dirname, 0, &gerror); + if (gerror != NULL) { + g_message ("cannot open data directory: %s", gerror->message ); + return papers; + } + + while ((filename = g_dir_read_name (dp)) != NULL) { + + extension = strrchr (filename, '.'); + + if (extension != NULL) { + + if ( ASCII_EQUAL (extension, ".paper") || + ASCII_EQUAL (filename, "paper-sizes.xml") ) + { + + full_filename = + g_build_filename (dirname, filename, NULL); + new_papers = + lgl_xml_paper_read_papers_from_file (full_filename); + g_free (full_filename); + + papers = g_list_concat (papers, new_papers); + new_papers = NULL; + + } + + } + + } + + g_dir_close (dp); + + return papers; +} + + +/** + * lgl_db_print_known_papers: + * + * For debugging purposes: print a list of all paper definitions known to + * libglabels. + * + */ +void +lgl_db_print_known_papers (void) +{ + GList *p; + lglPaper *paper; + + if (!papers) { + lgl_db_init (); + } + + g_print ("%s():\n", __FUNCTION__); + for (p = papers; p != NULL; p = p->next) { + paper = (lglPaper *) p->data; + + g_print ("PAPER id=\"%s\", name=\"%s\", width=%gpts, height=%gpts\n", + paper->id, paper->name, paper->width, paper->height); + + } + g_print ("\n"); + +} + + +/*===========================================*/ +/* Category db functions. */ +/*===========================================*/ + +/** + * lgl_db_get_category_id_list: + * + * Get a list of all category ids known to libglabels. + * + * Returns: a list of category ids. + * + */ +GList * +lgl_db_get_category_id_list (void) +{ + GList *ids = NULL; + GList *p; + lglCategory *category; + + if (!categories) + { + lgl_db_init (); + } + + for ( p=categories; p != NULL; p=p->next ) + { + category = (lglCategory *)p->data; + ids = g_list_append (ids, g_strdup (category->id)); + } + + return ids; +} + + +/** + * lgl_db_free_category_id_list: + * @ids: List of id strings to be freed. + * + * Free up all storage associated with an id list obtained with + * lgl_db_get_category_id_list(). + * + */ +void +lgl_db_free_category_id_list (GList *ids) +{ + GList *p; + + for (p = ids; p != NULL; p = p->next) + { + g_free (p->data); + p->data = NULL; + } + + g_list_free (ids); +} + + +/** + * lgl_db_get_category_name_list: + * + * Get a list of all localized category names known to libglabels. + * + * Returns: a list of localized category names. + * + */ +GList * +lgl_db_get_category_name_list (void) +{ + GList *names = NULL; + GList *p; + lglCategory *category; + + if (!categories) + { + lgl_db_init (); + } + + for ( p=categories; p != NULL; p=p->next ) + { + category = (lglCategory *)p->data; + names = g_list_append (names, g_strdup (category->name)); + } + + return names; +} + + +/** + * lgl_db_free_category_name_list: + * @names: List of localized category name strings to be freed. + * + * Free up all storage associated with a name list obtained with + * lgl_db_get_category_name_list(). + * + */ +void +lgl_db_free_category_name_list (GList *names) +{ + GList *p; + + for (p = names; p != NULL; p = p->next) + { + g_free (p->data); + p->data = NULL; + } + + g_list_free (names); +} + + +/** + * lgl_db_lookup_category_from_name: + * @name: localized category name string + * + * Lookup category definition from localized category name string. + * + * Returns: pointer to a newly allocated #lglCategory structure. + * + */ +lglCategory * +lgl_db_lookup_category_from_name (const gchar *name) +{ + GList *p; + lglCategory *category; + + if (!categories) + { + lgl_db_init (); + } + + if (name == NULL) + { + /* If no name, return first category as a default */ + return lgl_category_dup ((lglCategory *) categories->data); + } + + for (p = categories; p != NULL; p = p->next) + { + category = (lglCategory *) p->data; + if (UTF8_EQUAL (category->name, name)) + { + return lgl_category_dup (category); + } + } + + return NULL; +} + + +/** + * lgl_db_lookup_category_from_id: + * @id: category id string + * + * Lookup category definition from id string. + * + * Returns: pointer to a newly allocated #lglCategory structure. + * + */ +lglCategory * +lgl_db_lookup_category_from_id (const gchar *id) +{ + GList *p; + lglCategory *category; + + if (!categories) + { + lgl_db_init (); + } + + if (id == NULL) + { + /* If no id, return first category as a default */ + return lgl_category_dup ((lglCategory *) categories->data); + } + + for (p = categories; p != NULL; p = p->next) + { + category = (lglCategory *) p->data; + if (ASCII_EQUAL (category->id, id)) + { + return lgl_category_dup (category); + } + } + + return NULL; +} + + +/** + * lgl_db_lookup_category_id_from_name: + * @name: localized category name stringp + * + * Lookup category name string from localized category name string. + * + * Returns: pointer to a newly allocated id string. + * + */ +gchar * +lgl_db_lookup_category_id_from_name (const gchar *name) +{ + lglCategory *category = NULL; + gchar *id = NULL; + + if (name != NULL) + { + category = lgl_db_lookup_category_from_name (name); + if ( category != NULL ) + { + id = g_strdup (category->id); + lgl_category_free (category); + category = NULL; + } + } + + return id; +} + + +/** + * lgl_db_lookup_category_name_from_id: + * @id: category id string + * + * Lookup localized category name string from category id string. + * + * Returns: pointer to a newly allocated localized category name string. + * + */ +gchar * +lgl_db_lookup_category_name_from_id (const gchar *id) +{ + lglCategory *category = NULL; + gchar *name = NULL; + + if (id != NULL) + { + category = lgl_db_lookup_category_from_id (id); + if ( category != NULL ) + { + name = g_strdup (category->name); + lgl_category_free (category); + category = NULL; + } + } + + return name; +} + + +/** + * lgl_db_is_category_id_known: + * @id: category id to test + * + * Determine if given category id is known to libglabels. + * + * Returns: TRUE if id is known, otherwise FALSE. + * + */ +gboolean +lgl_db_is_category_id_known (const gchar *id) +{ + GList *p; + lglCategory *category; + + if (!categories) + { + lgl_db_init (); + } + + if (id == NULL) + { + return FALSE; + } + + for (p = categories; p != NULL; p = p->next) + { + category = (lglCategory *) p->data; + if (ASCII_EQUAL (category->id, id)) + { + return TRUE; + } + } + + return FALSE; +} + + +static GList * +read_categories (void) +{ + gchar *data_dir; + GList *categories = NULL; + + data_dir = LGL_SYSTEM_DATA_DIR; + categories = read_category_files_from_dir (categories, data_dir); + g_free (data_dir); + + data_dir = LGL_USER_DATA_DIR; + categories = read_category_files_from_dir (categories, data_dir); + g_free (data_dir); + + if (categories == NULL) { + g_critical (_("Unable to locate category definitions. Libglabels may not be installed correctly!")); + } + + return categories; +} + + +static GList * +read_category_files_from_dir (GList *categories, + const gchar *dirname) +{ + GDir *dp; + const gchar *filename, *extension; + gchar *full_filename = NULL; + GError *gerror = NULL; + GList *new_categories = NULL; + + if (dirname == NULL) { + return categories; + } + + if (!g_file_test (dirname, G_FILE_TEST_EXISTS)) { + return categories; + } + + dp = g_dir_open (dirname, 0, &gerror); + if (gerror != NULL) { + g_message ("cannot open data directory: %s", gerror->message ); + return categories; + } + + while ((filename = g_dir_read_name (dp)) != NULL) { + + extension = strrchr (filename, '.'); + + if (extension != NULL) { + + if ( ASCII_EQUAL (extension, ".category") || + ASCII_EQUAL (filename, "categories.xml") ) + { + + full_filename = + g_build_filename (dirname, filename, NULL); + new_categories = + lgl_xml_category_read_categories_from_file (full_filename); + g_free (full_filename); + + categories = g_list_concat (categories, new_categories); + new_categories = NULL; + + } + + } + + } + + g_dir_close (dp); + + return categories; +} + + +/** + * lgl_db_print_known_categories: + * + * For debugging purposes: print a list of all category definitions known to + * libglabels. + * + */ +void +lgl_db_print_known_categories (void) +{ + GList *p; + lglCategory *category; + + if (!categories) { + lgl_db_init (); + } + + g_print ("%s():\n", __FUNCTION__); + for (p = categories; p != NULL; p = p->next) { + category = (lglCategory *) p->data; + + g_print ("CATEGORY id=\"%s\", name=\"%s\"\n", category->id, category->name); + + } + g_print ("\n"); + +} + + +/*===========================================*/ +/* Brand db functions. */ +/*===========================================*/ + +/** + * lgl_db_get_brand_list: + * @paper_id: If non NULL, limit results to given page size. + * @category_id: If non NULL, limit results to given template category. + * + * Get a list of all valid brands of templates in the template database. + * Results can be filtered by page size and/or template category. A list of valid page + * sizes can be obtained using lgl_db_get_paper_id_list(). A list of valid template + * categories can be obtained using lgl_db_get_category_id_list(). + * + * Returns: a list of brands + */ +GList * +lgl_db_get_brand_list (const gchar *paper_id, + const gchar *category_id) +{ + GList *p_tmplt, *p_alias; + lglTemplate *template; + lglTemplateAlias *alias; + GList *brands = NULL; + + if (!templates) + { + lgl_db_init (); + } + + for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) + { + template = (lglTemplate *) p_tmplt->data; + if (lgl_template_does_page_size_match (template, paper_id) && + lgl_template_does_category_match (template, category_id)) + { + for (p_alias = template->aliases; p_alias != NULL; + p_alias = p_alias->next) + { + alias = (lglTemplateAlias *)p_alias->data; + + if ( !g_list_find_custom (brands, alias->brand, + (GCompareFunc)lgl_str_utf8_casecmp) ) + { + brands = g_list_insert_sorted (brands, + g_strdup (alias->brand), + (GCompareFunc)lgl_str_utf8_casecmp); + } + } + } + } + + return brands; +} + + +/** + * lgl_db_free_brand_list: + * @brands: List of template brand strings to be freed. + * + * Free up all storage associated with a list of template names obtained with + * lgl_db_get_brand_list(). + * + */ +void +lgl_db_free_brand_list (GList *brands) +{ + GList *p_brand; + + for (p_brand = brands; p_brand != NULL; p_brand = p_brand->next) + { + g_free (p_brand->data); + p_brand->data = NULL; + } + + g_list_free (brands); +} + + +/*===========================================*/ +/* Template db functions. */ +/*===========================================*/ + +/** + * lgl_db_register_template: + * @template: Pointer to a template structure to add to database. + * + * Register a template. This function adds a template to the template database. + * The template will be stored in an individual XML file in the user template directory. + * + * Returns: Status of registration attempt (#lglDbRegStatus) + */ +lglDbRegStatus +lgl_db_register_template (const lglTemplate *template) +{ + lglTemplate *template_copy; + gchar *dir, *filename, *abs_filename; + gint bytes_written; + + if (!templates) + { + lgl_db_init (); + } + + if (lgl_db_does_template_exist (template->brand, template->part)) + { + return LGL_DB_REG_BRAND_PART_EXISTS; + } + + if (lgl_db_is_paper_id_known (template->paper_id)) + { + dir = LGL_USER_DATA_DIR; + mkdir (dir, 0775); /* Try to make sure directory exists. */ + filename = g_strdup_printf ("%s_%s.template", template->brand, template->part); + abs_filename = g_build_filename (dir, filename, NULL); + bytes_written = lgl_xml_template_write_template_to_file (template, abs_filename); + g_free (dir); + g_free (filename); + g_free (abs_filename); + + if (bytes_written > 0) + { + template_copy = lgl_template_dup (template); + lgl_template_add_category (template_copy, "user-defined"); + templates = g_list_append (templates, template_copy); + add_to_template_cache (template_copy); + return LGL_DB_REG_OK; + } + else + { + return LGL_DB_REG_FILE_WRITE_ERROR; + } + } + else + { + g_message ("Cannot register new template with unknown page size."); + return LGL_DB_REG_BAD_PAPER_ID; + } + +} + + +/** + * lgl_db_does_template_exist: + * @brand: Brand name. + * @part: Part name/number. + * + * This function tests whether a template with the given brand and part name/number exists. + * + * Returns: TRUE if such a template exists in the database. + */ +gboolean +lgl_db_does_template_exist (const gchar *brand, + const gchar *part) +{ + GList *p_tmplt, *p_alias; + lglTemplate *template; + lglTemplateAlias *alias; + + if (!templates) + { + lgl_db_init (); + } + + if ((brand == NULL) || (part == NULL)) + { + return FALSE; + } + + for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) + { + template = (lglTemplate *) p_tmplt->data; + for (p_alias = template->aliases; p_alias != NULL; p_alias = p_alias->next) + { + alias = (lglTemplateAlias *)p_alias->data; + + if ( UTF8_EQUAL (brand, alias->brand) && + UTF8_EQUAL (part, alias->part) ) + { + return TRUE; + } + } + } + + return FALSE; +} + + +/** + * lgl_db_does_template_name_exist: + * @name: name string + * + * This function test whether a template with the given name exists. + * + * Returns: TRUE if such a template exists in the database. + * + */ +gboolean +lgl_db_does_template_name_exist (const gchar *name) +{ + GList *p_tmplt, *p_alias; + lglTemplate *template; + lglTemplateAlias *alias; + gchar *candidate_name; + + if (!templates) + { + lgl_db_init (); + } + + if (name == NULL) + { + return FALSE; + } + + for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) + { + template = (lglTemplate *) p_tmplt->data; + for (p_alias = template->aliases; p_alias != NULL; p_alias = p_alias->next) + { + alias = (lglTemplateAlias *)p_alias->data; + candidate_name = g_strdup_printf ("%s %s", alias->brand, alias->part); + + if ( UTF8_EQUAL (candidate_name, name) ) { + g_free (candidate_name); + return TRUE; + } + g_free (candidate_name); + } + } + + return FALSE; +} + + +/** + * lgl_db_get_template_name_list_unique: + * @brand: If non NULL, limit results to given brand + * @paper_id: If non NULL, limit results to given page size. + * @category_id: If non NULL, limit results to given template category. + * + * Get a list of valid names of unique templates in the template database. Results + * can be filtered by page size and/or template category. A list of valid page sizes + * can be obtained using lgl_db_get_paper_id_list(). A list of valid template categories + * can be obtained using lgl_db_get_category_id_list(). + * + * This function differs from lgl_db_get_template_name_list_all(), because it does not + * return multiple names for the same template. + * + * Returns: a list of template names. + */ +GList * +lgl_db_get_template_name_list_unique (const gchar *brand, + const gchar *paper_id, + const gchar *category_id) +{ + GList *p_tmplt; + lglTemplate *template; + gchar *name; + GList *names = NULL; + + if (!templates) + { + lgl_db_init (); + } + + for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) + { + template = (lglTemplate *) p_tmplt->data; + + if (lgl_template_does_brand_match (template, brand) && + lgl_template_does_page_size_match (template, paper_id) && + lgl_template_does_category_match (template, category_id)) + { + name = g_strdup_printf ("%s %s", template->brand, template->part); + names = g_list_insert_sorted (names, name, + (GCompareFunc)g_utf8_collate); + } + } + + return names; +} + + +/** + * lgl_db_get_template_name_list_all: + * @brand: If non NULL, limit results to given brand + * @paper_id: If non NULL, limit results to given page size. + * @category_id: If non NULL, limit results to given template category. + * + * Get a list of all valid names and aliases of templates in the template database. + * Results can be filtered by page size and/or template category. A list of valid page + * sizes can be obtained using lgl_db_get_paper_id_list(). A list of valid template + * categories can be obtained using lgl_db_get_category_id_list(). + * + * This function differs from lgl_db_get_template_name_list_unique(), because it will + * return multiple names for the same template. + * + * Returns: a list of template names and aliases. + */ +GList * +lgl_db_get_template_name_list_all (const gchar *brand, + const gchar *paper_id, + const gchar *category_id) +{ + GList *p_tmplt, *p_alias; + lglTemplate *template; + lglTemplateAlias *alias; + gchar *name; + GList *names = NULL; + + if (!templates) + { + lgl_db_init (); + } + + for (p_tmplt = templates; p_tmplt != NULL; p_tmplt = p_tmplt->next) + { + template = (lglTemplate *) p_tmplt->data; + if (lgl_template_does_page_size_match (template, paper_id) && + lgl_template_does_category_match (template, category_id)) + { + for (p_alias = template->aliases; p_alias != NULL; + p_alias = p_alias->next) + { + alias = (lglTemplateAlias *)p_alias->data; + + if ( !brand || UTF8_EQUAL( alias->brand, brand) ) + { + name = g_strdup_printf ("%s %s", alias->brand, alias->part); + names = g_list_insert_sorted (names, name, + (GCompareFunc)g_utf8_collate); + } + } + } + } + + return names; +} + + +/** + * lgl_db_free_template_name_list: + * @names: List of template name strings to be freed. + * + * Free up all storage associated with a list of template names obtained with + * lgl_db_get_template_name_list_all() or lgl_db_get_template_name_list_unique(). + * + */ +void +lgl_db_free_template_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); +} + + +/** + * lgl_db_lookup_template_from_name: + * @name: name string + * + * Lookup template in template database from name string. + * + * Returns: pointer to a newly allocated #lglTemplate structure. + * + */ +lglTemplate * +lgl_db_lookup_template_from_name (const gchar *name) +{ + GList *p_alias; + lglTemplate *template; + lglTemplateAlias *alias; + gchar *candidate_name; + lglTemplate *new_template; + + if (!templates) + { + lgl_db_init (); + } + + if (name == NULL) + { + /* If no name, return first template as a default */ + return lgl_template_dup ((lglTemplate *) templates->data); + } + + template = g_hash_table_lookup (template_cache, name); + + if (template) + { + for (p_alias = template->aliases; p_alias != NULL; p_alias = p_alias->next) + { + alias = (lglTemplateAlias *)p_alias->data; + candidate_name = g_strdup_printf ("%s %s", alias->brand, alias->part); + + if ( UTF8_EQUAL (candidate_name, name) ) + { + g_free (candidate_name); + new_template = lgl_template_dup (template); + g_free (new_template->brand); + new_template->brand = g_strdup (alias->brand); + g_free (new_template->part); + new_template->part = g_strdup (alias->part); + return new_template; + } + + g_free (candidate_name); + } + } + + /* No matching template has been found so return the first template */ + return lgl_template_dup ((lglTemplate *) templates->data); +} + + +static void +init_template_cache (void) +{ + GList *p_tmplt, *p_alias; + lglTemplate *template; + lglTemplateAlias *alias; + gchar *name; + + template_cache = g_hash_table_new (g_str_hash, g_str_equal); + + for ( p_tmplt=templates; p_tmplt != NULL; p_tmplt=p_tmplt->next ) + { + template = (lglTemplate *) p_tmplt->data; + + for ( p_alias=template->aliases; p_alias != NULL; p_alias=p_alias->next ) + { + alias = (lglTemplateAlias *)p_alias->data; + name = g_strdup_printf ("%s %s", alias->brand, alias->part); + + g_hash_table_insert (template_cache, name, template); + } + } +} + + +static void +add_to_template_cache (lglTemplate *template) +{ + GList *p_alias; + lglTemplateAlias *alias; + gchar *name; + + for ( p_alias=template->aliases; p_alias != NULL; p_alias=p_alias->next ) + { + alias = (lglTemplateAlias *)p_alias->data; + name = g_strdup_printf ("%s %s", alias->brand, alias->part); + + g_hash_table_insert (template_cache, name, template); + } +} + + +static GList * +read_templates (void) +{ + gchar *data_dir; + GList *templates = NULL; + GList *p; + lglTemplate *template; + + /* + * User defined templates. Add to user-defined category. + */ + data_dir = LGL_USER_DATA_DIR; + templates = read_template_files_from_dir (templates, data_dir); + g_free (data_dir); + for ( p=templates; p != NULL; p=p->next ) + { + template = (lglTemplate *)p->data; + lgl_template_add_category (template, "user-defined"); + } + + /* + * System templates. + */ + data_dir = LGL_SYSTEM_DATA_DIR; + templates = read_template_files_from_dir (templates, data_dir); + g_free (data_dir); + + if (templates == NULL) + { + g_critical (_("Unable to locate any template files. Libglabels may not be installed correctly!")); + } + + return templates; +} + + +static GList * +read_template_files_from_dir (GList *templates, + const gchar *dirname) +{ + GDir *dp; + const gchar *filename, *extension, *extension2; + gchar *full_filename = NULL; + GError *gerror = NULL; + GList *new_templates = NULL; + + if (dirname == NULL) + return templates; + + if (!g_file_test (dirname, G_FILE_TEST_EXISTS)) + { + return templates; + } + + dp = g_dir_open (dirname, 0, &gerror); + if (gerror != NULL) + { + g_message ("cannot open data directory: %s", gerror->message ); + return templates; + } + + while ((filename = g_dir_read_name (dp)) != NULL) + { + + extension = strrchr (filename, '.'); + extension2 = strrchr (filename, '-'); + + if ( (extension && ASCII_EQUAL (extension, ".template")) || + (extension2 && ASCII_EQUAL (extension2, "-templates.xml")) ) + { + + full_filename = g_build_filename (dirname, filename, NULL); + new_templates = + lgl_xml_template_read_templates_from_file (full_filename); + g_free (full_filename); + + templates = g_list_concat (templates, new_templates); + new_templates = NULL; + } + + } + + g_dir_close (dp); + + return templates; +} + + +static lglTemplate * +template_full_page (const gchar *paper_id) +{ + lglPaper *paper = NULL; + lglTemplate *template = NULL; + lglTemplateFrame *frame = NULL; + gchar *part; + gchar *desc; + + g_return_val_if_fail (paper_id, NULL); + + paper = lgl_db_lookup_paper_from_id (paper_id); + if ( paper == NULL ) + { + return NULL; + } + + part = g_strdup_printf ("%s-Full-Page", paper->id); + desc = g_strdup_printf (_("Generic %s full page template"), paper->name); + + template = lgl_template_new ("Generic", part, desc, + paper_id, paper->width, paper->height); + + + frame = lgl_template_frame_rect_new ("0", + paper->width, + paper->height, + 0.0, + 0.0, + 0.0); + lgl_template_add_frame (template, frame); + + lgl_template_frame_add_layout (frame, lgl_template_layout_new (1, 1, 0., 0., 0., 0.)); + + lgl_template_frame_add_markup (frame, lgl_template_markup_margin_new (9.0)); + + g_free (desc); + desc = NULL; + lgl_paper_free (paper); + paper = NULL; + + return template; +} + + +/** + * lgl_db_print_known_templates: + * + * Print all known templates (for debugging purposes). + * + */ +void +lgl_db_print_known_templates (void) +{ + GList *p; + lglTemplate *template; + + g_print ("%s():\n", __FUNCTION__); + for (p=templates; p!=NULL; p=p->next) + { + template = (lglTemplate *)p->data; + + g_print("TEMPLATE brand=\"%s\", part=\"%s\", description=\"%s\"\n", + template->brand, template->part, template->description); + + } + g_print ("\n"); + +} + + +/** + * lgl_db_print_aliases: + * @template: template + * + * Print all aliases of a template (for debugging purposes). + * + */ +void +lgl_db_print_aliases (const lglTemplate *template) +{ + GList *p; + lglTemplateAlias *alias; + + g_print ("%s():\n", __FUNCTION__); + for (p=template->aliases; p!=NULL; p=p->next) + { + alias = (lglTemplateAlias *)p->data; + + g_print("Alias: brand=\"%s\", part=\"%s\"\n", alias->brand, alias->part); + + } + g_print ("\n"); + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/db.h b/libglabels/db.h new file mode 100644 index 00000000..96367c1d --- /dev/null +++ b/libglabels/db.h @@ -0,0 +1,151 @@ +/* + * db.h + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __DB_H__ +#define __DB_H__ + +#include + +#include "paper.h" +#include "category.h" +#include "template.h" + +G_BEGIN_DECLS + +typedef enum +{ + LGL_DB_REG_OK = 0, + LGL_DB_REG_BAD_PAPER_ID = -1, + LGL_DB_REG_BRAND_PART_EXISTS = -2, + LGL_DB_REG_FILE_WRITE_ERROR = -3 +} lglDbRegStatus; + +/* + * Module initialization + */ +void lgl_db_init (void); + + +/* + * Paper + */ +GList *lgl_db_get_paper_id_list (void); + +void lgl_db_free_paper_id_list (GList *ids); + +GList *lgl_db_get_paper_name_list (void); + +void lgl_db_free_paper_name_list (GList *names); + +lglPaper *lgl_db_lookup_paper_from_name (const gchar *name); + +lglPaper *lgl_db_lookup_paper_from_id (const gchar *id); + +gchar *lgl_db_lookup_paper_id_from_name (const gchar *name); + +gchar *lgl_db_lookup_paper_name_from_id (const gchar *id); + +gboolean lgl_db_is_paper_id_known (const gchar *id); + +gboolean lgl_db_is_paper_id_other (const gchar *id); + + + +/* + * Template categories + */ +GList *lgl_db_get_category_id_list (void); + +void lgl_db_free_category_id_list (GList *ids); + +GList *lgl_db_get_category_name_list (void); + +void lgl_db_free_category_name_list (GList *names); + +lglCategory *lgl_db_lookup_category_from_name (const gchar *name); + +lglCategory *lgl_db_lookup_category_from_id (const gchar *id); + +gchar *lgl_db_lookup_category_id_from_name (const gchar *name); + +gchar *lgl_db_lookup_category_name_from_id (const gchar *id); + +gboolean lgl_db_is_category_id_known (const gchar *id); + + +/* + * Template brands + */ +GList *lgl_db_get_brand_list (const gchar *paper_id, + const gchar *category_id); + +void lgl_db_free_brand_list (GList *brands); + + +/* + * Templates + */ +lglDbRegStatus lgl_db_register_template (const lglTemplate *template); + +gboolean lgl_db_does_template_exist (const gchar *brand, + const gchar *part); + +gboolean lgl_db_does_template_name_exist (const gchar *name); + +GList *lgl_db_get_template_name_list_unique (const gchar *brand, + const gchar *paper_id, + const gchar *category_id); + +GList *lgl_db_get_template_name_list_all (const gchar *brand, + const gchar *paper_id, + const gchar *category_id); + +void lgl_db_free_template_name_list (GList *names); + +lglTemplate *lgl_db_lookup_template_from_name (const gchar *name); + + +/* + * Debugging functions + */ +void lgl_db_print_known_papers (void); + +void lgl_db_print_known_categories (void); + +void lgl_db_print_known_templates (void); + +void lgl_db_print_aliases (const lglTemplate *template); + + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/enums.h b/libglabels/enums.h new file mode 100644 index 00000000..6ebcc1d8 --- /dev/null +++ b/libglabels/enums.h @@ -0,0 +1,55 @@ +/* + * enums.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __ENUMS_H__ +#define __ENUMS_H__ + +#include + +G_BEGIN_DECLS + +/* Units of distance */ +typedef enum { + LGL_UNITS_POINT, /* encoded as "pt" */ + LGL_UNITS_INCH, /* encoded as "in" */ + LGL_UNITS_MM, /* encoded as "mm" */ + LGL_UNITS_CM, /* encoded as "cm" */ + LGL_UNITS_PICA, /* encoded as "pc" */ + + LGL_UNITS_FIRST = LGL_UNITS_POINT, + LGL_UNITS_LAST = LGL_UNITS_PICA, +} lglUnitsType; + + +G_END_DECLS + + +#endif /* __ENUMS_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/libglabels-private.h b/libglabels/libglabels-private.h new file mode 100644 index 00000000..fa205ee8 --- /dev/null +++ b/libglabels/libglabels-private.h @@ -0,0 +1,50 @@ +/* + * libglabels-private.h + * Copyright (C) 2004-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __LIBGLABELS_PRIVATE_H__ +#define __LIBGLABELS_PRIVATE_H__ + +#include + +#include "str.h" + +/* Data system and user data directories. (must free w/ g_free()) */ +#define LGL_SYSTEM_DATA_DIR g_build_filename (LIBGLABELS_TEMPLATE_DIR, NULL) +#define LGL_USER_DATA_DIR g_build_filename (g_get_home_dir (), ".glabels", NULL) + +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "LibGlabels" + +#define UTF8_EQUAL(s1,s2) (!lgl_str_utf8_casecmp (s1, s2)) +#define ASCII_EQUAL(s1,s2) (!g_ascii_strcasecmp (s1, s2)) + + +#endif /* __LIBGLABELS_PRIVATE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/libglabels.h b/libglabels/libglabels.h new file mode 100644 index 00000000..bd46b19d --- /dev/null +++ b/libglabels/libglabels.h @@ -0,0 +1,46 @@ +/* + * libglabels.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __LIBGLABELS_H__ +#define __LIBGLABELS_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* __LIBGLABELS_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/libglabels.pc.in b/libglabels/libglabels.pc.in new file mode 100644 index 00000000..c16e8f47 --- /dev/null +++ b/libglabels/libglabels.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libglabels +Description: GLabels Template Library +Requires: glib-2.0 libxml-2.0 +Version: @VERSION@ +Libs: -L${libdir} -lglabels +Cflags: -I${includedir} + diff --git a/libglabels/paper.c b/libglabels/paper.c new file mode 100644 index 00000000..d0b80fbb --- /dev/null +++ b/libglabels/paper.c @@ -0,0 +1,147 @@ +/* + * paper.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#include + +#include "paper.h" + +#include +#include +#include + +#include "libglabels-private.h" + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + + +/*===========================================*/ +/* Functions. */ +/*===========================================*/ + +/** + * lgl_paper_new: + * @id: Id of paper definition. (E.g. US-Letter, A4, etc.) Should be + * unique. + * @name: Localized name of paper. + * @width: Width of paper in points. + * @height: Height of paper in points. + * @pwg_size: PWG 5101.1-2002 size name. + * + * Allocates and constructs a new #lglPaper structure. + * + * Returns: a pointer to a newly allocated #lglPaper structure. + * + */ +lglPaper * +lgl_paper_new (gchar *id, + gchar *name, + gdouble width, + gdouble height, + gchar *pwg_size) +{ + lglPaper *paper; + + paper = g_new0 (lglPaper,1); + + paper->id = g_strdup (id); + paper->name = g_strdup (name); + paper->width = width; + paper->height = height; + paper->pwg_size = g_strdup (pwg_size); + + return paper; +} + + +/** + * lgl_paper_dup: + * @orig: #lglPaper structure to be duplicated. + * + * Duplicates an existing #lglPaper structure. + * + * Returns: a pointer to a newly allocated #lglPaper structure. + * + */ +lglPaper *lgl_paper_dup (const lglPaper *orig) +{ + lglPaper *paper; + + g_return_val_if_fail (orig, NULL); + + paper = g_new0 (lglPaper,1); + + paper->id = g_strdup (orig->id); + paper->name = g_strdup (orig->name); + paper->width = orig->width; + paper->height = orig->height; + paper->pwg_size = g_strdup (orig->pwg_size); + + return paper; +} + + +/** + * lgl_paper_free: + * @paper: pointer to #lglPaper structure to be freed. + * + * Free all memory associated with an existing #lglPaper structure. + * + */ +void lgl_paper_free (lglPaper *paper) +{ + + if ( paper != NULL ) { + + g_free (paper->id); + paper->id = NULL; + + g_free (paper->name); + paper->name = NULL; + + g_free (paper->pwg_size); + paper->pwg_size = NULL; + + g_free (paper); + } + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/paper.h b/libglabels/paper.h new file mode 100644 index 00000000..0cf918f2 --- /dev/null +++ b/libglabels/paper.h @@ -0,0 +1,70 @@ +/* + * paper.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __PAPER_H__ +#define __PAPER_H__ + +#include + +G_BEGIN_DECLS + + +/* + * lglPaper structure + */ +typedef struct _lglPaper lglPaper; + +struct _lglPaper { + gchar *id; /* Unique ID of paper definition */ + gchar *name; /* Localized name of paper */ + gdouble width; /* Width (in points) */ + gdouble height; /* Height (in points) */ + gchar *pwg_size; /* PWG 5101.1-2002 size name */ +}; + + +/* + * Paper construction + */ +lglPaper *lgl_paper_new (gchar *id, + gchar *name, + gdouble width, + gdouble height, + gchar *pwg_size); + +lglPaper *lgl_paper_dup (const lglPaper *orig); + +void lgl_paper_free (lglPaper *paper); + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/str.c b/libglabels/str.c new file mode 100644 index 00000000..5c21f189 --- /dev/null +++ b/libglabels/str.c @@ -0,0 +1,87 @@ +/* + * str.c + * Copyright (C) 2007-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#include + +#include "str.h" + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + + +/*===========================================*/ +/* Functions. */ +/*===========================================*/ + +/** + * lgl_str_utf8_casecmp: + * @s1: string to compare with s2. + * @s2: string to compare with s1. + * + * Compare two UTF-8 strings, ignoring the case of characters. + * + * This function should be used only on strings that are known to be encoded + * in UTF-8 or a compatible UTF-8 subset. + * + * Returns: 0 if the strings match, a negative value if s1 < s2, + * or a positive value if s1 > s2. + * + */ +gint +lgl_str_utf8_casecmp (const gchar *s1, + const gchar *s2) +{ + gchar *folded_s1; + gchar *folded_s2; + gint result; + + folded_s1 = g_utf8_casefold (s1, -1); + folded_s2 = g_utf8_casefold (s2, -1); + + result = g_utf8_collate (folded_s1, folded_s2); + + g_free (folded_s1); + g_free (folded_s2); + + return result; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/str.h b/libglabels/str.h new file mode 100644 index 00000000..54e2361a --- /dev/null +++ b/libglabels/str.h @@ -0,0 +1,45 @@ +/* + * str.h + * Copyright (C) 2007-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __STR_H__ +#define __STR_H__ + +#include + +G_BEGIN_DECLS + +gint lgl_str_utf8_casecmp (const gchar *s1, + const gchar *s2); + +G_END_DECLS + + +#endif /* __STR_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/template.c b/libglabels/template.c new file mode 100644 index 00000000..5675c401 --- /dev/null +++ b/libglabels/template.c @@ -0,0 +1,1122 @@ +/* + * template.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#include + +#include "template.h" + +#include +#include +#include +#include +#include + +#include "libglabels-private.h" + +#include "paper.h" + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static gint compare_origins (gconstpointer a, + gconstpointer b, + gpointer user_data); + +/*===========================================*/ +/* Functions. */ +/*===========================================*/ + +/** + * lgl_template_new: + * @brand: Template brand + * @part: Template part name/number + * @description: Template descriptions + * @paper_id: Page size id + * @page_width: Page width in points, set to zero unless paper_id="Other" + * @page_height: Page height in points, set to zero unless paper_id="Other" + * + * Create a new template structure, with the given top-level attributes. The + * created template will have no initial aliases, categories, or frames + * associated with it. See lgl_template_add_alias(), lgl_template_add_category(), + * and lgl_template_add_frame() to add these. + * + * Returns: pointer to a newly allocated #lglTemplate structure. + * + */ +lglTemplate * +lgl_template_new (const gchar *brand, + const gchar *part, + const gchar *description, + const gchar *paper_id, + gdouble page_width, + gdouble page_height) +{ + lglTemplate *template; + lglTemplateAlias *alias; + + template = g_new0 (lglTemplate,1); + + template->brand = g_strdup (brand); + template->part = g_strdup (part); + template->description = g_strdup (description); + template->paper_id = g_strdup (paper_id); + template->page_width = page_width; + template->page_height = page_height; + + /* Always include primary name in alias list. */ + template->aliases = NULL; + alias = lgl_template_alias_new (brand, part); + lgl_template_add_alias (template, alias); + + return template; +} + + +/** + * lgl_template_get_name: + * @template: Pointer to template structure to test + * + * This function returns the name of the given template. The name is the concetenation + * of the brand and part name/number. + * + * Returns: A pointer to a newly allocated name string. Should be freed with g_free(). + * + */ +gchar * +lgl_template_get_name (const lglTemplate *template) +{ + g_return_val_if_fail (template, NULL); + + return g_strdup_printf ("%s %s", template->brand, template->part); +} + + +/** + * lgl_template_do_templates_match: + * @template1: Pointer to 1st template structure to test + * @template2: Pointer to 2nd template structure to test + * + * This function tests if the given templates match. This is a simple test that only tests + * the brand and part name/number. It does not test if they are actually identical. + * + * Returns: TRUE if the two template matche. + * + */ +gboolean +lgl_template_do_templates_match (const lglTemplate *template1, + const lglTemplate *template2) +{ + g_return_val_if_fail (template1, FALSE); + g_return_val_if_fail (template2, FALSE); + + return (UTF8_EQUAL (template1->brand, template2->brand) && + UTF8_EQUAL (template1->part, template2->part)); +} + + +/** + * lgl_template_does_brand_match: + * @template: Pointer to template structure to test + * @brand: Brand string + * + * This function tests if the brand of the template matches the given brand. + * + * Returns: TRUE if the template matches the given brand. + * + */ +gboolean +lgl_template_does_brand_match (const lglTemplate *template, + const gchar *brand) +{ + g_return_val_if_fail (template, FALSE); + + /* NULL matches everything. */ + if (brand == NULL) + { + return TRUE; + } + + return UTF8_EQUAL (template->brand, brand); +} + + +/** + * lgl_template_does_page_size_match: + * @template: Pointer to template structure to test + * @paper_id: Page size ID string + * + * This function tests if the page size of the template matches the given ID. + * + * Returns: TRUE if the template matches the given page size ID. + * + */ +gboolean +lgl_template_does_page_size_match (const lglTemplate *template, + const gchar *paper_id) +{ + g_return_val_if_fail (template, FALSE); + + /* NULL matches everything. */ + if (paper_id == NULL) + { + return TRUE; + } + + return ASCII_EQUAL(paper_id, template->paper_id); +} + + +/** + * lgl_template_does_category_match: + * @template: Pointer to template structure to test + * @category_id: Category ID string + * + * This function tests if the given template belongs to the given category ID. + * + * Returns: TRUE if the template matches the given category ID. + * + */ +gboolean +lgl_template_does_category_match (const lglTemplate *template, + const gchar *category_id) +{ + GList *p; + + g_return_val_if_fail (template, FALSE); + + /* NULL matches everything. */ + if (category_id == NULL) + { + return TRUE; + } + + for ( p=template->category_ids; p != NULL; p=p->next ) + { + if (ASCII_EQUAL(category_id, p->data)) + { + return TRUE; + } + } + + return FALSE; +} + + +/** + * lgl_template_alias_new: + * @brand: Alias brand + * @part: Alias part name/number + * + * Create a new template alias structure, with the given brand and part number. + * + * Returns: pointer to a newly allocated #lglTemplateAlias structure. + * + */ +lglTemplateAlias * +lgl_template_alias_new (const gchar *brand, + const gchar *part) +{ + lglTemplateAlias *alias; + + alias = g_new0 (lglTemplateAlias,1); + + alias->brand = g_strdup (brand); + alias->part = g_strdup (part); + + return alias; +} + + +/** + * lgl_template_add_alias: + * @template: Pointer to template structure + * @alias: Alias string + * + * This function adds the given alias to a templates list of aliases. + * + */ +void +lgl_template_add_alias (lglTemplate *template, + lglTemplateAlias *alias) +{ + g_return_if_fail (template); + g_return_if_fail (alias); + + template->aliases = g_list_append (template->aliases, alias); +} + + +/** + * lgl_template_add_frame: + * @template: Pointer to template structure + * @frame: Pointer to frame structure + * + * This function adds the given frame structure to the template. Once added, + * the frame structure belongs to the given template; do not attempt to free + * it. + * + * Note: Currently glabels only supports a single frame per template. + * + */ +void +lgl_template_add_frame (lglTemplate *template, + lglTemplateFrame *frame) +{ + g_return_if_fail (template); + g_return_if_fail (frame); + + template->frames = g_list_append (template->frames, frame); +} + + +/** + * lgl_template_add_category: + * @template: Pointer to template structure + * @category_id: Category ID string + * + * This function adds the given category ID to a templates category list. + * + */ +void +lgl_template_add_category (lglTemplate *template, + const gchar *category_id) +{ + g_return_if_fail (template); + g_return_if_fail (category_id); + + template->category_ids = g_list_append (template->category_ids, + g_strdup (category_id)); +} + + +/** + * lgl_template_frame_rect_new: + * @id: ID of frame. (This should currently always be "0"). + * @w: width of frame in points. + * @h: height of frame in points. + * @r: radius of rounded corners in points. (Should be 0 for square corners.) + * @x_waste: Amount of overprint to allow in the horizontal direction. + * @y_waste: Amount of overprint to allow in the vertical direction. + * + * This function creates a new template frame for a rectangular label or card. + * + * Returns: Pointer to newly allocated #lglTemplateFrame structure. + * + */ +lglTemplateFrame * +lgl_template_frame_rect_new (const gchar *id, + gdouble w, + gdouble h, + gdouble r, + gdouble x_waste, + gdouble y_waste) +{ + lglTemplateFrame *frame; + + frame = g_new0 (lglTemplateFrame, 1); + + frame->shape = LGL_TEMPLATE_FRAME_SHAPE_RECT; + frame->rect.id = g_strdup (id); + + frame->rect.w = w; + frame->rect.h = h; + frame->rect.r = r; + frame->rect.x_waste = x_waste; + frame->rect.y_waste = y_waste; + + return frame; +} + + +/** + * lgl_template_frame_round_new: + * @id: ID of frame. (This should currently always be "0"). + * @r: radius of label in points. + * @waste: Amount of overprint to allow. + * + * This function creates a new template frame for a round label. + * + * Returns: Pointer to newly allocated #lglTemplateFrame structure. + * + */ +lglTemplateFrame * +lgl_template_frame_round_new (const gchar *id, + gdouble r, + gdouble waste) +{ + lglTemplateFrame *frame; + + frame = g_new0 (lglTemplateFrame, 1); + + frame->shape = LGL_TEMPLATE_FRAME_SHAPE_ROUND; + frame->round.id = g_strdup (id); + + frame->round.r = r; + frame->round.waste = waste; + + return frame; +} + + +/** + * lgl_template_frame_cd_new: + * @id: ID of frame. (This should currently always be "0"). + * @r1: outer radius of label in points. + * @r2: radius of center hole in points. + * @w: clip width of frame in points for business card CDs. Should be 0 for no clipping. + * @h: clip height of frame in points for business card CDs. Should be 0 for no clipping. + * @waste: Amount of overprint to allow. + * + * This function creates a new template frame for a CD/DVD label. + * + * Returns: Pointer to newly allocated #lglTemplateFrame structure. + * + */ +lglTemplateFrame * +lgl_template_frame_cd_new (const gchar *id, + gdouble r1, + gdouble r2, + gdouble w, + gdouble h, + gdouble waste) +{ + lglTemplateFrame *frame; + + frame = g_new0 (lglTemplateFrame, 1); + + frame->shape = LGL_TEMPLATE_FRAME_SHAPE_CD; + frame->cd.id = g_strdup (id); + + frame->cd.r1 = r1; + frame->cd.r2 = r2; + frame->cd.w = w; + frame->cd.h = h; + frame->cd.waste = waste; + + return frame; +} + + +/** + * lgl_template_frame_get_size: + * @frame: #lglTemplateFrame structure to query + * @w: pointer to location to receive width of frame + * @h: pointer to location to receive height of frame + * + * Get size (width and height) of given #lglTemplateFrame in points. + * + */ +void +lgl_template_frame_get_size (const lglTemplateFrame *frame, + gdouble *w, + gdouble *h) +{ + g_return_if_fail (frame); + + switch (frame->shape) { + case LGL_TEMPLATE_FRAME_SHAPE_RECT: + *w = frame->rect.w; + *h = frame->rect.h; + break; + case LGL_TEMPLATE_FRAME_SHAPE_ROUND: + *w = 2.0 * frame->round.r; + *h = 2.0 * frame->round.r; + break; + case LGL_TEMPLATE_FRAME_SHAPE_CD: + if (frame->cd.w == 0.0) { + *w = 2.0 * frame->cd.r1; + } else { + *w = frame->cd.w; + } + if (frame->cd.h == 0.0) { + *h = 2.0 * frame->cd.r1; + } else { + *h = frame->cd.h; + } + break; + default: + *w = 0.0; + *h = 0.0; + break; + } +} + + +/** + * lgl_template_frame_get_n_labels: + * @frame: #lglTemplateFrame structure to query + * + * Get total number of labels per sheet corresponding to the given frame. + * + * Returns: number of labels per sheet. + * + */ +gint +lgl_template_frame_get_n_labels (const lglTemplateFrame *frame) +{ + gint n_labels = 0; + GList *p; + lglTemplateLayout *layout; + + g_return_val_if_fail (frame, 0); + + for ( p=frame->all.layouts; p != NULL; p=p->next ) { + layout = (lglTemplateLayout *)p->data; + + n_labels += layout->nx * layout->ny; + } + + return n_labels; +} + + +/** + * lgl_template_frame_get_origins: + * @frame: #lglTemplateFrame structure to query + * + * Get an array of label origins for the given frame. These origins represent the + * upper left hand corner of each label on a page corresponding to the given frame. + * The origins will be ordered geometrically left to right and then top to bottom. + * The array should be freed using g_free(). + * + * Returns: A newly allocated array of #lglTemplateOrigin structures. + * + */ +lglTemplateOrigin * +lgl_template_frame_get_origins (const lglTemplateFrame *frame) +{ + gint i_label, n_labels, ix, iy; + lglTemplateOrigin *origins; + GList *p; + lglTemplateLayout *layout; + + g_return_val_if_fail (frame, NULL); + + n_labels = lgl_template_frame_get_n_labels (frame); + origins = g_new0 (lglTemplateOrigin, n_labels); + + i_label = 0; + for ( p=frame->all.layouts; p != NULL; p=p->next ) { + layout = (lglTemplateLayout *)p->data; + + for (iy = 0; iy < layout->ny; iy++) { + for (ix = 0; ix < layout->nx; ix++, i_label++) { + origins[i_label].x = ix*layout->dx + layout->x0; + origins[i_label].y = iy*layout->dy + layout->y0; + } + } + } + + g_qsort_with_data (origins, n_labels, sizeof(lglTemplateOrigin), + compare_origins, NULL); + + return origins; +} + + +/** + * lgl_template_frame_add_layout: + * @frame: Pointer to template frame to add layout to. + * @layout: Pointer to layout structure to add to frame. + * + * This function adds a layout structure to the given template frame. + * + */ +void +lgl_template_frame_add_layout (lglTemplateFrame *frame, + lglTemplateLayout *layout) +{ + g_return_if_fail (frame); + g_return_if_fail (layout); + + frame->all.layouts = g_list_append (frame->all.layouts, layout); +} + + +/** + * lgl_template_frame_add_markup: + * @frame: Pointer to template frame to add markup to. + * @markup: Pointer to markup structure to add to frame. + * + * This function adds a markup structure to the given template frame. + * + */ +void +lgl_template_frame_add_markup (lglTemplateFrame *frame, + lglTemplateMarkup *markup) +{ + g_return_if_fail (frame); + g_return_if_fail (markup); + + frame->all.markups = g_list_append (frame->all.markups, markup); +} + + +/** + * lgl_template_layout_new: + * @nx: Number of labels across. + * @ny: Number of labels down. + * @x0: X coordinate of the top-left corner of the top-left label in the layout in points. + * @y0: Y coordinate of the top-left corner of the top-left label in the layout in points. + * @dx: Horizontal pitch in points. This is the distance from left-edge to left-edge. + * @dy: Vertical pitch in points. This is the distance from top-edge to top-edge. + * + * This function creates a new layout structure with the given parameters. + * + * Returns: a newly allocated #lglTemplateLayout structure. + * + */ +lglTemplateLayout * +lgl_template_layout_new (gint nx, + gint ny, + gdouble x0, + gdouble y0, + gdouble dx, + gdouble dy) +{ + lglTemplateLayout *layout; + + layout = g_new0 (lglTemplateLayout, 1); + + layout->nx = nx; + layout->ny = ny; + layout->x0 = x0; + layout->y0 = y0; + layout->dx = dx; + layout->dy = dy; + + return layout; +} + + +/** + * lgl_template_markup_margin_new: + * @size: margin size in points. + * + * This function creates a new margin markup structure. + * + * Returns: a newly allocated #lglTemplateMarkup structure. + * + */ +lglTemplateMarkup * +lgl_template_markup_margin_new (gdouble size) +{ + lglTemplateMarkup *markup; + + markup = g_new0 (lglTemplateMarkup, 1); + + markup->type = LGL_TEMPLATE_MARKUP_MARGIN; + markup->margin.size = size; + + return markup; +} + + +/** + * lgl_template_markup_line_new: + * @x1: x coordinate of first endpoint. + * @y1: y coordinate of first endpoint. + * @x2: x coordinate of second endpoint. + * @y2: y coordinate of second endpoint. + * + * This function creates a new line markup structure. + * + * Returns: a newly allocated #lglTemplateMarkup structure. + * + */ +lglTemplateMarkup * +lgl_template_markup_line_new (gdouble x1, + gdouble y1, + gdouble x2, + gdouble y2) +{ + lglTemplateMarkup *markup; + + markup = g_new0 (lglTemplateMarkup, 1); + + markup->type = LGL_TEMPLATE_MARKUP_LINE; + markup->line.x1 = x1; + markup->line.y1 = y1; + markup->line.x2 = x2; + markup->line.y2 = y2; + + return markup; +} + + +/** + * lgl_template_markup_circle_new: + * @x0: x coordinate of center of circle. + * @y0: y coordinate of center of circle. + * @r: radius of circle. + * + * This function creates a new circle markup structure. + * + * Returns: a newly allocated #lglTemplateMarkup structure. + * + */ +lglTemplateMarkup * +lgl_template_markup_circle_new (gdouble x0, + gdouble y0, + gdouble r) +{ + lglTemplateMarkup *markup; + + markup = g_new0 (lglTemplateMarkup, 1); + + markup->type = LGL_TEMPLATE_MARKUP_CIRCLE; + markup->circle.x0 = x0; + markup->circle.y0 = y0; + markup->circle.r = r; + + return markup; +} + + +/** + * lgl_template_markup_rect_new: + * @x1: x coordinate of top-left corner of rectangle. + * @y1: y coordinate of top-left corner of rectangle. + * @w: width of rectangle. + * @h: height of rectangle. + * @r: radius of rounded corner. + * + * This function creates a new rectangle markup structure. + * + * Returns: a newly allocated #lglTemplateMarkup structure. + * + */ +lglTemplateMarkup * +lgl_template_markup_rect_new (gdouble x1, + gdouble y1, + gdouble w, + gdouble h, + gdouble r) +{ + lglTemplateMarkup *markup; + + markup = g_new0 (lglTemplateMarkup, 1); + + markup->type = LGL_TEMPLATE_MARKUP_RECT; + markup->rect.x1 = x1; + markup->rect.y1 = y1; + markup->rect.w = w; + markup->rect.h = h; + markup->rect.r = r; + + return markup; +} + + +/** + * lgl_template_dup: + * @orig_template: Template to duplicate. + * + * This function duplicates a template structure. + * + * Returns: a newly allocated #lglTemplate structure. + * + */ +lglTemplate * +lgl_template_dup (const lglTemplate *orig_template) +{ + lglTemplate *template; + lglTemplateAlias *alias; + GList *p; + lglTemplateFrame *frame; + + g_return_val_if_fail (orig_template, NULL); + + template = lgl_template_new (orig_template->brand, + orig_template->part, + orig_template->description, + orig_template->paper_id, + orig_template->page_width, + orig_template->page_height); + + for ( p=orig_template->aliases; p != NULL; p=p->next ) + { + alias = (lglTemplateAlias *)p->data; + + if ( !(UTF8_EQUAL (template->brand, alias->brand) && + UTF8_EQUAL (template->part, alias->part)) ) + { + lgl_template_add_alias (template, lgl_template_alias_dup (alias)); + } + + } + + for ( p=orig_template->category_ids; p != NULL; p=p->next ) + { + lgl_template_add_category (template, p->data); + } + + for ( p=orig_template->frames; p != NULL; p=p->next ) + { + frame = (lglTemplateFrame *)p->data; + + lgl_template_add_frame (template, lgl_template_frame_dup (frame)); + } + + return template; +} + + +/** + * lgl_template_free: + * @template: Template to free. + * + * This function frees all memory associated with given template structure. + * + */ +void +lgl_template_free (lglTemplate *template) +{ + GList *p; + lglTemplateFrame *frame; + + if ( template != NULL ) { + + g_free (template->brand); + template->brand = NULL; + + g_free (template->part); + template->part = NULL; + + g_free (template->description); + template->description = NULL; + + g_free (template->paper_id); + template->paper_id = NULL; + + for ( p=template->aliases; p != NULL; p=p->next ) { + + lgl_template_alias_free (p->data); + p->data = NULL; + + } + g_list_free (template->aliases); + template->aliases = NULL; + + for ( p=template->category_ids; p != NULL; p=p->next ) { + + g_free (p->data); + p->data = NULL; + + } + g_list_free (template->category_ids); + template->category_ids = NULL; + + for ( p=template->frames; p != NULL; p=p->next ) { + + frame = (lglTemplateFrame *)p->data; + + lgl_template_frame_free (frame); + p->data = NULL; + } + g_list_free (template->frames); + template->frames = NULL; + + g_free (template); + + } + +} + + +/** + * lgl_template_alias_dup: + * @orig_alias: Alias to duplicate. + * + * This function duplicates a template alias structure. + * + * Returns: a newly allocated #lglTemplateAlias structure. + * + */ +lglTemplateAlias * +lgl_template_alias_dup (const lglTemplateAlias *orig_alias) +{ + g_return_val_if_fail (orig_alias, NULL); + + return lgl_template_alias_new (orig_alias->brand, orig_alias->part); +} + + +/** + * lgl_template_alias_free: + * @alias: Alias to free. + * + * This function frees all memory associated with given template alias structure. + * + */ +void +lgl_template_alias_free (lglTemplateAlias *alias) +{ + + if ( alias != NULL ) + { + g_free (alias->brand); + alias->brand = NULL; + + g_free (alias->part); + alias->part = NULL; + + g_free (alias); + } +} + + +/** + * lgl_template_frame_dup: + * @orig_frame: Frame to duplicate. + * + * This function duplicates a template frame structure. + * + * Returns: a newly allocated #lglTemplateFrame structure. + * + */ +lglTemplateFrame * +lgl_template_frame_dup (const lglTemplateFrame *orig_frame) +{ + lglTemplateFrame *frame; + GList *p; + lglTemplateLayout *layout; + lglTemplateMarkup *markup; + + g_return_val_if_fail (orig_frame, NULL); + + switch (orig_frame->shape) { + + case LGL_TEMPLATE_FRAME_SHAPE_RECT: + frame = + lgl_template_frame_rect_new (orig_frame->all.id, + orig_frame->rect.w, + orig_frame->rect.h, + orig_frame->rect.r, + orig_frame->rect.x_waste, + orig_frame->rect.y_waste); + break; + + case LGL_TEMPLATE_FRAME_SHAPE_ROUND: + frame = + lgl_template_frame_round_new (orig_frame->all.id, + orig_frame->round.r, + orig_frame->round.waste); + break; + + case LGL_TEMPLATE_FRAME_SHAPE_CD: + frame = + lgl_template_frame_cd_new (orig_frame->all.id, + orig_frame->cd.r1, + orig_frame->cd.r2, + orig_frame->cd.w, + orig_frame->cd.h, + orig_frame->cd.waste); + break; + + default: + return NULL; + break; + } + + for ( p=orig_frame->all.layouts; p != NULL; p=p->next ) { + + layout = (lglTemplateLayout *)p->data; + + lgl_template_frame_add_layout (frame, lgl_template_layout_dup (layout)); + } + + for ( p=orig_frame->all.markups; p != NULL; p=p->next ) { + + markup = (lglTemplateMarkup *)p->data; + + lgl_template_frame_add_markup (frame, lgl_template_markup_dup (markup)); + } + + return frame; +} + + +/** + * lgl_template_frame_free: + * @frame: Frame to free. + * + * This function frees all memory associated with given template frame structure. + * + */ +void +lgl_template_frame_free (lglTemplateFrame *frame) +{ + GList *p; + lglTemplateLayout *layout; + lglTemplateMarkup *markup; + + if ( frame != NULL ) { + + g_free (frame->all.id); + frame->all.id = NULL; + + for ( p=frame->all.layouts; p != NULL; p=p->next ) { + + layout = (lglTemplateLayout *)p->data; + + lgl_template_layout_free (layout); + p->data = NULL; + } + g_list_free (frame->all.layouts); + frame->all.layouts = NULL; + + for ( p=frame->all.markups; p != NULL; p=p->next ) { + + markup = (lglTemplateMarkup *)p->data; + + lgl_template_markup_free (markup); + p->data = NULL; + } + g_list_free (frame->all.markups); + frame->all.markups = NULL; + + g_free (frame); + + } + +} + + +/** + * lgl_template_layout_dup: + * @orig_layout: Layout to duplicate. + * + * This function duplicates a template layout structure. + * + * Returns: a newly allocated #lglTemplateLayout structure. + * + */ +lglTemplateLayout * +lgl_template_layout_dup (const lglTemplateLayout *orig_layout) +{ + lglTemplateLayout *layout; + + g_return_val_if_fail (orig_layout, NULL); + + layout = g_new0 (lglTemplateLayout, 1); + + /* copy contents */ + *layout = *orig_layout; + + return layout; +} + + +/** + * lgl_template_layout_free: + * @layout: Layout to free. + * + * This function frees all memory associated with given template layout structure. + * + */ +void +lgl_template_layout_free (lglTemplateLayout *layout) +{ + g_free (layout); +} + + +/** + * lgl_template_markup_dup: + * @orig_markup: Markup to duplicate. + * + * This function duplicates a template markup structure. + * + * Returns: a newly allocated #lglTemplateMarkup structure. + * + */ +lglTemplateMarkup * +lgl_template_markup_dup (const lglTemplateMarkup *orig_markup) +{ + lglTemplateMarkup *markup; + + g_return_val_if_fail (orig_markup, NULL); + + markup = g_new0 (lglTemplateMarkup, 1); + + *markup = *orig_markup; + + return markup; +} + + +/** + * lgl_template_markup_free: + * @markup: Markup to free. + * + * This function frees all memory associated with given template markup structure. + * + */ +void +lgl_template_markup_free (lglTemplateMarkup *markup) +{ + g_free (markup); +} + + +static gint +compare_origins (gconstpointer a, + gconstpointer b, + gpointer user_data) +{ + const lglTemplateOrigin *a_origin = a, *b_origin = b; + + if ( a_origin->y < b_origin->y ) { + return -1; + } else if ( a_origin->y > b_origin->y ) { + return +1; + } else { + if ( a_origin->x < b_origin->x ) { + return -1; + } else if ( a_origin->x > b_origin->x ) { + return +1; + } else { + return 0; /* hopefully 2 labels won't have the same origin */ + } + } +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/template.h b/libglabels/template.h new file mode 100644 index 00000000..ca53ab1b --- /dev/null +++ b/libglabels/template.h @@ -0,0 +1,383 @@ +/* + * template.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __TEMPLATE_H__ +#define __TEMPLATE_H__ + +#include + +G_BEGIN_DECLS + +typedef struct _lglTemplate lglTemplate; + +typedef struct _lglTemplateAlias lglTemplateAlias; + +typedef union _lglTemplateFrame lglTemplateFrame; +typedef struct _lglTemplateFrameAll lglTemplateFrameAll; +typedef struct _lglTemplateFrameRect lglTemplateFrameRect; +typedef struct _lglTemplateFrameRound lglTemplateFrameRound; +typedef struct _lglTemplateFrameCD lglTemplateFrameCD; + +typedef struct _lglTemplateLayout lglTemplateLayout; + +typedef union _lglTemplateMarkup lglTemplateMarkup; +typedef struct _lglTemplateMarkupMargin lglTemplateMarkupMargin; +typedef struct _lglTemplateMarkupLine lglTemplateMarkupLine; +typedef struct _lglTemplateMarkupCircle lglTemplateMarkupCircle; +typedef struct _lglTemplateMarkupRect lglTemplateMarkupRect; + +typedef struct _lglTemplateOrigin lglTemplateOrigin; + +/* + * Top-level Template Structure + */ +struct _lglTemplate { + + gchar *brand; + gchar *part; + gchar *description; + gchar *paper_id; + gdouble page_width; + gdouble page_height; + + /* List of (lglTemplateAlias *) aliase structures. */ + GList *aliases; + + /* List of (gchar *) category ids. */ + GList *category_ids; + + /* List of (lglTemplateFrame *) label frame structures. + * Currently glabels only supports a single label frame per + * template. */ + GList *frames; + +}; + + +/* + * Top-level Template Structure + */ +struct _lglTemplateAlias { + + gchar *brand; + gchar *part; + +}; + +/* + * Possible Frame Shapes + */ +typedef enum { + LGL_TEMPLATE_FRAME_SHAPE_RECT, + LGL_TEMPLATE_FRAME_SHAPE_ROUND, + LGL_TEMPLATE_FRAME_SHAPE_CD, +} lglTemplateFrameShape; + + +/* + * Frame Structure + */ +struct _lglTemplateFrameAll { + + /* Begin Common Fields */ + lglTemplateFrameShape shape; + + gchar *id; /* Id, currently always "0" */ + GList *layouts; /* List of lglTemplateLayouts */ + GList *markups; /* List of lglTemplateMarkups */ + /* End Common Fields */ +}; + +struct _lglTemplateFrameRect { + + /* Begin Common Fields */ + lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_RECT. */ + + gchar *id; /* Id, currently always "0" */ + GList *layouts; /* List of lglTemplateLayouts */ + GList *markups; /* List of lglTemplateMarkups */ + /* End Common Fields */ + + gdouble w; /* Width */ + gdouble h; /* Height */ + gdouble r; /* Corner radius */ + gdouble x_waste; /* Amount of horiz overprint allowed. */ + gdouble y_waste; /* Amount of vert overprint allowed. */ +}; + +struct _lglTemplateFrameRound { + + /* Begin Common Fields */ + lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_ROUND. */ + + gchar *id; /* Id, currently always "0" */ + GList *layouts; /* List of lglTemplateLayouts */ + GList *markups; /* List of lglTemplateMarkups */ + /* End Common Fields */ + + gdouble r; /* Radius */ + gdouble waste; /* Amount of overprint allowed. */ +}; + +struct _lglTemplateFrameCD { + + /* Begin Common Fields */ + lglTemplateFrameShape shape; /* Always LGL_TEMPLATE_FRAME_SHAPE_CD. */ + + gchar *id; /* Id, currently always "0" */ + GList *layouts; /* List of lglTemplateLayouts */ + GList *markups; /* List of lglTemplateMarkups */ + /* End Common Fields */ + + gdouble r1; /* Outer radius */ + gdouble r2; /* Inner radius (hole) */ + gdouble w; /* Clip width, business card CDs */ + gdouble h; /* Clip height, business card CDs */ + gdouble waste; /* Amount of overprint allowed. */ +}; + +union _lglTemplateFrame{ + + lglTemplateFrameShape shape; + + lglTemplateFrameAll all; + lglTemplateFrameRect rect; + lglTemplateFrameRound round; + lglTemplateFrameCD cd; +}; + + +/* + * Label Layout Structure + */ +struct _lglTemplateLayout { + + gint nx; /* Number of labels across */ + gint ny; /* Number of labels up and down */ + + gdouble x0; /* Left of grid from left edge of paper */ + gdouble y0; /* Top of grid from top edge of paper */ + + gdouble dx; /* Horizontal pitch of grid */ + gdouble dy; /* Vertical pitch of grid */ + +}; + + +/* + * Possible Markup Types + */ +typedef enum { + LGL_TEMPLATE_MARKUP_MARGIN, + LGL_TEMPLATE_MARKUP_LINE, + LGL_TEMPLATE_MARKUP_CIRCLE, + LGL_TEMPLATE_MARKUP_RECT, +} lglTemplateMarkupType; + + +/* + * Label Markup Structure (Helpful lines drawn in glabels to help locate objects) + */ +struct _lglTemplateMarkupMargin { + + lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_MARGIN */ + + gdouble size; /* Margin size */ +}; + +struct _lglTemplateMarkupLine { + + lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_LINE */ + + gdouble x1, y1; /* 1st endpoint */ + gdouble x2, y2; /* 2nd endpoint */ +}; + +struct _lglTemplateMarkupCircle { + + lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_CIRCLE */ + + gdouble x0, y0; /* Center of circle */ + gdouble r; /* Radius of circle */ +}; + +struct _lglTemplateMarkupRect { + + lglTemplateMarkupType type; /* Always LGL_TEMPLATE_MARKUP_RECT */ + + gdouble x1, y1; /* Upper left corner */ + gdouble w, h; /* Width and height. */ + gdouble r; /* Radius of corners. */ +}; + +union _lglTemplateMarkup { + + lglTemplateMarkupType type; + + lglTemplateMarkupMargin margin; + lglTemplateMarkupLine line; + lglTemplateMarkupCircle circle; + lglTemplateMarkupRect rect; +}; + + +/* + * Origin coordinates + */ +struct _lglTemplateOrigin { + + gdouble x, y; /* Label origin relative to upper + * upper left hand corner of paper */ + +}; + + + +/* + * Template query functions + */ +gchar *lgl_template_get_name (const lglTemplate *template); + +gboolean lgl_template_do_templates_match (const lglTemplate *template1, + const lglTemplate *template2); + +gboolean lgl_template_does_brand_match (const lglTemplate *template, + const gchar *brand); + +gboolean lgl_template_does_page_size_match (const lglTemplate *template, + const gchar *paper_id); + +gboolean lgl_template_does_category_match (const lglTemplate *template, + const gchar *category_id); + + +/* + * Frame query functions + */ +void lgl_template_frame_get_size (const lglTemplateFrame *frame, + gdouble *w, + gdouble *h); + +gint lgl_template_frame_get_n_labels (const lglTemplateFrame *frame); + +lglTemplateOrigin *lgl_template_frame_get_origins (const lglTemplateFrame *frame); + + +/* + * Template Construction + */ +lglTemplate *lgl_template_new (const gchar *brand, + const gchar *part, + const gchar *description, + const gchar *paper_id, + gdouble page_width, + gdouble page_height); + +void lgl_template_add_alias (lglTemplate *template, + lglTemplateAlias *alias); + +void lgl_template_add_category (lglTemplate *template, + const gchar *category_id); + +void lgl_template_add_frame (lglTemplate *template, + lglTemplateFrame *frame); + +lglTemplateFrame *lgl_template_frame_rect_new (const gchar *id, + gdouble w, + gdouble h, + gdouble r, + gdouble x_waste, + gdouble y_waste); + +lglTemplateAlias *lgl_template_alias_new (const gchar *brand, + const gchar *part); + +lglTemplateFrame *lgl_template_frame_round_new (const gchar *id, + gdouble r, + gdouble waste); + +lglTemplateFrame *lgl_template_frame_cd_new (const gchar *id, + gdouble r1, + gdouble r2, + gdouble w, + gdouble h, + gdouble waste); + +void lgl_template_frame_add_layout (lglTemplateFrame *frame, + lglTemplateLayout *layout); + +void lgl_template_frame_add_markup (lglTemplateFrame *frame, + lglTemplateMarkup *markup); + +lglTemplateLayout *lgl_template_layout_new (gint nx, + gint ny, + gdouble x0, + gdouble y0, + gdouble dx, + gdouble dy); + +lglTemplateMarkup *lgl_template_markup_margin_new (gdouble size); + +lglTemplateMarkup *lgl_template_markup_line_new (gdouble x1, + gdouble y1, + gdouble x2, + gdouble y2); + +lglTemplateMarkup *lgl_template_markup_circle_new (gdouble x0, + gdouble y0, + gdouble r); + +lglTemplateMarkup *lgl_template_markup_rect_new (gdouble x1, + gdouble y1, + gdouble w, + gdouble h, + gdouble r); + +lglTemplate *lgl_template_dup (const lglTemplate *orig_template); + +void lgl_template_free (lglTemplate *template); + +lglTemplateAlias *lgl_template_alias_dup (const lglTemplateAlias *orig_alias); +void lgl_template_alias_free (lglTemplateAlias *alias); + +lglTemplateFrame *lgl_template_frame_dup (const lglTemplateFrame *orig_frame); +void lgl_template_frame_free (lglTemplateFrame *frame); + +lglTemplateLayout *lgl_template_layout_dup (const lglTemplateLayout *orig_layout); +void lgl_template_layout_free (lglTemplateLayout *layout); + +lglTemplateMarkup *lgl_template_markup_dup (const lglTemplateMarkup *orig_markup); +void lgl_template_markup_free (lglTemplateMarkup *markup); + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/xml-category.c b/libglabels/xml-category.c new file mode 100644 index 00000000..4925eba3 --- /dev/null +++ b/libglabels/xml-category.c @@ -0,0 +1,175 @@ +/* + * xml-category.c + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#include + +#include "xml-category.h" + +#include +#include +#include +#include + +#include "libglabels-private.h" + +#include "xml.h" + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + + +/** + * lgl_xml_category_read_categories_from_file: + * @utf8_filename: Filename of categories file (name encoded as UTF-8) + * + * Read category definitions from a file. + * + * Returns: a list of #lglCategory structures. + * + */ +GList * +lgl_xml_category_read_categories_from_file (gchar *utf8_filename) +{ + gchar *filename; + GList *categories; + xmlDocPtr categories_doc; + + LIBXML_TEST_VERSION; + + filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); + if (!filename) { + g_message ("Utf8 filename conversion error"); + return NULL; + } + + categories_doc = xmlParseFile (filename); + if (!categories_doc) { + g_message ("\"%s\" is not a glabels category file (not XML)", + filename); + return NULL; + } + + categories = lgl_xml_category_parse_categories_doc (categories_doc); + + g_free (filename); + xmlFreeDoc (categories_doc); + + return categories; +} + + +/** + * lgl_xml_category_parse_categories_doc: + * @categories_doc: libxml #xmlDocPtr tree, representing a categories + * definition file. + * + * Read category definitions from a libxml #xmlDocPtr tree. + * + * Returns: a list of #lglCategory structures. + * + */ +GList * +lgl_xml_category_parse_categories_doc (xmlDocPtr categories_doc) +{ + GList *categories = NULL; + xmlNodePtr root, node; + lglCategory *category; + + LIBXML_TEST_VERSION; + + root = xmlDocGetRootElement (categories_doc); + if (!root || !root->name) { + g_message ("\"%s\" is not a glabels category file (no root node)", + categories_doc->name); + xmlFreeDoc (categories_doc); + return categories; + } + if (!lgl_xml_is_node (root, "Glabels-categories")) { + g_message ("\"%s\" is not a glabels category file (wrong root node)", + categories_doc->name); + xmlFreeDoc (categories_doc); + return categories; + } + + for (node = root->xmlChildrenNode; node != NULL; node = node->next) { + + if (lgl_xml_is_node (node, "Category")) { + category = lgl_xml_category_parse_category_node (node); + categories = g_list_append (categories, category); + } else { + if ( !xmlNodeIsText(node) ) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + } + + return categories; +} + + +/** + * lgl_xml_category_parse_category_node: + * @category_node: libxml #xmlNodePtr category node from a #xmlDocPtr tree. + * + * Read a single category definition from a libxml #xmlNodePtr node. + * + * Returns: a pointer to a newly created #lglCategory structure. + * + */ +lglCategory * +lgl_xml_category_parse_category_node (xmlNodePtr category_node) +{ + lglCategory *category; + gchar *id, *name; + + LIBXML_TEST_VERSION; + + id = lgl_xml_get_prop_string (category_node, "id", NULL); + name = lgl_xml_get_prop_i18n_string (category_node, "name", NULL); + + category = lgl_category_new (id, name); + + g_free (id); + g_free (name); + + return category; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/xml-category.h b/libglabels/xml-category.h new file mode 100644 index 00000000..815acf96 --- /dev/null +++ b/libglabels/xml-category.h @@ -0,0 +1,51 @@ +/* + * xml-category.h + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __XML_CATEGORY_H__ +#define __XML_CATEGORY_H__ + +#include +#include + +#include "category.h" + +G_BEGIN_DECLS + +GList *lgl_xml_category_read_categories_from_file (gchar *utf8_filename); + +GList *lgl_xml_category_parse_categories_doc (xmlDocPtr categories_doc); + +lglCategory *lgl_xml_category_parse_category_node (xmlNodePtr category_node); + + +G_END_DECLS + +#endif /* __XML_CATEGORY_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/xml-paper.c b/libglabels/xml-paper.c new file mode 100644 index 00000000..00263e71 --- /dev/null +++ b/libglabels/xml-paper.c @@ -0,0 +1,182 @@ +/* + * xml-paper.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#include + +#include "xml-paper.h" + +#include +#include +#include +#include + +#include "libglabels-private.h" + +#include "xml.h" + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + + +/** + * lgl_xml_paper_read_papers_from_file: + * @utf8_filename: Filename of papers file (name encoded as UTF-8) + * + * Read paper definitions from a file. + * + * Returns: a list of #lglPaper structures. + * + */ +GList * +lgl_xml_paper_read_papers_from_file (gchar *utf8_filename) +{ + gchar *filename; + GList *papers; + xmlDocPtr papers_doc; + + LIBXML_TEST_VERSION; + + filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); + if (!filename) { + g_message ("Utf8 filename conversion error"); + return NULL; + } + + papers_doc = xmlParseFile (filename); + if (!papers_doc) { + g_message ("\"%s\" is not a glabels paper file (not XML)", + filename); + return NULL; + } + + papers = lgl_xml_paper_parse_papers_doc (papers_doc); + + g_free (filename); + xmlFreeDoc (papers_doc); + + return papers; +} + + +/** + * lgl_xml_paper_parse_papers_doc: + * @papers_doc: libxml #xmlDocPtr tree, representing a papers definition file. + * + * Read paper definitions from a libxml #xmlDocPtr tree. + * + * Returns: a list of #lglPaper structures. + * + */ +GList * +lgl_xml_paper_parse_papers_doc (xmlDocPtr papers_doc) +{ + GList *papers = NULL; + xmlNodePtr root, node; + lglPaper *paper; + + LIBXML_TEST_VERSION; + + root = xmlDocGetRootElement (papers_doc); + if (!root || !root->name) { + g_message ("\"%s\" is not a glabels paper file (no root node)", + papers_doc->name); + xmlFreeDoc (papers_doc); + return papers; + } + if (!lgl_xml_is_node (root, "Glabels-paper-sizes")) { + g_message ("\"%s\" is not a glabels paper file (wrong root node)", + papers_doc->name); + xmlFreeDoc (papers_doc); + return papers; + } + + for (node = root->xmlChildrenNode; node != NULL; node = node->next) { + + if (lgl_xml_is_node (node, "Paper-size")) { + paper = lgl_xml_paper_parse_paper_node (node); + papers = g_list_append (papers, paper); + } else { + if ( !xmlNodeIsText(node) ) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + } + + return papers; +} + + +/** + * lgl_xml_paper_parse_paper_node: + * @paper_node: libxml #xmlNodePtr paper node from a #xmlDocPtr tree. + * + * Read a single paper definition from a libxml #xmlNodePtr node. + * + * Returns: a pointer to a newly created #lglPaper structure. + * + */ +lglPaper * +lgl_xml_paper_parse_paper_node (xmlNodePtr paper_node) +{ + lglPaper *paper; + gchar *id, *name, *pwg_size; + gdouble width, height; + + LIBXML_TEST_VERSION; + + id = lgl_xml_get_prop_string (paper_node, "id", NULL); + + name = lgl_xml_get_prop_i18n_string (paper_node, "name", NULL); + + width = lgl_xml_get_prop_length (paper_node, "width", 0); + height = lgl_xml_get_prop_length (paper_node, "height", 0); + + pwg_size = lgl_xml_get_prop_string (paper_node, "pwg_size", NULL); + + paper = lgl_paper_new (id, name, width, height, pwg_size); + + g_free (id); + g_free (name); + g_free (pwg_size); + + return paper; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/xml-paper.h b/libglabels/xml-paper.h new file mode 100644 index 00000000..bffda36f --- /dev/null +++ b/libglabels/xml-paper.h @@ -0,0 +1,51 @@ +/* + * xml-paper.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __XML_PAPER_H__ +#define __XML_PAPER_H__ + +#include +#include + +#include "paper.h" + +G_BEGIN_DECLS + +GList *lgl_xml_paper_read_papers_from_file (gchar *utf8_filename); + +GList *lgl_xml_paper_parse_papers_doc (xmlDocPtr papers_doc); + +lglPaper *lgl_xml_paper_parse_paper_node (xmlNodePtr paper_node); + + +G_END_DECLS + +#endif /* __XML_PAPER_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/xml-template.c b/libglabels/xml-template.c new file mode 100644 index 00000000..9a880c3c --- /dev/null +++ b/libglabels/xml-template.c @@ -0,0 +1,976 @@ +/* + * xml-template.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#include + +#include "xml-template.h" + +#include +#include +#include +#include + +#include "libglabels-private.h" + +#include "db.h" +#include "xml.h" + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ +static void xml_parse_meta_node (xmlNodePtr label_node, + lglTemplate *template); +static void xml_parse_label_rectangle_node (xmlNodePtr label_node, + lglTemplate *template); +static void xml_parse_label_round_node (xmlNodePtr label_node, + lglTemplate *template); +static void xml_parse_label_cd_node (xmlNodePtr label_node, + lglTemplate *template); +static void xml_parse_layout_node (xmlNodePtr layout_node, + lglTemplateFrame *frame); +static void xml_parse_markup_margin_node (xmlNodePtr markup_node, + lglTemplateFrame *frame); +static void xml_parse_markup_line_node (xmlNodePtr markup_node, + lglTemplateFrame *frame); +static void xml_parse_markup_circle_node (xmlNodePtr markup_node, + lglTemplateFrame *frame); +static void xml_parse_markup_rect_node (xmlNodePtr markup_node, + lglTemplateFrame *frame); +static void xml_parse_alias_node (xmlNodePtr alias_node, + lglTemplate *template); + +static void xml_create_meta_node (const gchar *category, + xmlNodePtr root, + const xmlNsPtr ns); +static void xml_create_label_node (const lglTemplateFrame *frame, + xmlNodePtr root, + const xmlNsPtr ns); +static void xml_create_layout_node (const lglTemplateLayout *layout, + xmlNodePtr root, + const xmlNsPtr ns); +static void xml_create_markup_margin_node (const lglTemplateMarkup *margin, + xmlNodePtr root, + const xmlNsPtr ns); +static void xml_create_markup_line_node (const lglTemplateMarkup *line, + xmlNodePtr root, + const xmlNsPtr ns); +static void xml_create_markup_circle_node (const lglTemplateMarkup *circle, + xmlNodePtr root, + const xmlNsPtr ns); +static void xml_create_markup_rect_node (const lglTemplateMarkup *circle, + xmlNodePtr root, + const xmlNsPtr ns); +static void xml_create_alias_node (const lglTemplateAlias *alias, + xmlNodePtr root, + const xmlNsPtr ns); + + +/** + * lgl_xml_template_read_templates_from_file: + * @utf8_filename: Filename of papers file (name encoded as UTF-8) + * + * Read glabels templates from template file. + * + * Returns: a list of #lglTemplate structures. + * + */ +GList * +lgl_xml_template_read_templates_from_file (const gchar *utf8_filename) +{ + gchar *filename; + xmlDocPtr templates_doc; + GList *templates = NULL; + + LIBXML_TEST_VERSION; + + filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); + if (!filename) { + g_message ("Utf8 filename conversion error"); + return NULL; + } + + templates_doc = xmlParseFile (filename); + if (!templates_doc) { + g_message ("\"%s\" is not a glabels template file (not XML)", + filename); + return templates; + } + + templates = lgl_xml_template_parse_templates_doc (templates_doc); + + g_free (filename); + xmlFreeDoc (templates_doc); + + return templates; +} + + +/** + * lgl_xml_template_parse_templates_doc: + * @templates_doc: libxml #xmlDocPtr tree, representing template file. + * + * Read glabels templates from a libxml #xmlDocPtr tree. + * + * Returns: a list of #lglTemplate structures. + * + */ +GList * +lgl_xml_template_parse_templates_doc (const xmlDocPtr templates_doc) +{ + + GList *templates = NULL; + xmlNodePtr root, node; + lglTemplate *template; + + LIBXML_TEST_VERSION; + + root = xmlDocGetRootElement (templates_doc); + if (!root || !root->name) { + g_message ("\"%s\" is not a glabels template file (no root node)", + templates_doc->URL); + return templates; + } + if (!lgl_xml_is_node (root, "Glabels-templates")) { + g_message ("\"%s\" is not a glabels template file (wrong root node)", + templates_doc->URL); + return templates; + } + + for (node = root->xmlChildrenNode; node != NULL; node = node->next) { + + if (lgl_xml_is_node (node, "Template")) { + template = lgl_xml_template_parse_template_node (node); + templates = g_list_append (templates, template); + } else { + if ( !xmlNodeIsText(node) ) { + if (!lgl_xml_is_node (node,"comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + } + + return templates; +} + + +/** + * lgl_xml_template_parse_template_node: + * @template_node: libxml #xmlNodePtr template node from a #xmlDocPtr tree. + * + * Read a single glabels template from a libxml #xmlNodePtr node. + * + * Returns: a pointer to a newly created #lglTemplate structure. + * + */ +lglTemplate * +lgl_xml_template_parse_template_node (const xmlNodePtr template_node) +{ + gchar *brand; + gchar *part; + gchar *name; + gchar *description; + gchar *paper_id; + gdouble page_width, page_height; + lglPaper *paper = NULL; + lglTemplate *template; + xmlNodePtr node; + gchar **v; + + brand = lgl_xml_get_prop_string (template_node, "brand", NULL); + part = lgl_xml_get_prop_string (template_node, "part", NULL); + if (!brand || !part) + { + name = lgl_xml_get_prop_string (template_node, "name", NULL); + if (name) + { + v = g_strsplit (name, " ", 2); + brand = g_strdup (v[0]); + part = g_strchug (g_strdup (v[1])); + g_free (name); + g_strfreev (v); + + } + else + { + g_message (_("Missing name or brand/part attributes.")); + } + } + + description = lgl_xml_get_prop_i18n_string (template_node, "description", NULL); + paper_id = lgl_xml_get_prop_string (template_node, "size", NULL); + + if (lgl_db_is_paper_id_other (paper_id)) { + + page_width = lgl_xml_get_prop_length (template_node, "width", 0); + page_height = lgl_xml_get_prop_length (template_node, "height", 0); + + } else { + paper = lgl_db_lookup_paper_from_id (paper_id); + if (paper == NULL) { + /* This should always be an id, but just in case a name + slips by! */ + g_message (_("Unknown page size id \"%s\", trying as name"), + paper_id); + paper = lgl_db_lookup_paper_from_name (paper_id); + g_free (paper_id); + paper_id = g_strdup (paper->id); + } + if (paper != NULL) { + page_width = paper->width; + page_height = paper->height; + } else { + page_width = 612; + page_height = 792; + g_message (_("Unknown page size id or name \"%s\""), + paper_id); + } + lgl_paper_free (paper); + paper = NULL; + } + + template = lgl_template_new (brand, part, description, + paper_id, page_width, page_height); + + for (node = template_node->xmlChildrenNode; node != NULL; + node = node->next) { + if (lgl_xml_is_node (node, "Meta")) { + xml_parse_meta_node (node, template); + } else if (lgl_xml_is_node (node, "Label-rectangle")) { + xml_parse_label_rectangle_node (node, template); + } else if (lgl_xml_is_node (node, "Label-round")) { + xml_parse_label_round_node (node, template); + } else if (lgl_xml_is_node (node, "Label-cd")) { + xml_parse_label_cd_node (node, template); + } else if (lgl_xml_is_node (node, "Alias")) { + xml_parse_alias_node (node, template); + } else { + if (!xmlNodeIsText (node)) { + if (!lgl_xml_is_node (node,"comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + } + + g_free (brand); + g_free (part); + g_free (description); + g_free (paper_id); + + return template; +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Meta Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_meta_node (xmlNodePtr meta_node, + lglTemplate *template) +{ + gchar *category; + + category = lgl_xml_get_prop_string (meta_node, "category", NULL); + + if (category != NULL) + { + lgl_template_add_category (template, category); + g_free (category); + } +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Label-rectangle Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_label_rectangle_node (xmlNodePtr label_node, + lglTemplate *template) +{ + gchar *id; + gchar *tmp; + gdouble x_waste, y_waste; + gdouble w, h, r; + lglTemplateFrame *frame; + xmlNodePtr node; + + id = lgl_xml_get_prop_string (label_node, "id", NULL); + + if ((tmp = lgl_xml_get_prop_string (label_node, "waste", NULL))) { + /* Handle single "waste" property. */ + x_waste = y_waste = lgl_xml_get_prop_length (label_node, "waste", 0); + g_free (tmp); + } else { + x_waste = lgl_xml_get_prop_length (label_node, "x_waste", 0); + y_waste = lgl_xml_get_prop_length (label_node, "y_waste", 0); + } + + w = lgl_xml_get_prop_length (label_node, "width", 0); + h = lgl_xml_get_prop_length (label_node, "height", 0); + r = lgl_xml_get_prop_length (label_node, "round", 0); + + frame = lgl_template_frame_rect_new ((gchar *)id, w, h, r, x_waste, y_waste); + lgl_template_add_frame (template, frame); + + for (node = label_node->xmlChildrenNode; node != NULL; + node = node->next) { + if (lgl_xml_is_node (node, "Layout")) { + xml_parse_layout_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-margin")) { + xml_parse_markup_margin_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-line")) { + xml_parse_markup_line_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-circle")) { + xml_parse_markup_circle_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-rect")) { + xml_parse_markup_rect_node (node, frame); + } else if (!xmlNodeIsText (node)) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + + g_free (id); +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Label-round Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_label_round_node (xmlNodePtr label_node, + lglTemplate *template) +{ + gchar *id; + gdouble waste; + gdouble r; + lglTemplateFrame *frame; + xmlNodePtr node; + + id = lgl_xml_get_prop_string (label_node, "id", NULL); + waste = lgl_xml_get_prop_length (label_node, "waste", 0); + r = lgl_xml_get_prop_length (label_node, "radius", 0); + + frame = lgl_template_frame_round_new ((gchar *)id, r, waste); + lgl_template_add_frame (template, frame); + + for (node = label_node->xmlChildrenNode; node != NULL; + node = node->next) { + if (lgl_xml_is_node (node, "Layout")) { + xml_parse_layout_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-margin")) { + xml_parse_markup_margin_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-line")) { + xml_parse_markup_line_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-circle")) { + xml_parse_markup_circle_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-rect")) { + xml_parse_markup_rect_node (node, frame); + } else if (!xmlNodeIsText (node)) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + + g_free (id); +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Label-cd Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_label_cd_node (xmlNodePtr label_node, + lglTemplate *template) +{ + gchar *id; + gdouble waste; + gdouble r1, r2, w, h; + lglTemplateFrame *frame; + xmlNodePtr node; + + id = lgl_xml_get_prop_string (label_node, "id", NULL); + waste = lgl_xml_get_prop_length (label_node, "waste", 0); + r1 = lgl_xml_get_prop_length (label_node, "radius", 0); + r2 = lgl_xml_get_prop_length (label_node, "hole", 0); + w = lgl_xml_get_prop_length (label_node, "width", 0); + h = lgl_xml_get_prop_length (label_node, "height", 0); + + frame = lgl_template_frame_cd_new ((gchar *)id, r1, r2, w, h, waste); + lgl_template_add_frame (template, frame); + + for (node = label_node->xmlChildrenNode; node != NULL; + node = node->next) { + if (lgl_xml_is_node (node, "Layout")) { + xml_parse_layout_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-margin")) { + xml_parse_markup_margin_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-line")) { + xml_parse_markup_line_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-circle")) { + xml_parse_markup_circle_node (node, frame); + } else if (lgl_xml_is_node (node, "Markup-rect")) { + xml_parse_markup_rect_node (node, frame); + } else if (!xmlNodeIsText (node)) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + + g_free (id); +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Label->Layout Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_layout_node (xmlNodePtr layout_node, + lglTemplateFrame *frame) +{ + gint nx, ny; + gdouble x0, y0, dx, dy; + xmlNodePtr node; + + nx = lgl_xml_get_prop_int (layout_node, "nx", 1); + ny = lgl_xml_get_prop_int (layout_node, "ny", 1); + + x0 = lgl_xml_get_prop_length (layout_node, "x0", 0); + y0 = lgl_xml_get_prop_length (layout_node, "y0", 0); + + dx = lgl_xml_get_prop_length (layout_node, "dx", 0); + dy = lgl_xml_get_prop_length (layout_node, "dy", 0); + + lgl_template_frame_add_layout (frame, lgl_template_layout_new (nx, ny, x0, y0, dx, dy)); + + for (node = layout_node->xmlChildrenNode; node != NULL; + node = node->next) { + if (!xmlNodeIsText (node)) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Label->Markup-margin Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_markup_margin_node (xmlNodePtr markup_node, + lglTemplateFrame *frame) +{ + gdouble size; + xmlNodePtr node; + + size = lgl_xml_get_prop_length (markup_node, "size", 0); + + lgl_template_frame_add_markup (frame, lgl_template_markup_margin_new (size)); + + for (node = markup_node->xmlChildrenNode; node != NULL; + node = node->next) { + if (!xmlNodeIsText (node)) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Label->Markup-line Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_markup_line_node (xmlNodePtr markup_node, + lglTemplateFrame *frame) +{ + gdouble x1, y1, x2, y2; + xmlNodePtr node; + + x1 = lgl_xml_get_prop_length (markup_node, "x1", 0); + y1 = lgl_xml_get_prop_length (markup_node, "y1", 0); + x2 = lgl_xml_get_prop_length (markup_node, "x2", 0); + y2 = lgl_xml_get_prop_length (markup_node, "y2", 0); + + lgl_template_frame_add_markup (frame, lgl_template_markup_line_new (x1, y1, x2, y2)); + + for (node = markup_node->xmlChildrenNode; node != NULL; + node = node->next) { + if (!xmlNodeIsText (node)) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Label->Markup-circle Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_markup_circle_node (xmlNodePtr markup_node, + lglTemplateFrame *frame) +{ + gdouble x0, y0, r; + xmlNodePtr node; + + x0 = lgl_xml_get_prop_length (markup_node, "x0", 0); + y0 = lgl_xml_get_prop_length (markup_node, "y0", 0); + r = lgl_xml_get_prop_length (markup_node, "radius", 0); + + lgl_template_frame_add_markup (frame, lgl_template_markup_circle_new (x0, y0, r)); + + for (node = markup_node->xmlChildrenNode; node != NULL; + node = node->next) { + if (!xmlNodeIsText (node)) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Label->Markup-rect Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_markup_rect_node (xmlNodePtr markup_node, + lglTemplateFrame *frame) +{ + gdouble x1, y1, w, h, r; + xmlNodePtr node; + + x1 = lgl_xml_get_prop_length (markup_node, "x1", 0); + y1 = lgl_xml_get_prop_length (markup_node, "y1", 0); + w = lgl_xml_get_prop_length (markup_node, "w", 0); + h = lgl_xml_get_prop_length (markup_node, "h", 0); + r = lgl_xml_get_prop_length (markup_node, "r", 0); + + lgl_template_frame_add_markup (frame, lgl_template_markup_rect_new (x1, y1, w, h, r)); + + for (node = markup_node->xmlChildrenNode; node != NULL; + node = node->next) { + if (!xmlNodeIsText (node)) { + if (!lgl_xml_is_node (node, "comment")) { + g_message ("bad node = \"%s\"",node->name); + } + } + } + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Template->Alias Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_alias_node (xmlNodePtr alias_node, + lglTemplate *template) +{ + gchar *brand; + gchar *part; + gchar *name; + gchar **v; + + brand = lgl_xml_get_prop_string (alias_node, "brand", NULL); + part = lgl_xml_get_prop_string (alias_node, "part", NULL); + if (!brand || !part) + { + name = lgl_xml_get_prop_string (alias_node, "name", NULL); + if (name) + { + g_message (_("Missing required \"brand\" or \"part\" attribute, trying deprecated name.")); + v = g_strsplit (name, " ", 2); + brand = g_strdup (v[0]); + part = g_strdup (v[1]); + g_free (name); + g_strfreev (v); + + } + else + { + g_message (_("Name attribute also missing.")); + } + } + + lgl_template_add_alias (template, lgl_template_alias_new (brand, part)); + + g_free (brand); + g_free (part); +} + +/** + * lgl_xml_template_write_templates_to_file: + * @templates: List of #lglTemplate structures + * @utf8_filename: Filename of templates file (name encoded as UTF-8) + * + * Write a list of #lglTemplate structures to a glabels XML template file. + * + * Returns: the number of bytes written or -1 in case of failure + * + */ +gint +lgl_xml_template_write_templates_to_file (GList *templates, + const gchar *utf8_filename) +{ + xmlDocPtr doc; + xmlNsPtr ns; + gint bytes_written; + GList *p; + lglTemplate *template; + gchar *filename; + + doc = xmlNewDoc ((xmlChar *)"1.0"); + doc->xmlRootNode = xmlNewDocNode (doc, NULL, (xmlChar *)"Glabels-templates", NULL); + + ns = xmlNewNs (doc->xmlRootNode, (xmlChar *)LGL_XML_NAME_SPACE, NULL); + xmlSetNs (doc->xmlRootNode, ns); + + for (p=templates; p!=NULL; p=p->next) { + template = (lglTemplate *)p->data; + lgl_xml_template_create_template_node (template, doc->xmlRootNode, ns); + } + + filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); + if (!filename) + { + g_message (_("Utf8 conversion error.")); + return -1; + } + else + { + xmlSetDocCompressMode (doc, 0); + bytes_written = xmlSaveFormatFile (filename, doc, TRUE); + xmlFreeDoc (doc); + g_free (filename); + return bytes_written; + } + +} + + +/** + * lgl_xml_template_write_template_to_file: + * @template: #lglTemplate structure to be written + * @utf8_filename: Filename of templates file (name encoded as UTF-8) + * + * Write a single #lglTemplate structures to a glabels XML template file. + * + * Returns: the number of bytes written or -1 in case of failure + * + */ +gint +lgl_xml_template_write_template_to_file (const lglTemplate *template, + const gchar *utf8_filename) +{ + GList *templates = NULL; + gint bytes_written; + + templates = g_list_append (templates, (gpointer)template); + + bytes_written = lgl_xml_template_write_templates_to_file (templates, utf8_filename); + + g_list_free (templates); + + return bytes_written; +} + + +/** + * lgl_xml_template_create_template_node: + * @template: #lglTemplate structure to be written + * @root: parent node to receive new child node + * @ns: a libxml #xmlNsPtr + * + * Add a single #lglTemplate child node to given #xmlNodePtr. + * + */ +void +lgl_xml_template_create_template_node (const lglTemplate *template, + xmlNodePtr root, + const xmlNsPtr ns) +{ + xmlNodePtr node; + GList *p; + lglTemplateAlias *alias; + lglTemplateFrame *frame; + + node = xmlNewChild (root, ns, (xmlChar *)"Template", NULL); + + lgl_xml_set_prop_string (node, "brand", template->brand); + lgl_xml_set_prop_string (node, "part", template->part); + + lgl_xml_set_prop_string (node, "size", template->paper_id); + if (xmlStrEqual ((xmlChar *)template->paper_id, (xmlChar *)"Other")) + { + + lgl_xml_set_prop_length (node, "width", template->page_width); + lgl_xml_set_prop_length (node, "height", template->page_height); + + } + + lgl_xml_set_prop_string (node, "description", template->description); + + for ( p=template->aliases; p != NULL; p=p->next ) { + alias = (lglTemplateAlias *)p->data; + if ( !(xmlStrEqual ((xmlChar *)template->brand, (xmlChar *)alias->brand) && + xmlStrEqual ((xmlChar *)template->part, (xmlChar *)alias->part)) ) + { + xml_create_alias_node ( alias, node, ns ); + } + } + for ( p=template->category_ids; p != NULL; p=p->next ) + { + xml_create_meta_node ( p->data, node, ns ); + } + for ( p=template->frames; p != NULL; p=p->next ) + { + frame = (lglTemplateFrame *)p->data; + xml_create_label_node (frame, node, ns); + } + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Template->Meta Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_meta_node (const gchar *category, + xmlNodePtr root, + const xmlNsPtr ns) +{ + xmlNodePtr node; + + node = xmlNewChild (root, ns, (xmlChar *)"Meta", NULL); + lgl_xml_set_prop_string (node, "category", category); + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Template->Label Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_label_node (const lglTemplateFrame *frame, + xmlNodePtr root, + const xmlNsPtr ns) +{ + xmlNodePtr node; + GList *p; + lglTemplateMarkup *markup; + lglTemplateLayout *layout; + + switch (frame->shape) { + + case LGL_TEMPLATE_FRAME_SHAPE_RECT: + node = xmlNewChild(root, ns, (xmlChar *)"Label-rectangle", NULL); + lgl_xml_set_prop_string (node, "id", frame->all.id); + lgl_xml_set_prop_length (node, "width", frame->rect.w); + lgl_xml_set_prop_length (node, "height", frame->rect.h); + lgl_xml_set_prop_length (node, "round", frame->rect.r); + lgl_xml_set_prop_length (node, "x_waste", frame->rect.x_waste); + lgl_xml_set_prop_length (node, "y_waste", frame->rect.y_waste); + break; + + case LGL_TEMPLATE_FRAME_SHAPE_ROUND: + node = xmlNewChild(root, ns, (xmlChar *)"Label-round", NULL); + lgl_xml_set_prop_string (node, "id", frame->all.id); + lgl_xml_set_prop_length (node, "radius", frame->round.r); + lgl_xml_set_prop_length (node, "waste", frame->round.waste); + break; + + case LGL_TEMPLATE_FRAME_SHAPE_CD: + node = xmlNewChild(root, ns, (xmlChar *)"Label-cd", NULL); + lgl_xml_set_prop_string (node, "id", frame->all.id); + lgl_xml_set_prop_length (node, "radius", frame->cd.r1); + lgl_xml_set_prop_length (node, "hole", frame->cd.r2); + if (frame->cd.w != 0.0) { + lgl_xml_set_prop_length (node, "width", frame->cd.w); + } + if (frame->cd.h != 0.0) { + lgl_xml_set_prop_length (node, "height", frame->cd.h); + } + lgl_xml_set_prop_length (node, "waste", frame->cd.waste); + break; + + default: + g_message ("Unknown label style"); + return; + break; + + } + + for ( p=frame->all.markups; p != NULL; p=p->next ) { + markup = (lglTemplateMarkup *)p->data; + switch (markup->type) { + case LGL_TEMPLATE_MARKUP_MARGIN: + xml_create_markup_margin_node (markup, node, ns); + break; + case LGL_TEMPLATE_MARKUP_LINE: + xml_create_markup_line_node (markup, node, ns); + break; + case LGL_TEMPLATE_MARKUP_CIRCLE: + xml_create_markup_circle_node (markup, node, ns); + break; + case LGL_TEMPLATE_MARKUP_RECT: + xml_create_markup_rect_node (markup, node, ns); + break; + default: + g_message ("Unknown markup type"); + break; + } + } + + for ( p=frame->all.layouts; p != NULL; p=p->next ) { + layout = (lglTemplateLayout *)p->data; + xml_create_layout_node (layout, node, ns); + } + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Template->Label->Layout Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_layout_node (const lglTemplateLayout *layout, + xmlNodePtr root, + const xmlNsPtr ns) +{ + xmlNodePtr node; + + node = xmlNewChild(root, ns, (xmlChar *)"Layout", NULL); + lgl_xml_set_prop_int (node, "nx", layout->nx); + lgl_xml_set_prop_int (node, "ny", layout->ny); + lgl_xml_set_prop_length (node, "x0", layout->x0); + lgl_xml_set_prop_length (node, "y0", layout->y0); + lgl_xml_set_prop_length (node, "dx", layout->dx); + lgl_xml_set_prop_length (node, "dy", layout->dy); + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Template->Label->Markup-margin Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_markup_margin_node (const lglTemplateMarkup *markup, + xmlNodePtr root, + const xmlNsPtr ns) +{ + xmlNodePtr node; + + node = xmlNewChild(root, ns, (xmlChar *)"Markup-margin", NULL); + + lgl_xml_set_prop_length (node, "size", markup->margin.size); + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Template->Label->Markup-line Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_markup_line_node (const lglTemplateMarkup *markup, + xmlNodePtr root, + const xmlNsPtr ns) +{ + xmlNodePtr node; + + node = xmlNewChild(root, ns, (xmlChar *)"Markup-line", NULL); + + lgl_xml_set_prop_length (node, "x1", markup->line.x1); + lgl_xml_set_prop_length (node, "y1", markup->line.y1); + lgl_xml_set_prop_length (node, "x2", markup->line.x2); + lgl_xml_set_prop_length (node, "y2", markup->line.y2); + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Template->Label->Markup-circle Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_markup_circle_node (const lglTemplateMarkup *markup, + xmlNodePtr root, + const xmlNsPtr ns) +{ + xmlNodePtr node; + + node = xmlNewChild(root, ns, (xmlChar *)"Markup-circle", NULL); + + lgl_xml_set_prop_length (node, "x0", markup->circle.x0); + lgl_xml_set_prop_length (node, "y0", markup->circle.y0); + lgl_xml_set_prop_length (node, "radius", markup->circle.r); + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Template->Label->Markup-rect Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_markup_rect_node (const lglTemplateMarkup *markup, + xmlNodePtr root, + const xmlNsPtr ns) +{ + xmlNodePtr node; + + node = xmlNewChild(root, ns, (xmlChar *)"Markup-rect", NULL); + + lgl_xml_set_prop_length (node, "x1", markup->rect.x1); + lgl_xml_set_prop_length (node, "y1", markup->rect.y1); + lgl_xml_set_prop_length (node, "w", markup->rect.w); + lgl_xml_set_prop_length (node, "h", markup->rect.h); + lgl_xml_set_prop_length (node, "r", markup->rect.r); + +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Template->Alias Node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_alias_node (const lglTemplateAlias *alias, + xmlNodePtr root, + const xmlNsPtr ns) +{ + xmlNodePtr node; + + node = xmlNewChild (root, ns, (xmlChar *)"Alias", NULL); + + lgl_xml_set_prop_string (node, "brand", alias->brand); + lgl_xml_set_prop_string (node, "part", alias->part); + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/xml-template.h b/libglabels/xml-template.h new file mode 100644 index 00000000..e4460070 --- /dev/null +++ b/libglabels/xml-template.h @@ -0,0 +1,61 @@ +/* + * xml-template.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __XML_TEMPLATE_H__ +#define __XML_TEMPLATE_H__ + +#include +#include + +#include "template.h" + +G_BEGIN_DECLS + +GList *lgl_xml_template_read_templates_from_file (const gchar *utf8_filename); + +GList *lgl_xml_template_parse_templates_doc (const xmlDocPtr templates_doc); + +lglTemplate *lgl_xml_template_parse_template_node (const xmlNodePtr template_node); + + +gint lgl_xml_template_write_templates_to_file (GList *templates, + const gchar *utf8_filename); + +gint lgl_xml_template_write_template_to_file (const lglTemplate *template, + const gchar *utf8_filename); + +void lgl_xml_template_create_template_node (const lglTemplate *template, + xmlNodePtr root, + const xmlNsPtr ns); + +G_END_DECLS + +#endif /* __XML_TEMPLATE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/xml.c b/libglabels/xml.c new file mode 100644 index 00000000..91cbb205 --- /dev/null +++ b/libglabels/xml.c @@ -0,0 +1,543 @@ +/* + * xml.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#include + +#include "xml.h" + +#include +#include +#include + +#include "libglabels-private.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + +#define POINTS_PER_POINT 1.0 /* internal units are points. */ +#define POINTS_PER_INCH 72.0 +#define POINTS_PER_MM 2.83464566929 +#define POINTS_PER_CM (10.0*POINTS_PER_MM) +#define POINTS_PER_PICA (1.0/12.0) + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +typedef struct { + xmlChar *name; + gdouble points_per_unit; +} UnitTableEntry; + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static UnitTableEntry unit_table[] = { + + /* These names are identical to the absolute length units supported in + the CSS2 Specification (Section 4.3.2) */ + + /* This table must be sorted exactly as the enumerations in lglUnitsType */ + + /* [LGL_UNITS_POINT] */ {(xmlChar *)"pt", POINTS_PER_POINT}, + /* [LGL_UNITS_INCH] */ {(xmlChar *)"in", POINTS_PER_INCH}, + /* [LGL_UNITS_MM] */ {(xmlChar *)"mm", POINTS_PER_MM}, + /* [LGL_UNITS_CM] */ {(xmlChar *)"cm", POINTS_PER_CM}, + /* [LGL_UNITS_PICA] */ {(xmlChar *)"pc", POINTS_PER_PICA}, + +}; + +static lglUnitsType default_units = LGL_UNITS_POINT; + + +/****************************************************************************/ + +/** + * lgl_xml_get_prop_string: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @default_val: a default value to return if property not found + * + * Return value of property as a string. + * + * Returns: the property as a pointer to a gchar string. This string should + * be freed with g_free(). + * + */ +gchar * +lgl_xml_get_prop_string (xmlNodePtr node, + const gchar *property, + const gchar *default_val) +{ + gchar *val; + xmlChar *string; + + string = xmlGetProp (node, (xmlChar *)property); + if ( string != NULL ) { + val = g_strdup ((gchar *)string); + xmlFree (string); + return val; + } + + if (default_val) { + return g_strdup (default_val); + } + + return NULL; +} + + +/** + * lgl_xml_get_prop_i18n_string: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @default_val: a default value to return if property not found + * + * Return value of a translatable property as a string. + * + * Returns: the property as a pointer to a gchar string. This string should + * be freed with g_free(). + * + */ +gchar * +lgl_xml_get_prop_i18n_string (xmlNodePtr node, + const gchar *property, + const gchar *default_val) +{ + gchar *_property; + gchar *val; + xmlChar *string; + + _property = g_strdup_printf ("_%s", property); + string = xmlGetProp (node, (xmlChar *)_property); + g_free (_property); + + if ( string != NULL ) { + + val = g_strdup (gettext ((char *)string)); + xmlFree (string); + return val; + + } + + string = xmlGetProp (node, (xmlChar *)property); + if ( string != NULL ) { + val = g_strdup ((gchar *)string); + xmlFree (string); + return val; + } + + if (default_val) { + return g_strdup (default_val); + } + + return NULL; +} + + +/** + * lgl_xml_get_prop_double: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @default_val: a default value to return if property not found + * + * Return value of property as a double. + * + * Returns: the property as a double. + * + */ +gdouble +lgl_xml_get_prop_double (xmlNodePtr node, + const gchar *property, + gdouble default_val) +{ + gdouble val; + xmlChar *string; + + string = xmlGetProp (node, (xmlChar *)property); + if ( string != NULL ) { + val = g_strtod ((gchar *)string, NULL); + xmlFree (string); + return val; + } + + return default_val; +} + + +/** + * lgl_xml_get_prop_boolean: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @default_val: a default value to return if property not found + * + * Return value of property as a boolean. + * + * Returns: the property as a boolean. + * + */ +gboolean +lgl_xml_get_prop_boolean (xmlNodePtr node, + const gchar *property, + gboolean default_val) +{ + gboolean val; + xmlChar *string; + + string = xmlGetProp (node, (xmlChar *)property); + if ( string != NULL ) { + val = !((xmlStrcasecmp (string, (xmlChar *)"false") == 0) || + xmlStrEqual (string, (xmlChar *)"0"));; + xmlFree (string); + return val; + } + + return default_val; +} + + +/** + * lgl_xml_get_prop_int: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @default_val: a default value to return if property not found + * + * Return value of property as an integer. + * + * Returns: the property as an integer. + * + */ +gint +lgl_xml_get_prop_int (xmlNodePtr node, + const gchar *property, + gint default_val) +{ + gint val; + xmlChar *string; + + string = xmlGetProp (node, (xmlChar *)property); + if ( string != NULL ) { + val = strtol ((char *)string, NULL, 0); + xmlFree (string); + return val; + } + + return default_val; +} + + +/** + * lgl_xml_get_prop_uint: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @default_val: a default value to return if property not found + * + * Return value of property (usually formatted in hex) as an unsigned integer. + * + * Returns: the property as an unsigned integer. + * + */ +guint +lgl_xml_get_prop_uint (xmlNodePtr node, + const gchar *property, + guint default_val) +{ + guint val; + xmlChar *string; + + string = xmlGetProp (node, (xmlChar *)property); + if ( string != NULL ) { + val = strtoul ((char *)string, NULL, 0); + xmlFree (string); + return val; + } + + return default_val; +} + + +/** + * lgl_xml_get_prop_length: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @default_val: a default value to return if property not found + * + * Return value of a length property as a double, converting to internal + * units (points). The property is expected to be formatted as a number + * followed by a units string. If there is no units string, the length + * is assumed to be in points. Valid units strings are "pt" for points, + * "in" for inches, "mm" for millimeters, "cm" for centimeters, and + * "pc" for picas. + * + * Returns: the length in points. + * + */ +gdouble +lgl_xml_get_prop_length (xmlNodePtr node, + const gchar *property, + gdouble default_val) +{ + gdouble val; + xmlChar *string; + xmlChar *unit; + gint i; + + string = xmlGetProp (node, (xmlChar *)property); + if ( string != NULL ) { + + val = g_strtod ((gchar *)string, (gchar **)&unit); + + if (unit != string) { + unit = (xmlChar *)g_strchug ((gchar *)unit); + if (strlen ((char *)unit) > 0 ) { + for (i=LGL_UNITS_FIRST; i<=LGL_UNITS_LAST; i++) { + if (xmlStrcasecmp (unit, unit_table[i].name) == 0) { + val *= unit_table[i].points_per_unit; + break; + } + } + if (i>LGL_UNITS_LAST) { + g_message ("Line %ld, Node \"%s\", Property \"%s\": Unknown unit \"%s\", assuming points", + xmlGetLineNo (node), node->name, property, + unit); + } + } + } + else { + val = 0.0; + } + + xmlFree (string); + return val; + } + + return default_val; +} + + +/** + * lgl_xml_set_prop_string: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @val: the value to set + * + * Set a property from a string. + * + */ +void +lgl_xml_set_prop_string (xmlNodePtr node, + const gchar *property, + const gchar *val) +{ + if (val != NULL) { + xmlSetProp (node, (xmlChar *)property, (xmlChar *)val); + } +} + + +/** + * lgl_xml_set_prop_double: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @val: the value to set + * + * Set a property from a double. + * + */ +void +lgl_xml_set_prop_double (xmlNodePtr node, + const gchar *property, + gdouble val) +{ + gchar *string, buffer[G_ASCII_DTOSTR_BUF_SIZE]; + + /* Guarantee "C" locale by use of g_ascii_formatd */ + string = g_ascii_formatd (buffer, G_ASCII_DTOSTR_BUF_SIZE, "%g", val); + + xmlSetProp (node, (xmlChar *)property, (xmlChar *)string); +} + + +/** + * lgl_xml_set_prop_boolean: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @val: the value to set + * + * Set a property from a boolean. + * + */ +void +lgl_xml_set_prop_boolean (xmlNodePtr node, + const gchar *property, + gboolean val) +{ + xmlSetProp (node, (xmlChar *)property, (xmlChar *)(val ? "True" : "False")); +} + +/** + * lgl_xml_set_prop_int: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @val: the value to set + * + * Set a property from an integer. + * + */ +void +lgl_xml_set_prop_int (xmlNodePtr node, + const gchar *property, + gint val) +{ + gchar *string; + + string = g_strdup_printf ("%d", val); + xmlSetProp (node, (xmlChar *)property, (xmlChar *)string); + g_free (string); +} + +/** + * lgl_xml_set_prop_uint_hex: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @val: the value to set + * + * Set a property from an unsigned integer and format in hex. + * + */ +void +lgl_xml_set_prop_uint_hex (xmlNodePtr node, + const gchar *property, + guint val) +{ + gchar *string; + + string = g_strdup_printf ("0x%08x", val); + xmlSetProp (node, (xmlChar *)property, (xmlChar *)string); + g_free (string); +} + +/** + * lgl_xml_set_prop_length: + * @node: the libxml2 #xmlNodePtr of the node + * @property: the property name + * @val: the length to set in internal units (points) + * + * Set a property from a length, performing any necessary conversion. + * Length properties are formatted as a number followed by a units string. + * The units of the formatted property is determined by the most recent call to + * lgl_xml_set_default_units(). + * + */ +void +lgl_xml_set_prop_length (xmlNodePtr node, + const gchar *property, + gdouble val) +{ + gchar *string, buffer[G_ASCII_DTOSTR_BUF_SIZE]; + gchar *string_unit; + + /* Convert to default units */ + val /= unit_table[default_units].points_per_unit; + + /* Guarantee "C" locale by use of g_ascii_formatd */ + string = g_ascii_formatd (buffer, G_ASCII_DTOSTR_BUF_SIZE, "%g", val); + + string_unit = g_strdup_printf ("%s%s", string, unit_table[default_units].name); + xmlSetProp (node, (xmlChar *)property, (xmlChar *)string_unit); + g_free (string_unit); +} + +/** + * lgl_xml_is_node + * @node: the libxml2 #xmlNodePtr of the node + * @name : the node name + * + * Test if a node name matches given name. + * + * Returns: TRUE if the name of the node matches. Otherwise FALSE. + * + */ +gboolean +lgl_xml_is_node (xmlNodePtr node, + const gchar *name) +{ + return xmlStrEqual (node->name, (xmlChar *)name); +} + + +/** + * lgl_xml_get_node_content + * @node: the libxml2 #xmlNodePtr of the node + * + * Get the content of a node. + * + * Returns: the property as a pointer to a gchar string. This string should + * be freed with g_free(). + */ +gchar * +lgl_xml_get_node_content (xmlNodePtr node) +{ + xmlChar *xml_content; + gchar *g_content; + + xml_content = xmlNodeGetContent (node); + + if (xml_content != NULL) { + + g_content = g_strdup ((gchar *)xml_content); + xmlFree (xml_content); + return g_content; + + } + + return NULL; +} + + +/** + * lgl_xml_set_default_units: + * @units: default units selection (#lglUnitsType) + * + * Set the default units when formatting lengths. See + * lgl_xml_set_prop_length(). + * + */ +void +lgl_xml_set_default_units (lglUnitsType units) +{ + g_return_if_fail ((units >= LGL_UNITS_FIRST) && (units <= LGL_UNITS_LAST)); + + default_units = units; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/libglabels/xml.h b/libglabels/xml.h new file mode 100644 index 00000000..257ee455 --- /dev/null +++ b/libglabels/xml.h @@ -0,0 +1,119 @@ +/* + * xml.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of libglabels. + * + * libglabels is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * libglabels is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with libglabels. If not, see . + */ + +#ifndef __XML_H__ +#define __XML_H__ + +#include +#include + +#include "enums.h" + +#define LGL_XML_NAME_SPACE "http://snaught.com/glabels/2.2/" + +G_BEGIN_DECLS + +/* + * Get property functions + */ +gchar * lgl_xml_get_prop_string (xmlNodePtr node, + const gchar *property, + const gchar *default_val); + +gchar * lgl_xml_get_prop_i18n_string (xmlNodePtr node, + const gchar *property, + const gchar *default_val); + +gdouble lgl_xml_get_prop_double (xmlNodePtr node, + const gchar *property, + gdouble default_val); + +gboolean lgl_xml_get_prop_boolean (xmlNodePtr node, + const gchar *property, + gboolean default_val); + +gint lgl_xml_get_prop_int (xmlNodePtr node, + const gchar *property, + gint default_val); + +guint lgl_xml_get_prop_uint (xmlNodePtr node, + const gchar *property, + guint default_val); + +gdouble lgl_xml_get_prop_length (xmlNodePtr node, + const gchar *property, + gdouble default_val); + + +/* + * Set property functions + */ +void lgl_xml_set_prop_string (xmlNodePtr node, + const gchar *property, + const gchar *val); + +void lgl_xml_set_prop_double (xmlNodePtr node, + const gchar *property, + gdouble val); + +void lgl_xml_set_prop_boolean (xmlNodePtr node, + const gchar *property, + gboolean val); + +void lgl_xml_set_prop_int (xmlNodePtr node, + const gchar *property, + gint val); + +void lgl_xml_set_prop_uint_hex (xmlNodePtr node, + const gchar *property, + guint val); + +void lgl_xml_set_prop_length (xmlNodePtr node, + const gchar *property, + gdouble val); + +/* + * Other node functions + */ +gboolean lgl_xml_is_node (xmlNodePtr node, + const gchar *name); + +gchar * lgl_xml_get_node_content (xmlNodePtr node); + +/* + * Misc functions + */ +void lgl_xml_set_default_units (lglUnitsType units); + +G_END_DECLS + + +#endif /* __XML_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 00000000..828512c8 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1,18 @@ +# glabels translations +# +# please keep this list sorted alphabetically +# +ca +cs +de +eo +es +fr +it +ja +ko +pl +pt_BR +ru +zh_CN +zh_TW.Big5 diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 00000000..e6f46d59 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,222 @@ +# List of source files containing translatable strings. + +src/bc.c +src/bc-gnubarcode.c +src/bc-gnubarcode.h +src/bc.h +src/bc-iec16022.c +src/bc-iec16022.h +src/bc-iec18004.c +src/bc-iec18004.h +src/bc-postnet.c +src/bc-postnet.h +src/builder-util.c +src/builder-util.h +src/cairo-ellipse-path.c +src/cairo-ellipse-path.h +src/cairo-label-path.c +src/cairo-label-path.h +src/cairo-markup-path.c +src/cairo-markup-path.h +src/color.c +src/color-combo-button.c +src/color-combo-button.h +src/color-combo.c +src/color-combo-color-menu-item.c +src/color-combo-color-menu-item.h +src/color-combo.h +src/color-combo-history.c +src/color-combo-history.h +src/color-combo-menu.c +src/color-combo-menu.h +src/color.h +src/color-swatch.c +src/color-swatch.h +src/combo-util.c +src/combo-util.h +src/critical-error-handler.c +src/critical-error-handler.h +src/debug.c +src/debug.h +src/file.c +src/file.h +src/file-util.c +src/file-util.h +src/font-combo.c +src/font-combo.h +src/font-combo-menu.c +src/font-combo-menu.h +src/font-combo-menu-item.c +src/font-combo-menu-item.h +src/font-sample.c +src/font-sample.h +src/font-util.c +src/font-util.h +src/glabels-batch.c +src/glabels.c +src/hig.h +src/label-barcode.c +src/label-barcode.h +src/label-box.c +src/label-box.h +src/label.c +src/label-ellipse.c +src/label-ellipse.h +src/label.h +src/label-image.c +src/label-image.h +src/label-line.c +src/label-line.h +src/label-object.c +src/label-object.h +src/label-text.c +src/label-text.h +src/marshal.c +src/marshal.h +src/merge.c +src/merge-evolution.c +src/merge-evolution.h +src/merge.h +src/merge-init.c +src/merge-init.h +src/merge-properties-dialog.c +src/merge-properties-dialog.h +src/merge-text.c +src/merge-text.h +src/merge-vcard.c +src/merge-vcard.h +src/mini-label-preview.c +src/mini-label-preview.h +src/mini-preview.c +src/mini-preview.h +src/mini-preview-pixbuf.c +src/mini-preview-pixbuf-cache.c +src/mini-preview-pixbuf-cache.h +src/mini-preview-pixbuf.h +src/new-label-dialog.c +src/new-label-dialog.h +src/object-editor-bc-page.c +src/object-editor.c +src/object-editor-data-page.c +src/object-editor-edit-page.c +src/object-editor-fill-page.c +src/object-editor.h +src/object-editor-image-page.c +src/object-editor-line-page.c +src/object-editor-lsize-page.c +src/object-editor-position-page.c +src/object-editor-private.h +src/object-editor-shadow-page.c +src/object-editor-size-page.c +src/object-editor-text-page.c +src/pixbuf-cache.c +src/pixbuf-cache.h +src/prefs.c +src/prefs-dialog.c +src/prefs-dialog.h +src/prefs.h +src/prefs-model.c +src/prefs-model.h +src/print.c +src/print.h +src/print-op.c +src/print-op-dialog.c +src/print-op-dialog.h +src/print-op.h +src/recent.c +src/recent.h +src/rotate-label-button.c +src/rotate-label-button.h +src/stock.c +src/stock.h +src/str-util.c +src/str-util.h +src/template-designer.c +src/template-designer.h +src/text-node.c +src/text-node.h +src/ui.c +src/ui-commands.c +src/ui-commands.h +src/ui.h +src/ui-property-bar.c +src/ui-property-bar.h +src/ui-sidebar.c +src/ui-sidebar.h +src/ui-util.c +src/ui-util.h +src/view-barcode.c +src/view-barcode.h +src/view-box.c +src/view-box.h +src/view.c +src/view-ellipse.c +src/view-ellipse.h +src/view.h +src/view-image.c +src/view-image.h +src/view-line.c +src/view-line.h +src/view-object.c +src/view-object.h +src/view-text.c +src/view-text.h +src/warning-handler.c +src/warning-handler.h +src/wdgt-chain-button.c +src/wdgt-chain-button.h +src/wdgt-media-select.c +src/wdgt-media-select.h +src/wdgt-merge-menu.c +src/wdgt-merge-menu.h +src/window.c +src/window.h +src/xml-label-04.c +src/xml-label-04.h +src/xml-label.c +src/xml-label.h + +libglabels/category.c +libglabels/category.h +libglabels/db.c +libglabels/db.h +libglabels/enums.h +libglabels/libglabels-private.h +libglabels/paper.c +libglabels/paper.h +libglabels/str.c +libglabels/str.h +libglabels/template.c +libglabels/template.h +libglabels/xml.c +libglabels/xml.h +libglabels/xml-category.c +libglabels/xml-category.h +libglabels/xml-paper.c +libglabels/xml-paper.h +libglabels/xml-template.c +libglabels/xml-template.h + +[type: gettext/glade]data/builder/merge-properties-dialog.builder +[type: gettext/glade]data/builder/object-editor.builder +[type: gettext/glade]data/builder/prefs-dialog.builder +[type: gettext/glade]data/builder/property-bar.builder +[type: gettext/glade]data/builder/template-designer.builder +[type: gettext/glade]data/builder/print-op-dialog-custom-widget.builder + +[type: gettext/ini]data/desktop/glabels.desktop.in + +[type: gettext/keys]data/mime/glabels.keys.in +[type: gettext/xml]data/mime/glabels.xml.in + +[type: gettext/xml]templates/paper-sizes.xml +[type: gettext/xml]templates/categories.xml +[type: gettext/xml]templates/avery-us-templates.xml +[type: gettext/xml]templates/avery-iso-templates.xml +[type: gettext/xml]templates/avery-other-templates.xml +[type: gettext/xml]templates/brother-other-templates.xml +[type: gettext/xml]templates/dymo-other-templates.xml +[type: gettext/xml]templates/misc-us-templates.xml +[type: gettext/xml]templates/misc-iso-templates.xml +[type: gettext/xml]templates/misc-other-templates.xml +[type: gettext/xml]templates/zweckform-iso-templates.xml diff --git a/po/ca.po b/po/ca.po new file mode 100644 index 00000000..5812736c --- /dev/null +++ b/po/ca.po @@ -0,0 +1,2714 @@ +# Catalan translations for glabels package +# Traduccions al català del paquet «glabels». +# Copyright (C) 2009 THE glabels'S COPYRIGHT HOLDER +# This file is distributed under the same license as the glabels package. +# David Planella , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: glabels 2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-02-08 11:57+0100\n" +"PO-Revision-Date: 2009-02-08 22:00+0100\n" +"Last-Translator: David Planella \n" +"Language-Team: Catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../src/glabels.c:75 ../src/glabels-batch.c:70 +msgid "[FILE...]" +msgstr "[FITXER...]" + +#: ../src/glabels.c:91 +msgid "- gLabels label designer" +msgstr "- dissenyador d'etiquetes gLabels" + +#: ../src/glabels-batch.c:54 +msgid "set output filename (default=\"output.pdf\")" +msgstr "" +"estableix el nom del fitxer de sortida (valor predeterminat = «output.pdf»)" + +#: ../src/glabels-batch.c:54 ../src/glabels-batch.c:68 +msgid "filename" +msgstr "nom de fitxer" + +#: ../src/glabels-batch.c:56 +msgid "number of sheets (default=1)" +msgstr "nombre de fulls (valor predeterminat = 1" + +#: ../src/glabels-batch.c:56 +msgid "sheets" +msgstr "fulls" + +#: ../src/glabels-batch.c:58 +msgid "number of copies (default=1)" +msgstr "nombre de còpies (valor predeterminat = 1" + +#: ../src/glabels-batch.c:58 +msgid "copies" +msgstr "còpies" + +#: ../src/glabels-batch.c:60 +msgid "first label on first sheet (default=1)" +msgstr "la primera etiqueta al primer full" + +#: ../src/glabels-batch.c:60 +msgid "first" +msgstr "primer" + +#: ../src/glabels-batch.c:62 ../data/builder/print-custom-widget.glade.h:6 +msgid "print outlines (to test printer alignment)" +msgstr "imprimeix els contorns (per a comprovar l'alineació de la impressora)" + +#: ../src/glabels-batch.c:64 ../data/builder/print-custom-widget.glade.h:5 +msgid "print in reverse (i.e. a mirror image)" +msgstr "imprimeix invertit (és a dir, com una imatge reflectida en un mirall)" + +#: ../src/glabels-batch.c:66 ../data/builder/print-custom-widget.glade.h:4 +msgid "print crop marks" +msgstr "imprimeix les marques de tall" + +#: ../src/glabels-batch.c:68 +msgid "input file for merging" +msgstr "fitxer d'entrada per a fusionar" + +#: ../src/glabels-batch.c:96 +msgid "- batch process gLabels label files" +msgstr "- processa en lot fitxers d'etiqueta del gLabels" + +#: ../src/glabels-batch.c:142 +#, c-format +msgid "cannot perform document merge with glabels file %s\n" +msgstr "no es realitzar la fusió del document amb el fitxer %s del gLabels\n" + +#: ../src/glabels-batch.c:164 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "no es pot obrir el fitxer del gLabels %s\n" + +#: ../src/window.c:259 +msgid "(none) - gLabels" +msgstr "(cap) - gLabels" + +#: ../src/window.c:432 +msgid "(modified)" +msgstr "(modificat)" + +#: ../src/stock.c:72 +msgid "_Select Mode" +msgstr "Mode de _selecció" + +#: ../src/stock.c:73 +msgid "_Text" +msgstr "_Text" + +#: ../src/stock.c:74 +msgid "_Line" +msgstr "_Línia" + +#: ../src/stock.c:75 +msgid "_Box" +msgstr "_Quadre" + +#: ../src/stock.c:76 +msgid "_Ellipse" +msgstr "_El·lipse" + +#: ../src/stock.c:77 +msgid "_Image" +msgstr "_Imatge" + +#: ../src/stock.c:78 +msgid "Bar_code" +msgstr "_Codi de barres" + +#: ../src/stock.c:79 +msgid "_Merge Properties" +msgstr "Propietats de la _fusió" + +#: ../src/stock.c:80 +msgid "Object _Properties" +msgstr "_Propietats de l'objecte" + +#: ../src/stock.c:81 +msgid "Bring to _Front" +msgstr "Porta al p_rimer pla" + +#: ../src/stock.c:82 +msgid "Send to _Back" +msgstr "Envia al _fons" + +#: ../src/stock.c:83 +msgid "Rotate _Left" +msgstr "Gira a l'_esquerra" + +#: ../src/stock.c:84 +msgid "Rotate _Right" +msgstr "Gira a la _dreta" + +#: ../src/stock.c:85 +msgid "Flip _Horizontally" +msgstr "Capgira _horitzontalment" + +#: ../src/stock.c:86 +msgid "Flip _Vertically" +msgstr "Capgira _verticalment" + +#: ../src/stock.c:87 +msgid "_Lefts" +msgstr "_Esquerres" + +#: ../src/stock.c:88 +msgid "_Rights" +msgstr "_Dretes" + +#: ../src/stock.c:89 +msgid "_Centers" +msgstr "_Centres" + +#: ../src/stock.c:90 +msgid "_Tops" +msgstr "Parts _superiors" + +#: ../src/stock.c:91 +msgid "Bottoms" +msgstr "Parts inferiors" + +#: ../src/stock.c:92 +msgid "Centers" +msgstr "Centres" + +#: ../src/stock.c:93 ../src/stock.c:94 +msgid "Label Ce_nter" +msgstr "Ce_ntre de l'etiqueta" + +#: ../src/stock.c:95 ../data/builder/property-bar.glade.h:3 +msgid "Fill color" +msgstr "Color de l'emplenat" + +#: ../src/stock.c:96 ../data/builder/property-bar.glade.h:8 +msgid "Line color" +msgstr "Color de la línia" + +#: ../src/stock.c:97 ../src/stock.c:99 +msgid "Linked" +msgstr "Enllaçat" + +#: ../src/stock.c:98 ../src/stock.c:100 +msgid "Not Linked" +msgstr "Sense enllaçar" + +#. Menu entries. +#: ../src/ui.c:93 +msgid "_File" +msgstr "_Fitxer" + +#: ../src/ui.c:94 +msgid "Open Recent _Files" +msgstr "Obre els fitxers _recents" + +#: ../src/ui.c:95 +msgid "_Edit" +msgstr "_Edita" + +#: ../src/ui.c:96 +msgid "_View" +msgstr "_Visualitza" + +#: ../src/ui.c:97 +msgid "Customize Main Toolbar" +msgstr "Personalitza la barra d'eines principal" + +#: ../src/ui.c:98 +msgid "Customize Drawing Toolbar" +msgstr "Personalitza la barra d'eines de dibuix" + +#: ../src/ui.c:99 +msgid "Customize Properties Toolbar" +msgstr "Personalitza la barra d'eines de les propietats" + +#: ../src/ui.c:100 +msgid "_Objects" +msgstr "_Objectes" + +#: ../src/ui.c:101 +msgid "_Create" +msgstr "_Crea" + +#: ../src/ui.c:102 +msgid "_Order" +msgstr "_Ordena" + +#: ../src/ui.c:103 +msgid "_Rotate/Flip" +msgstr "_Gira/Capgira" + +#: ../src/ui.c:104 +msgid "Align _Horizontal" +msgstr "Alinea _horitzontalment" + +#: ../src/ui.c:105 +msgid "Align _Vertical" +msgstr "Alinea _verticalment" + +#: ../src/ui.c:106 +msgid "_Help" +msgstr "A_juda" + +#. Popup entries. +#: ../src/ui.c:109 ../src/ui.c:110 +msgid "Context Menu" +msgstr "Menú contextual" + +#: ../src/ui.c:115 +msgid "_New" +msgstr "_Nou" + +#: ../src/ui.c:117 +msgid "Create a new file" +msgstr "Crea un fitxer nou" + +#: ../src/ui.c:122 +msgid "_Open..." +msgstr "_Obre..." + +#: ../src/ui.c:124 +msgid "Open a file" +msgstr "Obre un fitxer" + +#: ../src/ui.c:129 +msgid "_Save" +msgstr "_Desa" + +#: ../src/ui.c:131 +msgid "Save current file" +msgstr "Desa el fitxer actual" + +#: ../src/ui.c:136 +msgid "Save _As..." +msgstr "_Anomena i desa..." + +#: ../src/ui.c:138 +msgid "Save the current file to a different name" +msgstr "Desa el fitxer actual amb un nom diferent" + +#: ../src/ui.c:143 +msgid "_Print..." +msgstr "_Imprimeix..." + +#: ../src/ui.c:145 +msgid "Print the current file" +msgstr "Imprimeix el fitxer actual" + +#: ../src/ui.c:150 +msgid "Properties..." +msgstr "Propietats..." + +#: ../src/ui.c:152 +msgid "Modify document properties" +msgstr "Modifica les propietats del document" + +#: ../src/ui.c:157 +msgid "Template _Designer..." +msgstr "Dissen_yador de plantilles..." + +#: ../src/ui.c:159 +msgid "Create a custom template" +msgstr "Crea una plantilla personalitzada" + +#: ../src/ui.c:164 +msgid "_Close" +msgstr "_Tanca" + +#: ../src/ui.c:166 +msgid "Close the current file" +msgstr "Tanca el fitxer actual" + +#: ../src/ui.c:171 +msgid "_Quit" +msgstr "_Surt" + +#: ../src/ui.c:173 +msgid "Quit the program" +msgstr "Surt del programa" + +#: ../src/ui.c:180 +msgid "Cut" +msgstr "Retalla" + +#: ../src/ui.c:182 +msgid "Cut the selection" +msgstr "Retalla la selecció" + +#: ../src/ui.c:187 +msgid "Copy" +msgstr "Copia" + +#: ../src/ui.c:189 +msgid "Copy the selection" +msgstr "Copia la selecció" + +#: ../src/ui.c:194 +msgid "Paste" +msgstr "Enganxa" + +#: ../src/ui.c:196 +msgid "Paste the clipboard" +msgstr "Enganxa el contingut del porta-retalls" + +#: ../src/ui.c:201 +msgid "Delete" +msgstr "Suprimeix" + +#: ../src/ui.c:203 +msgid "Delete the selected objects" +msgstr "Suprimeix els objectes seleccionats" + +#: ../src/ui.c:208 +msgid "Select All" +msgstr "Selecciona-ho tot" + +#: ../src/ui.c:210 +msgid "Select all objects" +msgstr "Selecciona tots els objectes" + +#: ../src/ui.c:215 +msgid "Un-select All" +msgstr "No seleccionis res" + +#: ../src/ui.c:217 +msgid "Remove all selections" +msgstr "Desfés totes les seleccions" + +#: ../src/ui.c:222 +msgid "Preferences" +msgstr "Preferències" + +#: ../src/ui.c:224 +msgid "Configure the application" +msgstr "Configura l'aplicació" + +#: ../src/ui.c:231 +msgid "Zoom in" +msgstr "Amplia" + +#: ../src/ui.c:233 +msgid "Increase magnification" +msgstr "Incrementa l'ampliació" + +#: ../src/ui.c:238 +msgid "Zoom out" +msgstr "Redueix" + +#: ../src/ui.c:240 +msgid "Decrease magnification" +msgstr "Redueix l'ampliació" + +#: ../src/ui.c:245 +msgid "Zoom 1 to 1" +msgstr "Amplia a 1:1" + +#: ../src/ui.c:247 +msgid "Restore scale to 100%" +msgstr "Refés l'escala a 100 %" + +#: ../src/ui.c:252 +msgid "Zoom to fit" +msgstr "Millor ajust" + +#: ../src/ui.c:254 +msgid "Set scale to fit window" +msgstr "Estableix l'escala per a encabir-ho a la finestra" + +#: ../src/ui.c:261 +msgid "Select Mode" +msgstr "Mode de selecció" + +#: ../src/ui.c:263 +msgid "Select, move and modify objects" +msgstr "Seleccioneu, moveu i modifiqueu objectes" + +#: ../src/ui.c:268 ../src/view-text.c:494 +#: ../data/builder/object-editor.glade.h:32 +msgid "Text" +msgstr "Text" + +#: ../src/ui.c:270 +msgid "Create text object" +msgstr "Crea un objecte de text" + +#: ../src/ui.c:275 +msgid "Box" +msgstr "Quadre" + +#: ../src/ui.c:277 +msgid "Create box/rectangle object" +msgstr "Crea un objecte quadre/rectangle" + +#: ../src/ui.c:282 ../data/builder/object-editor.glade.h:20 +msgid "Line" +msgstr "Línia" + +#: ../src/ui.c:284 +msgid "Create line object" +msgstr "Crea un objecte línia" + +#: ../src/ui.c:289 +msgid "Ellipse" +msgstr "El·lipse" + +#: ../src/ui.c:291 +msgid "Create ellipse/circle object" +msgstr "Crea un objecte el·lipse/cercle" + +#: ../src/ui.c:296 ../data/builder/object-editor.glade.h:16 +msgid "Image" +msgstr "Imatge" + +#: ../src/ui.c:298 +msgid "Create image object" +msgstr "Crea un objecte d'imatge" + +#: ../src/ui.c:303 +msgid "Barcode" +msgstr "Codi de barres" + +#: ../src/ui.c:305 +msgid "Create barcode object" +msgstr "Crea un objecte de codi de barres" + +#: ../src/ui.c:310 +msgid "Bring to front" +msgstr "Porta al primer pla" + +#: ../src/ui.c:312 +msgid "Raise object to top" +msgstr "Alça l'objecte fins al primer pla" + +#: ../src/ui.c:317 +msgid "Send to back" +msgstr "Porta al fons" + +#: ../src/ui.c:319 +msgid "Lower object to bottom" +msgstr "Baixa l'objecte fins al fons" + +#: ../src/ui.c:324 +msgid "Rotate left" +msgstr "Gira a l'esquerra" + +#: ../src/ui.c:326 +msgid "Rotate object 90 degrees counter-clockwise" +msgstr "" +"Gira l'objecte 90 graus en el sentit contrari a les agulles del rellotge" + +#: ../src/ui.c:331 +msgid "Rotate right" +msgstr "Gira a la dreta" + +#: ../src/ui.c:333 +msgid "Rotate object 90 degrees clockwise" +msgstr "Gira l'objecte 90 graus en el sentit de les agulles del rellotge" + +#: ../src/ui.c:338 +msgid "Flip horizontally" +msgstr "Capgira horitzontalment" + +#: ../src/ui.c:340 +msgid "Flip object horizontally" +msgstr "Capgira l'objecte horitzontalment" + +#: ../src/ui.c:345 +msgid "Flip vertically" +msgstr "Capgira verticalment" + +#: ../src/ui.c:347 +msgid "Flip object vertically" +msgstr "Capgira l'objecte verticalment" + +#: ../src/ui.c:352 +msgid "Align left" +msgstr "Alinea a l'esquerra" + +#: ../src/ui.c:354 +msgid "Align objects to left edges" +msgstr "Alinea els objectes a les vores esquerres" + +#: ../src/ui.c:359 +msgid "Align right" +msgstr "Alinea a la dreta" + +#: ../src/ui.c:361 +msgid "Align objects to right edges" +msgstr "Alinea els objectes a les vores dretes" + +#: ../src/ui.c:366 +msgid "Align horizontal center" +msgstr "Alinea als centre horitzontals" + +#: ../src/ui.c:368 +msgid "Align objects to horizontal centers" +msgstr "Alinea els objectes als centres horitzontals" + +#: ../src/ui.c:373 +msgid "Align tops" +msgstr "Alinea a les vores superiors" + +#: ../src/ui.c:375 +msgid "Align objects to top edges" +msgstr "Alinea els objectes a les vores superiors" + +#: ../src/ui.c:380 +msgid "Align bottoms" +msgstr "Alinea a les vores inferiors" + +#: ../src/ui.c:382 +msgid "Align objects to bottom edges" +msgstr "Alinea els objectes a les vores inferiors" + +#: ../src/ui.c:387 +msgid "Align vertical center" +msgstr "Alinea als centre verticals" + +#: ../src/ui.c:389 +msgid "Align objects to vertical centers" +msgstr "Alinea els objectes als centres verticals" + +#: ../src/ui.c:394 +msgid "Center horizontally" +msgstr "Centra horitzontalment" + +#: ../src/ui.c:396 +msgid "Center objects to horizontal label center" +msgstr "Centra els objectes al centre horitzontal de l'etiqueta" + +#: ../src/ui.c:401 +msgid "Center vertically" +msgstr "Centra verticalment" + +#: ../src/ui.c:403 +msgid "Center objects to vertical label center" +msgstr "Centra els objectes al centre vertical de l'etiqueta" + +#: ../src/ui.c:408 +msgid "Merge properties" +msgstr "Propietats de fusió" + +#: ../src/ui.c:410 +msgid "Edit merge properties" +msgstr "Edita les propietats de fusió" + +#: ../src/ui.c:417 +msgid "Contents" +msgstr "Contingut" + +#: ../src/ui.c:419 +msgid "Open glabels manual" +msgstr "Obre el manual del gLabels" + +#: ../src/ui.c:424 +msgid "About..." +msgstr "Quant a..." + +#: ../src/ui.c:426 +msgid "About glabels" +msgstr "Quant al gLabels" + +#: ../src/ui.c:436 +msgid "Property toolbar" +msgstr "Barra d'eines de les propietats" + +#: ../src/ui.c:438 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "" +"Canvia la visibilitat de la barra d'eines de les propietats a la finestra " +"actual" + +#: ../src/ui.c:444 ../src/ui.c:489 ../src/ui.c:497 +msgid "Show tooltips" +msgstr "Mostra els indicadors de funció" + +#: ../src/ui.c:446 +msgid "Show tooltips for property toolbar" +msgstr "Mostra els indicadors de funció a la barra de les propietats" + +#: ../src/ui.c:452 +msgid "Grid" +msgstr "Graella" + +#: ../src/ui.c:454 +msgid "Change the visibility of the grid in the current window" +msgstr "Canvia la visibilitat de la graella a la finestra actual" + +#: ../src/ui.c:460 +msgid "Markup" +msgstr "Marques" + +#: ../src/ui.c:462 +msgid "Change the visibility of markup lines in the current window" +msgstr "Canvia la visibilitat de les línies de marca a la finestra actual" + +#: ../src/ui.c:473 +msgid "Main toolbar" +msgstr "Barra d'eines principal" + +#: ../src/ui.c:475 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "" +"Canvia la visibilitat de la barra d'eines principal a la finestra actual" + +#: ../src/ui.c:481 +msgid "Drawing toolbar" +msgstr "Barra d'eines de dibuix" + +#: ../src/ui.c:483 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "" +"Canvia la visibilitat de la barra d'eines de dibuix a la finestra actual" + +#: ../src/ui.c:491 +msgid "Show tooltips for main toolbar" +msgstr "Mostra els indicadors de funció a la barra principal" + +#: ../src/ui.c:499 +msgid "Show tooltips for drawing toolbar" +msgstr "Mostra els indicadors de funció a la barra de dibuix" + +#: ../src/ui-property-bar.c:280 ../src/prefs-dialog.c:328 +#: ../src/object-editor-bc-page.c:93 ../src/object-editor-text-page.c:93 +#: ../src/object-editor-shadow-page.c:93 +msgid "Default" +msgstr "Predeterminat" + +#: ../src/ui-property-bar.c:292 ../src/prefs-dialog.c:334 +#: ../src/object-editor-fill-page.c:79 +msgid "No Fill" +msgstr "Sense emplenament" + +#: ../src/ui-property-bar.c:304 ../src/prefs-dialog.c:331 +#: ../src/object-editor-line-page.c:81 +msgid "No Line" +msgstr "Sense línia" + +#: ../src/ui-sidebar.c:152 +msgid "Object properties" +msgstr "Propietats de l'objecte" + +#: ../src/ui-commands.c:1084 +msgid "Glabels includes contributions from:" +msgstr "El gLabels inclou col·laboracions de:" + +#: ../src/ui-commands.c:1090 +msgid "See the file AUTHORS for additional credits," +msgstr "Consulteu el fitxer AUTHORS per a veure els crèdits addicionals" + +#: ../src/ui-commands.c:1091 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "o aneu a http://glabels.sourceforge.net/" + +#: ../src/ui-commands.c:1103 +msgid "A label and business card creation program.\n" +msgstr "Un programa de creació d'etiquetes i de targetes de visita.\n" + +#: ../src/ui-commands.c:1107 +msgid "translator-credits" +msgstr "David Planella " + +#: ../src/ui-commands.c:1110 +msgid "" +"Glabels is free software; you can redistribute it and/or modify it\n" +"under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but\n" +"WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" +"the GNU General Public License for more details.\n" +msgstr "" +"El gLabels és programari lliure; podeu redistribuir-lo i/o modificar-lo \n" +"sota els termes de la Llicència Pública General GNU tal i com ha estat \n" +"publicada per la Free Software Foundation; ja sigui la versió 2 de la \n" +"Llicència o (si ho preferiu) qualsevol versió posterior.\n" +"\n" +"El gLabels es distribueix amb l'expectativa que serà útil, però SENSE \n" +"CAP GARANTIA; fins i tot sense la garantia implícita de COMERCIABILITAT o \n" +"ADEQUACIÓ PER A UN PROPÒSIT PARTICULAR. Vegeu la Llicència Pública " +"General \n" +"GNU per a obtenir-ne més detalls.\n" + +#: ../src/ui-commands.c:1136 +msgid "glabels" +msgstr "gLabels" + +#: ../src/file.c:91 +msgid "New Label or Card" +msgstr "Etiqueta o targeta nova" + +#: ../src/file.c:191 +msgid "Label properties" +msgstr "Propietats de l'etiqueta" + +#: ../src/file.c:292 ../src/file.c:578 +msgid "All files" +msgstr "Tots els fitxers" + +#: ../src/file.c:297 ../src/file.c:583 +msgid "gLabels documents" +msgstr "Documents del gLabel" + +#: ../src/file.c:343 ../src/file.c:640 +msgid "Empty file name selection" +msgstr "Selecció d'un nom de fitxer buit" + +#: ../src/file.c:346 ../src/file.c:362 +msgid "Please select a file or supply a valid file name" +msgstr "Seleccioneu un fitxer o introduïu un nom de fitxer vàlid" + +#: ../src/file.c:359 +msgid "File does not exist" +msgstr "El fitxer no existeix" + +#: ../src/file.c:433 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "No s'ha pogut obrir el fitxer «%s»" + +#: ../src/file.c:436 +msgid "Not a supported file format" +msgstr "No és un format de fitxer admès" + +#: ../src/file.c:513 ../src/file.c:690 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "No s'ha pogut desar el fitxer «%s»" + +#: ../src/file.c:517 ../src/file.c:694 +msgid "Error encountered during save. The file is still not saved." +msgstr "S'ha produït un error en desar. El fitxer no s'ha desat encara." + +#: ../src/file.c:556 +#, c-format +msgid "Save \"%s\" as" +msgstr "Desa «%s» com a" + +#: ../src/file.c:643 +msgid "Please supply a valid file name" +msgstr "Introduïu un nom de fitxer vàlid" + +#: ../src/file.c:664 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "Voleu sobreescriure el fitxer «%s»?" + +#: ../src/file.c:668 +msgid "File already exists." +msgstr "El fitxer ja existeix." + +#: ../src/file.c:764 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "Voleu desar els canvis al document «%s» abans de tancar-lo?" + +#: ../src/file.c:768 +msgid "Your changes will be lost if you don't save them." +msgstr "Es perdran els vostres canvis si no els deseu." + +#: ../src/file.c:771 +msgid "Close without saving" +msgstr "Tanca sense desar" + +#. Should not happen +#: ../src/prefs.c:159 ../src/prefs.c:166 +#: ../data/builder/object-editor.glade.h:43 +#: ../data/builder/prefs-dialog.glade.h:22 +msgid "points" +msgstr "punts" + +#: ../src/prefs.c:161 ../data/builder/object-editor.glade.h:42 +#: ../data/builder/template-designer.glade.h:64 +msgid "inches" +msgstr "polzades" + +#: ../src/prefs.c:163 +msgid "mm" +msgstr "mm" + +#: ../src/prefs-dialog.c:167 ../data/builder/prefs-dialog.glade.h:21 +msgid "gLabels Preferences" +msgstr "Preferències del gLabels" + +#. Build editor. +#: ../src/view-box.c:175 +msgid "Box object properties" +msgstr "Propietats de l'objecte quadre" + +#. Build editor. +#: ../src/view-ellipse.c:175 +msgid "Ellipse object properties" +msgstr "Propietats de l'objecte el·lipse" + +#. Build editor. +#: ../src/view-line.c:174 +msgid "Line object properties" +msgstr "Propietats de l'objecte línia" + +#. Build editor. +#: ../src/view-image.c:174 +msgid "Image object properties" +msgstr "Propietats de l'objecte imatge" + +#. Build editor. +#: ../src/view-text.c:178 +msgid "Text object properties" +msgstr "Propietats de l'objecte text" + +#. Build editor. +#: ../src/view-barcode.c:174 +msgid "Barcode object properties" +msgstr "Propietats de l'objecte codi de barres" + +#: ../src/object-editor-image-page.c:267 +msgid "All Files" +msgstr "Tots els fitxers" + +#: ../src/object-editor-image-page.c:272 +msgid "All Images" +msgstr "Totes les imatges" + +#: ../src/object-editor-image-page.c:287 +#, c-format +msgid "%s (*.%s)" +msgstr "%s (*.%s)" + +#: ../src/merge-properties-dialog.c:271 +msgid "Merge Properties" +msgstr "Propietats de la fusió" + +#: ../src/merge-properties-dialog.c:297 ../src/merge-properties-dialog.c:405 +msgid "Select merge-database source" +msgstr "Seleccioneu la font de la base de dades de la fusió" + +#: ../src/merge-properties-dialog.c:306 ../src/merge-properties-dialog.c:425 +msgid "N/A" +msgstr "No disponible" + +#: ../src/merge-properties-dialog.c:332 +msgid "Select" +msgstr "Seleccionat" + +#: ../src/merge-properties-dialog.c:340 +msgid "Record/Field" +msgstr "Registre/camp" + +#: ../src/merge-properties-dialog.c:348 +#: ../data/builder/object-editor.glade.h:10 +msgid "Data" +msgstr "Dades" + +#: ../src/merge-properties-dialog.c:418 +msgid "Fixed" +msgstr "Fixe" + +#. =================================================================== +#: ../src/print-op.c:242 ../src/wdgt-print-copies.c:171 +#: ../data/templates/misc-iso-templates.xml.h:34 +msgid "Labels" +msgstr "Etiquetes" + +#: ../src/template-designer.c:411 +msgid "gLabels Template Designer" +msgstr "Dissenyador de plantilles del gLabels" + +#: ../src/template-designer.c:481 +msgid "Welcome" +msgstr "Us donem la benvinguda" + +#: ../src/template-designer.c:534 +msgid "Name and Description" +msgstr "Nom i descripció" + +#: ../src/template-designer.c:595 +msgid "Page Size" +msgstr "Mida de la pàgina" + +#: ../src/template-designer.c:675 +msgid "Label or Card Shape" +msgstr "Forma de l'etiqueta o targeta" + +#: ../src/template-designer.c:735 +msgid "Label or Card Size" +msgstr "Mida de l'etiqueta o targeta" + +#: ../src/template-designer.c:844 +msgid "Label Size (round)" +msgstr "Mida de 'etiqueta (circular)" + +#: ../src/template-designer.c:935 +msgid "Label Size (CD/DVD)" +msgstr "Mida de 'etiqueta (CD/DVD)" + +#: ../src/template-designer.c:1036 +msgid "Number of Layouts" +msgstr "Nombre de disposicions" + +#: ../src/template-designer.c:1110 +msgid "Layout(s)" +msgstr "Disposicions" + +#: ../src/template-designer.c:1229 +msgid "Design Completed" +msgstr "S'ha completat el disseny" + +#: ../src/template-designer.c:1396 +msgid "" +"Brand and part# match an existing " +"template!" +msgstr "" +"La marca i el número de model " +"coincideixen amb un a plantilla existent" + +#: ../src/bc.c:67 +msgid "POSTNET (any)" +msgstr "POSTNET (qualsevol)" + +#: ../src/bc.c:70 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (només codi postal ZIP)" + +#: ../src/bc.c:73 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (codi postal ZIP+4)" + +#: ../src/bc.c:76 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: ../src/bc.c:79 +msgid "CEPNET" +msgstr "CEPNET" + +#: ../src/bc.c:82 +msgid "EAN (any)" +msgstr "EAN (qualsevol)" + +#: ../src/bc.c:85 +msgid "EAN-8" +msgstr "EAN-8" + +#: ../src/bc.c:88 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: ../src/bc.c:91 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: ../src/bc.c:94 +msgid "EAN-13" +msgstr "EAN-13" + +#: ../src/bc.c:97 +msgid "EAN-13 +2" +msgstr "EAN-13 +2" + +#: ../src/bc.c:100 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: ../src/bc.c:103 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A o UPC-E)" + +#: ../src/bc.c:106 +msgid "UPC-A" +msgstr "UPC-A" + +#: ../src/bc.c:109 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: ../src/bc.c:112 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: ../src/bc.c:115 +msgid "UPC-E" +msgstr "UPC-E" + +#: ../src/bc.c:118 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: ../src/bc.c:121 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: ../src/bc.c:124 +msgid "ISBN" +msgstr "ISBN" + +#: ../src/bc.c:127 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: ../src/bc.c:130 +msgid "Code 39" +msgstr "Codi 39" + +#: ../src/bc.c:133 +msgid "Code 128" +msgstr "Codi 128" + +#: ../src/bc.c:136 +msgid "Code 128C" +msgstr "Codi 128C" + +#: ../src/bc.c:139 +msgid "Code 128B" +msgstr "Codi 128B" + +#: ../src/bc.c:142 +msgid "Interleaved 2 of 5" +msgstr "Interfoliat 2 de 5" + +#: ../src/bc.c:145 +msgid "Codabar" +msgstr "Codabar" + +#: ../src/bc.c:148 +msgid "MSI" +msgstr "MSI" + +#: ../src/bc.c:151 +msgid "Plessey" +msgstr "Plessey" + +#: ../src/bc.c:154 +msgid "IEC16022 (DataMatrix)" +msgstr "IEC16022 (DataMatrix)" + +#: ../src/label.c:531 +msgid "Untitled" +msgstr "Sense títol" + +#: ../src/label-barcode.c:426 +msgid "Barcode data empty" +msgstr "Les dades del codi de barres estan buides" + +#: ../src/label-barcode.c:430 +msgid "Invalid barcode data" +msgstr "Les dades del codi de barres no són vàlides" + +#: ../src/xml-label.c:189 ../src/xml-label.c:226 +msgid "xmlParseFile error" +msgstr "Error de la funció xmlParseFile" + +#: ../src/xml-label.c:262 +msgid "No document root" +msgstr "No hi ha cap arrel del document" + +#: ../src/xml-label.c:270 +msgid "Importing from glabels 0.1 format" +msgstr "S'està important del format del gLabels 0.1" + +#: ../src/xml-label.c:279 +msgid "Importing from glabels 0.4 format" +msgstr "S'està important del format del gLabels 0.4" + +#: ../src/xml-label.c:288 +#, c-format +msgid "Unknown glabels Namespace -- Using %s" +msgstr "Espai de noms del gLabels desconegut -- s'utilitzarà el %s" + +#: ../src/xml-label.c:319 ../src/xml-label-04.c:79 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "Node arrel incorrecte = «%s»" + +#: ../src/xml-label.c:356 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "node incorrecte en el node Document = «%s»" + +#: ../src/xml-label.c:401 ../src/xml-label-04.c:127 +#, c-format +msgid "bad node = \"%s\"" +msgstr "node incorrecte = «%s»" + +#: ../src/xml-label.c:840 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "node incorrecte en el node Data (dades) = «%s»" + +#: ../src/xml-label.c:1077 ../libglabels/xml-template.c:670 +msgid "Utf8 conversion error." +msgstr "Error de conversió a l'UTF-8" + +#: ../src/xml-label.c:1084 +msgid "Problem saving xml file." +msgstr "S'ha produït un problema en desar el fitxer" + +#: ../src/merge.c:170 ../src/merge.c:211 ../src/merge.c:375 ../src/merge.c:378 +msgid "None" +msgstr "Cap" + +#: ../src/merge-init.c:59 +msgid "Text file with comma delimeters (CSV)" +msgstr "Fitxer de text amb comes delimitadores (CSV)" + +#: ../src/merge-init.c:66 +msgid "Text file with colon delimeters" +msgstr "Fitxer de text amb dos punts delimitadors" + +#: ../src/merge-init.c:73 +msgid "Text file with tab delimeters" +msgstr "Fitxer de text amb tabulacions delimitadores" + +#: ../src/merge-init.c:82 +msgid "Data from default Evolution Addressbook" +msgstr "Dades de la llibreta d'adreces predeterminada de l'Evolution" + +#: ../src/merge-init.c:88 +msgid "Data from a file containing VCards" +msgstr "Dades d'un fitxer que conté VCards" + +#: ../src/merge-evolution.c:309 +msgid "Couldn't construct query" +msgstr "No s'ha pogut crear la sol·licitud" + +#: ../src/merge-evolution.c:315 ../src/merge-evolution.c:326 +msgid "Couldn't open addressbook." +msgstr "No s'ha pogut obrir la llibreta d'adreces" + +#: ../src/merge-evolution.c:341 +msgid "Couldn't list available fields." +msgstr "No s'ha pogut mostrar la llista dels camps disponibles." + +#: ../src/merge-evolution.c:377 +msgid "Couldn't get contacts." +msgstr "No s'han pogut obtenir els contactes." + +#: ../src/color-combo.c:210 +msgid "Default Color" +msgstr "Color predeterminat" + +#: ../src/color-combo-menu.c:86 +msgid "Dark Red" +msgstr "Vermell fosc" + +#: ../src/color-combo-menu.c:87 +msgid "Brown" +msgstr "Marró" + +#: ../src/color-combo-menu.c:88 +msgid "Dark Goldenrod" +msgstr "Vara d'or (goldenrod) fosc" + +#: ../src/color-combo-menu.c:89 +msgid "Dark Green" +msgstr "Verd fosc" + +#: ../src/color-combo-menu.c:90 +msgid "Dark Cyan" +msgstr "Cyan fosc" + +#: ../src/color-combo-menu.c:91 +msgid "Navy Blue" +msgstr "Blau ultramarí" + +#: ../src/color-combo-menu.c:92 +msgid "Dark Violet" +msgstr "Violeta fosc" + +#: ../src/color-combo-menu.c:94 +msgid "Red" +msgstr "Vermell" + +#: ../src/color-combo-menu.c:95 +msgid "Orange" +msgstr "Taronja" + +#: ../src/color-combo-menu.c:96 +msgid "Dark Yellow" +msgstr "Groc fosc" + +#: ../src/color-combo-menu.c:97 +msgid "Medium green" +msgstr "Verd mitjà" + +#: ../src/color-combo-menu.c:98 +msgid "Turquoise" +msgstr "Turquesa" + +#: ../src/color-combo-menu.c:99 +msgid "Blue" +msgstr "Blau" + +#: ../src/color-combo-menu.c:100 +msgid "Purple" +msgstr "Porpra" + +#: ../src/color-combo-menu.c:102 +msgid "Salmon" +msgstr "Salmó" + +#: ../src/color-combo-menu.c:103 +msgid "Gold" +msgstr "Daurat" + +#: ../src/color-combo-menu.c:104 +msgid "Yellow" +msgstr "Groc" + +#: ../src/color-combo-menu.c:105 +msgid "Green" +msgstr "Verd" + +#: ../src/color-combo-menu.c:106 +msgid "Cyan" +msgstr "Cyan" + +#: ../src/color-combo-menu.c:107 +msgid "SkyBlue" +msgstr "Blau cel" + +#: ../src/color-combo-menu.c:108 +msgid "Violet" +msgstr "Violeta" + +#: ../src/color-combo-menu.c:110 +msgid "Pink" +msgstr "Rosa" + +#: ../src/color-combo-menu.c:111 +msgid "Khaki" +msgstr "Caqui" + +#: ../src/color-combo-menu.c:112 +msgid "Light Yellow" +msgstr "Groc clar" + +#: ../src/color-combo-menu.c:113 +msgid "Light Green" +msgstr "Verd clar" + +#: ../src/color-combo-menu.c:114 +msgid "Light Cyan" +msgstr "Cyan clar" + +#: ../src/color-combo-menu.c:115 +msgid "Slate Gray" +msgstr "Gris de pissarra" + +#: ../src/color-combo-menu.c:116 +msgid "Thistle" +msgstr "Calcida" + +#: ../src/color-combo-menu.c:118 +msgid "White" +msgstr "Blanc" + +#: ../src/color-combo-menu.c:119 +#, c-format +msgid "10% Gray" +msgstr "10% Gris" + +#: ../src/color-combo-menu.c:120 +#, c-format +msgid "25% Gray" +msgstr "25% Gris" + +#: ../src/color-combo-menu.c:121 +#, c-format +msgid "40% Gray" +msgstr "40% Gris" + +#: ../src/color-combo-menu.c:122 +#, c-format +msgid "50% Gray" +msgstr "50% Gris" + +#: ../src/color-combo-menu.c:123 +#, c-format +msgid "60% Gray" +msgstr "60% Gris" + +#: ../src/color-combo-menu.c:124 +msgid "Black" +msgstr "Negre" + +#: ../src/color-combo-menu.c:252 ../src/color-combo-menu.c:369 +msgid "Custom Color" +msgstr "Color personalitzat" + +#: ../src/color-combo-menu.c:317 +#, c-format +msgid "Custom Color #%u" +msgstr "Color personalitzat núm. %u" + +#: ../src/wdgt-print-copies.c:153 +msgid "Sheets:" +msgstr "Fulls:" + +#: ../src/wdgt-print-copies.c:173 +msgid "from:" +msgstr "de:" + +#: ../src/wdgt-print-copies.c:179 +msgid "to:" +msgstr "a:" + +#: ../src/wdgt-print-merge.c:154 +msgid "Start on label" +msgstr "Comença a l'etiqueta" + +#: ../src/wdgt-print-merge.c:162 +msgid "on 1st sheet" +msgstr "al primer full" + +#: ../src/wdgt-print-merge.c:171 +msgid "Copies:" +msgstr "Còpies" + +#: ../src/wdgt-print-merge.c:177 +msgid "Collate" +msgstr "Compagina" + +#: ../src/wdgt-media-select.c:290 ../src/wdgt-media-select.c:294 +#: ../src/wdgt-media-select.c:299 ../src/wdgt-media-select.c:308 +#: ../src/wdgt-media-select.c:311 ../src/wdgt-media-select.c:404 +#: ../src/wdgt-media-select.c:611 ../src/wdgt-media-select.c:620 +msgid "Any" +msgstr "Qualsevol" + +#: ../src/wdgt-media-select.c:645 +#, c-format +msgid "%d per sheet" +msgstr "%d per full" + +#: ../src/wdgt-media-select.c:675 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: ../src/wdgt-media-select.c:680 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: ../src/wdgt-media-select.c:691 ../src/wdgt-media-select.c:705 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s de diàmetre" + +#: ../src/wdgt-media-select.c:695 ../src/wdgt-media-select.c:709 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s de diàmetre" + +#: ../src/wdgt-media-select.c:783 +msgid "No recent templates found." +msgstr "No s'ha trobat cap plantilla recent." + +#: ../src/wdgt-media-select.c:784 +msgid "Try selecting a template from the \"Search all templates\" page." +msgstr "" +"Proveu de seleccionar una plantilla de la pàgina «Cerca totes les plantilles»" + +#: ../src/wdgt-media-select.c:863 +msgid "No match." +msgstr "No hi ha cap coincidència." + +#: ../src/wdgt-media-select.c:864 +msgid "Try selecting a different brand, page size or category." +msgstr "Proveu de seleccionar una marca, mida de pàgina o categoria diferents." + +#: ../src/wdgt-rotate-label.c:129 +msgid "Normal" +msgstr "Normal" + +#: ../src/wdgt-rotate-label.c:130 +msgid "Rotated" +msgstr "Girat" + +#: ../src/critical-error-handler.c:73 +msgid "gLabels Fatal Error!" +msgstr "S'ha produït un error fatal del gLabels" + +#: ../src/warning-handler.c:73 +msgid "gLabels Error!" +msgstr "S'ha produït un error del gLabels" + +#. Create and append an "Other" entry. +#: ../libglabels/db.c:118 +msgid "Other" +msgstr "Una altra" + +#. Create and append a "User defined" entry. +#: ../libglabels/db.c:131 +msgid "User defined" +msgstr "Definit per l'usuari" + +#: ../libglabels/db.c:482 +msgid "" +"Unable to locate paper size definitions. Libglabels may not be installed " +"correctly!" +msgstr "" +"No s'han trobat les definicions de les mides de paper. Pot ser que la " +"libglables no s'hagi instal·lat correctametn" + +#: ../libglabels/db.c:875 +msgid "" +"Unable to locate category definitions. Libglabels may not be installed " +"correctly!" +msgstr "" +"No s'han trobat les definicions de les categories. Pot ser que la libglables " +"no s'hagi instal·lat correctametn" + +#: ../libglabels/db.c:1461 +msgid "" +"Unable to locate any template files. Libglabels may not be installed " +"correctly!" +msgstr "" +"No s'ha trobat cap plantilla. Pot ser que la libglables no s'hagi instal·lat " +"correctametn" + +#: ../libglabels/db.c:1538 +#, c-format +msgid "Generic %s full page template" +msgstr "Plantilla de pàgina completa %s genèrica" + +#: ../libglabels/xml-template.c:227 +msgid "Missing name or brand/part attributes." +msgstr "Manca el nom o bé els atributs de marca/model" + +#. This should always be an id, but just in case a name +#. slips by! +#: ../libglabels/xml-template.c:244 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "" +"Es desconeix l'identificador de mida de pàgina «%s»; s'intentarà com a nom" + +#: ../libglabels/xml-template.c:256 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "Es desconeix l'identificador de mida de pàgina o nom «%s»" + +#: ../libglabels/xml-template.c:615 +msgid "" +"Missing required \"brand\" or \"part\" attribute, trying deprecated name." +msgstr "" +"Manca l'atribut requerit «brand» (marca) o «part» (model), s'intentarà amb el " +"nom desaconsellat." + +#: ../libglabels/xml-template.c:625 +msgid "Name attribute also missing." +msgstr "També manca l'atribut del nom." + +#: ../data/builder/merge-properties-dialog.glade.h:1 +msgid "Record selection/preview" +msgstr "Selecció de registres/previsualització" + +#: ../data/builder/merge-properties-dialog.glade.h:2 +msgid "Source" +msgstr "Font" + +#: ../data/builder/merge-properties-dialog.glade.h:3 +msgid "Format:" +msgstr "Format:" + +#: ../data/builder/merge-properties-dialog.glade.h:4 +msgid "Location:" +msgstr "Ubicació:" + +#: ../data/builder/merge-properties-dialog.glade.h:5 +msgid "Select all" +msgstr "Selecciona-ho tot" + +#: ../data/builder/merge-properties-dialog.glade.h:6 +msgid "Unselect all" +msgstr "No seleccionis res" + +#: ../data/builder/merge-properties-dialog.glade.h:7 +#: ../data/builder/object-editor.glade.h:39 +msgid "dialog1" +msgstr "dialog1" + +#: ../data/builder/new-label-dialog.glade.h:1 +msgid "Label orientation" +msgstr "Orientació de l'etiqueta" + +#: ../data/builder/new-label-dialog.glade.h:2 +msgid "Media type" +msgstr "Tipus de suport" + +#: ../data/builder/object-editor.glade.h:2 +#, no-c-format +msgid "%" +msgstr "%" + +#: ../data/builder/object-editor.glade.h:3 +msgid "00000000000 00000" +msgstr "00000000000 00000" + +#: ../data/builder/object-editor.glade.h:4 +msgid "Xxx object properties" +msgstr "" +"Propietats de l'objecte Xxx" + +#: ../data/builder/object-editor.glade.h:5 +#: ../data/builder/prefs-dialog.glade.h:7 +msgid "Alignment:" +msgstr "Alineació:" + +#: ../data/builder/object-editor.glade.h:6 +msgid "Allow merge to automatically shrink text" +msgstr "Permet que la fusió encongeixi el text automàticament" + +#: ../data/builder/object-editor.glade.h:7 +msgid "Angle:" +msgstr "Angle:" + +#: ../data/builder/object-editor.glade.h:8 +msgid "Checksum" +msgstr "Suma de verificació" + +#: ../data/builder/object-editor.glade.h:9 +#: ../data/builder/prefs-dialog.glade.h:8 +msgid "Color:" +msgstr "Color:" + +#: ../data/builder/object-editor.glade.h:11 +msgid "Enable shadow" +msgstr "Habilita l'ombra" + +#: ../data/builder/object-editor.glade.h:12 +msgid "Family:" +msgstr "Família:" + +#: ../data/builder/object-editor.glade.h:13 +msgid "File:" +msgstr "Fitxer:" + +#: ../data/builder/object-editor.glade.h:14 +msgid "Fill" +msgstr "Emplenat" + +#: ../data/builder/object-editor.glade.h:15 +#: ../data/builder/template-designer.glade.h:30 +msgid "Height:" +msgstr "Alçada:" + +#: ../data/builder/object-editor.glade.h:17 +msgid "Insert merge field" +msgstr "Inseriu el camp de fusió" + +#: ../data/builder/object-editor.glade.h:18 +msgid "Key:" +msgstr "Clau:" + +#: ../data/builder/object-editor.glade.h:19 +msgid "Length:" +msgstr "Llargada:" + +#: ../data/builder/object-editor.glade.h:21 +#: ../data/builder/prefs-dialog.glade.h:12 +msgid "Line Spacing:" +msgstr "Espaiat de línia:" + +#: ../data/builder/object-editor.glade.h:22 +msgid "Literal:" +msgstr "Literal:" + +#: ../data/builder/object-editor.glade.h:23 +msgid "Opacity:" +msgstr "Opacitat:" + +#: ../data/builder/object-editor.glade.h:24 +msgid "Position" +msgstr "Posició" + +#: ../data/builder/object-editor.glade.h:25 +msgid "Reset image size" +msgstr "Reinicialitza la mida de la imatge" + +#: ../data/builder/object-editor.glade.h:26 +msgid "Select A File" +msgstr "Seleccioneu un fitxer" + +#: ../data/builder/object-editor.glade.h:27 +msgid "Shadow" +msgstr "Ombra" + +#: ../data/builder/object-editor.glade.h:28 +msgid "Size" +msgstr "Mida" + +#: ../data/builder/object-editor.glade.h:29 +msgid "Size:" +msgstr "Mida:" + +#: ../data/builder/object-editor.glade.h:30 +msgid "Style" +msgstr "Estil" + +#: ../data/builder/object-editor.glade.h:31 +msgid "Style:" +msgstr "Estil:" + +#: ../data/builder/object-editor.glade.h:33 +#: ../data/builder/prefs-dialog.glade.h:20 +#: ../data/builder/template-designer.glade.h:61 +msgid "Width:" +msgstr "Amplada:" + +#: ../data/builder/object-editor.glade.h:34 +msgid "X Offset:" +msgstr "Desplaçament X:" + +#: ../data/builder/object-editor.glade.h:35 +msgid "X:" +msgstr "X:" + +#: ../data/builder/object-editor.glade.h:36 +msgid "Y Offset:" +msgstr "Desplaçament Y:" + +#: ../data/builder/object-editor.glade.h:37 +msgid "Y:" +msgstr "Y:" + +#: ../data/builder/object-editor.glade.h:38 +msgid "degrees" +msgstr "graus" + +#: ../data/builder/object-editor.glade.h:40 +msgid "digits:" +msgstr "dígits:" + +#: ../data/builder/object-editor.glade.h:41 +msgid "format:" +msgstr "format:" + +#: ../data/builder/prefs-dialog.glade.h:1 +msgid " " +msgstr " " + +#: ../data/builder/prefs-dialog.glade.h:2 +msgid "Default page size" +msgstr "Mida de pàgina predeterminada" + +#: ../data/builder/prefs-dialog.glade.h:3 +msgid "Fill" +msgstr "Emplenat" + +#: ../data/builder/prefs-dialog.glade.h:4 +msgid "Line" +msgstr "Línia" + +#: ../data/builder/prefs-dialog.glade.h:5 +msgid "Text" +msgstr "Text" + +#: ../data/builder/prefs-dialog.glade.h:6 +msgid "Units" +msgstr "Unitats" + +#: ../data/builder/prefs-dialog.glade.h:9 +msgid "Font:" +msgstr "Tipus de lletra" + +#: ../data/builder/prefs-dialog.glade.h:10 +msgid "ISO A4" +msgstr "A4 de l'ISO" + +#: ../data/builder/prefs-dialog.glade.h:11 +msgid "Inches" +msgstr "Polzades" + +#: ../data/builder/prefs-dialog.glade.h:13 +msgid "Locale" +msgstr "Localització" + +#: ../data/builder/prefs-dialog.glade.h:14 +msgid "Millimeters" +msgstr "Mil·límetres" + +#: ../data/builder/prefs-dialog.glade.h:15 +msgid "Object defaults" +msgstr "Valors predeterminats dels objectes" + +#: ../data/builder/prefs-dialog.glade.h:16 +msgid "Points" +msgstr "Punts" + +#: ../data/builder/prefs-dialog.glade.h:17 +msgid "Select default properties for new objects." +msgstr "Seleccioneu els valors predeterminats dels objectes nous" + +#: ../data/builder/prefs-dialog.glade.h:18 +msgid "Select locale specific behavior." +msgstr "Seleccioneu el comportament específic de la localització" + +#. Most popular (at top of list) +#: ../data/builder/prefs-dialog.glade.h:19 +#: ../data/templates/paper-sizes.xml.h:29 +msgid "US Letter" +msgstr "Carta EUA" + +#: ../data/builder/print-custom-widget.glade.h:1 +msgid "Options" +msgstr "Opcions" + +#: ../data/builder/print-custom-widget.glade.h:2 +msgid "Print control (Merge)" +msgstr "Control d'impressió (fusió)" + +#: ../data/builder/print-custom-widget.glade.h:3 +msgid "Print control (Simple)" +msgstr "Control d'impressió (simple)" + +#: ../data/builder/property-bar.glade.h:1 +msgid "Bold" +msgstr "Negreta" + +#: ../data/builder/property-bar.glade.h:2 +msgid "Center align" +msgstr "Alineació al centre" + +#: ../data/builder/property-bar.glade.h:4 +msgid "Font family" +msgstr "Família del tipus de lletra" + +#: ../data/builder/property-bar.glade.h:5 +msgid "Font size" +msgstr "Mida del tipus de lletra" + +#: ../data/builder/property-bar.glade.h:6 +msgid "Italic" +msgstr "Cursiva" + +#: ../data/builder/property-bar.glade.h:7 +msgid "Left align" +msgstr "Alineació a l'esquerra" + +#: ../data/builder/property-bar.glade.h:9 +msgid "Line width" +msgstr "Amplada de la línia" + +#: ../data/builder/property-bar.glade.h:10 +msgid "Right align" +msgstr "Alineació a la dreta" + +#: ../data/builder/property-bar.glade.h:11 +msgid "Text Color" +msgstr "Color del text" + +#: ../data/builder/template-designer.glade.h:1 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(p.ex. «Etiquetes de correu», «Targetes de visita», etc.)" + +#: ../data/builder/template-designer.glade.h:2 +msgid "(e.g., 8163A)" +msgstr "(p.ex. 8163A)" + +#: ../data/builder/template-designer.glade.h:3 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(p.ex. Avery, Acme, ...)" + +#: ../data/builder/template-designer.glade.h:4 +msgid "1. Outer radius:" +msgstr "1. Radi exterior:" + +#: ../data/builder/template-designer.glade.h:5 +msgid "1. Radius:" +msgstr "1. Radi:" + +#: ../data/builder/template-designer.glade.h:6 +msgid "1. Width:" +msgstr "1. Amplada:" + +#: ../data/builder/template-designer.glade.h:7 +msgid "2. Height:" +msgstr "2. Alçada:" + +#: ../data/builder/template-designer.glade.h:8 +msgid "2. Inner radius:" +msgstr "2. Radi interior:" + +#: ../data/builder/template-designer.glade.h:9 +msgid "2. Waste (overprint allowed):" +msgstr "2. Residu (es pot imprimir fora dels límits):" + +#: ../data/builder/template-designer.glade.h:10 +msgid "3. Clipping width:" +msgstr "3. Amplada de retallada:" + +#: ../data/builder/template-designer.glade.h:11 +msgid "3. Margin" +msgstr "3. Marge" + +#: ../data/builder/template-designer.glade.h:12 +msgid "3. Round (radius of corner):" +msgstr "3. Corba (radi de la cantonada):" + +#: ../data/builder/template-designer.glade.h:13 +msgid "4. Clipping height:" +msgstr "4. Alçada de retallada" + +#: ../data/builder/template-designer.glade.h:14 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "2. Residu horitz. (es pot imprimir fora dels límits):" + +#: ../data/builder/template-designer.glade.h:15 +msgid "5. Vert. waste (overprint allowed):" +msgstr "5. Residu vert. (es pot imprimir fora dels límits):" + +#: ../data/builder/template-designer.glade.h:16 +msgid "5. Waste (overprint allowed):" +msgstr "2. Residu (es pot imprimir fora dels límits):" + +#: ../data/builder/template-designer.glade.h:17 +msgid "6. Margin" +msgstr "6. Marge" + +#: ../data/builder/template-designer.glade.h:18 +msgid "Brand/Manufacturer:" +msgstr "Marca/fabricant:" + +#: ../data/builder/template-designer.glade.h:19 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD (també s'hi inclouen els CD de mida de targeta de crèdit)" + +#: ../data/builder/template-designer.glade.h:20 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"Enhorabona!\n" +"\n" +"Heu completat el dissenyador de plantilles del gLabels.\n" +"Si voleu acceptar i desar el vostre disseny, premeu «Aplica».\n" +"\n" +"En cas contrari, podeu fer clic a «Cancel·la» per a abandonar-lo \n" +"o a «Enrere» per a continuar-lo editant." + +#: ../data/builder/template-designer.glade.h:27 +msgid "Description:" +msgstr "Descripció:" + +#: ../data/builder/template-designer.glade.h:28 +msgid "Distance from left edge (x0):" +msgstr "Distància des de la vora esquerra (x0):" + +#: ../data/builder/template-designer.glade.h:29 +msgid "Distance from top edge (y0):" +msgstr "Distància des de la vora superior (y0):" + +#: ../data/builder/template-designer.glade.h:31 +msgid "Horizontal pitch (dx):" +msgstr "Separació horitzontal (dx):" + +#: ../data/builder/template-designer.glade.h:32 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" +"Quantes disposicions contindrà la vostra plantilla?\n" +"\n" +"Una disposició és un conjunt d'etiquetes o targetes que es poden disposar \n" +"en una graella simple. La majoria de les plantilles només necessiten una \n" +"disposició, com podeu veure en el primer exemple.\n" +"El segon exemple mostra en quins casos en calen dues." + +#: ../data/builder/template-designer.glade.h:37 +msgid "Layout #1" +msgstr "Disposició n. 1" + +#: ../data/builder/template-designer.glade.h:38 +msgid "Layout #2" +msgstr "Disposició n. 2" + +#: ../data/builder/template-designer.glade.h:39 +msgid "Number across (nx):" +msgstr "Nombre per amplada (nx):" + +#: ../data/builder/template-designer.glade.h:40 +msgid "Number down (ny):" +msgstr "Nombre per alçada (ny):" + +#: ../data/builder/template-designer.glade.h:41 +msgid "Number of layouts:" +msgstr "Nombre de disposicions:" + +#: ../data/builder/template-designer.glade.h:42 +#: ../data/builder/wdgt-media-select.glade.h:3 +msgid "Page size:" +msgstr "Mida de la pàgina:" + +#: ../data/builder/template-designer.glade.h:43 +msgid "Part #:" +msgstr "Núm. de model:" + +#: ../data/builder/template-designer.glade.h:44 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "" +"Introduïu la informació d'identificació següent sobre la papereria de la " +"plantilla." + +#: ../data/builder/template-designer.glade.h:45 +msgid "Please enter the following layout information." +msgstr "Introduïu la informació de disposició següent." + +#: ../data/builder/template-designer.glade.h:46 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "" +"Introduïu els paràmetres de mida següents d'una etiqueta única a la vostra " +"plantilla." + +#: ../data/builder/template-designer.glade.h:47 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" +"Introduïu els paràmetres de mida següents d'una etiqueta única o targeta a " +"la vostra plantilla" + +#: ../data/builder/template-designer.glade.h:48 +msgid "Please select the basic shape of the labels or cards." +msgstr "Seleccioneu la forma bàsica de les etiquetes o targetes." + +#: ../data/builder/template-designer.glade.h:49 +msgid "Please select the page size of the template stationery." +msgstr "Seleccioneu la mida de la pàgina de la papereria de la plantilla." + +#: ../data/builder/template-designer.glade.h:50 +msgid "Print test sheet" +msgstr "Imprimeix un full de mostra" + +#: ../data/builder/template-designer.glade.h:51 +msgid "Rectangular or square (can have rounded corners)" +msgstr "Rectangular o quadrada (pot tenir cantonades arrodonides)" + +#: ../data/builder/template-designer.glade.h:52 +msgid "Round" +msgstr "Circular" + +#: ../data/builder/template-designer.glade.h:53 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"Plantilles que requereixen\n" +"dues disposicions." + +#: ../data/builder/template-designer.glade.h:55 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"Plantilles que requereixen\n" +"una disposició." + +#: ../data/builder/template-designer.glade.h:57 +msgid "Vertical pitch (dy):" +msgstr "Separació vertical (dy):" + +#: ../data/builder/template-designer.glade.h:58 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"Us donem la benvinguda al dissenyador de plantilles del gLabels.\n" +"\n" +"Aquest diàleg us ajudarà a crear una plantilla personalitzada del \n" +"gLabels." + +#: ../data/builder/template-designer.glade.h:62 +msgid "cd_size_page" +msgstr "cd_size_page" + +#: ../data/builder/template-designer.glade.h:63 +msgid "finish_page" +msgstr "finish_page" + +#: ../data/builder/template-designer.glade.h:65 +msgid "layout_page" +msgstr "layout_page" + +#: ../data/builder/template-designer.glade.h:66 +msgid "name_page" +msgstr "name_page" + +#: ../data/builder/template-designer.glade.h:67 +msgid "nlayouts_page" +msgstr "nlayouts_page" + +#: ../data/builder/template-designer.glade.h:68 +msgid "pg_size_page" +msgstr "pg_size_page" + +#: ../data/builder/template-designer.glade.h:69 +msgid "rect_size_page" +msgstr "rect_size_page" + +#: ../data/builder/template-designer.glade.h:70 +msgid "round_size_page" +msgstr "round_size_page" + +#: ../data/builder/template-designer.glade.h:71 +msgid "shape_page" +msgstr "shape_page" + +#: ../data/builder/template-designer.glade.h:72 +msgid "start_page" +msgstr "start_page" + +#: ../data/builder/wdgt-media-select.glade.h:1 +msgid "Brand:" +msgstr "Marca:" + +#: ../data/builder/wdgt-media-select.glade.h:2 +msgid "Category:" +msgstr "Categoria:" + +#: ../data/builder/wdgt-media-select.glade.h:4 +msgid "Recent templates" +msgstr "Plantilles recents" + +#: ../data/builder/wdgt-media-select.glade.h:5 +msgid "Search all templates" +msgstr "Cerca totes les plantilles" + +#. Other ISO A series sizes +#: ../data/templates/paper-sizes.xml.h:2 +msgid "A0" +msgstr "A0" + +#: ../data/templates/paper-sizes.xml.h:3 +msgid "A1" +msgstr "A1" + +#: ../data/templates/paper-sizes.xml.h:4 +msgid "A10" +msgstr "A10" + +#: ../data/templates/paper-sizes.xml.h:5 +msgid "A2" +msgstr "A2" + +#: ../data/templates/paper-sizes.xml.h:6 +msgid "A3" +msgstr "A3" + +#: ../data/templates/paper-sizes.xml.h:7 +msgid "A4" +msgstr "A4" + +#: ../data/templates/paper-sizes.xml.h:8 +msgid "A5" +msgstr "A5" + +#: ../data/templates/paper-sizes.xml.h:9 +msgid "A6" +msgstr "A6" + +#: ../data/templates/paper-sizes.xml.h:10 +msgid "A7" +msgstr "A7" + +#: ../data/templates/paper-sizes.xml.h:11 +msgid "A8" +msgstr "A8" + +#: ../data/templates/paper-sizes.xml.h:12 +msgid "A9" +msgstr "A9" + +#. ISO B series sizes +#: ../data/templates/paper-sizes.xml.h:14 +msgid "B0" +msgstr "B0" + +#: ../data/templates/paper-sizes.xml.h:15 +msgid "B1" +msgstr "B1" + +#: ../data/templates/paper-sizes.xml.h:16 +msgid "B10" +msgstr "B10 " + +#: ../data/templates/paper-sizes.xml.h:17 +msgid "B2" +msgstr "B2" + +#: ../data/templates/paper-sizes.xml.h:18 +msgid "B3" +msgstr "B3" + +#: ../data/templates/paper-sizes.xml.h:19 +msgid "B4" +msgstr "B4" + +#: ../data/templates/paper-sizes.xml.h:20 +msgid "B5" +msgstr " " + +#: ../data/templates/paper-sizes.xml.h:21 +msgid "B6" +msgstr "B6 " + +#: ../data/templates/paper-sizes.xml.h:22 +msgid "B7" +msgstr "B7" + +#: ../data/templates/paper-sizes.xml.h:23 +msgid "B8" +msgstr "B8" + +#: ../data/templates/paper-sizes.xml.h:24 +msgid "B9" +msgstr "B9" + +#: ../data/templates/paper-sizes.xml.h:25 +msgid "US Executive" +msgstr "Executiu EUA" + +#. Other US paper sizes +#: ../data/templates/paper-sizes.xml.h:27 +msgid "US Legal" +msgstr "Legal EUA" + +#: ../data/templates/categories.xml.h:1 +msgid "Any card" +msgstr "Qualsevol targeta" + +#: ../data/templates/categories.xml.h:2 +msgid "Any label" +msgstr "Qualsevol etiqueta" + +#: ../data/templates/categories.xml.h:3 +msgid "Business cards" +msgstr "Targetes de visita" + +#: ../data/templates/categories.xml.h:4 +msgid "CD/DVD or other media" +msgstr "CD/DVD o un altre suport" + +#: ../data/templates/categories.xml.h:5 +msgid "Mailing/shipping products" +msgstr "Productes de correu/facturació" + +#: ../data/templates/categories.xml.h:6 +msgid "Rectangular labels" +msgstr "Etiquetes rectangulars" + +#: ../data/templates/categories.xml.h:7 +msgid "Round labels" +msgstr "Etiquetes arrodonides" + +#: ../data/templates/categories.xml.h:8 +msgid "Square labels" +msgstr "Etiquetes quadrades" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:2 +#: ../data/templates/avery-iso-templates.xml.h:2 +#: ../data/templates/dymo-other-templates.xml.h:4 +#: ../data/templates/misc-iso-templates.xml.h:2 +#: ../data/templates/zweckform-iso-templates.xml.h:2 +msgid "Address Labels" +msgstr "Etiquetes d'adreça" + +#. =================================================================== +#. ============================================================ +#. =================================================================== +#. ******************************************************************** +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:4 +#: ../data/templates/avery-iso-templates.xml.h:8 +#: ../data/templates/misc-us-templates.xml.h:4 +#: ../data/templates/misc-iso-templates.xml.h:12 +#: ../data/templates/zweckform-iso-templates.xml.h:6 +msgid "Business Cards" +msgstr "Targetes de visita" + +#. =================================================================== +#. =============================================================== +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:6 +#: ../data/templates/avery-iso-templates.xml.h:14 +#: ../data/templates/misc-us-templates.xml.h:8 +#: ../data/templates/misc-iso-templates.xml.h:16 +#: ../data/templates/zweckform-iso-templates.xml.h:8 +msgid "CD/DVD Labels" +msgstr "Etiquetes de CD/DVD" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:8 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "Etiquetes de CD/DVD (etiquetes del disc)" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:10 +msgid "CD/DVD Labels (Spine Labels)" +msgstr "Etiquetes de CD/DVD (etiquetes del llom)" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:12 +#: ../data/templates/avery-iso-templates.xml.h:16 +msgid "Diskette Labels" +msgstr "Etiquetes de disquet" + +#. the LSK labels can be torn in half down the center +#: ../data/templates/avery-us-templates.xml.h:14 +msgid "Divider Labels" +msgstr "Etiquetes divisòries" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:16 +msgid "Filing Labels" +msgstr "Etiquetes d'arxivador" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:18 +msgid "Full Sheet Labels" +msgstr "Etiquetes de full complet" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:20 +msgid "ID Labels" +msgstr "Etiquetes d'identificació" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:22 +msgid "Index Cards" +msgstr "Targetes d'índex" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:24 +msgid "Large Round Labels" +msgstr "Etiquetes rodones grans" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:26 +msgid "Name Badge Labels" +msgstr "Etiquetes d'acreditació" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:28 +msgid "Post cards" +msgstr "Postals" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:30 +#: ../data/templates/dymo-other-templates.xml.h:12 +msgid "Return Address Labels" +msgstr "Etiquetes d'adreça de retorn" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:32 +msgid "Round Labels" +msgstr "Etiquetes arroronides" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:34 +msgid "Shipping Labels" +msgstr "Etiquetes de facturació" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:36 +msgid "Small Round Labels" +msgstr "Etiquetes rodones petites" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:38 +msgid "Square Labels" +msgstr "Etiquetes quadrades" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:40 +msgid "Tent Cards" +msgstr "Targetes doblegades" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:42 +msgid "Video Tape Face Labels" +msgstr "Etiquetes de caràtula de cinta de vídeo" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:44 +msgid "Video Tape Spine Labels" +msgstr "Etiquetes de llom de cinta de vídeo" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:4 +msgid "Address labels" +msgstr "Etiquetes d'adreça" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:6 +msgid "Allround labels" +msgstr "Etiquetes d'ús general" + +#. =============================================================== +#: ../data/templates/avery-iso-templates.xml.h:10 +msgid "CD Booklet" +msgstr "Llibret de CD" + +#. =============================================================== +#: ../data/templates/avery-iso-templates.xml.h:12 +msgid "CD Inlet" +msgstr "Coberta interior de CD" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:18 +msgid "Diskette labels" +msgstr "Etiquetes de disquet" + +#. =============================================================== +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:20 +#: ../data/templates/misc-us-templates.xml.h:18 +#: ../data/templates/misc-iso-templates.xml.h:36 +#: ../data/templates/zweckform-iso-templates.xml.h:16 +msgid "Mailing Labels" +msgstr "Etiquetes de correu" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:22 +msgid "Mailing labels" +msgstr "Etiquetes de correu" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:24 +msgid "Mini Address Labels" +msgstr "Etiquetes d'adreça miniatura" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:26 +msgid "Shipping labels" +msgstr "Etiquetes de facturació" + +#. =================================================================== +#: ../data/templates/avery-other-templates.xml.h:2 +msgid "File Folder Labels" +msgstr "Etiquetes d'arxivador" + +#: ../data/templates/brother-other-templates.xml.h:1 +msgid "Multi Purpose Labels 17mm x 54mm" +msgstr "Etiquetes d'ús general 17 mm x 54 mm" + +#: ../data/templates/brother-other-templates.xml.h:2 +msgid "Shipping Labels 62mm x 100mm" +msgstr "Etiquetes de facturació 62 mm x 100 mm" + +#. +#. ********************************************************************* +#. ********************************************************************* +#. Labels for the Brother QL-500/550/650 PC Label Printers +#. +#. These templates work with the Brother Linux Printer CUPS Driver. It +#. is unknown if these work correctly with the foomatic print driver for +#. these printers. +#. +#. One difference from typical templates is that the template size is +#. not the actual media size - it is the size of the printable area, +#. which is smaller than the media size. This is because (at least with +#. the Brother driver) coordinates are relative the corner of this area. +#. +#. ********************************************************************* +#. ********************************************************************* +#. +#: ../data/templates/brother-other-templates.xml.h:20 +msgid "Standard Address Labels 29mm x 90mm" +msgstr "Etiquetes d'adreça estàndard 29 mm x 90 mm" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:2 +msgid "3.5in Diskette" +msgstr "Disquet de 3.5\\\"" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:6 +msgid "File Folder" +msgstr "Arxivador" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:8 +msgid "Hanging Folder" +msgstr "Carpeta penjant d'arxiu" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:10 +msgid "Large Address Labels" +msgstr "Etiquetes d'adreça grans" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:14 +msgid "Shipping Address Labels" +msgstr "Etiquetes d'adreça de facturació" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:2 +msgid "Business Card CD" +msgstr "CD de targeta de visita" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:6 +msgid "CD Template Rectangles" +msgstr "Rectangles de plantilla de CD" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:10 +msgid "CD/DVD Labels (Face Only)" +msgstr "Etiquetes de CD/DVD (només la caràtula)" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:12 +#: ../data/templates/misc-iso-templates.xml.h:18 +msgid "CD/DVD Labels (face only)" +msgstr "Etiquetes de CD/DVD (només la caràtula)" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:14 +msgid "Cassette Labels" +msgstr "Etiquetes de casset" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:16 +msgid "DLT Labels" +msgstr "Etiquetes per a cintes DLT" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:20 +msgid "Microtube labels" +msgstr "Etiquetes de microtubs" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:22 +msgid "Mini-CD Labels" +msgstr "Etiquetes de CD miniatura" + +#: ../data/templates/misc-us-templates.xml.h:23 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "Etiquetes PRO CD (2, només el llom)" + +#: ../data/templates/misc-us-templates.xml.h:24 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "Etiquetes PRO CD (2, només la caràtula)" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:26 +#: ../data/templates/misc-iso-templates.xml.h:42 +msgid "PRO CD Labels 2-up (face only)" +msgstr "Etiquetes PRO CD (2, només la caràtula)" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:28 +msgid "Slimline CD Case (rightside up)" +msgstr "Capsa de CD prima (cara amunt)" + +#: ../data/templates/misc-us-templates.xml.h:29 +msgid "Slimline CD Case (upside down)" +msgstr "Capsa de CD prima (cara avall)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:4 +#: ../data/templates/zweckform-iso-templates.xml.h:4 +msgid "Allround Labels" +msgstr "Etiquetes d'ús general" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:6 +msgid "Arch File Labels" +msgstr "Etiquetes d'arxivador" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:8 +msgid "Arch File Labels (large)" +msgstr "Etiquetes d'arxivador (grans)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:10 +msgid "Arch File Labels (small)" +msgstr "Etiquetes d'arxivador (petites)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:14 +msgid "CD Labels" +msgstr "Etiquetes de CD" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:20 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "Etiquetes CD/DVD amb format estàndard (només la caràtula)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:22 +msgid "Diskette Labels (face only)" +msgstr "Etiquetes de disquet (només la caràtula)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:24 +msgid "EPSON Photo Stickers 16" +msgstr "Fotografies adhesives d'EPSON (16)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:26 +msgid "Etiketten" +msgstr "Etiquetes" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:28 +msgid "Fridge Magnet Stickers" +msgstr "Enganxines d'imant de frigorífic" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:30 +msgid "General Labels" +msgstr "Etiquetes generals" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:32 +msgid "Inkjet/Laser Labels 70x37mm" +msgstr "Etiquetes per a impressió a raig de tinta/làser 70 x 37 mm" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:38 +msgid "Mailing Labels-2 columns" +msgstr "Etiquetes de correu - 2 columnes" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:40 +msgid "Mailing Labels-3 columns" +msgstr "Etiquetes de correu - 3 columnes" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:44 +#: ../data/templates/zweckform-iso-templates.xml.h:24 +msgid "Rectangular Labels" +msgstr "Etiquetes rectangulars" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:46 +msgid "Video Labels (face only)" +msgstr "Etiquetes de vídeo (només la caràtula)" + +#. =================================================================== +#: ../data/templates/misc-other-templates.xml.h:2 +msgid "Multi-Purpose Labels" +msgstr "Etiquetes d'ús general" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:10 +msgid "Correction and Cover-up Labels" +msgstr "Etiqueted de correcció i cobertura" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:12 +msgid "File Back Labels" +msgstr "Etiquetes de llom d'arxivador" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:14 +msgid "Lever Arch File Labels" +msgstr "Etiquetes d'arxivador" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:18 +msgid "Multi-purpose Stick+Lift Labels" +msgstr "Etiquetes d'ús general reenganxables «Stick+Lift»" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:20 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "Etiquetes de targeta QSL 70 mm x 50,8 mm" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:22 +msgid "Rectangular Copier Labels" +msgstr "Etiquetes de copiadora rectangulars" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:26 +msgid "Video Labels (back)" +msgstr "Etiquetes de vídeo (part posterior)" + +#: ../data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "Crea etiquetes, targetes de visita i caràtules de suports multimèdia" + +#: ../data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "Dissenyador d'etiquetes gLabels" + +#: ../data/mime/glabels.keys.in.h:1 ../data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "Fitxer de projecte del gLabels" + +#: ../barcode-0.98/compat/getopt.c:583 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: l'opció «%s» és ambigua\n" + +#: ../barcode-0.98/compat/getopt.c:607 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: l'opció «--%s» no admet cap argument\n" + +#: ../barcode-0.98/compat/getopt.c:612 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: l'opció «%c%s» no permet cap argument\n" + +#: ../barcode-0.98/compat/getopt.c:629 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: l'opció «%s» requereix un argumetn\n" + +#. --option +#: ../barcode-0.98/compat/getopt.c:658 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: no es reconeix l'opció «--%s»\n" + +#. +option or -option +#: ../barcode-0.98/compat/getopt.c:662 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: no es reconeix l'opció «%c%s»\n" + +#. 1003.2 specifies the format of this message. +#: ../barcode-0.98/compat/getopt.c:688 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: l'opció --%c no és vàlida\n" + +#: ../barcode-0.98/compat/getopt.c:691 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: l'opció --%c no és vàlida\n" + +#: ../barcode-0.98/compat/getopt.c:727 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: l'opció --%c requereix un argument\n" + + diff --git a/po/cs.po b/po/cs.po new file mode 100644 index 00000000..83b65caa --- /dev/null +++ b/po/cs.po @@ -0,0 +1,2484 @@ +# cs translation of Glabels. +# Copyright (C) 2005 THE Glabels'S COPYRIGHT HOLDER +# This file is distributed under the same license as the Glabels package. +# David Makovský (Yakeen) , 2005 +# Zbynek Mrkvicka , 2005 +# +msgid "" +msgstr "" +"Project-Id-Version: Glabels 2.0.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-01-22 11:49-0500\n" +"PO-Revision-Date: 2005-02-02 21:35+0100\n" +"Last-Translator: David Makovský (Yakeen) \n" +"Language-Team: cs \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit" + +#: src/glabels.c:116 +msgid "Could not initialize Bonobo!\n" +msgstr "Nepodařila se inicializace Bonobo serveru!\n" + +#: src/glabels-batch.c:52 +msgid "print this message" +msgstr "tisk této zprávy" + +#: src/glabels-batch.c:54 +msgid "print the version of glabels-batch being used" +msgstr "vypíše verzi glabels-batch, která je používána" + +#: src/glabels-batch.c:56 +msgid "set output filename (default=\"output.ps\")" +msgstr "nastavte jméno souboru výstupu (standartně=\"output.ps\")" + +#: src/glabels-batch.c:56 src/glabels-batch.c:70 +msgid "filename" +msgstr "název souboru" + +#: src/glabels-batch.c:58 +msgid "number of sheets (default=1)" +msgstr "počet stránek (standartně=1)" + +#: src/glabels-batch.c:58 +msgid "sheets" +msgstr "seÅ¡ity" + +#: src/glabels-batch.c:60 +msgid "number of copies (default=1)" +msgstr "počet kopií (standartní nastavení = 1)" + +#: src/glabels-batch.c:60 +msgid "copies" +msgstr "kopie" + +#: src/glabels-batch.c:62 +msgid "first label on first sheet (default=1)" +msgstr "první etiketa na prvním listu (standartně=1)" + +#: src/glabels-batch.c:62 +msgid "first" +msgstr "první" + +#: src/glabels-batch.c:64 src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "tisk obrysů (test zarovnávání tiskárny)" + +#: src/glabels-batch.c:66 src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "obrácený tisk (např. převrácený obrázek)" + +#: src/glabels-batch.c:68 src/print-dialog.c:351 +msgid "print crop marks" +msgstr "tisknout značky pro ořez" + +#: src/glabels-batch.c:70 +msgid "input file for merging" +msgstr "vstupní soubor pro sloučení" + +#: src/glabels-batch.c:107 +msgid "[OPTION...] GLABELS_FILE..." +msgstr "" + +#: src/glabels-batch.c:127 +#, c-format +msgid "missing glabels file\n" +msgstr "chybí soubor programu glabels\n" + +#: src/glabels-batch.c:158 +#, c-format +msgid "cannot perform document merge with glabels file %s\n" +msgstr "" + +#: src/glabels-batch.c:182 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "nepodařilo se otevřít soubor programu glabels %s\n" + +#: src/window.c:244 +msgid "(none) - gLabels" +msgstr "(žádný) - gLabels" + +#: src/window.c:414 +msgid "(modified)" +msgstr "(modifikováno)" + +#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 +msgid "_Select Mode" +msgstr "Mód výběru" + +#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 +msgid "_Text" +msgstr "_Text" + +#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 +msgid "_Line" +msgstr "Čár_a" + +#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 +msgid "_Box" +msgstr "O_bdélník" + +#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 +msgid "_Ellipse" +msgstr "_Elipsa" + +#: src/stock.c:70 data/ui/glabels-ui.xml.h:146 +msgid "_Image" +msgstr "Obrá_zek" + +#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 +msgid "Bar_code" +msgstr "Čárový _kód" + +#: src/stock.c:72 +msgid "_Merge Properties" +msgstr "Vlastnosti sloučení" + +#: src/stock.c:73 +msgid "Object _Properties" +msgstr "Nastavení objektu" + +#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 +msgid "Bring to _Front" +msgstr "Vynést dopředu" + +#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 +msgid "Send to _Back" +msgstr "Poslat _dozadu" + +#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 +msgid "Rotate _Left" +msgstr "Otočit do_leva" + +#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 +msgid "Rotate _Right" +msgstr "Otočit do_prava" + +#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "Převrátit _vodorovně" + +#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "Převrátit _svisle" + +#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 +msgid "_Lefts" +msgstr "Nalevo" + +#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 +msgid "_Rights" +msgstr "Napravo" + +#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 +msgid "_Centers" +msgstr "_Nastřed" + +#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 +msgid "_Tops" +msgstr "Nahoru" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "Naspod" + +#: src/stock.c:85 +msgid "Centers" +msgstr "Nastřed" + +#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "Střed etikety" + +#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "Barva výplně" + +#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "Barva čáry" + +#: src/stock.c:90 src/stock.c:92 +msgid "Linked" +msgstr "Spojeno" + +#: src/stock.c:91 src/stock.c:93 +msgid "Not Linked" +msgstr "Nespojeno" + +#: src/ui-property-bar.c:345 src/object-editor.c:499 +msgid "Default" +msgstr "Výchozí" + +#: src/ui-property-bar.c:360 src/object-editor.c:512 +msgid "No fill" +msgstr "Bez výplně" + +#: src/ui-property-bar.c:375 src/object-editor.c:505 +msgid "No line" +msgstr "" + +#: src/ui-sidebar.c:180 +msgid "Object properties" +msgstr "Vlastnosti objektu" + +#: src/commands.c:385 +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 pro tvorbu etiket a vizitek v prostředí GNOME.\n" +" \n" +"Glabels je svobodný software, můžete s ním nakládat podle GPL licence verze " +"2, nebo jakoukoliv pozdější.\n" +" \n" +"Program je distribuován s nadějí, že bude nápomocen, ale je distribuován bez " +"ručení záruky, tak jak je uvedeno v GPL Licenci verze 2. Pro další detaily " +"si přečtěte tuto licenci.\n" + +#: src/commands.c:399 +msgid "See the file AUTHORS for additional credits," +msgstr "Prohlédněte si soubor AUTHORS pro dodatečné informace," + +#: src/commands.c:400 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "nebo navÅ¡tivte http://glabels.sourceforge.net/" + +#: src/commands.c:409 +msgid " " +msgstr "" + +#: src/commands.c:424 +msgid "glabels" +msgstr "glabels" + +#: src/file.c:100 +msgid "New Label or Card" +msgstr "Nová etiketa či vizitka" + +#: src/file.c:132 src/file.c:304 +msgid "Media Type" +msgstr "Typ média" + +#: src/file.c:138 src/file.c:310 +msgid "Label orientation" +msgstr "Orientace etikety" + +#: src/file.c:269 +msgid "Label properties" +msgstr "Vlastnosti etikety" + +#: src/file.c:452 src/file.c:870 +msgid "All files" +msgstr "VÅ¡echny soubory" + +#: src/file.c:457 src/file.c:875 +msgid "gLabels documents" +msgstr "Dokumenty gLabels" + +#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 +msgid "Empty file name selection" +msgstr "Prázdné pole jména souboru" + +#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 +msgid "Please select a file or supply a valid file name" +msgstr "Vyberte, prosím, soubor, nebo vypiÅ¡te platné jméno souboru" + +#: src/file.c:519 src/file.c:631 +msgid "File does not exist" +msgstr "Soubor neexistuje" + +#: src/file.c:563 data/ui/glabels-ui.xml.h:74 +msgid "Open" +msgstr "Otevřít" + +#: src/file.c:565 +msgid "Open label" +msgstr "Otevřít etiketu" + +#: src/file.c:707 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "nepodařilo se otevřít soubor \"%s\"" + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "Formát tohoto souboru není podporován" + +#: src/file.c:797 src/file.c:979 src/file.c:1174 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "Nepodařilo se uložit soubor \"%s\"" + +#: src/file.c:805 src/file.c:987 src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "Při ukládání se vyskytla chyba. Soubor nebyl uložen." + +#: src/file.c:848 src/file.c:1048 +#, c-format +msgid "Save \"%s\" as" +msgstr "Uložit \"%s\" jako" + +#: src/file.c:935 src/file.c:1131 +msgid "Please supply a valid file name" +msgstr "Prosím vepiÅ¡te platné jméno souboru" + +#: src/file.c:952 src/file.c:1147 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "Přepsat soubor \"%s\"?" + +#: src/file.c:960 src/file.c:1155 +msgid "File already exists." +msgstr "Soubor již existuje." + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "Uložit před zavřením změny v dokumentu \"%s\"?" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "VaÅ¡e změny budou ztraceny pokud je neuložíte." + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "Zavřít bez uložení" + +#. Should not happen +#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 +#: data/glade/object-editor.glade.h:37 +msgid "points" +msgstr "bodů" + +#: src/prefs.c:158 data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "palce" + +#: src/prefs.c:160 +msgid "mm" +msgstr "mm" + +#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 +msgid "gLabels Preferences" +msgstr "Nastavení programu gLabels" + +#. +#. * Submenu: Order +#. +#: src/view.c:3574 data/ui/glabels-ui.xml.h:154 +msgid "_Order" +msgstr "_Pořadí" + +#. +#. * Submenu: Rotate/Flip +#. +#: src/view.c:3595 data/ui/glabels-ui.xml.h:160 +msgid "_Rotate/Flip" +msgstr "_Rotace/Převrácení" + +#. +#. * Submenu: Align Horizontally +#. +#: src/view.c:3628 +msgid "Align _Horizontally" +msgstr "Zarovnat _vodorovně" + +#. +#. * Submenu: Align Vertically +#. +#: src/view.c:3667 +msgid "Align _Vertically" +msgstr "Zarovnat _svisle" + +#: src/view.c:3728 data/ui/glabels-ui.xml.h:137 +msgid "_Delete" +msgstr "_Smazat" + +#. Build editor. +#: src/view-box.c:224 +msgid "Box object properties" +msgstr "Vlastnosti obdélníku/čtverce" + +#. Build editor. +#: src/view-ellipse.c:224 +msgid "Ellipse object properties" +msgstr "Vlastnosti elipsy" + +#. Build editor. +#: src/view-line.c:224 +msgid "Line object properties" +msgstr "Vlastnosti čáry" + +#. Build editor. +#: src/view-image.c:223 +msgid "Image object properties" +msgstr "Vlastnosti obrázku" + +#. Build editor. +#: src/view-text.c:251 +msgid "Text object properties" +msgstr "Vlastnosti textu" + +#: src/view-text.c:563 data/glade/object-editor.glade.h:28 +msgid "Text" +msgstr "Text" + +#. Build editor. +#: src/view-barcode.c:210 +msgid "Barcode object properties" +msgstr "Vlastnosti čárového kódu" + +#: src/view-barcode.c:580 src/print.c:1089 +msgid "Invalid barcode data" +msgstr "Neplatná data čárového kódu" + +#: src/merge-properties-dialog.c:231 +msgid "Merge Properties" +msgstr "Nastavení sloučení" + +#. ---- Source section ---- +#: src/merge-properties-dialog.c:237 +msgid "Source" +msgstr "Zdroj" + +#: src/merge-properties-dialog.c:245 +msgid "Format:" +msgstr "Formát:" + +#. Location line +#: src/merge-properties-dialog.c:273 +msgid "Location:" +msgstr "Umístění:" + +#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 +msgid "Select merge-database source" +msgstr "Výběr databázového zdroje pro sloučení" + +#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 +msgid "N/A" +msgstr "Není k dispozici" + +#. ---- Sample Fields section ---- +#: src/merge-properties-dialog.c:300 +msgid "Record selection/preview:" +msgstr "Náhled na záznam výběru" + +#: src/merge-properties-dialog.c:326 +msgid "Select" +msgstr "Výběr" + +#: src/merge-properties-dialog.c:334 +msgid "Record/Field" +msgstr "Záznam/Pole" + +#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 +msgid "Data" +msgstr "Data" + +#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:81 +msgid "Print" +msgstr "Tisk" + +#: src/print-dialog.c:281 +msgid "_Job" +msgstr "Úloha" + +#: src/print-dialog.c:286 +msgid "P_rinter" +msgstr "_Tiskárna" + +#. ----------- Add simple-copies widget ------------ +#: src/print-dialog.c:314 +msgid "Copies" +msgstr "Kopie" + +#. ------- Add merge control widget ------------ +#: src/print-dialog.c:322 +msgid "Document merge control" +msgstr "Kontrola sloučení dokumentu" + +#. ----------- Add custom print options area ------------ +#: src/print-dialog.c:330 +msgid "Options" +msgstr "Možnosti" + +#: src/print-dialog.c:553 src/print-dialog.c:592 +msgid "Print preview" +msgstr "Náhled tisku" + +#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 +msgid "gLabels Template Designer" +msgstr "Návrhář Å¡ablon gLabels" + +#: src/bc.c:60 +msgid "POSTNET (any)" +msgstr "POSTNET (jakýkoli)" + +#: src/bc.c:63 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (pouze ZIP)" + +#: src/bc.c:66 +msgid "POSTNET-9 (ZIP+4)" +msgstr "" + +#: src/bc.c:69 +msgid "POSTNET-11 (DPBC)" +msgstr "" + +#: src/bc.c:72 +msgid "EAN (any)" +msgstr "EAN (jakýkoli)" + +#: src/bc.c:75 +msgid "EAN-8" +msgstr "" + +#: src/bc.c:78 +msgid "EAN-8 +2" +msgstr "" + +#: src/bc.c:81 +msgid "EAN-8 +5" +msgstr "" + +#: src/bc.c:84 +msgid "EAN-13" +msgstr "" + +#: src/bc.c:87 +msgid "EAN-13 +2" +msgstr "" + +#: src/bc.c:90 +msgid "EAN-13 +5" +msgstr "" + +#: src/bc.c:93 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A nebo UPC-E)" + +#: src/bc.c:96 +msgid "UPC-A" +msgstr "" + +#: src/bc.c:99 +msgid "UPC-A +2" +msgstr "" + +#: src/bc.c:102 +msgid "UPC-A +5" +msgstr "" + +#: src/bc.c:105 +msgid "UPC-E" +msgstr "" + +#: src/bc.c:108 +msgid "UPC-E +2" +msgstr "" + +#: src/bc.c:111 +msgid "UPC-E +5" +msgstr "" + +#: src/bc.c:114 +msgid "ISBN" +msgstr "" + +#: src/bc.c:117 +msgid "ISBN +5" +msgstr "" + +#: src/bc.c:120 +msgid "Code 39" +msgstr "" + +#: src/bc.c:123 +msgid "Code 128" +msgstr "" + +#: src/bc.c:126 +msgid "Code 128C" +msgstr "" + +#: src/bc.c:129 +msgid "Code 128B" +msgstr "" + +#: src/bc.c:132 +msgid "Interleaved 2 of 5" +msgstr "" + +#: src/bc.c:135 +msgid "Codabar" +msgstr "" + +#: src/bc.c:138 +msgid "MSI" +msgstr "" + +#: src/bc.c:141 +msgid "Plessey" +msgstr "" + +#: src/label.c:569 +msgid "Untitled" +msgstr "Nepojmenovaný" + +#: src/xml-label.c:176 src/xml-label.c:213 +msgid "xmlParseFile error" +msgstr "chyba (xmlParseFile)" + +#: src/xml-label.c:250 +msgid "No document root" +msgstr "" + +#: src/xml-label.c:264 +msgid "Importing from glabels 0.1 format" +msgstr "Importuji formát glabels verze 0.1" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "Importuji formát glabels verze 0.4" + +#: src/xml-label.c:279 +msgid "Importing from glabels 1.91 format" +msgstr "Importuji formát glabels verze 1.91" + +#: src/xml-label.c:282 +msgid "bad document, unknown glabels Namespace" +msgstr "" + +#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "" + +#: src/xml-label.c:348 src/xml-label-191.c:165 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "" + +#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "" + +#: src/xml-label.c:796 src/xml-label-191.c:605 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "" + +#: src/xml-label.c:962 libglabels/xml-template.c:535 +msgid "Utf8 conversion error." +msgstr "Chyba při konverzi UTF-8" + +#: src/xml-label.c:969 libglabels/xml-template.c:542 +msgid "Problem saving xml file." +msgstr "Problém s ukládáním dat do xml." + +#. This should always be an id, but just in case a name +#. slips by! +#: src/xml-label-191.c:680 libglabels/xml-template.c:199 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "" + +#: src/xml-label-191.c:690 libglabels/xml-template.c:209 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "" + +#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 +msgid "None" +msgstr "Žádný" + +#: src/merge-init.c:53 +msgid "Text file with comma delimeters (CSV)" +msgstr "Text se středníky jako oddělovači sloupců (CSV)" + +#: src/merge-init.c:60 +msgid "Text file with colon delimeters" +msgstr "Text s dvojtečkami jako oddělovači sloupců" + +#: src/merge-init.c:67 +msgid "Text file with tab delimeters" +msgstr "Text s tabulátory jako oddělovači sloupců" + +#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 +msgid "File:" +msgstr "Soubor:" + +#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 +msgid "Key:" +msgstr "Klíč:" + +#: src/wdgt-print-copies.c:179 +msgid "Sheets:" +msgstr "Stránky:" + +#: src/wdgt-print-copies.c:197 +msgid "Labels" +msgstr "Etikety" + +#: src/wdgt-print-copies.c:200 +msgid "from:" +msgstr "od:" + +#: src/wdgt-print-copies.c:207 +msgid "to:" +msgstr "komu:" + +#: src/wdgt-print-merge.c:178 +msgid "Start on label" +msgstr "Začít na etiketě" + +#: src/wdgt-print-merge.c:186 +msgid "on 1st sheet" +msgstr "na první stránce" + +#: src/wdgt-print-merge.c:195 +msgid "Copies:" +msgstr "Kopie:" + +#: src/wdgt-print-merge.c:201 +msgid "Collate" +msgstr "Shromáždit" + +#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 +msgid "Description:" +msgstr "Popis:" + +#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 +msgid "Page size:" +msgstr "Velikost stránky:" + +#: src/wdgt-media-select.c:290 +msgid "Label size:" +msgstr "Velikost etikety:" + +#: src/wdgt-media-select.c:301 +msgid "Layout:" +msgstr "Rozvržení:" + +#: src/wdgt-media-select.c:578 +#, c-format +msgid "%d x %d (%d per sheet)" +msgstr "%d x %d (%d na stránku)" + +#: src/wdgt-media-select.c:582 +#, c-format +msgid "%d per sheet" +msgstr "%d na stránku" + +#: src/wdgt-media-select.c:614 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: src/wdgt-media-select.c:619 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s průměr" + +#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s průměr" + +#: src/wdgt-rotate-label.c:193 +msgid "Rotate" +msgstr "Rotovat" + +#. This is the default custom color +#: src/mygal/color-palette.c:396 +msgid "custom" +msgstr "vlastní" + +#. "Custom" color - we'll pop up a GnomeColorPicker +#: src/mygal/color-palette.c:438 +msgid "Custom Color:" +msgstr "Vlastní barva" + +#: src/mygal/color-palette.c:446 +msgid "Choose Custom Color" +msgstr "Vyberte vlastní barvu" + +#: src/mygal/color-palette.c:579 +msgid "black" +msgstr "černá" + +#: src/mygal/color-palette.c:580 +msgid "light brown" +msgstr "světle hnědá" + +#: src/mygal/color-palette.c:581 +msgid "brown gold" +msgstr "zlatohnědá" + +#: src/mygal/color-palette.c:582 +msgid "dark green #2" +msgstr "tmavě zelená #2" + +#: src/mygal/color-palette.c:583 +msgid "navy" +msgstr "námořnická modř" + +#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 +msgid "dark blue" +msgstr "tmavě modrá" + +#: src/mygal/color-palette.c:585 +msgid "purple #2" +msgstr "purpurová #2" + +#: src/mygal/color-palette.c:586 +msgid "very dark gray" +msgstr "velmi tmavě Å¡edá" + +#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 +msgid "dark red" +msgstr "tmavě červená" + +#: src/mygal/color-palette.c:590 +msgid "red-orange" +msgstr "červenooranžová" + +#: src/mygal/color-palette.c:591 +msgid "gold" +msgstr "zlatá" + +#: src/mygal/color-palette.c:592 +msgid "dark green" +msgstr "tmavě zelená" + +#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 +msgid "dull blue" +msgstr "mdlá modř" + +#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 +msgid "blue" +msgstr "modrá" + +#: src/mygal/color-palette.c:595 +msgid "dull purple" +msgstr "mdlý purpur" + +#: src/mygal/color-palette.c:596 +msgid "dark grey" +msgstr "tmavě Å¡edá" + +#: src/mygal/color-palette.c:599 +msgid "red" +msgstr "červená" + +#: src/mygal/color-palette.c:600 +msgid "orange" +msgstr "oranžová" + +#: src/mygal/color-palette.c:601 +msgid "lime" +msgstr "citrónová" + +#: src/mygal/color-palette.c:602 +msgid "dull green" +msgstr "mdlá zeleň" + +#: src/mygal/color-palette.c:603 +msgid "dull blue #2" +msgstr "mdlá modř #2" + +#: src/mygal/color-palette.c:604 +msgid "sky blue #2" +msgstr "nebeská modř #2" + +#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 +msgid "purple" +msgstr "purpurová" + +#: src/mygal/color-palette.c:606 +msgid "gray" +msgstr "Å¡edá" + +#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 +msgid "magenta" +msgstr "fialová" + +#: src/mygal/color-palette.c:610 +msgid "bright orange" +msgstr "jasně oranžová" + +#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 +msgid "yellow" +msgstr "žludá" + +#: src/mygal/color-palette.c:612 +msgid "green" +msgstr "zelená" + +#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 +msgid "cyan" +msgstr "azurová" + +#: src/mygal/color-palette.c:614 +msgid "bright blue" +msgstr "jasně modrá" + +#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 +msgid "red purple" +msgstr "červenofialová" + +#: src/mygal/color-palette.c:616 +msgid "light grey" +msgstr "světle Å¡edá" + +#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 +msgid "pink" +msgstr "růžová" + +#: src/mygal/color-palette.c:620 +msgid "light orange" +msgstr "světle oranžová" + +#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 +msgid "light yellow" +msgstr "světle žlutá" + +#: src/mygal/color-palette.c:622 +msgid "light green" +msgstr "světle zelená" + +#: src/mygal/color-palette.c:623 +msgid "light cyan" +msgstr "světle azurová" + +#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 +msgid "light blue" +msgstr "světle modrá" + +#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 +msgid "light purple" +msgstr "světle purpurová" + +#: src/mygal/color-palette.c:626 +msgid "white" +msgstr "bílá" + +#: src/mygal/color-palette.c:631 +msgid "purplish blue" +msgstr "fialovomodrá" + +#: src/mygal/color-palette.c:635 +msgid "dark purple" +msgstr "tmavě purpurová" + +#: src/mygal/color-palette.c:637 +msgid "sky blue" +msgstr "nebeská modř" + +#: libglabels/template.c:848 +#, c-format +msgid "Generic %s full page" +msgstr "" + +#: libglabels/template.c:897 +msgid "No template files found!" +msgstr "Nenalezeny Å¡ablony!" + +#. Create and append an "Other" entry. +#: libglabels/paper.c:67 +msgid "Other" +msgstr "Jiné" + +#: libglabels/paper.c:361 +msgid "No paper files found!" +msgstr "" + +#: data/ui/glabels-ui.xml.h:1 +msgid "About glabels" +msgstr "O programu glabels" + +#: data/ui/glabels-ui.xml.h:2 +msgid "About..." +msgstr "O programu" + +#: data/ui/glabels-ui.xml.h:3 +msgid "Align _Horizontal" +msgstr "Zarovnat _vodorovně" + +#: data/ui/glabels-ui.xml.h:4 +msgid "Align _Vertical" +msgstr "Zarovnat _svisle" + +#: data/ui/glabels-ui.xml.h:5 +msgid "Align objects to bottoms" +msgstr "Zarovnat objekty dolů" + +#: data/ui/glabels-ui.xml.h:6 +msgid "Align objects to horizontal centers" +msgstr "Zarovnat objekty vodorovně na střed" + +#: data/ui/glabels-ui.xml.h:7 +msgid "Align objects to left edges" +msgstr "Zarovnat objekty dle levého kraje" + +#: data/ui/glabels-ui.xml.h:8 +msgid "Align objects to right edges" +msgstr "Zarovnat objekty dle pravého kraje" + +#: data/ui/glabels-ui.xml.h:9 +msgid "Align objects to tops" +msgstr "Zarovnat objekty nahoru" + +#: data/ui/glabels-ui.xml.h:10 +msgid "Align objects to vertical centers" +msgstr "Zarovnat objekty svisle na střed" + +#: data/ui/glabels-ui.xml.h:12 +msgid "Bold" +msgstr "Tučně" + +#: data/ui/glabels-ui.xml.h:14 +msgid "Center align" +msgstr "Na střed" + +#: data/ui/glabels-ui.xml.h:15 +msgid "Center objects to horizontal label center" +msgstr "Vycentrovat objekty vodorovně na střed etikety" + +#: data/ui/glabels-ui.xml.h:16 +msgid "Center objects to vertical label center" +msgstr "Vycentrovat objekty svisle na střed etikety" + +#: data/ui/glabels-ui.xml.h:17 +msgid "Change the visibility of markup lines in the current window" +msgstr "Změnit viditelnost hraničních čar v okně" + +#: data/ui/glabels-ui.xml.h:18 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "Změnit viditelnost panelu kreslení v okně" + +#: data/ui/glabels-ui.xml.h:19 +msgid "Change the visibility of the grid in the current window" +msgstr "Změnit viditelnost mřížky v okně" + +#: data/ui/glabels-ui.xml.h:20 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "Změnit viditelnost hlavního panelu nástrojů v okně" + +#: data/ui/glabels-ui.xml.h:21 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "Změnit viditelnost panelu vlastností v okně" + +#: data/ui/glabels-ui.xml.h:22 +msgid "Close" +msgstr "Zavřít" + +#: data/ui/glabels-ui.xml.h:23 +msgid "Close the current file" +msgstr "Zavřít tento soubor" + +#: data/ui/glabels-ui.xml.h:24 +msgid "Configure the application" +msgstr "Konfigurovat aplikaci" + +#: data/ui/glabels-ui.xml.h:25 +msgid "Contents" +msgstr "Obsah" + +#: data/ui/glabels-ui.xml.h:26 +msgid "Copy" +msgstr "Kopírovat" + +#: data/ui/glabels-ui.xml.h:27 +msgid "Copy the selection" +msgstr "Kopírovat výběr" + +#: data/ui/glabels-ui.xml.h:28 +msgid "Create a custom template" +msgstr "Vytvořit vlastní Å¡ablonu" + +#: data/ui/glabels-ui.xml.h:29 +msgid "Create a new document" +msgstr "Vytvořit nový dokument" + +#: data/ui/glabels-ui.xml.h:30 +msgid "Create barcode object" +msgstr "Vložit čárový kód" + +#: data/ui/glabels-ui.xml.h:31 +msgid "Create box/rectangle object" +msgstr "Vytvořit čtverec/obdélník" + +#: data/ui/glabels-ui.xml.h:32 +msgid "Create ellipse/circle object" +msgstr "Vytvořit elipsu/kruh" + +#: data/ui/glabels-ui.xml.h:33 +msgid "Create image object" +msgstr "Vložit obrázek" + +#: data/ui/glabels-ui.xml.h:34 +msgid "Create line object" +msgstr "Vložit čáru" + +#: data/ui/glabels-ui.xml.h:35 +msgid "Create text object" +msgstr "Vložit text" + +#: data/ui/glabels-ui.xml.h:36 +msgid "Cu_t" +msgstr "_Vyjmout" + +#: data/ui/glabels-ui.xml.h:37 +msgid "Customize" +msgstr "Přizpůsobit" + +#: data/ui/glabels-ui.xml.h:38 +msgid "Customize Drawing Toolbar" +msgstr "Přizpůsobit panel kreslení" + +#: data/ui/glabels-ui.xml.h:39 +msgid "Customize Main Toolbar" +msgstr "Přizpůsobit hlavní panel" + +#: data/ui/glabels-ui.xml.h:40 +msgid "Customize Property Toolbar" +msgstr "Přizpůsobit panel vlastností" + +#: data/ui/glabels-ui.xml.h:41 +msgid "Customize toolbars" +msgstr "Přizpůsobit panely" + +#: data/ui/glabels-ui.xml.h:42 +msgid "Cut" +msgstr "Vyjmout" + +#: data/ui/glabels-ui.xml.h:43 +msgid "Cut the selection" +msgstr "Vyjmout výběr" + +#: data/ui/glabels-ui.xml.h:44 +msgid "Decrease magnification" +msgstr "ZmenÅ¡it" + +#: data/ui/glabels-ui.xml.h:45 +msgid "Delete" +msgstr "Smazat" + +#: data/ui/glabels-ui.xml.h:46 +msgid "Delete the selected objects" +msgstr "Smazat vybrané objekty" + +#: data/ui/glabels-ui.xml.h:47 +msgid "Drawing toolbar" +msgstr "Panl kreslení" + +#: data/ui/glabels-ui.xml.h:48 +msgid "Dump XML" +msgstr "Vypsat XML" + +#: data/ui/glabels-ui.xml.h:49 +msgid "Dump the UI Xml description" +msgstr "Vypsat popis UI v XML" + +#: data/ui/glabels-ui.xml.h:50 +msgid "Edit merge properties" +msgstr "Upravit vlastnosti sloučení" + +#: data/ui/glabels-ui.xml.h:54 +msgid "Flip object horizontally" +msgstr "Převrátit objekt vodorovně" + +#: data/ui/glabels-ui.xml.h:55 +msgid "Flip object vertically" +msgstr "Převrátit objekt svisle" + +#: data/ui/glabels-ui.xml.h:56 +msgid "Font name" +msgstr "Název fontu" + +#: data/ui/glabels-ui.xml.h:57 +msgid "Font selector" +msgstr "Výběr fontu" + +#: data/ui/glabels-ui.xml.h:58 +msgid "Font size" +msgstr "Velikost fontu" + +#: data/ui/glabels-ui.xml.h:59 +msgid "Icon and _Text" +msgstr "Ikony a text" + +#: data/ui/glabels-ui.xml.h:60 +msgid "Increase magnification" +msgstr "ZvětÅ¡it" + +#: data/ui/glabels-ui.xml.h:61 +msgid "Italic" +msgstr "Kurzíva" + +#: data/ui/glabels-ui.xml.h:63 +msgid "Left align" +msgstr "Nalevo" + +#: data/ui/glabels-ui.xml.h:65 +msgid "Line width" +msgstr "Šířka čáry" + +#: data/ui/glabels-ui.xml.h:66 +msgid "Lower object to bottom" +msgstr "Poslat objekt dozadu" + +#: data/ui/glabels-ui.xml.h:67 +msgid "M_arkup" +msgstr "Ohraničení" + +#: data/ui/glabels-ui.xml.h:68 +msgid "Main toolbar" +msgstr "Hlavní panel" + +#: data/ui/glabels-ui.xml.h:69 +msgid "Markup" +msgstr "Ohraničení" + +#: data/ui/glabels-ui.xml.h:70 +msgid "Modify document properties" +msgstr "Upravit vlastnosti dokumentu" + +#: data/ui/glabels-ui.xml.h:71 +msgid "New" +msgstr "Nový" + +#: data/ui/glabels-ui.xml.h:72 +msgid "Object property editor" +msgstr "Editor vlastností objektu" + +#: data/ui/glabels-ui.xml.h:73 +msgid "Only show icons in the main toolbar" +msgstr "Zobraz v hlavním panelu jen ikony" + +#: data/ui/glabels-ui.xml.h:75 +msgid "Open a file" +msgstr "Otevřít soubor" + +#: data/ui/glabels-ui.xml.h:76 +msgid "Open the glabels manual" +msgstr "Otevřít mauál programu" + +#: data/ui/glabels-ui.xml.h:77 +msgid "Paste" +msgstr "Vložit" + +#: data/ui/glabels-ui.xml.h:78 +msgid "Paste the clipboard" +msgstr "Vložit ze schránky" + +#: data/ui/glabels-ui.xml.h:79 +msgid "Pr_eferences..." +msgstr "_Nastavení" + +#: data/ui/glabels-ui.xml.h:80 +msgid "Preferences" +msgstr "Nastavení" + +#: data/ui/glabels-ui.xml.h:82 +msgid "Print the current file" +msgstr "Tisk tohoto souboru" + +#: data/ui/glabels-ui.xml.h:83 +msgid "Proper_ties..." +msgstr "Nas_tavení..." + +#: data/ui/glabels-ui.xml.h:84 +msgid "Properties" +msgstr "Nastavení" + +#: data/ui/glabels-ui.xml.h:85 +msgid "Property toolbar" +msgstr "Panel vlastností" + +#: data/ui/glabels-ui.xml.h:86 +msgid "Quit" +msgstr "Konec" + +#: data/ui/glabels-ui.xml.h:87 +msgid "Quit the program" +msgstr "Ukončit program" + +#: data/ui/glabels-ui.xml.h:88 +msgid "Raise object to top" +msgstr "Vynést objekt dopředu" + +#: data/ui/glabels-ui.xml.h:89 +msgid "Recent _Files" +msgstr "Otevřít nedávné" + +#: data/ui/glabels-ui.xml.h:90 +msgid "Redo" +msgstr "Znovu" + +#: data/ui/glabels-ui.xml.h:91 +msgid "Redo the undone action" +msgstr "Provést znovu vrácenou akci" + +#: data/ui/glabels-ui.xml.h:92 +msgid "Remove all selections" +msgstr "Odstranit vÅ¡echna označení" + +#: data/ui/glabels-ui.xml.h:94 +#, no-c-format +msgid "Restore scale to 100%" +msgstr "Vrátit měřítko na 100%" + +#: data/ui/glabels-ui.xml.h:95 +msgid "Right align" +msgstr "Napravo" + +#: data/ui/glabels-ui.xml.h:98 +msgid "Rotate object 90 clockwise" +msgstr "Otočit objekt o 90° po směru hodinových ručiček" + +#: data/ui/glabels-ui.xml.h:99 +msgid "Rotate object 90 counter-clockwise" +msgstr "Otočit objekt o 90° proti směru hodinových ručiček" + +#: data/ui/glabels-ui.xml.h:100 +msgid "Save" +msgstr "Uložit" + +#: data/ui/glabels-ui.xml.h:101 +msgid "Save As" +msgstr "Uložit jako" + +#: data/ui/glabels-ui.xml.h:102 +msgid "Save _As..." +msgstr "Uložit _jako..." + +#: data/ui/glabels-ui.xml.h:103 +msgid "Save the current file" +msgstr "Uložit tento soubor" + +#: data/ui/glabels-ui.xml.h:104 +msgid "Save the current file with a different name" +msgstr "Uložit tento soubor s jiným jménem" + +#: data/ui/glabels-ui.xml.h:105 +msgid "Select All" +msgstr "Vybrat vÅ¡e" + +#: data/ui/glabels-ui.xml.h:106 +msgid "Select _All" +msgstr "Vybr_at vÅ¡e" + +#: data/ui/glabels-ui.xml.h:107 +msgid "Select all objects" +msgstr "Vybrat vÅ¡echny objekty" + +#: data/ui/glabels-ui.xml.h:108 +msgid "Select, move and modify objects" +msgstr "Označení, posun a změna objektů" + +#: data/ui/glabels-ui.xml.h:110 +msgid "Set main toolbar button style according to desktop default" +msgstr "" +"Nastavit tlačítka na hlavním panelu stejně jako je základní nastavení " +"prostředí" + +#: data/ui/glabels-ui.xml.h:111 +msgid "Show _Tooltips" +msgstr "Ukazovat tipy" + +#: data/ui/glabels-ui.xml.h:112 +msgid "Show both icons and texts in the main toolbar" +msgstr "Zobrazit ikony a popisy v hlavní nástrojové liÅ¡tě" + +#: data/ui/glabels-ui.xml.h:113 +msgid "Show tooltips in the drawing toolbar" +msgstr "Ukazovat tipy v panelu kreslení" + +#: data/ui/glabels-ui.xml.h:114 +msgid "Show tooltips in the main toolbar" +msgstr "Ukazovat tipy v hlavním panelu" + +#: data/ui/glabels-ui.xml.h:115 +msgid "Show tooltips in the property toolbar" +msgstr "Ukazovat tipy v panelu vlastností" + +#: data/ui/glabels-ui.xml.h:116 +msgid "Template Designer" +msgstr "Návrhář Å¡ablon" + +#: data/ui/glabels-ui.xml.h:117 +msgid "Template _Designer..." +msgstr "Návrhář Å¡_ablon..." + +#: data/ui/glabels-ui.xml.h:118 +msgid "Text color" +msgstr "Barva textu" + +#: data/ui/glabels-ui.xml.h:119 +msgid "U_n-select All" +msgstr "Odz_načit vÅ¡e" + +#: data/ui/glabels-ui.xml.h:120 +msgid "Un-select All" +msgstr "Odznačit vÅ¡e" + +#: data/ui/glabels-ui.xml.h:121 +msgid "Undo" +msgstr "Zpět" + +#: data/ui/glabels-ui.xml.h:122 +msgid "Undo the last action" +msgstr "Vrátit o akci zpět" + +#: data/ui/glabels-ui.xml.h:123 +msgid "Zoom _1:1" +msgstr "ZvětÅ¡ení 1:1" + +#: data/ui/glabels-ui.xml.h:124 +msgid "Zoom _In" +msgstr "ZvětÅ¡it" + +#: data/ui/glabels-ui.xml.h:125 +msgid "Zoom _Out" +msgstr "ZmenÅ¡it" + +#: data/ui/glabels-ui.xml.h:126 +msgid "Zoom to _fit" +msgstr "Přizpůsobit velikosti" + +#: data/ui/glabels-ui.xml.h:127 +msgid "Zoom to fit window" +msgstr "Přizpůsobit velikosti okna" + +#: data/ui/glabels-ui.xml.h:128 +msgid "_About..." +msgstr "_O programu..." + +#: data/ui/glabels-ui.xml.h:129 +msgid "_Bottoms" +msgstr "Naspod" + +#: data/ui/glabels-ui.xml.h:132 +msgid "_Close" +msgstr "_Zavřít" + +#: data/ui/glabels-ui.xml.h:133 +msgid "_Contents" +msgstr "_Obsah" + +#: data/ui/glabels-ui.xml.h:134 +msgid "_Copy" +msgstr "_Kopírovat" + +#: data/ui/glabels-ui.xml.h:135 +msgid "_Create Object" +msgstr "_Vytvořit objekt" + +#: data/ui/glabels-ui.xml.h:136 +msgid "_Debug" +msgstr "_Debugování" + +#: data/ui/glabels-ui.xml.h:138 +msgid "_Desktop Default" +msgstr "Přednastavení prostředí" + +#: data/ui/glabels-ui.xml.h:139 +msgid "_Drawing Toolbar" +msgstr "Panel _kreslení" + +#: data/ui/glabels-ui.xml.h:140 +msgid "_Edit" +msgstr "_Upravit" + +#: data/ui/glabels-ui.xml.h:142 +msgid "_File" +msgstr "_Soubor" + +#: data/ui/glabels-ui.xml.h:143 +msgid "_Grid" +msgstr "_Mřížka" + +#: data/ui/glabels-ui.xml.h:144 +msgid "_Help" +msgstr "_Nápověda" + +#: data/ui/glabels-ui.xml.h:145 +msgid "_Icon" +msgstr "_Ikona" + +#: data/ui/glabels-ui.xml.h:149 +msgid "_Main Toolbar" +msgstr "_Hlavní panel" + +#: data/ui/glabels-ui.xml.h:150 +msgid "_Merge Properties..." +msgstr "Nastavení sloučení" + +#: data/ui/glabels-ui.xml.h:151 +msgid "_New" +msgstr "_Nový" + +#: data/ui/glabels-ui.xml.h:152 +msgid "_Objects" +msgstr "_Objekty" + +#: data/ui/glabels-ui.xml.h:153 +msgid "_Open..." +msgstr "_Otevřít" + +#: data/ui/glabels-ui.xml.h:155 +msgid "_Paste" +msgstr "Vl_ožit" + +#: data/ui/glabels-ui.xml.h:156 +msgid "_Print..." +msgstr "_Tisk..." + +#: data/ui/glabels-ui.xml.h:157 +msgid "_Property Toolbar" +msgstr "Panel _vlastností" + +#: data/ui/glabels-ui.xml.h:158 +msgid "_Quit" +msgstr "_Konec" + +#: data/ui/glabels-ui.xml.h:161 +msgid "_Save" +msgstr "_Uložit" + +#: data/ui/glabels-ui.xml.h:165 +msgid "_View" +msgstr "_Zobrazit" + +#: data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 +#: data/glade/template-designer.glade.h:5 +msgid "*" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:3 +msgid "Default page size" +msgstr "Výchozí velikost stránky" + +#: data/glade/prefs-dialog.glade.h:4 +msgid "Fill" +msgstr "Výplň" + +#: data/glade/prefs-dialog.glade.h:5 +msgid "Line" +msgstr "Čára" + +#: data/glade/prefs-dialog.glade.h:6 +msgid "Text" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:7 +msgid "Units" +msgstr "Jednotky" + +#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 +msgid "Alignment:" +msgstr "Zarovnání:" + +#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 +msgid "Color:" +msgstr "Barva:" + +#: data/glade/prefs-dialog.glade.h:10 +msgid "Font:" +msgstr "Font:" + +#: data/glade/prefs-dialog.glade.h:11 +msgid "ISO A4" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:12 +msgid "Inches" +msgstr "Palce" + +#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 +msgid "Line Spacing:" +msgstr "Řádkování:" + +#: data/glade/prefs-dialog.glade.h:14 +msgid "Locale" +msgstr "Místní zvyklosti" + +#: data/glade/prefs-dialog.glade.h:15 +msgid "Millimeters" +msgstr "Milimetry" + +#: data/glade/prefs-dialog.glade.h:16 +msgid "Object defaults" +msgstr "Výchozí hodnoty objektu" + +#: data/glade/prefs-dialog.glade.h:17 +msgid "Points" +msgstr "Body" + +#: data/glade/prefs-dialog.glade.h:18 +msgid "Select default properties for new objects." +msgstr "Vyberte výchozí nastavení pro nové objekty" + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "Zvolte specifické chování pro místní zvyklosti." + +#. Most popular (at top of list) +#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:29 +msgid "US Letter" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 +#: data/glade/template-designer.glade.h:72 +msgid "Width:" +msgstr "Šířka:" + +#: data/glade/object-editor.glade.h:2 +msgid "00000000000 00000" +msgstr "" + +#: data/glade/object-editor.glade.h:3 +msgid "Xxx object properties" +msgstr "Vlastnosti objektu xxx" + +#: data/glade/object-editor.glade.h:5 +msgid "Allow merge to automatically shrink text" +msgstr "Při sloučení povolit automatické smrÅ¡tění textu" + +#: data/glade/object-editor.glade.h:6 +msgid "Angle:" +msgstr "Úhel:" + +#: data/glade/object-editor.glade.h:7 +msgid "Checksum" +msgstr "Kontrolní součet" + +#: data/glade/object-editor.glade.h:10 +msgid "Family:" +msgstr "Rodina:" + +#: data/glade/object-editor.glade.h:12 +msgid "Fill" +msgstr "Výplň" + +#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 +msgid "Height:" +msgstr "Výška:" + +#: data/glade/object-editor.glade.h:14 +msgid "Image" +msgstr "Obrázek" + +#: data/glade/object-editor.glade.h:15 +msgid "Insert merge field" +msgstr "Vložit pole pro sloučení" + +#: data/glade/object-editor.glade.h:17 +msgid "Length:" +msgstr "Délka:" + +#: data/glade/object-editor.glade.h:18 +msgid "Line" +msgstr "Čára" + +#: data/glade/object-editor.glade.h:20 +msgid "Literal:" +msgstr "Písmena:" + +#: data/glade/object-editor.glade.h:21 +msgid "Load image" +msgstr "Načíst obrázek" + +#: data/glade/object-editor.glade.h:22 +msgid "Position" +msgstr "Pozice" + +#: data/glade/object-editor.glade.h:23 +msgid "Reset image size" +msgstr "Resetovat velikost obrázku" + +#: data/glade/object-editor.glade.h:24 +msgid "Size" +msgstr "Velikost" + +#: data/glade/object-editor.glade.h:25 +msgid "Size:" +msgstr "Velikost:" + +#: data/glade/object-editor.glade.h:26 +msgid "Style" +msgstr "Styl" + +#: data/glade/object-editor.glade.h:27 +msgid "Style:" +msgstr "Styl:" + +#: data/glade/object-editor.glade.h:30 +msgid "X:" +msgstr "X:" + +#: data/glade/object-editor.glade.h:31 +msgid "Y:" +msgstr "Y:" + +#: data/glade/object-editor.glade.h:32 +msgid "degrees" +msgstr "stupně" + +#: data/glade/object-editor.glade.h:33 +msgid "dialog1" +msgstr "" + +#: data/glade/object-editor.glade.h:34 +msgid "digits:" +msgstr "číslic:" + +#: data/glade/object-editor.glade.h:35 +msgid "format:" +msgstr "formát:" + +#: data/glade/template-designer.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/template-designer.glade.h:2 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(např. \"Adresní Å¡títky,\" \"Vizitky,\" ...)" + +#: data/glade/template-designer.glade.h:3 +msgid "(e.g., 8163A)" +msgstr "(např. 8163A)" + +#: data/glade/template-designer.glade.h:4 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(např. Avery, Acme, ...)" + +#: data/glade/template-designer.glade.h:6 +msgid "1. Outer radius:" +msgstr "1. Vnější poloměr:" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "1. Poloměr:" + +#: data/glade/template-designer.glade.h:8 +msgid "1. Width:" +msgstr "1. Šířka:" + +#: data/glade/template-designer.glade.h:9 +msgid "2. Height:" +msgstr "2. Výška:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "2. Vnitřní poloměr:" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "2. Odsazení (povolený přetisk):" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "3. Šířka výstřižku:" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "3. Okraj" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "3. Zaoblení (poloměr rohu):" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "4. Výška výstřižku:" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "4. Horizontální odsazení (povolený přetisk):" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "5. Vert. odsazení (povolený přetisk):" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "5. Odsazení (povolený přetisk):" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "6. Okraj" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "Značka/Výrobce:" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD (včetně vizitkových CD)" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"Gratulujeme!\n" +"\n" +"Dokončili jste návrh Å¡ablony gLabels.\n" +"Pokud si přejete návrh přijmout a uložit, klikněte na \"Použít\".\n" +"\n" +"Jinak klikněte na \"ZruÅ¡it\" pro zahození návrhu či na\n" +"\"Zpět\" pro další úpravy tohoto návrhu." + +#: data/glade/template-designer.glade.h:30 +msgid "Design Completed" +msgstr "Návrh byl dokončen" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "Vzdálenost od levého okraje (x0):" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "Vzdálenost od horního okraje (y0):" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "Vodorovná rozteč (dx):" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" +"Kolik rozvržení obsahuje vaÅ¡e Å¡ablona? \n" +"\n" +"Rozvržení je sada etiket nebo vizitek, které mohou být uspořádány na\n" +"jednoduché mřížce. VětÅ¡ina Å¡ablon potřebuje jedno rozvržení jako v\n" +"prvním příkladu. Druhý příklad ilustruje dvě rozvržení." + +#: data/glade/template-designer.glade.h:40 +msgid "Label Size (CD/DVD)" +msgstr "Velikost etikety (CD/DVD)" + +#: data/glade/template-designer.glade.h:41 +msgid "Label Size (Round)" +msgstr "Velikost etikety (oválná)" + +#: data/glade/template-designer.glade.h:42 +msgid "Label or Card Shape" +msgstr "Tvar etikety či vizitky" + +#: data/glade/template-designer.glade.h:43 +msgid "Label or Card Size (Rectangular)" +msgstr "Velikost etikety či vizitky (obdélníková)" + +#: data/glade/template-designer.glade.h:44 +msgid "Layout #1" +msgstr "Rozvržení #1" + +#: data/glade/template-designer.glade.h:45 +msgid "Layout #2" +msgstr "Rozvržení #2" + +#: data/glade/template-designer.glade.h:46 +msgid "Layout(s)" +msgstr "Rozvržení" + +#: data/glade/template-designer.glade.h:47 +msgid "Name and Description" +msgstr "Název a popis" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "Počet napříč (nx):" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "Počet dolů (ny):" + +#: data/glade/template-designer.glade.h:50 +msgid "Number of Layouts" +msgstr "Počet rozvržení" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "Počet rozvržení:" + +#: data/glade/template-designer.glade.h:52 +msgid "Page Size" +msgstr "Velikost stránky" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "Část #:" + +#: data/glade/template-designer.glade.h:55 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "" +"Vyplňte, prosím, následující informace o Å¡abloně." + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "Vyplňte, prosím, následující informaci o rozvržení." + +#: data/glade/template-designer.glade.h:57 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "" +"Vyplňte, prosím, následující parametry velikosti jedné etikety ve " +"vaší Å¡abloně." + +#: data/glade/template-designer.glade.h:58 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" +"Vyplňte, prosím, následující parametry velikosti jedné etikety nebo vizitky ve " +"vaší Å¡abloně." + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "Vyberte, prosím, základní tvar etiket nebo vizitek." + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "Vyberte, prosím, velikost stránky Å¡ablony." + +#: data/glade/template-designer.glade.h:61 +msgid "Print test sheet" +msgstr "Vytisknout testovací stránku" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "Obdélníkový nebo čtvercový (může mít zaoblené rohy)" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "Oválný" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"Å ablony, které potřebují\n" +"dvě rozvržení." + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"Å ablony, které potřebují\n" +"jedno rozvržení." + +#: data/glade/template-designer.glade.h:68 +msgid "Vertical pitch (dy):" +msgstr "Svislá rozteč (dy):" + +#: data/glade/template-designer.glade.h:69 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"Vítejte v Návrháři Å¡ablon programu gLabels.\n" +"\n" +"Tento dialog vám pomůže při vytváření vlastní Å¡ablony gLabels." + +#. Other ISO A series sizes +#: data/templates/paper-sizes.xml.h:2 +msgid "A0" +msgstr "" + +#: data/templates/paper-sizes.xml.h:3 +msgid "A1" +msgstr "" + +#: data/templates/paper-sizes.xml.h:4 +msgid "A10" +msgstr "" + +#: data/templates/paper-sizes.xml.h:5 +msgid "A2" +msgstr "" + +#: data/templates/paper-sizes.xml.h:6 +msgid "A3" +msgstr "" + +#: data/templates/paper-sizes.xml.h:7 +msgid "A4" +msgstr "" + +#: data/templates/paper-sizes.xml.h:8 +msgid "A5" +msgstr "" + +#: data/templates/paper-sizes.xml.h:9 +msgid "A6" +msgstr "" + +#: data/templates/paper-sizes.xml.h:10 +msgid "A7" +msgstr "" + +#: data/templates/paper-sizes.xml.h:11 +msgid "A8" +msgstr "" + +#: data/templates/paper-sizes.xml.h:12 +msgid "A9" +msgstr "" + +#. ISO B series sizes +#: data/templates/paper-sizes.xml.h:14 +msgid "B0" +msgstr "" + +#: data/templates/paper-sizes.xml.h:15 +msgid "B1" +msgstr "" + +#: data/templates/paper-sizes.xml.h:16 +msgid "B10" +msgstr "" + +#: data/templates/paper-sizes.xml.h:17 +msgid "B2" +msgstr "" + +#: data/templates/paper-sizes.xml.h:18 +msgid "B3" +msgstr "" + +#: data/templates/paper-sizes.xml.h:19 +msgid "B4" +msgstr "" + +#: data/templates/paper-sizes.xml.h:20 +msgid "B5" +msgstr "" + +#: data/templates/paper-sizes.xml.h:21 +msgid "B6" +msgstr "" + +#: data/templates/paper-sizes.xml.h:22 +msgid "B7" +msgstr "" + +#: data/templates/paper-sizes.xml.h:23 +msgid "B8" +msgstr "" + +#: data/templates/paper-sizes.xml.h:24 +msgid "B9" +msgstr "" + +#: data/templates/paper-sizes.xml.h:25 +msgid "US Executive" +msgstr "" + +#. Other US paper sizes +#: data/templates/paper-sizes.xml.h:27 +msgid "US Legal" +msgstr "" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:2 +#: data/templates/zweckform-iso-templates.xml.h:2 +msgid "Address Labels" +msgstr "Adresní etikety" + +#. =================================================================== +#. ============================================================ +#. =================================================================== +#. ====================================================== +#: data/templates/avery-us-templates.xml.h:4 +#: data/templates/avery-iso-templates.xml.h:4 +#: data/templates/zweckform-iso-templates.xml.h:6 +#: data/templates/misc-us-templates.xml.h:3 +#: data/templates/misc-iso-templates.xml.h:17 +msgid "Business Cards" +msgstr "Vizitky" + +#: data/templates/avery-us-templates.xml.h:5 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:7 +msgid "Diskette Labels" +msgstr "Disketové etikety" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:9 +msgid "Filing Labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:11 +msgid "Full Sheet Labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:13 +msgid "Large Round Labels" +msgstr "Velké oválné etikety" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:15 +msgid "Name Badge Labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:17 +msgid "Return Address Labels" +msgstr "Zpáteční adresa" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:19 +msgid "Shipping Labels" +msgstr "Dopravní etikety" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:21 +msgid "Small Round Labels" +msgstr "Malé oválné etikety" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:23 +msgid "Square Labels" +msgstr "Čtvercové etikety" + +#: data/templates/avery-us-templates.xml.h:24 +msgid "Video Tape Face Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:25 +msgid "Video Tape Spine Labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:2 +msgid "Address labels" +msgstr "Adresní etikety" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:6 +msgid "CD Booklet" +msgstr "" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:8 +msgid "CD Inlet" +msgstr "" + +#. =============================================================== +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:10 +#: data/templates/zweckform-iso-templates.xml.h:8 +#: data/templates/misc-us-templates.xml.h:5 +#: data/templates/misc-iso-templates.xml.h:21 +msgid "CD/DVD Labels" +msgstr "CD/DVD etikety" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:12 +msgid "Diskette labels" +msgstr "Disketové etikety" + +#. =============================================================== +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:14 +#: data/templates/zweckform-iso-templates.xml.h:14 +#: data/templates/misc-iso-templates.xml.h:35 +msgid "Mailing Labels" +msgstr "PoÅ¡tovní etikety" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:16 +msgid "Mailing labels" +msgstr "PoÅ¡tovní etikety" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:18 +msgid "Mini Address Labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:20 +msgid "Shipping labels" +msgstr "Dopravní etikety" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:4 +msgid "Allround Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:10 +msgid "Correction and Cover-up Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:12 +msgid "Lever Arch File Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:16 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:18 +msgid "Rectangular Copier Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:20 +#: data/templates/misc-iso-templates.xml.h:44 +msgid "Rectangular Labels" +msgstr "Obdélníkové etikety" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:22 +msgid "Video Labels (back)" +msgstr "Video etikety (zadní strana)" + +#: data/templates/misc-us-templates.xml.h:1 +msgid "Business Card CD" +msgstr "Vizitkové CD" + +#: data/templates/misc-us-templates.xml.h:4 +msgid "CD Template Rectangles" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:6 +msgid "CD/DVD Labels (Face Only)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:23 +msgid "CD/DVD Labels (face only)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:9 +msgid "Cassette Labels" +msgstr "Kazetové etikety" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:11 +msgid "DLT Labels" +msgstr "DLT etikety" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:13 +msgid "Microtube labels" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Mini-CD Labels" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:15 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:16 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:17 +#: data/templates/misc-iso-templates.xml.h:42 +msgid "PRO CD Labels 2-up (face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:18 +msgid "Slimline CD Case (rightside up)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:19 +msgid "Slimline CD Case (upside down)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:1 +msgid "Agipa 119488: Business Cards" +msgstr "Agipa 119488: Vizitky" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:3 +msgid "Allround Labels --24" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:5 +msgid "Allround Labels --44" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:7 +msgid "Allround Labels --64" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:9 +msgid "Allround Labels --65" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:11 +msgid "Arch File Labels" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Arch File Labels (large)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Arch File Labels (small)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:19 +msgid "CD Labels" +msgstr "CD etikety" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:25 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:27 +msgid "Diskette Labels (face only)" +msgstr "Disketové etikety (pouze předek)" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:29 +msgid "EPSON Photo Stickers 16" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:31 +msgid "Etiketten" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:33 +msgid "Fridge Magnet Stickers" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:37 +msgid "Mailing Labels --14" +msgstr "PoÅ¡tovní etikety --14" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:39 +msgid "Mailing Labels-2 columns" +msgstr "PoÅ¡tovní etikety-2 sloupce" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:41 +msgid "Mailing Labels-3 columns" +msgstr "PoÅ¡tovní etikety-3 sloupce" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:46 +msgid "Video Labels (face only)" +msgstr "Video etikety (pouze předek)" + +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "Vytvářejte etikety, vizitky a obaly médií" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "Návrhář etiket gLabels" + +#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "" + +#~ msgid "Only show icons in the drawing toolbar" +#~ msgstr "Zobrazv panelu kreslení jen ikony " + +#~ msgid "Set drawing toolbar button style according to desktop default" +#~ msgstr "" +#~ "Nastavit tlačítka na panelu kreslení stejně jako je základní nastavení " +#~ "prostředí" + +#, fuzzy +#~ msgid "Show both icons and texts in the drawing toolbar" +#~ msgstr "Ukazovat tipy v panelu kreslení" + +#~ msgid "Object _Properties..." +#~ msgstr "Možnosti objektu" + +#~ msgid "Display units" +#~ msgstr "Jednotky zobrazení" + +#~ msgid "Default page size" +#~ msgstr "Standartní velikost stránky" + +#~ msgid "Outline" +#~ msgstr "Obrys" + +#~ msgid "Edit line object properties" +#~ msgstr "Editace nastavení objektu řádky" + +#~ msgid "Edit text object properties" +#~ msgstr "Editace nastavení objektu text" + +#~ msgid "Edit text:" +#~ msgstr "Editace textu:" + +#~ msgid "Maintain current aspect ratio" +#~ msgstr "Udržet současný poměr stran" + +#~ msgid "Open %s" +#~ msgstr "Otevřít %s" diff --git a/po/de.po b/po/de.po new file mode 100644 index 00000000..fb56d5df --- /dev/null +++ b/po/de.po @@ -0,0 +1,2692 @@ +# German translation of glabels. +# Copyright (C) 2001-2008 Jim Evins +# Marcus Bauer , 2001. +# Christian Neumair , 2002. +# Mario Blättermann , 2008, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: glabels HEAD\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-20 18:07+0200\n" +"PO-Revision-Date: 2009-09-20 18:09+0100\n" +"Last-Translator: Mario Blättermann \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../src/glabels.c:62 ../src/glabels-batch.c:67 +msgid "[FILE...]" +msgstr "[DATEI...]" + +#: ../src/glabels.c:79 +msgid "Launch gLabels label and business card designer." +msgstr "gLabels Etiketten- und Visitenkarten-Designer ausführen." + +#: ../src/glabels.c:87 ../src/glabels-batch.c:104 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"Rufen Sie %s --help« auf, um eine vollständige Liste der verfügbaren " +"Befehlszeilenoptionen zu sehen.\n" + +#: ../src/glabels-batch.c:51 +msgid "set output filename (default=\"output.pdf\")" +msgstr "Ausgabe-Dateiname festlegen (Vorgabe: »output.pdf«)" + +#: ../src/glabels-batch.c:51 ../src/glabels-batch.c:65 +msgid "filename" +msgstr "Dateiname" + +#: ../src/glabels-batch.c:53 +msgid "number of sheets (default=1)" +msgstr "Anzahl der Blätter (Vorgabe: 1)" + +#: ../src/glabels-batch.c:53 +msgid "sheets" +msgstr "Blätter" + +#: ../src/glabels-batch.c:55 +msgid "number of copies (default=1)" +msgstr "Anzahl der Kopien (Vorgabe: 1)" + +#: ../src/glabels-batch.c:55 +msgid "copies" +msgstr "Kopien" + +#: ../src/glabels-batch.c:57 +msgid "first label on first sheet (default=1)" +msgstr "Erstes Etikett auf dem ersten Blatt (Vorgabe: 1)" + +#: ../src/glabels-batch.c:57 +msgid "first" +msgstr "Erste" + +#: ../src/glabels-batch.c:59 +#: ../data/builder/print-op-dialog-custom-widget.builder.h:13 +msgid "print outlines (to test printer alignment)" +msgstr "Begrenzungen drucken (um Druckausrichtung zu testen)" + +#: ../src/glabels-batch.c:61 +#: ../data/builder/print-op-dialog-custom-widget.builder.h:12 +msgid "print in reverse (i.e. a mirror image)" +msgstr "Spiegelbildlich drucken" + +#: ../src/glabels-batch.c:63 +#: ../data/builder/print-op-dialog-custom-widget.builder.h:11 +msgid "print crop marks" +msgstr "Schnittmarken drucken" + +#: ../src/glabels-batch.c:65 +msgid "input file for merging" +msgstr "Eingabedatei zum Mischen" + +#: ../src/glabels-batch.c:96 +msgid "Print files created with gLabels." +msgstr "Mit gLabels erstellte Dateien drucken." + +#: ../src/glabels-batch.c:146 +#, c-format +msgid "cannot perform document merge with glabels file %s\n" +msgstr "" +"Dokumentverarbeitung kann mit gLabels-Datei %s nicht ausgeführt werden\n" + +#: ../src/glabels-batch.c:180 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "glabels-Datei %s kann nicht geöffnet werden\n" + +#: ../src/window.c:256 +msgid "(none) - gLabels" +msgstr "(Unbenannt) - gLabels" + +#: ../src/window.c:435 +msgid "(modified)" +msgstr "(geändert)" + +#: ../src/stock.c:70 +msgid "_Select Mode" +msgstr "Modus au_swählen" + +#: ../src/stock.c:71 +msgid "_Text" +msgstr "_Text" + +#: ../src/stock.c:72 +msgid "_Line" +msgstr "_Linie" + +#: ../src/stock.c:73 +msgid "_Box" +msgstr "_Rechteck" + +#: ../src/stock.c:74 +msgid "_Ellipse" +msgstr "_Ellipse" + +#: ../src/stock.c:75 +msgid "_Image" +msgstr "B_ild" + +#: ../src/stock.c:76 +msgid "Bar_code" +msgstr "Strich_code" + +#: ../src/stock.c:77 +msgid "_Merge Properties" +msgstr "_Mischeinstellungen" + +#: ../src/stock.c:78 +msgid "Object _Properties" +msgstr "Objektei_genschaften" + +#: ../src/stock.c:79 +msgid "Bring to _Front" +msgstr "Ganz nach _vorn" + +#: ../src/stock.c:80 +msgid "Send to _Back" +msgstr "Ganz nach _hinten" + +#: ../src/stock.c:81 +msgid "Rotate _Left" +msgstr "_Links drehen" + +#: ../src/stock.c:82 +msgid "Rotate _Right" +msgstr "_Rechts drehen" + +#: ../src/stock.c:83 +msgid "Flip _Horizontally" +msgstr "_Horizontal spiegeln" + +#: ../src/stock.c:84 +msgid "Flip _Vertically" +msgstr "_Vertikal spiegeln" + +#: ../src/stock.c:85 +msgid "_Lefts" +msgstr "_Links" + +#: ../src/stock.c:86 +msgid "_Rights" +msgstr "_Rechts" + +#: ../src/stock.c:87 +msgid "_Centers" +msgstr "_Mitte" + +#: ../src/stock.c:88 +msgid "_Tops" +msgstr "_Oben" + +#: ../src/stock.c:89 +msgid "Bottoms" +msgstr "Unten" + +#: ../src/stock.c:90 +msgid "Centers" +msgstr "Mitte" + +#: ../src/stock.c:91 ../src/stock.c:92 +msgid "Label Ce_nter" +msgstr "Etikett ze_ntrieren" + +#: ../src/stock.c:93 ../data/builder/property-bar.builder.h:3 +msgid "Fill color" +msgstr "Füllfarbe" + +#: ../src/stock.c:94 ../data/builder/property-bar.builder.h:7 +msgid "Line color" +msgstr "Linienfarbe" + +#: ../src/stock.c:95 ../src/stock.c:97 +msgid "Linked" +msgstr "Verknüpft" + +#: ../src/stock.c:96 ../src/stock.c:98 +msgid "Not Linked" +msgstr "Nicht verknüpft" + +#. Menu entries. +#: ../src/ui.c:88 +msgid "_File" +msgstr "_Datei" + +#: ../src/ui.c:89 +msgid "Open Recent _Files" +msgstr "_Zuletzt geöffnete Dateien" + +#: ../src/ui.c:90 +msgid "_Edit" +msgstr "_Bearbeiten" + +#: ../src/ui.c:91 +msgid "_View" +msgstr "_Ansicht" + +#: ../src/ui.c:92 +msgid "Customize Main Toolbar" +msgstr "Werkzeugleiste anpassen" + +#: ../src/ui.c:93 +msgid "Customize Drawing Toolbar" +msgstr "Zeichenwerkzeugleiste anpassen" + +#: ../src/ui.c:94 +msgid "Customize Properties Toolbar" +msgstr "Eigenschaften-Werkzeugleiste anpassen" + +#: ../src/ui.c:95 +msgid "_Objects" +msgstr "_Objekte" + +#: ../src/ui.c:96 +msgid "_Create" +msgstr "_Erzeugen" + +#: ../src/ui.c:97 +msgid "_Order" +msgstr "_Anordnung" + +#: ../src/ui.c:98 +msgid "_Rotate/Flip" +msgstr "D_rehen/Spiegeln" + +#: ../src/ui.c:99 +msgid "Align _Horizontal" +msgstr "_Horizontal" + +#: ../src/ui.c:100 +msgid "Align _Vertical" +msgstr "_Vertikal" + +#: ../src/ui.c:101 +msgid "_Help" +msgstr "_Hilfe" + +#. Popup entries. +#: ../src/ui.c:104 ../src/ui.c:105 +msgid "Context Menu" +msgstr "Kontextmenü" + +#: ../src/ui.c:110 +msgid "_New" +msgstr "_Neu" + +#: ../src/ui.c:112 +msgid "Create a new file" +msgstr "Eine neue Datei erstellen" + +#: ../src/ui.c:117 +msgid "_Open..." +msgstr "Ö_ffnen …" + +#: ../src/ui.c:119 +msgid "Open a file" +msgstr "Eine Datei öffnen" + +#: ../src/ui.c:124 +msgid "_Save" +msgstr "_Speichern" + +#: ../src/ui.c:126 +msgid "Save current file" +msgstr "Die aktuelle Datei speichern" + +#: ../src/ui.c:131 +msgid "Save _As..." +msgstr "Speichern _unter …" + +#: ../src/ui.c:133 +msgid "Save the current file to a different name" +msgstr "Die aktuelle Datei unter einem anderen Dateinamen speichern" + +#: ../src/ui.c:138 +msgid "_Print..." +msgstr "_Drucken …" + +#: ../src/ui.c:140 +msgid "Print the current file" +msgstr "Die aktuelle Datei drucken" + +#: ../src/ui.c:145 +msgid "Properties..." +msgstr "Einstellungen …" + +#: ../src/ui.c:147 +msgid "Modify document properties" +msgstr "Dokumenteigenschaften ändern" + +#: ../src/ui.c:152 +msgid "Template _Designer..." +msgstr "Vorlagen-_Designer …" + +#: ../src/ui.c:154 +msgid "Create a custom template" +msgstr "Eine neue benutzerdefinierte Vorlage erstellen" + +#: ../src/ui.c:159 +msgid "_Close" +msgstr "S_chließen" + +#: ../src/ui.c:161 +msgid "Close the current file" +msgstr "Die aktuelle Datei schließen" + +#: ../src/ui.c:166 +msgid "_Quit" +msgstr "_Beenden" + +#: ../src/ui.c:168 +msgid "Quit the program" +msgstr "Das Programm beenden" + +#: ../src/ui.c:175 +msgid "Cut" +msgstr "Ausschneiden" + +#: ../src/ui.c:177 +msgid "Cut the selection" +msgstr "Die Markierung ausschneiden" + +#: ../src/ui.c:182 +msgid "Copy" +msgstr "Kopieren" + +#: ../src/ui.c:184 +msgid "Copy the selection" +msgstr "Die Markierung kopieren" + +#: ../src/ui.c:189 +msgid "Paste" +msgstr "Einfügen" + +#: ../src/ui.c:191 +msgid "Paste the clipboard" +msgstr "Inhalt der Zwischenablage einfügen" + +#: ../src/ui.c:196 +msgid "Delete" +msgstr "Löschen" + +#: ../src/ui.c:198 +msgid "Delete the selected objects" +msgstr "Die markierten Objekte löschen" + +#: ../src/ui.c:203 +msgid "Select All" +msgstr "Alles markieren" + +#: ../src/ui.c:205 +msgid "Select all objects" +msgstr "Alle Objekte markieren" + +#: ../src/ui.c:210 +msgid "Un-select All" +msgstr "Alle Markierungen löschen" + +#: ../src/ui.c:212 +msgid "Remove all selections" +msgstr "Alle Auswahlen aufheben" + +#: ../src/ui.c:217 +msgid "Preferences" +msgstr "Einstellungen" + +#: ../src/ui.c:219 +msgid "Configure the application" +msgstr "Die Anwendung konfigurieren" + +#: ../src/ui.c:226 +msgid "Zoom in" +msgstr "Vergrößern" + +#: ../src/ui.c:228 +msgid "Increase magnification" +msgstr "Vergrößern" + +#: ../src/ui.c:233 +msgid "Zoom out" +msgstr "Verkleinern" + +#: ../src/ui.c:235 +msgid "Decrease magnification" +msgstr "Verkleinern" + +#: ../src/ui.c:240 +msgid "Zoom 1 to 1" +msgstr "Vergrößerung 1:1" + +#: ../src/ui.c:242 +msgid "Restore scale to 100%" +msgstr "Maßstab auf 100% wiederherstellen" + +#: ../src/ui.c:247 +msgid "Zoom to fit" +msgstr "Einpassen" + +#: ../src/ui.c:249 +msgid "Set scale to fit window" +msgstr "In Fenster einpassen" + +#: ../src/ui.c:256 +msgid "Select Mode" +msgstr "Modus auswählen" + +#: ../src/ui.c:258 +msgid "Select, move and modify objects" +msgstr "Objekte auswählen, bewegen, ändern" + +#: ../src/ui.c:263 ../src/view-text.c:501 +#: ../data/builder/object-editor.builder.h:31 +msgid "Text" +msgstr "Text" + +#: ../src/ui.c:265 +msgid "Create text object" +msgstr "Textobjekt erzeugen" + +#: ../src/ui.c:270 +msgid "Box" +msgstr "Rechteck" + +#: ../src/ui.c:272 +msgid "Create box/rectangle object" +msgstr "Rechteck-Objekt erzeugen" + +#: ../src/ui.c:277 ../data/builder/object-editor.builder.h:20 +msgid "Line" +msgstr "Linie" + +#: ../src/ui.c:279 +msgid "Create line object" +msgstr "Linienobjekt erzeugen" + +#: ../src/ui.c:284 +msgid "Ellipse" +msgstr "Ellipse" + +#: ../src/ui.c:286 +msgid "Create ellipse/circle object" +msgstr "Ellipsen- oder Kreisobjekt erzeugen" + +#: ../src/ui.c:291 ../data/builder/object-editor.builder.h:16 +msgid "Image" +msgstr "Bild" + +#: ../src/ui.c:293 +msgid "Create image object" +msgstr "Bildobjekt erzeugen" + +#: ../src/ui.c:298 +msgid "Barcode" +msgstr "Strichcode" + +#: ../src/ui.c:300 +msgid "Create barcode object" +msgstr "Strichcodeobjekt erzeugen" + +#: ../src/ui.c:305 +msgid "Bring to front" +msgstr "Ganz nach vorn" + +#: ../src/ui.c:307 +msgid "Raise object to top" +msgstr "Objekt im Ebenenstapel nach oben verschieben" + +#: ../src/ui.c:312 +msgid "Send to back" +msgstr "Ganz nach hinten" + +#: ../src/ui.c:314 +msgid "Lower object to bottom" +msgstr "Objekt im Ebenenstapel nach unten verschieben" + +#: ../src/ui.c:319 +msgid "Rotate left" +msgstr "Links drehen" + +#: ../src/ui.c:321 +msgid "Rotate object 90 degrees counter-clockwise" +msgstr "Objekt um 90 Grad gegen den Uhrzeigersinn drehen" + +#: ../src/ui.c:326 +msgid "Rotate right" +msgstr "Rechts drehen" + +#: ../src/ui.c:328 +msgid "Rotate object 90 degrees clockwise" +msgstr "Objekt um 90 Grad im Uhrzeigersinn drehen" + +#: ../src/ui.c:333 +msgid "Flip horizontally" +msgstr "Horizontal spiegeln" + +#: ../src/ui.c:335 +msgid "Flip object horizontally" +msgstr "Objekt horizontal spiegeln" + +#: ../src/ui.c:340 +msgid "Flip vertically" +msgstr "Vertikal spiegeln" + +#: ../src/ui.c:342 +msgid "Flip object vertically" +msgstr "Objekt vertikal spiegeln" + +#: ../src/ui.c:347 +msgid "Align left" +msgstr "Linksbündig" + +#: ../src/ui.c:349 +msgid "Align objects to left edges" +msgstr "Objekte am linken Rand anordnen" + +#: ../src/ui.c:354 +msgid "Align right" +msgstr "Rechtsbündig" + +#: ../src/ui.c:356 +msgid "Align objects to right edges" +msgstr "Objekte am rechten Rand anordnen" + +#: ../src/ui.c:361 +msgid "Align horizontal center" +msgstr "Horizontal mittig anordnen" + +#: ../src/ui.c:363 +msgid "Align objects to horizontal centers" +msgstr "Objekte an der horizontalen Mitte anordnen" + +#: ../src/ui.c:368 +msgid "Align tops" +msgstr "Oben bündig" + +#: ../src/ui.c:370 +msgid "Align objects to top edges" +msgstr "Objekte am oberen Rand anordnen" + +#: ../src/ui.c:375 +msgid "Align bottoms" +msgstr "Unten bündig" + +#: ../src/ui.c:377 +msgid "Align objects to bottom edges" +msgstr "Objekte am unteren Rand anordnen" + +#: ../src/ui.c:382 +msgid "Align vertical center" +msgstr "Vertikal mittig anordnen" + +#: ../src/ui.c:384 +msgid "Align objects to vertical centers" +msgstr "Objekte an der vertikalen Mitte anordnen" + +#: ../src/ui.c:389 +msgid "Center horizontally" +msgstr "Horizontal zentrieren" + +#: ../src/ui.c:391 +msgid "Center objects to horizontal label center" +msgstr "Objekte zur horizontalen Mitte des Etiketts zentrieren" + +#: ../src/ui.c:396 +msgid "Center vertically" +msgstr "Vertikal zentrieren" + +#: ../src/ui.c:398 +msgid "Center objects to vertical label center" +msgstr "Objekte zur vertikalen Mitte des Etiketts zentrieren" + +#: ../src/ui.c:403 +msgid "Merge properties" +msgstr "Mischeinstellungen" + +#: ../src/ui.c:405 +msgid "Edit merge properties" +msgstr "Mischeinstellungen bearbeiten" + +#: ../src/ui.c:412 +msgid "Contents" +msgstr "Inhalte" + +#: ../src/ui.c:414 +msgid "Open glabels manual" +msgstr "Das gLabels-Handbuch öffnen" + +#: ../src/ui.c:419 +msgid "About..." +msgstr "Info …" + +#: ../src/ui.c:421 +msgid "About glabels" +msgstr "Info zu gLabels" + +# CHECK +#: ../src/ui.c:431 +msgid "Property toolbar" +msgstr "Eigenschaften-Werkzeugleiste" + +#: ../src/ui.c:433 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "" +"Die Sichtbarkeit der Werkzeugleiste im aktuellen Fenster ein- oder ausschalten" + +#: ../src/ui.c:439 +msgid "Grid" +msgstr "Raster" + +#: ../src/ui.c:441 +msgid "Change the visibility of the grid in the current window" +msgstr "Die Sichtbarkeit des Rasters im aktuellen Fenster ein- oder ausschalten" + +#: ../src/ui.c:447 +msgid "Markup" +msgstr "Markierungen" + +#: ../src/ui.c:449 +msgid "Change the visibility of markup lines in the current window" +msgstr "Die Sichtbarkeit von Markierungslinien im aktuellen Fenster ändern" + +#: ../src/ui.c:460 +msgid "Main toolbar" +msgstr "Haupt-Werkzeugleiste" + +#: ../src/ui.c:462 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "" +"Die Sichtbarkeit der Haupt-Werkzeugleiste im aktuellen Fenster einschalten/" +"ausschalten" + +#: ../src/ui.c:468 +msgid "Drawing toolbar" +msgstr "Zeichenwerkzeugleiste" + +#: ../src/ui.c:470 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "" +"Die Sichtbarkeit der Zeichenwerkzeugleiste im aktuellen Fenster einschalten/" +"ausschalten" + +#: ../src/ui-property-bar.c:278 ../src/prefs-dialog.c:337 +#: ../src/object-editor-bc-page.c:90 ../src/object-editor-text-page.c:96 +#: ../src/object-editor-shadow-page.c:90 +msgid "Default" +msgstr "Standard" + +#: ../src/ui-property-bar.c:290 ../src/prefs-dialog.c:343 +#: ../src/object-editor-fill-page.c:78 +msgid "No Fill" +msgstr "Keine Füllung" + +#: ../src/ui-property-bar.c:302 ../src/prefs-dialog.c:340 +#: ../src/object-editor-line-page.c:78 +msgid "No Line" +msgstr "Keine Linie" + +#: ../src/ui-sidebar.c:154 +msgid "Object properties" +msgstr "Objekteigenschaften" + +#: ../src/ui-commands.c:1100 +msgid "Glabels includes contributions from:" +msgstr "Glabels entstand unter Mitwirkung von:" + +#: ../src/ui-commands.c:1106 +msgid "See the file AUTHORS for additional credits," +msgstr "Lesen die Datei AUTHORS für zusätzliche Danksagungen," + +#: ../src/ui-commands.c:1107 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "oder besuchen Sie http://glabels.sourceforge.net/" + +#: ../src/ui-commands.c:1119 +msgid "A label and business card creation program.\n" +msgstr "Eine Anwendung zum Erstellen von Etiketten und Visitenkarten.\n" + +#: ../src/ui-commands.c:1123 +msgid "translator-credits" +msgstr "" +"Marcus Bauer \n" +"Christian Neumair \n" +"Mario Blättermann " + +#: ../src/ui-commands.c:1126 +msgid "" +"gLabels is free software: you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation, either version 3 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"gLabels is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +msgstr "" +"Glabels ist freie Software; Sie können sie weiterverteilen und/oder ändern\n" +"unter den Bedingungen der GNU General Public License, veröffentlicht von\n" +"der Free Software Foundation, entweder Version 3 der Lizenz oder (optional)\n" +"jeder späteren Version.\n" +" \n" +"Dieses Programm wird verteilt in der Hoffnung, dass es nützlich ist, aber\n" +"OHNE JEDE GARANTIE; Weitere Details in der GNU General Public License.\n" + +#: ../src/ui-commands.c:1153 +msgid "glabels" +msgstr "glabels" + +#: ../src/file.c:86 +msgid "New Label or Card" +msgstr "Neues Etikett oder neue Karte" + +#: ../src/file.c:188 +msgid "Label properties" +msgstr "Etiketten-Eigenschaften" + +#: ../src/file.c:291 ../src/file.c:581 +msgid "All files" +msgstr "Alle Dateien" + +#: ../src/file.c:296 ../src/file.c:586 +msgid "gLabels documents" +msgstr "gLabels-Dokumente" + +#: ../src/file.c:343 ../src/file.c:644 +msgid "Empty file name selection" +msgstr "Auswahl des Dateinamens ist leer" + +#: ../src/file.c:346 ../src/file.c:362 +msgid "Please select a file or supply a valid file name" +msgstr "Bitte wählen Sie eine Datei oder geben Sie einen gültigen Dateinamen an" + +#: ../src/file.c:359 +msgid "File does not exist" +msgstr "Datei existiert nicht" + +#: ../src/file.c:434 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "Datei »%s« konnte nicht geöffnet werden" + +#: ../src/file.c:437 +msgid "Not a supported file format" +msgstr "Kein unterstütztes Dateiformat" + +#: ../src/file.c:515 ../src/file.c:694 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "Datei »%s« konnte nicht gespeichert werden" + +#: ../src/file.c:519 ../src/file.c:698 +msgid "Error encountered during save. The file is still not saved." +msgstr "Fehler während des Speicherns. Datei wurde noch nicht gespeichert." + +#: ../src/file.c:559 +#, c-format +msgid "Save \"%s\" as" +msgstr "»%s« speichern unter" + +#: ../src/file.c:647 +msgid "Please supply a valid file name" +msgstr "Bitte geben Sie einen gültigen Dateinamen an" + +#: ../src/file.c:668 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "Datei »%s« überschreiben?" + +#: ../src/file.c:672 +msgid "File already exists." +msgstr "Datei existiert bereits." + +#: ../src/file.c:768 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "Änderungen am Dokument »%s« vor dem Schließen speichern?" + +#: ../src/file.c:772 +msgid "Your changes will be lost if you don't save them." +msgstr "Nicht gespeicherte Änderungen gehen verloren, wenn Sie nicht speichern." + +#: ../src/file.c:775 +msgid "Close without saving" +msgstr "Schließen, ohne zu speichern" + +#. Should not happen +#: ../src/prefs.c:156 ../src/prefs.c:163 +#: ../data/builder/object-editor.builder.h:42 +#: ../data/builder/prefs-dialog.builder.h:22 +msgid "points" +msgstr "Punkte" + +#: ../src/prefs.c:158 ../data/builder/object-editor.builder.h:41 +#: ../data/builder/template-designer.builder.h:64 +msgid "inches" +msgstr "Zoll" + +#: ../src/prefs.c:160 +msgid "mm" +msgstr "mm" + +#: ../src/prefs-dialog.c:172 ../data/builder/prefs-dialog.builder.h:21 +msgid "gLabels Preferences" +msgstr "gLabels-Einstellungen" + +#. Build editor. +#: ../src/view-box.c:176 +msgid "Box object properties" +msgstr "Eigenschaften des Rechteck-Objekts" + +#. Build editor. +#: ../src/view-ellipse.c:178 +msgid "Ellipse object properties" +msgstr "Eigenschaften des Ellipsen-Objekts" + +#. Build editor. +#: ../src/view-line.c:176 +msgid "Line object properties" +msgstr "Eigenschaften des Linien-Objekts" + +#. Build editor. +#: ../src/view-image.c:176 +msgid "Image object properties" +msgstr "Eigenschaften des Bild-Objekts" + +#. Build editor. +#: ../src/view-text.c:180 +msgid "Text object properties" +msgstr "Eigenschaften des Text-Objekts" + +#. Build editor. +#: ../src/view-barcode.c:176 +msgid "Barcode object properties" +msgstr "Eigenschaften des Strichcode-Objekts" + +#: ../src/object-editor-image-page.c:269 +msgid "All Files" +msgstr "Alle Dateien" + +#: ../src/object-editor-image-page.c:274 +msgid "All Images" +msgstr "Alle Bilder" + +#: ../src/object-editor-image-page.c:289 +#, c-format +msgid "%s (*.%s)" +msgstr "%s (*.%s)" + +#: ../src/merge-properties-dialog.c:269 +msgid "Merge Properties" +msgstr "Mischeinstellungen" + +#: ../src/merge-properties-dialog.c:295 ../src/merge-properties-dialog.c:404 +msgid "Select merge-database source" +msgstr "Wählen Sie die einzumischende Datenquelle" + +#: ../src/merge-properties-dialog.c:304 ../src/merge-properties-dialog.c:424 +msgid "N/A" +msgstr "Nicht verfügbar" + +#: ../src/merge-properties-dialog.c:330 +msgid "Select" +msgstr "Markieren" + +#: ../src/merge-properties-dialog.c:338 +msgid "Record/Field" +msgstr "Feld" + +#: ../src/merge-properties-dialog.c:346 +#: ../data/builder/object-editor.builder.h:10 +msgid "Data" +msgstr "Wert" + +#: ../src/merge-properties-dialog.c:417 +msgid "Fixed" +msgstr "Fixiert" + +#. =================================================================== +#: ../src/print-op.c:203 +#: ../data/builder/print-op-dialog-custom-widget.builder.h:6 +#: ../templates/misc-iso-templates.xml.h:34 +msgid "Labels" +msgstr "Labels" + +#: ../src/template-designer.c:400 +msgid "gLabels Template Designer" +msgstr "gLabels Vorlagen-Designer" + +#: ../src/template-designer.c:455 +msgid "Welcome" +msgstr "Willkommen" + +#: ../src/template-designer.c:494 +msgid "Name and Description" +msgstr "Name und Beschreibung" + +#: ../src/template-designer.c:542 +msgid "Page Size" +msgstr "Seitenformat" + +#: ../src/template-designer.c:608 +msgid "Label or Card Shape" +msgstr "Form des neuen Etiketts oder der neuen Karte" + +#: ../src/template-designer.c:654 +msgid "Label or Card Size" +msgstr "Größe des neuen Etiketts oder der neuen Karte" + +#: ../src/template-designer.c:750 +msgid "Label Size (round)" +msgstr "Etikettengröße (rund)" + +#: ../src/template-designer.c:828 +msgid "Label Size (CD/DVD)" +msgstr "Etikettengröße (CD/DVD)" + +#: ../src/template-designer.c:916 +msgid "Number of Layouts" +msgstr "Anzahl der Layouts" + +#: ../src/template-designer.c:980 +msgid "Layout(s)" +msgstr "Layout(s)" + +#: ../src/template-designer.c:1085 +msgid "Design Completed" +msgstr "Design ist komplett" + +#: ../src/template-designer.c:1258 +msgid "" +"Brand and part# match an existing " +"template!" +msgstr "" +"Für diese Marke und Nummer wurde eine " +"Vorlage gefunden!" + +#: ../src/bc.c:65 +msgid "POSTNET (any)" +msgstr "POSTNET (allgemein)" + +#: ../src/bc.c:68 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (nur ZIP)" + +#: ../src/bc.c:71 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (ZIP+4)" + +#: ../src/bc.c:74 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: ../src/bc.c:77 +msgid "CEPNET" +msgstr "CEPNET" + +#: ../src/bc.c:80 +msgid "EAN (any)" +msgstr "EAN (any)" + +#: ../src/bc.c:83 +msgid "EAN-8" +msgstr "EAN-8" + +#: ../src/bc.c:86 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: ../src/bc.c:89 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: ../src/bc.c:92 +msgid "EAN-13" +msgstr "EAN-13" + +#: ../src/bc.c:95 +msgid "EAN-13 +2" +msgstr "EAN-13 +2" + +#: ../src/bc.c:98 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: ../src/bc.c:101 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A oder UPC-E)" + +#: ../src/bc.c:104 +msgid "UPC-A" +msgstr "UPC-A" + +#: ../src/bc.c:107 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: ../src/bc.c:110 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: ../src/bc.c:113 +msgid "UPC-E" +msgstr "UPC-E" + +#: ../src/bc.c:116 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: ../src/bc.c:119 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: ../src/bc.c:122 +msgid "ISBN" +msgstr "ISBN" + +#: ../src/bc.c:125 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: ../src/bc.c:128 +msgid "Code 39" +msgstr "Code 39" + +#: ../src/bc.c:131 +msgid "Code 128" +msgstr "Code 128" + +#: ../src/bc.c:134 +msgid "Code 128C" +msgstr "Code 128C" + +#: ../src/bc.c:137 +msgid "Code 128B" +msgstr "Code 128B" + +#: ../src/bc.c:140 +msgid "Interleaved 2 of 5" +msgstr "Interleaved 2 of 5" + +#: ../src/bc.c:143 +msgid "Codabar" +msgstr "Codabar" + +#: ../src/bc.c:146 +msgid "MSI" +msgstr "MSI" + +#: ../src/bc.c:149 +msgid "Plessey" +msgstr "Plessey" + +#: ../src/bc.c:152 +msgid "IEC16022 (DataMatrix)" +msgstr "IEC16022 (DataMatrix)" + +#: ../src/bc.c:155 +msgid "IEC18004 (QRCode)" +msgstr "IEC18004 (QRCode)" + +#: ../src/label.c:547 +msgid "Untitled" +msgstr "Unbenannt" + +#: ../src/label-barcode.c:435 +msgid "Barcode data empty" +msgstr "Strichcode-Daten sind leer" + +#: ../src/label-barcode.c:439 +msgid "Invalid barcode data" +msgstr "Ungültige Strichcode-Daten" + +#: ../src/xml-label.c:187 ../src/xml-label.c:225 +msgid "xmlParseFile error" +msgstr "Fehler: xmlParseFile error" + +#: ../src/xml-label.c:262 +msgid "No document root" +msgstr "Kein document root" + +#: ../src/xml-label.c:270 +msgid "Importing from glabels 0.1 format" +msgstr "Aus dem glabels 0.1-Format wird importiert" + +#: ../src/xml-label.c:279 +msgid "Importing from glabels 0.4 format" +msgstr "Aus dem glabels 0.4-Format wird importiert" + +#: ../src/xml-label.c:288 +#, c-format +msgid "Unknown glabels Namespace -- Using %s" +msgstr "Unbekannter glabels-Namensraum -- %s wird verwendet" + +#: ../src/xml-label.c:320 ../src/xml-label-04.c:75 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "Fehlerhafter root node = »%s«" + +#: ../src/xml-label.c:357 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "Ungültiger Node im Dokument-Node = »%s«" + +#: ../src/xml-label.c:403 ../src/xml-label-04.c:123 +#, c-format +msgid "bad node = \"%s\"" +msgstr "fehlerhafter node = »%s«" + +#: ../src/xml-label.c:850 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "Ungültiger Node im Daten-Node = »%s«" + +#: ../src/xml-label.c:1092 ../libglabels/xml-template.c:664 +msgid "Utf8 conversion error." +msgstr "Fehler in der UTF8-Umwandlung." + +#: ../src/xml-label.c:1099 +msgid "Problem saving xml file." +msgstr "Problem beim Speichern der xml-Datei." + +#: ../src/merge.c:169 ../src/merge.c:210 ../src/merge.c:374 ../src/merge.c:377 +msgid "None" +msgstr "Keine" + +#: ../src/merge-init.c:57 +msgid "Text file with comma delimeters (CSV)" +msgstr "Textdatei mit Kommata als Trennern (CSV)" + +#: ../src/merge-init.c:64 +msgid "Text file with colon delimeters" +msgstr "Textdatei mit Semikola als Trennern" + +#: ../src/merge-init.c:71 +msgid "Text file with tab delimeters" +msgstr "Textdatei mit Tabulatoren als Trennern" + +#: ../src/merge-init.c:80 +msgid "Data from default Evolution Addressbook" +msgstr "Daten aus dem vorgegebenen Evolution-Adressbuch" + +#: ../src/merge-init.c:86 +msgid "Data from a file containing VCards" +msgstr "Daten aus einer Datei, die VCards enthält" + +#: ../src/merge-evolution.c:316 +msgid "Couldn't construct query" +msgstr "Abfrage konnte nicht erstellt werden" + +#: ../src/merge-evolution.c:322 ../src/merge-evolution.c:333 +msgid "Couldn't open addressbook." +msgstr "Adressbuch konnte nicht geöffnet werden" + +#: ../src/merge-evolution.c:348 +msgid "Couldn't list available fields." +msgstr "Verfügbare Felder konnten nicht aufgelistet werden." + +#: ../src/merge-evolution.c:384 +msgid "Couldn't get contacts." +msgstr "Kontakte konnten nicht geholt werden." + +#: ../src/color-combo.c:178 ../src/color-combo-button.c:198 +msgid "Default Color" +msgstr "Standardfarbe" + +#: ../src/color-combo-menu.c:83 +msgid "Dark Red" +msgstr "Dunkelrot" + +#: ../src/color-combo-menu.c:84 +msgid "Brown" +msgstr "Braun" + +#: ../src/color-combo-menu.c:85 +msgid "Dark Goldenrod" +msgstr "Dunkle Goldrute" + +#: ../src/color-combo-menu.c:86 +msgid "Dark Green" +msgstr "Dunkles Grün" + +#: ../src/color-combo-menu.c:87 +msgid "Dark Cyan" +msgstr "Dunkles Cyan-Blau" + +#: ../src/color-combo-menu.c:88 +msgid "Navy Blue" +msgstr "Marineblau" + +#: ../src/color-combo-menu.c:89 +msgid "Dark Violet" +msgstr "Dunkles Violett" + +#: ../src/color-combo-menu.c:91 +msgid "Red" +msgstr "Rot" + +#: ../src/color-combo-menu.c:92 +msgid "Orange" +msgstr "Orange" + +#: ../src/color-combo-menu.c:93 +msgid "Dark Yellow" +msgstr "Dunkles Gelb" + +#: ../src/color-combo-menu.c:94 +msgid "Medium green" +msgstr "Mittelgrün" + +#: ../src/color-combo-menu.c:95 +msgid "Turquoise" +msgstr "Türkis" + +#: ../src/color-combo-menu.c:96 +msgid "Blue" +msgstr "Blau" + +#: ../src/color-combo-menu.c:97 +msgid "Purple" +msgstr "Purpur" + +#: ../src/color-combo-menu.c:99 +msgid "Salmon" +msgstr "Lachs" + +#: ../src/color-combo-menu.c:100 +msgid "Gold" +msgstr "Gold" + +#: ../src/color-combo-menu.c:101 +msgid "Yellow" +msgstr "Gelb" + +#: ../src/color-combo-menu.c:102 +msgid "Green" +msgstr "Grün" + +#: ../src/color-combo-menu.c:103 +msgid "Cyan" +msgstr "Cyan-Blau" + +#: ../src/color-combo-menu.c:104 +msgid "SkyBlue" +msgstr "Himmelblau" + +#: ../src/color-combo-menu.c:105 +msgid "Violet" +msgstr "Violett" + +#: ../src/color-combo-menu.c:107 +msgid "Pink" +msgstr "Pink" + +#: ../src/color-combo-menu.c:108 +msgid "Khaki" +msgstr "Khaki" + +#: ../src/color-combo-menu.c:109 +msgid "Light Yellow" +msgstr "Helles Gelb" + +#: ../src/color-combo-menu.c:110 +msgid "Light Green" +msgstr "Helles Grün" + +#: ../src/color-combo-menu.c:111 +msgid "Light Cyan" +msgstr "Helles Cyan-Blau" + +#: ../src/color-combo-menu.c:112 +msgid "Slate Gray" +msgstr "Schiefergrau" + +#: ../src/color-combo-menu.c:113 +msgid "Thistle" +msgstr "Distel" + +#: ../src/color-combo-menu.c:115 +msgid "White" +msgstr "Weiß" + +#: ../src/color-combo-menu.c:116 +#, c-format +msgid "10% Gray" +msgstr "10% Grau" + +#: ../src/color-combo-menu.c:117 +#, c-format +msgid "25% Gray" +msgstr "25% Grau" + +#: ../src/color-combo-menu.c:118 +#, c-format +msgid "40% Gray" +msgstr "40% Grau" + +#: ../src/color-combo-menu.c:119 +#, c-format +msgid "50% Gray" +msgstr "50% Grau" + +#: ../src/color-combo-menu.c:120 +#, c-format +msgid "60% Gray" +msgstr "60% Grau" + +#: ../src/color-combo-menu.c:121 +msgid "Black" +msgstr "Schwarz" + +#: ../src/color-combo-menu.c:249 ../src/color-combo-menu.c:368 +msgid "Custom Color" +msgstr "Benutzerdefinierte Farbe" + +#: ../src/color-combo-menu.c:314 +#, c-format +msgid "Custom Color #%u" +msgstr "Benutzerdefinierte Farbe #%u" + +#: ../src/font-combo-menu.c:127 +msgid "Proportional fonts" +msgstr "Proportionale Schriften" + +#: ../src/font-combo-menu.c:142 +msgid "Fixed-width fonts" +msgstr "Dicktengleiche Schriften" + +#: ../src/font-combo-menu.c:157 +msgid "All fonts" +msgstr "Alle Schriften" + +#: ../src/wdgt-media-select.c:288 ../src/wdgt-media-select.c:292 +#: ../src/wdgt-media-select.c:297 ../src/wdgt-media-select.c:306 +#: ../src/wdgt-media-select.c:309 ../src/wdgt-media-select.c:403 +#: ../src/wdgt-media-select.c:616 ../src/wdgt-media-select.c:625 +msgid "Any" +msgstr "Beliebig" + +#: ../src/wdgt-media-select.c:651 +#, c-format +msgid "%d per sheet" +msgstr "%d pro Seite" + +#: ../src/wdgt-media-select.c:682 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: ../src/wdgt-media-select.c:687 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: ../src/wdgt-media-select.c:698 ../src/wdgt-media-select.c:712 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s Durchmesser" + +#: ../src/wdgt-media-select.c:702 ../src/wdgt-media-select.c:716 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s Durchmesser" + +#: ../src/wdgt-media-select.c:791 +msgid "No recent templates found." +msgstr "Keine zuletzt benutzten Vorlagen gefunden." + +#: ../src/wdgt-media-select.c:792 +msgid "Try selecting a template from the \"Search all templates\" page." +msgstr "" +"Bitte versuchen Sie, eine Vorlage in »Alle Vorlagen durchsuchen« auszuwählen." + +#: ../src/wdgt-media-select.c:872 +msgid "No match." +msgstr "Keine Treffer." + +#: ../src/wdgt-media-select.c:873 +msgid "Try selecting a different brand, page size or category." +msgstr "" +"Versuchen Sie eine andere Marke, Seitengröße oder Kategorie auszuwählen." + +#: ../src/critical-error-handler.c:70 +msgid "gLabels Fatal Error!" +msgstr "Schwerwiegender Fehler in gLabels!" + +#: ../src/warning-handler.c:69 +msgid "gLabels Error!" +msgstr "gLabels-Fehler!" + +#. Create and append an "Other" entry. +#: ../libglabels/db.c:109 +msgid "Other" +msgstr "Andere" + +#. Create and append a "User defined" entry. +#: ../libglabels/db.c:122 +msgid "User defined" +msgstr "Benutzerdefiniert" + +#: ../libglabels/db.c:473 +msgid "" +"Unable to locate paper size definitions. Libglabels may not be installed " +"correctly!" +msgstr "" +"Die Definitionen der Papiergrößen konnten nicht gefunden werden. Libglabels " +"ist möglicherweise nicht korrekt installiert!" + +#: ../libglabels/db.c:866 +msgid "" +"Unable to locate category definitions. Libglabels may not be installed " +"correctly!" +msgstr "" +"Es war nicht möglich, Kategorie-Definitionen zu finden. Libglabels könnte " +"möglicherweise nicht korrekt installiert sein!" + +#: ../libglabels/db.c:1450 +msgid "" +"Unable to locate any template files. Libglabels may not be installed " +"correctly!" +msgstr "" +"Es konnten keine Vorlagendateien gefunden werden. Möglicherweise ist " +"libglabels nicht korrekt installiert!" + +#: ../libglabels/db.c:1527 +#, c-format +msgid "Generic %s full page template" +msgstr "Allgemeine Ganzseitenvorlage %s" + +#: ../libglabels/xml-template.c:221 +msgid "Missing name or brand/part attributes." +msgstr "Name oder Attribute für Marke/Nummer fehlen." + +#. This should always be an id, but just in case a name +#. slips by! +#: ../libglabels/xml-template.c:238 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "Unbekannte Kennung der Seitengröße »%s«, wird als Name versucht" + +#: ../libglabels/xml-template.c:250 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "Unbekannte Kennung der Seitengröße oder Name »%s«" + +#: ../libglabels/xml-template.c:609 +msgid "" +"Missing required \"brand\" or \"part\" attribute, trying deprecated name." +msgstr "" +"Benötigte Attribute »brand« oder »part« fehlt, missbilligter Name wird " +"versucht. " + +#: ../libglabels/xml-template.c:619 +msgid "Name attribute also missing." +msgstr "Name des Attributs fehlt ebenfalls." + +#. +#. * Local Variables: -- emacs +#. * mode: C -- emacs +#. * c-basic-offset: 8 -- emacs +#. * tab-width: 8 -- emacs +#. * indent-tabs-mode: nil -- emacs +#. * End: -- emacs +#. +#: ../data/builder/merge-properties-dialog.builder.h:1 +msgid "Record selection/preview" +msgstr "Feldauswahl/Vorschau" + +#: ../data/builder/merge-properties-dialog.builder.h:2 +msgid "Source" +msgstr "Quelle" + +#: ../data/builder/merge-properties-dialog.builder.h:3 +msgid "Format:" +msgstr "Format:" + +#: ../data/builder/merge-properties-dialog.builder.h:4 +msgid "Location:" +msgstr "Ort:" + +#: ../data/builder/merge-properties-dialog.builder.h:5 +msgid "Select all" +msgstr "Alles markieren" + +#: ../data/builder/merge-properties-dialog.builder.h:6 +msgid "Unselect all" +msgstr "Markierung aufheben" + +#: ../data/builder/merge-properties-dialog.builder.h:7 +#: ../data/builder/object-editor.builder.h:38 +msgid "dialog1" +msgstr "dialog1" + +#: ../data/builder/new-label-dialog.builder.h:1 +msgid "Label orientation" +msgstr "Ausrichtung des Etiketts" + +#: ../data/builder/new-label-dialog.builder.h:2 +msgid "Media type" +msgstr "Medientyp" + +#: ../data/builder/object-editor.builder.h:2 +#, no-c-format +msgid "%" +msgstr "%" + +#: ../data/builder/object-editor.builder.h:3 +msgid "00000000000 00000" +msgstr "00000000000 00000" + +#: ../data/builder/object-editor.builder.h:4 +msgid "Xxx object properties" +msgstr "Xxx-Objekteigenschaften" + +#: ../data/builder/object-editor.builder.h:5 +#: ../data/builder/prefs-dialog.builder.h:7 +msgid "Alignment:" +msgstr "Ausrichtung:" + +#: ../data/builder/object-editor.builder.h:6 +msgid "Allow merge to automatically shrink text" +msgstr "Automatisches Anpassen der Textgröße erlauben" + +#: ../data/builder/object-editor.builder.h:7 +msgid "Angle:" +msgstr "Winkel:" + +#: ../data/builder/object-editor.builder.h:8 +msgid "Checksum" +msgstr "Prüfsumme" + +#: ../data/builder/object-editor.builder.h:9 +#: ../data/builder/prefs-dialog.builder.h:8 +msgid "Color:" +msgstr "Farbe:" + +#: ../data/builder/object-editor.builder.h:11 +msgid "Enable shadow" +msgstr "Schattierung aktivieren" + +#: ../data/builder/object-editor.builder.h:12 +msgid "Family:" +msgstr "Familie:" + +#: ../data/builder/object-editor.builder.h:13 +msgid "File:" +msgstr "Datei:" + +#: ../data/builder/object-editor.builder.h:14 +msgid "Fill" +msgstr "Füllen" + +#: ../data/builder/object-editor.builder.h:15 +#: ../data/builder/template-designer.builder.h:30 +msgid "Height:" +msgstr "Höhe" + +#: ../data/builder/object-editor.builder.h:17 +msgid "Insert merge field" +msgstr "Datenfeld einfügen" + +#: ../data/builder/object-editor.builder.h:18 +msgid "Key:" +msgstr "Schlüssel:" + +#: ../data/builder/object-editor.builder.h:19 +msgid "Length:" +msgstr "Länge:" + +#: ../data/builder/object-editor.builder.h:21 +#: ../data/builder/prefs-dialog.builder.h:12 +msgid "Line Spacing:" +msgstr "Zeilenabstand:" + +#: ../data/builder/object-editor.builder.h:22 +msgid "Literal:" +msgstr "Literale:" + +#: ../data/builder/object-editor.builder.h:23 +msgid "Opacity:" +msgstr "Transparenz:" + +#: ../data/builder/object-editor.builder.h:24 +msgid "Position" +msgstr "Position" + +#: ../data/builder/object-editor.builder.h:25 +msgid "Reset image size" +msgstr "Bildgröße zurücksetzen" + +#: ../data/builder/object-editor.builder.h:26 +msgid "Shadow" +msgstr "Schattierung" + +#: ../data/builder/object-editor.builder.h:27 +msgid "Size" +msgstr "Breite" + +#: ../data/builder/object-editor.builder.h:28 +msgid "Size:" +msgstr "Größe:" + +#: ../data/builder/object-editor.builder.h:29 +msgid "Style" +msgstr "Stil" + +#: ../data/builder/object-editor.builder.h:30 +msgid "Style:" +msgstr "Stil:" + +#: ../data/builder/object-editor.builder.h:32 +#: ../data/builder/prefs-dialog.builder.h:20 +#: ../data/builder/template-designer.builder.h:61 +msgid "Width:" +msgstr "Breite:" + +#: ../data/builder/object-editor.builder.h:33 +msgid "X Offset:" +msgstr "X-Versatz:" + +#: ../data/builder/object-editor.builder.h:34 +msgid "X:" +msgstr "X:" + +#: ../data/builder/object-editor.builder.h:35 +msgid "Y Offset:" +msgstr "Y-Versatz:" + +#: ../data/builder/object-editor.builder.h:36 +msgid "Y:" +msgstr "Y:" + +#: ../data/builder/object-editor.builder.h:37 +msgid "degrees" +msgstr "Grad" + +#: ../data/builder/object-editor.builder.h:39 +msgid "digits:" +msgstr "Zeichen:" + +#: ../data/builder/object-editor.builder.h:40 +msgid "format:" +msgstr "Format:" + +#: ../data/builder/prefs-dialog.builder.h:1 +msgid " " +msgstr " " + +#: ../data/builder/prefs-dialog.builder.h:2 +msgid "Default page size" +msgstr "Vorgegebene Seitengröße" + +#: ../data/builder/prefs-dialog.builder.h:3 +msgid "Fill" +msgstr "Füllung" + +#: ../data/builder/prefs-dialog.builder.h:4 +msgid "Line" +msgstr "Linie" + +#: ../data/builder/prefs-dialog.builder.h:5 +msgid "Text" +msgstr "Text" + +#: ../data/builder/prefs-dialog.builder.h:6 +msgid "Units" +msgstr "Einheiten" + +#: ../data/builder/prefs-dialog.builder.h:9 +msgid "Font:" +msgstr "Schrift:" + +#: ../data/builder/prefs-dialog.builder.h:10 +msgid "ISO A4" +msgstr "A4" + +#: ../data/builder/prefs-dialog.builder.h:11 +msgid "Inches" +msgstr "Zoll" + +#: ../data/builder/prefs-dialog.builder.h:13 +msgid "Locale" +msgstr "Spracheinstellung" + +#: ../data/builder/prefs-dialog.builder.h:14 +msgid "Millimeters" +msgstr "Millimeter" + +#: ../data/builder/prefs-dialog.builder.h:15 +msgid "Object defaults" +msgstr "Objekt-Vorgaben" + +#: ../data/builder/prefs-dialog.builder.h:16 +msgid "Points" +msgstr "Punkte" + +#: ../data/builder/prefs-dialog.builder.h:17 +msgid "Select default properties for new objects." +msgstr "Wählen Sie die vorgegebenen Eigenschaften für neue Objekte." + +#: ../data/builder/prefs-dialog.builder.h:18 +msgid "Select locale specific behavior." +msgstr "Wählen Sie hier Einstellungen gemäß Ihrer Sprache/Ihres Landes." + +#. Most popular (at top of list) +#: ../data/builder/prefs-dialog.builder.h:19 ../templates/paper-sizes.xml.h:29 +msgid "US Letter" +msgstr "US-Letter" + +#: ../data/builder/property-bar.builder.h:1 +msgid "Bold" +msgstr "Fett" + +#: ../data/builder/property-bar.builder.h:2 +msgid "Center align" +msgstr "Zentrieren" + +#: ../data/builder/property-bar.builder.h:4 +msgid "Font size" +msgstr "Schriftgröße" + +#: ../data/builder/property-bar.builder.h:5 +msgid "Italic" +msgstr "Kursiv" + +#: ../data/builder/property-bar.builder.h:6 +msgid "Left align" +msgstr "Linksbündig" + +#: ../data/builder/property-bar.builder.h:8 +msgid "Line width" +msgstr "Linienbreite" + +#: ../data/builder/property-bar.builder.h:9 +msgid "Right align" +msgstr "Rechtsbündig" + +#: ../data/builder/property-bar.builder.h:10 +msgid "Text color" +msgstr "Textfarbe" + +#: ../data/builder/template-designer.builder.h:1 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(z.B. »Adressaufkleber«, »Visitenkarten« …)" + +#: ../data/builder/template-designer.builder.h:2 +msgid "(e.g., 8163A)" +msgstr "(z.B., 8163A)" + +#: ../data/builder/template-designer.builder.h:3 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(z.B., Avery, Acme, ...)" + +#: ../data/builder/template-designer.builder.h:4 +msgid "1. Outer radius:" +msgstr "1. Äußerer Radius:" + +#: ../data/builder/template-designer.builder.h:5 +msgid "1. Radius:" +msgstr "1. Radius:" + +#: ../data/builder/template-designer.builder.h:6 +msgid "1. Width:" +msgstr "1. Breite:" + +#: ../data/builder/template-designer.builder.h:7 +msgid "2. Height:" +msgstr "2. Höhe:" + +#: ../data/builder/template-designer.builder.h:8 +msgid "2. Inner radius:" +msgstr "2. Innerer Radius:" + +#: ../data/builder/template-designer.builder.h:9 +msgid "2. Waste (overprint allowed):" +msgstr "2. Überstand (Bedrucken erlaubt):" + +#: ../data/builder/template-designer.builder.h:10 +msgid "3. Clipping width:" +msgstr "3. Innere Breite:" + +#: ../data/builder/template-designer.builder.h:11 +msgid "3. Margin" +msgstr "3. Ränder" + +#: ../data/builder/template-designer.builder.h:12 +msgid "3. Round (radius of corner):" +msgstr "3. Rundung (Radius der Ecken):" + +#: ../data/builder/template-designer.builder.h:13 +msgid "4. Clipping height:" +msgstr "4. Innere Höhe:" + +#: ../data/builder/template-designer.builder.h:14 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "4. Horiz. Überstand (Bedrucken erlaubt):" + +#: ../data/builder/template-designer.builder.h:15 +msgid "5. Vert. waste (overprint allowed):" +msgstr "3. Vert. Überstand (Bedrucken erlaubt):" + +#: ../data/builder/template-designer.builder.h:16 +msgid "5. Waste (overprint allowed):" +msgstr "5. Überstand (Bedrucken erlaubt):" + +#: ../data/builder/template-designer.builder.h:17 +msgid "6. Margin" +msgstr "6. Rand" + +#: ../data/builder/template-designer.builder.h:18 +msgid "Brand/Manufacturer:" +msgstr "Marke/Hersteller:" + +#: ../data/builder/template-designer.builder.h:19 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD (einschließlich Kreditkarten-CDs)" + +#: ../data/builder/template-designer.builder.h:20 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"Herzlichen Glückwunsch!\n" +"\n" +"Das Erzeugen der Vorlage ist abgeschlossen.\n" +"Falls Sie diese Vorlage akzeptieren und speichern wollen,\n" +"klicken Sie auf »Akzeptieren«.\n" +"\n" +"Anderenfalls klicken Sie auf »Abbrechen«, um die\n" +"Vorlage zu verwerfen, oder auf »Zurück«,\n" +"um die Vorlage erneut zu bearbeiten." + +#: ../data/builder/template-designer.builder.h:27 +msgid "Description:" +msgstr "Beschreibung:" + +#: ../data/builder/template-designer.builder.h:28 +msgid "Distance from left edge (x0):" +msgstr "Abstand vom linken Rand (x0):" + +#: ../data/builder/template-designer.builder.h:29 +msgid "Distance from top edge (y0):" +msgstr "Abstand vom oberen Rand (x0):" + +#: ../data/builder/template-designer.builder.h:31 +msgid "Horizontal pitch (dx):" +msgstr "Horizontaler Abstand (dx):" + +#: ../data/builder/template-designer.builder.h:32 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" +"Wie viele Layouts wird Ihre Vorlage enthalten?\n" +"\n" +"Ein Layout ist ein Satz von Etiketten oder Karten, die in einem einfachen " +"Raster\n" +"angeordnet sind. Die meisten Vorlagen verwenden nur ein Layout, wie im\n" +"ersten Beispiel. Das zweite Beispiel zeigt die Verwendung zweier Layouts." + +#: ../data/builder/template-designer.builder.h:37 +msgid "Layout #1" +msgstr "Layout #1" + +#: ../data/builder/template-designer.builder.h:38 +msgid "Layout #2" +msgstr "Layout #2" + +#: ../data/builder/template-designer.builder.h:39 +msgid "Number across (nx):" +msgstr "Anzahl horizontal (nx):" + +#: ../data/builder/template-designer.builder.h:40 +msgid "Number down (ny):" +msgstr "Anzahl vertikal (ny):" + +#: ../data/builder/template-designer.builder.h:41 +msgid "Number of layouts:" +msgstr "Anzahl der Layouts:" + +#: ../data/builder/template-designer.builder.h:42 +msgid "Page size:" +msgstr "Seitenformat:" + +#: ../data/builder/template-designer.builder.h:43 +msgid "Part #:" +msgstr "Nummer:" + +#: ../data/builder/template-designer.builder.h:44 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "" +"Bitte geben Sie die folgenden Identifizierungsinformationen über die Vorlage " +"an." + +#: ../data/builder/template-designer.builder.h:45 +msgid "Please enter the following layout information." +msgstr "Bitte geben Sie die folgenden Layout-Informationen ein." + +#: ../data/builder/template-designer.builder.h:46 +msgid "" +"Please enter the following size parameters of a single label in your template." +msgstr "" +"Bitte geben Sie die folgenden Größenwerte des einzelnen Etiketts in Ihrer " +"Vorlage an." + +#: ../data/builder/template-designer.builder.h:47 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" +"Bitte geben Sie die folgenden Größenwerte des einzelnen Etiketts oder der " +"einzelnen Karte in Ihrer Vorlage an." + +#: ../data/builder/template-designer.builder.h:48 +msgid "Please select the basic shape of the labels or cards." +msgstr "Bitte wählen Sie die Grundform der Etiketten oder Karten aus." + +#: ../data/builder/template-designer.builder.h:49 +msgid "Please select the page size of the template stationery." +msgstr "Bitte wählen Sie das Papierformat der Vorlage aus." + +#: ../data/builder/template-designer.builder.h:50 +msgid "Print test sheet" +msgstr "Textseite drucken" + +#: ../data/builder/template-designer.builder.h:51 +msgid "Rectangular or square (can have rounded corners)" +msgstr "Rechteckig oder quadratisch (auch mit abgerundeten Ecken)" + +#: ../data/builder/template-designer.builder.h:52 +msgid "Round" +msgstr "Rund" + +#: ../data/builder/template-designer.builder.h:53 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"Vorlagen benötigen\n" +"zwei Layouts." + +#: ../data/builder/template-designer.builder.h:55 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"Vorlagen benötigen nur\n" +"ein Layout." + +#: ../data/builder/template-designer.builder.h:57 +msgid "Vertical pitch (dy):" +msgstr "Vertikaler Abstand (dy):" + +#: ../data/builder/template-designer.builder.h:58 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"Willkommen zum gLabels Vorlagen-Designer.\n" +"\n" +"Dieser Dialog wird Sie beim Erstellen einer benutzerdefinierten\n" +"gLabels-Vorlage unterstützen." + +#: ../data/builder/template-designer.builder.h:62 +msgid "cd_size_page" +msgstr "cd_size_page" + +#: ../data/builder/template-designer.builder.h:63 +msgid "finish_page" +msgstr "finish_page" + +#: ../data/builder/template-designer.builder.h:65 +msgid "layout_page" +msgstr "layout_page" + +#: ../data/builder/template-designer.builder.h:66 +msgid "name_page" +msgstr "name_page" + +#: ../data/builder/template-designer.builder.h:67 +msgid "nlayouts_page" +msgstr "nlayouts_page" + +#: ../data/builder/template-designer.builder.h:68 +msgid "pg_size_page" +msgstr "pg_size_page" + +#: ../data/builder/template-designer.builder.h:69 +msgid "rect_size_page" +msgstr "rect_size_page" + +#: ../data/builder/template-designer.builder.h:70 +msgid "round_size_page" +msgstr "round_size_page" + +#: ../data/builder/template-designer.builder.h:71 +msgid "shape_page" +msgstr "shape_page" + +#: ../data/builder/template-designer.builder.h:72 +msgid "start_page" +msgstr "start_page" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:1 +msgid "Copies" +msgstr "Kopien" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:2 +msgid "Merge Control" +msgstr "Mischsteuerung" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:3 +msgid "Options" +msgstr "Optionen" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:4 +msgid "Collate" +msgstr "Zuordnen" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:5 +msgid "Copies:" +msgstr "Kopien:" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:7 +msgid "Sheets:" +msgstr "Seiten:" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:8 +msgid "Start on label" +msgstr "Start bei Etikett" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:9 +msgid "from:" +msgstr "von:" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:10 +msgid "on 1st sheet" +msgstr "auf erster Seite" + +#: ../data/builder/print-op-dialog-custom-widget.builder.h:14 +msgid "to:" +msgstr "bis:" + +#: ../data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "Erstellen von Etiketten, Visitenkarten und Medien-Covern" + +#: ../data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "gLabels Etiketten-Designer" + +#: ../data/mime/glabels.keys.in.h:1 ../data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "gLabels-Projektdatei" + +#. Other ISO A series sizes +#: ../templates/paper-sizes.xml.h:2 +msgid "A0" +msgstr "A0" + +#: ../templates/paper-sizes.xml.h:3 +msgid "A1" +msgstr "A1" + +#: ../templates/paper-sizes.xml.h:4 +msgid "A10" +msgstr "A10" + +#: ../templates/paper-sizes.xml.h:5 +msgid "A2" +msgstr "A2" + +#: ../templates/paper-sizes.xml.h:6 +msgid "A3" +msgstr "A3" + +#: ../templates/paper-sizes.xml.h:7 +msgid "A4" +msgstr "A4" + +#: ../templates/paper-sizes.xml.h:8 +msgid "A5" +msgstr "A5" + +#: ../templates/paper-sizes.xml.h:9 +msgid "A6" +msgstr "A6" + +#: ../templates/paper-sizes.xml.h:10 +msgid "A7" +msgstr "A7" + +#: ../templates/paper-sizes.xml.h:11 +msgid "A8" +msgstr "A8" + +#: ../templates/paper-sizes.xml.h:12 +msgid "A9" +msgstr "A9" + +#. ISO B series sizes +#: ../templates/paper-sizes.xml.h:14 +msgid "B0" +msgstr "B0" + +#: ../templates/paper-sizes.xml.h:15 +msgid "B1" +msgstr "B1" + +#: ../templates/paper-sizes.xml.h:16 +msgid "B10" +msgstr "B10" + +#: ../templates/paper-sizes.xml.h:17 +msgid "B2" +msgstr "B2" + +#: ../templates/paper-sizes.xml.h:18 +msgid "B3" +msgstr "B3" + +#: ../templates/paper-sizes.xml.h:19 +msgid "B4" +msgstr "B4" + +#: ../templates/paper-sizes.xml.h:20 +msgid "B5" +msgstr "B5" + +#: ../templates/paper-sizes.xml.h:21 +msgid "B6" +msgstr "B6" + +#: ../templates/paper-sizes.xml.h:22 +msgid "B7" +msgstr "B7" + +#: ../templates/paper-sizes.xml.h:23 +msgid "B8" +msgstr "B8" + +#: ../templates/paper-sizes.xml.h:24 +msgid "B9" +msgstr "B9" + +#: ../templates/paper-sizes.xml.h:25 +msgid "US Executive" +msgstr "US Executive" + +#. Other US paper sizes +#: ../templates/paper-sizes.xml.h:27 +msgid "US Legal" +msgstr "US Legal" + +#: ../templates/categories.xml.h:1 +msgid "Any card" +msgstr "Beliebige Karte" + +#: ../templates/categories.xml.h:2 +msgid "Any label" +msgstr "Alle Etiketten" + +#: ../templates/categories.xml.h:3 +msgid "Business cards" +msgstr "Visitenkarten" + +#: ../templates/categories.xml.h:4 +msgid "CD/DVD or other media" +msgstr "CD/DVD oder andere Medien" + +#: ../templates/categories.xml.h:5 +msgid "Mailing/shipping products" +msgstr "Post- und Versandprodukte" + +#: ../templates/categories.xml.h:6 +msgid "Rectangular labels" +msgstr "Rechteckige Etiketten" + +#: ../templates/categories.xml.h:7 +msgid "Round labels" +msgstr "Runde Etiketten" + +#: ../templates/categories.xml.h:8 +msgid "Square labels" +msgstr "Quadratische Etiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:2 +#: ../templates/avery-iso-templates.xml.h:2 +#: ../templates/dymo-other-templates.xml.h:4 +#: ../templates/misc-iso-templates.xml.h:2 +#: ../templates/zweckform-iso-templates.xml.h:2 +msgid "Address Labels" +msgstr "Adressaufkleber" + +#. =================================================================== +#. ============================================================ +#. =================================================================== +#. ******************************************************************** +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:4 +#: ../templates/avery-iso-templates.xml.h:8 +#: ../templates/misc-us-templates.xml.h:4 +#: ../templates/misc-iso-templates.xml.h:12 +#: ../templates/zweckform-iso-templates.xml.h:6 +msgid "Business Cards" +msgstr "Visitenkarten" + +#. =================================================================== +#. =============================================================== +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:6 +#: ../templates/avery-iso-templates.xml.h:14 +#: ../templates/misc-us-templates.xml.h:8 +#: ../templates/misc-iso-templates.xml.h:16 +#: ../templates/zweckform-iso-templates.xml.h:8 +msgid "CD/DVD Labels" +msgstr "CD/DVD-Etiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:8 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "CD/DVD-Etiketten (Medienaufkleber)" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:10 +msgid "CD/DVD Labels (Spine Labels)" +msgstr "CD/DVD-Etiketten (Spine Labels)" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:12 +#: ../templates/avery-iso-templates.xml.h:16 +msgid "Diskette Labels" +msgstr "Diskettenaufkleber" + +#. the LSK labels can be torn in half down the center +#: ../templates/avery-us-templates.xml.h:14 +msgid "Divider Labels" +msgstr "Etiketten für Trennblätter" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:16 +msgid "Filing Labels" +msgstr "Ordneretiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:18 +msgid "Full Sheet Labels" +msgstr "Ganzseitige Etiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:20 +msgid "ID Labels" +msgstr "Etiketten für Archivierungsordner" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:22 +msgid "Index Cards" +msgstr "Indexkarten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:24 +msgid "Large Round Labels" +msgstr "Große runde Etiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:26 +msgid "Name Badge Labels" +msgstr "Namensschild-Etiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:28 +msgid "Post cards" +msgstr "Postkarten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:30 +#: ../templates/dymo-other-templates.xml.h:12 +msgid "Return Address Labels" +msgstr "Rückantwort-Adressaufkleber" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:32 +#: ../templates/misc-us-templates.xml.h:28 +msgid "Round Labels" +msgstr "Runde Etiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:34 +msgid "Shipping Labels" +msgstr "Versandetiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:36 +msgid "Small Round Labels" +msgstr "Kleine runde Etiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:38 +msgid "Square Labels" +msgstr "Quadratische Etiketten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:40 +msgid "Tent Cards" +msgstr "Klappkarten" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:42 +msgid "Video Tape Face Labels" +msgstr "Etiketten für Videokassetten (Vorderseite)" + +#. =================================================================== +#: ../templates/avery-us-templates.xml.h:44 +msgid "Video Tape Spine Labels" +msgstr "Etiketten für Videokassetten (Rückseite)" + +#. =================================================================== +#: ../templates/avery-iso-templates.xml.h:4 +msgid "Address labels" +msgstr "Adressaufkleber" + +#. =================================================================== +#: ../templates/avery-iso-templates.xml.h:6 +msgid "Allround labels" +msgstr "Universal-Etiketten" + +#. =============================================================== +#: ../templates/avery-iso-templates.xml.h:10 +msgid "CD Booklet" +msgstr "CD-Einlegeheft" + +#. =============================================================== +#: ../templates/avery-iso-templates.xml.h:12 +msgid "CD Inlet" +msgstr "CD-Einleger" + +#. =================================================================== +#: ../templates/avery-iso-templates.xml.h:18 +msgid "Diskette labels" +msgstr "Diskettenaufkleber" + +#. =============================================================== +#. =================================================================== +#: ../templates/avery-iso-templates.xml.h:20 +#: ../templates/misc-us-templates.xml.h:18 +#: ../templates/misc-iso-templates.xml.h:36 +#: ../templates/zweckform-iso-templates.xml.h:16 +msgid "Mailing Labels" +msgstr "Adressaufkleber" + +#. =================================================================== +#: ../templates/avery-iso-templates.xml.h:22 +msgid "Mailing labels" +msgstr "Adressaufkleber" + +#. =================================================================== +#: ../templates/avery-iso-templates.xml.h:24 +msgid "Mini Address Labels" +msgstr "Mini-Adressaufkleber" + +#. =================================================================== +#: ../templates/avery-iso-templates.xml.h:26 +msgid "Mini Labels" +msgstr "Mini-Etiketten" + +#. =================================================================== +#: ../templates/avery-iso-templates.xml.h:28 +msgid "Shipping labels" +msgstr "Versandaufkleber" + +#. =================================================================== +#: ../templates/avery-other-templates.xml.h:2 +msgid "File Folder Labels" +msgstr "Aktenordner-Etiketten" + +#: ../templates/brother-other-templates.xml.h:1 +msgid "Multi Purpose Labels 17mm x 54mm" +msgstr "Mehrzwecketiketten 17mm x 54mm" + +#: ../templates/brother-other-templates.xml.h:2 +msgid "Shipping Labels 62mm x 100mm" +msgstr "Versandetiketten 62mm x 100mm" + +#. +#. ********************************************************************* +#. ********************************************************************* +#. Labels for the Brother QL-500/550/650 PC Label Printers +#. +#. These templates work with the Brother Linux Printer CUPS Driver. It +#. is unknown if these work correctly with the foomatic print driver for +#. these printers. +#. +#. One difference from typical templates is that the template size is +#. not the actual media size - it is the size of the printable area, +#. which is smaller than the media size. This is because (at least with +#. the Brother driver) coordinates are relative the corner of this area. +#. +#. ********************************************************************* +#. ********************************************************************* +#. +#: ../templates/brother-other-templates.xml.h:20 +msgid "Standard Address Labels 29mm x 90mm" +msgstr "Standard-Adressaufkleber 29mm x 90mm" + +#. =================================================================== +#: ../templates/dymo-other-templates.xml.h:2 +msgid "3.5in Diskette" +msgstr "3.5-Zoll- Diskette" + +#. =================================================================== +#: ../templates/dymo-other-templates.xml.h:6 +msgid "File Folder" +msgstr "Aktenordner" + +#. =================================================================== +#: ../templates/dymo-other-templates.xml.h:8 +msgid "Hanging Folder" +msgstr "Hängemappe" + +#. =================================================================== +#: ../templates/dymo-other-templates.xml.h:10 +msgid "Large Address Labels" +msgstr "Große Adressaufkleber" + +#. =================================================================== +#: ../templates/dymo-other-templates.xml.h:14 +msgid "Shipping Address Labels" +msgstr "Versand-Adressaufkleber" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:2 +msgid "Business Card CD" +msgstr "Visitenkarten-CD" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:6 +msgid "CD Template Rectangles" +msgstr "CD-Vorlagen (rechteckig)" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:10 +msgid "CD/DVD Labels (Face Only)" +msgstr "CD/DVD-Etiketten (nur Vorderseite)" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:12 +#: ../templates/misc-iso-templates.xml.h:18 +msgid "CD/DVD Labels (face only)" +msgstr "CD/DVD-Etiketten (nur Vorderseite)" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:14 +msgid "Cassette Labels" +msgstr "Kassettenaufkleber" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:16 +msgid "DLT Labels" +msgstr "DLT-Etiketten" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:20 +msgid "Microtube labels" +msgstr "Microtube-Etiketten" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:22 +msgid "Mini-CD Labels" +msgstr "Mini-CD-Etiketten" + +#: ../templates/misc-us-templates.xml.h:23 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "PRO-CD-Etiketten 2-up (nur CD-Spine)" + +#: ../templates/misc-us-templates.xml.h:24 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "PRO-CD-Etiketten 2-up (nur Vorderseite)" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:26 +#: ../templates/misc-iso-templates.xml.h:42 +msgid "PRO CD Labels 2-up (face only)" +msgstr "PRO-CD-Etiketten 2-up (nur Vorderseite)" + +#. =================================================================== +#: ../templates/misc-us-templates.xml.h:30 +msgid "Slimline CD Case (rightside up)" +msgstr "Slimline CD Case (normal)" + +#: ../templates/misc-us-templates.xml.h:31 +msgid "Slimline CD Case (upside down)" +msgstr "Slimline CD Case (umgekehrt)" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:4 +#: ../templates/zweckform-iso-templates.xml.h:4 +msgid "Allround Labels" +msgstr "Universal-Etiketten" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:6 +msgid "Arch File Labels" +msgstr "Etiketten für Archivierungsordner" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:8 +msgid "Arch File Labels (large)" +msgstr "Etiketten für Archivierungsordner (groß)" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:10 +msgid "Arch File Labels (small)" +msgstr "Etiketten für Archivierungsordner (klein)" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:14 +msgid "CD Labels" +msgstr "CD-Aufkleber" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:20 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "CD/DVD-Etiketten im Standardformat (nur Vorderseite)" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:22 +msgid "Diskette Labels (face only)" +msgstr "Diskettenaufkleber (nur Vorderseite)" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:24 +msgid "EPSON Photo Stickers 16" +msgstr "EPSON Photo Stickers 16" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:26 +msgid "Etiketten" +msgstr "Etiketten" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:28 +msgid "Fridge Magnet Stickers" +msgstr "Aufkleber für Kühlschrankmagnete" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:30 +msgid "General Labels" +msgstr "Allgemeine Etiketten" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:32 +msgid "Inkjet/Laser Labels 70x37mm" +msgstr "Inkjet/Laseretiketten 70x37mm" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:38 +msgid "Mailing Labels-2 columns" +msgstr "Adressaufkleber 2-spaltig" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:40 +msgid "Mailing Labels-3 columns" +msgstr "Adressaufkleber 3-spaltig" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:44 +#: ../templates/zweckform-iso-templates.xml.h:24 +msgid "Rectangular Labels" +msgstr "Rechteckige Etiketten" + +#. =================================================================== +#: ../templates/misc-iso-templates.xml.h:46 +msgid "Video Labels (face only)" +msgstr "Video-Etiketten (nur Vorderseite)" + +#. =================================================================== +#: ../templates/misc-other-templates.xml.h:2 +msgid "Multi-Purpose Labels" +msgstr "Mehrzweck-Etiketten" + +#. =================================================================== +#: ../templates/zweckform-iso-templates.xml.h:10 +msgid "Correction and Cover-up Labels" +msgstr "Korrektur- und Abdeckaufkleber" + +#. =================================================================== +#: ../templates/zweckform-iso-templates.xml.h:12 +msgid "File Back Labels" +msgstr "Ordnerrücken" + +#. =================================================================== +#: ../templates/zweckform-iso-templates.xml.h:14 +msgid "Lever Arch File Labels" +msgstr "Lever Etiketten für Archivierungsordner" + +#. =================================================================== +#: ../templates/zweckform-iso-templates.xml.h:18 +msgid "Multi-purpose Stick+Lift Labels" +msgstr "Mehrzweck-Stick+Lift-Aufkleber" + +#. =================================================================== +#: ../templates/zweckform-iso-templates.xml.h:20 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "QSL-Karten Etiketten 70mm x 50,8mm" + +#. =================================================================== +#: ../templates/zweckform-iso-templates.xml.h:22 +msgid "Rectangular Copier Labels" +msgstr "Rechteckige Kopieretiketten" + +#. =================================================================== +#: ../templates/zweckform-iso-templates.xml.h:26 +msgid "Video Labels (back)" +msgstr "Video-Etiketten (Rückseite)" + +#~ msgid "Brand:" +#~ msgstr "Marke:" + +#~ msgid "Category:" +#~ msgstr "Kategorie:" + +#~ msgid "Recent templates" +#~ msgstr "Zuletzt benutzte Vorlagen" + +#~ msgid "Search all templates" +#~ msgstr "Alle Vorlagen durchsuchen" + +#~ msgid "Normal" +#~ msgstr "Normal" + +#~ msgid "Rotated" +#~ msgstr "Gedreht" + +#~ msgid "Print control (Simple)" +#~ msgstr "Drucksteuerung (Einfach)" + +#~ msgid "Font family" +#~ msgstr "Schriftfamilie" + +#~ msgid "- gLabels label designer" +#~ msgstr "- gLabels Etiketten-Designer" + +#~ msgid "- batch process gLabels label files" +#~ msgstr "- Stapelverarbeitung von gLabels-Dateien" + +#~ msgid "Show tooltips" +#~ msgstr "Minihilfen anzeigen" diff --git a/po/eo.po b/po/eo.po new file mode 100644 index 00000000..cda51cea --- /dev/null +++ b/po/eo.po @@ -0,0 +1,2438 @@ +# translation of eo.po to +# Italian translation of glabels. +# Copyright (C) 2003 THE glabels'S COPYRIGHT HOLDER +# This file is distributed under the same license as the glabels package. +# +# Esperanto special letters: ĉŝĝĥĵŭ -- 2244 +# Antonio C. Codazzi "la Filozofo" , 2007. +# +# +msgid "" +msgstr "" +"Project-Id-Version: eo\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-06-19 20:43-0400\n" +"PO-Revision-Date: 2007-06-06 16:48+0200\n" +"Last-Translator: Antonio C. Codazzi \n" +"Language-Team: Esperanto \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.0.2\n" + +#: src/glabels.c:116 +msgid "Could not initialize Bonobo!\n" +msgstr "Estas neeble prepari Bonobon!\n" + +#: src/glabels-batch.c:52 +msgid "print this message" +msgstr "presu tiun ĉi mesaĝon" + +#: src/glabels-batch.c:54 +msgid "print the version of glabels-batch being used" +msgstr "presu version de uzata staplo de glabels" + +#: src/glabels-batch.c:56 +msgid "set output filename (default=\"output.ps\")" +msgstr "agordu dosiernomon de eligo (defaÅ­lte \"output.ps\")" + +#: src/glabels-batch.c:56 src/glabels-batch.c:70 +msgid "filename" +msgstr "dosiernomo" + +#: src/glabels-batch.c:58 +msgid "number of sheets (default=1)" +msgstr "nombro da folioj (defaÅ­lte 1)" + +#: src/glabels-batch.c:58 +msgid "sheets" +msgstr "folioj" + +#: src/glabels-batch.c:60 +msgid "number of copies (default=1)" +msgstr "nombro da ekzempleroj (defaÅ­lte 1)" + +#: src/glabels-batch.c:60 +msgid "copies" +msgstr "ekzempleroj" + +#: src/glabels-batch.c:62 +msgid "first label on first sheet (default=1)" +msgstr "unua etikedo de unua folio (defaÅ­lte 1)" + +#: src/glabels-batch.c:62 +msgid "first" +msgstr "unua" + +#: src/glabels-batch.c:64 src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "presu konturojn (por testi alliniĝon de la printilo)" + +#: src/glabels-batch.c:66 src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "presu inverse (ekz. iun spegulitan bildon)" + +#: src/glabels-batch.c:68 src/print-dialog.c:351 +msgid "print crop marks" +msgstr "presu liniojn de tranĉo" + +#: src/glabels-batch.c:70 +msgid "input file for merging" +msgstr "eniga dosiero por kunfandi" + +#: src/glabels-batch.c:107 +msgid "[OPTION...] GLABELS_FILE..." +msgstr "[OPTION...] GLABELS_FILE..." + +#: src/glabels-batch.c:127 +#, c-format +msgid "missing glabels file\n" +msgstr "mankanta dosero de glabels\n" + +#: src/glabels-batch.c:158 +#, c-format +msgid "cannot perform document merge with glabels file %s\n" +msgstr "estas neeble kunfandi dokumentojn kun dosiero de glabels %s\n" + +#: src/glabels-batch.c:182 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "estas neeble malfermi dosieron de glabels %s\n" + +#: src/window.c:244 +msgid "(none) - gLabels" +msgstr "(nenio) - gLabels" + +#: src/window.c:414 +msgid "(modified)" +msgstr "(modifita)" + +#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 +msgid "_Select Mode" +msgstr "Modu_so de Elektado" + +#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 +msgid "_Text" +msgstr "_Teksto" + +#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 +msgid "_Line" +msgstr "_Linio" + +#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 +msgid "_Box" +msgstr "_Fako" + +#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 +msgid "_Ellipse" +msgstr "_Elipso" + +#: src/stock.c:70 data/ui/glabels-ui.xml.h:146 +msgid "_Image" +msgstr "_Bildo" + +#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 +msgid "Bar_code" +msgstr "Strek_kodo" + +#: src/stock.c:72 +msgid "_Merge Properties" +msgstr "Ecoj de Ku_nfando" + +#: src/stock.c:73 +msgid "Object _Properties" +msgstr "Ecoj de _Objekto" + +#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 +msgid "Bring to _Front" +msgstr "Portu _Fronten" + +#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 +msgid "Send to _Back" +msgstr "_Sendu MalantaÅ­en" + +#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 +msgid "Rotate _Left" +msgstr "Turnu _Maldekstren" + +#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 +msgid "Rotate _Right" +msgstr "Turnu _Dekstren" + +#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "Renversu _Horizontale" + +#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "Renversu _Vertikale" + +#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 +msgid "_Lefts" +msgstr "_Maldekstre" + +#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 +msgid "_Rights" +msgstr "_Dekstre" + +#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 +msgid "_Centers" +msgstr "_Centre" + +#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 +msgid "_Tops" +msgstr "_Supre" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "Sube" + +#: src/stock.c:85 +msgid "Centers" +msgstr "Centre" + +#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "Ce_ntrita Etikedo" + +#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "Koloro de plenigo" + +#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "Koloro de linio" + +#: src/stock.c:90 src/stock.c:92 +msgid "Linked" +msgstr "Kunligita" + +#: src/stock.c:91 src/stock.c:93 +msgid "Not Linked" +msgstr "Neniu Kunligo" + +#: src/ui-property-bar.c:345 src/object-editor.c:499 +msgid "Default" +msgstr "DefaÅ­lto" + +#: src/ui-property-bar.c:360 src/object-editor.c:512 +msgid "No fill" +msgstr "Neniu Plenigo" + +#: src/ui-property-bar.c:375 src/object-editor.c:505 +msgid "No line" +msgstr "Neniu Linio" + +#: src/ui-sidebar.c:180 +msgid "Object properties" +msgstr "Ecoj de objekto" + +#: src/commands.c:385 +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/commands.c:399 +msgid "See the file AUTHORS for additional credits," +msgstr "Vidigu la dosieron nomitan AUTHORS por pluaj informoj," + +#: src/commands.c:400 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "aÅ­ vizitu http://glabels.sourceforge.net/" + +#: src/commands.c:409 +msgid " " +msgstr " " + +#: src/commands.c:424 +msgid "glabels" +msgstr "glabels" + +#: src/file.c:100 +msgid "New Label or Card" +msgstr "Nova Etikedo aÅ­ Karto" + +#: src/file.c:132 src/file.c:304 +msgid "Media Type" +msgstr "Speco de plurmedio" + +#: src/file.c:138 src/file.c:310 +msgid "Label orientation" +msgstr "Orientado de etikedo" + +#: src/file.c:269 +msgid "Label properties" +msgstr "Ecoj de etikedo" + +#: src/file.c:452 src/file.c:870 +msgid "All files" +msgstr "Ĉiuj dosieroj" + +#: src/file.c:457 src/file.c:875 +msgid "gLabels documents" +msgstr "Dokumentoj de gLabels" + +#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 +msgid "Empty file name selection" +msgstr "Elektado de nomon de vakua dosiero" + +#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 +msgid "Please select a file or supply a valid file name" +msgstr "Bonvolu indiki dosieron aÅ­ validan dosiernomon" + +#: src/file.c:519 src/file.c:631 +msgid "File does not exist" +msgstr "la dosiero ne ekzistas" + +#: src/file.c:563 data/ui/glabels-ui.xml.h:74 +msgid "Open" +msgstr "Malfermu" + +#: src/file.c:565 +msgid "Open label" +msgstr "Malfermu etikedon" + +#: src/file.c:707 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "Estas neeble malfermi dosieron \"%s\"" + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "La formato de dosiero ne estas subtenita" + +#: src/file.c:797 src/file.c:979 src/file.c:1174 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "estas neeble konservi dosieron \"%s\"" + +#: src/file.c:805 src/file.c:987 src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "Eraro dum konservado. la dosiero ankoraÅ­ ne estas konservita." + +#: src/file.c:848 src/file.c:1048 +#, c-format +msgid "Save \"%s\" as" +msgstr "Konservu \"%s\" kiel" + +#: src/file.c:935 src/file.c:1131 +msgid "Please supply a valid file name" +msgstr "Bonvolu indiki validan dosiernomon" + +#: src/file.c:952 src/file.c:1147 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "Ĉu mi devas anstataÅ­igi dosieron \"%s\"?" + +#: src/file.c:960 src/file.c:1155 +msgid "File already exists." +msgstr "La dosiero jam ekzistas." + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "Ĉu mi devas konservi la modifojn de la dokumento \"%s\" antaÅ­ ol fermi?" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "La modifoj estos perditaj se oni ne konservas ilin." + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "fermu sen konservi" + +#. Should not happen +#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 +#: data/glade/object-editor.glade.h:37 +msgid "points" +msgstr "punktoj" + +#: src/prefs.c:158 data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "coloj" + +#: src/prefs.c:160 +msgid "mm" +msgstr "mm" + +#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 +msgid "gLabels Preferences" +msgstr "Agordoj de gLabels" + +#. +#. * Submenu: Order +#. +#: src/view.c:3574 data/ui/glabels-ui.xml.h:154 +msgid "_Order" +msgstr "_Ordo" + +#. +#. * Submenu: Rotate/Flip +#. +#: src/view.c:3595 data/ui/glabels-ui.xml.h:160 +msgid "_Rotate/Flip" +msgstr "_Rotacio/Renverso" + +#. +#. * Submenu: Align Horizontally +#. +#: src/view.c:3628 +msgid "Align _Horizontally" +msgstr "LaÅ­linnigu _Horizontale" + +#. +#. * Submenu: Align Vertically +#. +#: src/view.c:3667 +msgid "Align _Vertically" +msgstr "LaÅ­linnigu _Verticale" + +#: src/view.c:3728 data/ui/glabels-ui.xml.h:137 +msgid "_Delete" +msgstr "_Forigu" + +#. Build editor. +#: src/view-box.c:224 +msgid "Box object properties" +msgstr "Ecoj de Fako" + +#. Build editor. +#: src/view-ellipse.c:224 +msgid "Ellipse object properties" +msgstr "Ecoj de Elipso" + +#. Build editor. +#: src/view-line.c:224 +msgid "Line object properties" +msgstr "Ecoj de Linio" + +#. Build editor. +#: src/view-image.c:223 +msgid "Image object properties" +msgstr "Ecoj de Bildo" + +#. Build editor. +#: src/view-text.c:251 +msgid "Text object properties" +msgstr "Ecoj de Teksto" + +#: src/view-text.c:563 data/glade/object-editor.glade.h:28 +msgid "Text" +msgstr "Teksto" + +#. Build editor. +#: src/view-barcode.c:210 +msgid "Barcode object properties" +msgstr "Ecoj de Strekkodo" + +#: src/view-barcode.c:580 src/print.c:1089 +msgid "Invalid barcode data" +msgstr "Nevalida strekkodo" + +#: src/merge-properties-dialog.c:231 +msgid "Merge Properties" +msgstr "Ecoj de Kunfando" + +#. ---- Source section ---- +#: src/merge-properties-dialog.c:237 +msgid "Source" +msgstr "Fonto" + +#: src/merge-properties-dialog.c:245 +msgid "Format:" +msgstr "Formato:" + +#. Location line +#: src/merge-properties-dialog.c:273 +msgid "Location:" +msgstr "Lokiĝo:" + +#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 +msgid "Select merge-database source" +msgstr "Elektu fonton de kunfand-datumbazo" + +#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 +msgid "N/A" +msgstr "N/A" + +#. ---- Sample Fields section ---- +#: src/merge-properties-dialog.c:300 +msgid "Record selection/preview:" +msgstr "Elektado/AntaÅ­montro de rikordo:" + +#: src/merge-properties-dialog.c:326 +msgid "Select" +msgstr "Elektu" + +#: src/merge-properties-dialog.c:334 +msgid "Record/Field" +msgstr "Rikordo/Kampo" + +#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 +msgid "Data" +msgstr "Datumoj" + +#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:81 +msgid "Print" +msgstr "Presu" + +#: src/print-dialog.c:281 +msgid "_Job" +msgstr "_Laboro" + +#: src/print-dialog.c:286 +msgid "P_rinter" +msgstr "P_rintilo" + +#. ----------- Add simple-copies widget ------------ +#: src/print-dialog.c:314 +msgid "Copies" +msgstr "Ekzempleroj" + +#. ------- Add merge control widget ------------ +#: src/print-dialog.c:322 +msgid "Document merge control" +msgstr "Kontrolo de kunfando de dokumento" + +#. ----------- Add custom print options area ------------ +#: src/print-dialog.c:330 +msgid "Options" +msgstr "Opcioj" + +#: src/print-dialog.c:553 src/print-dialog.c:592 +msgid "Print preview" +msgstr "AntaÅ­montro de presado" + +#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 +msgid "gLabels Template Designer" +msgstr "Desegnilo de modeloj por gLabels" + +#: src/bc.c:60 +msgid "POSTNET (any)" +msgstr "POSTNET (iu ajn)" + +#: src/bc.c:63 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (nur ZIP/CAP)" + +#: src/bc.c:66 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (ZIP/CAP+4)" + +#: src/bc.c:69 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: src/bc.c:72 +msgid "EAN (any)" +msgstr "EAN (iu ajn)" + +#: src/bc.c:75 +msgid "EAN-8" +msgstr "EAN-8" + +#: src/bc.c:78 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: src/bc.c:81 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: src/bc.c:84 +msgid "EAN-13" +msgstr "EAN-13" + +#: src/bc.c:87 +msgid "EAN-13 +2" +msgstr "EAN-13 +2" + +#: src/bc.c:90 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: src/bc.c:93 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A aÅ­ UPC-E)" + +#: src/bc.c:96 +msgid "UPC-A" +msgstr "UPC-A" + +#: src/bc.c:99 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: src/bc.c:102 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: src/bc.c:105 +msgid "UPC-E" +msgstr "UPC-E" + +#: src/bc.c:108 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: src/bc.c:111 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: src/bc.c:114 +msgid "ISBN" +msgstr "ISBN" + +#: src/bc.c:117 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: src/bc.c:120 +msgid "Code 39" +msgstr "Kodo 39" + +#: src/bc.c:123 +msgid "Code 128" +msgstr "Kodo 128" + +#: src/bc.c:126 +msgid "Code 128C" +msgstr "Kodo 128C" + +#: src/bc.c:129 +msgid "Code 128B" +msgstr "Kodo 128B" + +#: src/bc.c:132 +msgid "Interleaved 2 of 5" +msgstr "Interleaved 2 of 5" + +#: src/bc.c:135 +msgid "Codabar" +msgstr "Codabar" + +#: src/bc.c:138 +msgid "MSI" +msgstr "MSI" + +#: src/bc.c:141 +msgid "Plessey" +msgstr "Plessey" + +#: src/label.c:569 +msgid "Untitled" +msgstr "Sen nomo" + +#: src/xml-label.c:176 src/xml-label.c:213 +msgid "xmlParseFile error" +msgstr "Eraro de xml-dosiero de sintaksa analizo" + +#: src/xml-label.c:250 +msgid "No document root" +msgstr "Neniu radika dokumento" + +#: src/xml-label.c:264 +msgid "Importing from glabels 0.1 format" +msgstr "Importante el formato de glabels 0.1" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "Importante el formato de glabels 0.4" + +#: src/xml-label.c:279 +msgid "Importing from glabels 1.91 format" +msgstr "Importante el formato de glabels 1.91" + +#: src/xml-label.c:282 +msgid "bad document, unknown glabels Namespace" +msgstr "Nekorekta dokumento, nekonata Nomospaco de glabels" + +#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "Nekorekta radika nodo = \"%s\"" + +#: src/xml-label.c:348 src/xml-label-191.c:165 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "nekorekta nodo en nodo de Dokumeto = \"%s\"" + +#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "nekorekta nodo = \"%s\"" + +#: src/xml-label.c:796 src/xml-label-191.c:605 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "nekorekta nodo en nodo de Datumoj = \"%s\"" + +#: src/xml-label.c:962 libglabels/xml-template.c:535 +msgid "Utf8 conversion error." +msgstr "eraro de konvertado en Utf8." + +#: src/xml-label.c:969 libglabels/xml-template.c:542 +msgid "Problem saving xml file." +msgstr "Problemo laÅ­ konservo de xml-dosiero" + +#. This should always be an id, but just in case a name +#. slips by! +#: src/xml-label-191.c:680 libglabels/xml-template.c:199 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "Nekonata id \"%s\" de grando de paĝo, provante kiel nomo" + +#: src/xml-label-191.c:690 libglabels/xml-template.c:209 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "Nekonata id de (paĝo)grando aÅ­ de nomo \"%s\"" + +#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 +msgid "None" +msgstr "Nenio" + +#: src/merge-init.c:53 +msgid "Text file with comma delimeters (CSV)" +msgstr "Teksta dosiero kun komo kiel disigilo (CSV)" + +#: src/merge-init.c:60 +msgid "Text file with colon delimeters" +msgstr "Teksta dosiero kun komo kiel disigilo" + +#: src/merge-init.c:67 +msgid "Text file with tab delimeters" +msgstr "Teksta dosiero kun TAB kiel disigilo" + +#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 +msgid "File:" +msgstr "Dosiero:" + +#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 +msgid "Key:" +msgstr "Ŝlosilo:" + +#: src/wdgt-print-copies.c:179 +msgid "Sheets:" +msgstr "Folioj:" + +#: src/wdgt-print-copies.c:197 +msgid "Labels" +msgstr "Etikedoj" + +#: src/wdgt-print-copies.c:200 +msgid "from:" +msgstr "de:" + +#: src/wdgt-print-copies.c:207 +msgid "to:" +msgstr "ĝis:" + +#: src/wdgt-print-merge.c:178 +msgid "Start on label" +msgstr "Starto en etikedo" + +#: src/wdgt-print-merge.c:186 +msgid "on 1st sheet" +msgstr "en 1a folio" + +#: src/wdgt-print-merge.c:195 +msgid "Copies:" +msgstr "Ekzempleroj:" + +#: src/wdgt-print-merge.c:201 +msgid "Collate" +msgstr "LaÅ­kajere" + +#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 +msgid "Description:" +msgstr "Priskribo:" + +#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 +msgid "Page size:" +msgstr "Grando de paĝo:" + +#: src/wdgt-media-select.c:290 +msgid "Label size:" +msgstr "Grando de etikedo:" + +#: src/wdgt-media-select.c:301 +msgid "Layout:" +msgstr "Aspekto:" + +#: src/wdgt-media-select.c:578 +#, c-format +msgid "%d x %d (%d per sheet)" +msgstr "%d x %d (%d por folio)" + +#: src/wdgt-media-select.c:582 +#, c-format +msgid "%d per sheet" +msgstr "%d por folio" + +#: src/wdgt-media-select.c:614 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: src/wdgt-media-select.c:619 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s diametro" + +#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s diametro" + +#: src/wdgt-rotate-label.c:193 +msgid "Rotate" +msgstr "Rotacio" + +#. This is the default custom color +#: src/mygal/color-palette.c:396 +msgid "custom" +msgstr "personigita" + +#. "Custom" color - we'll pop up a GnomeColorPicker +#: src/mygal/color-palette.c:438 +msgid "Custom Color:" +msgstr "Personigita Koloro:" + +#: src/mygal/color-palette.c:446 +msgid "Choose Custom Color" +msgstr "Elektu personigitan koloron" + +#: src/mygal/color-palette.c:579 +msgid "black" +msgstr "nigro" + +#: src/mygal/color-palette.c:580 +msgid "light brown" +msgstr "hela bruna koloro" + +#: src/mygal/color-palette.c:581 +msgid "brown gold" +msgstr "malhela oro" + +#: src/mygal/color-palette.c:582 +msgid "dark green #2" +msgstr "malhela verdo #2" + +#: src/mygal/color-palette.c:583 +msgid "navy" +msgstr "mararmea bluo" + +#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 +msgid "dark blue" +msgstr "malhela bluo" + +#: src/mygal/color-palette.c:585 +msgid "purple #2" +msgstr "viola koloro #2" + +#: src/mygal/color-palette.c:586 +msgid "very dark gray" +msgstr "tre malhela grizo" + +#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 +msgid "dark red" +msgstr "malhela ruĝo" + +#: src/mygal/color-palette.c:590 +msgid "red-orange" +msgstr "ruĝ-oranĝo" + +#: src/mygal/color-palette.c:591 +msgid "gold" +msgstr "oro" + +#: src/mygal/color-palette.c:592 +msgid "dark green" +msgstr "malhela verdo" + +#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 +msgid "dull blue" +msgstr "nebrila bluo" + +#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 +msgid "blue" +msgstr "bluo" + +#: src/mygal/color-palette.c:595 +msgid "dull purple" +msgstr "nebrila violo" + +#: src/mygal/color-palette.c:596 +msgid "dark grey" +msgstr "malhela grizo" + +#: src/mygal/color-palette.c:599 +msgid "red" +msgstr "ruĝo" + +#: src/mygal/color-palette.c:600 +msgid "orange" +msgstr "oranĝa koloro" + +#: src/mygal/color-palette.c:601 +msgid "lime" +msgstr "limeta koloro" + +#: src/mygal/color-palette.c:602 +msgid "dull green" +msgstr "nebrila verdo" + +#: src/mygal/color-palette.c:603 +msgid "dull blue #2" +msgstr "nebrila bluo #2" + +#: src/mygal/color-palette.c:604 +msgid "sky blue #2" +msgstr "ĉielbluo #2" + +#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 +msgid "purple" +msgstr "violo" + +#: src/mygal/color-palette.c:606 +msgid "gray" +msgstr "grizo" + +#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 +msgid "magenta" +msgstr "intense karmezina" + +#: src/mygal/color-palette.c:610 +msgid "bright orange" +msgstr "brila oranĝo" + +#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 +msgid "yellow" +msgstr "flavo" + +#: src/mygal/color-palette.c:612 +msgid "green" +msgstr "verdo" + +#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 +msgid "cyan" +msgstr "cejano" + +#: src/mygal/color-palette.c:614 +msgid "bright blue" +msgstr "brila bluo" + +#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 +msgid "red purple" +msgstr "ruĝ-violo" + +#: src/mygal/color-palette.c:616 +msgid "light grey" +msgstr "hela grizo" + +#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 +msgid "pink" +msgstr "rozkoloro" + +#: src/mygal/color-palette.c:620 +msgid "light orange" +msgstr "hela oranĝo" + +#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 +msgid "light yellow" +msgstr "hela flavo" + +#: src/mygal/color-palette.c:622 +msgid "light green" +msgstr "hela verdo" + +#: src/mygal/color-palette.c:623 +msgid "light cyan" +msgstr "hela cejano" + +#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 +msgid "light blue" +msgstr "hela bluo" + +#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 +msgid "light purple" +msgstr "hela violo" + +#: src/mygal/color-palette.c:626 +msgid "white" +msgstr "blanko" + +#: src/mygal/color-palette.c:631 +msgid "purplish blue" +msgstr "viol-bluo" + +#: src/mygal/color-palette.c:635 +msgid "dark purple" +msgstr "malhela violo" + +#: src/mygal/color-palette.c:637 +msgid "sky blue" +msgstr "ĉielbluo" + +#: libglabels/template.c:848 +#, c-format +msgid "Generic %s full page" +msgstr "Ĝenerala %s plena paĝo" + +#: libglabels/template.c:897 +msgid "No template files found!" +msgstr "Neniu modelo estis trovita!" + +#. Create and append an "Other" entry. +#: libglabels/paper.c:67 +msgid "Other" +msgstr "Aliaĵoj" + +#: libglabels/paper.c:361 +msgid "No paper files found!" +msgstr "Neniu papera dosiero estis trovita!!" + +#: data/ui/glabels-ui.xml.h:1 +msgid "About glabels" +msgstr "Pri glabels" + +#: data/ui/glabels-ui.xml.h:2 +msgid "About..." +msgstr "Pri..." + +#: data/ui/glabels-ui.xml.h:3 +msgid "Align _Horizontal" +msgstr "LaÅ­linnigu _Horizontale" + +#: data/ui/glabels-ui.xml.h:4 +msgid "Align _Vertical" +msgstr "LaÅ­linnigu _Verticale" + +#: data/ui/glabels-ui.xml.h:5 +msgid "Align objects to bottoms" +msgstr "LaÅ­linnigu objektojn sube" + +#: data/ui/glabels-ui.xml.h:6 +msgid "Align objects to horizontal centers" +msgstr "LaÅ­linnigu objektojn laÅ­ horizontala centro" + +#: data/ui/glabels-ui.xml.h:7 +msgid "Align objects to left edges" +msgstr "LaÅ­linnigu objektojn laÅ­ maldekstra rando" + +#: data/ui/glabels-ui.xml.h:8 +msgid "Align objects to right edges" +msgstr "LaÅ­linnigu objektojn laÅ­ dekstra rando" + +#: data/ui/glabels-ui.xml.h:9 +msgid "Align objects to tops" +msgstr "LaÅ­linnigu objektojn supre" + +#: data/ui/glabels-ui.xml.h:10 +msgid "Align objects to vertical centers" +msgstr "LaÅ­liniigu objektojn laÅ­ verticala centro" + +#: data/ui/glabels-ui.xml.h:12 +msgid "Bold" +msgstr "Dika" + +#: data/ui/glabels-ui.xml.h:14 +msgid "Center align" +msgstr "LaÅ­liniiĝu centre" + +#: data/ui/glabels-ui.xml.h:15 +msgid "Center objects to horizontal label center" +msgstr "Centrigu objektojn laÅ­ horizontala centro de etikedo" + +#: data/ui/glabels-ui.xml.h:16 +msgid "Center objects to vertical label center" +msgstr "Centrigu objektojn laÅ­ vertikala centro de etikedo" + +#: data/ui/glabels-ui.xml.h:17 +msgid "Change the visibility of markup lines in the current window" +msgstr "Ŝangu videblecon de linioj de demarkacio en nuna fenestro" + +#: data/ui/glabels-ui.xml.h:18 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "Ŝangu videblecon de la ilarstango de desegno en nuna fenestro" + +#: data/ui/glabels-ui.xml.h:19 +msgid "Change the visibility of the grid in the current window" +msgstr "Ŝangu videblecon de la krado en nuna fenestro" + +#: data/ui/glabels-ui.xml.h:20 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "Ŝangu videblecon de la ĉefa ilarstango en nuna fenestro" + +#: data/ui/glabels-ui.xml.h:21 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "Ŝangu videblecon de ilarstango de ecoj en nuna fenestro" + +#: data/ui/glabels-ui.xml.h:22 +msgid "Close" +msgstr "Fermu" + +#: data/ui/glabels-ui.xml.h:23 +msgid "Close the current file" +msgstr "Fermu la nunan dosieron" + +#: data/ui/glabels-ui.xml.h:24 +msgid "Configure the application" +msgstr "Agordu la programon" + +#: data/ui/glabels-ui.xml.h:25 +msgid "Contents" +msgstr "Entenoj" + +#: data/ui/glabels-ui.xml.h:26 +msgid "Copy" +msgstr "Kopiu" + +#: data/ui/glabels-ui.xml.h:27 +msgid "Copy the selection" +msgstr "Kopiu la elektaĵon" + +#: data/ui/glabels-ui.xml.h:28 +msgid "Create a custom template" +msgstr "Kreu personigitan modelon" + +#: data/ui/glabels-ui.xml.h:29 +msgid "Create a new document" +msgstr "Kreu novan dokumenton" + +#: data/ui/glabels-ui.xml.h:30 +msgid "Create barcode object" +msgstr "Keu strekkodan objekton" + +#: data/ui/glabels-ui.xml.h:31 +msgid "Create box/rectangle object" +msgstr "Kreu objekton de areo/rektangulo" + +#: data/ui/glabels-ui.xml.h:32 +msgid "Create ellipse/circle object" +msgstr "Kreu objekton de elipse/circlo" + +#: data/ui/glabels-ui.xml.h:33 +msgid "Create image object" +msgstr "Kreu bildan objekton" + +#: data/ui/glabels-ui.xml.h:34 +msgid "Create line object" +msgstr "Kreu linian objekton" + +#: data/ui/glabels-ui.xml.h:35 +msgid "Create text object" +msgstr "Kreu tekstan objekton" + +#: data/ui/glabels-ui.xml.h:36 +msgid "Cu_t" +msgstr "El_tondu" + +#: data/ui/glabels-ui.xml.h:37 +msgid "Customize" +msgstr "Personigu" + +#: data/ui/glabels-ui.xml.h:38 +msgid "Customize Drawing Toolbar" +msgstr "Personigu ilarstangon de desegno" + +#: data/ui/glabels-ui.xml.h:39 +msgid "Customize Main Toolbar" +msgstr "Personigu ĉefan ilarstangon" + +#: data/ui/glabels-ui.xml.h:40 +msgid "Customize Property Toolbar" +msgstr "Personigu ilarstangon de ecoj" + +#: data/ui/glabels-ui.xml.h:41 +msgid "Customize toolbars" +msgstr "Personigu ilarstangojn" + +#: data/ui/glabels-ui.xml.h:42 +msgid "Cut" +msgstr "Eltondu" + +#: data/ui/glabels-ui.xml.h:43 +msgid "Cut the selection" +msgstr "Eltondu elektaĵon" + +#: data/ui/glabels-ui.xml.h:44 +msgid "Decrease magnification" +msgstr "Malpliigu zomon" + +#: data/ui/glabels-ui.xml.h:45 +msgid "Delete" +msgstr "Forigu" + +#: data/ui/glabels-ui.xml.h:46 +msgid "Delete the selected objects" +msgstr "Forigu elektitajn objektojn" + +#: data/ui/glabels-ui.xml.h:47 +msgid "Drawing toolbar" +msgstr "Ilarstango de desegno" + +#: data/ui/glabels-ui.xml.h:48 +msgid "Dump XML" +msgstr "Ŝutu XML" + +#: data/ui/glabels-ui.xml.h:49 +msgid "Dump the UI Xml description" +msgstr "Ŝutu priskribon de UI xml" + +#: data/ui/glabels-ui.xml.h:50 +msgid "Edit merge properties" +msgstr "Redaktu ecojn de kunfando" + +#: data/ui/glabels-ui.xml.h:54 +msgid "Flip object horizontally" +msgstr "Renversu objekton horizontale" + +#: data/ui/glabels-ui.xml.h:55 +msgid "Flip object vertically" +msgstr "Renversu objekton vertikale" + +#: data/ui/glabels-ui.xml.h:56 +msgid "Font name" +msgstr "Nomo de tiparo" + +#: data/ui/glabels-ui.xml.h:57 +msgid "Font selector" +msgstr "Elektilo de tiparo" + +#: data/ui/glabels-ui.xml.h:58 +msgid "Font size" +msgstr "Tipargrando" + +#: data/ui/glabels-ui.xml.h:59 +msgid "Icon and _Text" +msgstr "Ikono kaj _Teksto" + +#: data/ui/glabels-ui.xml.h:60 +msgid "Increase magnification" +msgstr "Pliigu zomon" + +#: data/ui/glabels-ui.xml.h:61 +msgid "Italic" +msgstr "Kursivo" + +#: data/ui/glabels-ui.xml.h:63 +msgid "Left align" +msgstr "LaÅ­liniigu maldekstren" + +#: data/ui/glabels-ui.xml.h:65 +msgid "Line width" +msgstr "Larĝo de linio" + +#: data/ui/glabels-ui.xml.h:66 +msgid "Lower object to bottom" +msgstr "Subentiru objekton ĝis la fundo" + +#: data/ui/glabels-ui.xml.h:67 +msgid "M_arkup" +msgstr "M_arkado" + +#: data/ui/glabels-ui.xml.h:68 +msgid "Main toolbar" +msgstr "Ĉefa ilarstango" + +#: data/ui/glabels-ui.xml.h:69 +msgid "Markup" +msgstr "Markaĵoj" + +#: data/ui/glabels-ui.xml.h:70 +msgid "Modify document properties" +msgstr "Radaktu ecojn de dokumento" + +#: data/ui/glabels-ui.xml.h:71 +msgid "New" +msgstr "Nova" + +#: data/ui/glabels-ui.xml.h:72 +msgid "Object property editor" +msgstr "Redaktilo de ecoj por objekto" + +#: data/ui/glabels-ui.xml.h:73 +msgid "Only show icons in the main toolbar" +msgstr "Videbligu nur ikonojn en ĉefa ilarstango" + +#: data/ui/glabels-ui.xml.h:75 +msgid "Open a file" +msgstr "Malfermu iun dosieron" + +#: data/ui/glabels-ui.xml.h:76 +msgid "Open the glabels manual" +msgstr "Malfermu manlibron de glabels" + +#: data/ui/glabels-ui.xml.h:77 +msgid "Paste" +msgstr "Enmetu" + +#: data/ui/glabels-ui.xml.h:78 +msgid "Paste the clipboard" +msgstr "Enmetu la poŝon" + +#: data/ui/glabels-ui.xml.h:79 +msgid "Pr_eferences..." +msgstr "A_gordoj..." + +#: data/ui/glabels-ui.xml.h:80 +msgid "Preferences" +msgstr "Agordoj" + +#: data/ui/glabels-ui.xml.h:82 +msgid "Print the current file" +msgstr "Presu la nunan dosieron" + +#: data/ui/glabels-ui.xml.h:83 +msgid "Proper_ties..." +msgstr "E_coj..." + +#: data/ui/glabels-ui.xml.h:84 +msgid "Properties" +msgstr "Ecoj" + +#: data/ui/glabels-ui.xml.h:85 +msgid "Property toolbar" +msgstr "Ilarstango de ecoj" + +#: data/ui/glabels-ui.xml.h:86 +msgid "Quit" +msgstr "Eliro" + +#: data/ui/glabels-ui.xml.h:87 +msgid "Quit the program" +msgstr "Eliru el programo" + +#: data/ui/glabels-ui.xml.h:88 +msgid "Raise object to top" +msgstr "Suprentiru objekton ĝis la pinto" + +#: data/ui/glabels-ui.xml.h:89 +msgid "Recent _Files" +msgstr "Fre_ŝaj Dosieroj" + +#: data/ui/glabels-ui.xml.h:90 +msgid "Redo" +msgstr "Refaru" + +#: data/ui/glabels-ui.xml.h:91 +msgid "Redo the undone action" +msgstr "Refaru la lastan malfaritan agon" + +#: data/ui/glabels-ui.xml.h:92 +msgid "Remove all selections" +msgstr "Formovu ĉiujn elektaĵojn" + +#: data/ui/glabels-ui.xml.h:94 +#, no-c-format +msgid "Restore scale to 100%" +msgstr "Reen 100%" + +#: data/ui/glabels-ui.xml.h:95 +msgid "Right align" +msgstr "laÅ­liniigu dekstren" + +#: data/ui/glabels-ui.xml.h:98 +msgid "Rotate object 90 clockwise" +msgstr "Turnu la objekton je 90° dekstroĝire" + +#: data/ui/glabels-ui.xml.h:99 +msgid "Rotate object 90 counter-clockwise" +msgstr "Turnu la objekton je 90° kontraÅ­montrile" + +#: data/ui/glabels-ui.xml.h:100 +msgid "Save" +msgstr "Konservu" + +#: data/ui/glabels-ui.xml.h:101 +msgid "Save As" +msgstr "Konservu kiel" + +#: data/ui/glabels-ui.xml.h:102 +msgid "Save _As..." +msgstr "Konservu kiel..." + +#: data/ui/glabels-ui.xml.h:103 +msgid "Save the current file" +msgstr "Konservu la nunan dosieron" + +#: data/ui/glabels-ui.xml.h:104 +msgid "Save the current file with a different name" +msgstr "Konservu la nunan dosieron per alia nomo" + +#: data/ui/glabels-ui.xml.h:105 +msgid "Select All" +msgstr "Elektu Ĉion" + +#: data/ui/glabels-ui.xml.h:106 +msgid "Select _All" +msgstr "Elektu _Ĉion" + +#: data/ui/glabels-ui.xml.h:107 +msgid "Select all objects" +msgstr "Elektu ĉiujn objektojn" + +#: data/ui/glabels-ui.xml.h:108 +msgid "Select, move and modify objects" +msgstr "Elektu, movu kaj redaktu objektojn" + +#: data/ui/glabels-ui.xml.h:110 +msgid "Set main toolbar button style according to desktop default" +msgstr "Agordu butonstilon de ĉefa ilarstango laÅ­ defaÅ­lto de labortablo" + +#: data/ui/glabels-ui.xml.h:111 +msgid "Show _Tooltips" +msgstr "Mon_tru Sugestojn" + +#: data/ui/glabels-ui.xml.h:112 +msgid "Show both icons and texts in the main toolbar" +msgstr "Vidigu kaj ikonojn kaj tekstojn en la ĉefa ilarstango" + +#: data/ui/glabels-ui.xml.h:113 +msgid "Show tooltips in the drawing toolbar" +msgstr "Vidigu sugestojn en la ilarstango de desegno" + +#: data/ui/glabels-ui.xml.h:114 +msgid "Show tooltips in the main toolbar" +msgstr "Vidigu sugestojn en la ĉefa ilarstango" + +#: data/ui/glabels-ui.xml.h:115 +msgid "Show tooltips in the property toolbar" +msgstr "Vidigu sugestojn en la ilarstango de ecoj" + +#: data/ui/glabels-ui.xml.h:116 +msgid "Template Designer" +msgstr "Desegnilo de Modeloj" + +#: data/ui/glabels-ui.xml.h:117 +msgid "Template _Designer..." +msgstr "_Desegnilo de Modeloj..." + +#: data/ui/glabels-ui.xml.h:118 +msgid "Text color" +msgstr "Koloro de teksto" + +#: data/ui/glabels-ui.xml.h:119 +msgid "U_n-select All" +msgstr "Malelektu Ĉio_n" + +#: data/ui/glabels-ui.xml.h:120 +msgid "Un-select All" +msgstr "Malelektu Ĉion" + +#: data/ui/glabels-ui.xml.h:121 +msgid "Undo" +msgstr "Malfaru" + +#: data/ui/glabels-ui.xml.h:122 +msgid "Undo the last action" +msgstr "Nuligu lastan agon" + +#: data/ui/glabels-ui.xml.h:123 +msgid "Zoom _1:1" +msgstr "Zomo je _1:1" + +#: data/ui/glabels-ui.xml.h:124 +msgid "Zoom _In" +msgstr "_Zomo" + +#: data/ui/glabels-ui.xml.h:125 +msgid "Zoom _Out" +msgstr "_Malzomo" + +#: data/ui/glabels-ui.xml.h:126 +msgid "Zoom to _fit" +msgstr "Alĝustigu" + +#: data/ui/glabels-ui.xml.h:127 +msgid "Zoom to fit window" +msgstr "Alĝustigu al la fenestro" + +#: data/ui/glabels-ui.xml.h:128 +msgid "_About..." +msgstr "_Pri..." + +#: data/ui/glabels-ui.xml.h:129 +msgid "_Bottoms" +msgstr "Su_be" + +#: data/ui/glabels-ui.xml.h:132 +msgid "_Close" +msgstr "_Fermu" + +#: data/ui/glabels-ui.xml.h:133 +msgid "_Contents" +msgstr "_Entenoj" + +#: data/ui/glabels-ui.xml.h:134 +msgid "_Copy" +msgstr "_Kopiu" + +#: data/ui/glabels-ui.xml.h:135 +msgid "_Create Object" +msgstr "_Kreu Objekton" + +#: data/ui/glabels-ui.xml.h:136 +msgid "_Debug" +msgstr "_Sencimigo" + +#: data/ui/glabels-ui.xml.h:138 +msgid "_Desktop Default" +msgstr "DefaÅ­lto por Labortabulo" + +#: data/ui/glabels-ui.xml.h:139 +msgid "_Drawing Toolbar" +msgstr "Ilarstango de _Desegno" + +#: data/ui/glabels-ui.xml.h:140 +msgid "_Edit" +msgstr "R_edaktu" + +#: data/ui/glabels-ui.xml.h:142 +msgid "_File" +msgstr "_Dosiero" + +#: data/ui/glabels-ui.xml.h:143 +msgid "_Grid" +msgstr "_Krado" + +#: data/ui/glabels-ui.xml.h:144 +msgid "_Help" +msgstr "_Helpilo" + +#: data/ui/glabels-ui.xml.h:145 +msgid "_Icon" +msgstr "_Ikono" + +#: data/ui/glabels-ui.xml.h:149 +msgid "_Main Toolbar" +msgstr "_Ĉefa Ilarstango" + +#: data/ui/glabels-ui.xml.h:150 +msgid "_Merge Properties..." +msgstr "_Kunfandu Ecojn..." + +#: data/ui/glabels-ui.xml.h:151 +msgid "_New" +msgstr "_Nova" + +#: data/ui/glabels-ui.xml.h:152 +msgid "_Objects" +msgstr "_Objektoj" + +#: data/ui/glabels-ui.xml.h:153 +msgid "_Open..." +msgstr "M_alfermu..." + +#: data/ui/glabels-ui.xml.h:155 +msgid "_Paste" +msgstr "_Enmetu" + +#: data/ui/glabels-ui.xml.h:156 +msgid "_Print..." +msgstr "_Presu..." + +#: data/ui/glabels-ui.xml.h:157 +msgid "_Property Toolbar" +msgstr "Ilarstango de Eco_j" + +#: data/ui/glabels-ui.xml.h:158 +msgid "_Quit" +msgstr "_Eliro" + +#: data/ui/glabels-ui.xml.h:161 +msgid "_Save" +msgstr "_Konservu" + +#: data/ui/glabels-ui.xml.h:165 +msgid "_View" +msgstr "_Videbligo" + +#: data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr " " + +#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 +#: data/glade/template-designer.glade.h:5 +msgid "*" +msgstr "*" + +#: data/glade/prefs-dialog.glade.h:3 +msgid "Default page size" +msgstr "DefaÅ­lta grando de paĝo" + +#: data/glade/prefs-dialog.glade.h:4 +msgid "Fill" +msgstr "Plenigo" + +#: data/glade/prefs-dialog.glade.h:5 +msgid "Line" +msgstr "Linio" + +#: data/glade/prefs-dialog.glade.h:6 +msgid "Text" +msgstr "Teksto" + +#: data/glade/prefs-dialog.glade.h:7 +msgid "Units" +msgstr "Unitoj" + +#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 +msgid "Alignment:" +msgstr "Alliniĝo:" + +#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 +msgid "Color:" +msgstr "Koloro:" + +#: data/glade/prefs-dialog.glade.h:10 +msgid "Font:" +msgstr "Tiparo:" + +#: data/glade/prefs-dialog.glade.h:11 +msgid "ISO A4" +msgstr "ISO A4" + +#: data/glade/prefs-dialog.glade.h:12 +msgid "Inches" +msgstr "Coloj" + +#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 +msgid "Line Spacing:" +msgstr "Interspaco:" + +#: data/glade/prefs-dialog.glade.h:14 +msgid "Locale" +msgstr "Nacia" + +#: data/glade/prefs-dialog.glade.h:15 +msgid "Millimeters" +msgstr "Milimetroj" + +#: data/glade/prefs-dialog.glade.h:16 +msgid "Object defaults" +msgstr "DefaÅ­ltoj de objekto" + +#: data/glade/prefs-dialog.glade.h:17 +msgid "Points" +msgstr "Punktoj" + +#: data/glade/prefs-dialog.glade.h:18 +msgid "Select default properties for new objects." +msgstr "Elektu defaÅ­ltajn ecojn por novaj objektoj." + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "Elektu nacian specifan agmanieron." + +#. Most popular (at top of list) +#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:29 +msgid "US Letter" +msgstr "US·Letero" + +#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 +#: data/glade/template-designer.glade.h:72 +msgid "Width:" +msgstr "Larĝo:" + +#: data/glade/object-editor.glade.h:2 +msgid "00000000000 00000" +msgstr "00000000000 00000" + +#: data/glade/object-editor.glade.h:3 +msgid "Xxx object properties" +msgstr "Xxx ecoj de objekto" + +#: data/glade/object-editor.glade.h:5 +msgid "Allow merge to automatically shrink text" +msgstr "" + +#: data/glade/object-editor.glade.h:6 +msgid "Angle:" +msgstr "Angulo:" + +#: data/glade/object-editor.glade.h:7 +msgid "Checksum" +msgstr "Kontrolsumo" + +#: data/glade/object-editor.glade.h:10 +msgid "Family:" +msgstr "Familio:" + +#: data/glade/object-editor.glade.h:12 +msgid "Fill" +msgstr "Plenigo" + +#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 +msgid "Height:" +msgstr "Alto:" + +#: data/glade/object-editor.glade.h:14 +msgid "Image" +msgstr "Bildo" + +#: data/glade/object-editor.glade.h:15 +msgid "Insert merge field" +msgstr "Enigu campon de kunfando" + +#: data/glade/object-editor.glade.h:17 +msgid "Length:" +msgstr "Longo:" + +#: data/glade/object-editor.glade.h:18 +msgid "Line" +msgstr "Linio" + +#: data/glade/object-editor.glade.h:20 +msgid "Literal:" +msgstr "Literalo:" + +#: data/glade/object-editor.glade.h:21 +msgid "Load image" +msgstr "Ŝargu bildon" + +#: data/glade/object-editor.glade.h:22 +msgid "Position" +msgstr "Lokiĝo" + +#: data/glade/object-editor.glade.h:23 +msgid "Reset image size" +msgstr "Restarigu grandon de bildo" + +#: data/glade/object-editor.glade.h:24 +msgid "Size" +msgstr "Grando" + +#: data/glade/object-editor.glade.h:25 +msgid "Size:" +msgstr "Grando:" + +#: data/glade/object-editor.glade.h:26 +msgid "Style" +msgstr "Stilo" + +#: data/glade/object-editor.glade.h:27 +msgid "Style:" +msgstr "Stilo:" + +#: data/glade/object-editor.glade.h:30 +msgid "X:" +msgstr "X:" + +#: data/glade/object-editor.glade.h:31 +msgid "Y:" +msgstr "Y:" + +#: data/glade/object-editor.glade.h:32 +msgid "degrees" +msgstr "gradoj" + +#: data/glade/object-editor.glade.h:33 +msgid "dialog1" +msgstr "fenestr1" + +#: data/glade/object-editor.glade.h:34 +msgid "digits:" +msgstr "ciferoj:" + +#: data/glade/object-editor.glade.h:35 +msgid "format:" +msgstr "formato:" + +#: data/glade/template-designer.glade.h:1 +msgid " " +msgstr " " + +#: data/glade/template-designer.glade.h:2 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(es., \"Etichette di spedizione,\" \"Vizitkartoj,\" ...)" + +#: data/glade/template-designer.glade.h:3 +msgid "(e.g., 8163A)" +msgstr "(es. 8163A)" + +#: data/glade/template-designer.glade.h:4 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(es. Avery, Acme, ...)" + +#: data/glade/template-designer.glade.h:6 +msgid "1. Outer radius:" +msgstr "1. Ekstera radiuso:" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "1. Radiuso:" + +#: data/glade/template-designer.glade.h:8 +msgid "1. Width:" +msgstr "1. Larĝo:" + +#: data/glade/template-designer.glade.h:9 +msgid "2. Height:" +msgstr "2. Alto:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "2. Interna radiuso:" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "2. Forĵetaĵo (surskrivebla):" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "3. Marĝeno" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "3. Rondo (radiuso de angulo):" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "4. Horiz. forĵetaĵo (surskrivebla):" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "5. Vert. forĵetaĵo (surskrivebla):" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "5. Forĵetaĵo (surskrivebla):" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "6. Marĝeno" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "Marca/Produttore:" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "KD/DVD" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"Gratulojn!\n" +"\n" +"Vi finis Desegnilon de Modelojn por gLabels.\n" +"Se vi volas konservi tiun ĉi projekton, alklaku sur \"Apliku\".\n" +"\n" +"Male, alklaku sur \"Nuligu\" por nuligi\n" +"vian projekton tutan aÅ­ \"Retroen\" por ankoraÅ­ redakti tiun ĉi desegnon." + +#: data/glade/template-designer.glade.h:30 +msgid "Design Completed" +msgstr "Fino de Projektado" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "Distanco el maldekstra rando (x0):" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "Distanco el supra rando (y0):" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "Horizontala kvanto (dx):" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" + +#: data/glade/template-designer.glade.h:40 +msgid "Label Size (CD/DVD)" +msgstr "Grando de etikedo (KD/DVD)" + +#: data/glade/template-designer.glade.h:41 +msgid "Label Size (Round)" +msgstr "Grando de etikedo (Ronda)" + +#: data/glade/template-designer.glade.h:42 +msgid "Label or Card Shape" +msgstr "Formo de etikedo aÅ­ de karto" + +#: data/glade/template-designer.glade.h:43 +msgid "Label or Card Size (Rectangular)" +msgstr "Formo de etikedo aÅ­ de karto (Rektangula)" + +#: data/glade/template-designer.glade.h:44 +msgid "Layout #1" +msgstr "Aspekto #1" + +#: data/glade/template-designer.glade.h:45 +msgid "Layout #2" +msgstr "Aspekto #2" + +#: data/glade/template-designer.glade.h:46 +msgid "Layout(s)" +msgstr "Aspekto(j)" + +#: data/glade/template-designer.glade.h:47 +msgid "Name and Description" +msgstr "Nomo kaj Priskribo" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "Numero transverse (nx):" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "Numero sube (ny):" + +#: data/glade/template-designer.glade.h:50 +msgid "Number of Layouts" +msgstr "Nombro da Aspektoj" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "Nombro da aspektoj:" + +#: data/glade/template-designer.glade.h:52 +msgid "Page Size" +msgstr "Grando de paĝo" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "Parto #:" + +#: data/glade/template-designer.glade.h:55 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "" + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "Bonvolu enmeti menditajn informojn." + +#: data/glade/template-designer.glade.h:57 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "" +"Bonvolu enmeti menditajn parametrojn de grando por unu etikedo en " +"la modelo." + +#: data/glade/template-designer.glade.h:58 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" +"Bonvolu enmeti menditajn parametrojn de grando por unu etikedo aÅ­ karto en " +"la modelo." + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "" + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "Bonvolu elekti grandon de paĝo por modelo de skribvaroj." + +#: data/glade/template-designer.glade.h:61 +msgid "Print test sheet" +msgstr "Presu paĝon de elprovo" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "Rektangula aÅ­ kvadra (ankaÅ­ kun rondaj anguloj)" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "Ronda" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"Modeloj necesas\n" +"du aspektojn." + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"Modeloj necesas nur \n" +"unu aspekton." + +#: data/glade/template-designer.glade.h:68 +msgid "Vertical pitch (dy):" +msgstr "Vertikala kvanto (dy):" + +#: data/glade/template-designer.glade.h:69 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"Bonvenon! Tiu ĉi estas Desegnilo de Modeloj por gLabels.\n" +"\n" +"Tio helpos vin por krei personigitan modelon por gLabels." + +#. Other ISO A series sizes +#: data/templates/paper-sizes.xml.h:2 +msgid "A0" +msgstr "A0" + +#: data/templates/paper-sizes.xml.h:3 +msgid "A1" +msgstr "A1" + +#: data/templates/paper-sizes.xml.h:4 +msgid "A10" +msgstr "A10" + +#: data/templates/paper-sizes.xml.h:5 +msgid "A2" +msgstr "A2" + +#: data/templates/paper-sizes.xml.h:6 +msgid "A3" +msgstr "A3" + +#: data/templates/paper-sizes.xml.h:7 +msgid "A4" +msgstr "A4" + +#: data/templates/paper-sizes.xml.h:8 +msgid "A5" +msgstr "A5" + +#: data/templates/paper-sizes.xml.h:9 +msgid "A6" +msgstr "A6" + +#: data/templates/paper-sizes.xml.h:10 +msgid "A7" +msgstr "A7" + +#: data/templates/paper-sizes.xml.h:11 +msgid "A8" +msgstr "A8" + +#: data/templates/paper-sizes.xml.h:12 +msgid "A9" +msgstr "A9" + +#. ISO B series sizes +#: data/templates/paper-sizes.xml.h:14 +msgid "B0" +msgstr "B0" + +#: data/templates/paper-sizes.xml.h:15 +msgid "B1" +msgstr "B1" + +#: data/templates/paper-sizes.xml.h:16 +msgid "B10" +msgstr "B10" + +#: data/templates/paper-sizes.xml.h:17 +msgid "B2" +msgstr "B2" + +#: data/templates/paper-sizes.xml.h:18 +msgid "B3" +msgstr "B3" + +#: data/templates/paper-sizes.xml.h:19 +msgid "B4" +msgstr "B4" + +#: data/templates/paper-sizes.xml.h:20 +msgid "B5" +msgstr "B5" + +#: data/templates/paper-sizes.xml.h:21 +msgid "B6" +msgstr "B6" + +#: data/templates/paper-sizes.xml.h:22 +msgid "B7" +msgstr "B7" + +#: data/templates/paper-sizes.xml.h:23 +msgid "B8" +msgstr "B8" + +#: data/templates/paper-sizes.xml.h:24 +msgid "B9" +msgstr "B9" + +#: data/templates/paper-sizes.xml.h:25 +msgid "US Executive" +msgstr "US Executive" + +#. Other US paper sizes +#: data/templates/paper-sizes.xml.h:27 +msgid "US Legal" +msgstr "US Legal" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:2 +#: data/templates/zweckform-iso-templates.xml.h:2 +msgid "Address Labels" +msgstr "Etikedo por adreso" + +#. =================================================================== +#. ============================================================ +#. =================================================================== +#. ====================================================== +#: data/templates/avery-us-templates.xml.h:4 +#: data/templates/avery-iso-templates.xml.h:4 +#: data/templates/zweckform-iso-templates.xml.h:6 +#: data/templates/misc-us-templates.xml.h:3 +#: data/templates/misc-iso-templates.xml.h:17 +msgid "Business Cards" +msgstr "Vizitkartoj" + +#: data/templates/avery-us-templates.xml.h:5 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "Etikedoj por KD/DVD (Etikedoj por diskoj)" + +#: data/templates/avery-us-templates.xml.h:6 +msgid "CD/DVD Labels (Spine Labels)" +msgstr "Etikedoj por KD/DVD (Etikedoj por diskoj)" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:8 +msgid "Diskette Labels" +msgstr "Etikedoj por disketoj" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:10 +msgid "Filing Labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:12 +msgid "Full Sheet Labels" +msgstr "Paĝo plena da ekikedoj" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:14 +msgid "Large Round Labels" +msgstr "Grandaj rondigitaj etikedoj" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:16 +msgid "Name Badge Labels" +msgstr "Nomŝildetoj" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:18 +msgid "Return Address Labels" +msgstr "Etikedoj por adreso de sendinto" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:20 +msgid "Shipping Labels" +msgstr "Etikedoj por ekspedo" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:22 +msgid "Small Round Labels" +msgstr "Malgrandaj rondigitaj etikedoj" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:24 +msgid "Square Labels" +msgstr "Kvardaj etikedoj" + +#: data/templates/avery-us-templates.xml.h:25 +msgid "Video Tape Face Labels" +msgstr "Etikedoj por videokasedo (faco)" + +#: data/templates/avery-us-templates.xml.h:26 +msgid "Video Tape Spine Labels" +msgstr "Etikedoj por videokasedo (dorso)" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:2 +msgid "Address labels" +msgstr "Etikedoj por adreso" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:6 +msgid "CD Booklet" +msgstr "CD Booklet" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:8 +msgid "CD Inlet" +msgstr "CD Inlet" + +#. =============================================================== +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:10 +#: data/templates/zweckform-iso-templates.xml.h:8 +#: data/templates/misc-us-templates.xml.h:5 +#: data/templates/misc-iso-templates.xml.h:21 +msgid "CD/DVD Labels" +msgstr "Etikedoj por KD/DVD" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:12 +msgid "Diskette labels" +msgstr "Etikedoj por disketoj" + +#. =============================================================== +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:14 +#: data/templates/zweckform-iso-templates.xml.h:14 +#: data/templates/misc-iso-templates.xml.h:35 +msgid "Mailing Labels" +msgstr "Etikedoj por poŝto" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:16 +msgid "Mailing labels" +msgstr "Etikedoj por poŝto" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:18 +msgid "Mini Address Labels" +msgstr "Eta etikedoj por adreso" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:20 +msgid "Shipping labels" +msgstr "Etikedo por ekspedo" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:4 +msgid "Allround Labels" +msgstr "Plenrondaj etikedoj" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:10 +msgid "Correction and Cover-up Labels" +msgstr "Etikedoj por korektado kaj kovrado" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:12 +msgid "Lever Arch File Labels" +msgstr "Levilaj arkaj etikedoj por dosieroj" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:16 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "QSL-Karten Etiketten 70mm x 50,8mm" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:18 +msgid "Rectangular Copier Labels" +msgstr "Rektangulaj etikedoj por kopiado" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:20 +#: data/templates/misc-iso-templates.xml.h:44 +msgid "Rectangular Labels" +msgstr "Rektangulaj Etikedoj" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:22 +msgid "Video Labels (back)" +msgstr "Etikedo por Video (retro)" + +#: data/templates/misc-us-templates.xml.h:1 +msgid "Business Card CD" +msgstr "Vizitkarto KD" + +#: data/templates/misc-us-templates.xml.h:4 +msgid "CD Template Rectangles" +msgstr "Modelaj Rektanguloj por KD" + +#: data/templates/misc-us-templates.xml.h:6 +msgid "CD/DVD Labels (Face Only)" +msgstr "Etikedoj por KD/DVD (nur faco)" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:23 +msgid "CD/DVD Labels (face only)" +msgstr "Etikedoj por KD/DVD (nur faco)" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:9 +msgid "Cassette Labels" +msgstr "Etikedoj por kasedoj" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:11 +msgid "DLT Labels" +msgstr "Etikedoj DLT" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:13 +msgid "Microtube labels" +msgstr "Mikrotubaj etikedoj" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Mini-CD Labels" +msgstr "Etikedoj por Mini-KD" + +#: data/templates/misc-us-templates.xml.h:15 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "Etikedoj por PRO CD (nur KD-dorso)" + +#: data/templates/misc-us-templates.xml.h:16 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "Etikedoj por PRO CD (nur faco)" + +#: data/templates/misc-us-templates.xml.h:17 +#: data/templates/misc-iso-templates.xml.h:42 +msgid "PRO CD Labels 2-up (face only)" +msgstr "Etikedoj por PRO CD (nur faco)" + +#: data/templates/misc-us-templates.xml.h:18 +msgid "Slimline CD Case (rightside up)" +msgstr "Subtila KD-ujo (dekstrosupra)" + +#: data/templates/misc-us-templates.xml.h:19 +msgid "Slimline CD Case (upside down)" +msgstr "Subtila KD-ujo (kaposuba)" + +#: data/templates/misc-iso-templates.xml.h:1 +msgid "Agipa 119488: Business Cards" +msgstr "Agipa 119488: Vizitkartoj" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:3 +msgid "Allround Labels --24" +msgstr "Plenrondaj etikedoj --24" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:5 +msgid "Allround Labels --44" +msgstr "Plenrondaj etikedoj --44" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:7 +msgid "Allround Labels --64" +msgstr "Plenrondaj etikedoj --64" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:9 +msgid "Allround Labels --65" +msgstr "Plenrondaj etikedoj --65" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:11 +msgid "Arch File Labels" +msgstr "Arkaj etikedoj por dosieroj" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Arch File Labels (large)" +msgstr "Arkaj etikedoj por dosieroj (grandaj)" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Arch File Labels (small)" +msgstr "Arkaj etikedoj por dosieroj (etaj)" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:19 +msgid "CD Labels" +msgstr "Etikedoj por KD" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:25 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "Etikedoj kun standarta formato por KD/DVD (nur faco)" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:27 +msgid "Diskette Labels (face only)" +msgstr "Etikedoj por disketoj (nur faco)" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:29 +msgid "EPSON Photo Stickers 16" +msgstr "EPSON Photo Stickers 16" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:31 +msgid "Etiketten" +msgstr "Etiketten" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:33 +msgid "Fridge Magnet Stickers" +msgstr "Magnetaĵoj por fridujo" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:37 +msgid "Mailing Labels --14" +msgstr "Etikedo por poŝto --14" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:39 +msgid "Mailing Labels-2 columns" +msgstr "Etikedo por poŝto kun 2 kolumnoj" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:41 +msgid "Mailing Labels-3 columns" +msgstr "Etikedo por poŝto kun 3 kolumnoj" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:46 +msgid "Video Labels (face only)" +msgstr "Etikedoj por video (nur frontispico)" + +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "Kreu etikedojn, vizitkartojn kaj kovrilojn de plurmediaĵoj" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "gLabels Designer di etichetta" + +#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "Dosiero de Projekto de gLabels" + diff --git a/po/es.po b/po/es.po new file mode 100644 index 00000000..9dc7ad40 --- /dev/null +++ b/po/es.po @@ -0,0 +1,2565 @@ +# Spanish translation of glabels. +# sergio rivadero , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: glabels 2.1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-01-22 14:03-0500\n" +"PO-Revision-Date: 2005-02-12 12:19-0300\n" +"Last-Translator: sergio rivadero \n" +"Language-Team: Spanish/Spain \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/glabels.c:116 +msgid "Could not initialize Bonobo!\n" +msgstr "No se puede inicializar Bonobo!\n" + +#: src/glabels-batch.c:52 +msgid "print this message" +msgstr "imprimir este mensaje" + +#: src/glabels-batch.c:54 +msgid "print the version of glabels-batch being used" +msgstr "imprimir la versión utilizada de glabels-batch" + +#: src/glabels-batch.c:56 +msgid "set output filename (default=\"output.ps\")" +msgstr "establecer nombre de archivo (predeterminado=\"output.ps\")" + +#: src/glabels-batch.c:56 src/glabels-batch.c:70 +msgid "filename" +msgstr "nombre de archivo" + +#: src/glabels-batch.c:58 +msgid "number of sheets (default=1)" +msgstr "número de hojas (predeterminado=1)" + +#: src/glabels-batch.c:58 +msgid "sheets" +msgstr "hojas" + +#: src/glabels-batch.c:60 +msgid "number of copies (default=1)" +msgstr "número de copias (predeterminado=1)" + +#: src/glabels-batch.c:60 +msgid "copies" +msgstr "copias" + +#: src/glabels-batch.c:62 +msgid "first label on first sheet (default=1)" +msgstr "primera etiqueta en primera hoja (predeterminado=1)" + +#: src/glabels-batch.c:62 +msgid "first" +msgstr "primero" + +#: src/glabels-batch.c:64 src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "imprimir un esbozo (para verificar la alineación de la impresora)" + +#: src/glabels-batch.c:66 src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "impresión invertida (imagen espejo)" + +#: src/glabels-batch.c:68 src/print-dialog.c:351 +msgid "print crop marks" +msgstr "imprimir marcas de corte" + +#: src/glabels-batch.c:70 +msgid "input file for merging" +msgstr "archivo de entrada para combinar" + +#: src/glabels-batch.c:107 +msgid "[OPTION...] GLABELS_FILE..." +msgstr "[OPCION...] archivo-glabels..." + +#: src/glabels-batch.c:127 +#, c-format +msgid "missing glabels file\n" +msgstr "archivo glabels perdido\n" + +#: src/glabels-batch.c:158 +#, c-format +msgid "cannot perform document merge with glabels file %s\n" +msgstr "No se puede combinar el archivo %s\n" + +#: src/glabels-batch.c:182 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "No se puede abrir el archivo %s\n" + +#: src/window.c:244 +msgid "(none) - gLabels" +msgstr "(sin nombre) - gLabels" + +#: src/window.c:414 +msgid "(modified)" +msgstr "(modificado)" + +#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 +msgid "_Select Mode" +msgstr "_Modo selección" + +#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 +msgid "_Text" +msgstr "_Texto" + +#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 +msgid "_Line" +msgstr "_Línea" + +#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 +msgid "_Box" +msgstr "_Rectangulo" + +#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 +msgid "_Ellipse" +msgstr "_Elipse" + +#: src/stock.c:70 data/ui/glabels-ui.xml.h:146 +msgid "_Image" +msgstr "_Imagen" + +#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 +msgid "Bar_code" +msgstr "_Código de barras" + +#: src/stock.c:72 +msgid "_Merge Properties" +msgstr "Propiedades de _fusión de datos" + +#: src/stock.c:73 +msgid "Object _Properties" +msgstr "Propiedades del objeto" + +#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 +msgid "Bring to _Front" +msgstr "Traer al _frente" + +#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 +msgid "Send to _Back" +msgstr "Enviar al f_ondo" + +#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 +msgid "Rotate _Left" +msgstr "Rotar a la _izquierda" + +#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 +msgid "Rotate _Right" +msgstr "Rotar a la _derecha" + +#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "Reflejar _horizontalmente" + +#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "Reflejar _verticalmente" + +#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 +msgid "_Lefts" +msgstr "A la _izquierda" + +#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 +msgid "_Rights" +msgstr "A la _derecha" + +#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 +msgid "_Centers" +msgstr "_Centrado" + +#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 +msgid "_Tops" +msgstr "_Superior" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "_Inferior" + +#: src/stock.c:85 +msgid "Centers" +msgstr "_Centrado" + +#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "Centro de la _etiqueta" + +#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "Color de relleno" + +#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "Color de línea" + +#: src/stock.c:90 src/stock.c:92 +msgid "Linked" +msgstr "Enlazado" + +#: src/stock.c:91 src/stock.c:93 +msgid "Not Linked" +msgstr "No enlazado" + +#: src/ui-property-bar.c:345 src/object-editor.c:587 +msgid "Default" +msgstr "Predeterminado" + +#: src/ui-property-bar.c:360 src/object-editor.c:600 +msgid "No fill" +msgstr "Sin relleno" + +#: src/ui-property-bar.c:375 src/object-editor.c:593 +msgid "No line" +msgstr "Sin línea" + +#: src/ui-sidebar.c:180 +msgid "Object properties" +msgstr "Propiedades del objeto" + +#: src/commands.c:385 +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 programa de creación de etiquetas y tarjetas para GNOME.\n" +" \n" +"Glabels es software libre; Puede modificarlo y redistribuirlo bajo los " +"términos de la Licencia Pública General de GNU tal como es publicada por la " +"Free Software Foundation; ya sea la versión 2 de dicha licencia, o (a su " +"opción) cualquier otra versión posterior.\n" +" \n" +"Este programa se distribuye con la esperanza que le será útil, pero SIN " +"NINGUNA GARANTÍA; Para más detalles vea la Licencia Pública General de GNU.\n" + +#: src/commands.c:399 +msgid "See the file AUTHORS for additional credits," +msgstr "Vea el archivo AUTHORS, " + +#: src/commands.c:400 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "o visite http://glabels.sourceforge.net/" + +#: src/commands.c:409 +msgid " " +msgstr " " + +#: src/commands.c:424 +msgid "glabels" +msgstr "glabels" + +#: src/file.c:100 +msgid "New Label or Card" +msgstr "Nueva etiqueta o tarjeta" + +#: src/file.c:132 src/file.c:304 +msgid "Media Type" +msgstr "Tipo de papel" + +#: src/file.c:138 src/file.c:310 +msgid "Label orientation" +msgstr "Orientación de la etiqueta" + +#: src/file.c:269 +msgid "Label properties" +msgstr "Propiedades de la etiqueta" + +#: src/file.c:452 src/file.c:870 +msgid "All files" +msgstr "Todos los archivos" + +#: src/file.c:457 src/file.c:875 +msgid "gLabels documents" +msgstr "Documentos glabels" + +#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 +msgid "Empty file name selection" +msgstr "Vaciar selección de nombre de archivo" + +#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 +msgid "Please select a file or supply a valid file name" +msgstr "Por favor seleccione un archivo o escriba un nombre de archivo válido" + +#: src/file.c:519 src/file.c:631 +msgid "File does not exist" +msgstr "Archivo no existe" + +#: src/file.c:563 data/ui/glabels-ui.xml.h:74 +msgid "Open" +msgstr "Abrir" + +#: src/file.c:565 +msgid "Open label" +msgstr "Abrir etiqueta" + +#: src/file.c:707 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "No se puede abrir el archivo \"%s\"" + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "Formato de archivo no soportado" + +#: src/file.c:797 src/file.c:979 src/file.c:1174 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "No se puede guardar el archivo \"%s\"" + +#: src/file.c:805 src/file.c:987 src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "Se encontró un error al guardar. El archivo aún no está guardado." + +#: src/file.c:848 src/file.c:1048 +#, c-format +msgid "Save \"%s\" as" +msgstr "Guardar como \"%s\"" + +#: src/file.c:935 src/file.c:1131 +msgid "Please supply a valid file name" +msgstr "Debe proporcionar un nombre de archivo válido" + +#: src/file.c:952 src/file.c:1147 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "Sobreescribir el archivo \"%s\"?" + +#: src/file.c:960 src/file.c:1155 +msgid "File already exists." +msgstr "El archivo ya existe." + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "Guardar cambios del documento \"%s\" antes de cerrar?" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "Sus cambios se perderán si no los guarda." + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "Cerrar sin guardar" + +#. Should not happen +#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 +#: data/glade/object-editor.glade.h:37 +msgid "points" +msgstr "puntos" + +#: src/prefs.c:158 data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "pulgadas" + +#: src/prefs.c:160 +msgid "mm" +msgstr "mm" + +#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 +msgid "gLabels Preferences" +msgstr "Preferencias de gLabels" + +#. +#. * Submenu: Order +#. +#: src/view.c:3574 data/ui/glabels-ui.xml.h:154 +msgid "_Order" +msgstr "Or_den" + +#. +#. * Submenu: Rotate/Flip +#. +#: src/view.c:3595 data/ui/glabels-ui.xml.h:160 +msgid "_Rotate/Flip" +msgstr "_Rotar/Reflejar" + +#. +#. * Submenu: Align Horizontally +#. +#: src/view.c:3628 +msgid "Align _Horizontally" +msgstr "Alinear _horizontalmente" + +#. +#. * Submenu: Align Vertically +#. +#: src/view.c:3667 +msgid "Align _Vertically" +msgstr "Alinear _verticalmente" + +#: src/view.c:3728 data/ui/glabels-ui.xml.h:137 +msgid "_Delete" +msgstr "_Borrar" + +#. Build editor. +#: src/view-box.c:236 +msgid "Box object properties" +msgstr "Propiedades del rectángulo" + +#. Build editor. +#: src/view-ellipse.c:236 +msgid "Ellipse object properties" +msgstr "Propiedades del elipse" + +#. Build editor. +#: src/view-line.c:229 +msgid "Line object properties" +msgstr "Propiedades de la línea" + +#. Build editor. +#: src/view-image.c:223 +msgid "Image object properties" +msgstr "Propiedades de la imagen" + +#. Build editor. +#: src/view-text.c:251 +msgid "Text object properties" +msgstr "Propiedades del texto" + +#: src/view-text.c:571 data/glade/object-editor.glade.h:28 +msgid "Text" +msgstr "Texto" + +#. Build editor. +#: src/view-barcode.c:210 +msgid "Barcode object properties" +msgstr "Propiedades del código de barras" + +#: src/view-barcode.c:594 src/print.c:1125 +msgid "Invalid barcode data" +msgstr "Datos de código de barras no válidos" + +#: src/merge-properties-dialog.c:231 +msgid "Merge Properties" +msgstr "Propiedades de combinación de datos" + +#. ---- Source section ---- +#: src/merge-properties-dialog.c:237 +msgid "Source" +msgstr "Fuente" + +#: src/merge-properties-dialog.c:245 +msgid "Format:" +msgstr "Formato:" + +#. Location line +#: src/merge-properties-dialog.c:273 +msgid "Location:" +msgstr "Ubicación:" + +#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 +msgid "Select merge-database source" +msgstr "Seleccione la fuente de datos para combinar" + +#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 +msgid "N/A" +msgstr "N/D" + +#. ---- Sample Fields section ---- +#: src/merge-properties-dialog.c:300 +msgid "Record selection/preview:" +msgstr "Selección de registros/Vista previa" + +#: src/merge-properties-dialog.c:326 +msgid "Select" +msgstr "Seleccionar" + +#: src/merge-properties-dialog.c:334 +msgid "Record/Field" +msgstr "Registro/Campo" + +#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 +msgid "Data" +msgstr "Datos" + +#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:81 +msgid "Print" +msgstr "Imprimir" + +#: src/print-dialog.c:281 +msgid "_Job" +msgstr "_Trabajo" + +#: src/print-dialog.c:286 +msgid "P_rinter" +msgstr "_Impresora" + +#. ----------- Add simple-copies widget ------------ +#: src/print-dialog.c:314 +msgid "Copies" +msgstr "Copias" + +#. ------- Add merge control widget ------------ +#: src/print-dialog.c:322 +msgid "Document merge control" +msgstr "Control de combinación de documentos" + +#. ----------- Add custom print options area ------------ +#: src/print-dialog.c:330 +msgid "Options" +msgstr "Opciones" + +#: src/print-dialog.c:553 src/print-dialog.c:592 +msgid "Print preview" +msgstr "Previsualizar la impresión" + +#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 +msgid "gLabels Template Designer" +msgstr "Diseñador de plantillas gLabels" + +#: src/bc.c:60 +msgid "POSTNET (any)" +msgstr "POSTNET (cualquiera)" + +#: src/bc.c:63 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (solo código postal)" + +#: src/bc.c:66 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (código postal+4)" + +#: src/bc.c:69 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: src/bc.c:72 +msgid "EAN (any)" +msgstr "EAN (cualquiera)" + +#: src/bc.c:75 +msgid "EAN-8" +msgstr "EAN-8" + +#: src/bc.c:78 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: src/bc.c:81 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: src/bc.c:84 +msgid "EAN-13" +msgstr "EAN-13" + +#: src/bc.c:87 +msgid "EAN-13 +2" +msgstr "EAN-13 2" + +#: src/bc.c:90 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: src/bc.c:93 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A o UPC-E)" + +#: src/bc.c:96 +msgid "UPC-A" +msgstr "UPC-A" + +#: src/bc.c:99 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: src/bc.c:102 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: src/bc.c:105 +msgid "UPC-E" +msgstr "UPC-E" + +#: src/bc.c:108 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: src/bc.c:111 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: src/bc.c:114 +msgid "ISBN" +msgstr "ISBN" + +#: src/bc.c:117 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: src/bc.c:120 +msgid "Code 39" +msgstr "Code 39" + +#: src/bc.c:123 +msgid "Code 128" +msgstr "Code 128" + +#: src/bc.c:126 +msgid "Code 128C" +msgstr "Code 128C" + +#: src/bc.c:129 +msgid "Code 128B" +msgstr "Code 128B" + +#: src/bc.c:132 +msgid "Interleaved 2 of 5" +msgstr "Intercalado 2 de 5" + +#: src/bc.c:135 +msgid "Codabar" +msgstr "Codabar" + +#: src/bc.c:138 +msgid "MSI" +msgstr "MSI" + +#: src/bc.c:141 +msgid "Plessey" +msgstr "Plessey" + +#: src/label.c:569 +msgid "Untitled" +msgstr "Sin título" + +#: src/xml-label.c:176 src/xml-label.c:213 +msgid "xmlParseFile error" +msgstr "error xmlParseFile" + +#: src/xml-label.c:250 +msgid "No document root" +msgstr "No hay documento raíz" + +#: src/xml-label.c:264 +msgid "Importing from glabels 0.1 format" +msgstr "Importando desde formato glabels 0.1" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "Importando desde formato glabels 0.4" + +#: src/xml-label.c:279 +msgid "Importing from glabels 1.91 format" +msgstr "Importando desde formato glabels 1.91" + +#: src/xml-label.c:282 +msgid "bad document, unknown glabels Namespace" +msgstr "documento de tipo erróneo, etiquetas glabels no encontradas" + +#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "Nodo raíz erróneo = \"%s\"" + +#: src/xml-label.c:348 src/xml-label-191.c:165 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "Nodo erróneo en sección Document = \"%s\"" + +#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "Nodo erróneo = \"%s\"" + +#: src/xml-label.c:855 src/xml-label-191.c:624 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "Nodo erróneo en sección Data = \"%s\"" + +#: src/xml-label.c:1030 libglabels/xml-template.c:535 +msgid "Utf8 conversion error." +msgstr "Conversión UTF-8 errónea" + +#: src/xml-label.c:1037 libglabels/xml-template.c:542 +msgid "Problem saving xml file." +msgstr "Problemas al guardar archivo xml" + +#. This should always be an id, but just in case a name +#. slips by! +#: src/xml-label-191.c:699 libglabels/xml-template.c:199 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "Código \"%s\" de tamaño de página desconocido, intentando como nombre." + +#: src/xml-label-191.c:709 libglabels/xml-template.c:209 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "Código \"%s\" o nombre de página desconocido" + +#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 +msgid "None" +msgstr "Ninguno" + +#: src/merge-init.c:53 +msgid "Text file with comma delimeters (CSV)" +msgstr "Texto separado con comas" + +#: src/merge-init.c:60 +msgid "Text file with colon delimeters" +msgstr "Texto separado con dos puntos" + +#: src/merge-init.c:67 +msgid "Text file with tab delimeters" +msgstr "Texto separado con tabuladores" + +#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 +msgid "File:" +msgstr "Archivo:" + +#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 +msgid "Key:" +msgstr "Clave:" + +#: src/wdgt-print-copies.c:179 +msgid "Sheets:" +msgstr "Hojas:" + +#: src/wdgt-print-copies.c:197 +msgid "Labels" +msgstr "Etiquetas" + +#: src/wdgt-print-copies.c:200 +msgid "from:" +msgstr "desde:" + +#: src/wdgt-print-copies.c:207 +msgid "to:" +msgstr "hasta:" + +#: src/wdgt-print-merge.c:178 +msgid "Start on label" +msgstr "Comenzar en la etiqueta" + +#: src/wdgt-print-merge.c:186 +msgid "on 1st sheet" +msgstr "en la primera hoja" + +#: src/wdgt-print-merge.c:195 +msgid "Copies:" +msgstr "Copias:" + +#: src/wdgt-print-merge.c:201 +msgid "Collate" +msgstr "Intercalar" + +#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 +msgid "Description:" +msgstr "Descripción:" + +#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 +msgid "Page size:" +msgstr "Tamaño de la página:" + +#: src/wdgt-media-select.c:290 +msgid "Label size:" +msgstr "Tamaño de la etiqueta:" + +#: src/wdgt-media-select.c:301 +msgid "Layout:" +msgstr "Disposición:" + +#: src/wdgt-media-select.c:578 +#, c-format +msgid "%d x %d (%d per sheet)" +msgstr "%d x %d (%d por hoja)" + +#: src/wdgt-media-select.c:582 +#, c-format +msgid "%d per sheet" +msgstr "%d por hoja" + +#: src/wdgt-media-select.c:614 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: src/wdgt-media-select.c:619 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 +#, c-format +msgid "%s %s diameter" +msgstr "Diámetro %s %s" + +#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 +#, c-format +msgid "%.5g %s diameter" +msgstr "Diámetro %.5g %s" + +#: src/wdgt-rotate-label.c:193 +msgid "Rotate" +msgstr "Rotar" + +#. This is the default custom color +#: src/mygal/color-palette.c:396 +msgid "custom" +msgstr "personalizado" + +#. "Custom" color - we'll pop up a GnomeColorPicker +#: src/mygal/color-palette.c:438 +msgid "Custom Color:" +msgstr "Color personalizado:" + +#: src/mygal/color-palette.c:446 +msgid "Choose Custom Color" +msgstr "Elegir color:" + +#: src/mygal/color-palette.c:579 +msgid "black" +msgstr "negro" + +#: src/mygal/color-palette.c:580 +msgid "light brown" +msgstr "marrón" + +#: src/mygal/color-palette.c:581 +msgid "brown gold" +msgstr "marrón oscuro" + +#: src/mygal/color-palette.c:582 +msgid "dark green #2" +msgstr "verde oscuro #2" + +#: src/mygal/color-palette.c:583 +msgid "navy" +msgstr "azul metalizado" + +#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 +msgid "dark blue" +msgstr "azul muy oscuro" + +#: src/mygal/color-palette.c:585 +msgid "purple #2" +msgstr "azul oscuro" + +#: src/mygal/color-palette.c:586 +msgid "very dark gray" +msgstr "verde muy oscuro" + +#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 +msgid "dark red" +msgstr "rojo oscuro" + +#: src/mygal/color-palette.c:590 +msgid "red-orange" +msgstr "anaranjado" + +#: src/mygal/color-palette.c:591 +msgid "gold" +msgstr "marrón claro" + +#: src/mygal/color-palette.c:592 +msgid "dark green" +msgstr "verde oscuro" + +#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 +msgid "dull blue" +msgstr "verde azulado" + +#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 +msgid "blue" +msgstr "azul" + +#: src/mygal/color-palette.c:595 +msgid "dull purple" +msgstr "violeta azulado" + +#: src/mygal/color-palette.c:596 +msgid "dark grey" +msgstr "gris oscuro" + +#: src/mygal/color-palette.c:599 +msgid "red" +msgstr "rojo" + +#: src/mygal/color-palette.c:600 +msgid "orange" +msgstr "naranja" + +#: src/mygal/color-palette.c:601 +msgid "lime" +msgstr "lima" + +#: src/mygal/color-palette.c:602 +msgid "dull green" +msgstr "verde opaco" + +#: src/mygal/color-palette.c:603 +msgid "dull blue #2" +msgstr "cyan" + +#: src/mygal/color-palette.c:604 +msgid "sky blue #2" +msgstr "celeste" + +#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 +msgid "purple" +msgstr "violeta" + +#: src/mygal/color-palette.c:606 +msgid "gray" +msgstr "gris" + +#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 +msgid "magenta" +msgstr "fucsia" + +#: src/mygal/color-palette.c:610 +msgid "bright orange" +msgstr "naranja claro" + +#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 +msgid "yellow" +msgstr "amarillo" + +#: src/mygal/color-palette.c:612 +msgid "green" +msgstr "verde" + +#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 +msgid "cyan" +msgstr "turquesa" + +#: src/mygal/color-palette.c:614 +msgid "bright blue" +msgstr "azul claro" + +#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 +msgid "red purple" +msgstr "borravino" + +#: src/mygal/color-palette.c:616 +msgid "light grey" +msgstr "gris claro" + +#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 +msgid "pink" +msgstr "rosa" + +#: src/mygal/color-palette.c:620 +msgid "light orange" +msgstr "naranja claro" + +#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 +msgid "light yellow" +msgstr "amarillo claro" + +#: src/mygal/color-palette.c:622 +msgid "light green" +msgstr "verde claro" + +#: src/mygal/color-palette.c:623 +msgid "light cyan" +msgstr "turquesa claro" + +#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 +msgid "light blue" +msgstr "celeste claro" + +#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 +msgid "light purple" +msgstr "violeta claro" + +#: src/mygal/color-palette.c:626 +msgid "white" +msgstr "blanco" + +#: src/mygal/color-palette.c:631 +msgid "purplish blue" +msgstr "azul purpurado" + +#: src/mygal/color-palette.c:635 +msgid "dark purple" +msgstr "violeta oscuro" + +#: src/mygal/color-palette.c:637 +msgid "sky blue" +msgstr "celeste" + +#: libglabels/template.c:848 +#, c-format +msgid "Generic %s full page" +msgstr "Página completa genérica %s" + +#: libglabels/template.c:897 +msgid "No template files found!" +msgstr "No se encontraron archivos de plantilla!" + +#. Create and append an "Other" entry. +#: libglabels/paper.c:67 +msgid "Other" +msgstr "Otros" + +#: libglabels/paper.c:361 +msgid "No paper files found!" +msgstr "No se encontró tipo de papel!" + +#: data/ui/glabels-ui.xml.h:1 +msgid "About glabels" +msgstr "Acerca de glabels" + +#: data/ui/glabels-ui.xml.h:2 +msgid "About..." +msgstr "Acerca de..." + +#: data/ui/glabels-ui.xml.h:3 +msgid "Align _Horizontal" +msgstr "Alineado _horizontal" + +#: data/ui/glabels-ui.xml.h:4 +msgid "Align _Vertical" +msgstr "Alineado _vertical" + +#: data/ui/glabels-ui.xml.h:5 +msgid "Align objects to bottoms" +msgstr "Alinear objetos por su parte inferior" + +#: data/ui/glabels-ui.xml.h:6 +msgid "Align objects to horizontal centers" +msgstr "Alinear objetos por su centro" + +#: data/ui/glabels-ui.xml.h:7 +msgid "Align objects to left edges" +msgstr "Alinear objetos por su lado izquierdo" + +#: data/ui/glabels-ui.xml.h:8 +msgid "Align objects to right edges" +msgstr "Alinear objetos por su lado derecho" + +#: data/ui/glabels-ui.xml.h:9 +msgid "Align objects to tops" +msgstr "Alinear objetos por su parte superior" + +#: data/ui/glabels-ui.xml.h:10 +msgid "Align objects to vertical centers" +msgstr "Alinear objetos por su centro" + +#: data/ui/glabels-ui.xml.h:12 +msgid "Bold" +msgstr "Negrita" + +#: data/ui/glabels-ui.xml.h:14 +msgid "Center align" +msgstr "Centrado" + +#: data/ui/glabels-ui.xml.h:15 +msgid "Center objects to horizontal label center" +msgstr "Centrar objetos con el centro horizontal de la etiqueta" + +#: data/ui/glabels-ui.xml.h:16 +msgid "Center objects to vertical label center" +msgstr "Centrar objetos con el centro vertical de la etiqueta" + +#: data/ui/glabels-ui.xml.h:17 +msgid "Change the visibility of markup lines in the current window" +msgstr "Cambiar la visibilidad de los márgenes" + +#: data/ui/glabels-ui.xml.h:18 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "Cambiar la visibilidad de la barra de dibujo" + +#: data/ui/glabels-ui.xml.h:19 +msgid "Change the visibility of the grid in the current window" +msgstr "Cambiar la visibilidad de la grilla" + +#: data/ui/glabels-ui.xml.h:20 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "Cambiar la visibilidad de la barra principal" + +#: data/ui/glabels-ui.xml.h:21 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "Cambiar la visibilidad de la barra de propiedades" + +#: data/ui/glabels-ui.xml.h:22 +msgid "Close" +msgstr "Cerrar" + +#: data/ui/glabels-ui.xml.h:23 +msgid "Close the current file" +msgstr "Guardar el archivo en uso" + +#: data/ui/glabels-ui.xml.h:24 +msgid "Configure the application" +msgstr "Configurar aplicación" + +#: data/ui/glabels-ui.xml.h:25 +msgid "Contents" +msgstr "Contenido" + +#: data/ui/glabels-ui.xml.h:26 +msgid "Copy" +msgstr "Copiar" + +#: data/ui/glabels-ui.xml.h:27 +msgid "Copy the selection" +msgstr "Copiar la selección" + +#: data/ui/glabels-ui.xml.h:28 +msgid "Create a custom template" +msgstr "Crear una plantilla personalizada" + +#: data/ui/glabels-ui.xml.h:29 +msgid "Create a new document" +msgstr "Crear un nuevo documento" + +#: data/ui/glabels-ui.xml.h:30 +msgid "Create barcode object" +msgstr "Crear un objeto código de barras" + +#: data/ui/glabels-ui.xml.h:31 +msgid "Create box/rectangle object" +msgstr "Crear un cuadrado o rectángulo" + +#: data/ui/glabels-ui.xml.h:32 +msgid "Create ellipse/circle object" +msgstr "Crear un círculo o elipse" + +#: data/ui/glabels-ui.xml.h:33 +msgid "Create image object" +msgstr "Crear una imagen" + +#: data/ui/glabels-ui.xml.h:34 +msgid "Create line object" +msgstr "Crear una línea" + +#: data/ui/glabels-ui.xml.h:35 +msgid "Create text object" +msgstr "Crear un cuadro de texto" + +#: data/ui/glabels-ui.xml.h:36 +msgid "Cu_t" +msgstr "Cor_tar" + +#: data/ui/glabels-ui.xml.h:37 +msgid "Customize" +msgstr "Personalizar" + +#: data/ui/glabels-ui.xml.h:38 +msgid "Customize Drawing Toolbar" +msgstr "Personalizar barra de dibujo" + +#: data/ui/glabels-ui.xml.h:39 +msgid "Customize Main Toolbar" +msgstr "Personalizar barra principal" + +#: data/ui/glabels-ui.xml.h:40 +msgid "Customize Property Toolbar" +msgstr "Personalizar barra de propiedades" + +#: data/ui/glabels-ui.xml.h:41 +msgid "Customize toolbars" +msgstr "Personalizar barras de herramientas" + +#: data/ui/glabels-ui.xml.h:42 +msgid "Cut" +msgstr "Cortar" + +#: data/ui/glabels-ui.xml.h:43 +msgid "Cut the selection" +msgstr "Cortar la selección" + +#: data/ui/glabels-ui.xml.h:44 +msgid "Decrease magnification" +msgstr "Reducir escala" + +#: data/ui/glabels-ui.xml.h:45 +msgid "Delete" +msgstr "Borrar" + +#: data/ui/glabels-ui.xml.h:46 +msgid "Delete the selected objects" +msgstr "Borrar los objetos seleccionados" + +#: data/ui/glabels-ui.xml.h:47 +msgid "Drawing toolbar" +msgstr "Barra de dibujo" + +#: data/ui/glabels-ui.xml.h:48 +msgid "Dump XML" +msgstr "Volcar XML" + +#: data/ui/glabels-ui.xml.h:49 +msgid "Dump the UI Xml description" +msgstr "Volcar la descripción UI XML" + +#: data/ui/glabels-ui.xml.h:50 +msgid "Edit merge properties" +msgstr "Editar propiedades de combinación de datos" + +#: data/ui/glabels-ui.xml.h:54 +msgid "Flip object horizontally" +msgstr "Reflejar objeto horizontalmente" + +#: data/ui/glabels-ui.xml.h:55 +msgid "Flip object vertically" +msgstr "Reflejar objeto verticalmente" + +#: data/ui/glabels-ui.xml.h:56 +msgid "Font name" +msgstr "Fuente" + +#: data/ui/glabels-ui.xml.h:57 +msgid "Font selector" +msgstr "Selección de fuentes" + +#: data/ui/glabels-ui.xml.h:58 +msgid "Font size" +msgstr "Tamaño de fuente" + +#: data/ui/glabels-ui.xml.h:59 +msgid "Icon and _Text" +msgstr "Icono y _texto" + +#: data/ui/glabels-ui.xml.h:60 +msgid "Increase magnification" +msgstr "Aumentar escala" + +#: data/ui/glabels-ui.xml.h:61 +msgid "Italic" +msgstr "Itálica" + +#: data/ui/glabels-ui.xml.h:63 +msgid "Left align" +msgstr "Alineación izquierda" + +#: data/ui/glabels-ui.xml.h:65 +msgid "Line width" +msgstr "Ancho de línea" + +#: data/ui/glabels-ui.xml.h:66 +msgid "Lower object to bottom" +msgstr "Llevar objeto al fondo" + +#: data/ui/glabels-ui.xml.h:67 +msgid "M_arkup" +msgstr "_Margen" + +#: data/ui/glabels-ui.xml.h:68 +msgid "Main toolbar" +msgstr "Barra principal" + +#: data/ui/glabels-ui.xml.h:69 +msgid "Markup" +msgstr "Margen" + +#: data/ui/glabels-ui.xml.h:70 +msgid "Modify document properties" +msgstr "Modificar las propiedades del documento" + +#: data/ui/glabels-ui.xml.h:71 +msgid "New" +msgstr "Nuevo" + +#: data/ui/glabels-ui.xml.h:72 +msgid "Object property editor" +msgstr "Editor de propiedades de objeto" + +#: data/ui/glabels-ui.xml.h:73 +msgid "Only show icons in the main toolbar" +msgstr "Sólo mostrar iconos en la barra principal" + +#: data/ui/glabels-ui.xml.h:75 +msgid "Open a file" +msgstr "Abrir un archivo" + +#: data/ui/glabels-ui.xml.h:76 +msgid "Open the glabels manual" +msgstr "Abrir el manual de glabels" + +#: data/ui/glabels-ui.xml.h:77 +msgid "Paste" +msgstr "Pegar" + +#: data/ui/glabels-ui.xml.h:78 +msgid "Paste the clipboard" +msgstr "Pegar desde portapapeles" + +#: data/ui/glabels-ui.xml.h:79 +msgid "Pr_eferences..." +msgstr "Pre_ferencias..." + +#: data/ui/glabels-ui.xml.h:80 +msgid "Preferences" +msgstr "Preferencias" + +#: data/ui/glabels-ui.xml.h:82 +msgid "Print the current file" +msgstr "Imprimir el archivo en uso" + +#: data/ui/glabels-ui.xml.h:83 +msgid "Proper_ties..." +msgstr "_Propiedades..." + +#: data/ui/glabels-ui.xml.h:84 +msgid "Properties" +msgstr "Propiedades" + +#: data/ui/glabels-ui.xml.h:85 +msgid "Property toolbar" +msgstr "Barra de propiedades" + +#: data/ui/glabels-ui.xml.h:86 +msgid "Quit" +msgstr "Salir" + +#: data/ui/glabels-ui.xml.h:87 +msgid "Quit the program" +msgstr "Salir del programa" + +#: data/ui/glabels-ui.xml.h:88 +msgid "Raise object to top" +msgstr "Traer al frente" + +#: data/ui/glabels-ui.xml.h:89 +msgid "Recent _Files" +msgstr "Archivos _recientes" + +#: data/ui/glabels-ui.xml.h:90 +msgid "Redo" +msgstr "Rehacer" + +#: data/ui/glabels-ui.xml.h:91 +msgid "Redo the undone action" +msgstr "Repetir la última acción" + +#: data/ui/glabels-ui.xml.h:92 +msgid "Remove all selections" +msgstr "Eliminar todas las selecciones" + +#: data/ui/glabels-ui.xml.h:94 +#, no-c-format +msgid "Restore scale to 100%" +msgstr "Restablecer escala al 100%" + +#: data/ui/glabels-ui.xml.h:95 +msgid "Right align" +msgstr "Alineación derecha" + +#: data/ui/glabels-ui.xml.h:98 +msgid "Rotate object 90 clockwise" +msgstr "Rotar 90 grados a la derecha" + +#: data/ui/glabels-ui.xml.h:99 +msgid "Rotate object 90 counter-clockwise" +msgstr "Rotar 90 grados a la izquierda" + +#: data/ui/glabels-ui.xml.h:100 +msgid "Save" +msgstr "Guardar" + +#: data/ui/glabels-ui.xml.h:101 +msgid "Save As" +msgstr "Guardar como" + +#: data/ui/glabels-ui.xml.h:102 +msgid "Save _As..." +msgstr "Guardar _como..." + +#: data/ui/glabels-ui.xml.h:103 +msgid "Save the current file" +msgstr "Guardar el archivo en uso" + +#: data/ui/glabels-ui.xml.h:104 +msgid "Save the current file with a different name" +msgstr "Guardar archivo con otro nombre" + +#: data/ui/glabels-ui.xml.h:105 +msgid "Select All" +msgstr "_Deseleccionar todo" + +#: data/ui/glabels-ui.xml.h:106 +msgid "Select _All" +msgstr "Seleccionar t_odo" + +#: data/ui/glabels-ui.xml.h:107 +msgid "Select all objects" +msgstr "Seleccionar todos los objetos" + +#: data/ui/glabels-ui.xml.h:108 +msgid "Select, move and modify objects" +msgstr "Seleccionar, mover y modificar objetos" + +#: data/ui/glabels-ui.xml.h:110 +msgid "Set main toolbar button style according to desktop default" +msgstr "" +"Establecer apariencia de la barra principal según estilo predeterminado del " +"escitorio" + +#: data/ui/glabels-ui.xml.h:111 +msgid "Show _Tooltips" +msgstr "Mostrar indicadores" + +#: data/ui/glabels-ui.xml.h:112 +msgid "Show both icons and texts in the main toolbar" +msgstr "Mostrar iconos y texto en la barra principal" + +#: data/ui/glabels-ui.xml.h:113 +msgid "Show tooltips in the drawing toolbar" +msgstr "Mostrar indicadores en la barra de dibujo" + +#: data/ui/glabels-ui.xml.h:114 +msgid "Show tooltips in the main toolbar" +msgstr "Mostrar indicadores en la barra principal" + +#: data/ui/glabels-ui.xml.h:115 +msgid "Show tooltips in the property toolbar" +msgstr "Mostrar indicadores en la barra de propiedades" + +#: data/ui/glabels-ui.xml.h:116 +msgid "Template Designer" +msgstr "Diseñador de plantillas" + +#: data/ui/glabels-ui.xml.h:117 +msgid "Template _Designer..." +msgstr "_Diseñador de plantillas" + +#: data/ui/glabels-ui.xml.h:118 +msgid "Text color" +msgstr "Color de texto" + +#: data/ui/glabels-ui.xml.h:119 +msgid "U_n-select All" +msgstr "_Deseleccionar todo" + +#: data/ui/glabels-ui.xml.h:120 +msgid "Un-select All" +msgstr "Deseleccionar todo" + +#: data/ui/glabels-ui.xml.h:121 +msgid "Undo" +msgstr "Deshacer" + +#: data/ui/glabels-ui.xml.h:122 +msgid "Undo the last action" +msgstr "Deshcar la última acción" + +#: data/ui/glabels-ui.xml.h:123 +msgid "Zoom _1:1" +msgstr "Escala _1:1" + +#: data/ui/glabels-ui.xml.h:124 +msgid "Zoom _In" +msgstr "_Ampliar" + +#: data/ui/glabels-ui.xml.h:125 +msgid "Zoom _Out" +msgstr "_Reducir" + +#: data/ui/glabels-ui.xml.h:126 +msgid "Zoom to _fit" +msgstr "A_justar" + +#: data/ui/glabels-ui.xml.h:127 +msgid "Zoom to fit window" +msgstr "Ampliar hasta ajustar" + +#: data/ui/glabels-ui.xml.h:128 +msgid "_About..." +msgstr "_Acerca de..." + +# REVISAR +#: data/ui/glabels-ui.xml.h:129 +msgid "_Bottoms" +msgstr "" + +#: data/ui/glabels-ui.xml.h:132 +msgid "_Close" +msgstr "_Cerrar" + +#: data/ui/glabels-ui.xml.h:133 +msgid "_Contents" +msgstr "_Contenido" + +#: data/ui/glabels-ui.xml.h:134 +msgid "_Copy" +msgstr "_Copiar" + +#: data/ui/glabels-ui.xml.h:135 +msgid "_Create Object" +msgstr "Crear _objeto" + +#: data/ui/glabels-ui.xml.h:136 +msgid "_Debug" +msgstr "_Depurar" + +#: data/ui/glabels-ui.xml.h:138 +msgid "_Desktop Default" +msgstr "_Predeterminado del escritorio" + +#: data/ui/glabels-ui.xml.h:139 +msgid "_Drawing Toolbar" +msgstr "Barra de dibujo" + +#: data/ui/glabels-ui.xml.h:140 +msgid "_Edit" +msgstr "_Editar" + +#: data/ui/glabels-ui.xml.h:142 +msgid "_File" +msgstr "_Archivo" + +#: data/ui/glabels-ui.xml.h:143 +msgid "_Grid" +msgstr "_Grilla" + +#: data/ui/glabels-ui.xml.h:144 +msgid "_Help" +msgstr "A_yuda" + +#: data/ui/glabels-ui.xml.h:145 +msgid "_Icon" +msgstr "_Icono" + +#: data/ui/glabels-ui.xml.h:149 +msgid "_Main Toolbar" +msgstr "Barra principal" + +#: data/ui/glabels-ui.xml.h:150 +msgid "_Merge Properties..." +msgstr "Propiedades de _combinación de datos" + +#: data/ui/glabels-ui.xml.h:151 +msgid "_New" +msgstr "_Nuevo" + +#: data/ui/glabels-ui.xml.h:152 +msgid "_Objects" +msgstr "_Objetos" + +#: data/ui/glabels-ui.xml.h:153 +msgid "_Open..." +msgstr "_Abrir..." + +#: data/ui/glabels-ui.xml.h:155 +msgid "_Paste" +msgstr "_Pegar" + +#: data/ui/glabels-ui.xml.h:156 +msgid "_Print..." +msgstr "_Imprimir" + +#: data/ui/glabels-ui.xml.h:157 +msgid "_Property Toolbar" +msgstr "Barra de propedades" + +#: data/ui/glabels-ui.xml.h:158 +msgid "_Quit" +msgstr "_Salir" + +#: data/ui/glabels-ui.xml.h:161 +msgid "_Save" +msgstr "_Guardar" + +#: data/ui/glabels-ui.xml.h:165 +msgid "_View" +msgstr "_Ver" + +#: data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr " " + +#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 +#: data/glade/template-designer.glade.h:5 +msgid "*" +msgstr "*" + +#: data/glade/prefs-dialog.glade.h:3 +msgid "Default page size" +msgstr "Tamaño de página predeterminado" + +#: data/glade/prefs-dialog.glade.h:4 +msgid "Fill" +msgstr "Relleno" + +#: data/glade/prefs-dialog.glade.h:5 +msgid "Line" +msgstr "Línea" + +#: data/glade/prefs-dialog.glade.h:6 +msgid "Text" +msgstr "Texto" + +#: data/glade/prefs-dialog.glade.h:7 +msgid "Units" +msgstr "Medidas" + +#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 +msgid "Alignment:" +msgstr "Alineación:" + +#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 +msgid "Color:" +msgstr "Color:" + +#: data/glade/prefs-dialog.glade.h:10 +msgid "Font:" +msgstr "Fuente:" + +#: data/glade/prefs-dialog.glade.h:11 +msgid "ISO A4" +msgstr "ISO A4" + +#: data/glade/prefs-dialog.glade.h:12 +msgid "Inches" +msgstr "Pulgadas" + +#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 +msgid "Line Spacing:" +msgstr "Espaciado:" + +#: data/glade/prefs-dialog.glade.h:14 +msgid "Locale" +msgstr "Documento" + +#: data/glade/prefs-dialog.glade.h:15 +msgid "Millimeters" +msgstr "Milímetros" + +#: data/glade/prefs-dialog.glade.h:16 +msgid "Object defaults" +msgstr "Objetos" + +#: data/glade/prefs-dialog.glade.h:17 +msgid "Points" +msgstr "Puntos" + +#: data/glade/prefs-dialog.glade.h:18 +msgid "Select default properties for new objects." +msgstr "Seleccione las propiedades predeterminadoas para los nuevos objetos." + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "Seleccione las propiedades del documento." + +#. Most popular (at top of list) +#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:29 +msgid "US Letter" +msgstr "Carta" + +#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 +#: data/glade/template-designer.glade.h:72 +msgid "Width:" +msgstr "Ancho:" + +#: data/glade/object-editor.glade.h:2 +msgid "00000000000 00000" +msgstr "00000000000 00000" + +#: data/glade/object-editor.glade.h:3 +msgid "Xxx object properties" +msgstr "" +"Propiedades de objecto xxx" + +#: data/glade/object-editor.glade.h:5 +msgid "Allow merge to automatically shrink text" +msgstr "Permitir ampliar texto automáticamente" + +#: data/glade/object-editor.glade.h:6 +msgid "Angle:" +msgstr "Ángulo:" + +#: data/glade/object-editor.glade.h:7 +msgid "Checksum" +msgstr "Verificación" + +#: data/glade/object-editor.glade.h:10 +msgid "Family:" +msgstr "Familia:" + +#: data/glade/object-editor.glade.h:12 +msgid "Fill" +msgstr "Relleno" + +#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 +msgid "Height:" +msgstr "Alto:" + +#: data/glade/object-editor.glade.h:14 +msgid "Image" +msgstr "Imagen" + +#: data/glade/object-editor.glade.h:15 +msgid "Insert merge field" +msgstr "Insertar campo para combinar" + +#: data/glade/object-editor.glade.h:17 +msgid "Length:" +msgstr "Longitud:" + +#: data/glade/object-editor.glade.h:18 +msgid "Line" +msgstr "Línea" + +#: data/glade/object-editor.glade.h:20 +msgid "Literal:" +msgstr "Literal:" + +#: data/glade/object-editor.glade.h:21 +msgid "Load image" +msgstr "Cargar imagen" + +#: data/glade/object-editor.glade.h:22 +msgid "Position" +msgstr "Posición" + +#: data/glade/object-editor.glade.h:23 +msgid "Reset image size" +msgstr "Restablecer el tamaño de la imagen" + +#: data/glade/object-editor.glade.h:24 +msgid "Size" +msgstr "Tamaño" + +#: data/glade/object-editor.glade.h:25 +msgid "Size:" +msgstr "Tamaño:" + +#: data/glade/object-editor.glade.h:26 +msgid "Style" +msgstr "Estilo" + +#: data/glade/object-editor.glade.h:27 +msgid "Style:" +msgstr "Estilo:" + +#: data/glade/object-editor.glade.h:30 +msgid "X:" +msgstr "X:" + +#: data/glade/object-editor.glade.h:31 +msgid "Y:" +msgstr "Y:" + +#: data/glade/object-editor.glade.h:32 +msgid "degrees" +msgstr "grados" + +#: data/glade/object-editor.glade.h:33 +msgid "dialog1" +msgstr "dialogo1" + +#: data/glade/object-editor.glade.h:34 +msgid "digits:" +msgstr "dígitos:" + +#: data/glade/object-editor.glade.h:35 +msgid "format:" +msgstr "Formato:" + +#: data/glade/template-designer.glade.h:1 +msgid " " +msgstr " " + +#: data/glade/template-designer.glade.h:2 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(por ej., \"Etiquetas para correo,\" \"Tarjetas de negocio,\" ...)" + +#: data/glade/template-designer.glade.h:3 +msgid "(e.g., 8163A)" +msgstr "(por ej., 8163A)" + +#: data/glade/template-designer.glade.h:4 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(por ej., Avery, Acme, ...)" + +#: data/glade/template-designer.glade.h:6 +msgid "1. Outer radius:" +msgstr "1. Radio externo:" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "1. Radio:" + +#: data/glade/template-designer.glade.h:8 +msgid "1. Width:" +msgstr "1. Ancho:" + +#: data/glade/template-designer.glade.h:9 +msgid "2. Height:" +msgstr "2. Alto:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "2. Radio interno:" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "2. Sobrante (sobreimpresión permitida):" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "3. Ancho de recorte:" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "3. Márgen" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "3. Redondez (radio de las esquinas)" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "4. Alto de recorte:" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "4. Sobrante horizontal (sobreimpresión permitida):" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "5. Sobrante vertical (sobreimpresión permitida):" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "5. Sobrante (sobreimpresión permitida):" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "6. Margen" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "Marca/Fabricante:" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD (incluyendo CD-tarjeta)" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"Fecilitaciones!\n" +" \n" +"Ha completado la plantilla.\n" +"Si desea guardar su diseño pulse en \"Aplicar\".\n" +" \n" +"Puede pulsar \"Cancelar\" para abandonar su diseño\n" +"o \"Atrás\" para volver a editarlo." + +#: data/glade/template-designer.glade.h:30 +msgid "Design Completed" +msgstr "Diseño completo" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "Distancia desde el borde izquierdo (x0):" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "Distancia desde el borde superior (y0):" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "Desplazamiento horizontal (dx):" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" +"¿Cuantas disposiciones tendrá su plantilla?\n" +"\n" +"Una disposición es un conjunto de etiquetas o tarjetas que se pueden ordenar " +"en una hoja.\n" +"La mayoría de las plantillas necesitan solo una disposición, como en el " +"primer ejemplo.\n" +"El segundo ejemplo muestra dos disposiciones." + +#: data/glade/template-designer.glade.h:40 +msgid "Label Size (CD/DVD)" +msgstr "Tamaño de etiqueta (CD/DVD)" + +#: data/glade/template-designer.glade.h:41 +msgid "Label Size (Round)" +msgstr "Tamaño de etiqueta (Redondeada):" + +#: data/glade/template-designer.glade.h:42 +msgid "Label or Card Shape" +msgstr "Forma de etiqueta o tarjeta" + +#: data/glade/template-designer.glade.h:43 +msgid "Label or Card Size (Rectangular)" +msgstr "Tamaño de etiqueta o tarjeta (rectangular)" + +#: data/glade/template-designer.glade.h:44 +msgid "Layout #1" +msgstr "Disposición 1:" + +#: data/glade/template-designer.glade.h:45 +msgid "Layout #2" +msgstr "Disposición 2:" + +#: data/glade/template-designer.glade.h:46 +msgid "Layout(s)" +msgstr "Disposicion(es):" + +#: data/glade/template-designer.glade.h:47 +msgid "Name and Description" +msgstr "Nombre y descripción:" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "Cantidad horizontal (nx):" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "Cantidad vertical (ny):" + +#: data/glade/template-designer.glade.h:50 +msgid "Number of Layouts" +msgstr "Cantidad de disposiciones" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "Cantidad de disposiciones:" + +#: data/glade/template-designer.glade.h:52 +msgid "Page Size" +msgstr "Tamaño de la página" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "Número de parte:" + +#: data/glade/template-designer.glade.h:55 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "" +"Por favor ingrese la siguiente información que identifique la plantilla." + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "Por favor ingrese la siguiente información sobre la disposición." + +#: data/glade/template-designer.glade.h:57 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "Por favor ingrese las medidas de cada etiqueta de su plantilla." + +#: data/glade/template-designer.glade.h:58 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" +"Por favor ingrese los siguientes parámetros de tamaño para cada etiqueta en " +"su plantilla." + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "Por favor seleccione la forma básica de las etiquetas o tarjetas." + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "Por favor seleccione el tamaño de la página para la plantilla." + +#: data/glade/template-designer.glade.h:61 +msgid "Print test sheet" +msgstr "Imprimir página de prueba" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "Rectangular o cuadrada (puede tener bordes redondeados)" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "Redonda" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"Plantillas que necesitan\n" +"dos disposiciones." + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"Plantillas que necesitan\n" +"una disposición." + +#: data/glade/template-designer.glade.h:68 +msgid "Vertical pitch (dy):" +msgstr "Desplazamiento vertical (dy):" + +#: data/glade/template-designer.glade.h:69 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"Bienvenido al diseñador de plantillas de gLabels.\n" +"\n" +"Este diálogo le asistirá en la creación de una plantilla personalizada." + +#. Other ISO A series sizes +#: data/templates/paper-sizes.xml.h:2 +msgid "A0" +msgstr "A0" + +#: data/templates/paper-sizes.xml.h:3 +msgid "A1" +msgstr "A1" + +#: data/templates/paper-sizes.xml.h:4 +msgid "A10" +msgstr "A10" + +#: data/templates/paper-sizes.xml.h:5 +msgid "A2" +msgstr "A2" + +#: data/templates/paper-sizes.xml.h:6 +msgid "A3" +msgstr "A3" + +#: data/templates/paper-sizes.xml.h:7 +msgid "A4" +msgstr "A4" + +#: data/templates/paper-sizes.xml.h:8 +msgid "A5" +msgstr "A5" + +#: data/templates/paper-sizes.xml.h:9 +msgid "A6" +msgstr "A6" + +#: data/templates/paper-sizes.xml.h:10 +msgid "A7" +msgstr "A7" + +#: data/templates/paper-sizes.xml.h:11 +msgid "A8" +msgstr "A8" + +#: data/templates/paper-sizes.xml.h:12 +msgid "A9" +msgstr "A9" + +#. ISO B series sizes +#: data/templates/paper-sizes.xml.h:14 +msgid "B0" +msgstr "B0" + +#: data/templates/paper-sizes.xml.h:15 +msgid "B1" +msgstr "B1" + +#: data/templates/paper-sizes.xml.h:16 +msgid "B10" +msgstr "B10" + +#: data/templates/paper-sizes.xml.h:17 +msgid "B2" +msgstr "B2" + +#: data/templates/paper-sizes.xml.h:18 +msgid "B3" +msgstr "B3" + +#: data/templates/paper-sizes.xml.h:19 +msgid "B4" +msgstr "B4" + +#: data/templates/paper-sizes.xml.h:20 +msgid "B5" +msgstr "B5" + +#: data/templates/paper-sizes.xml.h:21 +msgid "B6" +msgstr "B6" + +#: data/templates/paper-sizes.xml.h:22 +msgid "B7" +msgstr "B7" + +#: data/templates/paper-sizes.xml.h:23 +msgid "B8" +msgstr "B8" + +#: data/templates/paper-sizes.xml.h:24 +msgid "B9" +msgstr "B9" + +#: data/templates/paper-sizes.xml.h:25 +msgid "US Executive" +msgstr "Ejecutivo" + +#. Other US paper sizes +#: data/templates/paper-sizes.xml.h:27 +msgid "US Legal" +msgstr "Legal" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:2 +#: data/templates/zweckform-iso-templates.xml.h:2 +msgid "Address Labels" +msgstr "Etiquetas de dirección" + +#. =================================================================== +#. ============================================================ +#. =================================================================== +#. ====================================================== +#: data/templates/avery-us-templates.xml.h:4 +#: data/templates/avery-iso-templates.xml.h:4 +#: data/templates/zweckform-iso-templates.xml.h:6 +#: data/templates/misc-us-templates.xml.h:3 +#: data/templates/misc-iso-templates.xml.h:17 +msgid "Business Cards" +msgstr "Tarjetas de negocio" + +#: data/templates/avery-us-templates.xml.h:5 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "Etiquetas de CD/DVD" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:7 +msgid "Diskette Labels" +msgstr "Etiquetas de diskettes" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:9 +msgid "Filing Labels" +msgstr "Etiquetas para archivado" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:11 +msgid "Full Sheet Labels" +msgstr "Etiquetas de página completa" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:13 +msgid "Large Round Labels" +msgstr "Etiquetas redondeadas grandes" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:15 +msgid "Name Badge Labels" +msgstr "Etiquetas de distintivos" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:17 +msgid "Return Address Labels" +msgstr "Etiquetas de dirección de remitente" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:19 +msgid "Shipping Labels" +msgstr "Etiquetas de envío" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:21 +msgid "Small Round Labels" +msgstr "Etiquetas redondeadas pequeñas" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:23 +msgid "Square Labels" +msgstr "Etiquetas cuadradas" + +#: data/templates/avery-us-templates.xml.h:24 +msgid "Video Tape Face Labels" +msgstr "Etiquetas de video (frente)" + +#: data/templates/avery-us-templates.xml.h:25 +msgid "Video Tape Spine Labels" +msgstr "Etiquetas de video (lateral)" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:2 +msgid "Address labels" +msgstr "Etiquetas de dirección" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:6 +msgid "CD Booklet" +msgstr "Tapa de CD" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:8 +msgid "CD Inlet" +msgstr "Interior de CD" + +#. =============================================================== +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:10 +#: data/templates/zweckform-iso-templates.xml.h:8 +#: data/templates/misc-us-templates.xml.h:5 +#: data/templates/misc-iso-templates.xml.h:21 +msgid "CD/DVD Labels" +msgstr "Etiquetas de CD/DVD" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:12 +msgid "Diskette labels" +msgstr "Etiquetas de disquette" + +#. =============================================================== +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:14 +#: data/templates/zweckform-iso-templates.xml.h:14 +#: data/templates/misc-iso-templates.xml.h:35 +msgid "Mailing Labels" +msgstr "Etiquetas de correo" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:16 +msgid "Mailing labels" +msgstr "Etiquetas de correo" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:18 +msgid "Mini Address Labels" +msgstr "Etiquetas de dirección pequeñas" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:20 +msgid "Shipping labels" +msgstr "Etiquetas de envío" + +# REVISAR +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:4 +msgid "Allround Labels" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:10 +msgid "Correction and Cover-up Labels" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:12 +msgid "Lever Arch File Labels" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:16 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:18 +msgid "Rectangular Copier Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:20 +#: data/templates/misc-iso-templates.xml.h:44 +msgid "Rectangular Labels" +msgstr "Etiquetas rectangulares" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:22 +msgid "Video Labels (back)" +msgstr "Etiquetas de video (dorso)" + +#: data/templates/misc-us-templates.xml.h:1 +msgid "Business Card CD" +msgstr "CD-tarjeta" + +# REVISAR +#: data/templates/misc-us-templates.xml.h:4 +msgid "CD Template Rectangles" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:6 +msgid "CD/DVD Labels (Face Only)" +msgstr "Etiquetas CD/DVD (Sólo frente)" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:23 +msgid "CD/DVD Labels (face only)" +msgstr "Etiquetas CD/DVD (sólo frente)" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:9 +msgid "Cassette Labels" +msgstr "Etiquetas de casette" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:11 +msgid "DLT Labels" +msgstr "Etiquetas DLT" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:13 +msgid "Microtube labels" +msgstr "Etiquetas microtubo" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Mini-CD Labels" +msgstr "Etiquetas Mini-CD" + +# REVISAR +#: data/templates/misc-us-templates.xml.h:15 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "" + +# REVISAR +#: data/templates/misc-us-templates.xml.h:16 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "" + +# REVISAR +#: data/templates/misc-us-templates.xml.h:17 +#: data/templates/misc-iso-templates.xml.h:42 +msgid "PRO CD Labels 2-up (face only)" +msgstr "" + +# REVISAR +#: data/templates/misc-us-templates.xml.h:18 +msgid "Slimline CD Case (rightside up)" +msgstr "" + +# REVISAR +#: data/templates/misc-us-templates.xml.h:19 +msgid "Slimline CD Case (upside down)" +msgstr "" + +# REVISAR +#: data/templates/misc-iso-templates.xml.h:1 +msgid "Agipa 119488: Business Cards" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:3 +msgid "Allround Labels --24" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:5 +msgid "Allround Labels --44" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:7 +msgid "Allround Labels --64" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:9 +msgid "Allround Labels --65" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:11 +msgid "Arch File Labels" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Arch File Labels (large)" +msgstr "" + +# REVISAR +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Arch File Labels (small)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:19 +msgid "CD Labels" +msgstr "Etiquetas para CD" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:25 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "Etieuats CD/DVD Formato estándar (sólo frente)" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:27 +msgid "Diskette Labels (face only)" +msgstr "Etiquetas para disquette (sólo cara)" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:29 +msgid "EPSON Photo Stickers 16" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:31 +msgid "Etiketten" +msgstr "Etiketten" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:33 +msgid "Fridge Magnet Stickers" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:37 +msgid "Mailing Labels --14" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:39 +msgid "Mailing Labels-2 columns" +msgstr "Etiquetas de correo - 2 columnas" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:41 +msgid "Mailing Labels-3 columns" +msgstr "Etiquetas de correo - 3 columnas" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:46 +msgid "Video Labels (face only)" +msgstr "Etiqeutas de video (solo frente)" + +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "Crear etiquetas, tarjetas de negocios y portadas" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "Diseñador de etiquetas gLabels" + +#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "Archivo de projecto gLabels" + +#, fuzzy +#~ msgid "Object _Properties..." +#~ msgstr "Propiedades del texto" + +#~ msgid "Display units" +#~ msgstr "Mostrar unidades de medida" + +#~ msgid "Default page size" +#~ msgstr "Tamaño de página por omisión" + +#~ msgid "Outline" +#~ msgstr "Contorno" + +#~ msgid "Edit line object properties" +#~ msgstr "Modificar las propiedades del objeto línea" + +#~ msgid "Edit text object properties" +#~ msgstr "Modificar las propiedades del objeto texto" + +#~ msgid "Maintain current aspect ratio" +#~ msgstr "Mantener la proporción actual del aspecto" + +#, fuzzy +#~ msgid "Open %s" +#~ msgstr "Abrir" + +#~ msgid "Revert to saved copy of %s?" +#~ msgstr "¿ Recuperar la copia salvada de %s ?" + +#~ msgid "Unknown media type. Using default." +#~ msgstr "Tipo de papel desconocido. Utilizando el tipo por omisión." + +#~ msgid "" +#~ "``%s'' has been modified.\n" +#~ "\n" +#~ "Do you wish to save it?" +#~ msgstr "" +#~ "\"%s\" ha sido modificado.\n" +#~ "\n" +#~ "¿ Desea salvarlo ?" + +#~ msgid "Close / Save label as" +#~ msgstr "Cerrar / Salvar etiqueta como" + +#~ msgid "Label no longer valid!" +#~ msgstr "¡ La etiqueta ya no es válida !" + +#~ msgid "Error writing file" +#~ msgstr "Error salvando el archivo" + +#~ msgid "Edit properties..." +#~ msgstr "Modificar propiedades" + +#~ msgid "Appearance" +#~ msgstr "Apariencia" + +#~ msgid "Position/Size" +#~ msgstr "Posición/Tamaño" + +#~ msgid "Image format not currently supported" +#~ msgstr "Formato de imagen no soportado actualmente" + +#~ msgid "Barcode data" +#~ msgstr "Datos del código de barras" + +#~ msgid "%" +#~ msgstr "%" + +#~ msgid "Show text with barcode" +#~ msgstr "Mostrar texto con código de barras" + +#~ msgid "Fields" +#~ msgstr "Campos" + +#~ msgid "Column" +#~ msgstr "Columna" + +#~ msgid "Sample data" +#~ msgstr "Datos de ejemplo" + +#~ msgid "Make a new, empty label" +#~ msgstr "Crear una etiqueta vacía nueva" + +#~ msgid " New " +#~ msgstr "Nuevo" + +#~ msgid "New Label/Card" +#~ msgstr "Nueva tarjeta/etiqueta" + +#~ msgid " Open " +#~ msgstr " Abrir " + +#~ msgid " Save " +#~ msgstr " Guardar " + +#~ msgid " Print " +#~ msgstr " Imprimir " + +#~ msgid "Function is not implemented!" +#~ msgstr "¡ La funcionalidad no está aún implementada !" diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 00000000..3ee3a6cc --- /dev/null +++ b/po/fr.po @@ -0,0 +1,3508 @@ +# French translation of glabels. +# Copyright (C) 2001 Jim Evins +# Olivier Berger +# Florent Morel , 2001, 2004 +# +msgid "" +msgstr "" +"Project-Id-Version: glabels 2.0.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-26 10:07+0200\n" +"PO-Revision-Date: 2009-08-26 11:10+0200\n" +"Last-Translator: Claude Paroz \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../src/glabels.c:75 ../src/glabels-batch.c:70 +msgid "[FILE...]" +msgstr "[FICHIER...]" + +#: ../src/glabels.c:91 +msgid "- gLabels label designer" +msgstr "- créateur de patrons gLabels" + +#: ../src/glabels-batch.c:54 +msgid "set output filename (default=\"output.pdf\")" +msgstr "définit le fichier de sortie (défaut=\"output.pdf\")" + +#: ../src/glabels-batch.c:54 ../src/glabels-batch.c:68 +msgid "filename" +msgstr "nom de fichier" + +#: ../src/glabels-batch.c:56 +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:56 +msgid "sheets" +msgstr "feuilles" + +#: ../src/glabels-batch.c:58 +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:58 +msgid "copies" +msgstr "copies" + +#: ../src/glabels-batch.c:60 +msgid "first label on first sheet (default=1)" +msgstr "première étiquette sur la première page (défaut=1)" + +#: ../src/glabels-batch.c:60 +msgid "first" +msgstr "première" + +# src/print.c:180 +# src/print.c:180 +# src/print.c:196 +# src/print_dialog.c:152 +#: ../src/glabels-batch.c:62 ../data/glade/print-custom-widget.glade.h:6 +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:64 ../data/glade/print-custom-widget.glade.h:5 +msgid "print in reverse (i.e. a mirror image)" +msgstr "imprimer à l'envers (i.e. une image miroir)" + +#: ../src/glabels-batch.c:66 ../data/glade/print-custom-widget.glade.h:4 +msgid "print crop marks" +msgstr "imprimer les guides de coupe" + +#: ../src/glabels-batch.c:68 +msgid "input file for merging" +msgstr "fichier d'entrée pour la fusion" + +#: ../src/glabels-batch.c:96 +msgid "- batch process gLabels label files" +msgstr "- traitement par lots de fichiers d'étiquettes gLabels" + +# src/file.c:214 +# src/file.c:214 +# src/file.c:249 +# src/file.c:249 +#: ../src/glabels-batch.c:142 +#, c-format +msgid "cannot perform document merge with glabels file %s\n" +msgstr "" +"impossible d'effectuer une fusion de document avec le fichier glabels %s\n" + +# src/file.c:214 +# src/file.c:214 +# src/file.c:249 +# src/file.c:249 +#: ../src/glabels-batch.c:164 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "impossible d'ouvrir le fichier glabels %s\n" + +#: ../src/window.c:259 +msgid "(none) - gLabels" +msgstr "(vide) - gLabels" + +#: ../src/window.c:432 +msgid "(modified)" +msgstr "(modifié)" + +# 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/stock.c:72 +msgid "_Select Mode" +msgstr "Mode _sélection" + +# 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/stock.c:73 +msgid "_Text" +msgstr "_Texte" + +# 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 +#: ../src/stock.c:74 +msgid "_Line" +msgstr "_Ligne" + +# src/menu.c:103 +# src/menu.c:103 +#: ../src/stock.c:75 +msgid "_Box" +msgstr "_Boîte" + +# src/menu.c:109 +# src/menu.c:109 +#: ../src/stock.c:76 +msgid "_Ellipse" +msgstr "_Ellipse" + +# 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/stock.c:77 +msgid "_Image" +msgstr "_Image" + +# src/item_barcode.c:316 +# src/item_barcode.c:317 +# src/menu.c:116 +# src/menu.c:116 +#: ../src/stock.c:78 +msgid "Bar_code" +msgstr "_Code-barre" + +# 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/stock.c:79 +msgid "_Merge Properties" +msgstr "Propriétés de _fusion" + +# src/item_text.c:467 +# src/item_text.c:467 +# src/item_text.c:482 +# src/item_text.c:482 +#: ../src/stock.c:80 +msgid "Object _Properties" +msgstr "_Propriétés de l'objet" + +# 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/stock.c:81 +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/stock.c:82 +msgid "Send to _Back" +msgstr "_Reculer à l'arrière-plan" + +# src/rotate_select.c:187 +# src/rotate_select.c:187 +# src/rotate_select.c:167 +# src/rotate_select.c:169 +#: ../src/stock.c:83 +msgid "Rotate _Left" +msgstr "Rotation _gauche" + +# src/rotate_select.c:187 +# src/rotate_select.c:187 +# src/rotate_select.c:167 +# src/rotate_select.c:169 +#: ../src/stock.c:84 +msgid "Rotate _Right" +msgstr "Rotation _droite" + +#: ../src/stock.c:85 +msgid "Flip _Horizontally" +msgstr "Retourner _horizontalement" + +#: ../src/stock.c:86 +msgid "Flip _Vertically" +msgstr "Retourner _verticalement" + +#: ../src/stock.c:87 +msgid "_Lefts" +msgstr "_Gauches" + +#: ../src/stock.c:88 +msgid "_Rights" +msgstr "_Droites" + +#: ../src/stock.c:89 +msgid "_Centers" +msgstr "_Centres" + +# src/menu.c:157 +# src/menu.c:157 +#: ../src/stock.c:90 +msgid "_Tops" +msgstr "En _haut" + +#: ../src/stock.c:91 +msgid "Bottoms" +msgstr "En _bas" + +#: ../src/stock.c:92 +msgid "Centers" +msgstr "_Centré" + +#: ../src/stock.c:93 ../src/stock.c:94 +msgid "Label Ce_nter" +msgstr "Centre de l'étiquette" + +#: ../src/stock.c:95 ../data/glade/property-bar.glade.h:3 +msgid "Fill color" +msgstr "Couleur de remplissage" + +#: ../src/stock.c:96 ../data/glade/property-bar.glade.h:8 +msgid "Line color" +msgstr "Couleur de 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 +#: ../src/stock.c:97 ../src/stock.c:99 +msgid "Linked" +msgstr "Lié" + +# src/merge.c:80 +# src/merge.c:78 +#: ../src/stock.c:98 ../src/stock.c:100 +msgid "Not Linked" +msgstr "Non lié" + +# 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 +#. Menu entries. +#: ../src/ui.c:93 +msgid "_File" +msgstr "_Fichier" + +#: ../src/ui.c:94 +msgid "Open Recent _Files" +msgstr "_Fichiers récents" + +#: ../src/ui.c:95 +msgid "_Edit" +msgstr "É_dition" + +# src/menu.c:50 +# src/menu.c:50 +# src/menu.c:50 +# src/menu.c:50 +#: ../src/ui.c:96 +msgid "_View" +msgstr "_Affichage" + +#: ../src/ui.c:97 +msgid "Customize Main Toolbar" +msgstr "Personnaliser le barre d'outils principale" + +#: ../src/ui.c:98 +msgid "Customize Drawing Toolbar" +msgstr "Personnaliser la barre d'outils dessin" + +#: ../src/ui.c:99 +msgid "Customize Properties Toolbar" +msgstr "Personnaliser la barre d'outils de propriétés" + +#: ../src/ui.c:100 +msgid "_Objects" +msgstr "_Objets" + +#: ../src/ui.c:101 +msgid "_Create" +msgstr "_Créer" + +#: ../src/ui.c:102 +msgid "_Order" +msgstr "_Ordre" + +# src/rotate_select.c:187 +# src/rotate_select.c:187 +# src/rotate_select.c:167 +# src/rotate_select.c:169 +#: ../src/ui.c:103 +msgid "_Rotate/Flip" +msgstr "_Rotation/Renversement" + +#: ../src/ui.c:104 +msgid "Align _Horizontal" +msgstr "Aligner _horizontalement" + +#: ../src/ui.c:105 +msgid "Align _Vertical" +msgstr "Aligner _verticalement" + +#: ../src/ui.c:106 +msgid "_Help" +msgstr "Aid_e" + +#. Popup entries. +#: ../src/ui.c:109 ../src/ui.c:110 +msgid "Context Menu" +msgstr "Menu contextuel" + +# src/menu.c:50 +# src/menu.c:50 +# src/menu.c:50 +# src/menu.c:50 +#: ../src/ui.c:115 +msgid "_New" +msgstr "_Nouveau" + +# 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/ui.c:117 +msgid "Create a new file" +msgstr "Crée un nouveau document" + +# src/file.c:178 +# src/file.c:178 +# src/file.c:211 +# src/file.c:211 +#: ../src/ui.c:122 +msgid "_Open..." +msgstr "_Ouvrir..." + +# src/menu.c:140 +# src/menu.c:140 +# src/menu.c:170 +# src/menu.c:170 +#: ../src/ui.c:124 +msgid "Open a file" +msgstr "Ouvre un 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/ui.c:129 +msgid "_Save" +msgstr "_Enregistrer" + +# src/menu.c:142 +# src/menu.c:142 +# src/menu.c:172 +# src/menu.c:172 +#: ../src/ui.c:131 +msgid "Save current file" +msgstr "Enregistrer le fichier en cours" + +# 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/ui.c:136 +msgid "Save _As..." +msgstr "Enregistrer _sous..." + +#: ../src/ui.c:138 +msgid "Save the current file to a different name" +msgstr "Enregistre le fichier en cours avec un nom différent" + +# src/print.c:149 +# src/print.c:149 +# src/print.c:141 +# src/print_dialog.c:99 +#: ../src/ui.c:143 +msgid "_Print..." +msgstr "Im_primer..." + +# src/menu.c:145 +# src/menu.c:145 +# src/menu.c:175 +# src/menu.c:175 +#: ../src/ui.c:145 +msgid "Print the current file" +msgstr "Imprime le fichier en cours" + +# src/item_text.c:467 +# src/item_text.c:467 +# src/item_text.c:482 +# src/item_text.c:482 +#: ../src/ui.c:150 +msgid "Properties..." +msgstr "Propriétés..." + +# src/item_box.c:251 +# src/item_box.c:251 +# src/merge_properties.c:82 +# src/merge_properties.c:82 +#: ../src/ui.c:152 +msgid "Modify document properties" +msgstr "Modifier les propriétés du document" + +#: ../src/ui.c:157 +msgid "Template _Designer..." +msgstr "_Créateur de patrons..." + +# 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/ui.c:159 +msgid "Create a custom template" +msgstr "Créer un patron personnalisé" + +#: ../src/ui.c:164 +msgid "_Close" +msgstr "_Fermer" + +# src/menu.c:142 +# src/menu.c:142 +# src/menu.c:172 +# src/menu.c:172 +#: ../src/ui.c:166 +msgid "Close the current file" +msgstr "Ferme le fichier en cours" + +#: ../src/ui.c:171 +msgid "_Quit" +msgstr "_Quitter" + +#: ../src/ui.c:173 +msgid "Quit the program" +msgstr "Quitte le programme" + +#: ../src/ui.c:180 +msgid "Cut" +msgstr "Couper" + +#: ../src/ui.c:182 +msgid "Cut the selection" +msgstr "Coupe la sélection" + +#: ../src/ui.c:187 +msgid "Copy" +msgstr "Copier" + +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:86 +#: ../src/ui.c:189 +msgid "Copy the selection" +msgstr "Copie la sélection" + +#: ../src/ui.c:194 +msgid "Paste" +msgstr "Coller" + +#: ../src/ui.c:196 +msgid "Paste the clipboard" +msgstr "Colle le presse-papiers" + +# 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/ui.c:201 +msgid "Delete" +msgstr "Supprimer" + +# 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/ui.c:203 +msgid "Delete the selected objects" +msgstr "Supprime les objets sélectionnés" + +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:85 +# src/menu.c:85 +#: ../src/ui.c:208 +msgid "Select All" +msgstr "Tout 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/ui.c:210 +msgid "Select all objects" +msgstr "Sélectionne tous les objets" + +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:85 +# src/menu.c:85 +#: ../src/ui.c:215 +msgid "Un-select All" +msgstr "Désélectionner tout" + +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:86 +#: ../src/ui.c:217 +msgid "Remove all selections" +msgstr "Annule toutes les sélections" + +# src/preferences.c:92 +# src/prefs.c:101 +# src/prefs.c:92 +# src/prefs.c:86 +#: ../src/ui.c:222 +msgid "Preferences" +msgstr "Préférences" + +#: ../src/ui.c:224 +msgid "Configure the application" +msgstr "Configure le logiciel" + +# 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/ui.c:231 +msgid "Zoom in" +msgstr "Zoom avant" + +#: ../src/ui.c:233 +msgid "Increase magnification" +msgstr "Augmente l'agrandissement" + +# 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/ui.c:238 +msgid "Zoom out" +msgstr "Zoom arrière" + +#: ../src/ui.c:240 +msgid "Decrease magnification" +msgstr "Réduit l'agrandissement" + +# src/tools.c:90 +# src/tools.c:90 +# src/menu.c:127 +# src/menu.c:127 +#: ../src/ui.c:245 +msgid "Zoom 1 to 1" +msgstr "Zoom 1:1" + +#: ../src/ui.c:247 +msgid "Restore scale to 100%" +msgstr "Remet l'échelle à 100%" + +# 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/ui.c:252 +msgid "Zoom to fit" +msgstr "Adapter le zoom à la taille de la fenêtre" + +#: ../src/ui.c:254 +msgid "Set scale to fit window" +msgstr "Adapte l'échelle à la taille de la fenêtre" + +# 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/ui.c:261 +msgid "Select Mode" +msgstr "Mode sélection" + +# 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/ui.c:263 +msgid "Select, move and modify objects" +msgstr "Sélectionne, déplace et modifie les objets" + +# 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/ui.c:268 ../src/view-text.c:494 +#: ../data/glade/object-editor.glade.h:32 +msgid "Text" +msgstr "Texte" + +# 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/ui.c:270 +msgid "Create text object" +msgstr "Crée un objet texte" + +# src/menu.c:103 +# src/menu.c:103 +#: ../src/ui.c:275 +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/ui.c:277 +msgid "Create box/rectangle object" +msgstr "Crée un objet boîte/rectangle" + +# 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 +#: ../src/ui.c:282 ../data/glade/object-editor.glade.h:20 +msgid "Line" +msgstr "Ligne" + +# 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/ui.c:284 +msgid "Create line object" +msgstr "Crée un objet ligne" + +# src/menu.c:109 +# src/menu.c:109 +#: ../src/ui.c:289 +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/ui.c:291 +msgid "Create ellipse/circle object" +msgstr "Crée un objet ellipse/cercle" + +# 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/ui.c:296 ../data/glade/object-editor.glade.h:16 +msgid "Image" +msgstr "Image" + +# 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/ui.c:298 +msgid "Create image object" +msgstr "Crée un objet image" + +# src/item_barcode.c:316 +# src/item_barcode.c:317 +# src/menu.c:116 +# src/menu.c:116 +#: ../src/ui.c:303 +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/ui.c:305 +msgid "Create barcode object" +msgstr "Crée un objet code-barre" + +# 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/ui.c:310 +msgid "Bring to front" +msgstr "Avancer au premier plan" + +#: ../src/ui.c:312 +msgid "Raise object to top" +msgstr "Remonte l'objet au plus haut niveau" + +# 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/ui.c:317 +msgid "Send to back" +msgstr "Reculer à l'arrière-plan" + +#: ../src/ui.c:319 +msgid "Lower object to bottom" +msgstr "Descend l'objet à l'arrière-plan" + +# src/rotate_select.c:187 +# src/rotate_select.c:187 +# src/rotate_select.c:167 +# src/rotate_select.c:169 +#: ../src/ui.c:324 +msgid "Rotate left" +msgstr "Rotation gauche" + +#: ../src/ui.c:326 +msgid "Rotate object 90 degrees counter-clockwise" +msgstr "" +"Tourne l'objet de 90 degrés dans le sens inverse des aiguilles d'une montre" + +# src/rotate_select.c:187 +# src/rotate_select.c:187 +# src/rotate_select.c:167 +# src/rotate_select.c:169 +#: ../src/ui.c:331 +msgid "Rotate right" +msgstr "Rotation droite" + +#: ../src/ui.c:333 +msgid "Rotate object 90 degrees clockwise" +msgstr "Tourne l'objet de 90 degrés dans le sens des aiguilles d'une montre" + +#: ../src/ui.c:338 +msgid "Flip horizontally" +msgstr "Retourner horizontalement" + +#: ../src/ui.c:340 +msgid "Flip object horizontally" +msgstr "Retourne l'objet horizontalement" + +#: ../src/ui.c:345 +msgid "Flip vertically" +msgstr "Retourner verticalement" + +#: ../src/ui.c:347 +msgid "Flip object vertically" +msgstr "Retourne l'objet verticalement" + +# src/prop_text.c:277 +# src/prop_text.c:264 +# src/prop_text.c:248 +# src/prop_text.c:248 +#: ../src/ui.c:352 +msgid "Align left" +msgstr "Aligner à gauche" + +#: ../src/ui.c:354 +msgid "Align objects to left edges" +msgstr "Aligne les objets sur leur bordure gauche" + +#: ../src/ui.c:359 +msgid "Align right" +msgstr "Aligner à droite" + +#: ../src/ui.c:361 +msgid "Align objects to right edges" +msgstr "Aligne les objets sur leur bordure droite" + +#: ../src/ui.c:366 +msgid "Align horizontal center" +msgstr "Aligner centré horizontalement" + +#: ../src/ui.c:368 +msgid "Align objects to horizontal centers" +msgstr "Aligne horizontalement le centre des objets" + +#: ../src/ui.c:373 +msgid "Align tops" +msgstr "Aligner au sommet" + +#: ../src/ui.c:375 +msgid "Align objects to top edges" +msgstr "Aligne les objets d'après leur sommet" + +#: ../src/ui.c:380 +msgid "Align bottoms" +msgstr "Aligner à la base" + +#: ../src/ui.c:382 +msgid "Align objects to bottom edges" +msgstr "Aligne les objets d'après leur base" + +#: ../src/ui.c:387 +msgid "Align vertical center" +msgstr "Aligner centré verticalement" + +#: ../src/ui.c:389 +msgid "Align objects to vertical centers" +msgstr "Aligne verticalement le centre des objets" + +#: ../src/ui.c:394 +msgid "Center horizontally" +msgstr "Centrer horizontalement" + +#: ../src/ui.c:396 +msgid "Center objects to horizontal label center" +msgstr "Aligne les objets horizontalement au centre de l'étiquette" + +#: ../src/ui.c:401 +msgid "Center vertically" +msgstr "Centrer verticalement" + +#: ../src/ui.c:403 +msgid "Center objects to vertical label center" +msgstr "Aligne les objets verticalement au centre de l'étiquette" + +# 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/ui.c:408 +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/ui.c:410 +msgid "Edit merge properties" +msgstr "Édite les propriétés de fusion" + +#: ../src/ui.c:417 +msgid "Contents" +msgstr "Sommaire" + +# src/file.c:183 +# src/file.c:183 +# src/file.c:213 +# src/file.c:213 +#: ../src/ui.c:419 +msgid "Open glabels manual" +msgstr "Ouvre le manuel de glabels" + +#: ../src/ui.c:424 +msgid "About..." +msgstr "À propos..." + +#: ../src/ui.c:426 +msgid "About glabels" +msgstr "À propos de glabels" + +#: ../src/ui.c:436 +msgid "Property toolbar" +msgstr "Barre d'outils de propriétés" + +#: ../src/ui.c:438 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "" +"Afficher ou non la barre d'outils de propriétés dans la fenêtre actuelle" + +#: ../src/ui.c:444 ../src/ui.c:489 ../src/ui.c:497 +msgid "Show tooltips" +msgstr "Afficher les infos-bulles" + +#: ../src/ui.c:446 +msgid "Show tooltips for property toolbar" +msgstr "Afficher les info-bulles dans la barre d'outils de propriétés" + +#: ../src/ui.c:452 +msgid "Grid" +msgstr "Grille" + +#: ../src/ui.c:454 +msgid "Change the visibility of the grid in the current window" +msgstr "Afficher ou non la grille dans la fenêtre actuelle" + +# src/preferences.c:213 +#: ../src/ui.c:460 +msgid "Markup" +msgstr "Marges" + +#: ../src/ui.c:462 +msgid "Change the visibility of markup lines in the current window" +msgstr "Afficher ou non les lignes de marges dans la fenêtre actuelle" + +#: ../src/ui.c:473 +msgid "Main toolbar" +msgstr "Barre d'outils principale" + +#: ../src/ui.c:475 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "Afficher ou non la barre d'outils principale dans la fenêtre actuelle" + +#: ../src/ui.c:481 +msgid "Drawing toolbar" +msgstr "Barre d'outils dessin" + +#: ../src/ui.c:483 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "Afficher ou non la barre d'outils dessin dans la fenêtre actuelle" + +#: ../src/ui.c:491 +msgid "Show tooltips for main toolbar" +msgstr "Afficher les info-bulles dans la barre d'outils principale" + +#: ../src/ui.c:499 +msgid "Show tooltips for drawing toolbar" +msgstr "Afficher les info-bulles dans la barre d'outils de dessin" + +# 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/ui-property-bar.c:1232 ../src/object-editor.c:587 +#: ../src/object-editor.c:593 +msgid "Default" +msgstr "Par défaut" + +# src/merge.c:80 +# src/merge.c:78 +#: ../src/ui-property-bar.c:1239 ../src/object-editor.c:599 +msgid "No line" +msgstr "Pas de ligne" + +#: ../src/ui-property-bar.c:1247 ../src/object-editor.c:606 +msgid "No fill" +msgstr "Pas de remplissage" + +# src/item_text.c:467 +# src/item_text.c:467 +# src/item_text.c:482 +# src/item_text.c:482 +#: ../src/ui-sidebar.c:152 +msgid "Object properties" +msgstr "Propriétés de l'objet" + +#: ../src/ui-commands.c:1084 +msgid "Glabels includes contributions from:" +msgstr "Glabels contient des contributions de :" + +#: ../src/ui-commands.c:1090 +msgid "See the file AUTHORS for additional credits," +msgstr "Voir le fichier AUTHORS pour des remerciements supplémentaires," + +#: ../src/ui-commands.c:1091 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "ou visitez http://glabels.sourceforge.net/" + +#: ../src/ui-commands.c:1103 +msgid "A label and business card creation program.\n" +msgstr "Un logiciel de création de cartes de visite et d'étiquettes.\n" + +#: ../src/ui-commands.c:1107 +msgid "translator-credits" +msgstr "" +"Olivier Berger \n" +"Florent Morel , 2001, 2004\n" +"Claude Paroz , 2007" + +# src/menu.c:185 +# src/menu.c:185 +# src/menu.c:290 +# src/menu.c:290 +#: ../src/ui-commands.c:1110 +msgid "" +"Glabels is free software; you can redistribute it and/or modify it\n" +"under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but\n" +"WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" +"the GNU General Public License for more details.\n" +msgstr "" +"Glabels 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étails, voir la Licence " +"Publique Générale GNU.\n" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#: ../src/ui-commands.c:1136 +msgid "glabels" +msgstr "glabels" + +# src/file.c:59 +# src/file.c:59 +# src/file.c:72 +# src/file.c:72 +#: ../src/file.c:91 +msgid "New Label or Card" +msgstr "Nouvelle étiquette ou carte" + +# src/item_text.c:467 +# src/item_text.c:467 +# src/item_text.c:482 +# src/item_text.c:482 +#: ../src/file.c:191 +msgid "Label properties" +msgstr "Propriétés de l'étiquette" + +#: ../src/file.c:292 ../src/file.c:578 +msgid "All files" +msgstr "Tous les fichiers" + +# src/preferences.c:92 +# src/prefs.c:101 +# src/prefs.c:92 +# src/prefs.c:86 +#: ../src/file.c:297 ../src/file.c:583 +msgid "gLabels documents" +msgstr "Documents gLabels" + +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:86 +#: ../src/file.c:343 ../src/file.c:640 +msgid "Empty file name selection" +msgstr "Nom de fichier sélectionné vide" + +#: ../src/file.c:346 ../src/file.c:362 +msgid "Please select a file or supply a valid file name" +msgstr "Sélectionnez un fichier ou donnez un nom de fichier valide" + +#: ../src/file.c:359 +msgid "File does not exist" +msgstr "Ce fichier n'existe pas" + +# src/file.c:214 +# src/file.c:214 +# src/file.c:249 +# src/file.c:249 +# c-format +#: ../src/file.c:433 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "Impossible d'ouvrir le fichier « %s »" + +#: ../src/file.c:436 +msgid "Not a supported file format" +msgstr "Format de fichier non pris en charge" + +# 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/file.c:513 ../src/file.c:690 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "Impossible d'enregistrer « %s »" + +#: ../src/file.c:517 ../src/file.c:694 +msgid "Error encountered during save. The file is still not saved." +msgstr "" +"Erreur rencontrée durant l'enregistrement. Le fichier n'est toujours pas " +"enregistré. " + +# src/file.c:278 +# src/file.c:278 +# src/file.c:316 +# src/file.c:316 +#: ../src/file.c:556 +#, c-format +msgid "Save \"%s\" as" +msgstr "Enregistrer « %s » sous" + +# 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/file.c:643 +msgid "Please supply a valid file name" +msgstr "Donnez un nom de fichier valide" + +#: ../src/file.c:664 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "Écraser le fichier « %s » ?" + +#: ../src/file.c:668 +msgid "File already exists." +msgstr "Ce fichier existe déjà." + +#: ../src/file.c:764 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "Enregistrer les changements du document « %s » avant de fermer ?" + +#: ../src/file.c:768 +msgid "Your changes will be lost if you don't save them." +msgstr "Vos changements seront perdus si vous ne les enregistrez pas." + +#: ../src/file.c:771 +msgid "Close without saving" +msgstr "Fermer sans enregistrer" + +# 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 +#. Should not happen +#: ../src/prefs.c:159 ../src/prefs.c:166 +#: ../data/glade/object-editor.glade.h:43 +#: ../data/glade/prefs-dialog.glade.h:22 +msgid "points" +msgstr "points" + +# src/item_line.c:271 +# src/prefs.c:465 +# src/prefs.c:447 +# src/prefs.c:450 +#: ../src/prefs.c:161 ../data/glade/object-editor.glade.h:42 +#: ../data/glade/template-designer.glade.h:64 +msgid "inches" +msgstr "pouces" + +# src/prefs.c:467 +# src/prefs.c:449 +# src/prefs.c:452 +#: ../src/prefs.c:163 +msgid "mm" +msgstr "mm" + +# src/preferences.c:92 +# src/prefs.c:101 +# src/prefs.c:92 +# src/prefs.c:86 +#: ../src/prefs-dialog.c:162 ../data/glade/prefs-dialog.glade.h:21 +msgid "gLabels Preferences" +msgstr "Préférences de gLabels" + +# src/item_box.c:251 +# src/item_box.c:251 +# src/item_box.c:235 +# src/item_box.c:235 +#. Build editor. +#: ../src/view-box.c:175 +msgid "Box object properties" +msgstr "Propriétés de l'objet boîte" + +# src/item_ellipse.c:256 +# src/item_ellipse.c:256 +# src/item_ellipse.c:237 +# src/item_ellipse.c:237 +#. Build editor. +#: ../src/view-ellipse.c:175 +msgid "Ellipse object properties" +msgstr "Propriétés de l'objet ellipse" + +# src/item_box.c:251 +# src/item_box.c:251 +# src/item_box.c:235 +# src/item_box.c:235 +#. Build editor. +#: ../src/view-line.c:174 +msgid "Line object properties" +msgstr "Propriétés de l'objet ligne" + +# src/item_image.c:272 +# src/item_image.c:272 +# src/item_image.c:257 +# src/item_image.c:257 +#. Build editor. +#: ../src/view-image.c:174 +msgid "Image object properties" +msgstr "Propriétés de l'objet image" + +# src/item_box.c:251 +# src/item_box.c:251 +# src/item_box.c:235 +# src/item_box.c:235 +#. Build editor. +#: ../src/view-text.c:178 +msgid "Text object properties" +msgstr "Propriétés de l'objet texte" + +# src/item_barcode.c:299 +# src/item_barcode.c:299 +# src/item_barcode.c:287 +# src/item_barcode.c:287 +#. Build editor. +#: ../src/view-barcode.c:174 +msgid "Barcode object properties" +msgstr "Propriétés de l'objet code-barre" + +#: ../src/object-editor-image-page.c:270 +msgid "All Files" +msgstr "Tous les fichiers" + +# 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/object-editor-image-page.c:275 +msgid "All Images" +msgstr "Toutes les images" + +#: ../src/object-editor-image-page.c:290 +#, c-format +msgid "%s (*.%s)" +msgstr "%s (*.%s)" + +# 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/merge-properties-dialog.c:263 +msgid "Merge Properties" +msgstr "Propriétés de fusion" + +# src/merge_ui_text.c:170 +# src/merge_ui_text.c:170 +#: ../src/merge-properties-dialog.c:289 ../src/merge-properties-dialog.c:397 +msgid "Select merge-database source" +msgstr "Sélection du fichier de données pour la fusion" + +# 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-properties-dialog.c:298 ../src/merge-properties-dialog.c:417 +msgid "N/A" +msgstr "Non défini" + +# 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/merge-properties-dialog.c:324 +msgid "Select" +msgstr "Sélectionner" + +#: ../src/merge-properties-dialog.c:332 +msgid "Record/Field" +msgstr "Enregistrements/Champs" + +# src/item_barcode.c:309 +# src/item_barcode.c:308 +# src/item_barcode.c:297 +# src/item_barcode.c:297 +#: ../src/merge-properties-dialog.c:340 ../data/glade/object-editor.glade.h:10 +msgid "Data" +msgstr "Données" + +# 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-dialog.c:410 +msgid "Fixed" +msgstr "Fixe" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. =================================================================== +#: ../src/print-op.c:237 ../src/wdgt-print-copies.c:171 +#: ../data/templates/misc-iso-templates.xml.h:34 +msgid "Labels" +msgstr "Étiquettes" + +#: ../src/template-designer.c:358 +msgid "gLabels Template Designer" +msgstr "Créateur de patrons gLabels" + +#: ../src/template-designer.c:419 +msgid "Welcome" +msgstr "Bienvenue" + +# src/media_select.c:216 +# src/media_select.c:242 +# src/media_select.c:222 +# src/media_select.c:222 +#: ../src/template-designer.c:463 +msgid "Name and Description" +msgstr "Nom et description" + +# src/media_select.c:221 +# src/media_select.c:247 +# src/media_select.c:227 +# src/media_select.c:227 +#: ../src/template-designer.c:516 +msgid "Page Size" +msgstr "Taille de page" + +# src/file.c:59 +# src/file.c:59 +# src/file.c:72 +# src/file.c:72 +#: ../src/template-designer.c:587 +msgid "Label or Card Shape" +msgstr "Forme de carte ou d'étiquette" + +# src/file.c:59 +# src/file.c:59 +# src/file.c:72 +# src/file.c:72 +#: ../src/template-designer.c:637 +msgid "Label or Card Size" +msgstr "Taille de carte ou d'étiquette" + +# src/media_select.c:226 +# src/media_select.c:252 +# src/media_select.c:232 +# src/media_select.c:232 +#: ../src/template-designer.c:737 +msgid "Label Size (round)" +msgstr "Taille d'étiquette (ronde)" + +#: ../src/template-designer.c:820 +msgid "Label Size (CD/DVD)" +msgstr "Taille d'étiquette (CD/DVD)" + +#: ../src/template-designer.c:913 +msgid "Number of Layouts" +msgstr "Nombre de dispositions" + +# src/media_select.c:231 +# src/media_select.c:257 +# src/media_select.c:237 +# src/media_select.c:237 +#: ../src/template-designer.c:976 +msgid "Layout(s)" +msgstr "Disposition(s) :" + +#: ../src/template-designer.c:1087 +msgid "Design Completed" +msgstr "Création terminée" + +#: ../src/template-designer.c:1253 +msgid "" +"Brand and part# match an existing " +"template!" +msgstr "" +"La marque et le numéro d'article " +"correspondent à un patron existant." + +#: ../src/bc.c:67 +msgid "POSTNET (any)" +msgstr "POSTNET (tous)" + +#: ../src/bc.c:70 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (seulement ZIP)" + +#: ../src/bc.c:73 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (ZIP+4)" + +#: ../src/bc.c:76 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: ../src/bc.c:79 +msgid "CEPNET" +msgstr "CEPNET" + +#: ../src/bc.c:82 +msgid "EAN (any)" +msgstr "EAN (tous)" + +#: ../src/bc.c:85 +msgid "EAN-8" +msgstr "EAN-8" + +#: ../src/bc.c:88 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: ../src/bc.c:91 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: ../src/bc.c:94 +msgid "EAN-13" +msgstr "EAN-13" + +#: ../src/bc.c:97 +msgid "EAN-13 +2" +msgstr "EAN-13 +2" + +#: ../src/bc.c:100 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: ../src/bc.c:103 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A ou UPC-E)" + +#: ../src/bc.c:106 +msgid "UPC-A" +msgstr "UPC-A" + +#: ../src/bc.c:109 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: ../src/bc.c:112 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: ../src/bc.c:115 +msgid "UPC-E" +msgstr "UPC-E" + +#: ../src/bc.c:118 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: ../src/bc.c:121 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: ../src/bc.c:124 +msgid "ISBN" +msgstr "ISBN" + +#: ../src/bc.c:127 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: ../src/bc.c:130 +msgid "Code 39" +msgstr "Code 39" + +#: ../src/bc.c:133 +msgid "Code 128" +msgstr "Code 128" + +#: ../src/bc.c:136 +msgid "Code 128C" +msgstr "Code 128C" + +#: ../src/bc.c:139 +msgid "Code 128B" +msgstr "Code 128B" + +#: ../src/bc.c:142 +msgid "Interleaved 2 of 5" +msgstr "Entrelacé 2 de 5" + +#: ../src/bc.c:145 +msgid "Codabar" +msgstr "Code-barre" + +#: ../src/bc.c:148 +msgid "MSI" +msgstr "MSI" + +#: ../src/bc.c:151 +msgid "Plessey" +msgstr "Plessey" + +#: ../src/bc.c:154 +msgid "IEC16022 (DataMatrix)" +msgstr "IEC16022 (DataMatrix)" + +#: ../src/label.c:531 +msgid "Untitled" +msgstr "Sans titre" + +# src/item_barcode.c:316 +# src/item_barcode.c:317 +# src/item_barcode.c:299 +# src/item_barcode.c:299 +#: ../src/label-barcode.c:426 +msgid "Barcode data empty" +msgstr "Données de code-barre vides" + +# 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/label-barcode.c:430 +msgid "Invalid barcode data" +msgstr "Données de code-barre invalides" + +# 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/xml-label.c:189 ../src/xml-label.c:226 +msgid "xmlParseFile error" +msgstr "erreur xmlParseFile" + +# src/label.c:243 +# src/label.c:244 +# src/label.c:225 +# src/label.c:223 +#: ../src/xml-label.c:262 +msgid "No document root" +msgstr "Pas de racine de document" + +#: ../src/xml-label.c:270 +msgid "Importing from glabels 0.1 format" +msgstr "Import depuis le format glabels 0.1" + +#: ../src/xml-label.c:279 +msgid "Importing from glabels 0.4 format" +msgstr "Import depuis le format glabels 0.4" + +# src/label.c:248 +# src/label.c:249 +# src/label.c:236 +# src/label.c:234 +#: ../src/xml-label.c:288 +#, c-format +msgid "Unknown glabels Namespace -- Using %s" +msgstr "Espace de nom glabels inconnu -- Utilisation de %s" + +# src/label.c:253 +# src/label.c:254 +# src/label.c:241 +# src/label.c:239 +#: ../src/xml-label.c:319 ../src/xml-label-04.c:79 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "Mauvais noeud racine = \"%s\"" + +# src/label.c:253 +# src/label.c:254 +# src/label.c:241 +# src/label.c:239 +#: ../src/xml-label.c:356 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "Mauvais noeud racine = \"%s\"" + +# src/label.c:298 +# src/label.c:301 +# src/label.c:294 +# src/label.c:290 +#: ../src/xml-label.c:401 ../src/xml-label-04.c:127 +#, c-format +msgid "bad node = \"%s\"" +msgstr "mauvais noeud = \"%s\"" + +# src/label.c:298 +# src/label.c:301 +# src/label.c:294 +# src/label.c:290 +#: ../src/xml-label.c:840 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "mauvais noeud de données = \"%s\"" + +#: ../src/xml-label.c:1077 ../libglabels/xml-template.c:670 +msgid "Utf8 conversion error." +msgstr "Erreur de conversion Utf8" + +# src/label.c:487 +# src/label.c:493 +# src/label.c:589 +# src/label.c:587 +#: ../src/xml-label.c:1084 +msgid "Problem saving xml file." +msgstr "Problème de sauvegarde du fichier xml." + +# src/merge.c:80 +# src/merge.c:78 +#: ../src/merge.c:170 ../src/merge.c:211 ../src/merge.c:375 ../src/merge.c:378 +msgid "None" +msgstr "Aucun" + +# src/merge.c:98 +# src/merge.c:94 +#: ../src/merge-init.c:59 +msgid "Text file with comma delimeters (CSV)" +msgstr "Texte séparé par des virgules (CSV)" + +# src/merge.c:107 +# src/merge.c:102 +#: ../src/merge-init.c:66 +msgid "Text file with colon delimeters" +msgstr "Texte séparé par des deux-points" + +# src/merge.c:89 +# src/merge.c:86 +#: ../src/merge-init.c:73 +msgid "Text file with tab delimeters" +msgstr "Texte avec séparateurs de tabulation" + +#: ../src/merge-init.c:82 +msgid "Data from default Evolution Addressbook" +msgstr "Données du carnet d'adresses Evolution par défaut" + +#: ../src/merge-init.c:88 +msgid "Data from a file containing VCards" +msgstr "Données d'un fichier de VCards" + +#: ../src/merge-evolution.c:309 +msgid "Couldn't construct query" +msgstr "Impossible de construire la requête" + +# src/file.c:214 +# src/file.c:214 +# src/file.c:249 +# src/file.c:249 +# c-format +#: ../src/merge-evolution.c:315 ../src/merge-evolution.c:326 +msgid "Couldn't open addressbook." +msgstr "Impossible d'ouvrir le carnet d'adresses." + +# 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/merge-evolution.c:341 +msgid "Couldn't list available fields." +msgstr "Impossible d'énumérer les champs disponibles." + +#: ../src/merge-evolution.c:377 +msgid "Couldn't get contacts." +msgstr "Impossible d'obtenir les contacts." + +# src/print_copies.c:193 +# src/print_copies.c:193 +# src/print_copies.c:171 +# src/print_copies.c:170 +#: ../src/wdgt-print-copies.c:153 +msgid "Sheets:" +msgstr "Feuilles :" + +# src/print_copies.c:213 +# src/print_copies.c:213 +# src/print_copies.c:191 +# src/print_copies.c:190 +#: ../src/wdgt-print-copies.c:173 +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/wdgt-print-copies.c:178 +msgid "to:" +msgstr "à :" + +# src/print_copies_merge.c:197 +# src/print_merge.c:170 +#: ../src/wdgt-print-merge.c:154 +msgid "Start on label" +msgstr "Commencer par l'étiquette" + +# src/print_copies_merge.c:206 +# src/print_merge.c:179 +#: ../src/wdgt-print-merge.c:159 +msgid "on 1st sheet" +msgstr "en 1ère page" + +# src/print.c:153 +# src/print.c:153 +# src/print_copies_merge.c:173 +# src/print_merge.c:195 +#: ../src/wdgt-print-merge.c:168 +msgid "Copies:" +msgstr "Copies :" + +# src/rotate_select.c:187 +# src/rotate_select.c:187 +# src/print_copies_merge.c:186 +# src/print_merge.c:188 +#: ../src/wdgt-print-merge.c:173 +msgid "Collate" +msgstr "Assembler" + +#: ../src/wdgt-media-select.c:288 ../src/wdgt-media-select.c:292 +#: ../src/wdgt-media-select.c:297 ../src/wdgt-media-select.c:306 +#: ../src/wdgt-media-select.c:309 ../src/wdgt-media-select.c:402 +#: ../src/wdgt-media-select.c:609 ../src/wdgt-media-select.c:618 +msgid "Any" +msgstr "Tous" + +# src/media_select.c:515 +# src/media_select.c:481 +# src/media_select.c:353 +#: ../src/wdgt-media-select.c:643 +#, c-format +msgid "%d per sheet" +msgstr "%d par feuille" + +# src/media_select.c:522 +# src/media_select.c:488 +# src/media_select.c:367 +#: ../src/wdgt-media-select.c:673 +#, 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/wdgt-media-select.c:678 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: ../src/wdgt-media-select.c:689 ../src/wdgt-media-select.c:703 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s diamètre" + +#: ../src/wdgt-media-select.c:693 ../src/wdgt-media-select.c:707 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s diamètre" + +#: ../src/wdgt-media-select.c:781 +msgid "No recent templates found." +msgstr "Aucun patron récent trouvé." + +#: ../src/wdgt-media-select.c:782 +msgid "Try selecting a template from the \"Search all templates\" page." +msgstr "Essayez de sélectionner un patron dans l'onglet « Tous les patrons »." + +#: ../src/wdgt-media-select.c:861 +msgid "No match." +msgstr "Aucune correspondance." + +#: ../src/wdgt-media-select.c:862 +msgid "Try selecting a different brand, page size or category." +msgstr "" +"Essayez de sélectionner une marque, une taille de page ou une catégorie différente." + +# src/merge_ui_text.c:334 +# src/merge_ui_text.c:334 +#. This is the default custom color +#: ../src/mygal/color-palette.c:389 +msgid "custom" +msgstr "personnalisé" + +# 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 +#. "Custom" color - we'll pop up a GtkColorButton +#: ../src/mygal/color-palette.c:431 +msgid "Custom Color:" +msgstr "Couleur personnalisée :" + +#: ../src/mygal/color-palette.c:439 +msgid "Choose Custom Color" +msgstr "Choisir une couleur personnalisée" + +#: ../src/mygal/color-palette.c:572 +msgid "black" +msgstr "noir" + +#: ../src/mygal/color-palette.c:573 +msgid "light brown" +msgstr "brun clair" + +#: ../src/mygal/color-palette.c:574 +msgid "brown gold" +msgstr "brun jaune" + +#: ../src/mygal/color-palette.c:575 +msgid "dark green #2" +msgstr "vert foncé n°2" + +#: ../src/mygal/color-palette.c:576 +msgid "navy" +msgstr "bleu marine" + +#: ../src/mygal/color-palette.c:577 ../src/mygal/color-palette.c:633 +msgid "dark blue" +msgstr "bleu foncé" + +#: ../src/mygal/color-palette.c:578 +msgid "purple #2" +msgstr "violet n°2" + +#: ../src/mygal/color-palette.c:579 +msgid "very dark gray" +msgstr "gris très foncé" + +#: ../src/mygal/color-palette.c:582 ../src/mygal/color-palette.c:638 +msgid "dark red" +msgstr "rouge foncé" + +#: ../src/mygal/color-palette.c:583 +msgid "red-orange" +msgstr "rouge orange" + +#: ../src/mygal/color-palette.c:584 +msgid "gold" +msgstr "jaune" + +#: ../src/mygal/color-palette.c:585 +msgid "dark green" +msgstr "vert foncé" + +#: ../src/mygal/color-palette.c:586 ../src/mygal/color-palette.c:639 +msgid "dull blue" +msgstr "bleu pâle" + +#: ../src/mygal/color-palette.c:587 ../src/mygal/color-palette.c:640 +msgid "blue" +msgstr "bleu" + +#: ../src/mygal/color-palette.c:588 +msgid "dull purple" +msgstr "violet pâle" + +#: ../src/mygal/color-palette.c:589 +msgid "dark grey" +msgstr "gris foncé" + +#: ../src/mygal/color-palette.c:592 +msgid "red" +msgstr "rouge" + +#: ../src/mygal/color-palette.c:593 +msgid "orange" +msgstr "orange" + +#: ../src/mygal/color-palette.c:594 +msgid "lime" +msgstr "tilleul" + +#: ../src/mygal/color-palette.c:595 +msgid "dull green" +msgstr "vert pâle" + +#: ../src/mygal/color-palette.c:596 +msgid "dull blue #2" +msgstr "bleu pâle n°2" + +#: ../src/mygal/color-palette.c:597 +msgid "sky blue #2" +msgstr "bleu ciel n°2" + +#: ../src/mygal/color-palette.c:598 ../src/mygal/color-palette.c:637 +msgid "purple" +msgstr "violet" + +#: ../src/mygal/color-palette.c:599 +msgid "gray" +msgstr "gris" + +# 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/mygal/color-palette.c:602 ../src/mygal/color-palette.c:634 +msgid "magenta" +msgstr "magenta" + +#: ../src/mygal/color-palette.c:603 +msgid "bright orange" +msgstr "orange vif" + +#: ../src/mygal/color-palette.c:604 ../src/mygal/color-palette.c:635 +msgid "yellow" +msgstr "jaune" + +# src/prop_vector.c:245 +# src/prop_vector.c:224 +# src/prop_vector.c:224 +#: ../src/mygal/color-palette.c:605 +msgid "green" +msgstr "vert" + +#: ../src/mygal/color-palette.c:606 ../src/mygal/color-palette.c:636 +msgid "cyan" +msgstr "cyan" + +#: ../src/mygal/color-palette.c:607 +msgid "bright blue" +msgstr "bleu vif" + +#: ../src/mygal/color-palette.c:608 ../src/mygal/color-palette.c:625 +msgid "red purple" +msgstr "rouge violet" + +#: ../src/mygal/color-palette.c:609 +msgid "light grey" +msgstr "gris clair" + +#: ../src/mygal/color-palette.c:612 ../src/mygal/color-palette.c:629 +msgid "pink" +msgstr "rose" + +#: ../src/mygal/color-palette.c:613 +msgid "light orange" +msgstr "orange clair" + +#: ../src/mygal/color-palette.c:614 ../src/mygal/color-palette.c:626 +msgid "light yellow" +msgstr "jaune clair" + +#: ../src/mygal/color-palette.c:615 +msgid "light green" +msgstr "vert clair" + +#: ../src/mygal/color-palette.c:616 +msgid "light cyan" +msgstr "cyan clair" + +#: ../src/mygal/color-palette.c:617 ../src/mygal/color-palette.c:627 +msgid "light blue" +msgstr "bleu clair" + +#: ../src/mygal/color-palette.c:618 ../src/mygal/color-palette.c:631 +msgid "light purple" +msgstr "violet clair" + +#: ../src/mygal/color-palette.c:619 +msgid "white" +msgstr "blanc" + +#: ../src/mygal/color-palette.c:624 +msgid "purplish blue" +msgstr "bleu violacé" + +#: ../src/mygal/color-palette.c:628 +msgid "dark purple" +msgstr "violet foncé" + +#: ../src/mygal/color-palette.c:630 +msgid "sky blue" +msgstr "bleu ciel" + +#: ../src/critical-error-handler.c:73 +msgid "gLabels Fatal Error!" +msgstr "Erreur fatale de gLabels !" + +# src/preferences.c:92 +# src/prefs.c:101 +# src/prefs.c:92 +# src/prefs.c:86 +#: ../src/warning-handler.c:73 +msgid "gLabels Error!" +msgstr "Erreur de gLabels !" + +#. Create and append an "Other" entry. +#: ../libglabels/db.c:118 +msgid "Other" +msgstr "Autre" + +# src/prop_text_entry.c:196 +# src/prop_text_entry.c:196 +#. Create and append a "User defined" entry. +#: ../libglabels/db.c:131 +msgid "User defined" +msgstr "Défini par l'utilisateur" + +#: ../libglabels/db.c:482 +msgid "" +"Unable to locate paper size definitions. Libglabels may not be installed " +"correctly!" +msgstr "" +"Impossible de trouver les définitions de tailles de papier. Il se peut que " +"Libglabels ne soit pas correctement installé." + +#: ../libglabels/db.c:875 +msgid "" +"Unable to locate category definitions. Libglabels may not be installed " +"correctly!" +msgstr "" +"Impossible de trouver les définitions de catégorie. Il se peut que " +"Libglabels ne soit pas correctement installé." + +#: ../libglabels/db.c:1461 +msgid "" +"Unable to locate any template files. Libglabels may not be installed " +"correctly!" +msgstr "" +"Impossible de trouver les fichiers modèles. Il se peut que Libglabels ne " +"soit pas correctement installé." + +#: ../libglabels/db.c:1538 +#, c-format +msgid "Generic %s full page template" +msgstr "Patron générique de page entière %s" + +#: ../libglabels/xml-template.c:227 +msgid "Missing name or brand/part attributes." +msgstr "Attribut nom ou marque manquant." + +#. This should always be an id, but just in case a name +#. slips by! +#: ../libglabels/xml-template.c:244 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "Taille de papier avec id « %s » inconnue, essai avec le nom" + +#: ../libglabels/xml-template.c:256 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "Identifiant ou nom de taille de papier « %s » inconnu" + +#: ../libglabels/xml-template.c:615 +msgid "" +"Missing required \"brand\" or \"part\" attribute, trying deprecated name." +msgstr "" +"Attribut « brand » (marque) ou « part » (article) manquant, essai avec un " +"ancien nom." + +#: ../libglabels/xml-template.c:625 +msgid "Name attribute also missing." +msgstr "L'attribut nom manque également." + +#: ../data/glade/merge-properties-dialog.glade.h:1 +msgid "Record selection/preview" +msgstr "Sélection/Aperçu des enregistrements" + +# src/merge_properties.c:131 +# src/merge_properties.c:131 +#: ../data/glade/merge-properties-dialog.glade.h:2 +msgid "Source" +msgstr "Source" + +# src/prop_text.c:214 +# src/prop_text.c:199 +# src/merge_properties.c:143 +# src/merge_properties.c:143 +#: ../data/glade/merge-properties-dialog.glade.h:3 +msgid "Format:" +msgstr "Format :" + +# src/merge_properties.c:158 +# src/merge_properties.c:158 +#: ../data/glade/merge-properties-dialog.glade.h:4 +msgid "Location:" +msgstr "Emplacement :" + +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:85 +# src/menu.c:85 +#: ../data/glade/merge-properties-dialog.glade.h:5 +msgid "Select all" +msgstr "Tout sélectionner" + +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:85 +# src/menu.c:85 +#: ../data/glade/merge-properties-dialog.glade.h:6 +msgid "Unselect all" +msgstr "Désélectionner tout" + +#: ../data/glade/merge-properties-dialog.glade.h:7 +#: ../data/glade/object-editor.glade.h:39 +msgid "dialog1" +msgstr "dialog1" + +# src/file.c:98 +# src/file.c:98 +# src/file.c:109 +# src/file.c:109 +#: ../data/glade/new-label-dialog.glade.h:1 +msgid "Label orientation" +msgstr "Orientation de l'étiquette" + +# src/file.c:87 +# src/file.c:87 +# src/file.c:98 +# src/file.c:98 +#: ../data/glade/new-label-dialog.glade.h:2 +msgid "Media type" +msgstr "Type de média" + +# src/prop_bc.c:202 +# src/prop_bc.c:182 +# src/prop_bc.c:182 +#: ../data/glade/object-editor.glade.h:2 +#, no-c-format +msgid "%" +msgstr "%" + +#: ../data/glade/object-editor.glade.h:3 +msgid "00000000000 00000" +msgstr "00000000000 00000" + +#: ../data/glade/object-editor.glade.h:4 +msgid "Xxx object properties" +msgstr "Xxx Propriétés de l'objet" + +# src/prop_text.c:277 +# src/prop_text.c:264 +# src/prop_text.c:248 +# src/prop_text.c:248 +#: ../data/glade/object-editor.glade.h:5 ../data/glade/prefs-dialog.glade.h:7 +msgid "Alignment:" +msgstr "Alignement :" + +#: ../data/glade/object-editor.glade.h:6 +msgid "Allow merge to automatically shrink text" +msgstr "Permettre à la fusion de diminuer automatiquement la taille du texte" + +# src/prop_vector.c:207 +# src/prop_vector.c:228 +# src/prop_vector.c:207 +# src/prop_vector.c:207 +#: ../data/glade/object-editor.glade.h:7 +msgid "Angle:" +msgstr "Angle :" + +#: ../data/glade/object-editor.glade.h:8 +msgid "Checksum" +msgstr "Somme de contrôle" + +# 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 +#: ../data/glade/object-editor.glade.h:9 ../data/glade/prefs-dialog.glade.h:8 +msgid "Color:" +msgstr "Couleur :" + +#: ../data/glade/object-editor.glade.h:11 +msgid "Enable shadow" +msgstr "Activer l'ombrage" + +# 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 +#: ../data/glade/object-editor.glade.h:12 +msgid "Family:" +msgstr "Famille :" + +# 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 +#: ../data/glade/object-editor.glade.h:13 +msgid "File:" +msgstr "Fichier :" + +# 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 +#: ../data/glade/object-editor.glade.h:14 +msgid "Fill" +msgstr "Remplissage" + +# src/prop_size.c:220 +# src/prop_size.c:198 +# src/prop_size.c:198 +#: ../data/glade/object-editor.glade.h:15 +#: ../data/glade/template-designer.glade.h:30 +msgid "Height:" +msgstr "Hauteur :" + +# src/prop_text_entry.c:196 +# src/prop_text_entry.c:196 +#: ../data/glade/object-editor.glade.h:17 +msgid "Insert merge field" +msgstr "Insérer un champ de fusion" + +# src/prop_bc_data.c:196 src/prop_text_entry.c:180 +# src/prop_bc_data.c:196 src/prop_text_entry.c:180 +#: ../data/glade/object-editor.glade.h:18 +msgid "Key:" +msgstr "Clé :" + +# src/prop_vector.c:196 +# src/prop_vector.c:202 +# src/prop_vector.c:183 +# src/prop_vector.c:183 +#: ../data/glade/object-editor.glade.h:19 +msgid "Length:" +msgstr "Longueur :" + +#: ../data/glade/object-editor.glade.h:21 +#: ../data/glade/prefs-dialog.glade.h:12 +msgid "Line Spacing:" +msgstr "Espacement :" + +# src/prop_bc_data.c:176 +# src/prop_bc_data.c:176 +#: ../data/glade/object-editor.glade.h:22 +msgid "Literal:" +msgstr "Littéral :" + +#: ../data/glade/object-editor.glade.h:23 +msgid "Opacity:" +msgstr "Opacité :" + +# 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 +#: ../data/glade/object-editor.glade.h:24 +msgid "Position" +msgstr "Position" + +# src/item_image.c:341 +# src/item_image.c:340 +# src/item_image.c:342 +# src/item_image.c:342 +#: ../data/glade/object-editor.glade.h:25 +msgid "Reset image size" +msgstr "Restaurer la taille d'image" + +# src/menu.c:86 +# src/menu.c:86 +# src/menu.c:85 +# src/menu.c:85 +#: ../data/glade/object-editor.glade.h:26 +msgid "Select A File" +msgstr "Sélectionner un fichier" + +#: ../data/glade/object-editor.glade.h:27 +msgid "Shadow" +msgstr "Ombre" + +# 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 +#: ../data/glade/object-editor.glade.h:28 +msgid "Size" +msgstr "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 +#: ../data/glade/object-editor.glade.h:29 +msgid "Size:" +msgstr "Taille :" + +# src/item_barcode.c:347 +# src/item_barcode.c:353 +# src/item_barcode.c:330 +# src/item_barcode.c:330 +#: ../data/glade/object-editor.glade.h:30 +msgid "Style" +msgstr "Style" + +# src/item_barcode.c:347 +# src/item_barcode.c:353 +# src/item_barcode.c:330 +# src/item_barcode.c:330 +#: ../data/glade/object-editor.glade.h:31 +msgid "Style:" +msgstr "Style :" + +# 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 +#: ../data/glade/object-editor.glade.h:33 +#: ../data/glade/prefs-dialog.glade.h:20 +#: ../data/glade/template-designer.glade.h:61 +msgid "Width:" +msgstr "Largeur :" + +#: ../data/glade/object-editor.glade.h:34 +msgid "X Offset:" +msgstr "Décalage X :" + +# src/prop_position.c:192 +# src/prop_position.c:173 +# src/prop_position.c:173 +#: ../data/glade/object-editor.glade.h:35 +msgid "X:" +msgstr "X :" + +#: ../data/glade/object-editor.glade.h:36 +msgid "Y Offset:" +msgstr "Décalage Y :" + +# src/prop_position.c:212 +# src/prop_position.c:191 +# src/prop_position.c:191 +#: ../data/glade/object-editor.glade.h:37 +msgid "Y:" +msgstr "Y :" + +# src/prop_vector.c:245 +# src/prop_vector.c:224 +# src/prop_vector.c:224 +#: ../data/glade/object-editor.glade.h:38 +msgid "degrees" +msgstr "degrés" + +#: ../data/glade/object-editor.glade.h:40 +msgid "digits:" +msgstr "chiffres :" + +# src/prop_text.c:214 +# src/prop_text.c:199 +# src/merge_properties.c:143 +# src/merge_properties.c:143 +#: ../data/glade/object-editor.glade.h:41 +msgid "format:" +msgstr "format :" + +#: ../data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr " " + +#: ../data/glade/prefs-dialog.glade.h:2 +msgid "Default page size" +msgstr "Taille de page par défaut" + +#: ../data/glade/prefs-dialog.glade.h:3 +msgid "Fill" +msgstr "Remplissage" + +#: ../data/glade/prefs-dialog.glade.h:4 +msgid "Line" +msgstr "Ligne" + +#: ../data/glade/prefs-dialog.glade.h:5 +msgid "Text" +msgstr "Texte" + +#: ../data/glade/prefs-dialog.glade.h:6 +msgid "Units" +msgstr "Unités" + +# src/prop_text.c:214 +# src/prop_text.c:199 +# src/prop_text.c:181 +# src/prop_text.c:181 +#: ../data/glade/prefs-dialog.glade.h:9 +msgid "Font:" +msgstr "Police :" + +#: ../data/glade/prefs-dialog.glade.h:10 +msgid "ISO A4" +msgstr "ISO A4" + +# src/prefs.c:265 +# src/prefs.c:243 +# src/prefs.c:237 +#: ../data/glade/prefs-dialog.glade.h:11 +msgid "Inches" +msgstr "Pouces" + +# src/prop_bc.c:189 +# src/prop_bc.c:187 +# src/prop_bc.c:168 +# src/prop_bc.c:168 +#: ../data/glade/prefs-dialog.glade.h:13 +msgid "Locale" +msgstr "Localisation" + +# src/prefs.c:271 +# src/prefs.c:250 +# src/prefs.c:244 +#: ../data/glade/prefs-dialog.glade.h:14 +msgid "Millimeters" +msgstr "Millimètres" + +#: ../data/glade/prefs-dialog.glade.h:15 +msgid "Object defaults" +msgstr "Paramètres par défaut pour les objets" + +# src/print.c:149 +# src/prefs.c:259 +# src/prefs.c:237 +# src/prefs.c:231 +#: ../data/glade/prefs-dialog.glade.h:16 +msgid "Points" +msgstr "Points" + +#: ../data/glade/prefs-dialog.glade.h:17 +msgid "Select default properties for new objects." +msgstr "Sélectionner les propriétés par défaut pour les nouveaux objets." + +#: ../data/glade/prefs-dialog.glade.h:18 +msgid "Select locale specific behavior." +msgstr "Sélectionnez les paramètres de localisation" + +#. Most popular (at top of list) +#: ../data/glade/prefs-dialog.glade.h:19 +#: ../data/templates/paper-sizes.xml.h:29 +msgid "US Letter" +msgstr "Letter US" + +# src/print.c:171 +# src/print.c:171 +# src/print.c:186 +# src/print_dialog.c:141 +#: ../data/glade/print-custom-widget.glade.h:1 +msgid "Options" +msgstr "Options" + +#: ../data/glade/print-custom-widget.glade.h:2 +msgid "Print control (Merge)" +msgstr "Contrôle d'impression (fusion)" + +#: ../data/glade/print-custom-widget.glade.h:3 +msgid "Print control (Simple)" +msgstr "Contrôle d'impression (simple)" + +#: ../data/glade/property-bar.glade.h:1 +msgid "Bold" +msgstr "Gras" + +# 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 +#: ../data/glade/property-bar.glade.h:2 +msgid "Center align" +msgstr "Centrer" + +# src/mdi.c:482 +# src/mdi.c:488 +# src/mdi.c:459 +# src/mdi.c:459 +#: ../data/glade/property-bar.glade.h:4 +msgid "Font family" +msgstr "Famille de police" + +# src/mdi.c:482 +# src/mdi.c:488 +# src/mdi.c:459 +# src/mdi.c:459 +#: ../data/glade/property-bar.glade.h:5 +msgid "Font size" +msgstr "Taille de police" + +#: ../data/glade/property-bar.glade.h:6 +msgid "Italic" +msgstr "Italique" + +#: ../data/glade/property-bar.glade.h:7 +msgid "Left align" +msgstr "Aligner à gauche" + +#: ../data/glade/property-bar.glade.h:9 +msgid "Line width" +msgstr "Largeur de la ligne" + +#: ../data/glade/property-bar.glade.h:10 +msgid "Right align" +msgstr "Aligner à droite" + +#: ../data/glade/property-bar.glade.h:11 +msgid "Text Color" +msgstr "Couleur du texte" + +#: ../data/glade/property-bar.glade.h:12 +msgid "Text color" +msgstr "Couleur du texte" + +#: ../data/glade/template-designer.glade.h:1 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(ex : « Étiquettes de publipostage », « Cartes de visite », ...)" + +#: ../data/glade/template-designer.glade.h:2 +msgid "(e.g., 8163A)" +msgstr "(ex : 8163A)" + +#: ../data/glade/template-designer.glade.h:3 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(ex : Avery, Acme, ...)" + +#: ../data/glade/template-designer.glade.h:4 +msgid "1. Outer radius:" +msgstr "1. Rayon extérieur :" + +#: ../data/glade/template-designer.glade.h:5 +msgid "1. Radius:" +msgstr "1. Rayon :" + +# 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 +#: ../data/glade/template-designer.glade.h:6 +msgid "1. Width:" +msgstr "1. Largeur :" + +# src/prop_size.c:220 +# src/prop_size.c:198 +# src/prop_size.c:198 +#: ../data/glade/template-designer.glade.h:7 +msgid "2. Height:" +msgstr "2. Hauteur :" + +#: ../data/glade/template-designer.glade.h:8 +msgid "2. Inner radius:" +msgstr "2. Rayon Intérieur :" + +#: ../data/glade/template-designer.glade.h:9 +msgid "2. Waste (overprint allowed):" +msgstr "2. Déchet (impression en surcharge autorisée) :" + +#: ../data/glade/template-designer.glade.h:10 +msgid "3. Clipping width:" +msgstr "3. Largeur de rognure :" + +#: ../data/glade/template-designer.glade.h:11 +msgid "3. Margin" +msgstr "3. Marge" + +#: ../data/glade/template-designer.glade.h:12 +msgid "3. Round (radius of corner):" +msgstr "3. Arrondi (rayon du coin) :" + +#: ../data/glade/template-designer.glade.h:13 +msgid "4. Clipping height:" +msgstr "4. Hauteur de rognure :" + +#: ../data/glade/template-designer.glade.h:14 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "4. Déchet horiz. (impression en surcharge autorisée) :" + +#: ../data/glade/template-designer.glade.h:15 +msgid "5. Vert. waste (overprint allowed):" +msgstr "5. Déchet vert. (impression en surcharge autorisée) :" + +#: ../data/glade/template-designer.glade.h:16 +msgid "5. Waste (overprint allowed):" +msgstr "5. Déchet (impression en surcharge autorisée) :" + +#: ../data/glade/template-designer.glade.h:17 +msgid "6. Margin" +msgstr "6. Marge" + +#: ../data/glade/template-designer.glade.h:18 +msgid "Brand/Manufacturer:" +msgstr "Marque/Fabricant :" + +#: ../data/glade/template-designer.glade.h:19 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD (y compris CD au format carte de crédit)" + +#: ../data/glade/template-designer.glade.h:20 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"Félicitations !\n" +"Vous avez terminé la création d'un patron gLabels.\n" +"Si vous voulez accepter et sauver votre création, cliquez sur « Appliquer ».\n" +"\n" +"Dans le cas contraire, vous pouvez cliquer sur « Annuler » pour abandonner " +"votre création ou « Précédent » pour continuer d'éditer cette création." + +# src/media_select.c:216 +# src/media_select.c:242 +# src/media_select.c:222 +# src/media_select.c:222 +#: ../data/glade/template-designer.glade.h:27 +msgid "Description:" +msgstr "Description :" + +#: ../data/glade/template-designer.glade.h:28 +msgid "Distance from left edge (x0):" +msgstr "Distance par rapport au bord gauche (x0) :" + +#: ../data/glade/template-designer.glade.h:29 +msgid "Distance from top edge (y0):" +msgstr "Distance pas rapport au bord haut (y0) :" + +#: ../data/glade/template-designer.glade.h:31 +msgid "Horizontal pitch (dx):" +msgstr "Espacement horizontal (dx) :" + +#: ../data/glade/template-designer.glade.h:32 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" +"Combien de dispositions votre patron contiendra-t-il ?\n" +"\n" +"Une disposition est un ensemble d'étiquettes ou de cartes qui peuvent être " +"rangés sur une simple grille.\n" +"La plupart des patrons n'ont besoin que d'une disposition, comme pour le " +"premier exemple.\n" +"Le deuxième exemple illustre le cas où deux dispositions sont nécessaires." + +# src/media_select.c:231 +# src/media_select.c:257 +# src/media_select.c:237 +# src/media_select.c:237 +#: ../data/glade/template-designer.glade.h:37 +msgid "Layout #1" +msgstr "Disposition n°1" + +# src/media_select.c:231 +# src/media_select.c:257 +# src/media_select.c:237 +# src/media_select.c:237 +#: ../data/glade/template-designer.glade.h:38 +msgid "Layout #2" +msgstr "Disposition n°2" + +#: ../data/glade/template-designer.glade.h:39 +msgid "Number across (nx):" +msgstr "Nombre horizontalement (nx) :" + +#: ../data/glade/template-designer.glade.h:40 +msgid "Number down (ny):" +msgstr "Nombre verticalement (ny) :" + +#: ../data/glade/template-designer.glade.h:41 +msgid "Number of layouts:" +msgstr "Nombre de dispositions :" + +# src/media_select.c:221 +# src/media_select.c:247 +# src/media_select.c:227 +# src/media_select.c:227 +#: ../data/glade/template-designer.glade.h:42 +#: ../data/glade/wdgt-media-select.glade.h:3 +msgid "Page size:" +msgstr "Taille de page :" + +#: ../data/glade/template-designer.glade.h:43 +msgid "Part #:" +msgstr "N° Ref :" + +#: ../data/glade/template-designer.glade.h:44 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "Entrez les informations suivantes à propos du fabricant de papier." + +#: ../data/glade/template-designer.glade.h:45 +msgid "Please enter the following layout information." +msgstr "Entrez les informations suivantes sur la disposition." + +#: ../data/glade/template-designer.glade.h:46 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "Entrez les paramètres de taille suivants pour une étiquette." + +#: ../data/glade/template-designer.glade.h:47 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" +"Entrez les paramètres de taille suivant pour une carte ou une étiquette." + +#: ../data/glade/template-designer.glade.h:48 +msgid "Please select the basic shape of the labels or cards." +msgstr "Sélectionnez la forme de base des cartes ou des étiquettes." + +#: ../data/glade/template-designer.glade.h:49 +msgid "Please select the page size of the template stationery." +msgstr "Sélectionnez la taille du papier." + +# src/print_copies_merge.c:206 +# src/print_merge.c:179 +#: ../data/glade/template-designer.glade.h:50 +msgid "Print test sheet" +msgstr "Imprimer une page de tests" + +#: ../data/glade/template-designer.glade.h:51 +msgid "Rectangular or square (can have rounded corners)" +msgstr "Rectangulaire ou carré (éventuellement à bords arrondis)" + +#: ../data/glade/template-designer.glade.h:52 +msgid "Round" +msgstr "Rond" + +#: ../data/glade/template-designer.glade.h:53 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"Patron nécessitant\n" +"deux dispositions." + +#: ../data/glade/template-designer.glade.h:55 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"Patron nécessitant\n" +"une disposition." + +#: ../data/glade/template-designer.glade.h:57 +msgid "Vertical pitch (dy):" +msgstr "Espacement vertical (dy) :" + +#: ../data/glade/template-designer.glade.h:58 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"Bienvenue dans le créateur de patrons de gLabels.\n" +"Ce questionnaire va vous aider à créer un patron personnalisé pour glabels." + +#: ../data/glade/template-designer.glade.h:62 +msgid "cd_size_page" +msgstr "cd_size_page" + +#: ../data/glade/template-designer.glade.h:63 +msgid "finish_page" +msgstr "finish_page" + +#: ../data/glade/template-designer.glade.h:65 +msgid "layout_page" +msgstr "layout_page" + +#: ../data/glade/template-designer.glade.h:66 +msgid "name_page" +msgstr "name_page" + +#: ../data/glade/template-designer.glade.h:67 +msgid "nlayouts_page" +msgstr "nlayouts_page" + +#: ../data/glade/template-designer.glade.h:68 +msgid "pg_size_page" +msgstr "pg_size_page" + +#: ../data/glade/template-designer.glade.h:69 +msgid "rect_size_page" +msgstr "rect_size_page" + +#: ../data/glade/template-designer.glade.h:70 +msgid "round_size_page" +msgstr "round_size_page" + +#: ../data/glade/template-designer.glade.h:71 +msgid "shape_page" +msgstr "shape_page" + +#: ../data/glade/template-designer.glade.h:72 +msgid "start_page" +msgstr "start_page" + +#: ../data/glade/wdgt-media-select.glade.h:1 +msgid "Brand:" +msgstr "Marque :" + +#: ../data/glade/wdgt-media-select.glade.h:2 +msgid "Category:" +msgstr "Catégorie :" + +# src/tools.c:70 +# src/tools.c:70 +# src/menu.c:106 src/menu.c:197 +# src/menu.c:106 src/menu.c:197 +#: ../data/glade/wdgt-media-select.glade.h:4 +msgid "Recent templates" +msgstr "Patrons récents" + +#: ../data/glade/wdgt-media-select.glade.h:5 +msgid "Search all templates" +msgstr "Tous les patrons" + +# src/rotate_select.c:187 +# src/rotate_select.c:187 +# src/rotate_select.c:167 +# src/rotate_select.c:169 +#: ../data/glade/wdgt-rotate-label.glade.h:1 +msgid "Rotate" +msgstr "Rotation" + +#. Other ISO A series sizes +#: ../data/templates/paper-sizes.xml.h:2 +msgid "A0" +msgstr "A0" + +#: ../data/templates/paper-sizes.xml.h:3 +msgid "A1" +msgstr "A1" + +#: ../data/templates/paper-sizes.xml.h:4 +msgid "A10" +msgstr "A10" + +#: ../data/templates/paper-sizes.xml.h:5 +msgid "A2" +msgstr "A2" + +#: ../data/templates/paper-sizes.xml.h:6 +msgid "A3" +msgstr "A3" + +#: ../data/templates/paper-sizes.xml.h:7 +msgid "A4" +msgstr "A4" + +#: ../data/templates/paper-sizes.xml.h:8 +msgid "A5" +msgstr "A5" + +#: ../data/templates/paper-sizes.xml.h:9 +msgid "A6" +msgstr "A6" + +#: ../data/templates/paper-sizes.xml.h:10 +msgid "A7" +msgstr "A7" + +#: ../data/templates/paper-sizes.xml.h:11 +msgid "A8" +msgstr "A8" + +#: ../data/templates/paper-sizes.xml.h:12 +msgid "A9" +msgstr "A9" + +#. ISO B series sizes +#: ../data/templates/paper-sizes.xml.h:14 +msgid "B0" +msgstr "B0" + +#: ../data/templates/paper-sizes.xml.h:15 +msgid "B1" +msgstr "B1" + +#: ../data/templates/paper-sizes.xml.h:16 +msgid "B10" +msgstr "B10" + +#: ../data/templates/paper-sizes.xml.h:17 +msgid "B2" +msgstr "B2" + +#: ../data/templates/paper-sizes.xml.h:18 +msgid "B3" +msgstr "B3" + +#: ../data/templates/paper-sizes.xml.h:19 +msgid "B4" +msgstr "B4" + +#: ../data/templates/paper-sizes.xml.h:20 +msgid "B5" +msgstr "B5" + +#: ../data/templates/paper-sizes.xml.h:21 +msgid "B6" +msgstr "B6" + +#: ../data/templates/paper-sizes.xml.h:22 +msgid "B7" +msgstr "B7" + +#: ../data/templates/paper-sizes.xml.h:23 +msgid "B8" +msgstr "B8" + +#: ../data/templates/paper-sizes.xml.h:24 +msgid "B9" +msgstr "B9" + +#: ../data/templates/paper-sizes.xml.h:25 +msgid "US Executive" +msgstr "Exécutif US" + +#. Other US paper sizes +#: ../data/templates/paper-sizes.xml.h:27 +msgid "US Legal" +msgstr "Légal US" + +#: ../data/templates/categories.xml.h:1 +msgid "Any card" +msgstr "Toute carte" + +# src/file.c:183 +# src/file.c:183 +# src/file.c:213 +# src/file.c:213 +#: ../data/templates/categories.xml.h:2 +msgid "Any label" +msgstr "Toute étiquette" + +#: ../data/templates/categories.xml.h:3 +msgid "Business cards" +msgstr "Cartes de visite" + +#: ../data/templates/categories.xml.h:4 +msgid "CD/DVD or other media" +msgstr "CD/DVD ou autre support" + +#: ../data/templates/categories.xml.h:5 +msgid "Mailing/shipping products" +msgstr "Produits d'expédition" + +#: ../data/templates/categories.xml.h:6 +msgid "Rectangular labels" +msgstr "Étiquettes rectangulaires" + +#: ../data/templates/categories.xml.h:7 +msgid "Round labels" +msgstr "Étiquettes arrondies" + +# src/print_copies_merge.c:197 +# src/print_merge.c:170 +#: ../data/templates/categories.xml.h:8 +msgid "Square labels" +msgstr "Étiquettes carrées" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:2 +#: ../data/templates/avery-us-templates.xml.h:2 +#: ../data/templates/dymo-other-templates.xml.h:4 +#: ../data/templates/misc-iso-templates.xml.h:2 +#: ../data/templates/zweckform-iso-templates.xml.h:2 +msgid "Address Labels" +msgstr "Étiquettes d'adresses" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:4 +msgid "Address labels" +msgstr "Étiquettes d'adresses" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:6 +msgid "Allround labels" +msgstr "Étiquettes génériques" + +#. ============================================================ +#. =================================================================== +#. ******************************************************************** +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:8 +#: ../data/templates/avery-us-templates.xml.h:4 +#: ../data/templates/misc-iso-templates.xml.h:12 +#: ../data/templates/misc-us-templates.xml.h:4 +#: ../data/templates/zweckform-iso-templates.xml.h:6 +msgid "Business Cards" +msgstr "Cartes de visite" + +#. =============================================================== +#: ../data/templates/avery-iso-templates.xml.h:10 +msgid "CD Booklet" +msgstr "Livret de CD" + +#. =============================================================== +#: ../data/templates/avery-iso-templates.xml.h:12 +msgid "CD Inlet" +msgstr "Jaquette de CD" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. =============================================================== +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:14 +#: ../data/templates/avery-us-templates.xml.h:6 +#: ../data/templates/misc-iso-templates.xml.h:16 +#: ../data/templates/misc-us-templates.xml.h:8 +#: ../data/templates/zweckform-iso-templates.xml.h:8 +msgid "CD/DVD Labels" +msgstr "Étiquettes de CD/DVD" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:16 +#: ../data/templates/avery-us-templates.xml.h:12 +msgid "Diskette Labels" +msgstr "Étiquettes de disquette" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:18 +msgid "Diskette labels" +msgstr "Étiquettes de disquette" + +#. =============================================================== +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:20 +#: ../data/templates/misc-iso-templates.xml.h:36 +#: ../data/templates/misc-us-templates.xml.h:18 +#: ../data/templates/zweckform-iso-templates.xml.h:16 +msgid "Mailing Labels" +msgstr "Étiquettes de publipostage" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:22 +msgid "Mailing labels" +msgstr "Étiquettes de publipostage" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:24 +msgid "Mini Address Labels" +msgstr "Étiquettes de mini-adresse" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:26 +msgid "Mini Labels" +msgstr "Mini-étiquettes" + +# src/file.c:183 +# src/file.c:183 +# src/file.c:213 +# src/file.c:213 +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:28 +msgid "Shipping labels" +msgstr "Étiquettes postales" + +#. =================================================================== +#: ../data/templates/avery-other-templates.xml.h:2 +msgid "File Folder Labels" +msgstr "Étiquettes de dossier d'archives" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:8 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "Étiquettes de CD/DVD (étiquettes de disque)" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:10 +msgid "CD/DVD Labels (Spine Labels)" +msgstr "Étiquettes de CD/DVD (étiquettes de boîtier)" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. the LSK labels can be torn in half down the center +#: ../data/templates/avery-us-templates.xml.h:14 +msgid "Divider Labels" +msgstr "Étiquettes de division" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:16 +msgid "Filing Labels" +msgstr "Étiquettes pour dossiers" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:18 +msgid "Full Sheet Labels" +msgstr "Étiquettes pleine page" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:20 +msgid "ID Labels" +msgstr "Étiquettes d'identification" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:22 +msgid "Index Cards" +msgstr "Cartes d'index" + +# src/print_copies_merge.c:197 +# src/print_merge.c:170 +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:24 +msgid "Large Round Labels" +msgstr "Grandes étiquettes rondes" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:26 +msgid "Name Badge Labels" +msgstr "Étiquettes pour badges" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:28 +msgid "Post cards" +msgstr "Cartes postales" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:30 +#: ../data/templates/dymo-other-templates.xml.h:12 +msgid "Return Address Labels" +msgstr "Étiquettes d'adresse de retour" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:32 +#: ../data/templates/misc-us-templates.xml.h:28 +msgid "Round Labels" +msgstr "Étiquettes rondes" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:34 +msgid "Shipping Labels" +msgstr "Étiquettes postales" + +# src/print_copies_merge.c:197 +# src/print_merge.c:170 +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:36 +msgid "Small Round Labels" +msgstr "Petites étiquettes rondes" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:38 +msgid "Square Labels" +msgstr "Étiquettes carrées" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:40 +msgid "Tent Cards" +msgstr "Cartes chevalet" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:42 +msgid "Video Tape Face Labels" +msgstr "Étiquettes de face de cassette vidéo" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:44 +msgid "Video Tape Spine Labels" +msgstr "Étiquettes de dos de cassette vidéo" + +#: ../data/templates/brother-other-templates.xml.h:1 +msgid "Multi Purpose Labels 17mm x 54mm" +msgstr "Étiquettes multi usages 17x54 mm" + +#: ../data/templates/brother-other-templates.xml.h:2 +msgid "Shipping Labels 62mm x 100mm" +msgstr "Étiquettes postales 62x100 mm" + +#. +#. ********************************************************************* +#. ********************************************************************* +#. Labels for the Brother QL-500/550/650 PC Label Printers +#. +#. These templates work with the Brother Linux Printer CUPS Driver. It +#. is unknown if these work correctly with the foomatic print driver for +#. these printers. +#. +#. One difference from typical templates is that the template size is +#. not the actual media size - it is the size of the printable area, +#. which is smaller than the media size. This is because (at least with +#. the Brother driver) coordinates are relative the corner of this area. +#. +#. ********************************************************************* +#. ********************************************************************* +#. +#: ../data/templates/brother-other-templates.xml.h:20 +msgid "Standard Address Labels 29mm x 90mm" +msgstr "Étiquettes d'adresse standard 29x90 mm" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:2 +msgid "3.5in Diskette" +msgstr "Disquette 3,5 pouces" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:6 +msgid "File Folder" +msgstr "Dossier d'archives" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:8 +msgid "Hanging Folder" +msgstr "Dossier suspendu" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:10 +msgid "Large Address Labels" +msgstr "Grandes étiquettes d'adresses" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:14 +msgid "Shipping Address Labels" +msgstr "Étiquettes d'adresse postale" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:4 +#: ../data/templates/zweckform-iso-templates.xml.h:4 +msgid "Allround Labels" +msgstr "Étiquettes génériques" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:6 +msgid "Arch File Labels" +msgstr "Étiquettes de dossier d'archives" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:8 +msgid "Arch File Labels (large)" +msgstr "Étiquettes de dossier d'archives (grandes)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:10 +msgid "Arch File Labels (small)" +msgstr "Étiquettes de dossier d'archives (petites)" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:14 +msgid "CD Labels" +msgstr "Étiquettes de CD" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:18 +#: ../data/templates/misc-us-templates.xml.h:12 +msgid "CD/DVD Labels (face only)" +msgstr "Étiquettes de CD/DVD (face uniquement)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:20 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "Format standard d'étiquettes de CD/DVD (face uniquement)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:22 +msgid "Diskette Labels (face only)" +msgstr "Étiquettes de disquette (face uniquement)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:24 +msgid "EPSON Photo Stickers 16" +msgstr "Autocollants EPSON Photo 16" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:26 +msgid "Etiketten" +msgstr "Étiquettes" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:28 +msgid "Fridge Magnet Stickers" +msgstr "Autocollants magnétiques" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:30 +msgid "General Labels" +msgstr "Étiquettes générales" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:32 +msgid "Inkjet/Laser Labels 70x37mm" +msgstr "Étiquettes jet d'encre/laser 70x37 mm" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:38 +msgid "Mailing Labels-2 columns" +msgstr "Étiquettes de publipostage (2 colonnes)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:40 +msgid "Mailing Labels-3 columns" +msgstr "Étiquettes de publipostage (3 colonnes)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:42 +#: ../data/templates/misc-us-templates.xml.h:26 +msgid "PRO CD Labels 2-up (face only)" +msgstr "Étiquettes pour CD (2 ex, face uniquement)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:44 +#: ../data/templates/zweckform-iso-templates.xml.h:24 +msgid "Rectangular Labels" +msgstr "Étiquettes rectangulaires" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:46 +msgid "Video Labels (face only)" +msgstr "Étiquettes de vidéos (face uniquement)" + +#. =================================================================== +#: ../data/templates/misc-other-templates.xml.h:2 +msgid "Multi-Purpose Labels" +msgstr "Étiquettes multi-usages" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:2 +msgid "Business Card CD" +msgstr "CD carte de visite" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:6 +msgid "CD Template Rectangles" +msgstr "Modèle CD rectangle" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:10 +msgid "CD/DVD Labels (Face Only)" +msgstr "Étiquettes de CD/DVD (face uniquement)" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:14 +msgid "Cassette Labels" +msgstr "Étiquettes de cassette" + +# src/print_copies.c:210 +# src/print_copies.c:210 +# src/print_copies.c:188 +# src/print_copies.c:187 +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:16 +msgid "DLT Labels" +msgstr "Étiquettes DLT" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:20 +msgid "Microtube labels" +msgstr "Étiquettes microtube" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:22 +msgid "Mini-CD Labels" +msgstr "Étiquettes mini-CD" + +#: ../data/templates/misc-us-templates.xml.h:23 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "Étiquettes pour CD (2 ex, tranche uniquement)" + +#: ../data/templates/misc-us-templates.xml.h:24 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "Étiquettes pour CD (2 ex, face uniquement)" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:30 +msgid "Slimline CD Case (rightside up)" +msgstr "Boîtier CD mince (côté droit en haut)" + +#: ../data/templates/misc-us-templates.xml.h:31 +msgid "Slimline CD Case (upside down)" +msgstr "Boîtier CD mince (à l'envers)" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:10 +msgid "Correction and Cover-up Labels" +msgstr "Étiquettes de correction et de recouvrement" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:12 +msgid "File Back Labels" +msgstr "Étiquettes de dos de dossier" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:14 +msgid "Lever Arch File Labels" +msgstr "Étiquettes pour classeurs à levier" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:18 +msgid "Multi-purpose Stick+Lift Labels" +msgstr "Étiquettes enlevables multi-usages" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:20 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "Étiquettes de cartes QSL 70mm x 50,8mm" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:22 +msgid "Rectangular Copier Labels" +msgstr "Étiquettes rectangulaires pour copieur" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:26 +msgid "Video Labels (back)" +msgstr "Étiquettes vidéo (dos)" + +#: ../data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "Crée des étiquettes et des cartes de visite" + +#: ../data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "Créateur d'étiquettes gLabels" + +# src/item_text.c:467 +# src/item_text.c:467 +# src/item_text.c:482 +# src/item_text.c:482 +#: ../data/mime/glabels.keys.in.h:1 ../data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "Fichier de projet gLabels" + +#: ../barcode-0.98/compat/getopt.c:583 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s : l'option « %s » ambiguë\n" + +#: ../barcode-0.98/compat/getopt.c:607 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s : l'option « --%s » n'autorise pas d'argument\n" + +#: ../barcode-0.98/compat/getopt.c:612 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s : l'option « %c%s » n'autorise pas d'argument\n" + +#: ../barcode-0.98/compat/getopt.c:629 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s : l'option « %s » exige un argument\n" + +#. --option +#: ../barcode-0.98/compat/getopt.c:658 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s : option « --%s » inconnue\n" + +#. +option or -option +#: ../barcode-0.98/compat/getopt.c:662 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s : option « %c%s » inconnue\n" + +#. 1003.2 specifies the format of this message. +#: ../barcode-0.98/compat/getopt.c:688 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s : option -- %c non autorisée\n" + +#: ../barcode-0.98/compat/getopt.c:691 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s : option -- %c non valide\n" + +#: ../barcode-0.98/compat/getopt.c:727 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s : l'option exige un argument -- %c\n" diff --git a/po/it.po b/po/it.po new file mode 100644 index 00000000..09e23b7e --- /dev/null +++ b/po/it.po @@ -0,0 +1,2427 @@ +# translation of it.po to Italian +# Italian translation of glabels. +# Copyright (C) 2003 THE glabels'S COPYRIGHT HOLDER +# This file is distributed under the same license as the glabels package. +# Andrea , 2003. +# Daniele Medri , 2005. +# +# +msgid "" +msgstr "" +"Project-Id-Version: it\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-06-19 20:43-0400\n" +"PO-Revision-Date: 2005-06-27 09:34+0200\n" +"Last-Translator: Daniele Medri \n" +"Language-Team: Italian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit" + +#: src/glabels.c:116 +msgid "Could not initialize Bonobo!\n" +msgstr "Non è possibile inizializzare Bonobo!\n" + +#: src/glabels-batch.c:52 +msgid "print this message" +msgstr "stampa questo messaggio" + +#: src/glabels-batch.c:54 +msgid "print the version of glabels-batch being used" +msgstr "stampa la versione di glabels batch utilizzata" + +#: src/glabels-batch.c:56 +msgid "set output filename (default=\"output.ps\")" +msgstr "imposta il nome del file di output (default=\"output.ps\")" + +#: src/glabels-batch.c:56 src/glabels-batch.c:70 +msgid "filename" +msgstr "nome file" + +#: src/glabels-batch.c:58 +msgid "number of sheets (default=1)" +msgstr "numero di fogli (default=1)" + +#: src/glabels-batch.c:58 +msgid "sheets" +msgstr "fogli" + +#: src/glabels-batch.c:60 +msgid "number of copies (default=1)" +msgstr "numero di copie (default=1)" + +#: src/glabels-batch.c:60 +msgid "copies" +msgstr "copie" + +#: src/glabels-batch.c:62 +msgid "first label on first sheet (default=1)" +msgstr "prima etichetta del primo foglio (default=1)" + +#: src/glabels-batch.c:62 +msgid "first" +msgstr "primo" + +#: src/glabels-batch.c:64 src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "stampa bordi (per provare l'allineamento della stampante)" + +#: src/glabels-batch.c:66 src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "stampa al contrario (es. un'immagine riflessa)" + +#: src/glabels-batch.c:68 src/print-dialog.c:351 +msgid "print crop marks" +msgstr "stampa segni di taglio" + +#: src/glabels-batch.c:70 +msgid "input file for merging" +msgstr "file per la stampa unione" + +#: src/glabels-batch.c:107 +msgid "[OPTION...] GLABELS_FILE..." +msgstr "[OPTION...] GLABELS_FILE..." + +#: src/glabels-batch.c:127 +#, c-format +msgid "missing glabels file\n" +msgstr "file di glabels mancante\n" + +#: src/glabels-batch.c:158 +#, c-format +msgid "cannot perform document merge with glabels file %s\n" +msgstr "non è possibile unire i documenti con il file glabels %s\n" + +#: src/glabels-batch.c:182 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "non è possibile aprire il file glabels %s\n" + +#: src/window.c:244 +msgid "(none) - gLabels" +msgstr "(niente) - gLabels" + +#: src/window.c:414 +msgid "(modified)" +msgstr "(modificato)" + +#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 +msgid "_Select Mode" +msgstr "Modalità di _selezione" + +#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 +msgid "_Text" +msgstr "_Testo" + +#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 +msgid "_Line" +msgstr "_Linea" + +#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 +msgid "_Box" +msgstr "_Area" + +#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 +msgid "_Ellipse" +msgstr "_Ellisse" + +#: src/stock.c:70 data/ui/glabels-ui.xml.h:146 +msgid "_Image" +msgstr "_Immagine" + +#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 +msgid "Bar_code" +msgstr "_Codice a barre" + +#: src/stock.c:72 +msgid "_Merge Properties" +msgstr "Proprietà di _unione" + +#: src/stock.c:73 +msgid "Object _Properties" +msgstr "_Proprietà·Oggetto" + +#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 +msgid "Bring to _Front" +msgstr "Porta in _primo piano" + +#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 +msgid "Send to _Back" +msgstr "Porta in _secondo piano" + +#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 +msgid "Rotate _Left" +msgstr "Ruota a sinistra" + +#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 +msgid "Rotate _Right" +msgstr "Ruota a destra" + +#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "Capovolgi _orizzontalmente" + +#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "Capovolgi _verticalmente" + +#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 +msgid "_Lefts" +msgstr "_Sinistra" + +#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 +msgid "_Rights" +msgstr "_Destra" + +#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 +msgid "_Centers" +msgstr "_Centro" + +#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 +msgid "_Tops" +msgstr "_In alto" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "In basso" + +#: src/stock.c:85 +msgid "Centers" +msgstr "Centrato" + +#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "Etichetta ce_ntrata" + +#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "Colore di riempimento" + +#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "Colore Linea" + +#: src/stock.c:90 src/stock.c:92 +msgid "Linked" +msgstr "Collegato" + +#: src/stock.c:91 src/stock.c:93 +msgid "Not Linked" +msgstr "Nessun collegamento" + +#: src/ui-property-bar.c:345 src/object-editor.c:499 +msgid "Default" +msgstr "Predefinito" + +#: src/ui-property-bar.c:360 src/object-editor.c:512 +msgid "No fill" +msgstr "Nessun riempimento" + +#: src/ui-property-bar.c:375 src/object-editor.c:505 +msgid "No line" +msgstr "Nessuna linea" + +#: src/ui-sidebar.c:180 +msgid "Object properties" +msgstr "Proprietà oggetto" + +#: src/commands.c:385 +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/commands.c:399 +msgid "See the file AUTHORS for additional credits," +msgstr "Visualizza il file AUTHORS per informazioni aggiuntive." + +#: src/commands.c:400 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "oppure visita http://glabels.sourceforge.net/" + +#: src/commands.c:409 +msgid " " +msgstr " " + +#: src/commands.c:424 +msgid "glabels" +msgstr "glabels" + +#: src/file.c:100 +msgid "New Label or Card" +msgstr "Nuova etichetta o scheda" + +#: src/file.c:132 src/file.c:304 +msgid "Media Type" +msgstr "Tipo media" + +#: src/file.c:138 src/file.c:310 +msgid "Label orientation" +msgstr "Orientazione etichetta" + +#: src/file.c:269 +msgid "Label properties" +msgstr "Proprietà etichetta" + +#: src/file.c:452 src/file.c:870 +msgid "All files" +msgstr "Tutti i file" + +#: src/file.c:457 src/file.c:875 +msgid "gLabels documents" +msgstr "Documenti di gLabels" + +#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 +msgid "Empty file name selection" +msgstr "Selezione di un nome file vuoto" + +#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 +msgid "Please select a file or supply a valid file name" +msgstr "Per piacere, indica un file o un nome valido" + +#: src/file.c:519 src/file.c:631 +msgid "File does not exist" +msgstr "Il file non esiste" + +#: src/file.c:563 data/ui/glabels-ui.xml.h:74 +msgid "Open" +msgstr "Apri" + +#: src/file.c:565 +msgid "Open label" +msgstr "Apri etichetta" + +#: src/file.c:707 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "Non riesco ad aprire il file \"%s\"" + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "Non è un formato file supportato" + +#: src/file.c:797 src/file.c:979 src/file.c:1174 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "Non riesco a salvare il file \"%s\"" + +#: src/file.c:805 src/file.c:987 src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "" + +#: src/file.c:848 src/file.c:1048 +#, c-format +msgid "Save \"%s\" as" +msgstr "Salva \"%s\" come" + +#: src/file.c:935 src/file.c:1131 +msgid "Please supply a valid file name" +msgstr "Per piacere, indica un nome file valido" + +#: src/file.c:952 src/file.c:1147 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "Sovrascrivi il file \"%s\"?" + +#: src/file.c:960 src/file.c:1155 +msgid "File already exists." +msgstr "File già esistente." + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "Salva i cambiamenti al documento \"%s\" prima di chiudere?" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "I tuoi cambiamenti andranno persi se non salvi." + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "Chiudi senza salvare" + +#. Should not happen +#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 +#: data/glade/object-editor.glade.h:37 +msgid "points" +msgstr "punti" + +#: src/prefs.c:158 data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "pollici" + +#: src/prefs.c:160 +msgid "mm" +msgstr "mm" + +#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 +msgid "gLabels Preferences" +msgstr "Preferenze gLabels" + +#. +#. * Submenu: Order +#. +#: src/view.c:3574 data/ui/glabels-ui.xml.h:154 +msgid "_Order" +msgstr "_Ordine" + +#. +#. * Submenu: Rotate/Flip +#. +#: src/view.c:3595 data/ui/glabels-ui.xml.h:160 +msgid "_Rotate/Flip" +msgstr "_Ruota/capovolgi" + +#. +#. * Submenu: Align Horizontally +#. +#: src/view.c:3628 +msgid "Align _Horizontally" +msgstr "Allineamento _orizzontale" + +#. +#. * Submenu: Align Vertically +#. +#: src/view.c:3667 +msgid "Align _Vertically" +msgstr "Allineamento _verticale" + +#: src/view.c:3728 data/ui/glabels-ui.xml.h:137 +msgid "_Delete" +msgstr "Cancella" + +#. Build editor. +#: src/view-box.c:224 +msgid "Box object properties" +msgstr "Proprietà dell'oggetto area" + +#. Build editor. +#: src/view-ellipse.c:224 +msgid "Ellipse object properties" +msgstr "Proprietà dell'oggetto Ellisse" + +#. Build editor. +#: src/view-line.c:224 +msgid "Line object properties" +msgstr "Proprietà dell'oggetto Linea" + +#. Build editor. +#: src/view-image.c:223 +msgid "Image object properties" +msgstr "Proprietà dell'oggetto Immagine" + +#. Build editor. +#: src/view-text.c:251 +msgid "Text object properties" +msgstr "Proprietà dell'oggetto Testo" + +#: src/view-text.c:563 data/glade/object-editor.glade.h:28 +msgid "Text" +msgstr "Testo" + +#. Build editor. +#: src/view-barcode.c:210 +msgid "Barcode object properties" +msgstr "Proprietà dell'oggetto Codice a barre" + +#: src/view-barcode.c:580 src/print.c:1089 +msgid "Invalid barcode data" +msgstr "Codice a barre non valido" + +#: src/merge-properties-dialog.c:231 +msgid "Merge Properties" +msgstr "Proprietà di unione" + +#. ---- Source section ---- +#: src/merge-properties-dialog.c:237 +msgid "Source" +msgstr "Sorgente" + +#: src/merge-properties-dialog.c:245 +msgid "Format:" +msgstr "Formato:" + +#. Location line +#: src/merge-properties-dialog.c:273 +msgid "Location:" +msgstr "Posizione:" + +#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 +msgid "Select merge-database source" +msgstr "Seleziona sorgente unione-database" + +#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 +msgid "N/A" +msgstr "N/A" + +#. ---- Sample Fields section ---- +#: src/merge-properties-dialog.c:300 +msgid "Record selection/preview:" +msgstr "Selezione/anteprima record:" + +#: src/merge-properties-dialog.c:326 +msgid "Select" +msgstr "Seleziona" + +#: src/merge-properties-dialog.c:334 +msgid "Record/Field" +msgstr "Record/campo" + +#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 +msgid "Data" +msgstr "Dati" + +#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:81 +msgid "Print" +msgstr "Stampa" + +#: src/print-dialog.c:281 +msgid "_Job" +msgstr "Lavoro" + +#: src/print-dialog.c:286 +msgid "P_rinter" +msgstr "Stampante" + +#. ----------- Add simple-copies widget ------------ +#: src/print-dialog.c:314 +msgid "Copies" +msgstr "Copie" + +#. ------- Add merge control widget ------------ +#: src/print-dialog.c:322 +msgid "Document merge control" +msgstr "" + +#. ----------- Add custom print options area ------------ +#: src/print-dialog.c:330 +msgid "Options" +msgstr "Opzioni" + +#: src/print-dialog.c:553 src/print-dialog.c:592 +msgid "Print preview" +msgstr "Anteprima di stampa" + +#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 +msgid "gLabels Template Designer" +msgstr "Progettazione di modelli per gLabels" + +#: src/bc.c:60 +msgid "POSTNET (any)" +msgstr "POSTNET (qualsiasi)" + +#: src/bc.c:63 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (solo ZIP/CAP)" + +#: src/bc.c:66 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (ZIP/CAP+4)" + +#: src/bc.c:69 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: src/bc.c:72 +msgid "EAN (any)" +msgstr "EAN (qualsiasi)" + +#: src/bc.c:75 +msgid "EAN-8" +msgstr "EAN-8" + +#: src/bc.c:78 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: src/bc.c:81 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: src/bc.c:84 +msgid "EAN-13" +msgstr "EAN-13" + +#: src/bc.c:87 +msgid "EAN-13 +2" +msgstr "EAN-13 +2" + +#: src/bc.c:90 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: src/bc.c:93 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A o UPC-E)" + +#: src/bc.c:96 +msgid "UPC-A" +msgstr "UPC-A" + +#: src/bc.c:99 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: src/bc.c:102 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: src/bc.c:105 +msgid "UPC-E" +msgstr "UPC-E" + +#: src/bc.c:108 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: src/bc.c:111 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: src/bc.c:114 +msgid "ISBN" +msgstr "ISBN" + +#: src/bc.c:117 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: src/bc.c:120 +msgid "Code 39" +msgstr "Code 39" + +#: src/bc.c:123 +msgid "Code 128" +msgstr "Code 128" + +#: src/bc.c:126 +msgid "Code 128C" +msgstr "Code 128C" + +#: src/bc.c:129 +msgid "Code 128B" +msgstr "Code 128B" + +#: src/bc.c:132 +msgid "Interleaved 2 of 5" +msgstr "" + +#: src/bc.c:135 +msgid "Codabar" +msgstr "Codabar" + +#: src/bc.c:138 +msgid "MSI" +msgstr "MSI" + +#: src/bc.c:141 +msgid "Plessey" +msgstr "Plessey" + +#: src/label.c:569 +msgid "Untitled" +msgstr "Senza nome" + +#: src/xml-label.c:176 src/xml-label.c:213 +msgid "xmlParseFile error" +msgstr "" + +#: src/xml-label.c:250 +msgid "No document root" +msgstr "Nessun documento radice" + +#: src/xml-label.c:264 +msgid "Importing from glabels 0.1 format" +msgstr "" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "" + +#: src/xml-label.c:279 +msgid "Importing from glabels 1.91 format" +msgstr "" + +#: src/xml-label.c:282 +msgid "bad document, unknown glabels Namespace" +msgstr "" + +#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "" + +#: src/xml-label.c:348 src/xml-label-191.c:165 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "" + +#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "" + +#: src/xml-label.c:796 src/xml-label-191.c:605 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "" + +#: src/xml-label.c:962 libglabels/xml-template.c:535 +msgid "Utf8 conversion error." +msgstr "Conversione di errore Utf8." + +#: src/xml-label.c:969 libglabels/xml-template.c:542 +msgid "Problem saving xml file." +msgstr "Problema nel salvataggio del file xml" + +#. This should always be an id, but just in case a name +#. slips by! +#: src/xml-label-191.c:680 libglabels/xml-template.c:199 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "" + +#: src/xml-label-191.c:690 libglabels/xml-template.c:209 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "" + +#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 +msgid "None" +msgstr "Nessuno" + +#: src/merge-init.c:53 +msgid "Text file with comma delimeters (CSV)" +msgstr "" + +#: src/merge-init.c:60 +msgid "Text file with colon delimeters" +msgstr "" + +#: src/merge-init.c:67 +msgid "Text file with tab delimeters" +msgstr "" + +#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 +msgid "File:" +msgstr "File:" + +#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 +msgid "Key:" +msgstr "Chiave:" + +#: src/wdgt-print-copies.c:179 +msgid "Sheets:" +msgstr "Fogli:" + +#: src/wdgt-print-copies.c:197 +msgid "Labels" +msgstr "Etichette" + +#: src/wdgt-print-copies.c:200 +msgid "from:" +msgstr "da:" + +#: src/wdgt-print-copies.c:207 +msgid "to:" +msgstr "a:" + +#: src/wdgt-print-merge.c:178 +msgid "Start on label" +msgstr "" + +#: src/wdgt-print-merge.c:186 +msgid "on 1st sheet" +msgstr "nel 1° foglio" + +#: src/wdgt-print-merge.c:195 +msgid "Copies:" +msgstr "Copie:" + +#: src/wdgt-print-merge.c:201 +msgid "Collate" +msgstr "Fascicoli" + +#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 +msgid "Description:" +msgstr "Descrizione:" + +#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 +msgid "Page size:" +msgstr "Dimensioni·pagina:" + +#: src/wdgt-media-select.c:290 +msgid "Label size:" +msgstr "Dimensioni etichetta:" + +#: src/wdgt-media-select.c:301 +msgid "Layout:" +msgstr "Layout:" + +#: src/wdgt-media-select.c:578 +#, c-format +msgid "%d x %d (%d per sheet)" +msgstr "%d x %d (%d per foglio)" + +#: src/wdgt-media-select.c:582 +#, c-format +msgid "%d per sheet" +msgstr "%d per foglio" + +#: src/wdgt-media-select.c:614 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: src/wdgt-media-select.c:619 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s diametro" + +#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s diametro" + +#: src/wdgt-rotate-label.c:193 +msgid "Rotate" +msgstr "Girare" + +#. This is the default custom color +#: src/mygal/color-palette.c:396 +msgid "custom" +msgstr "personalizzato" + +#. "Custom" color - we'll pop up a GnomeColorPicker +#: src/mygal/color-palette.c:438 +msgid "Custom Color:" +msgstr "Colore personalizzato:" + +#: src/mygal/color-palette.c:446 +msgid "Choose Custom Color" +msgstr "Scegli colore personalizzato" + +#: src/mygal/color-palette.c:579 +msgid "black" +msgstr "nero" + +#: src/mygal/color-palette.c:580 +msgid "light brown" +msgstr "Marrone chiaro" + +#: src/mygal/color-palette.c:581 +msgid "brown gold" +msgstr "" + +#: src/mygal/color-palette.c:582 +msgid "dark green #2" +msgstr "verde scuro #2" + +#: src/mygal/color-palette.c:583 +msgid "navy" +msgstr "" + +#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 +msgid "dark blue" +msgstr "blu scuro" + +#: src/mygal/color-palette.c:585 +msgid "purple #2" +msgstr "" + +#: src/mygal/color-palette.c:586 +msgid "very dark gray" +msgstr "" + +#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 +msgid "dark red" +msgstr "rosso scuro" + +#: src/mygal/color-palette.c:590 +msgid "red-orange" +msgstr "" + +#: src/mygal/color-palette.c:591 +msgid "gold" +msgstr "oro" + +#: src/mygal/color-palette.c:592 +msgid "dark green" +msgstr "verde scuro" + +#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 +msgid "dull blue" +msgstr "" + +#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 +msgid "blue" +msgstr "blu" + +#: src/mygal/color-palette.c:595 +msgid "dull purple" +msgstr "" + +#: src/mygal/color-palette.c:596 +msgid "dark grey" +msgstr "" + +#: src/mygal/color-palette.c:599 +msgid "red" +msgstr "rosso" + +#: src/mygal/color-palette.c:600 +msgid "orange" +msgstr "arancione" + +#: src/mygal/color-palette.c:601 +msgid "lime" +msgstr "tiglio" + +#: src/mygal/color-palette.c:602 +msgid "dull green" +msgstr "" + +#: src/mygal/color-palette.c:603 +msgid "dull blue #2" +msgstr "" + +#: src/mygal/color-palette.c:604 +msgid "sky blue #2" +msgstr "" + +#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 +msgid "purple" +msgstr "viola" + +#: src/mygal/color-palette.c:606 +msgid "gray" +msgstr "grigio" + +#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 +msgid "magenta" +msgstr "" + +#: src/mygal/color-palette.c:610 +msgid "bright orange" +msgstr "" + +#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 +msgid "yellow" +msgstr "giallo" + +#: src/mygal/color-palette.c:612 +msgid "green" +msgstr "verde" + +#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 +msgid "cyan" +msgstr "" + +#: src/mygal/color-palette.c:614 +msgid "bright blue" +msgstr "" + +#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 +msgid "red purple" +msgstr "" + +#: src/mygal/color-palette.c:616 +msgid "light grey" +msgstr "" + +#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 +msgid "pink" +msgstr "rosa" + +#: src/mygal/color-palette.c:620 +msgid "light orange" +msgstr "" + +#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 +msgid "light yellow" +msgstr "" + +#: src/mygal/color-palette.c:622 +msgid "light green" +msgstr "" + +#: src/mygal/color-palette.c:623 +msgid "light cyan" +msgstr "" + +#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 +msgid "light blue" +msgstr "blu chiaro" + +#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 +msgid "light purple" +msgstr "" + +#: src/mygal/color-palette.c:626 +msgid "white" +msgstr "bianco" + +#: src/mygal/color-palette.c:631 +msgid "purplish blue" +msgstr "" + +#: src/mygal/color-palette.c:635 +msgid "dark purple" +msgstr "" + +#: src/mygal/color-palette.c:637 +msgid "sky blue" +msgstr "" + +#: libglabels/template.c:848 +#, c-format +msgid "Generic %s full page" +msgstr "" + +#: libglabels/template.c:897 +msgid "No template files found!" +msgstr "Nessun modello trovato!" + +#. Create and append an "Other" entry. +#: libglabels/paper.c:67 +msgid "Other" +msgstr "Altro" + +#: libglabels/paper.c:361 +msgid "No paper files found!" +msgstr "Nessun file paper trovato!" + +#: data/ui/glabels-ui.xml.h:1 +msgid "About glabels" +msgstr "Informazioni su glabels" + +#: data/ui/glabels-ui.xml.h:2 +msgid "About..." +msgstr "Informazioni..." + +#: data/ui/glabels-ui.xml.h:3 +msgid "Align _Horizontal" +msgstr "Allineamento orizzontale" + +#: data/ui/glabels-ui.xml.h:4 +msgid "Align _Vertical" +msgstr "Allineamento _verticale" + +#: data/ui/glabels-ui.xml.h:5 +msgid "Align objects to bottoms" +msgstr "Allinea gli oggetti in basso" + +#: data/ui/glabels-ui.xml.h:6 +msgid "Align objects to horizontal centers" +msgstr "Allinea gli oggetti nel centro orizzontale" + +#: data/ui/glabels-ui.xml.h:7 +msgid "Align objects to left edges" +msgstr "" + +#: data/ui/glabels-ui.xml.h:8 +msgid "Align objects to right edges" +msgstr "" + +#: data/ui/glabels-ui.xml.h:9 +msgid "Align objects to tops" +msgstr "" + +#: data/ui/glabels-ui.xml.h:10 +msgid "Align objects to vertical centers" +msgstr "Allinea gli oggetti al centro verticale" + +#: data/ui/glabels-ui.xml.h:12 +msgid "Bold" +msgstr "Grassetto" + +#: data/ui/glabels-ui.xml.h:14 +msgid "Center align" +msgstr "Allineamento centrato" + +#: data/ui/glabels-ui.xml.h:15 +msgid "Center objects to horizontal label center" +msgstr "" + +#: data/ui/glabels-ui.xml.h:16 +msgid "Center objects to vertical label center" +msgstr "" + +#: data/ui/glabels-ui.xml.h:17 +msgid "Change the visibility of markup lines in the current window" +msgstr "" +"Cambia la visibilità delle linee di demarcazione nella finestra corrente" + +#: data/ui/glabels-ui.xml.h:18 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "Cambia la visibilità della barra degli strumenti di disegno nella finestra corrente" + +#: data/ui/glabels-ui.xml.h:19 +msgid "Change the visibility of the grid in the current window" +msgstr "Cambia la visibilità della griglia nella finestra corrente" + +#: data/ui/glabels-ui.xml.h:20 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "Cambia la visibilità della barra degli strumenti principale nella finestra corrente" + +#: data/ui/glabels-ui.xml.h:21 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "" +"Cambia la visibilità della barra degli strumenti principale nella finestra " +"corrente" + +#: data/ui/glabels-ui.xml.h:22 +msgid "Close" +msgstr "Chiudi" + +#: data/ui/glabels-ui.xml.h:23 +msgid "Close the current file" +msgstr "Chiudi il file corrente" + +#: data/ui/glabels-ui.xml.h:24 +msgid "Configure the application" +msgstr "Configura l'applicazione" + +#: data/ui/glabels-ui.xml.h:25 +msgid "Contents" +msgstr "Contenuti" + +#: data/ui/glabels-ui.xml.h:26 +msgid "Copy" +msgstr "Copia" + +#: data/ui/glabels-ui.xml.h:27 +msgid "Copy the selection" +msgstr "Copia la selezione" + +#: data/ui/glabels-ui.xml.h:28 +msgid "Create a custom template" +msgstr "Crea un modello personalizzato" + +#: data/ui/glabels-ui.xml.h:29 +msgid "Create a new document" +msgstr "Crea un nuovo documento" + +#: data/ui/glabels-ui.xml.h:30 +msgid "Create barcode object" +msgstr "Crea oggetto codice a barre" + +#: data/ui/glabels-ui.xml.h:31 +msgid "Create box/rectangle object" +msgstr "Crea oggetto area/rettangolo" + +#: data/ui/glabels-ui.xml.h:32 +msgid "Create ellipse/circle object" +msgstr "Crea oggetto ellisse/cerchio" + +#: data/ui/glabels-ui.xml.h:33 +msgid "Create image object" +msgstr "Crea oggetto immagine" + +#: data/ui/glabels-ui.xml.h:34 +msgid "Create line object" +msgstr "Crea oggetto linea" + +#: data/ui/glabels-ui.xml.h:35 +msgid "Create text object" +msgstr "Crea oggeto testo" + +#: data/ui/glabels-ui.xml.h:36 +msgid "Cu_t" +msgstr "_Taglia" + +#: data/ui/glabels-ui.xml.h:37 +msgid "Customize" +msgstr "Personalizza" + +#: data/ui/glabels-ui.xml.h:38 +msgid "Customize Drawing Toolbar" +msgstr "Personalizza la barra degli strumenti di disegno" + +#: data/ui/glabels-ui.xml.h:39 +msgid "Customize Main Toolbar" +msgstr "Personalizza la barra degli strumenti principale" + +#: data/ui/glabels-ui.xml.h:40 +msgid "Customize Property Toolbar" +msgstr "Personalizza barra degli strumenti proprietà" + +#: data/ui/glabels-ui.xml.h:41 +msgid "Customize toolbars" +msgstr "Personalizza·le·barre degli strumenti" + +#: data/ui/glabels-ui.xml.h:42 +msgid "Cut" +msgstr "Taglia" + +#: data/ui/glabels-ui.xml.h:43 +msgid "Cut the selection" +msgstr "Taglia la selezione" + +#: data/ui/glabels-ui.xml.h:44 +msgid "Decrease magnification" +msgstr "Decrementa ingrandimento" + +#: data/ui/glabels-ui.xml.h:45 +msgid "Delete" +msgstr "Cancella" + +#: data/ui/glabels-ui.xml.h:46 +msgid "Delete the selected objects" +msgstr "Cancella gli oggetti selezionati" + +#: data/ui/glabels-ui.xml.h:47 +msgid "Drawing toolbar" +msgstr "Barra degli strumenti di disegno" + +#: data/ui/glabels-ui.xml.h:48 +msgid "Dump XML" +msgstr "Scarica XML" + +#: data/ui/glabels-ui.xml.h:49 +msgid "Dump the UI Xml description" +msgstr "" + +#: data/ui/glabels-ui.xml.h:50 +msgid "Edit merge properties" +msgstr "Modifica proprietà di unione" + +#: data/ui/glabels-ui.xml.h:54 +msgid "Flip object horizontally" +msgstr "Capovolgi oggetto orizzontalmente" + +#: data/ui/glabels-ui.xml.h:55 +msgid "Flip object vertically" +msgstr "Capovolgi oggetto verticalmente" + +#: data/ui/glabels-ui.xml.h:56 +msgid "Font name" +msgstr "Nome font" + +#: data/ui/glabels-ui.xml.h:57 +msgid "Font selector" +msgstr "Selettore font" + +#: data/ui/glabels-ui.xml.h:58 +msgid "Font size" +msgstr "Dimesione·font" + +#: data/ui/glabels-ui.xml.h:59 +msgid "Icon and _Text" +msgstr "Icone e _Testo" + +#: data/ui/glabels-ui.xml.h:60 +msgid "Increase magnification" +msgstr "Incrementa ingradimento" + +#: data/ui/glabels-ui.xml.h:61 +msgid "Italic" +msgstr "Corsivo" + +#: data/ui/glabels-ui.xml.h:63 +msgid "Left align" +msgstr "Allinea·a·sinistra" + +#: data/ui/glabels-ui.xml.h:65 +msgid "Line width" +msgstr "Larghezza linea" + +#: data/ui/glabels-ui.xml.h:66 +msgid "Lower object to bottom" +msgstr "" + +#: data/ui/glabels-ui.xml.h:67 +msgid "M_arkup" +msgstr "" + +#: data/ui/glabels-ui.xml.h:68 +msgid "Main toolbar" +msgstr "Barra degli strumenti principale" + +#: data/ui/glabels-ui.xml.h:69 +msgid "Markup" +msgstr "Marcatori" + +#: data/ui/glabels-ui.xml.h:70 +msgid "Modify document properties" +msgstr "Modifica le proprietà del documento" + +#: data/ui/glabels-ui.xml.h:71 +msgid "New" +msgstr "Nuovo" + +#: data/ui/glabels-ui.xml.h:72 +msgid "Object property editor" +msgstr "Editor delle proprietà per l'oggetto" + +#: data/ui/glabels-ui.xml.h:73 +msgid "Only show icons in the main toolbar" +msgstr "Visualizza solo le icone nella barra degli strumenti principale" + +#: data/ui/glabels-ui.xml.h:75 +msgid "Open a file" +msgstr "Apri un file" + +#: data/ui/glabels-ui.xml.h:76 +msgid "Open the glabels manual" +msgstr "Apri il manuale di glabels" + +#: data/ui/glabels-ui.xml.h:77 +msgid "Paste" +msgstr "Incolla" + +#: data/ui/glabels-ui.xml.h:78 +msgid "Paste the clipboard" +msgstr "Incolla gli appunti" + +#: data/ui/glabels-ui.xml.h:79 +msgid "Pr_eferences..." +msgstr "Pr_eferenze..." + +#: data/ui/glabels-ui.xml.h:80 +msgid "Preferences" +msgstr "Preferenze" + +#: data/ui/glabels-ui.xml.h:82 +msgid "Print the current file" +msgstr "Stampa il file corrente" + +#: data/ui/glabels-ui.xml.h:83 +msgid "Proper_ties..." +msgstr "Proprie_tà..." + +#: data/ui/glabels-ui.xml.h:84 +msgid "Properties" +msgstr "Proprietà" + +#: data/ui/glabels-ui.xml.h:85 +msgid "Property toolbar" +msgstr "Proprietà della barra degli strumenti" + +#: data/ui/glabels-ui.xml.h:86 +msgid "Quit" +msgstr "Esci" + +#: data/ui/glabels-ui.xml.h:87 +msgid "Quit the program" +msgstr "Esci dal programma" + +#: data/ui/glabels-ui.xml.h:88 +msgid "Raise object to top" +msgstr "" + +#: data/ui/glabels-ui.xml.h:89 +msgid "Recent _Files" +msgstr "_File Recenti" + +#: data/ui/glabels-ui.xml.h:90 +msgid "Redo" +msgstr "Ripeti" + +#: data/ui/glabels-ui.xml.h:91 +msgid "Redo the undone action" +msgstr "" + +#: data/ui/glabels-ui.xml.h:92 +msgid "Remove all selections" +msgstr "Rimuovi tutte le selezioni" + +#: data/ui/glabels-ui.xml.h:94 +#, no-c-format +msgid "Restore scale to 100%" +msgstr "Ripristina la scala al 100%" + +#: data/ui/glabels-ui.xml.h:95 +msgid "Right align" +msgstr "Allineamento a destra" + +#: data/ui/glabels-ui.xml.h:98 +msgid "Rotate object 90 clockwise" +msgstr "Ruota l'oggetto di 90° in verso orario" + +#: data/ui/glabels-ui.xml.h:99 +msgid "Rotate object 90 counter-clockwise" +msgstr "Ruota l'oggetto di 90° in verso antiorario" + +#: data/ui/glabels-ui.xml.h:100 +msgid "Save" +msgstr "Salva" + +#: data/ui/glabels-ui.xml.h:101 +msgid "Save As" +msgstr "Salva con nome" + +#: data/ui/glabels-ui.xml.h:102 +msgid "Save _As..." +msgstr "Salva _con nome..." + +#: data/ui/glabels-ui.xml.h:103 +msgid "Save the current file" +msgstr "Salva il file corrente" + +#: data/ui/glabels-ui.xml.h:104 +msgid "Save the current file with a different name" +msgstr "Salva il file corrente con un nome differente" + +#: data/ui/glabels-ui.xml.h:105 +msgid "Select All" +msgstr "Seleziona tutto" + +#: data/ui/glabels-ui.xml.h:106 +msgid "Select _All" +msgstr "Seleziona tutto" + +#: data/ui/glabels-ui.xml.h:107 +msgid "Select all objects" +msgstr "Seleziona tutti gli oggetti" + +#: data/ui/glabels-ui.xml.h:108 +msgid "Select, move and modify objects" +msgstr "Seleziona, muovi e modifica oggetti" + +#: data/ui/glabels-ui.xml.h:110 +msgid "Set main toolbar button style according to desktop default" +msgstr "" + +#: data/ui/glabels-ui.xml.h:111 +msgid "Show _Tooltips" +msgstr "Mostra suggerimenti" + +#: data/ui/glabels-ui.xml.h:112 +msgid "Show both icons and texts in the main toolbar" +msgstr "Mostra icone e testo nella barra degli strumenti principale" + +#: data/ui/glabels-ui.xml.h:113 +msgid "Show tooltips in the drawing toolbar" +msgstr "Mostra suggerimenti nella barra degli strumenti di disegno" + +#: data/ui/glabels-ui.xml.h:114 +msgid "Show tooltips in the main toolbar" +msgstr "Mostra suggerimenti nella barra degli strumenti principale" + +#: data/ui/glabels-ui.xml.h:115 +msgid "Show tooltips in the property toolbar" +msgstr "Mostra suggerimenti nella barra degli strumenti principale" + +#: data/ui/glabels-ui.xml.h:116 +msgid "Template Designer" +msgstr "Progettazione modelli" + +#: data/ui/glabels-ui.xml.h:117 +msgid "Template _Designer..." +msgstr "" + +#: data/ui/glabels-ui.xml.h:118 +msgid "Text color" +msgstr "Colore testo" + +#: data/ui/glabels-ui.xml.h:119 +msgid "U_n-select All" +msgstr "Deseleziona tutto" + +#: data/ui/glabels-ui.xml.h:120 +msgid "Un-select All" +msgstr "Deseleziona·tutto" + +#: data/ui/glabels-ui.xml.h:121 +msgid "Undo" +msgstr "Annulla" + +#: data/ui/glabels-ui.xml.h:122 +msgid "Undo the last action" +msgstr "Annulla l'ultima azione" + +#: data/ui/glabels-ui.xml.h:123 +msgid "Zoom _1:1" +msgstr "Zoom _1:1" + +#: data/ui/glabels-ui.xml.h:124 +msgid "Zoom _In" +msgstr "Zoom _in avanti" + +#: data/ui/glabels-ui.xml.h:125 +msgid "Zoom _Out" +msgstr "Zo_om indietro" + +#: data/ui/glabels-ui.xml.h:126 +msgid "Zoom to _fit" +msgstr "Adatta" + +#: data/ui/glabels-ui.xml.h:127 +msgid "Zoom to fit window" +msgstr "Adatta alla finestra" + +#: data/ui/glabels-ui.xml.h:128 +msgid "_About..." +msgstr "Informazioni..." + +#: data/ui/glabels-ui.xml.h:129 +msgid "_Bottoms" +msgstr "In basso" + +#: data/ui/glabels-ui.xml.h:132 +msgid "_Close" +msgstr "_Chiudi" + +#: data/ui/glabels-ui.xml.h:133 +msgid "_Contents" +msgstr "_Contenuti" + +#: data/ui/glabels-ui.xml.h:134 +msgid "_Copy" +msgstr "_Copia" + +#: data/ui/glabels-ui.xml.h:135 +msgid "_Create Object" +msgstr "_Crea Oggetto" + +#: data/ui/glabels-ui.xml.h:136 +msgid "_Debug" +msgstr "_Debug" + +#: data/ui/glabels-ui.xml.h:138 +msgid "_Desktop Default" +msgstr "Predefinito del desktop" + +#: data/ui/glabels-ui.xml.h:139 +msgid "_Drawing Toolbar" +msgstr "Barra degli strumenti di disegno" + +#: data/ui/glabels-ui.xml.h:140 +msgid "_Edit" +msgstr "_Modifica" + +#: data/ui/glabels-ui.xml.h:142 +msgid "_File" +msgstr "_File" + +#: data/ui/glabels-ui.xml.h:143 +msgid "_Grid" +msgstr "_Griglia" + +#: data/ui/glabels-ui.xml.h:144 +msgid "_Help" +msgstr "_Aiuto" + +#: data/ui/glabels-ui.xml.h:145 +msgid "_Icon" +msgstr "_Icone" + +#: data/ui/glabels-ui.xml.h:149 +msgid "_Main Toolbar" +msgstr "Barra degli stru_menti principale" + +#: data/ui/glabels-ui.xml.h:150 +msgid "_Merge Properties..." +msgstr "Proprietà di unione..." + +#: data/ui/glabels-ui.xml.h:151 +msgid "_New" +msgstr "_Nuovo" + +#: data/ui/glabels-ui.xml.h:152 +msgid "_Objects" +msgstr "_Oggetti" + +#: data/ui/glabels-ui.xml.h:153 +msgid "_Open..." +msgstr "_Apri..." + +#: data/ui/glabels-ui.xml.h:155 +msgid "_Paste" +msgstr "Incolla" + +#: data/ui/glabels-ui.xml.h:156 +msgid "_Print..." +msgstr "Stampa..." + +#: data/ui/glabels-ui.xml.h:157 +msgid "_Property Toolbar" +msgstr "Barra degli strumenti _proprietà" + +#: data/ui/glabels-ui.xml.h:158 +msgid "_Quit" +msgstr "_Esci" + +#: data/ui/glabels-ui.xml.h:161 +msgid "_Save" +msgstr "_Salva" + +#: data/ui/glabels-ui.xml.h:165 +msgid "_View" +msgstr "_Visualizza" + +#: data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 +#: data/glade/template-designer.glade.h:5 +msgid "*" +msgstr "*" + +#: data/glade/prefs-dialog.glade.h:3 +msgid "Default page size" +msgstr "Dimensione pagina predefinita" + +#: data/glade/prefs-dialog.glade.h:4 +msgid "Fill" +msgstr "Riempimento" + +#: data/glade/prefs-dialog.glade.h:5 +msgid "Line" +msgstr "Linea" + +#: data/glade/prefs-dialog.glade.h:6 +msgid "Text" +msgstr "Testo" + +#: data/glade/prefs-dialog.glade.h:7 +msgid "Units" +msgstr "Unità" + +#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 +msgid "Alignment:" +msgstr "Allineamento:" + +#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 +msgid "Color:" +msgstr "Colore:" + +#: data/glade/prefs-dialog.glade.h:10 +msgid "Font:" +msgstr "Carattere:" + +#: data/glade/prefs-dialog.glade.h:11 +msgid "ISO A4" +msgstr "ISO A4" + +#: data/glade/prefs-dialog.glade.h:12 +msgid "Inches" +msgstr "Pollici" + +#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 +msgid "Line Spacing:" +msgstr "Spaziatura:" + +#: data/glade/prefs-dialog.glade.h:14 +msgid "Locale" +msgstr "Impostazioni nazionali" + +#: data/glade/prefs-dialog.glade.h:15 +msgid "Millimeters" +msgstr "Millimetri" + +#: data/glade/prefs-dialog.glade.h:16 +msgid "Object defaults" +msgstr "Proprietà oggetto" + +#: data/glade/prefs-dialog.glade.h:17 +msgid "Points" +msgstr "Punti" + +#: data/glade/prefs-dialog.glade.h:18 +msgid "Select default properties for new objects." +msgstr "Seleziona le proprietà predefinite per i nuovi oggetti." + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "" + +#. Most popular (at top of list) +#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:29 +msgid "US Letter" +msgstr "US·Letter" + +#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 +#: data/glade/template-designer.glade.h:72 +msgid "Width:" +msgstr "Larghezza:" + +#: data/glade/object-editor.glade.h:2 +msgid "00000000000 00000" +msgstr "" + +#: data/glade/object-editor.glade.h:3 +msgid "Xxx object properties" +msgstr "" + +#: data/glade/object-editor.glade.h:5 +msgid "Allow merge to automatically shrink text" +msgstr "" + +#: data/glade/object-editor.glade.h:6 +msgid "Angle:" +msgstr "Angolo:" + +#: data/glade/object-editor.glade.h:7 +msgid "Checksum" +msgstr "Checksum" + +#: data/glade/object-editor.glade.h:10 +msgid "Family:" +msgstr "Famiglia:" + +#: data/glade/object-editor.glade.h:12 +msgid "Fill" +msgstr "Riempimento" + +#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 +msgid "Height:" +msgstr "Altezza:" + +#: data/glade/object-editor.glade.h:14 +msgid "Image" +msgstr "Immagine" + +#: data/glade/object-editor.glade.h:15 +msgid "Insert merge field" +msgstr "Inserisci campo unione" + +#: data/glade/object-editor.glade.h:17 +msgid "Length:" +msgstr "Lunghezza:" + +#: data/glade/object-editor.glade.h:18 +msgid "Line" +msgstr "Linea" + +#: data/glade/object-editor.glade.h:20 +msgid "Literal:" +msgstr "Letterale:" + +#: data/glade/object-editor.glade.h:21 +msgid "Load image" +msgstr "Carica immagine" + +#: data/glade/object-editor.glade.h:22 +msgid "Position" +msgstr "Posizione" + +#: data/glade/object-editor.glade.h:23 +msgid "Reset image size" +msgstr "Ripristina dimensioni immagine" + +#: data/glade/object-editor.glade.h:24 +msgid "Size" +msgstr "Dimensioni" + +#: data/glade/object-editor.glade.h:25 +msgid "Size:" +msgstr "Dimensione:" + +#: data/glade/object-editor.glade.h:26 +msgid "Style" +msgstr "Stile" + +#: data/glade/object-editor.glade.h:27 +msgid "Style:" +msgstr "Stile:" + +#: data/glade/object-editor.glade.h:30 +msgid "X:" +msgstr "X:" + +#: data/glade/object-editor.glade.h:31 +msgid "Y:" +msgstr "Y:" + +#: data/glade/object-editor.glade.h:32 +msgid "degrees" +msgstr "gradi" + +#: data/glade/object-editor.glade.h:33 +msgid "dialog1" +msgstr "" + +#: data/glade/object-editor.glade.h:34 +msgid "digits:" +msgstr "cifre:" + +#: data/glade/object-editor.glade.h:35 +msgid "format:" +msgstr "formato:" + +#: data/glade/template-designer.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/template-designer.glade.h:2 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(es., \"Etichette di spedizione,\" \"Biglietti da visita,\" ...)" + +#: data/glade/template-designer.glade.h:3 +msgid "(e.g., 8163A)" +msgstr "(es. 8163A)" + +#: data/glade/template-designer.glade.h:4 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(es. Avery, Acme, ...)" + +#: data/glade/template-designer.glade.h:6 +msgid "1. Outer radius:" +msgstr "1. raggio esterno:" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "Raggio:" + +#: data/glade/template-designer.glade.h:8 +msgid "1. Width:" +msgstr "1. Larghezza:" + +#: data/glade/template-designer.glade.h:9 +msgid "2. Height:" +msgstr "2. Altezza:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "2. raggio interno:" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "3. Margine" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "6. Margine" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "Marca/Produttore:" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD (inclusa copertina dei ringraziamenti)" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "Congratulazioni!\n" +"\n" +"Hai completato il gLabels Template Designer.\n" +"Se vuoi salvare il tuo progetto fai clic su \"Applica\".\n" +"\n" +"In caso contrario, fai clic su \"Cancella\" per abbandonare\n" +"il tuo progetto o \"Indietro\" per continuare la progettazione." + +#: data/glade/template-designer.glade.h:30 +msgid "Design Completed" +msgstr "Progettazione completata" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "Distanza dal bordo sinistro (x0):" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "Distanza dal bordo in alto (y0):" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" + +#: data/glade/template-designer.glade.h:40 +msgid "Label Size (CD/DVD)" +msgstr "Dimensione etichetta (CD/DVD)" + +#: data/glade/template-designer.glade.h:41 +msgid "Label Size (Round)" +msgstr "Dimensioni etichetta" + +#: data/glade/template-designer.glade.h:42 +msgid "Label or Card Shape" +msgstr "Forma dell'etichetta o della scheda" + +#: data/glade/template-designer.glade.h:43 +msgid "Label or Card Size (Rectangular)" +msgstr "" + +#: data/glade/template-designer.glade.h:44 +msgid "Layout #1" +msgstr "Layout #1" + +#: data/glade/template-designer.glade.h:45 +msgid "Layout #2" +msgstr "Layout #2" + +#: data/glade/template-designer.glade.h:46 +msgid "Layout(s)" +msgstr "Layout" + +#: data/glade/template-designer.glade.h:47 +msgid "Name and Description" +msgstr "Nome e descrizione" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "" + +#: data/glade/template-designer.glade.h:50 +msgid "Number of Layouts" +msgstr "Numero di layout" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "Numero di layout:" + +#: data/glade/template-designer.glade.h:52 +msgid "Page Size" +msgstr "Dimensione pagina" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "Parte #:" + +#: data/glade/template-designer.glade.h:55 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "" + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "Per piacere, inserisci le seguenti informazioni." + +#: data/glade/template-designer.glade.h:57 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "" + +#: data/glade/template-designer.glade.h:58 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "" + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "" + +#: data/glade/template-designer.glade.h:61 +msgid "Print test sheet" +msgstr "Stampa foglio di prova" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "Rotonda" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" + +#: data/glade/template-designer.glade.h:68 +msgid "Vertical pitch (dy):" +msgstr "" + +#: data/glade/template-designer.glade.h:69 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" + +#. Other ISO A series sizes +#: data/templates/paper-sizes.xml.h:2 +msgid "A0" +msgstr "A0" + +#: data/templates/paper-sizes.xml.h:3 +msgid "A1" +msgstr "A1" + +#: data/templates/paper-sizes.xml.h:4 +msgid "A10" +msgstr "A10" + +#: data/templates/paper-sizes.xml.h:5 +msgid "A2" +msgstr "A2" + +#: data/templates/paper-sizes.xml.h:6 +msgid "A3" +msgstr "A3" + +#: data/templates/paper-sizes.xml.h:7 +msgid "A4" +msgstr "A4" + +#: data/templates/paper-sizes.xml.h:8 +msgid "A5" +msgstr "A5" + +#: data/templates/paper-sizes.xml.h:9 +msgid "A6" +msgstr "A6" + +#: data/templates/paper-sizes.xml.h:10 +msgid "A7" +msgstr "A7" + +#: data/templates/paper-sizes.xml.h:11 +msgid "A8" +msgstr "A8" + +#: data/templates/paper-sizes.xml.h:12 +msgid "A9" +msgstr "A9" + +#. ISO B series sizes +#: data/templates/paper-sizes.xml.h:14 +msgid "B0" +msgstr "B0" + +#: data/templates/paper-sizes.xml.h:15 +msgid "B1" +msgstr "B1" + +#: data/templates/paper-sizes.xml.h:16 +msgid "B10" +msgstr "B10" + +#: data/templates/paper-sizes.xml.h:17 +msgid "B2" +msgstr "B2" + +#: data/templates/paper-sizes.xml.h:18 +msgid "B3" +msgstr "B3" + +#: data/templates/paper-sizes.xml.h:19 +msgid "B4" +msgstr "B4" + +#: data/templates/paper-sizes.xml.h:20 +msgid "B5" +msgstr "B5" + +#: data/templates/paper-sizes.xml.h:21 +msgid "B6" +msgstr "B6" + +#: data/templates/paper-sizes.xml.h:22 +msgid "B7" +msgstr "B7" + +#: data/templates/paper-sizes.xml.h:23 +msgid "B8" +msgstr "B8" + +#: data/templates/paper-sizes.xml.h:24 +msgid "B9" +msgstr "B9" + +#: data/templates/paper-sizes.xml.h:25 +msgid "US Executive" +msgstr "US Executive" + +#. Other US paper sizes +#: data/templates/paper-sizes.xml.h:27 +msgid "US Legal" +msgstr "US Legale" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:2 +#: data/templates/zweckform-iso-templates.xml.h:2 +msgid "Address Labels" +msgstr "Etichette di indirizzo" + +#. =================================================================== +#. ============================================================ +#. =================================================================== +#. ====================================================== +#: data/templates/avery-us-templates.xml.h:4 +#: data/templates/avery-iso-templates.xml.h:4 +#: data/templates/zweckform-iso-templates.xml.h:6 +#: data/templates/misc-us-templates.xml.h:3 +#: data/templates/misc-iso-templates.xml.h:17 +msgid "Business Cards" +msgstr "Biglietti da visita" + +#: data/templates/avery-us-templates.xml.h:5 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "Etichette CD/DVD (Etichette Dischi)" + +#: data/templates/avery-us-templates.xml.h:6 +msgid "CD/DVD Labels (Spine Labels)" +msgstr "Etichette CD/DVD (Etichette dischi)" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:8 +msgid "Diskette Labels" +msgstr "Etichette per floppy" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:10 +msgid "Filing Labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:12 +msgid "Full Sheet Labels" +msgstr "Pagina piena di etichette" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:14 +msgid "Large Round Labels" +msgstr "Etichetta con bordi arrotondati" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:16 +msgid "Name Badge Labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:18 +msgid "Return Address Labels" +msgstr "Etichette con indirizzo del mittente" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:20 +msgid "Shipping Labels" +msgstr "Etichette di spedizione" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:22 +msgid "Small Round Labels" +msgstr "Etichette piccole con bordi arrotondati" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:24 +msgid "Square Labels" +msgstr "Etichette quadrate" + +#: data/templates/avery-us-templates.xml.h:25 +msgid "Video Tape Face Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:26 +msgid "Video Tape Spine Labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:2 +msgid "Address labels" +msgstr "Etichette per indirizzo" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:6 +msgid "CD Booklet" +msgstr "CD Booklet" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:8 +msgid "CD Inlet" +msgstr "CD Inlet" + +#. =============================================================== +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:10 +#: data/templates/zweckform-iso-templates.xml.h:8 +#: data/templates/misc-us-templates.xml.h:5 +#: data/templates/misc-iso-templates.xml.h:21 +msgid "CD/DVD Labels" +msgstr "Etichette CD/DVD" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:12 +msgid "Diskette labels" +msgstr "" + +#. =============================================================== +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:14 +#: data/templates/zweckform-iso-templates.xml.h:14 +#: data/templates/misc-iso-templates.xml.h:35 +msgid "Mailing Labels" +msgstr "Etichette di spedizione" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:16 +msgid "Mailing labels" +msgstr "" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:18 +msgid "Mini Address Labels" +msgstr "Etichette Mini-indirizzo" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:20 +msgid "Shipping labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:4 +msgid "Allround Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:10 +msgid "Correction and Cover-up Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:12 +msgid "Lever Arch File Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:16 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:18 +msgid "Rectangular Copier Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:20 +#: data/templates/misc-iso-templates.xml.h:44 +msgid "Rectangular Labels" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:22 +msgid "Video Labels (back)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:1 +msgid "Business Card CD" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:4 +msgid "CD Template Rectangles" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:6 +msgid "CD/DVD Labels (Face Only)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:23 +msgid "CD/DVD Labels (face only)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:9 +msgid "Cassette Labels" +msgstr "Etichette per cassette" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:11 +msgid "DLT Labels" +msgstr "Etichette DLT" + +#. =================================================================== +#: data/templates/misc-us-templates.xml.h:13 +msgid "Microtube labels" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Mini-CD Labels" +msgstr "Etichette Mini-CD" + +#: data/templates/misc-us-templates.xml.h:15 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:16 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:17 +#: data/templates/misc-iso-templates.xml.h:42 +msgid "PRO CD Labels 2-up (face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:18 +msgid "Slimline CD Case (rightside up)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:19 +msgid "Slimline CD Case (upside down)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:1 +msgid "Agipa 119488: Business Cards" +msgstr "Agipa 119488: biglietti da visita" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:3 +msgid "Allround Labels --24" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:5 +msgid "Allround Labels --44" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:7 +msgid "Allround Labels --64" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:9 +msgid "Allround Labels --65" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:11 +msgid "Arch File Labels" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Arch File Labels (large)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Arch File Labels (small)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:19 +msgid "CD Labels" +msgstr "Etichette CD" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:25 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:27 +msgid "Diskette Labels (face only)" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:29 +msgid "EPSON Photo Stickers 16" +msgstr "EPSON Photo Stickers 16" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:31 +msgid "Etiketten" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:33 +msgid "Fridge Magnet Stickers" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:37 +msgid "Mailing Labels --14" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:39 +msgid "Mailing Labels-2 columns" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:41 +msgid "Mailing Labels-3 columns" +msgstr "" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:46 +msgid "Video Labels (face only)" +msgstr "Etichette video (solo frontespizio)" + +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "Crea etichette, biglietti da visita e copertine" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "gLabels Designer di etichetta" + +#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "File di progetto di gLabels" + diff --git a/po/ja.po b/po/ja.po new file mode 100644 index 00000000..08b6b3d1 --- /dev/null +++ b/po/ja.po @@ -0,0 +1,2457 @@ +# glabels ja.po +# Copyright (C) 2001-2004 Free Software Foundation, Inc. +# Takeshi Aihana , 2001-2004. +# +msgid "" +msgstr "" +"Project-Id-Version: glabels 2.0.0\n" +"POT-Creation-Date: 2004-08-15 18:13-0400\n" +"PO-Revision-Date: 2004-08-11 08:44+0900\n" +"Last-Translator: Takeshi AIHANA \n" +"Language-Team: Japanese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/glabels.c:55 +msgid "Show view debugging messages." +msgstr "表示のデバッグ・メッセージを表示する" + +#: src/glabels.c:58 +msgid "Show item debugging messages." +msgstr "アイテムのデバッグ・メッセージを表示する" + +#: src/glabels.c:61 +msgid "Show printing debugging messages." +msgstr "印刷のデバッグ・メッセージを表示する" + +#: src/glabels.c:64 +msgid "Show prefs debugging messages." +msgstr "設定のデバッグ・メッセージを表示する" + +#: src/glabels.c:67 +msgid "Show file debugging messages." +msgstr "ファイルのデバッグ・メッセージを表示する" + +#: src/glabels.c:70 +msgid "Show document debugging messages." +msgstr "ドキュメントのデバッグ・メッセージを表示する" + +#: src/glabels.c:73 +msgid "Show template debugging messages." +msgstr "テンプレートのデバッグ・メッセージを表示する" + +#: src/glabels.c:76 +msgid "Show paper debugging messages." +msgstr "設定の用紙のデバッグ・メッセージを表示する" + +#: src/glabels.c:79 +msgid "Show xml debugging messages." +msgstr "XML のデバッグ・メッセージを表示する" + +#: src/glabels.c:82 +msgid "Show document merge debugging messages." +msgstr "ドキュメント結合のデバッグ・メッセージを表示する" + +#: src/glabels.c:85 +msgid "Show commands debugging messages." +msgstr "コマンドのデバッグ・メッセージを表示する" + +#: src/glabels.c:88 +msgid "Show undo debugging messages." +msgstr "Undo のデバッグ・メッセージを表示する" + +#: src/glabels.c:91 +msgid "Show recent debugging messages." +msgstr "最近開いたファイルのデバッグ・メッセージを表示する" + +#: src/glabels.c:94 +msgid "Show window debugging messages." +msgstr "ウィンドウのデバッグ・メッセージを表示する" + +#: src/glabels.c:97 +msgid "Show ui debugging messages." +msgstr "GUI のデバッグ・メッセージを表示する" + +#: src/glabels.c:100 +msgid "Show property_bar debugging messages." +msgstr "設定バーのデバッグ・メッセージを表示する" + +#: src/glabels.c:103 +msgid "Show media select widget debugging messages." +msgstr "メディア選択ウィジットのデバッグ・メッセージを表示する" + +#: src/glabels.c:106 +msgid "Show mini preview widget debugging messages." +msgstr "プレビュー・ウィジットのデバッグ・メッセージを表示する" + +#: src/glabels.c:109 +msgid "Show pixbuf cache debugging messages." +msgstr "pixbuf cache のデバッグ・メッセージを表示する" + +#: src/glabels.c:112 +msgid "Show widget debugging messages." +msgstr "ウィジットのデバッグ・メッセージを表示する" + +#: src/glabels.c:115 +msgid "Show object editor debugging messages." +msgstr "オブジェクト・エディタのデバッグメッセージを表示する" + +#: src/glabels.c:118 +msgid "Turn on all debugging messages." +msgstr "全てのデバッグ・メッセージを表示する" + +#: src/glabels.c:187 +msgid "Could not initialize Bonobo!\n" +msgstr "Bonobo を初期化することができませんでした!\n" + +#: src/glabels-batch.c:48 +msgid "print this message" +msgstr "このメッセージを表示する" + +#: src/glabels-batch.c:50 +msgid "print the version of glabels-batch being used" +msgstr "使用している gLabel のバージョンを表示する" + +#: src/glabels-batch.c:52 +msgid "set output filename (default=\"output.ps\")" +msgstr "出力するファイル名を指定する (デフォルト = \"output.ps\")" + +#: src/glabels-batch.c:52 +msgid "filename" +msgstr "ファイル名" + +#: src/glabels-batch.c:54 +msgid "number of sheets (default=1)" +msgstr "用紙の数 (デフォルト = 1)" + +#: src/glabels-batch.c:54 +msgid "sheets" +msgstr "用紙の数" + +#: src/glabels-batch.c:56 +msgid "number of copies (default=1)" +msgstr "コピーの数 (デフォルト = 1)" + +#: src/glabels-batch.c:56 +msgid "copies" +msgstr "コピーの数" + +#: src/glabels-batch.c:58 src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "アウトラインを印刷する (印刷時の配置を確認するため)" + +#: src/glabels-batch.c:60 src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "(画像をミラーするように) 反転して印刷する" + +#: src/glabels-batch.c:96 +msgid "[OPTION...] GLABELS_FILE..." +msgstr "[オプション...] ファイル名..." + +#: src/glabels-batch.c:116 +#, c-format +msgid "missing glabels file\n" +msgstr "gLabel で使用するファイルがありません\n" + +#: src/glabels-batch.c:157 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "gLabel で使用するファイル %s が開けません\n" + +#: src/window.c:244 +msgid "(none) - gLabels" +msgstr "(なし) - gLabels" + +#: src/window.c:414 +msgid "(modified)" +msgstr "(変更済み)" + +#: src/stock.c:65 data/ui/glabels-ui.xml.h:165 +msgid "_Select Mode" +msgstr "選択モード(_S)" + +#: src/stock.c:66 data/ui/glabels-ui.xml.h:166 +msgid "_Text" +msgstr "文字(_T)" + +#: src/stock.c:67 data/ui/glabels-ui.xml.h:151 +msgid "_Line" +msgstr "直線(_L)" + +#: src/stock.c:68 data/ui/glabels-ui.xml.h:133 +msgid "_Box" +msgstr "矩形(_B)" + +#: src/stock.c:69 data/ui/glabels-ui.xml.h:144 +msgid "_Ellipse" +msgstr "楕円(_E)" + +#: src/stock.c:70 data/ui/glabels-ui.xml.h:149 +msgid "_Image" +msgstr "画像(_I)" + +#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 +msgid "Bar_code" +msgstr "バーコード(_C)" + +#: src/stock.c:72 +msgid "_Merge Properties" +msgstr "結合プロパティ(_M)" + +#: src/stock.c:73 +msgid "Object _Properties" +msgstr "オブジェクトのプロパティ(_P)" + +#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 +msgid "Bring to _Front" +msgstr "前に持ってくる(_F)" + +#: src/stock.c:75 data/ui/glabels-ui.xml.h:110 +msgid "Send to _Back" +msgstr "後ろにまわす(_B)" + +#: src/stock.c:76 data/ui/glabels-ui.xml.h:97 +msgid "Rotate _Left" +msgstr "左に回転(_L)" + +#: src/stock.c:77 data/ui/glabels-ui.xml.h:98 +msgid "Rotate _Right" +msgstr "右に回転(_R)" + +#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "水平方向にフリップ(_H)" + +#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "垂直方向にフリップ(_V)" + +#: src/stock.c:80 data/ui/glabels-ui.xml.h:150 +msgid "_Lefts" +msgstr "左端(_L)" + +#: src/stock.c:81 data/ui/glabels-ui.xml.h:162 +msgid "_Rights" +msgstr "右端(_R)" + +#: src/stock.c:82 data/ui/glabels-ui.xml.h:134 +msgid "_Centers" +msgstr "中央(_C)" + +#: src/stock.c:83 data/ui/glabels-ui.xml.h:167 +msgid "_Tops" +msgstr "上端(_T)" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "下部" + +#: src/stock.c:85 +msgid "Centers" +msgstr "中央" + +#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "ラベルの中心(_N)" + +#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "色で塗りつぶします" + +#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "線の色を選択します" + +#: src/stock.c:90 src/stock.c:92 +msgid "Linked" +msgstr "結合済" + +#: src/stock.c:91 src/stock.c:93 +msgid "Not Linked" +msgstr "結合なし" + +#: src/ui-property-bar.c:345 src/object-editor.c:499 +msgid "Default" +msgstr "デフォルト" + +#: src/ui-property-bar.c:360 src/object-editor.c:512 +msgid "No fill" +msgstr "塗りつぶさない" + +#: src/ui-property-bar.c:375 src/object-editor.c:505 +msgid "No line" +msgstr "線を消す" + +#: src/ui-sidebar.c:180 +msgid "Object properties" +msgstr "オブジェクトのプロパティ" + +#: src/commands.c:385 +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/commands.c:399 +msgid "See the file AUTHORS for additional credits," +msgstr "補足のクレジットについては AUTHORS ファイルをご覧になるか、" + +#: src/commands.c:400 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "または http://glabels.sourceforge.net/ を訪れてみて下さい。" + +#: src/commands.c:409 +msgid " " +msgstr " " + +#: src/commands.c:424 +msgid "glabels" +msgstr "gLabels" + +#: src/file.c:100 +msgid "New Label or Card" +msgstr "新規ラベルまたはカード" + +#: src/file.c:132 src/file.c:304 +msgid "Media Type" +msgstr "メディアの種類" + +#: src/file.c:138 src/file.c:310 +msgid "Label orientation" +msgstr "ラベルの向き" + +#: src/file.c:269 +msgid "Label properties" +msgstr "ラベルのプロパティ" + +#: src/file.c:452 src/file.c:870 +msgid "All files" +msgstr "全てのファイル" + +#: src/file.c:457 src/file.c:875 +msgid "gLabels documents" +msgstr "gLabels のドキュメント" + +#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 +msgid "Empty file name selection" +msgstr "ファイル名の入力欄が空です" + +#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 +msgid "Please select a file or supply a valid file name" +msgstr "既存のファイルを選択するか、または正しいファイル名を指定して下さい。" + +#: src/file.c:519 src/file.c:631 +msgid "File does not exist" +msgstr "ファイルがありません。" + +#: src/file.c:563 data/ui/glabels-ui.xml.h:75 +msgid "Open" +msgstr "開く" + +#: src/file.c:565 +msgid "Open label" +msgstr "ラベルを開きます" + +#: src/file.c:707 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "ファイル \"%s\" が開けませんでした" + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "サポートしていないファイル形式です。" + +#: src/file.c:797 src/file.c:979 src/file.c:1174 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "ファイル \"%s\" を保存できませんでした" + +#: src/file.c:805 src/file.c:987 src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "データ保存中にエラーが発生しました。データはまだ保存されていません。" + +#: src/file.c:848 src/file.c:1048 +#, c-format +msgid "Save \"%s\" as" +msgstr "\"%s\" に名前を付けて保存" + +#: src/file.c:935 src/file.c:1131 +msgid "Please supply a valid file name" +msgstr "正しいファイル名を指定して下さい" + +#: src/file.c:952 src/file.c:1147 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "ファイル \"%s\" に上書きしますか?" + +#: src/file.c:960 src/file.c:1155 +msgid "File already exists." +msgstr "ファイルが既に存在します。" + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "終了する前にドキュメント \"%s\" に対する変更を保存しますか?" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "保存しないと変更したデータを失うことになります。" + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "保存せずに閉じる" + +#. Should not happen +#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 +#: data/glade/object-editor.glade.h:37 +msgid "points" +msgstr "ポイント" + +#: src/prefs.c:158 data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "[インチ]" + +#: src/prefs.c:160 +msgid "mm" +msgstr "[ミリ]" + +#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 +msgid "gLabels Preferences" +msgstr "gLabels の設定" + +#. +#. * Submenu: Order +#. +#: src/view.c:3570 data/ui/glabels-ui.xml.h:157 +msgid "_Order" +msgstr "順序(_O)" + +#. +#. * Submenu: Rotate/Flip +#. +#: src/view.c:3591 data/ui/glabels-ui.xml.h:163 +msgid "_Rotate/Flip" +msgstr "回転/フリップ(_R)" + +#. +#. * Submenu: Align Horizontally +#. +#: src/view.c:3624 +msgid "Align _Horizontally" +msgstr "水平方向に配置(_H)" + +#. +#. * Submenu: Align Vertically +#. +#: src/view.c:3663 +msgid "Align _Vertically" +msgstr "垂直方向に配置(_V)" + +#: src/view.c:3724 data/ui/glabels-ui.xml.h:140 +msgid "_Delete" +msgstr "削除(_D)" + +#. Build editor. +#: src/view-box.c:223 +msgid "Box object properties" +msgstr "矩形オブジェクトのプロパティ" + +#. Build editor. +#: src/view-ellipse.c:223 +msgid "Ellipse object properties" +msgstr "楕円オブジェクトのプロパティ" + +#. Build editor. +#: src/view-line.c:223 +msgid "Line object properties" +msgstr "直線オブジェクトのプロパティ" + +#. Build editor. +#: src/view-image.c:222 +msgid "Image object properties" +msgstr "画像オブジェクトのプロパティ" + +#. Build editor. +#: src/view-text.c:250 +msgid "Text object properties" +msgstr "文字オブジェクトのプロパティ" + +#: src/view-text.c:562 data/glade/object-editor.glade.h:28 +msgid "Text" +msgstr "文字" + +#. Build editor. +#: src/view-barcode.c:209 +msgid "Barcode object properties" +msgstr "バーコード・オブジェクトのプロパティ" + +#: src/view-barcode.c:579 src/print.c:1088 +msgid "Invalid barcode data" +msgstr "おかしなバーコード・データ" + +#: src/merge-properties-dialog.c:231 +msgid "Merge Properties" +msgstr "結合プロパティ" + +#. ---- Source section ---- +#: src/merge-properties-dialog.c:237 +msgid "Source" +msgstr "ソース" + +#: src/merge-properties-dialog.c:245 +msgid "Format:" +msgstr "書式:" + +#. Location line +#: src/merge-properties-dialog.c:273 +msgid "Location:" +msgstr "場所:" + +#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 +msgid "Select merge-database source" +msgstr "結合データベース・ソースの選択" + +#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 +msgid "N/A" +msgstr "N/A" + +#. ---- Sample Fields section ---- +#: src/merge-properties-dialog.c:300 +msgid "Record selection/preview:" +msgstr "選択範囲/プレビューの記録:" + +#: src/merge-properties-dialog.c:326 +msgid "Select" +msgstr "選択" + +#: src/merge-properties-dialog.c:334 +msgid "Record/Field" +msgstr "レコード/フィールド" + +#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 +msgid "Data" +msgstr "データ" + +#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:82 +msgid "Print" +msgstr "印刷" + +#: src/print-dialog.c:281 +msgid "_Job" +msgstr "ジョブ(_J)" + +#: src/print-dialog.c:286 +msgid "P_rinter" +msgstr "プリンタ(_R)" + +#. ----------- Add simple-copies widget ------------ +#: src/print-dialog.c:314 +msgid "Copies" +msgstr "コピー" + +#. ------- Add merge control widget ------------ +#: src/print-dialog.c:322 +msgid "Document merge control" +msgstr "ドキュメントをコントロールにマージする" + +#. ----------- Add custom print options area ------------ +#: src/print-dialog.c:330 +msgid "Options" +msgstr "オプション" + +#: src/print-dialog.c:351 +msgid "print crop marks" +msgstr "端のマークを揃えて印刷する" + +#: src/print-dialog.c:553 src/print-dialog.c:592 +msgid "Print preview" +msgstr "印刷プレビュー" + +#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 +msgid "gLabels Template Designer" +msgstr "gLabels テンプレート・デザイナ" + +#: src/bc.c:60 +msgid "POSTNET (any)" +msgstr "POSTNET (何でも)" + +#: src/bc.c:63 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (ZIP のみ)" + +#: src/bc.c:66 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (ZIP+4)" + +#: src/bc.c:69 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: src/bc.c:72 +msgid "EAN (any)" +msgstr "EAN (何でも)" + +#: src/bc.c:75 +msgid "EAN-8" +msgstr "EAN-8" + +#: src/bc.c:78 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: src/bc.c:81 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: src/bc.c:84 +msgid "EAN-13" +msgstr "EAN-13" + +#: src/bc.c:87 +msgid "EAN-13 +2" +msgstr "EAN-13 +2" + +#: src/bc.c:90 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: src/bc.c:93 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A または UPC-E)" + +#: src/bc.c:96 +msgid "UPC-A" +msgstr "UPC-A" + +#: src/bc.c:99 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: src/bc.c:102 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: src/bc.c:105 +msgid "UPC-E" +msgstr "UPC-E" + +#: src/bc.c:108 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: src/bc.c:111 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: src/bc.c:114 +msgid "ISBN" +msgstr "ISBN" + +#: src/bc.c:117 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: src/bc.c:120 +msgid "Code 39" +msgstr "Code 39" + +#: src/bc.c:123 +msgid "Code 128" +msgstr "Code 128" + +#: src/bc.c:126 +msgid "Code 128C" +msgstr "Code 128C" + +#: src/bc.c:129 +msgid "Code 128B" +msgstr "Code 128B" + +#: src/bc.c:132 +msgid "Interleaved 2 of 5" +msgstr "綴じ込み 2/5" + +#: src/bc.c:135 +msgid "Codabar" +msgstr "Codabar" + +#: src/bc.c:138 +msgid "MSI" +msgstr "MSI" + +#: src/bc.c:141 +msgid "Plessey" +msgstr "Plessey" + +#: src/label.c:569 +msgid "Untitled" +msgstr "タイトルなし" + +#: src/xml-label.c:176 src/xml-label.c:213 +msgid "xmlParseFile error" +msgstr "xmlParseFile エラー" + +#: src/xml-label.c:250 +msgid "No document root" +msgstr "root ドキュメントではありません" + +#: src/xml-label.c:264 +msgid "Importing from glabels 0.1 format" +msgstr "gLabels 0.1 形式からインポートする" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "gLabels 0.4 形式からインポートする" + +#: src/xml-label.c:279 +msgid "Importing from glabels 1.91 format" +msgstr "gLabels 1.91 形式からインポートする" + +#: src/xml-label.c:282 +msgid "bad document, unknown glabels Namespace" +msgstr "ドキュメントの種類が間違っています。Glabels 名前空間が見つかりません。" + +#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "おかしな root のノード = \"%s\"" + +#: src/xml-label.c:348 src/xml-label-191.c:165 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "Document ノードにおかしな root のノード = \"%s\"" + +#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "おかしなノード = \"%s\"" + +#: src/xml-label.c:796 src/xml-label-191.c:605 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "Data ノードにおかしなノード = \"%s\"" + +#: src/xml-label.c:962 libglabels/xml-template.c:535 +msgid "Utf8 conversion error." +msgstr "Utf8 変換エラーです。" + +#: src/xml-label.c:969 libglabels/xml-template.c:542 +msgid "Problem saving xml file." +msgstr "XML ファイルの保存で問題があります" + +#. This should always be an id, but just in case a name +#. slips by! +#: src/xml-label-191.c:680 libglabels/xml-template.c:199 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "不明なページ・サイズの ID \"%s\" です。名前として扱います。" + +#: src/xml-label-191.c:690 libglabels/xml-template.c:209 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "不明なページ・サイズの ID または名前 \"%s\" です。" + +#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 +msgid "None" +msgstr "なし" + +#: src/merge-init.c:53 +msgid "Text file with comma delimeters (CSV)" +msgstr "コンマで区切ったテキスト・ファイル (CSV)" + +#: src/merge-init.c:60 +msgid "Text file with colon delimeters" +msgstr "コロンで区切ったテキスト・ファイル" + +#: src/merge-init.c:67 +msgid "Text file with tab delimeters" +msgstr "タブで区切ったテキスト・ファイル" + +#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 +msgid "File:" +msgstr "ファイル:" + +#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 +msgid "Key:" +msgstr "キー:" + +#: src/wdgt-print-copies.c:179 +msgid "Sheets:" +msgstr "用紙:" + +#: src/wdgt-print-copies.c:197 +msgid "Labels" +msgstr "ラベル" + +#: src/wdgt-print-copies.c:200 +msgid "from:" +msgstr "開始:" + +#: src/wdgt-print-copies.c:207 +msgid "to:" +msgstr "終了:" + +#: src/wdgt-print-merge.c:178 +msgid "Start on label" +msgstr "ラベルの開始" + +#: src/wdgt-print-merge.c:186 +msgid "on 1st sheet" +msgstr "(最初のシート)" + +#: src/wdgt-print-merge.c:195 +msgid "Copies:" +msgstr "コピー:" + +#: src/wdgt-print-merge.c:201 +msgid "Collate" +msgstr "製本" + +#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 +msgid "Description:" +msgstr "説明:" + +#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 +msgid "Page size:" +msgstr "用紙のサイズ:" + +#: src/wdgt-media-select.c:290 +msgid "Label size:" +msgstr "ラベルのサイズ:" + +#: src/wdgt-media-select.c:301 +msgid "Layout:" +msgstr "レイアウト:" + +#: src/wdgt-media-select.c:578 +#, c-format +msgid "%d x %d (%d per sheet)" +msgstr "%d x %d (%d 個/シート)" + +#: src/wdgt-media-select.c:582 +#, c-format +msgid "%d per sheet" +msgstr "%d /シート" + +#: src/wdgt-media-select.c:614 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: src/wdgt-media-select.c:619 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s 倍率" + +#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s 倍率" + +#: src/wdgt-rotate-label.c:193 +msgid "Rotate" +msgstr "回転させる" + +#. This is the default custom color +#: src/mygal/color-palette.c:396 +msgid "custom" +msgstr "カスタム" + +#. "Custom" color - we'll pop up a GnomeColorPicker +#: src/mygal/color-palette.c:438 +msgid "Custom Color:" +msgstr "カスタム色:" + +#: src/mygal/color-palette.c:446 +msgid "Choose Custom Color" +msgstr "カスタム・カラーの選択" + +#: src/mygal/color-palette.c:579 +msgid "black" +msgstr "黒" + +#: src/mygal/color-palette.c:580 +msgid "light brown" +msgstr "淡い茶" + +#: src/mygal/color-palette.c:581 +msgid "brown gold" +msgstr "茶銀" + +#: src/mygal/color-palette.c:582 +msgid "dark green #2" +msgstr "暗い緑 #2" + +#: src/mygal/color-palette.c:583 +msgid "navy" +msgstr "ネービー" + +#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 +msgid "dark blue" +msgstr "暗い青" + +#: src/mygal/color-palette.c:585 +msgid "purple #2" +msgstr "ç´« #2" + +#: src/mygal/color-palette.c:586 +msgid "very dark gray" +msgstr "とても暗い灰" + +#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 +msgid "dark red" +msgstr "暗い赤" + +#: src/mygal/color-palette.c:590 +msgid "red-orange" +msgstr "赤みの橙" + +#: src/mygal/color-palette.c:591 +msgid "gold" +msgstr "金" + +#: src/mygal/color-palette.c:592 +msgid "dark green" +msgstr "暗い緑" + +#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 +msgid "dull blue" +msgstr "くすんだ青" + +#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 +msgid "blue" +msgstr "青" + +#: src/mygal/color-palette.c:595 +msgid "dull purple" +msgstr "くすんだ紫" + +#: src/mygal/color-palette.c:596 +msgid "dark grey" +msgstr "暗い灰" + +#: src/mygal/color-palette.c:599 +msgid "red" +msgstr "赤" + +#: src/mygal/color-palette.c:600 +msgid "orange" +msgstr "橙" + +#: src/mygal/color-palette.c:601 +msgid "lime" +msgstr "ライム" + +#: src/mygal/color-palette.c:602 +msgid "dull green" +msgstr "くすんだ緑" + +#: src/mygal/color-palette.c:603 +msgid "dull blue #2" +msgstr "くすんだ青 #2" + +#: src/mygal/color-palette.c:604 +msgid "sky blue #2" +msgstr "スカイブルー #2" + +#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 +msgid "purple" +msgstr "ç´«" + +#: src/mygal/color-palette.c:606 +msgid "gray" +msgstr "灰" + +#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 +msgid "magenta" +msgstr "マゼンタ" + +#: src/mygal/color-palette.c:610 +msgid "bright orange" +msgstr "明るい橙" + +#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 +msgid "yellow" +msgstr "黄" + +#: src/mygal/color-palette.c:612 +msgid "green" +msgstr "緑" + +#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 +msgid "cyan" +msgstr "シアン" + +#: src/mygal/color-palette.c:614 +msgid "bright blue" +msgstr "明るい青" + +#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 +msgid "red purple" +msgstr "赤紫" + +#: src/mygal/color-palette.c:616 +msgid "light grey" +msgstr "淡い灰" + +#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 +msgid "pink" +msgstr "ピンク" + +#: src/mygal/color-palette.c:620 +msgid "light orange" +msgstr "淡い橙" + +#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 +msgid "light yellow" +msgstr "淡い黄" + +#: src/mygal/color-palette.c:622 +msgid "light green" +msgstr "淡い緑" + +#: src/mygal/color-palette.c:623 +msgid "light cyan" +msgstr "淡いシアン" + +#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 +msgid "light blue" +msgstr "淡い青" + +#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 +msgid "light purple" +msgstr "淡い紫" + +#: src/mygal/color-palette.c:626 +msgid "white" +msgstr "白" + +#: src/mygal/color-palette.c:631 +msgid "purplish blue" +msgstr "紫みの青" + +#: src/mygal/color-palette.c:635 +msgid "dark purple" +msgstr "暗い紫" + +#: src/mygal/color-palette.c:637 +msgid "sky blue" +msgstr "スカイブルー" + +#: libglabels/template.c:848 +#, c-format +msgid "Generic %s full page" +msgstr "Generic %s フル・ページ" + +#: libglabels/template.c:897 +msgid "No template files found!" +msgstr "テンプレート・ファイルが見つかりません!" + +#. Create and append an "Other" entry. +#: libglabels/paper.c:67 +msgid "Other" +msgstr "その他" + +#: libglabels/paper.c:361 +msgid "No paper files found!" +msgstr "用紙ふぃあるが見つかりません!" + +#: data/ui/glabels-ui.xml.h:1 +msgid "About glabels" +msgstr "gLabels について" + +#: data/ui/glabels-ui.xml.h:2 +msgid "About..." +msgstr "情報..." + +#: data/ui/glabels-ui.xml.h:3 +msgid "Align _Horizontal" +msgstr "水平方向に配置(_H)" + +#: data/ui/glabels-ui.xml.h:4 +msgid "Align _Vertical" +msgstr "垂直方向に配置(_V)" + +#: data/ui/glabels-ui.xml.h:5 +msgid "Align objects to bottoms" +msgstr "オブジェクトを下端に配置します" + +#: data/ui/glabels-ui.xml.h:6 +msgid "Align objects to horizontal centers" +msgstr "オブジェクトを水平方向の中心に配置します" + +#: data/ui/glabels-ui.xml.h:7 +msgid "Align objects to left edges" +msgstr "オブジェクトを左端に配置します" + +#: data/ui/glabels-ui.xml.h:8 +msgid "Align objects to right edges" +msgstr "オブジェクトを右端に配置します" + +#: data/ui/glabels-ui.xml.h:9 +msgid "Align objects to tops" +msgstr "オブジェクトを上端に配置します" + +#: data/ui/glabels-ui.xml.h:10 +msgid "Align objects to vertical centers" +msgstr "オブジェクトを垂直方向の中心に配置します" + +#: data/ui/glabels-ui.xml.h:12 +msgid "Bold" +msgstr "文字を太字にします" + +#: data/ui/glabels-ui.xml.h:14 +msgid "Center align" +msgstr "中央に揃えます" + +#: data/ui/glabels-ui.xml.h:15 +msgid "Center objects to horizontal label center" +msgstr "オブジェクトをラベルの中心に水平移動します" + +#: data/ui/glabels-ui.xml.h:16 +msgid "Center objects to vertical label center" +msgstr "オブジェクトをラベルの中心に垂直移動します" + +#: data/ui/glabels-ui.xml.h:17 +msgid "Change the visibility of markup lines in the current window" +msgstr "ラベルの外枠線の表示/非表示を変更します" + +#: data/ui/glabels-ui.xml.h:18 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "ツールバーの表示/非表示を変更します" + +#: data/ui/glabels-ui.xml.h:19 +msgid "Change the visibility of the grid in the current window" +msgstr "ラベルのグリッド (格子線) の表示/非表示を変更します" + +#: data/ui/glabels-ui.xml.h:20 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "メイン・ツールバーの表示/非表示を変更します" + +#: data/ui/glabels-ui.xml.h:21 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "プロパティ・ツールバーの表示/非表示を変更します" + +#: data/ui/glabels-ui.xml.h:22 +msgid "Close" +msgstr "閉じる" + +#: data/ui/glabels-ui.xml.h:23 +msgid "Close the current file" +msgstr "このファイルを閉じます" + +#: data/ui/glabels-ui.xml.h:24 +msgid "Configure the application" +msgstr "gLabel の設定を変更します" + +#: data/ui/glabels-ui.xml.h:25 +msgid "Contents" +msgstr "目次" + +#: data/ui/glabels-ui.xml.h:26 +msgid "Copy" +msgstr "コピー" + +#: data/ui/glabels-ui.xml.h:27 +msgid "Copy the selection" +msgstr "選択範囲をコピーします" + +#: data/ui/glabels-ui.xml.h:28 +msgid "Create a custom template" +msgstr "カスタム・テンプレートを生成します" + +#: data/ui/glabels-ui.xml.h:29 +msgid "Create a new document" +msgstr "新しいドキュメントを作成します" + +#: data/ui/glabels-ui.xml.h:30 +msgid "Create barcode object" +msgstr "バーコード・オブジェクトを作成します" + +#: data/ui/glabels-ui.xml.h:31 +msgid "Create box/rectangle object" +msgstr "四角/三角のオブジェクトを作成します" + +#: data/ui/glabels-ui.xml.h:32 +msgid "Create ellipse/circle object" +msgstr "楕円/円オブジェクトを作成します" + +#: data/ui/glabels-ui.xml.h:33 +msgid "Create image object" +msgstr "画像オブジェクトを作成します" + +#: data/ui/glabels-ui.xml.h:34 +msgid "Create line object" +msgstr "直線オブジェクトを作成します" + +#: data/ui/glabels-ui.xml.h:35 +msgid "Create text object" +msgstr "文字オブジェクトを作成します" + +#: data/ui/glabels-ui.xml.h:36 +msgid "Cu_t" +msgstr "切り取り(_T)" + +#: data/ui/glabels-ui.xml.h:37 +msgid "Customize" +msgstr "カスタマイズ" + +#: data/ui/glabels-ui.xml.h:38 +msgid "Customize Drawing Toolbar" +msgstr "ツールバー" + +#: data/ui/glabels-ui.xml.h:39 +msgid "Customize Main Toolbar" +msgstr "メイン・ツールバー" + +#: data/ui/glabels-ui.xml.h:40 +msgid "Customize Property Toolbar" +msgstr "プロパティ・ツールバー" + +#: data/ui/glabels-ui.xml.h:41 +msgid "Customize toolbars" +msgstr "ツールバーのカスタマイズ" + +#: data/ui/glabels-ui.xml.h:42 +msgid "Cut" +msgstr "切り取り" + +#: data/ui/glabels-ui.xml.h:43 +msgid "Cut the selection" +msgstr "選択範囲を切り取ります" + +#: data/ui/glabels-ui.xml.h:44 +msgid "Decrease magnification" +msgstr "拡大率を下げます" + +#: data/ui/glabels-ui.xml.h:45 +msgid "Delete" +msgstr "削除" + +#: data/ui/glabels-ui.xml.h:46 +msgid "Delete the selected objects" +msgstr "選択したオブジェクトを削除します" + +#: data/ui/glabels-ui.xml.h:47 +msgid "Drawing toolbar" +msgstr "ツールバーの表示方法" + +#: data/ui/glabels-ui.xml.h:48 +msgid "Dump XML" +msgstr "XML のダンプ" + +#: data/ui/glabels-ui.xml.h:49 +msgid "Dump the UI Xml description" +msgstr "GUI の XML 記述をダンプ表示します" + +#: data/ui/glabels-ui.xml.h:50 +msgid "Edit merge properties" +msgstr "結合プロパティを編集します" + +#: data/ui/glabels-ui.xml.h:54 +msgid "Flip object horizontally" +msgstr "オブジェクトを水平方向にひっくり返します" + +#: data/ui/glabels-ui.xml.h:55 +msgid "Flip object vertically" +msgstr "オブジェクトを垂直方向にひっくり返します" + +#: data/ui/glabels-ui.xml.h:56 +msgid "Font name" +msgstr "フォント名です" + +#: data/ui/glabels-ui.xml.h:57 +msgid "Font selector" +msgstr "フォント・セレクタ" + +#: data/ui/glabels-ui.xml.h:58 +msgid "Font size" +msgstr "フォント・サイズです" + +#: data/ui/glabels-ui.xml.h:59 +msgid "Icon and _Text" +msgstr "アイコンとラベル(_T)" + +#: data/ui/glabels-ui.xml.h:60 +msgid "Increase magnification" +msgstr "拡大率を上げます" + +#: data/ui/glabels-ui.xml.h:61 +msgid "Italic" +msgstr "文字を斜体にします" + +#: data/ui/glabels-ui.xml.h:63 +msgid "Left align" +msgstr "左に寄せませす" + +#: data/ui/glabels-ui.xml.h:65 +msgid "Line width" +msgstr "線の幅を選択します" + +#: data/ui/glabels-ui.xml.h:66 +msgid "Lower object to bottom" +msgstr "オブジェクトを後ろに回します" + +#: data/ui/glabels-ui.xml.h:67 +msgid "M_arkup" +msgstr "マークアップ(_A)" + +#: data/ui/glabels-ui.xml.h:68 +msgid "Main toolbar" +msgstr "メイン・ツールバー" + +#: data/ui/glabels-ui.xml.h:69 +msgid "Markup" +msgstr "マークアップ" + +#: data/ui/glabels-ui.xml.h:70 +msgid "Modify document properties" +msgstr "ドキュメントのプロパティを修正します" + +#: data/ui/glabels-ui.xml.h:71 +msgid "New" +msgstr "新規" + +#: data/ui/glabels-ui.xml.h:72 +msgid "Object property editor" +msgstr "オブジェクト・プロパティのエディタ" + +#: data/ui/glabels-ui.xml.h:73 +msgid "Only show icons in the drawing toolbar" +msgstr "ツールバーの中にアイコンのみ表示します" + +#: data/ui/glabels-ui.xml.h:74 +msgid "Only show icons in the main toolbar" +msgstr "メイン・ツールバーの中にアイコンのみ表示します" + +#: data/ui/glabels-ui.xml.h:76 +msgid "Open a file" +msgstr "ファイルを開きます" + +#: data/ui/glabels-ui.xml.h:77 +msgid "Open the glabels manual" +msgstr "gLabeles のマニュアルを開きます" + +#: data/ui/glabels-ui.xml.h:78 +msgid "Paste" +msgstr "貼り付け" + +#: data/ui/glabels-ui.xml.h:79 +msgid "Paste the clipboard" +msgstr "クリップボードの内容を貼り付けます" + +#: data/ui/glabels-ui.xml.h:80 +msgid "Pr_eferences..." +msgstr "設定(_E)..." + +#: data/ui/glabels-ui.xml.h:81 +msgid "Preferences" +msgstr "gLabel の設定" + +#: data/ui/glabels-ui.xml.h:83 +msgid "Print the current file" +msgstr "このファイルを印刷します" + +#: data/ui/glabels-ui.xml.h:84 +msgid "Proper_ties..." +msgstr "プロパティ(_T)..." + +#: data/ui/glabels-ui.xml.h:85 +msgid "Properties" +msgstr "プロパティ" + +#: data/ui/glabels-ui.xml.h:86 +msgid "Property toolbar" +msgstr "プロパティのツールバー" + +#: data/ui/glabels-ui.xml.h:87 +msgid "Quit" +msgstr "終了" + +#: data/ui/glabels-ui.xml.h:88 +msgid "Quit the program" +msgstr "gLabels を終了します" + +#: data/ui/glabels-ui.xml.h:89 +msgid "Raise object to top" +msgstr "オブジェクトを前に持ってきます" + +#: data/ui/glabels-ui.xml.h:90 +msgid "Recent _Files" +msgstr "最近開いたファイル(_F)" + +#: data/ui/glabels-ui.xml.h:91 +msgid "Redo" +msgstr "やり直し" + +#: data/ui/glabels-ui.xml.h:92 +msgid "Redo the undone action" +msgstr "完了していない操作をやり直します" + +#: data/ui/glabels-ui.xml.h:93 +msgid "Remove all selections" +msgstr "選択範囲を解除します" + +#: data/ui/glabels-ui.xml.h:95 +#, no-c-format +msgid "Restore scale to 100%" +msgstr "拡大率を 100% に戻します" + +#: data/ui/glabels-ui.xml.h:96 +msgid "Right align" +msgstr "右に寄せます" + +#: data/ui/glabels-ui.xml.h:99 +msgid "Rotate object 90 clockwise" +msgstr "オブジェクトを時計回りに 90°回転させます" + +#: data/ui/glabels-ui.xml.h:100 +msgid "Rotate object 90 counter-clockwise" +msgstr "オブジェクトを反時計回りに 90°回転させます" + +#: data/ui/glabels-ui.xml.h:101 +msgid "Save" +msgstr "保存" + +#: data/ui/glabels-ui.xml.h:102 +msgid "Save As" +msgstr "名前を付けて保存" + +#: data/ui/glabels-ui.xml.h:103 +msgid "Save _As..." +msgstr "別名で保存(_A)..." + +#: data/ui/glabels-ui.xml.h:104 +msgid "Save the current file" +msgstr "このファイルを保存します" + +#: data/ui/glabels-ui.xml.h:105 +msgid "Save the current file with a different name" +msgstr "このデータに別の名前を付けて保存します" + +#: data/ui/glabels-ui.xml.h:106 +msgid "Select All" +msgstr "全て選択" + +#: data/ui/glabels-ui.xml.h:107 +msgid "Select _All" +msgstr "全て選択(_A)" + +#: data/ui/glabels-ui.xml.h:108 +msgid "Select all objects" +msgstr "全てのオブジェクトを選択します" + +#: data/ui/glabels-ui.xml.h:109 +msgid "Select, move and modify objects" +msgstr "オブジェクトの選択、移動、編集を行います" + +#: data/ui/glabels-ui.xml.h:111 +msgid "Set drawing toolbar button style according to desktop default" +msgstr "デスクトップの設定に従ってツールバーを表示します" + +#: data/ui/glabels-ui.xml.h:112 +msgid "Set main toolbar button style according to desktop default" +msgstr "デスクトップの設定に従ってメイン・ツールバーを表示します" + +#: data/ui/glabels-ui.xml.h:113 +msgid "Show _Tooltips" +msgstr "ツールチップの表示(_T)" + +#: data/ui/glabels-ui.xml.h:114 +msgid "Show both icons and texts in the drawing toolbar" +msgstr "ツールバーにアイコンとラベルの両方を表示します" + +#: data/ui/glabels-ui.xml.h:115 +msgid "Show both icons and texts in the main toolbar" +msgstr "メイン・ツールバーにアイコンとラベルの両方を表示します" + +#: data/ui/glabels-ui.xml.h:116 +msgid "Show tooltips in the drawing toolbar" +msgstr "ツールバーにツールチップを表示します" + +#: data/ui/glabels-ui.xml.h:117 +msgid "Show tooltips in the main toolbar" +msgstr "メイン・ツールバーにツールチップを表示します" + +#: data/ui/glabels-ui.xml.h:118 +msgid "Show tooltips in the property toolbar" +msgstr "プロパティ・ツールバーにツールチップを表示します" + +#: data/ui/glabels-ui.xml.h:119 +msgid "Template Designer" +msgstr "テンプレート・デザイナ" + +#: data/ui/glabels-ui.xml.h:120 +msgid "Template _Designer..." +msgstr "テンプレート・デザイナ(_D)..." + +#: data/ui/glabels-ui.xml.h:121 +msgid "Text color" +msgstr "文字の色を選択します" + +#: data/ui/glabels-ui.xml.h:122 +msgid "U_n-select All" +msgstr "全て選択解除(_N)" + +#: data/ui/glabels-ui.xml.h:123 +msgid "Un-select All" +msgstr "全て選択解除" + +#: data/ui/glabels-ui.xml.h:124 +msgid "Undo" +msgstr "元に戻す" + +#: data/ui/glabels-ui.xml.h:125 +msgid "Undo the last action" +msgstr "最後の操作を取り消します" + +#: data/ui/glabels-ui.xml.h:126 +msgid "Zoom _1:1" +msgstr "拡大率 1:1(_1)" + +#: data/ui/glabels-ui.xml.h:127 +msgid "Zoom _In" +msgstr "拡大(_I)" + +#: data/ui/glabels-ui.xml.h:128 +msgid "Zoom _Out" +msgstr "縮小(_O)" + +#: data/ui/glabels-ui.xml.h:129 +msgid "Zoom to _fit" +msgstr "ウィンドウにあわせる(_F)" + +#: data/ui/glabels-ui.xml.h:130 +msgid "Zoom to fit window" +msgstr "ウィンドウのサイズに合わせます" + +#: data/ui/glabels-ui.xml.h:131 +msgid "_About..." +msgstr "情報(_A)..." + +#: data/ui/glabels-ui.xml.h:132 +msgid "_Bottoms" +msgstr "下部(_B)" + +#: data/ui/glabels-ui.xml.h:135 +msgid "_Close" +msgstr "閉じる(_C)" + +#: data/ui/glabels-ui.xml.h:136 +msgid "_Contents" +msgstr "目次(_C)" + +#: data/ui/glabels-ui.xml.h:137 +msgid "_Copy" +msgstr "複写(_C)" + +#: data/ui/glabels-ui.xml.h:138 +msgid "_Create Object" +msgstr "オブジェクトの生成(_C)" + +#: data/ui/glabels-ui.xml.h:139 +msgid "_Debug" +msgstr "デバッグ(_D)" + +#: data/ui/glabels-ui.xml.h:141 +msgid "_Desktop Default" +msgstr "デスクトップ設定(_D)" + +#: data/ui/glabels-ui.xml.h:142 +msgid "_Drawing Toolbar" +msgstr "ツールバー(_D)" + +#: data/ui/glabels-ui.xml.h:143 +msgid "_Edit" +msgstr "編集(_E)" + +#: data/ui/glabels-ui.xml.h:145 +msgid "_File" +msgstr "ファイル(_F)" + +#: data/ui/glabels-ui.xml.h:146 +msgid "_Grid" +msgstr "グリッド(_G)" + +#: data/ui/glabels-ui.xml.h:147 +msgid "_Help" +msgstr "ヘルプ(_H)" + +#: data/ui/glabels-ui.xml.h:148 +msgid "_Icon" +msgstr "アイコン(_I)" + +#: data/ui/glabels-ui.xml.h:152 +msgid "_Main Toolbar" +msgstr "メイン・ツールバー(_M)" + +#: data/ui/glabels-ui.xml.h:153 +msgid "_Merge Properties..." +msgstr "結合プロパティ(_M)..." + +#: data/ui/glabels-ui.xml.h:154 +msgid "_New" +msgstr "新規(_N)" + +#: data/ui/glabels-ui.xml.h:155 +msgid "_Objects" +msgstr "オブジェクト(_O)" + +#: data/ui/glabels-ui.xml.h:156 +msgid "_Open..." +msgstr "開く(_O)..." + +#: data/ui/glabels-ui.xml.h:158 +msgid "_Paste" +msgstr "貼り付け(_P)" + +#: data/ui/glabels-ui.xml.h:159 +msgid "_Print..." +msgstr "印刷(_P)..." + +#: data/ui/glabels-ui.xml.h:160 +msgid "_Property Toolbar" +msgstr "プロパティ・ツールバー(_P)" + +#: data/ui/glabels-ui.xml.h:161 +msgid "_Quit" +msgstr "終了(_Q)" + +#: data/ui/glabels-ui.xml.h:164 +msgid "_Save" +msgstr "保存(_S)" + +#: data/ui/glabels-ui.xml.h:168 +msgid "_View" +msgstr "表示(_V)" + +#: data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr " " + +#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 +#: data/glade/template-designer.glade.h:5 +msgid "*" +msgstr "*" + +#: data/glade/prefs-dialog.glade.h:3 +msgid "Default page size" +msgstr "ページ・サイズの初期値" + +#: data/glade/prefs-dialog.glade.h:4 +msgid "Fill" +msgstr "塗りつぶし" + +#: data/glade/prefs-dialog.glade.h:5 +msgid "Line" +msgstr "線" + +#: data/glade/prefs-dialog.glade.h:6 +msgid "Text" +msgstr "文字" + +#: data/glade/prefs-dialog.glade.h:7 +msgid "Units" +msgstr "単位" + +#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 +msgid "Alignment:" +msgstr "位置:" + +#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 +msgid "Color:" +msgstr "色:" + +#: data/glade/prefs-dialog.glade.h:10 +msgid "Font:" +msgstr "フォント:" + +#: data/glade/prefs-dialog.glade.h:11 +msgid "ISO A4" +msgstr "ISO A4 版" + +#: data/glade/prefs-dialog.glade.h:12 +msgid "Inches" +msgstr "インチ" + +#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 +msgid "Line Spacing:" +msgstr "行間:" + +#: data/glade/prefs-dialog.glade.h:14 +msgid "Locale" +msgstr "ローケル" + +#: data/glade/prefs-dialog.glade.h:15 +msgid "Millimeters" +msgstr "ミリ" + +#: data/glade/prefs-dialog.glade.h:16 +msgid "Object defaults" +msgstr "オブジェクトのデフォルト" + +#: data/glade/prefs-dialog.glade.h:17 +msgid "Points" +msgstr "ポイント" + +#: data/glade/prefs-dialog.glade.h:18 +msgid "Select default properties for new objects." +msgstr "新規に作成するオブジェクトのデフォルト値を選択して下さい。" + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "利用する言語 (ロケール) に依存する動作を選択して下さい。" + +#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:25 +msgid "US Letter" +msgstr "US レター" + +#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 +#: data/glade/template-designer.glade.h:72 +msgid "Width:" +msgstr "幅:" + +#: data/glade/object-editor.glade.h:2 +msgid "00000000000 00000" +msgstr "00000000000 00000" + +#: data/glade/object-editor.glade.h:3 +msgid "Xxx object properties" +msgstr "" +"Xxx オブジェクトのプロパティ" + +#: data/glade/object-editor.glade.h:5 +msgid "Allow merge to automatically shrink text" +msgstr "自動的に文字を小さくして結合できるようにする" + +#: data/glade/object-editor.glade.h:6 +msgid "Angle:" +msgstr "角度:" + +#: data/glade/object-editor.glade.h:7 +msgid "Checksum" +msgstr "チェックサム" + +#: data/glade/object-editor.glade.h:10 +msgid "Family:" +msgstr "ファミリ:" + +#: data/glade/object-editor.glade.h:12 +msgid "Fill" +msgstr "塗りつぶし" + +#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 +msgid "Height:" +msgstr "高さ:" + +#: data/glade/object-editor.glade.h:14 +msgid "Image" +msgstr "画像" + +#: data/glade/object-editor.glade.h:15 +msgid "Insert merge field" +msgstr "結合フィールドの挿入" + +#: data/glade/object-editor.glade.h:17 +msgid "Length:" +msgstr "長さ:" + +#: data/glade/object-editor.glade.h:18 +msgid "Line" +msgstr "直線" + +#: data/glade/object-editor.glade.h:20 +msgid "Literal:" +msgstr "リテラル:" + +#: data/glade/object-editor.glade.h:21 +msgid "Load image" +msgstr "画像の読み込み" + +#: data/glade/object-editor.glade.h:22 +msgid "Position" +msgstr "位置" + +#: data/glade/object-editor.glade.h:23 +msgid "Reset image size" +msgstr "画像サイズのリセット" + +#: data/glade/object-editor.glade.h:24 +msgid "Size" +msgstr "サイズ" + +#: data/glade/object-editor.glade.h:25 +msgid "Size:" +msgstr "サイズ:" + +#: data/glade/object-editor.glade.h:26 +msgid "Style" +msgstr "スタイル" + +#: data/glade/object-editor.glade.h:27 +msgid "Style:" +msgstr "スタイル:" + +#: data/glade/object-editor.glade.h:30 +msgid "X:" +msgstr "X:" + +#: data/glade/object-editor.glade.h:31 +msgid "Y:" +msgstr "Y:" + +#: data/glade/object-editor.glade.h:32 +msgid "degrees" +msgstr "度" + +#: data/glade/object-editor.glade.h:33 +msgid "dialog1" +msgstr "dialog1" + +#: data/glade/object-editor.glade.h:34 +msgid "digits:" +msgstr "桁数:" + +#: data/glade/object-editor.glade.h:35 +msgid "format:" +msgstr "書式:" + +#: data/glade/template-designer.glade.h:1 +msgid " " +msgstr " " + +#: data/glade/template-designer.glade.h:2 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(例: \"封筒のラベル\", \"名刺\", ...)" + +#: data/glade/template-designer.glade.h:3 +msgid "(e.g., 8163A)" +msgstr "(例: 8163A)" + +#: data/glade/template-designer.glade.h:4 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(例: Avery, Acme, ...)" + +#: data/glade/template-designer.glade.h:6 +msgid "1. Outer radius:" +msgstr "1. 外径:" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "1. 半径:" + +#: data/glade/template-designer.glade.h:8 +msgid "1. Width:" +msgstr "1. 幅:" + +#: data/glade/template-designer.glade.h:9 +msgid "2. Height:" +msgstr "2. 高さ:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "2. インナーの半径:" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "2. 余分な部分 (重ね刷り可):" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "3. クリッピングの幅:" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "3. 余白" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "3. コーナー (角度):" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "4. クリッピングの高さ:" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "4. 水平方向の余分な部分 (重ね刷り可):" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "5. 垂直方向の余分な部分 (重ね刷り可):" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "5. 余分な部分 (重ね刷り可):" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "6. 余白" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "ブランド/製造元:" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD の形 (含むクレジット・カード CD)" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"おめでとうございます!\n" +"\n" +"gLabels テンプレートの生成が完了しました。\n" +"このデザインを採用し保存する場合は、[適用] をクリックして下さい。\n" +"\n" +"[キャンセル] をクリックするとデザインを破棄することができます。\n" +"または [戻る] をクリックするとやり直すことが可能です。" + +#: data/glade/template-designer.glade.h:30 +msgid "Design Completed" +msgstr "デザインが完了しました" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "左上隅からの距離 (x0):" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "左上隅からの距離 (y0):" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "水平方向のピッチ (dx):" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" +"何個のラベルをテンプレートの中に作成しますか?\n" +"\n" +"レイアウトはラベルまたはカードの集まりで、それらを格子状に配置することができ" +"ます。\n" +"最初のサンプルのように、ほとんどのテンプレートではレイアウトは一つで十分で" +"す。\n" +"二番目のサンプルでは、二つのレイアウトが必要な場合を図にしたものです。" + +#: data/glade/template-designer.glade.h:40 +msgid "Label Size (CD/DVD)" +msgstr "ラベルのサイズ (CD/DVD)" + +#: data/glade/template-designer.glade.h:41 +msgid "Label Size (Round)" +msgstr "ラベルのサイズ (円)" + +#: data/glade/template-designer.glade.h:42 +msgid "Label or Card Shape" +msgstr "ラベルまたはカードの形状" + +#: data/glade/template-designer.glade.h:43 +msgid "Label or Card Size (Rectangular)" +msgstr "ラベルまたはカードのサイズ (長方形)" + +#: data/glade/template-designer.glade.h:44 +msgid "Layout #1" +msgstr "レイアウト #1:" + +#: data/glade/template-designer.glade.h:45 +msgid "Layout #2" +msgstr "レイアウト #2:" + +#: data/glade/template-designer.glade.h:46 +msgid "Layout(s)" +msgstr "レイアウト" + +#: data/glade/template-designer.glade.h:47 +msgid "Name and Description" +msgstr "名前と説明" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "横方向の数 (nx):" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "縦方向の数 (ny):" + +#: data/glade/template-designer.glade.h:50 +msgid "Number of Layouts" +msgstr "レイアウトの数" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "レイアウトの数:" + +#: data/glade/template-designer.glade.h:52 +msgid "Page Size" +msgstr "用紙のサイズ" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "パート番号" + +#: data/glade/template-designer.glade.h:55 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "テンプレートの識別情報を入力して下さい。" + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "レイアウト情報を入力して下さい。" + +#: data/glade/template-designer.glade.h:57 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "テンプレートのラベル単体のサイズをそれぞれ入力して下さい。" + +#: data/glade/template-designer.glade.h:58 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "テンプレートのラベルまたはカード単体のサイズをそれぞれ入力して下さい。" + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "ラベルまたはカードの基本的な形状を選択して下さい。" + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "テンプレート用紙のサイズを選択して下さい。" + +#: data/glade/template-designer.glade.h:61 +msgid "Print test sheet" +msgstr "用紙のテスト印刷" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "長方形または正方形 (コーナーを丸くすることも可)" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "円" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"レイアウトが二つ必要な\n" +"テンプレート" + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"レイアウトが一つだけで\n" +"十分なレイアウト" + +#: data/glade/template-designer.glade.h:68 +msgid "Vertical pitch (dy):" +msgstr "垂直方向のピッチ (dy):" + +#: data/glade/template-designer.glade.h:69 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"gLabels のテンプレート・デザイナへようこそ。\n" +"\n" +"このデザイナでは gLabels のカスタム・テンプレートの作成をお手伝いします。" + +#: data/templates/paper-sizes.xml.h:1 +msgid "A0" +msgstr "A0版" + +#: data/templates/paper-sizes.xml.h:2 +msgid "A1" +msgstr "A1版" + +#: data/templates/paper-sizes.xml.h:3 +msgid "A10" +msgstr "A10版" + +#: data/templates/paper-sizes.xml.h:4 +msgid "A2" +msgstr "A2版" + +#: data/templates/paper-sizes.xml.h:5 +msgid "A3" +msgstr "A3版" + +#: data/templates/paper-sizes.xml.h:6 +msgid "A4" +msgstr "A4版" + +#: data/templates/paper-sizes.xml.h:7 +msgid "A5" +msgstr "A5版" + +#: data/templates/paper-sizes.xml.h:8 +msgid "A6" +msgstr "A6版" + +#: data/templates/paper-sizes.xml.h:9 +msgid "A7" +msgstr "A7版" + +#: data/templates/paper-sizes.xml.h:10 +msgid "A8" +msgstr "A8版" + +#: data/templates/paper-sizes.xml.h:11 +msgid "A9" +msgstr "A9版" + +#: data/templates/paper-sizes.xml.h:12 +msgid "B0" +msgstr "B0版" + +#: data/templates/paper-sizes.xml.h:13 +msgid "B1" +msgstr "B1版" + +#: data/templates/paper-sizes.xml.h:14 +msgid "B10" +msgstr "B10版" + +#: data/templates/paper-sizes.xml.h:15 +msgid "B2" +msgstr "B2版" + +#: data/templates/paper-sizes.xml.h:16 +msgid "B3" +msgstr "B3版" + +#: data/templates/paper-sizes.xml.h:17 +msgid "B4" +msgstr "B4版" + +#: data/templates/paper-sizes.xml.h:18 +msgid "B5" +msgstr "B5版" + +#: data/templates/paper-sizes.xml.h:19 +msgid "B6" +msgstr "B6版" + +#: data/templates/paper-sizes.xml.h:20 +msgid "B7" +msgstr "B7版" + +#: data/templates/paper-sizes.xml.h:21 +msgid "B8" +msgstr "B8版" + +#: data/templates/paper-sizes.xml.h:22 +msgid "B9" +msgstr "B9版" + +#: data/templates/paper-sizes.xml.h:23 +msgid "US Executive" +msgstr "US エグゼクティブ" + +#: data/templates/paper-sizes.xml.h:24 +msgid "US Legal" +msgstr "US リーガル" + +#: data/templates/avery-us-templates.xml.h:1 +#: data/templates/zweckform-iso-templates.xml.h:1 +msgid "Address Labels" +msgstr "宛名のラベル" + +#: data/templates/avery-us-templates.xml.h:2 +#: data/templates/avery-iso-templates.xml.h:2 +#: data/templates/zweckform-iso-templates.xml.h:3 +#: data/templates/misc-us-templates.xml.h:2 +#: data/templates/misc-iso-templates.xml.h:9 +msgid "Business Cards" +msgstr "名刺" + +#: data/templates/avery-us-templates.xml.h:3 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "CD/DVD のラベル (Disc ラベル)" + +#: data/templates/avery-us-templates.xml.h:4 +msgid "Diskette Labels" +msgstr "フロッピーのラベル" + +#: data/templates/avery-us-templates.xml.h:5 +msgid "Filing Labels" +msgstr "ファイル・バインダーのラベル" + +#: data/templates/avery-us-templates.xml.h:6 +msgid "Full Sheet Labels" +msgstr "全用紙のラベル" + +#: data/templates/avery-us-templates.xml.h:7 +msgid "Large Round Labels" +msgstr "大きな矩形のラベル" + +#: data/templates/avery-us-templates.xml.h:8 +msgid "Name Badge Labels" +msgstr "名前つきバッジのラベル" + +#: data/templates/avery-us-templates.xml.h:9 +msgid "Return Address Labels" +msgstr "返信用宛名のラベル" + +#: data/templates/avery-us-templates.xml.h:10 +msgid "Shipping Labels" +msgstr "出荷ラベル" + +#: data/templates/avery-us-templates.xml.h:11 +msgid "Small Round Labels" +msgstr "小さな矩形のラベル" + +#: data/templates/avery-us-templates.xml.h:12 +msgid "Square Labels" +msgstr "矩形のラベル" + +#: data/templates/avery-us-templates.xml.h:13 +msgid "Video Tape Face Labels" +msgstr "ビデオ・テープの表面ラベル" + +#: data/templates/avery-us-templates.xml.h:14 +msgid "Video Tape Spine Labels" +msgstr "ビデオ・テープの背面ラベル" + +#: data/templates/avery-iso-templates.xml.h:1 +msgid "Address labels" +msgstr "宛名のラベル" + +#: data/templates/avery-iso-templates.xml.h:3 +msgid "CD Booklet" +msgstr "CD の小冊子" + +#: data/templates/avery-iso-templates.xml.h:4 +msgid "CD Inlet" +msgstr "CD のインレット" + +#: data/templates/avery-iso-templates.xml.h:5 +#: data/templates/zweckform-iso-templates.xml.h:4 +#: data/templates/misc-us-templates.xml.h:4 +#: data/templates/misc-iso-templates.xml.h:10 +msgid "CD/DVD Labels" +msgstr "CD/DVD のラベル" + +#: data/templates/avery-iso-templates.xml.h:6 +msgid "Diskette labels" +msgstr "フロッピーのラベル" + +#: data/templates/avery-iso-templates.xml.h:7 +#: data/templates/zweckform-iso-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:17 +msgid "Mailing Labels" +msgstr "封筒のラベル" + +#: data/templates/avery-iso-templates.xml.h:8 +msgid "Mailing labels" +msgstr "封筒のラベル" + +#: data/templates/avery-iso-templates.xml.h:9 +msgid "Mini Address Labels" +msgstr "小さな宛名のラベル" + +#: data/templates/avery-iso-templates.xml.h:10 +msgid "Shipping labels" +msgstr "出荷ラベル" + +#: data/templates/zweckform-iso-templates.xml.h:2 +msgid "Allround Labels" +msgstr "汎用的なラベル" + +#: data/templates/zweckform-iso-templates.xml.h:5 +msgid "Correction and Cover-up Labels" +msgstr "コレクションとカバーのラベル" + +#: data/templates/zweckform-iso-templates.xml.h:6 +msgid "Lever Arch File Labels" +msgstr "レバー・アーチ・ファイルのラベル" + +#: data/templates/zweckform-iso-templates.xml.h:8 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "QSL-Karten Etiketten (70mm x 50.8mm)" + +#: data/templates/zweckform-iso-templates.xml.h:9 +msgid "Rectangular Copier Labels" +msgstr "長方形のコピー機のラベル" + +#: data/templates/zweckform-iso-templates.xml.h:10 +#: data/templates/misc-iso-templates.xml.h:22 +msgid "Rectangular Labels" +msgstr "長方形のラベル" + +#: data/templates/zweckform-iso-templates.xml.h:11 +msgid "Video Labels (back)" +msgstr "ビデオのラベル (裏側)" + +#: data/templates/misc-us-templates.xml.h:1 +msgid "Business Card CD" +msgstr "名刺 CD" + +#: data/templates/misc-us-templates.xml.h:3 +msgid "CD Template Rectangles" +msgstr "CD テンプレート (長方形)" + +#: data/templates/misc-us-templates.xml.h:5 +msgid "CD/DVD Labels (Face Only)" +msgstr "CD/DVD のラベル (外側のみ)" + +#: data/templates/misc-us-templates.xml.h:6 +#: data/templates/misc-iso-templates.xml.h:11 +msgid "CD/DVD Labels (face only)" +msgstr "CD/DVD のラベル (外側のみ)" + +#: data/templates/misc-us-templates.xml.h:7 +msgid "DLT Labels" +msgstr "DLT のラベル" + +#: data/templates/misc-us-templates.xml.h:8 +msgid "Microtube labels" +msgstr "マイクロチューブのラベル" + +#: data/templates/misc-us-templates.xml.h:9 +msgid "Mini-CD Labels" +msgstr "ミニ CD のラベル" + +#: data/templates/misc-us-templates.xml.h:10 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "PRO CD のラベル二枚 (CD 格納ケースのみ)" + +#: data/templates/misc-us-templates.xml.h:11 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "PRO CD ラベル二枚 (外側のみ)" + +#: data/templates/misc-us-templates.xml.h:12 +#: data/templates/misc-iso-templates.xml.h:21 +msgid "PRO CD Labels 2-up (face only)" +msgstr "PRO CD ラベル二枚 (外側のみ)" + +#: data/templates/misc-us-templates.xml.h:13 +msgid "Slimline CD Case (rightside up)" +msgstr "薄い CD フォルダ (右側)" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Slimline CD Case (upside down)" +msgstr "薄い CD フォルダ (上側)" + +#: data/templates/misc-iso-templates.xml.h:1 +msgid "Agipa 119488: Business Cards" +msgstr "Agipa 119488: 名刺" + +#: data/templates/misc-iso-templates.xml.h:2 +msgid "Allround Labels --24" +msgstr "汎用的なラベル --24" + +#: data/templates/misc-iso-templates.xml.h:3 +msgid "Allround Labels --44" +msgstr "汎用的なラベル --44" + +#: data/templates/misc-iso-templates.xml.h:4 +msgid "Allround Labels --64" +msgstr "汎用的なラベル --64" + +#: data/templates/misc-iso-templates.xml.h:5 +msgid "Allround Labels --65" +msgstr "汎用的なラベル --65" + +#: data/templates/misc-iso-templates.xml.h:6 +msgid "Arch File Labels" +msgstr "アーチ・ファイルのラベル" + +#: data/templates/misc-iso-templates.xml.h:7 +msgid "Arch File Labels (large)" +msgstr "アーチ・ファイルのラベル (大)" + +#: data/templates/misc-iso-templates.xml.h:8 +msgid "Arch File Labels (small)" +msgstr "アーチ・ファイルのラベル (小)" + +#: data/templates/misc-iso-templates.xml.h:12 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "CD/DVD のラベル標準書式 (外側のみ)" + +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Diskette Labels (face only)" +msgstr "フロッピーのラベル (外側のみ)" + +#: data/templates/misc-iso-templates.xml.h:14 +msgid "EPSON Photo Stickers 16" +msgstr "EPSON フォト・ステッカー 16" + +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Etiketten" +msgstr "Etiketten" + +#: data/templates/misc-iso-templates.xml.h:16 +msgid "Fridge Magnet Stickers" +msgstr "冷蔵庫に貼る磁気ステッカ" + +#: data/templates/misc-iso-templates.xml.h:18 +msgid "Mailing Labels --14" +msgstr "封筒のラベル --14" + +#: data/templates/misc-iso-templates.xml.h:19 +msgid "Mailing Labels-2 columns" +msgstr "封筒のラベル (二列)" + +#: data/templates/misc-iso-templates.xml.h:20 +msgid "Mailing Labels-3 columns" +msgstr "封筒のラベル (三列)" + +#: data/templates/misc-iso-templates.xml.h:23 +msgid "Video Labels (face only)" +msgstr "ビデオのラベル (外側のみ)" + +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "ラベルや名刺、メディアのカバーを生成します" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "gLabels ラベル・デザイナ" + +#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "gLabels のプロジェクト・ファイル" diff --git a/po/ko.po b/po/ko.po new file mode 100644 index 00000000..f908f70a --- /dev/null +++ b/po/ko.po @@ -0,0 +1,2543 @@ +# gLabels 한국어 번역 파일입니다. +# +# +msgid "" +msgstr "" +"Project-Id-Version: glabels 2.3. pre0svn\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-08-15 18:13-0400\n" +"PO-Revision-Date: 2008-02-26 10:59+0900\n" +"Last-Translator: YunSeok Choi \n" +"Language-Team: none\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/glabels.c:55 +msgid "Show view debugging messages." +msgstr "보기의 디버깅 메시지를 보이기" + +#: src/glabels.c:58 +msgid "Show item debugging messages." +msgstr "아이템 디버깅 메시지를 보이기" + +#: src/glabels.c:61 +msgid "Show printing debugging messages." +msgstr "인쇄 디버깅 메시지를 보이기" + +#: src/glabels.c:64 +msgid "Show prefs debugging messages." +msgstr "Prefs 디버깅 메시지를 보이기" + +#: src/glabels.c:67 +msgid "Show file debugging messages." +msgstr "파일 디버깅 메시지를 보이기" + +#: src/glabels.c:70 +msgid "Show document debugging messages." +msgstr "문서 디버깅 메시지를 보이기" + +#: src/glabels.c:73 +msgid "Show template debugging messages." +msgstr "Template 디버깅 메시지를 보이기" + +#: src/glabels.c:76 +msgid "Show paper debugging messages." +msgstr "Paper 디버깅 메시지를 보이기" + +#: src/glabels.c:79 +msgid "Show xml debugging messages." +msgstr "XML 디버깅 메시지를 보이기" + +#: src/glabels.c:82 +msgid "Show document merge debugging messages." +msgstr "Document 여백 디버깅 메시지를 보이기" + +#: src/glabels.c:85 +msgid "Show commands debugging messages." +msgstr "Command 디버깅 메시지를 보이기" + +#: src/glabels.c:88 +msgid "Show undo debugging messages." +msgstr "Undo 디버깅 메시지를 보이기" + +#: src/glabels.c:91 +msgid "Show recent debugging messages." +msgstr "최근의 디버깅 메시지를 보이기" + +#: src/glabels.c:94 +msgid "Show window debugging messages." +msgstr "윈도우 디버깅 메시지를 보이기" + +#: src/glabels.c:97 +msgid "Show ui debugging messages." +msgstr "GUI 디버깅 메시지를 보이기" + +#: src/glabels.c:100 +msgid "Show property_bar debugging messages." +msgstr "속성도구 디버깅 메시지를 보이기" + +#: src/glabels.c:103 +msgid "Show media select widget debugging messages." +msgstr "선택 제품 미디어 디버깅 메시지를 보이기" + +#: src/glabels.c:106 +msgid "Show mini preview widget debugging messages." +msgstr "제품 작게 미리보기 디버깅 메시지를 보이기" + +#: src/glabels.c:109 +msgid "Show pixbuf cache debugging messages." +msgstr "pixbuf cache 디버깅 메시지를 보이기" + +#: src/glabels.c:112 +msgid "Show widget debugging messages." +msgstr "제품 디버깅 메시지를 보이기" + +#: src/glabels.c:115 +msgid "Show object editor debugging messages." +msgstr "개채 편집기 디버깅 메시지를 보이기" + +#: src/glabels.c:118 +msgid "Turn on all debugging messages." +msgstr "모든 디버깅 메시지 켜기" + +#: src/glabels.c:187 +msgid "Could not initialize Bonobo!\n" +msgstr "Bonobo 초기화 할 수 없음!\n" + +#: src/glabels-batch.c:48 +msgid "print this message" +msgstr "이 메시지를 인쇄" + +#: src/glabels-batch.c:50 +msgid "print the version of glabels-batch being used" +msgstr "gLabel-batch 버전 인쇄" + +#: src/glabels-batch.c:52 +msgid "set output filename (default=\"output.ps\")" +msgstr "출력 파일이름 지정 (기본 = \"output.ps\")" + +#: src/glabels-batch.c:52 +msgid "filename" +msgstr "파일이름" + +#: src/glabels-batch.c:54 +msgid "number of sheets (default=1)" +msgstr "용지 수(기본= 1)" + +#: src/glabels-batch.c:54 +msgid "sheets" +msgstr "용지" + +#: src/glabels-batch.c:56 +msgid "number of copies (default=1)" +msgstr "복사 수(기본= 1)" + +#: src/glabels-batch.c:56 +msgid "copies" +msgstr "복사" + +#: src/glabels-batch.c:58 +#: src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "외곽선 인쇄 (프린터 정렬 테스트)" + +#: src/glabels-batch.c:60 +#: src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "거꾸로 인쇄 (거울 효과)" + +#: src/glabels-batch.c:96 +msgid "[OPTION...] GLABELS_FILE..." +msgstr "[옵션...] gLabels 파일..." + +#: src/glabels-batch.c:116 +#, c-format +msgid "missing glabels file\n" +msgstr "gLabel 파일이 보이지 않음\n" + +#: src/glabels-batch.c:157 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "gLabel 파일 %s 을(를) 열 수 없습니다.\n" + +#: src/window.c:244 +msgid "(none) - gLabels" +msgstr "(없음) - gLabels" + +#: src/window.c:414 +msgid "(modified)" +msgstr "(수정됨)" + +#: src/stock.c:65 +#: data/ui/glabels-ui.xml.h:165 +msgid "_Select Mode" +msgstr "모드 선택(_S)" + +#: src/stock.c:66 +#: data/ui/glabels-ui.xml.h:166 +msgid "_Text" +msgstr "글자(_T)" + +#: src/stock.c:67 +#: data/ui/glabels-ui.xml.h:151 +msgid "_Line" +msgstr "선(_L)" + +#: src/stock.c:68 +#: data/ui/glabels-ui.xml.h:133 +msgid "_Box" +msgstr "사각형(_B)" + +#: src/stock.c:69 +#: data/ui/glabels-ui.xml.h:144 +msgid "_Ellipse" +msgstr "타원(_E)" + +#: src/stock.c:70 +#: data/ui/glabels-ui.xml.h:149 +msgid "_Image" +msgstr "그림(_I)" + +#: src/stock.c:71 +#: data/ui/glabels-ui.xml.h:11 +msgid "Bar_code" +msgstr "바코드(_C)" + +#: src/stock.c:72 +msgid "_Merge Properties" +msgstr "여백 속성(_M)" + +#: src/stock.c:73 +msgid "Object _Properties" +msgstr "항목 속성(_P)" + +#: src/stock.c:74 +#: data/ui/glabels-ui.xml.h:13 +msgid "Bring to _Front" +msgstr "앞으로 내기(_F)" + +#: src/stock.c:75 +#: data/ui/glabels-ui.xml.h:110 +msgid "Send to _Back" +msgstr "뒤로 보내기(_B)" + +#: src/stock.c:76 +#: data/ui/glabels-ui.xml.h:97 +msgid "Rotate _Left" +msgstr "왼쪽으로 회전(_L)" + +#: src/stock.c:77 +#: data/ui/glabels-ui.xml.h:98 +msgid "Rotate _Right" +msgstr "오른쪽으로 회전(_R)" + +#: src/stock.c:78 +#: data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "수직 뒤집기(_H)" + +#: src/stock.c:79 +#: data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "수평 뒤집기(_V)" + +#: src/stock.c:80 +#: data/ui/glabels-ui.xml.h:150 +msgid "_Lefts" +msgstr "좌측(_L)" + +#: src/stock.c:81 +#: data/ui/glabels-ui.xml.h:162 +msgid "_Rights" +msgstr "우측(_R)" + +#: src/stock.c:82 +#: data/ui/glabels-ui.xml.h:134 +msgid "_Centers" +msgstr "중앙(_C)" + +#: src/stock.c:83 +#: data/ui/glabels-ui.xml.h:167 +msgid "_Tops" +msgstr "상위(_T)" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "하위" + +#: src/stock.c:85 +msgid "Centers" +msgstr "중앙" + +#: src/stock.c:86 +#: src/stock.c:87 +#: data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "라벨 중앙(_N)" + +#: src/stock.c:88 +#: data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "색 채우기" + +#: src/stock.c:89 +#: data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "선 색상" + +#: src/stock.c:90 +#: src/stock.c:92 +msgid "Linked" +msgstr "연결" + +#: src/stock.c:91 +#: src/stock.c:93 +msgid "Not Linked" +msgstr "연결되지 않음" + +#: src/ui-property-bar.c:345 +#: src/object-editor.c:499 +msgid "Default" +msgstr "기본" + +#: src/ui-property-bar.c:360 +#: src/object-editor.c:512 +msgid "No fill" +msgstr "채우기 없음" + +#: src/ui-property-bar.c:375 +#: src/object-editor.c:505 +msgid "No line" +msgstr "선 없음" + +#: src/ui-sidebar.c:180 +msgid "Object properties" +msgstr "항목 속성" + +#: src/commands.c:385 +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 에서 Labelê³¼ 명함을 제작하는 프로그램입니다.\n" +"\n" +"Glabels는 자유소프트웨어 입니다; 여러분은 이 프로그램을 GNU(General Public License)에 따라 자유롭게 수정 배포 할 수 있습니다. 이 프로그램은 GNU의 Ver.2 를 따르고 있습니다. \n" +"\n" +"이 프로그램은 어떠한 저작권료 없이 사용되어 질 수 있습니다.(번역주 : 번역자는 GNU를 깊이 알지 못합니다. 이 부분의 번역에 지적하고픈 부분이 있다면 번역 자료와 함께 연락주십시오. xein@naver.com)\n" + +#: src/commands.c:399 +msgid "See the file AUTHORS for additional credits," +msgstr "참여 제작자 AUTHORS 파일을 보세요." + +#: src/commands.c:400 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "또는 이곳을 방문 하세요. http://glabels.sourceforge.net/" + +#: src/commands.c:409 +msgid " " +msgstr " " + +#: src/commands.c:424 +msgid "glabels" +msgstr "gLabels" + +#: src/file.c:100 +msgid "New Label or Card" +msgstr "새 라벨 또는 카드" + +#: src/file.c:132 +#: src/file.c:304 +msgid "Media Type" +msgstr "매체 형식" + +#: src/file.c:138 +#: src/file.c:310 +msgid "Label orientation" +msgstr "라벨의 방향" + +#: src/file.c:269 +msgid "Label properties" +msgstr "라벨 속성" + +#: src/file.c:452 +#: src/file.c:870 +msgid "All files" +msgstr "모든 파일" + +#: src/file.c:457 +#: src/file.c:875 +msgid "gLabels documents" +msgstr "gLabels 문서" + +#: src/file.c:505 +#: src/file.c:617 +#: src/file.c:934 +#: src/file.c:1130 +msgid "Empty file name selection" +msgstr "비어있는 파일 이름" + +#: src/file.c:506 +#: src/file.c:520 +#: src/file.c:618 +#: src/file.c:632 +msgid "Please select a file or supply a valid file name" +msgstr "지원하는 파일을 선택하세요." + +#: src/file.c:519 +#: src/file.c:631 +msgid "File does not exist" +msgstr "파일이 없습니다." + +#: src/file.c:563 +#: data/ui/glabels-ui.xml.h:75 +msgid "Open" +msgstr "열기" + +#: src/file.c:565 +msgid "Open label" +msgstr "라벨 열기" + +#: src/file.c:707 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "\"%s\" 파일을 열 수 없습니다." + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "지원되지 않는 파일 형식" + +#: src/file.c:797 +#: src/file.c:979 +#: src/file.c:1174 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "\"%s\" 파일을 저장할 수 없습니다." + +#: src/file.c:805 +#: src/file.c:987 +#: src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "저장하는데 오류가 발생했습니다. 파일을 저장하지 못했습니다." + +#: src/file.c:848 +#: src/file.c:1048 +#, c-format +msgid "Save \"%s\" as" +msgstr "\"%s\" 이름으로 저장" + +#: src/file.c:935 +#: src/file.c:1131 +msgid "Please supply a valid file name" +msgstr "유효한 파일이름이 필요합니다." + +#: src/file.c:952 +#: src/file.c:1147 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "\"%s\"파일이름으로 덮어쓰시겠습니까?" + +#: src/file.c:960 +#: src/file.c:1155 +msgid "File already exists." +msgstr "파일이름이 존재합니다." + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "닫기전에 바뀐부분을 \"%s\"이름으로 저장하시겠습니까?" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "저장하지 않으면, 바뀐부분을 잃어버리게 됩니다." + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "저장없이 닫기" + +#. Should not happen +#: src/prefs.c:156 +#: src/prefs.c:163 +#: data/glade/prefs-dialog.glade.h:23 +#: data/glade/object-editor.glade.h:37 +msgid "points" +msgstr "포인트" + +#: src/prefs.c:158 +#: data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "[인치]" + +#: src/prefs.c:160 +msgid "mm" +msgstr "[밀리미터]" + +#: src/prefs-dialog.c:248 +#: data/glade/prefs-dialog.glade.h:22 +msgid "gLabels Preferences" +msgstr "gLabels 환경설정" + +#. +#. * Submenu: Order +#. +#: src/view.c:3570 +#: data/ui/glabels-ui.xml.h:157 +msgid "_Order" +msgstr "순서(_O)" + +#. +#. * Submenu: Rotate/Flip +#. +#: src/view.c:3591 +#: data/ui/glabels-ui.xml.h:163 +msgid "_Rotate/Flip" +msgstr "회전/뒤집기(_R)" + +#. +#. * Submenu: Align Horizontally +#. +#: src/view.c:3624 +msgid "Align _Horizontally" +msgstr "가로로 정렬(_H)" + +#. +#. * Submenu: Align Vertically +#. +#: src/view.c:3663 +msgid "Align _Vertically" +msgstr "세로로 정렬(_V)" + +#: src/view.c:3724 +#: data/ui/glabels-ui.xml.h:140 +msgid "_Delete" +msgstr "삭제(_D)" + +#. Build editor. +#: src/view-box.c:223 +msgid "Box object properties" +msgstr "사각형 개체 속성" + +#. Build editor. +#: src/view-ellipse.c:223 +msgid "Ellipse object properties" +msgstr "타원 개체 속성" + +#. Build editor. +#: src/view-line.c:223 +msgid "Line object properties" +msgstr "선 개체 속성" + +#. Build editor. +#: src/view-image.c:222 +msgid "Image object properties" +msgstr "그림 개체 속성" + +#. Build editor. +#: src/view-text.c:250 +msgid "Text object properties" +msgstr "글자 개체 속성" + +#: src/view-text.c:562 +#: data/glade/object-editor.glade.h:28 +msgid "Text" +msgstr "글자" + +#. Build editor. +#: src/view-barcode.c:209 +msgid "Barcode object properties" +msgstr "바코드 개체 속성" + +#: src/view-barcode.c:579 +#: src/print.c:1088 +msgid "Invalid barcode data" +msgstr "잘못된 바코드 데이터" + +#: src/merge-properties-dialog.c:231 +msgid "Merge Properties" +msgstr "여백 속성" + +#. ---- Source section ---- +#: src/merge-properties-dialog.c:237 +msgid "Source" +msgstr "소스" + +#: src/merge-properties-dialog.c:245 +msgid "Format:" +msgstr "서식:" + +#. Location line +#: src/merge-properties-dialog.c:273 +msgid "Location:" +msgstr "장소:" + +#: src/merge-properties-dialog.c:282 +#: src/merge-properties-dialog.c:393 +msgid "Select merge-database source" +msgstr "병합 데이터베이스 소스 선택" + +#: src/merge-properties-dialog.c:289 +#: src/merge-properties-dialog.c:404 +msgid "N/A" +msgstr "N/A" + +#. ---- Sample Fields section ---- +#: src/merge-properties-dialog.c:300 +msgid "Record selection/preview:" +msgstr "선택 기록/미리보기:" + +#: src/merge-properties-dialog.c:326 +msgid "Select" +msgstr "선택" + +#: src/merge-properties-dialog.c:334 +msgid "Record/Field" +msgstr "기록/범위" + +#: src/merge-properties-dialog.c:342 +#: data/glade/object-editor.glade.h:9 +msgid "Data" +msgstr "데이터" + +#: src/print-dialog.c:266 +#: data/ui/glabels-ui.xml.h:82 +msgid "Print" +msgstr "인쇄" + +#: src/print-dialog.c:281 +msgid "_Job" +msgstr "작업(_J)" + +#: src/print-dialog.c:286 +msgid "P_rinter" +msgstr "프린터(_R)" + +#. ----------- Add simple-copies widget ------------ +#: src/print-dialog.c:314 +msgid "Copies" +msgstr "매수" + +#. ------- Add merge control widget ------------ +#: src/print-dialog.c:322 +msgid "Document merge control" +msgstr "문서 여백 제어" + +#. ----------- Add custom print options area ------------ +#: src/print-dialog.c:330 +msgid "Options" +msgstr "옵션" + +#: src/print-dialog.c:351 +msgid "print crop marks" +msgstr "자르기 표시 인쇄" + +#: src/print-dialog.c:553 +#: src/print-dialog.c:592 +msgid "Print preview" +msgstr "인쇄 미리보기" + +#: src/template-designer.c:409 +#: data/glade/template-designer.glade.h:73 +msgid "gLabels Template Designer" +msgstr "gLabels 서식 디자이너" + +#: src/bc.c:60 +msgid "POSTNET (any)" +msgstr "POSTNET (임의)" + +#: src/bc.c:63 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (ZIP만)" + +#: src/bc.c:66 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (ZIP+4)" + +#: src/bc.c:69 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: src/bc.c:72 +msgid "EAN (any)" +msgstr "EAN (임의)" + +#: src/bc.c:75 +msgid "EAN-8" +msgstr "EAN-8" + +#: src/bc.c:78 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: src/bc.c:81 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: src/bc.c:84 +msgid "EAN-13" +msgstr "EAN-13" + +#: src/bc.c:87 +msgid "EAN-13 +2" +msgstr "EAN-13 +2" + +#: src/bc.c:90 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: src/bc.c:93 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A 또는 UPC-E)" + +#: src/bc.c:96 +msgid "UPC-A" +msgstr "UPC-A" + +#: src/bc.c:99 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: src/bc.c:102 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: src/bc.c:105 +msgid "UPC-E" +msgstr "UPC-E" + +#: src/bc.c:108 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: src/bc.c:111 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: src/bc.c:114 +msgid "ISBN" +msgstr "ISBN" + +#: src/bc.c:117 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: src/bc.c:120 +msgid "Code 39" +msgstr "Code 39" + +#: src/bc.c:123 +msgid "Code 128" +msgstr "Code 128" + +#: src/bc.c:126 +msgid "Code 128C" +msgstr "Code 128C" + +#: src/bc.c:129 +msgid "Code 128B" +msgstr "Code 128B" + +#: src/bc.c:132 +msgid "Interleaved 2 of 5" +msgstr "Interleaved 2 of 5" + +#: src/bc.c:135 +msgid "Codabar" +msgstr "Codabar" + +#: src/bc.c:138 +msgid "MSI" +msgstr "MSI" + +#: src/bc.c:141 +msgid "Plessey" +msgstr "Plessey" + +#: src/label.c:569 +msgid "Untitled" +msgstr "제목없음" + +#: src/xml-label.c:176 +#: src/xml-label.c:213 +msgid "xmlParseFile error" +msgstr "xmlParse파일 오류" + +#: src/xml-label.c:250 +msgid "No document root" +msgstr "root 문서가 아님" + +#: src/xml-label.c:264 +msgid "Importing from glabels 0.1 format" +msgstr "gLabels 0.1로 부터 가져오기" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "gLabels 0.4로 부터 가져오기" + +#: src/xml-label.c:279 +msgid "Importing from glabels 1.91 format" +msgstr "gLabels 1.91로 부터 가져오기" + +#: src/xml-label.c:282 +msgid "bad document, unknown glabels Namespace" +msgstr "잘못된 문서, 알 수 없는 Glabels 이름공간" + +#: src/xml-label.c:311 +#: src/xml-label-04.c:75 +#: src/xml-label-191.c:131 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "잘못된 Root 노드 = \"%s\"" + +#: src/xml-label.c:348 +#: src/xml-label-191.c:165 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "문서 노드 내의 잘못된 노드 = \"%s\"" + +#: src/xml-label.c:393 +#: src/xml-label-04.c:123 +#: src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "잘못된 노드 = \"%s\"" + +#: src/xml-label.c:796 +#: src/xml-label-191.c:605 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "데이터 노드 내의 잘못된 노드 = \"%s\"" + +#: src/xml-label.c:962 +#: libglabels/xml-template.c:535 +msgid "Utf8 conversion error." +msgstr "Utf8 변환 에러" + +#: src/xml-label.c:969 +#: libglabels/xml-template.c:542 +msgid "Problem saving xml file." +msgstr "XML 파일 저장에 문제가 있습니다." + +#. This should always be an id, but just in case a name +#. slips by! +#: src/xml-label-191.c:680 +#: libglabels/xml-template.c:199 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "알 수 없는 용지 크기 ID \"%s\"。名前として扱います。" + +#: src/xml-label-191.c:690 +#: libglabels/xml-template.c:209 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "알 수 없는 용지 크기 ID 또는 이름 \"%s\"" + +#: src/merge.c:172 +#: src/merge.c:213 +#: src/merge.c:399 +#: src/merge.c:402 +msgid "None" +msgstr "없음" + +#: src/merge-init.c:53 +msgid "Text file with comma delimeters (CSV)" +msgstr "콤마로 구분된 텍스트파일(CSV)" + +#: src/merge-init.c:60 +msgid "Text file with colon delimeters" +msgstr "콜론으로 구분된 텍스트 파일" + +#: src/merge-init.c:67 +msgid "Text file with tab delimeters" +msgstr "텝으로 구분된 텍스트 파일" + +#: src/wdgt-image-select.c:201 +#: data/glade/object-editor.glade.h:11 +msgid "File:" +msgstr "파일:" + +#: src/wdgt-image-select.c:245 +#: data/glade/object-editor.glade.h:16 +msgid "Key:" +msgstr "키:" + +#: src/wdgt-print-copies.c:179 +msgid "Sheets:" +msgstr "용지:" + +#: src/wdgt-print-copies.c:197 +msgid "Labels" +msgstr "라벨" + +#: src/wdgt-print-copies.c:200 +msgid "from:" +msgstr "부터:" + +#: src/wdgt-print-copies.c:207 +msgid "to:" +msgstr "에게:" + +#: src/wdgt-print-merge.c:178 +msgid "Start on label" +msgstr "라벨의 시작" + +#: src/wdgt-print-merge.c:186 +msgid "on 1st sheet" +msgstr "첫번째 용지에서" + +#: src/wdgt-print-merge.c:195 +msgid "Copies:" +msgstr "매수:" + +#: src/wdgt-print-merge.c:201 +msgid "Collate" +msgstr "제본" + +#: src/wdgt-media-select.c:269 +#: data/glade/template-designer.glade.h:29 +msgid "Description:" +msgstr "설명:" + +#: src/wdgt-media-select.c:279 +#: data/glade/template-designer.glade.h:53 +msgid "Page size:" +msgstr "용지 크기:" + +#: src/wdgt-media-select.c:290 +msgid "Label size:" +msgstr "라벨 크기:" + +#: src/wdgt-media-select.c:301 +msgid "Layout:" +msgstr "배치:" + +#: src/wdgt-media-select.c:578 +#, c-format +msgid "%d x %d (%d per sheet)" +msgstr "%d x %d (용지의 %d)" + +#: src/wdgt-media-select.c:582 +#, c-format +msgid "%d per sheet" +msgstr "용지의 %d" + +#: src/wdgt-media-select.c:614 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: src/wdgt-media-select.c:619 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: src/wdgt-media-select.c:630 +#: src/wdgt-media-select.c:644 +#, c-format +msgid "%s %s diameter" +msgstr "지름 %s %s" + +#: src/wdgt-media-select.c:634 +#: src/wdgt-media-select.c:648 +#, c-format +msgid "%.5g %s diameter" +msgstr "지름 %.5g %s" + +#: src/wdgt-rotate-label.c:193 +msgid "Rotate" +msgstr "회전" + +#. This is the default custom color +#: src/mygal/color-palette.c:396 +msgid "custom" +msgstr "임의의" + +#. "Custom" color - we'll pop up a GnomeColorPicker +#: src/mygal/color-palette.c:438 +msgid "Custom Color:" +msgstr "임의의 색상:" + +#: src/mygal/color-palette.c:446 +msgid "Choose Custom Color" +msgstr "임의의 색상 선택" + +#: src/mygal/color-palette.c:579 +msgid "black" +msgstr "검은색" + +#: src/mygal/color-palette.c:580 +msgid "light brown" +msgstr "밝은 갈색" + +#: src/mygal/color-palette.c:581 +msgid "brown gold" +msgstr "고동색" + +#: src/mygal/color-palette.c:582 +msgid "dark green #2" +msgstr "어두운 녹색 #2" + +#: src/mygal/color-palette.c:583 +msgid "navy" +msgstr "남색" + +#: src/mygal/color-palette.c:584 +#: src/mygal/color-palette.c:640 +msgid "dark blue" +msgstr "어두운 파랑색" + +#: src/mygal/color-palette.c:585 +msgid "purple #2" +msgstr "자주색 #2" + +#: src/mygal/color-palette.c:586 +msgid "very dark gray" +msgstr "매우 어두운 회색" + +#: src/mygal/color-palette.c:589 +#: src/mygal/color-palette.c:645 +msgid "dark red" +msgstr "어두운 빨강색" + +#: src/mygal/color-palette.c:590 +msgid "red-orange" +msgstr "적오렌지색" + +#: src/mygal/color-palette.c:591 +msgid "gold" +msgstr "금색" + +#: src/mygal/color-palette.c:592 +msgid "dark green" +msgstr "어두운 녹색" + +#: src/mygal/color-palette.c:593 +#: src/mygal/color-palette.c:646 +msgid "dull blue" +msgstr "탁한 파랑색" + +#: src/mygal/color-palette.c:594 +#: src/mygal/color-palette.c:647 +msgid "blue" +msgstr "파랑색" + +#: src/mygal/color-palette.c:595 +msgid "dull purple" +msgstr "탁한 자주색" + +#: src/mygal/color-palette.c:596 +msgid "dark grey" +msgstr "어두운 회색" + +#: src/mygal/color-palette.c:599 +msgid "red" +msgstr "빨강색" + +#: src/mygal/color-palette.c:600 +msgid "orange" +msgstr "오렌지색" + +#: src/mygal/color-palette.c:601 +msgid "lime" +msgstr "라임색" + +#: src/mygal/color-palette.c:602 +msgid "dull green" +msgstr "탁한 녹색" + +#: src/mygal/color-palette.c:603 +msgid "dull blue #2" +msgstr "탁한 파랑색#2" + +#: src/mygal/color-palette.c:604 +msgid "sky blue #2" +msgstr "하늘색 #2" + +#: src/mygal/color-palette.c:605 +#: src/mygal/color-palette.c:644 +msgid "purple" +msgstr "자주색" + +#: src/mygal/color-palette.c:606 +msgid "gray" +msgstr "회색" + +#: src/mygal/color-palette.c:609 +#: src/mygal/color-palette.c:641 +msgid "magenta" +msgstr "마젠타색" + +#: src/mygal/color-palette.c:610 +msgid "bright orange" +msgstr "밝은 오렌지색" + +#: src/mygal/color-palette.c:611 +#: src/mygal/color-palette.c:642 +msgid "yellow" +msgstr "노랑색" + +#: src/mygal/color-palette.c:612 +msgid "green" +msgstr "녹색" + +#: src/mygal/color-palette.c:613 +#: src/mygal/color-palette.c:643 +msgid "cyan" +msgstr "청록색" + +#: src/mygal/color-palette.c:614 +msgid "bright blue" +msgstr "밝은 파랑색" + +#: src/mygal/color-palette.c:615 +#: src/mygal/color-palette.c:632 +msgid "red purple" +msgstr "빨간 자주색" + +#: src/mygal/color-palette.c:616 +msgid "light grey" +msgstr "가벼운 회색" + +#: src/mygal/color-palette.c:619 +#: src/mygal/color-palette.c:636 +msgid "pink" +msgstr "분홍색" + +#: src/mygal/color-palette.c:620 +msgid "light orange" +msgstr "가벼운 오렌지색" + +#: src/mygal/color-palette.c:621 +#: src/mygal/color-palette.c:633 +msgid "light yellow" +msgstr "가벼운 노랑색" + +#: src/mygal/color-palette.c:622 +msgid "light green" +msgstr "가벼운 녹색" + +#: src/mygal/color-palette.c:623 +msgid "light cyan" +msgstr "가벼운 청록색" + +#: src/mygal/color-palette.c:624 +#: src/mygal/color-palette.c:634 +msgid "light blue" +msgstr "가벼운 바랑색" + +#: src/mygal/color-palette.c:625 +#: src/mygal/color-palette.c:638 +msgid "light purple" +msgstr "가벼운 자주색" + +#: src/mygal/color-palette.c:626 +msgid "white" +msgstr "흰색" + +#: src/mygal/color-palette.c:631 +msgid "purplish blue" +msgstr "자주빛 파랑색" + +#: src/mygal/color-palette.c:635 +msgid "dark purple" +msgstr "어두운 자주색" + +#: src/mygal/color-palette.c:637 +msgid "sky blue" +msgstr "하늘색" + +#: libglabels/template.c:848 +#, c-format +msgid "Generic %s full page" +msgstr "Generic %s 전면에 걸친" + +#: libglabels/template.c:897 +msgid "No template files found!" +msgstr "서식파일을 찾을 수 없음!" + +#. Create and append an "Other" entry. +#: libglabels/paper.c:67 +msgid "Other" +msgstr "직접지정" + +#: libglabels/paper.c:361 +msgid "No paper files found!" +msgstr "용지 파일을 찾을 수 없음!" + +#: data/ui/glabels-ui.xml.h:1 +msgid "About glabels" +msgstr "gLabels에 대해" + +#: data/ui/glabels-ui.xml.h:2 +msgid "About..." +msgstr "정보..." + +#: data/ui/glabels-ui.xml.h:3 +msgid "Align _Horizontal" +msgstr "세로로 정렬(_H)" + +#: data/ui/glabels-ui.xml.h:4 +msgid "Align _Vertical" +msgstr "가로로 정렬(_V)" + +#: data/ui/glabels-ui.xml.h:5 +msgid "Align objects to bottoms" +msgstr "개체 아래로 정렬" + +#: data/ui/glabels-ui.xml.h:6 +msgid "Align objects to horizontal centers" +msgstr "개체 세로 중앙으로 정렬" + +#: data/ui/glabels-ui.xml.h:7 +msgid "Align objects to left edges" +msgstr "개체 좌측 가장자리로 정렬" + +#: data/ui/glabels-ui.xml.h:8 +msgid "Align objects to right edges" +msgstr "개체 우측 가장자리로 정렬" + +#: data/ui/glabels-ui.xml.h:9 +msgid "Align objects to tops" +msgstr "개체 상위로 정렬" + +#: data/ui/glabels-ui.xml.h:10 +msgid "Align objects to vertical centers" +msgstr "개체 수평 중앙으로 정렬" + +#: data/ui/glabels-ui.xml.h:12 +msgid "Bold" +msgstr "굵게" + +#: data/ui/glabels-ui.xml.h:14 +msgid "Center align" +msgstr "중앙 정렬" + +#: data/ui/glabels-ui.xml.h:15 +msgid "Center objects to horizontal label center" +msgstr "중앙 개체를 수직라벨 중앙으로" + +#: data/ui/glabels-ui.xml.h:16 +msgid "Center objects to vertical label center" +msgstr "중앙 개체를 수평라벨 중상으로" + +#: data/ui/glabels-ui.xml.h:17 +msgid "Change the visibility of markup lines in the current window" +msgstr "현재 윈도우의 보이는 마크업 선 변경" + +#: data/ui/glabels-ui.xml.h:18 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "현재 윈도우의 보이는 그리기 도구 변경" + +#: data/ui/glabels-ui.xml.h:19 +msgid "Change the visibility of the grid in the current window" +msgstr "현재 윈도우의 보이는 그리드 변경" + +#: data/ui/glabels-ui.xml.h:20 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "현재 윈도우의 보이는 주 도구 변경" + +#: data/ui/glabels-ui.xml.h:21 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "현재 윈도우의 보이는 속성 도구 변경" + +#: data/ui/glabels-ui.xml.h:22 +msgid "Close" +msgstr "닫기" + +#: data/ui/glabels-ui.xml.h:23 +msgid "Close the current file" +msgstr "현재 파일을 닫기" + +#: data/ui/glabels-ui.xml.h:24 +msgid "Configure the application" +msgstr "gLabel 구성" + +#: data/ui/glabels-ui.xml.h:25 +msgid "Contents" +msgstr "목차" + +#: data/ui/glabels-ui.xml.h:26 +msgid "Copy" +msgstr "복사" + +#: data/ui/glabels-ui.xml.h:27 +msgid "Copy the selection" +msgstr "선택 복사" + +#: data/ui/glabels-ui.xml.h:28 +msgid "Create a custom template" +msgstr "임의의 서식 만들기" + +#: data/ui/glabels-ui.xml.h:29 +msgid "Create a new document" +msgstr "새로운 문서 만들기" + +#: data/ui/glabels-ui.xml.h:30 +msgid "Create barcode object" +msgstr "바코드 개체 만들기" + +#: data/ui/glabels-ui.xml.h:31 +msgid "Create box/rectangle object" +msgstr "사각형/직사각형 개체 만들기" + +#: data/ui/glabels-ui.xml.h:32 +msgid "Create ellipse/circle object" +msgstr "타원/원형 개체 만들기" + +#: data/ui/glabels-ui.xml.h:33 +msgid "Create image object" +msgstr "그림 개체 만들기" + +#: data/ui/glabels-ui.xml.h:34 +msgid "Create line object" +msgstr "선 개체 만들기" + +#: data/ui/glabels-ui.xml.h:35 +msgid "Create text object" +msgstr "글자 개체 만들기" + +#: data/ui/glabels-ui.xml.h:36 +msgid "Cu_t" +msgstr "자르기(_T)" + +#: data/ui/glabels-ui.xml.h:37 +msgid "Customize" +msgstr "커스터마이즈" + +#: data/ui/glabels-ui.xml.h:38 +msgid "Customize Drawing Toolbar" +msgstr "그리기 도구 커스터마이즈" + +#: data/ui/glabels-ui.xml.h:39 +msgid "Customize Main Toolbar" +msgstr "주 도구 커스터마이즈" + +#: data/ui/glabels-ui.xml.h:40 +msgid "Customize Property Toolbar" +msgstr "속성 도구 커스터마이즈" + +#: data/ui/glabels-ui.xml.h:41 +msgid "Customize toolbars" +msgstr "도구 커스터마이즈" + +#: data/ui/glabels-ui.xml.h:42 +msgid "Cut" +msgstr "잘라내기" + +#: data/ui/glabels-ui.xml.h:43 +msgid "Cut the selection" +msgstr "선택한것 잘라내기" + +#: data/ui/glabels-ui.xml.h:44 +msgid "Decrease magnification" +msgstr "확대 감소" + +#: data/ui/glabels-ui.xml.h:45 +msgid "Delete" +msgstr "삭제" + +#: data/ui/glabels-ui.xml.h:46 +msgid "Delete the selected objects" +msgstr "선택한 개체 삭제" + +#: data/ui/glabels-ui.xml.h:47 +msgid "Drawing toolbar" +msgstr "그리기 도구" + +#: data/ui/glabels-ui.xml.h:48 +msgid "Dump XML" +msgstr "XML 덤프" + +#: data/ui/glabels-ui.xml.h:49 +msgid "Dump the GUI Xml description" +msgstr "GUI의 XML설명 덤프" + +#: data/ui/glabels-ui.xml.h:50 +msgid "Edit merge properties" +msgstr "여백 속성 편집" + +#: data/ui/glabels-ui.xml.h:54 +msgid "Flip object horizontally" +msgstr "수직 개체 뒤집기" + +#: data/ui/glabels-ui.xml.h:55 +msgid "Flip object vertically" +msgstr "수평 개체 뒤집기" + +#: data/ui/glabels-ui.xml.h:56 +msgid "Font name" +msgstr "글꼴" + +#: data/ui/glabels-ui.xml.h:57 +msgid "Font selector" +msgstr "글꼴 선택기" + +#: data/ui/glabels-ui.xml.h:58 +msgid "Font size" +msgstr "글꼴 크기" + +#: data/ui/glabels-ui.xml.h:59 +msgid "Icon and _Text" +msgstr "아이콘과 글자(_T)" + +#: data/ui/glabels-ui.xml.h:60 +msgid "Increase magnification" +msgstr "상승 확대" + +#: data/ui/glabels-ui.xml.h:61 +msgid "Italic" +msgstr "이탤릭" + +#: data/ui/glabels-ui.xml.h:63 +msgid "Left align" +msgstr "왼쪽 정렬" + +#: data/ui/glabels-ui.xml.h:65 +msgid "Line width" +msgstr "선 넓이" + +#: data/ui/glabels-ui.xml.h:66 +msgid "Lower object to bottom" +msgstr "개체를 하단으로 내리기" + +#: data/ui/glabels-ui.xml.h:67 +msgid "M_arkup" +msgstr "마크업(_A)" + +#: data/ui/glabels-ui.xml.h:68 +msgid "Main toolbar" +msgstr "주 도구" + +#: data/ui/glabels-ui.xml.h:69 +msgid "Markup" +msgstr "마크업" + +#: data/ui/glabels-ui.xml.h:70 +msgid "Modify document properties" +msgstr "문서 속성 고치기" + +#: data/ui/glabels-ui.xml.h:71 +msgid "New" +msgstr "새로 만들기" + +#: data/ui/glabels-ui.xml.h:72 +msgid "Object property editor" +msgstr "항목 속성 편집기" + +#: data/ui/glabels-ui.xml.h:73 +msgid "Only show icons in the drawing toolbar" +msgstr "그리기 도구에서 아이콘만 보이기" + +#: data/ui/glabels-ui.xml.h:74 +msgid "Only show icons in the main toolbar" +msgstr "주 도구에서 아이콘만 보이기" + +#: data/ui/glabels-ui.xml.h:76 +msgid "Open a file" +msgstr "파일 열기" + +#: data/ui/glabels-ui.xml.h:77 +msgid "Open the glabels manual" +msgstr "gLabeles 메뉴얼 열기" + +#: data/ui/glabels-ui.xml.h:78 +msgid "Paste" +msgstr "붙이기" + +#: data/ui/glabels-ui.xml.h:79 +msgid "Paste the clipboard" +msgstr "클립보드에 붙이기" + +#: data/ui/glabels-ui.xml.h:80 +msgid "Pr_eferences..." +msgstr "속성(_E)..." + +#: data/ui/glabels-ui.xml.h:81 +msgid "Preferences" +msgstr "설정" + +#: data/ui/glabels-ui.xml.h:83 +msgid "Print the current file" +msgstr "현재 파일을 인쇄" + +#: data/ui/glabels-ui.xml.h:84 +msgid "Proper_ties..." +msgstr "속성(_T)..." + +#: data/ui/glabels-ui.xml.h:85 +msgid "Properties" +msgstr "속성" + +#: data/ui/glabels-ui.xml.h:86 +msgid "Property toolbar" +msgstr "속성 도구" + +#: data/ui/glabels-ui.xml.h:87 +msgid "Quit" +msgstr "종료" + +#: data/ui/glabels-ui.xml.h:88 +msgid "Quit the program" +msgstr "gLabels을 종료" + +#: data/ui/glabels-ui.xml.h:89 +msgid "Raise object to top" +msgstr "개체를 상위로 올리기" + +#: data/ui/glabels-ui.xml.h:90 +msgid "Recent _Files" +msgstr "최근의 파일(_F)" + +#: data/ui/glabels-ui.xml.h:91 +msgid "Redo" +msgstr "재실행" + +#: data/ui/glabels-ui.xml.h:92 +msgid "Redo the undone action" +msgstr "재실행 할것 없음" + +#: data/ui/glabels-ui.xml.h:93 +msgid "Remove all selections" +msgstr "모든 선택사항 삭제" + +#: data/ui/glabels-ui.xml.h:95 +#, no-c-format +msgid "Restore scale to 100%" +msgstr "100%크기로 복구" + +#: data/ui/glabels-ui.xml.h:96 +msgid "Right align" +msgstr "오른쪽으로 정렬" + +#: data/ui/glabels-ui.xml.h:99 +msgid "Rotate object 90 clockwise" +msgstr "90° 시계방향으로 회전" + +#: data/ui/glabels-ui.xml.h:100 +msgid "Rotate object 90 counter-clockwise" +msgstr "90° 반시계방향으로 회전" + +#: data/ui/glabels-ui.xml.h:101 +msgid "Save" +msgstr "저장" + +#: data/ui/glabels-ui.xml.h:102 +msgid "Save As" +msgstr "다른 이름으로 저장" + +#: data/ui/glabels-ui.xml.h:103 +msgid "Save _As..." +msgstr "다른 이름으로 저장(_A)..." + +#: data/ui/glabels-ui.xml.h:104 +msgid "Save the current file" +msgstr "현재 파일이름으로 저장" + +#: data/ui/glabels-ui.xml.h:105 +msgid "Save the current file with a different name" +msgstr "현재파일을 다른이름으로 저장" + +#: data/ui/glabels-ui.xml.h:106 +msgid "Select All" +msgstr "모두 선택" + +#: data/ui/glabels-ui.xml.h:107 +msgid "Select _All" +msgstr "모두 선택(_A)" + +#: data/ui/glabels-ui.xml.h:108 +msgid "Select all objects" +msgstr "모든 개체 선택" + +#: data/ui/glabels-ui.xml.h:109 +msgid "Select, move and modify objects" +msgstr "선택, 개체 이동과 수정" + +#: data/ui/glabels-ui.xml.h:111 +msgid "Set drawing toolbar button style according to desktop default" +msgstr "기본 데스크탑 모양에 따라 그리기 도구 버튼 모양을 지정" + +#: data/ui/glabels-ui.xml.h:112 +msgid "Set main toolbar button style according to desktop default" +msgstr "기본 데스크탑 모양에 따라 주 도구 버튼 모양을 지정" + +#: data/ui/glabels-ui.xml.h:113 +msgid "Show _Tooltips" +msgstr "팁 보기(_T)" + +#: data/ui/glabels-ui.xml.h:114 +msgid "Show both icons and texts in the drawing toolbar" +msgstr "그리기 도구에 아이콘과 글자 보이기" + +#: data/ui/glabels-ui.xml.h:115 +msgid "Show both icons and texts in the main toolbar" +msgstr "주 도구에 아이콘 ê³¼ 글자 보이기" + +#: data/ui/glabels-ui.xml.h:116 +msgid "Show tooltips in the drawing toolbar" +msgstr "그리기 도구에 팁 보이기" + +#: data/ui/glabels-ui.xml.h:117 +msgid "Show tooltips in the main toolbar" +msgstr "주 도구에 팁 보이기" + +#: data/ui/glabels-ui.xml.h:118 +msgid "Show tooltips in the property toolbar" +msgstr "속성 도구에 팁 보이기" + +#: data/ui/glabels-ui.xml.h:119 +msgid "Template Designer" +msgstr "서식 디자이너" + +#: data/ui/glabels-ui.xml.h:120 +msgid "Template _Designer..." +msgstr "서식 디자이너(_D)..." + +#: data/ui/glabels-ui.xml.h:121 +msgid "Text color" +msgstr "글자 색상" + +#: data/ui/glabels-ui.xml.h:122 +msgid "U_n-select All" +msgstr "모든 선택 해제(_N)" + +#: data/ui/glabels-ui.xml.h:123 +msgid "Un-select All" +msgstr "모든 선택 해제" + +#: data/ui/glabels-ui.xml.h:124 +msgid "Undo" +msgstr "되돌리기" + +#: data/ui/glabels-ui.xml.h:125 +msgid "Undo the last action" +msgstr "마지막 동작으로 되돌리기" + +#: data/ui/glabels-ui.xml.h:126 +msgid "Zoom _1:1" +msgstr "1:1로 확대(_1)" + +#: data/ui/glabels-ui.xml.h:127 +msgid "Zoom _In" +msgstr "확대(_I)" + +#: data/ui/glabels-ui.xml.h:128 +msgid "Zoom _Out" +msgstr "축소(_O)" + +#: data/ui/glabels-ui.xml.h:129 +msgid "Zoom to _fit" +msgstr "맞춰서 확대(_F)" + +#: data/ui/glabels-ui.xml.h:130 +msgid "Zoom to fit window" +msgstr "윈도우에 맞춰서 확대" + +#: data/ui/glabels-ui.xml.h:131 +msgid "_About..." +msgstr "...에 대해(_A)" + +#: data/ui/glabels-ui.xml.h:132 +msgid "_Bottoms" +msgstr "아래(_B)" + +#: data/ui/glabels-ui.xml.h:135 +msgid "_Close" +msgstr "닫기(_C)" + +#: data/ui/glabels-ui.xml.h:136 +msgid "_Contents" +msgstr "목차(_C)" + +#: data/ui/glabels-ui.xml.h:137 +msgid "_Copy" +msgstr "복사(_C)" + +#: data/ui/glabels-ui.xml.h:138 +msgid "_Create Object" +msgstr "항목 만들기(_C)" + +#: data/ui/glabels-ui.xml.h:139 +msgid "_Debug" +msgstr "디버그(_D)" + +#: data/ui/glabels-ui.xml.h:141 +msgid "_Desktop Default" +msgstr "기본 데스크탑(_D)" + +#: data/ui/glabels-ui.xml.h:142 +msgid "_Drawing Toolbar" +msgstr "그리기 도구(_D)" + +#: data/ui/glabels-ui.xml.h:143 +msgid "_Edit" +msgstr "편집(_E)" + +#: data/ui/glabels-ui.xml.h:145 +msgid "_File" +msgstr "파일(_F)" + +#: data/ui/glabels-ui.xml.h:146 +msgid "_Grid" +msgstr "그리드(_G)" + +#: data/ui/glabels-ui.xml.h:147 +msgid "_Help" +msgstr "도움말(_H)" + +#: data/ui/glabels-ui.xml.h:148 +msgid "_Icon" +msgstr "아이콘(_I)" + +#: data/ui/glabels-ui.xml.h:152 +msgid "_Main Toolbar" +msgstr "주 도구(_M)" + +#: data/ui/glabels-ui.xml.h:153 +msgid "_Merge Properties..." +msgstr "여백 속성(_M)..." + +#: data/ui/glabels-ui.xml.h:154 +msgid "_New" +msgstr "새로 만들기(_N)" + +#: data/ui/glabels-ui.xml.h:155 +msgid "_Objects" +msgstr "항목(_O)" + +#: data/ui/glabels-ui.xml.h:156 +msgid "_Open..." +msgstr "열기(_O)..." + +#: data/ui/glabels-ui.xml.h:158 +msgid "_Paste" +msgstr "붙이기(_P)" + +#: data/ui/glabels-ui.xml.h:159 +msgid "_Print..." +msgstr "인쇄(_P)..." + +#: data/ui/glabels-ui.xml.h:160 +msgid "_Property Toolbar" +msgstr "속성 도구(_P)" + +#: data/ui/glabels-ui.xml.h:161 +msgid "_Quit" +msgstr "종료(_Q)" + +#: data/ui/glabels-ui.xml.h:164 +msgid "_Save" +msgstr "저장(_S)" + +#: data/ui/glabels-ui.xml.h:168 +msgid "_View" +msgstr "보기(_V)" + +#: data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr " " + +#: data/glade/prefs-dialog.glade.h:2 +#: data/glade/object-editor.glade.h:1 +#: data/glade/template-designer.glade.h:5 +msgid "*" +msgstr "*" + +#: data/glade/prefs-dialog.glade.h:3 +msgid "Default page size" +msgstr "기본 용지 크기" + +#: data/glade/prefs-dialog.glade.h:4 +msgid "Fill" +msgstr "채우기" + +#: data/glade/prefs-dialog.glade.h:5 +msgid "Line" +msgstr "선" + +#: data/glade/prefs-dialog.glade.h:6 +msgid "Text" +msgstr "글자" + +#: data/glade/prefs-dialog.glade.h:7 +msgid "Units" +msgstr "유닛" + +#: data/glade/prefs-dialog.glade.h:8 +#: data/glade/object-editor.glade.h:4 +msgid "Alignment:" +msgstr "위치:" + +#: data/glade/prefs-dialog.glade.h:9 +#: data/glade/object-editor.glade.h:8 +msgid "Color:" +msgstr "색상:" + +#: data/glade/prefs-dialog.glade.h:10 +msgid "Font:" +msgstr "글꼴:" + +#: data/glade/prefs-dialog.glade.h:11 +msgid "ISO A4" +msgstr "ISO A4 용지" + +#: data/glade/prefs-dialog.glade.h:12 +msgid "Inches" +msgstr "인치" + +#: data/glade/prefs-dialog.glade.h:13 +#: data/glade/object-editor.glade.h:19 +msgid "Line Spacing:" +msgstr "행간:" + +#: data/glade/prefs-dialog.glade.h:14 +msgid "Locale" +msgstr "로케일" + +#: data/glade/prefs-dialog.glade.h:15 +msgid "Millimeters" +msgstr "밀리미터" + +#: data/glade/prefs-dialog.glade.h:16 +msgid "Object defaults" +msgstr "기본 항목" + +#: data/glade/prefs-dialog.glade.h:17 +msgid "Points" +msgstr "포인트" + +#: data/glade/prefs-dialog.glade.h:18 +msgid "Select default properties for new objects." +msgstr "새 개체의 기본 속성을 선택" + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "구체적인 로케일을 선택" + +#: data/glade/prefs-dialog.glade.h:20 +#: data/templates/paper-sizes.xml.h:25 +msgid "US Letter" +msgstr "US Letter" + +#: data/glade/prefs-dialog.glade.h:21 +#: data/glade/object-editor.glade.h:29 +#: data/glade/template-designer.glade.h:72 +msgid "Width:" +msgstr "넓이:" + +#: data/glade/object-editor.glade.h:2 +msgid "00000000000 00000" +msgstr "00000000000 00000" + +#: data/glade/object-editor.glade.h:3 +msgid "Xxx object properties" +msgstr "Xxx 개체 속성" + +#: data/glade/object-editor.glade.h:5 +msgid "Allow merge to automatically shrink text" +msgstr "자동으로 축소한 글자에 병합" + +#: data/glade/object-editor.glade.h:6 +msgid "Angle:" +msgstr "각도:" + +#: data/glade/object-editor.glade.h:7 +msgid "Checksum" +msgstr "체크섬" + +#: data/glade/object-editor.glade.h:10 +msgid "Family:" +msgstr "패밀리:" + +#: data/glade/object-editor.glade.h:12 +msgid "Fill" +msgstr "채우기" + +#: data/glade/object-editor.glade.h:13 +#: data/glade/template-designer.glade.h:33 +msgid "Height:" +msgstr "높이:" + +#: data/glade/object-editor.glade.h:14 +msgid "Image" +msgstr "그림" + +#: data/glade/object-editor.glade.h:15 +msgid "Insert merge field" +msgstr "병합 필드 삽입" + +#: data/glade/object-editor.glade.h:17 +msgid "Length:" +msgstr "길이:" + +#: data/glade/object-editor.glade.h:18 +msgid "Line" +msgstr "선" + +#: data/glade/object-editor.glade.h:20 +msgid "Literal:" +msgstr "Literal:" + +#: data/glade/object-editor.glade.h:21 +msgid "Load image" +msgstr "그림 불러옴" + +#: data/glade/object-editor.glade.h:22 +msgid "Position" +msgstr "위치" + +#: data/glade/object-editor.glade.h:23 +msgid "Reset image size" +msgstr "그림크기 재설정" + +#: data/glade/object-editor.glade.h:24 +msgid "Size" +msgstr "크기" + +#: data/glade/object-editor.glade.h:25 +msgid "Size:" +msgstr "크기:" + +#: data/glade/object-editor.glade.h:26 +msgid "Style" +msgstr "모양" + +#: data/glade/object-editor.glade.h:27 +msgid "Style:" +msgstr "모양:" + +#: data/glade/object-editor.glade.h:30 +msgid "X:" +msgstr "X:" + +#: data/glade/object-editor.glade.h:31 +msgid "Y:" +msgstr "Y:" + +#: data/glade/object-editor.glade.h:32 +msgid "degrees" +msgstr "degrees" + +#: data/glade/object-editor.glade.h:33 +msgid "dialog1" +msgstr "dialog1" + +#: data/glade/object-editor.glade.h:34 +msgid "digits:" +msgstr "digits:" + +#: data/glade/object-editor.glade.h:35 +msgid "format:" +msgstr "서식:" + +#: data/glade/template-designer.glade.h:1 +msgid " " +msgstr " " + +#: data/glade/template-designer.glade.h:2 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(예: \"주소라벨\", \"명함\", ...)" + +#: data/glade/template-designer.glade.h:3 +msgid "(e.g., 8163A)" +msgstr "(예: 8163A)" + +#: data/glade/template-designer.glade.h:4 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(예: Avery, Acme, ...)" + +#: data/glade/template-designer.glade.h:6 +msgid "1. Outer radius:" +msgstr "1. 바깥 반지름:" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "1. 반지름:" + +#: data/glade/template-designer.glade.h:8 +msgid "1. Width:" +msgstr "1. 넓이:" + +#: data/glade/template-designer.glade.h:9 +msgid "2. Height:" +msgstr "2. 높이:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "2. 안쪽 반지름:" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "2. 여백 (겹친 인쇄 허용):" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "3. 오려내기 넓이:" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "3. 여백" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "3. 둥글기 (귀퉁이 각도):" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "4. 오려내기 높이:" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "4. 좌우 여백 (겹친 인쇄 허용):" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "5. 아래위 여백 (겹친 인쇄 허용):" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "5. 여백 (겹친 인쇄 허용):" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "6. 라벨 내 여백" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "상표/제조업체:" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD (credit card CD 포함)" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"축하드립니다!\n" +"\n" +"gLabels 서식문서 디자이너로 서식 만들기를 마쳤습니다.\n" +"새로 만든 서식을 저장하기 원한다면 \"적용\" 을 누르세요.\n" +"\n" +"\"취소\"를 누르면 만든것을 버리게 됩니다.\n" +"또는 \"뒤로\"를 선택하여 만든것을 편집 할 수 있습니다." + +#: data/glade/template-designer.glade.h:30 +msgid "Design Completed" +msgstr "서식 디자인 완료됨" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "왼쪽 가장자리 부터 (x0):" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "위쪽 가장자리 부터 (y0):" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "수평 pitch (dx):" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" +"서식을 얼마나 포함합니까?\n" +"\n" +"레이아웃 서식 개수 지정을 통해 두개 이내의 레이아웃을 만들 수 있습니다.\n" +"보통은 아래 첫번째 예제처럼 한개의 레이아웃을 필요로 하지만,\n" +"어떤것은 두번째 예제처럼 두개의 레이아웃을 필요로 하는것도 있습니다." + +#: data/glade/template-designer.glade.h:40 +msgid "Label Size (CD/DVD)" +msgstr "라벨 크기(CD/DVD)" + +#: data/glade/template-designer.glade.h:41 +msgid "Label Size (Round)" +msgstr "라벨 크기 (둥글기)" + +#: data/glade/template-designer.glade.h:42 +msgid "Label or Card Shape" +msgstr "라벨 또는 카드 외형" + +#: data/glade/template-designer.glade.h:43 +msgid "Label or Card Size (Rectangular)" +msgstr "라벨 또는 카드 크기(직사각형)" + +#: data/glade/template-designer.glade.h:44 +msgid "Layout #1" +msgstr "레이아웃 #1:" + +#: data/glade/template-designer.glade.h:45 +msgid "Layout #2" +msgstr "레이아웃 #2:" + +#: data/glade/template-designer.glade.h:46 +msgid "Layout(s)" +msgstr "레이아웃" + +#: data/glade/template-designer.glade.h:47 +msgid "Name and Description" +msgstr "이름과 설명" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "가로 개수 (nx):" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "세로 개수 (ny):" + +#: data/glade/template-designer.glade.h:50 +msgid "Number of Layouts" +msgstr "레이아웃 선택" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "레이아웃 선택:" + +#: data/glade/template-designer.glade.h:52 +msgid "Page Size" +msgstr "용지 크기" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "라벨분류:" + +#: data/glade/template-designer.glade.h:55 +msgid "Please enter the following identifying information about the template stationery." +msgstr "입력 상자에 기본 서식 정보를 입력하세요." + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "레이아웃 정보를 입력하세요." + +#: data/glade/template-designer.glade.h:57 +msgid "Please enter the following size parameters of a single label in your template." +msgstr "라벨서식의 치수를 입력하세요." + +#: data/glade/template-designer.glade.h:58 +msgid "Please enter the following size parameters of a single label or card in your template." +msgstr "라벨서식 또는 카드서식의 치수를 입력하세요." + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "라벨 또는 카드의 기본 형태를 선택하세요." + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "서식 용지의 크기 선택" + +#: data/glade/template-designer.glade.h:61 +msgid "Print test sheet" +msgstr "용지 테스트 인쇄" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "직사각형 또는 정사각형(마무리를 둥글게 만들 수 있음)" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "둥근형" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"2. 두개의 레이아웃\n" +"서식 필요" + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"1. 한개의 레이아웃\n" +"서식 필요" + +#: data/glade/template-designer.glade.h:68 +msgid "Vertical pitch (dy):" +msgstr "수직 pitch (dy):" + +#: data/glade/template-designer.glade.h:69 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"gLabels 서식 제작기에 어서오세요.\n" +"\n" +"차근차근 gLabels의 사용자 서식을 쉽게 만들 수 있게 도와드립니다. " + +#: data/templates/paper-sizes.xml.h:1 +msgid "A0" +msgstr "A0용지" + +#: data/templates/paper-sizes.xml.h:2 +msgid "A1" +msgstr "A1용지" + +#: data/templates/paper-sizes.xml.h:3 +msgid "A10" +msgstr "A10용지" + +#: data/templates/paper-sizes.xml.h:4 +msgid "A2" +msgstr "A2용지" + +#: data/templates/paper-sizes.xml.h:5 +msgid "A3" +msgstr "A3용지" + +#: data/templates/paper-sizes.xml.h:6 +msgid "A4" +msgstr "A4용지" + +#: data/templates/paper-sizes.xml.h:7 +msgid "A5" +msgstr "A5용지" + +#: data/templates/paper-sizes.xml.h:8 +msgid "A6" +msgstr "A6용지" + +#: data/templates/paper-sizes.xml.h:9 +msgid "A7" +msgstr "A7용지" + +#: data/templates/paper-sizes.xml.h:10 +msgid "A8" +msgstr "A8용지" + +#: data/templates/paper-sizes.xml.h:11 +msgid "A9" +msgstr "A9용지" + +#: data/templates/paper-sizes.xml.h:12 +msgid "B0" +msgstr "B0용지" + +#: data/templates/paper-sizes.xml.h:13 +msgid "B1" +msgstr "B1용지" + +#: data/templates/paper-sizes.xml.h:14 +msgid "B10" +msgstr "B10용지" + +#: data/templates/paper-sizes.xml.h:15 +msgid "B2" +msgstr "B2용지" + +#: data/templates/paper-sizes.xml.h:16 +msgid "B3" +msgstr "B3용지" + +#: data/templates/paper-sizes.xml.h:17 +msgid "B4" +msgstr "B4용지" + +#: data/templates/paper-sizes.xml.h:18 +msgid "B5" +msgstr "B5용지" + +#: data/templates/paper-sizes.xml.h:19 +msgid "B6" +msgstr "B6용지" + +#: data/templates/paper-sizes.xml.h:20 +msgid "B7" +msgstr "B7용지" + +#: data/templates/paper-sizes.xml.h:21 +msgid "B8" +msgstr "B8용지" + +#: data/templates/paper-sizes.xml.h:22 +msgid "B9" +msgstr "B9용지" + +#: data/templates/paper-sizes.xml.h:23 +msgid "US Executive" +msgstr "US Executive" + +#: data/templates/paper-sizes.xml.h:24 +msgid "US Legal" +msgstr "US Legal" + +#: data/templates/avery-us-templates.xml.h:1 +#: data/templates/zweckform-iso-templates.xml.h:1 +msgid "Address Labels" +msgstr "주소 라벨" + +#: data/templates/avery-us-templates.xml.h:2 +#: data/templates/avery-iso-templates.xml.h:2 +#: data/templates/zweckform-iso-templates.xml.h:3 +#: data/templates/misc-us-templates.xml.h:2 +#: data/templates/misc-iso-templates.xml.h:9 +msgid "Business Cards" +msgstr "명함" + +#: data/templates/avery-us-templates.xml.h:3 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "CD/DVD 라벨 (Disc 라벨)" + +#: data/templates/avery-us-templates.xml.h:4 +msgid "Diskette Labels" +msgstr "디스크 라벨" + +#: data/templates/avery-us-templates.xml.h:5 +msgid "Filing Labels" +msgstr "출원 라벨" + +#: data/templates/avery-us-templates.xml.h:6 +msgid "Full Sheet Labels" +msgstr "Full Sheet 라벨" + +#: data/templates/avery-us-templates.xml.h:7 +msgid "Large Round Labels" +msgstr "큰 원형 라벨" + +#: data/templates/avery-us-templates.xml.h:8 +msgid "Name Badge Labels" +msgstr "Name Badge 라벨" + +#: data/templates/avery-us-templates.xml.h:9 +msgid "Return Address Labels" +msgstr "반송 주소용 라벨" + +#: data/templates/avery-us-templates.xml.h:10 +msgid "Shipping Labels" +msgstr "출하 라벨" + +#: data/templates/avery-us-templates.xml.h:11 +msgid "Small Round Labels" +msgstr "작은 원형 라벨" + +#: data/templates/avery-us-templates.xml.h:12 +msgid "Square Labels" +msgstr "구형 라벨" + +#: data/templates/avery-us-templates.xml.h:13 +msgid "Video Tape Face Labels" +msgstr "비디오 테입 앞면 라벨" + +#: data/templates/avery-us-templates.xml.h:14 +msgid "Video Tape Spine Labels" +msgstr "비디오 테입 옆면 라벨" + +#: data/templates/avery-iso-templates.xml.h:1 +msgid "Address labels" +msgstr "주소 라벨" + +#: data/templates/avery-iso-templates.xml.h:3 +msgid "CD Booklet" +msgstr "CD Booklet" + +#: data/templates/avery-iso-templates.xml.h:4 +msgid "CD Inlet" +msgstr "CD Inlet" + +#: data/templates/avery-iso-templates.xml.h:5 +#: data/templates/zweckform-iso-templates.xml.h:4 +#: data/templates/misc-us-templates.xml.h:4 +#: data/templates/misc-iso-templates.xml.h:10 +msgid "CD/DVD Labels" +msgstr "CD/DVD 라벨" + +#: data/templates/avery-iso-templates.xml.h:6 +msgid "Diskette labels" +msgstr "디스크 라벨" + +#: data/templates/avery-iso-templates.xml.h:7 +#: data/templates/zweckform-iso-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:17 +msgid "Mailing Labels" +msgstr "봉투 라벨" + +#: data/templates/avery-iso-templates.xml.h:8 +msgid "Mailing labels" +msgstr "봉투 라벨" + +#: data/templates/avery-iso-templates.xml.h:9 +msgid "Mini Address Labels" +msgstr "작은 주소라벨" + +#: data/templates/avery-iso-templates.xml.h:10 +msgid "Shipping labels" +msgstr "출하 라벨" + +#: data/templates/zweckform-iso-templates.xml.h:2 +msgid "Allround Labels" +msgstr "Allround 라벨" + +#: data/templates/zweckform-iso-templates.xml.h:5 +msgid "Correction and Cover-up Labels" +msgstr "수집 ê³¼ Cover-up 라벨" + +#: data/templates/zweckform-iso-templates.xml.h:6 +msgid "Lever Arch File Labels" +msgstr "Lever Arch 파일 라벨" + +#: data/templates/zweckform-iso-templates.xml.h:8 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "QSL-Karten Etiketten (70mm x 50.8mm)" + +#: data/templates/zweckform-iso-templates.xml.h:9 +msgid "Rectangular Copier Labels" +msgstr "분류표기 라벨" + +#: data/templates/zweckform-iso-templates.xml.h:10 +#: data/templates/misc-iso-templates.xml.h:22 +msgid "Rectangular Labels" +msgstr "직사각형 라벨" + +#: data/templates/zweckform-iso-templates.xml.h:11 +msgid "Video Labels (back)" +msgstr "비디오 라벨 (뒤)" + +#: data/templates/misc-us-templates.xml.h:1 +msgid "Business Card CD" +msgstr "명함 CD" + +#: data/templates/misc-us-templates.xml.h:3 +msgid "CD Template Rectangles" +msgstr "CD 서식 (직사각형)" + +#: data/templates/misc-us-templates.xml.h:5 +msgid "CD/DVD Labels (Face Only)" +msgstr "CD/DVD 라벨 (표지만)" + +#: data/templates/misc-us-templates.xml.h:6 +#: data/templates/misc-iso-templates.xml.h:11 +msgid "CD/DVD Labels (face only)" +msgstr "CD/DVD 라벨 (표지만)" + +#: data/templates/misc-us-templates.xml.h:7 +msgid "DLT Labels" +msgstr "DLT 라벨" + +#: data/templates/misc-us-templates.xml.h:8 +msgid "Microtube labels" +msgstr "Microtube 라벨" + +#: data/templates/misc-us-templates.xml.h:9 +msgid "Mini-CD Labels" +msgstr "Mini-CD 라벨" + +#: data/templates/misc-us-templates.xml.h:10 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "PRO CD 라벨 2-up (CD 세로표지 전용)" + +#: data/templates/misc-us-templates.xml.h:11 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "PRO CD 라벨 2-up (표지만)" + +#: data/templates/misc-us-templates.xml.h:12 +#: data/templates/misc-iso-templates.xml.h:21 +msgid "PRO CD Labels 2-up (face only)" +msgstr "PRO CD 라벨 2-up (표지만)" + +#: data/templates/misc-us-templates.xml.h:13 +msgid "Slimline CD Case (rightside up)" +msgstr "Slimline CD 케이스 (우측옆)" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Slimline CD Case (upside down)" +msgstr "Slimline CD 케이스(상위)" + +#: data/templates/misc-iso-templates.xml.h:1 +msgid "Agipa 119488: Business Cards" +msgstr "Agipa 119488: 명함" + +#: data/templates/misc-iso-templates.xml.h:2 +msgid "Allround Labels --24" +msgstr "Allround 라벨 --24" + +#: data/templates/misc-iso-templates.xml.h:3 +msgid "Allround Labels --44" +msgstr "Allround 라벨 --44" + +#: data/templates/misc-iso-templates.xml.h:4 +msgid "Allround Labels --64" +msgstr "Allround 라벨 --64" + +#: data/templates/misc-iso-templates.xml.h:5 +msgid "Allround Labels --65" +msgstr "Allround 라벨 --65" + +#: data/templates/misc-iso-templates.xml.h:6 +msgid "Arch File Labels" +msgstr "Arch 파일 라벨" + +#: data/templates/misc-iso-templates.xml.h:7 +msgid "Arch File Labels (large)" +msgstr "Arch 파일 라벨 (큰것)" + +#: data/templates/misc-iso-templates.xml.h:8 +msgid "Arch File Labels (small)" +msgstr "Arch 파일 라벨 (작은것)" + +#: data/templates/misc-iso-templates.xml.h:12 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "기본 CD/DVD 라벨 (표지만)" + +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Diskette Labels (face only)" +msgstr "디스켓 라벨 (표지만)" + +#: data/templates/misc-iso-templates.xml.h:14 +msgid "EPSON Photo Stickers 16" +msgstr "EPSON 포토 스티커 16" + +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Etiketten" +msgstr "Etiketten" + +#: data/templates/misc-iso-templates.xml.h:16 +msgid "Fridge Magnet Stickers" +msgstr "Fridge Magnet 스티커" + +#: data/templates/misc-iso-templates.xml.h:18 +msgid "Mailing Labels --14" +msgstr "봉투 라벨 --14" + +#: data/templates/misc-iso-templates.xml.h:19 +msgid "Mailing Labels-2 columns" +msgstr "주소 라벨 (2형)" + +#: data/templates/misc-iso-templates.xml.h:20 +msgid "Mailing Labels-3 columns" +msgstr "주소라벨 (3형)" + +#: data/templates/misc-iso-templates.xml.h:23 +msgid "Video Labels (face only)" +msgstr "비디오 라벨 (표지만)" + +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "라벨, 명함 그리고 미디어 커버 만들기" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "gLabels 라벨 디자이너" + +#: data/mime/glabels.keys.in.h:1 +#: data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "gLabels 프로젝트 파일" + diff --git a/po/pl.po b/po/pl.po new file mode 100644 index 00000000..d67a9065 --- /dev/null +++ b/po/pl.po @@ -0,0 +1,2650 @@ +# Polish translation for gLabels +# Copyright (C) 2002 Free Software Foundation, Inc. +# Arkadiusz Lipiec , 2002. +# +msgid "" +msgstr "" +"Project-Id-Version: gLabels\n" +"POT-Creation-Date: 2004-08-08 00:43-0400\n" +"PO-Revision-Date: 2002-07-23 11:43+0100\n" +"Last-Translator: Arkadiusz Lipiec \n" +"Language-Team: Polish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/glabels.c:55 +msgid "Show view debugging messages." +msgstr "" + +#: src/glabels.c:58 +msgid "Show item debugging messages." +msgstr "" + +#: src/glabels.c:61 +msgid "Show printing debugging messages." +msgstr "" + +#: src/glabels.c:64 +msgid "Show prefs debugging messages." +msgstr "" + +#: src/glabels.c:67 +msgid "Show file debugging messages." +msgstr "" + +#: src/glabels.c:70 +msgid "Show document debugging messages." +msgstr "" + +#: src/glabels.c:73 +msgid "Show template debugging messages." +msgstr "" + +#: src/glabels.c:76 +msgid "Show paper debugging messages." +msgstr "" + +#: src/glabels.c:79 +msgid "Show xml debugging messages." +msgstr "" + +#: src/glabels.c:82 +msgid "Show document merge debugging messages." +msgstr "" + +#: src/glabels.c:85 +msgid "Show commands debugging messages." +msgstr "" + +#: src/glabels.c:88 +msgid "Show undo debugging messages." +msgstr "" + +#: src/glabels.c:91 +msgid "Show recent debugging messages." +msgstr "" + +#: src/glabels.c:94 +msgid "Show window debugging messages." +msgstr "" + +#: src/glabels.c:97 +msgid "Show ui debugging messages." +msgstr "" + +#: src/glabels.c:100 +msgid "Show property_bar debugging messages." +msgstr "" + +#: src/glabels.c:103 +msgid "Show media select widget debugging messages." +msgstr "" + +#: src/glabels.c:106 +msgid "Show mini preview widget debugging messages." +msgstr "" + +#: src/glabels.c:109 +msgid "Show pixbuf cache debugging messages." +msgstr "" + +#: src/glabels.c:112 +msgid "Show widget debugging messages." +msgstr "" + +#: src/glabels.c:115 +msgid "Show object editor debugging messages." +msgstr "" + +#: src/glabels.c:118 +msgid "Turn on all debugging messages." +msgstr "" + +#: src/glabels.c:187 +msgid "Could not initialize Bonobo!\n" +msgstr "" + +#: src/glabels-batch.c:48 +msgid "print this message" +msgstr "wy¶wietla ten komunikat" + +#: src/glabels-batch.c:50 +msgid "print the version of glabels-batch being used" +msgstr "wy¶wietla aktualnie u¿ywan± wersjê glabel-batch" + +#: src/glabels-batch.c:52 +msgid "set output filename (default=\"output.ps\")" +msgstr "okre¶l nazwê pliku wyj¶ciowego (domy¶lnie=\"output.ps\")" + +#: src/glabels-batch.c:52 +msgid "filename" +msgstr "nazwa pliku" + +#: src/glabels-batch.c:54 +msgid "number of sheets (default=1)" +msgstr "liczba arkuszy (domy¶lnie=1)" + +#: src/glabels-batch.c:54 +msgid "sheets" +msgstr "arkusz(e/y)" + +#: src/glabels-batch.c:56 +msgid "number of copies (default=1)" +msgstr "liczba kopii (domy¶lnie=1)" + +#: src/glabels-batch.c:56 +msgid "copies" +msgstr "kopi(a/e/i)" + +#: src/glabels-batch.c:58 src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "drukowanie ramek (w celu przetestowania wyrównania)" + +#: src/glabels-batch.c:60 src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "drukowanie odwrócone (np. odbicie zwierciadlane)" + +#: src/glabels-batch.c:96 +msgid "[OPTION...] GLABELS_FILE..." +msgstr "[OPCJA...] PLIK_GLABELS..." + +#: src/glabels-batch.c:116 +msgid "missing glabels file\n" +msgstr "brak pliku glabels\n" + +#: src/glabels-batch.c:157 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "nie mo¿na otworzyæ pliku glabels o nazwie %s\n" + +#: src/window.c:244 +msgid "(none) - gLabels" +msgstr "" + +#: src/window.c:414 +msgid "(modified)" +msgstr "" + +#: src/stock.c:65 data/ui/glabels-ui.xml.h:165 +#, fuzzy +msgid "_Select Mode" +msgstr "Wybierz" + +#: src/stock.c:66 data/ui/glabels-ui.xml.h:166 +#, fuzzy +msgid "_Text" +msgstr "Tekst" + +#: src/stock.c:67 data/ui/glabels-ui.xml.h:151 +#, fuzzy +msgid "_Line" +msgstr "Linia" + +#: src/stock.c:68 data/ui/glabels-ui.xml.h:133 +#, fuzzy +msgid "_Box" +msgstr "Skrzynka" + +#: src/stock.c:69 data/ui/glabels-ui.xml.h:144 +#, fuzzy +msgid "_Ellipse" +msgstr "Elipsa" + +#: src/stock.c:70 data/ui/glabels-ui.xml.h:149 +#, fuzzy +msgid "_Image" +msgstr "Obraz" + +#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 +#, fuzzy +msgid "Bar_code" +msgstr "Kod paskowy" + +#: src/stock.c:72 +#, fuzzy +msgid "_Merge Properties" +msgstr "W³a¶ciwo¶ci z³±czania" + +#: src/stock.c:73 +#, fuzzy +msgid "Object _Properties" +msgstr "W³a¶ciwo¶ci tekstu" + +#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 +#, fuzzy +msgid "Bring to _Front" +msgstr "Przesun na wierzch" + +#: src/stock.c:75 data/ui/glabels-ui.xml.h:110 +#, fuzzy +msgid "Send to _Back" +msgstr "Przesuñ w dó³" + +#: src/stock.c:76 data/ui/glabels-ui.xml.h:97 +#, fuzzy +msgid "Rotate _Left" +msgstr "Obróæ" + +#: src/stock.c:77 data/ui/glabels-ui.xml.h:98 +#, fuzzy +msgid "Rotate _Right" +msgstr "Obróæ" + +#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "" + +#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "" + +#: src/stock.c:80 data/ui/glabels-ui.xml.h:150 +msgid "_Lefts" +msgstr "" + +#: src/stock.c:81 data/ui/glabels-ui.xml.h:162 +msgid "_Rights" +msgstr "" + +#: src/stock.c:82 data/ui/glabels-ui.xml.h:134 +msgid "_Centers" +msgstr "" + +#: src/stock.c:83 data/ui/glabels-ui.xml.h:167 +#, fuzzy +msgid "_Tops" +msgstr "_Narzêdzia" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "" + +#: src/stock.c:85 +msgid "Centers" +msgstr "" + +#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "" + +#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "" + +#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "" + +#: src/stock.c:90 src/stock.c:92 +#, fuzzy +msgid "Linked" +msgstr "Linia" + +#: src/stock.c:91 src/stock.c:93 +#, fuzzy +msgid "Not Linked" +msgstr "Brak" + +#: src/ui-property-bar.c:345 src/object-editor.c:499 +#, fuzzy +msgid "Default" +msgstr "Usuñ" + +#: src/ui-property-bar.c:360 src/object-editor.c:512 +msgid "No fill" +msgstr "" + +#: src/ui-property-bar.c:375 src/object-editor.c:505 +#, fuzzy +msgid "No line" +msgstr "Brak" + +#: src/ui-sidebar.c:180 +#, fuzzy +msgid "Object properties" +msgstr "W³a¶ciwo¶ci tekstu" + +#: src/commands.c:385 +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/commands.c:399 +msgid "See the file AUTHORS for additional credits," +msgstr "" + +#: src/commands.c:400 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "" + +#: src/commands.c:409 +msgid " " +msgstr "" + +#: src/commands.c:424 +#, fuzzy +msgid "glabels" +msgstr "Etykiety" + +#: src/file.c:100 +msgid "New Label or Card" +msgstr "Nowa etykieta lub karta" + +#: src/file.c:132 src/file.c:304 +msgid "Media Type" +msgstr "Typ no¶nika" + +#: src/file.c:138 src/file.c:310 +msgid "Label orientation" +msgstr "U³o¿enie etykiety" + +#: src/file.c:269 +#, fuzzy +msgid "Label properties" +msgstr "W³a¶ciwo¶ci tekstu" + +#: src/file.c:452 src/file.c:870 +msgid "All files" +msgstr "" + +#: src/file.c:457 src/file.c:875 +#, fuzzy +msgid "gLabels documents" +msgstr "Glabels: Preferencje" + +#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 +#, fuzzy +msgid "Empty file name selection" +msgstr "Usuwa wszelkie zaznaczenia" + +#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 +msgid "Please select a file or supply a valid file name" +msgstr "" + +#: src/file.c:519 src/file.c:631 +msgid "File does not exist" +msgstr "" + +#: src/file.c:563 data/ui/glabels-ui.xml.h:75 +msgid "Open" +msgstr "Otwórz" + +#: src/file.c:565 +msgid "Open label" +msgstr "Otwórz etykietê" + +#: src/file.c:707 +#, fuzzy, c-format +msgid "Could not open file \"%s\"" +msgstr "Nie mo¿na otworzyæ pliku" + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "" + +#: src/file.c:797 src/file.c:979 src/file.c:1174 +#, fuzzy, c-format +msgid "Could not save file \"%s\"" +msgstr "Nie mo¿na zapisaæ pliku" + +#: src/file.c:805 src/file.c:987 src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "" + +#: src/file.c:848 src/file.c:1048 +#, fuzzy, c-format +msgid "Save \"%s\" as" +msgstr "Zapisz etykietê jako" + +#: src/file.c:935 src/file.c:1131 +#, fuzzy +msgid "Please supply a valid file name" +msgstr "Nale¿y podaæ nazwê pliku" + +#: src/file.c:952 src/file.c:1147 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "" + +#: src/file.c:960 src/file.c:1155 +msgid "File already exists." +msgstr "" + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "" + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "" + +#. Should not happen +#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 +#: data/glade/object-editor.glade.h:37 +msgid "points" +msgstr "punkty(-ów)" + +#: src/prefs.c:158 data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "cali" + +#: src/prefs.c:160 +msgid "mm" +msgstr "mm" + +#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 +#, fuzzy +msgid "gLabels Preferences" +msgstr "Glabels: Preferencje" + +#. +#. * Submenu: Order +#. +#: src/view.c:3570 data/ui/glabels-ui.xml.h:157 +msgid "_Order" +msgstr "" + +#. +#. * Submenu: Rotate/Flip +#. +#: src/view.c:3591 data/ui/glabels-ui.xml.h:163 +#, fuzzy +msgid "_Rotate/Flip" +msgstr "Obróæ" + +#. +#. * Submenu: Align Horizontally +#. +#: src/view.c:3624 +msgid "Align _Horizontally" +msgstr "" + +#. +#. * Submenu: Align Vertically +#. +#: src/view.c:3663 +msgid "Align _Vertically" +msgstr "" + +#: src/view.c:3724 data/ui/glabels-ui.xml.h:140 +#, fuzzy +msgid "_Delete" +msgstr "Usuñ" + +#. Build editor. +#: src/view-box.c:223 +#, fuzzy +msgid "Box object properties" +msgstr "Modyfikacja w³a¶ciwo¶ci skrzynki" + +#. Build editor. +#: src/view-ellipse.c:223 +#, fuzzy +msgid "Ellipse object properties" +msgstr "Modyfikacja w³a¶ciwo¶ci elipsy" + +#. Build editor. +#: src/view-line.c:223 +#, fuzzy +msgid "Line object properties" +msgstr "Modyfikacja w³a¶ciwo¶ci skrzynki" + +#. Build editor. +#: src/view-image.c:222 +#, fuzzy +msgid "Image object properties" +msgstr "Modyfikacja w³a¶ciwo¶ci obrazu" + +#. Build editor. +#: src/view-text.c:250 +#, fuzzy +msgid "Text object properties" +msgstr "Modyfikacja w³a¶ciwo¶ci skrzynki" + +#: src/view-text.c:562 data/glade/object-editor.glade.h:28 +msgid "Text" +msgstr "Tekst" + +#. Build editor. +#: src/view-barcode.c:209 +#, fuzzy +msgid "Barcode object properties" +msgstr "Modyfikacja w³a¶ciwo¶ci kodu paskowego" + +#: src/view-barcode.c:579 src/print.c:1088 +#, fuzzy +msgid "Invalid barcode data" +msgstr "Niepoprawny kod paskowy" + +#: src/merge-properties-dialog.c:231 +#, fuzzy +msgid "Merge Properties" +msgstr "W³a¶ciwo¶ci z³±czania" + +#. ---- Source section ---- +#: src/merge-properties-dialog.c:237 +msgid "Source" +msgstr "¬ród³o" + +#: src/merge-properties-dialog.c:245 +msgid "Format:" +msgstr "Format:" + +#. Location line +#: src/merge-properties-dialog.c:273 +msgid "Location:" +msgstr "Po³o¿enie:" + +#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 +msgid "Select merge-database source" +msgstr "Wybierz ¼ród³o bazy danych z³±czania " + +#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 +msgid "N/A" +msgstr "N/A" + +#. ---- Sample Fields section ---- +#: src/merge-properties-dialog.c:300 +msgid "Record selection/preview:" +msgstr "" + +#: src/merge-properties-dialog.c:326 +msgid "Select" +msgstr "Wybierz" + +#: src/merge-properties-dialog.c:334 +msgid "Record/Field" +msgstr "" + +#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 +msgid "Data" +msgstr "Dane" + +#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:82 +msgid "Print" +msgstr "Wydrukuj" + +#: src/print-dialog.c:281 +msgid "_Job" +msgstr "" + +#: src/print-dialog.c:286 +#, fuzzy +msgid "P_rinter" +msgstr "Wydrukuj" + +#. ----------- Add simple-copies widget ------------ +#: src/print-dialog.c:314 +msgid "Copies" +msgstr "Kopie" + +#. ------- Add merge control widget ------------ +#: src/print-dialog.c:322 +msgid "Document merge control" +msgstr "Kontrola z³±czania dokumentów" + +#. ----------- Add custom print options area ------------ +#: src/print-dialog.c:330 +msgid "Options" +msgstr "Opcje" + +#: src/print-dialog.c:351 +msgid "print crop marks" +msgstr "" + +#: src/print-dialog.c:553 src/print-dialog.c:592 +msgid "Print preview" +msgstr "Podgl±d wydruku" + +#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 +msgid "gLabels Template Designer" +msgstr "" + +#: src/bc.c:60 +msgid "POSTNET (any)" +msgstr "" + +#: src/bc.c:63 +msgid "POSTNET-5 (ZIP only)" +msgstr "" + +#: src/bc.c:66 +msgid "POSTNET-9 (ZIP+4)" +msgstr "" + +#: src/bc.c:69 +msgid "POSTNET-11 (DPBC)" +msgstr "" + +#: src/bc.c:72 +msgid "EAN (any)" +msgstr "" + +#: src/bc.c:75 +msgid "EAN-8" +msgstr "" + +#: src/bc.c:78 +msgid "EAN-8 +2" +msgstr "" + +#: src/bc.c:81 +msgid "EAN-8 +5" +msgstr "" + +#: src/bc.c:84 +msgid "EAN-13" +msgstr "" + +#: src/bc.c:87 +msgid "EAN-13 +2" +msgstr "" + +#: src/bc.c:90 +msgid "EAN-13 +5" +msgstr "" + +#: src/bc.c:93 +msgid "UPC (UPC-A or UPC-E)" +msgstr "" + +#: src/bc.c:96 +msgid "UPC-A" +msgstr "" + +#: src/bc.c:99 +msgid "UPC-A +2" +msgstr "" + +#: src/bc.c:102 +msgid "UPC-A +5" +msgstr "" + +#: src/bc.c:105 +msgid "UPC-E" +msgstr "" + +#: src/bc.c:108 +msgid "UPC-E +2" +msgstr "" + +#: src/bc.c:111 +msgid "UPC-E +5" +msgstr "" + +#: src/bc.c:114 +msgid "ISBN" +msgstr "" + +#: src/bc.c:117 +msgid "ISBN +5" +msgstr "" + +#: src/bc.c:120 +msgid "Code 39" +msgstr "" + +#: src/bc.c:123 +msgid "Code 128" +msgstr "" + +#: src/bc.c:126 +msgid "Code 128C" +msgstr "" + +#: src/bc.c:129 +msgid "Code 128B" +msgstr "" + +#: src/bc.c:132 +msgid "Interleaved 2 of 5" +msgstr "" + +#: src/bc.c:135 +msgid "Codabar" +msgstr "" + +#: src/bc.c:138 +msgid "MSI" +msgstr "" + +#: src/bc.c:141 +msgid "Plessey" +msgstr "" + +#: src/label.c:569 +msgid "Untitled" +msgstr "" + +#: src/xml-label.c:176 src/xml-label.c:213 +msgid "xmlParseFile error" +msgstr "b³±d przetwarzania pliku xml" + +#: src/xml-label.c:250 +msgid "No document root" +msgstr "Brak g³ównego dokumentu" + +#: src/xml-label.c:264 +msgid "Importing from glabels 0.1 format" +msgstr "" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "" + +#: src/xml-label.c:279 +msgid "Importing from glabels 1.91 format" +msgstr "" + +#: src/xml-label.c:282 +#, fuzzy +msgid "bad document, unknown glabels Namespace" +msgstr "" +"dokument jest niepoprawnego typu, nie odnaleziono przestrzeni nazw glabels" + +#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "Niepoprawny wêze³ g³ówny = \"%s\"" + +#: src/xml-label.c:348 src/xml-label-191.c:165 +#, fuzzy, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "Niepoprawny wêze³ g³ówny = \"%s\"" + +#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "niepoprawny wêze³ = \"%s\"" + +#: src/xml-label.c:796 src/xml-label-191.c:605 +#, fuzzy, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "niepoprawny wêze³ = \"%s\"" + +#: src/xml-label.c:962 libglabels/xml-template.c:528 +msgid "Utf8 conversion error." +msgstr "" + +#: src/xml-label.c:969 libglabels/xml-template.c:535 +msgid "Problem saving xml file." +msgstr "Problem podczas zapisu pliku xml." + +#. This should always be an id, but just in case a name +#. slips by! +#: src/xml-label-191.c:680 libglabels/xml-template.c:192 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "" + +#: src/xml-label-191.c:690 libglabels/xml-template.c:202 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "" + +#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 +msgid "None" +msgstr "Brak" + +#: src/merge-init.c:53 +#, fuzzy +msgid "Text file with comma delimeters (CSV)" +msgstr "Tekst oddzielony przecinkami (CSV)" + +#: src/merge-init.c:60 +#, fuzzy +msgid "Text file with colon delimeters" +msgstr "Tekst oddzielany dwukropkami" + +#: src/merge-init.c:67 +#, fuzzy +msgid "Text file with tab delimeters" +msgstr "Tekst oddzielony tabulacjami" + +#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 +#, fuzzy +msgid "File:" +msgstr "Wype³nienie" + +#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 +msgid "Key:" +msgstr "Klucz:" + +#: src/wdgt-print-copies.c:179 +msgid "Sheets:" +msgstr "Arkusze:" + +#: src/wdgt-print-copies.c:197 +msgid "Labels" +msgstr "Etykiety" + +#: src/wdgt-print-copies.c:200 +msgid "from:" +msgstr "od:" + +#: src/wdgt-print-copies.c:207 +msgid "to:" +msgstr "do:" + +#: src/wdgt-print-merge.c:178 +msgid "Start on label" +msgstr "Rozpocznij od etykiety" + +#: src/wdgt-print-merge.c:186 +msgid "on 1st sheet" +msgstr "na pierwszym arkuszu" + +#: src/wdgt-print-merge.c:195 +msgid "Copies:" +msgstr "Kopie:" + +#: src/wdgt-print-merge.c:201 +msgid "Collate" +msgstr "Uk³adanie" + +#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 +msgid "Description:" +msgstr "Opis:" + +#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 +msgid "Page size:" +msgstr "Rozmiar strony:" + +#: src/wdgt-media-select.c:290 +msgid "Label size:" +msgstr "Rozmiar etykiety:" + +#: src/wdgt-media-select.c:301 +msgid "Layout:" +msgstr "Wygl±d:" + +#: src/wdgt-media-select.c:578 +#, c-format +msgid "%d x %d (%d per sheet)" +msgstr "%d x %d (%d na arkusz)" + +#: src/wdgt-media-select.c:582 +#, fuzzy, c-format +msgid "%d per sheet" +msgstr "%d x %d (%d na arkusz)" + +#: src/wdgt-media-select.c:614 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: src/wdgt-media-select.c:619 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 +#, c-format +msgid "%s %s diameter" +msgstr "" + +#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 +#, c-format +msgid "%.5g %s diameter" +msgstr "" + +#: src/wdgt-rotate-label.c:193 +msgid "Rotate" +msgstr "Obróæ" + +#. This is the default custom color +#: src/mygal/color-palette.c:396 +#, fuzzy +msgid "custom" +msgstr "W³asny klucz pola" + +#. "Custom" color - we'll pop up a GnomeColorPicker +#: src/mygal/color-palette.c:438 +#, fuzzy +msgid "Custom Color:" +msgstr "Kolor:" + +#: src/mygal/color-palette.c:446 +msgid "Choose Custom Color" +msgstr "" + +#: src/mygal/color-palette.c:579 +msgid "black" +msgstr "" + +#: src/mygal/color-palette.c:580 +msgid "light brown" +msgstr "" + +#: src/mygal/color-palette.c:581 +msgid "brown gold" +msgstr "" + +#: src/mygal/color-palette.c:582 +msgid "dark green #2" +msgstr "" + +#: src/mygal/color-palette.c:583 +msgid "navy" +msgstr "" + +#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 +msgid "dark blue" +msgstr "" + +#: src/mygal/color-palette.c:585 +msgid "purple #2" +msgstr "" + +#: src/mygal/color-palette.c:586 +msgid "very dark gray" +msgstr "" + +#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 +msgid "dark red" +msgstr "" + +#: src/mygal/color-palette.c:590 +msgid "red-orange" +msgstr "" + +#: src/mygal/color-palette.c:591 +msgid "gold" +msgstr "" + +#: src/mygal/color-palette.c:592 +msgid "dark green" +msgstr "" + +#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 +msgid "dull blue" +msgstr "" + +#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 +msgid "blue" +msgstr "" + +#: src/mygal/color-palette.c:595 +msgid "dull purple" +msgstr "" + +#: src/mygal/color-palette.c:596 +msgid "dark grey" +msgstr "" + +#: src/mygal/color-palette.c:599 +msgid "red" +msgstr "" + +#: src/mygal/color-palette.c:600 +msgid "orange" +msgstr "" + +#: src/mygal/color-palette.c:601 +msgid "lime" +msgstr "" + +#: src/mygal/color-palette.c:602 +msgid "dull green" +msgstr "" + +#: src/mygal/color-palette.c:603 +msgid "dull blue #2" +msgstr "" + +#: src/mygal/color-palette.c:604 +msgid "sky blue #2" +msgstr "" + +#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 +msgid "purple" +msgstr "" + +#: src/mygal/color-palette.c:606 +msgid "gray" +msgstr "" + +#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 +#, fuzzy +msgid "magenta" +msgstr "Obraz" + +#: src/mygal/color-palette.c:610 +msgid "bright orange" +msgstr "" + +#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 +msgid "yellow" +msgstr "" + +#: src/mygal/color-palette.c:612 +#, fuzzy +msgid "green" +msgstr "stopni(e)" + +#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 +msgid "cyan" +msgstr "" + +#: src/mygal/color-palette.c:614 +msgid "bright blue" +msgstr "" + +#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 +msgid "red purple" +msgstr "" + +#: src/mygal/color-palette.c:616 +msgid "light grey" +msgstr "" + +#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 +msgid "pink" +msgstr "" + +#: src/mygal/color-palette.c:620 +msgid "light orange" +msgstr "" + +#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 +msgid "light yellow" +msgstr "" + +#: src/mygal/color-palette.c:622 +msgid "light green" +msgstr "" + +#: src/mygal/color-palette.c:623 +msgid "light cyan" +msgstr "" + +#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 +msgid "light blue" +msgstr "" + +#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 +msgid "light purple" +msgstr "" + +#: src/mygal/color-palette.c:626 +msgid "white" +msgstr "" + +#: src/mygal/color-palette.c:631 +msgid "purplish blue" +msgstr "" + +#: src/mygal/color-palette.c:635 +msgid "dark purple" +msgstr "" + +#: src/mygal/color-palette.c:637 +msgid "sky blue" +msgstr "" + +#: libglabels/template.c:848 +#, c-format +msgid "Generic %s full page" +msgstr "" + +#: libglabels/template.c:897 +msgid "No template files found!" +msgstr "Nie znaleziono pliku szablonu!" + +#. Create and append an "Other" entry. +#: libglabels/paper.c:67 +msgid "Other" +msgstr "" + +#: libglabels/paper.c:361 +#, fuzzy +msgid "No paper files found!" +msgstr "Nie znaleziono pliku szablonu!" + +#: data/ui/glabels-ui.xml.h:1 +msgid "About glabels" +msgstr "" + +#: data/ui/glabels-ui.xml.h:2 +msgid "About..." +msgstr "" + +#: data/ui/glabels-ui.xml.h:3 +msgid "Align _Horizontal" +msgstr "" + +#: data/ui/glabels-ui.xml.h:4 +msgid "Align _Vertical" +msgstr "" + +#: data/ui/glabels-ui.xml.h:5 +msgid "Align objects to bottoms" +msgstr "" + +#: data/ui/glabels-ui.xml.h:6 +msgid "Align objects to horizontal centers" +msgstr "" + +#: data/ui/glabels-ui.xml.h:7 +msgid "Align objects to left edges" +msgstr "" + +#: data/ui/glabels-ui.xml.h:8 +msgid "Align objects to right edges" +msgstr "" + +#: data/ui/glabels-ui.xml.h:9 +msgid "Align objects to tops" +msgstr "" + +#: data/ui/glabels-ui.xml.h:10 +msgid "Align objects to vertical centers" +msgstr "" + +#: data/ui/glabels-ui.xml.h:12 +msgid "Bold" +msgstr "" + +#: data/ui/glabels-ui.xml.h:14 +#, fuzzy +msgid "Center align" +msgstr "Ogólne" + +#: data/ui/glabels-ui.xml.h:15 +msgid "Center objects to horizontal label center" +msgstr "" + +#: data/ui/glabels-ui.xml.h:16 +msgid "Center objects to vertical label center" +msgstr "" + +#: data/ui/glabels-ui.xml.h:17 +msgid "Change the visibility of markup lines in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:18 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:19 +msgid "Change the visibility of the grid in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:20 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:21 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:22 +msgid "Close" +msgstr "" + +#: data/ui/glabels-ui.xml.h:23 +#, fuzzy +msgid "Close the current file" +msgstr "Zapisuje bie¿±cy plik" + +#: data/ui/glabels-ui.xml.h:24 +msgid "Configure the application" +msgstr "" + +#: data/ui/glabels-ui.xml.h:25 +msgid "Contents" +msgstr "" + +#: data/ui/glabels-ui.xml.h:26 +msgid "Copy" +msgstr "" + +#: data/ui/glabels-ui.xml.h:27 +#, fuzzy +msgid "Copy the selection" +msgstr "Usuwa wszelkie zaznaczenia" + +#: data/ui/glabels-ui.xml.h:28 +#, fuzzy +msgid "Create a custom template" +msgstr "Tworzy liniê" + +#: data/ui/glabels-ui.xml.h:29 +#, fuzzy +msgid "Create a new document" +msgstr "Tworzy liniê" + +#: data/ui/glabels-ui.xml.h:30 +msgid "Create barcode object" +msgstr "Tworzy kod paskowy" + +#: data/ui/glabels-ui.xml.h:31 +msgid "Create box/rectangle object" +msgstr "Tworzy skrzynkê/prostok±t" + +#: data/ui/glabels-ui.xml.h:32 +msgid "Create ellipse/circle object" +msgstr "Tworzy elipsê/okr±g" + +#: data/ui/glabels-ui.xml.h:33 +msgid "Create image object" +msgstr "Tworzy obraz" + +#: data/ui/glabels-ui.xml.h:34 +msgid "Create line object" +msgstr "Tworzy liniê" + +#: data/ui/glabels-ui.xml.h:35 +msgid "Create text object" +msgstr "Tworzy obiekt tekstowy" + +#: data/ui/glabels-ui.xml.h:36 +msgid "Cu_t" +msgstr "" + +#: data/ui/glabels-ui.xml.h:37 +#, fuzzy +msgid "Customize" +msgstr "W³asny klucz pola" + +#: data/ui/glabels-ui.xml.h:38 +msgid "Customize Drawing Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:39 +msgid "Customize Main Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:40 +msgid "Customize Property Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:41 +msgid "Customize toolbars" +msgstr "" + +#: data/ui/glabels-ui.xml.h:42 +msgid "Cut" +msgstr "" + +#: data/ui/glabels-ui.xml.h:43 +msgid "Cut the selection" +msgstr "" + +#: data/ui/glabels-ui.xml.h:44 +msgid "Decrease magnification" +msgstr "" + +#: data/ui/glabels-ui.xml.h:45 +msgid "Delete" +msgstr "Usuñ" + +#: data/ui/glabels-ui.xml.h:46 +#, fuzzy +msgid "Delete the selected objects" +msgstr "Tworzy obiekt tekstowy" + +#: data/ui/glabels-ui.xml.h:47 +msgid "Drawing toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:48 +msgid "Dump XML" +msgstr "" + +#: data/ui/glabels-ui.xml.h:49 +msgid "Dump the UI Xml description" +msgstr "" + +#: data/ui/glabels-ui.xml.h:50 +msgid "Edit merge properties" +msgstr "Modyfikuje w³a¶ciwo¶ci z³±czania" + +#: data/ui/glabels-ui.xml.h:54 +msgid "Flip object horizontally" +msgstr "" + +#: data/ui/glabels-ui.xml.h:55 +msgid "Flip object vertically" +msgstr "" + +#: data/ui/glabels-ui.xml.h:56 +#, fuzzy +msgid "Font name" +msgstr "Nie zapisuj" + +#: data/ui/glabels-ui.xml.h:57 +#, fuzzy +msgid "Font selector" +msgstr "Usuwa wszelkie zaznaczenia" + +#: data/ui/glabels-ui.xml.h:58 +#, fuzzy +msgid "Font size" +msgstr "Nie zapisuj" + +#: data/ui/glabels-ui.xml.h:59 +msgid "Icon and _Text" +msgstr "" + +#: data/ui/glabels-ui.xml.h:60 +msgid "Increase magnification" +msgstr "" + +#: data/ui/glabels-ui.xml.h:61 +msgid "Italic" +msgstr "" + +#: data/ui/glabels-ui.xml.h:63 +msgid "Left align" +msgstr "" + +#: data/ui/glabels-ui.xml.h:65 +msgid "Line width" +msgstr "" + +#: data/ui/glabels-ui.xml.h:66 +msgid "Lower object to bottom" +msgstr "" + +#: data/ui/glabels-ui.xml.h:67 +msgid "M_arkup" +msgstr "" + +#: data/ui/glabels-ui.xml.h:68 +msgid "Main toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:69 +msgid "Markup" +msgstr "" + +#: data/ui/glabels-ui.xml.h:70 +#, fuzzy +msgid "Modify document properties" +msgstr "Modyfikacja w³a¶ciwo¶ci z³±czania dokumentów" + +#: data/ui/glabels-ui.xml.h:71 +#, fuzzy +msgid "New" +msgstr "_Nowa" + +#: data/ui/glabels-ui.xml.h:72 +#, fuzzy +msgid "Object property editor" +msgstr "W³a¶ciwo¶ci tekstu" + +#: data/ui/glabels-ui.xml.h:73 +msgid "Only show icons in the drawing toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:74 +msgid "Only show icons in the main toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:76 +msgid "Open a file" +msgstr "Otwiera plik" + +#: data/ui/glabels-ui.xml.h:77 +#, fuzzy +msgid "Open the glabels manual" +msgstr "Otwórz etykietê" + +#: data/ui/glabels-ui.xml.h:78 +msgid "Paste" +msgstr "" + +#: data/ui/glabels-ui.xml.h:79 +msgid "Paste the clipboard" +msgstr "" + +#: data/ui/glabels-ui.xml.h:80 +#, fuzzy +msgid "Pr_eferences..." +msgstr "Glabels: Preferencje" + +#: data/ui/glabels-ui.xml.h:81 +#, fuzzy +msgid "Preferences" +msgstr "Glabels: Preferencje" + +#: data/ui/glabels-ui.xml.h:83 +#, fuzzy +msgid "Print the current file" +msgstr "Drukuje bie¿±cy plik" + +#: data/ui/glabels-ui.xml.h:84 +#, fuzzy +msgid "Proper_ties..." +msgstr "W³a¶ciwo¶ci tekstu" + +#: data/ui/glabels-ui.xml.h:85 +#, fuzzy +msgid "Properties" +msgstr "W³a¶ciwo¶ci tekstu" + +#: data/ui/glabels-ui.xml.h:86 +msgid "Property toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:87 +msgid "Quit" +msgstr "" + +#: data/ui/glabels-ui.xml.h:88 +msgid "Quit the program" +msgstr "" + +#: data/ui/glabels-ui.xml.h:89 +msgid "Raise object to top" +msgstr "" + +#: data/ui/glabels-ui.xml.h:90 +msgid "Recent _Files" +msgstr "" + +#: data/ui/glabels-ui.xml.h:91 +msgid "Redo" +msgstr "" + +#: data/ui/glabels-ui.xml.h:92 +msgid "Redo the undone action" +msgstr "" + +#: data/ui/glabels-ui.xml.h:93 +msgid "Remove all selections" +msgstr "Usuwa wszelkie zaznaczenia" + +#: data/ui/glabels-ui.xml.h:95 +#, no-c-format +msgid "Restore scale to 100%" +msgstr "" + +#: data/ui/glabels-ui.xml.h:96 +msgid "Right align" +msgstr "" + +#: data/ui/glabels-ui.xml.h:99 +msgid "Rotate object 90 clockwise" +msgstr "" + +#: data/ui/glabels-ui.xml.h:100 +msgid "Rotate object 90 counter-clockwise" +msgstr "" + +#: data/ui/glabels-ui.xml.h:101 +#, fuzzy +msgid "Save" +msgstr "Zapisz jako" + +#: data/ui/glabels-ui.xml.h:102 +msgid "Save As" +msgstr "Zapisz jako" + +#: data/ui/glabels-ui.xml.h:103 +#, fuzzy +msgid "Save _As..." +msgstr "Zapisz jako" + +#: data/ui/glabels-ui.xml.h:104 +#, fuzzy +msgid "Save the current file" +msgstr "Zapisuje bie¿±cy plik" + +#: data/ui/glabels-ui.xml.h:105 +msgid "Save the current file with a different name" +msgstr "" + +#: data/ui/glabels-ui.xml.h:106 +#, fuzzy +msgid "Select All" +msgstr "O_dznacz wszystko" + +#: data/ui/glabels-ui.xml.h:107 +#, fuzzy +msgid "Select _All" +msgstr "O_dznacz wszystko" + +#: data/ui/glabels-ui.xml.h:108 +#, fuzzy +msgid "Select all objects" +msgstr "Wybierz, przeno¶ i modyfikuj obiekty" + +#: data/ui/glabels-ui.xml.h:109 +msgid "Select, move and modify objects" +msgstr "Wybierz, przeno¶ i modyfikuj obiekty" + +#: data/ui/glabels-ui.xml.h:111 +msgid "Set drawing toolbar button style according to desktop default" +msgstr "" + +#: data/ui/glabels-ui.xml.h:112 +msgid "Set main toolbar button style according to desktop default" +msgstr "" + +#: data/ui/glabels-ui.xml.h:113 +msgid "Show _Tooltips" +msgstr "" + +#: data/ui/glabels-ui.xml.h:114 +msgid "Show both icons and texts in the drawing toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:115 +msgid "Show both icons and texts in the main toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:116 +msgid "Show tooltips in the drawing toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:117 +msgid "Show tooltips in the main toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:118 +msgid "Show tooltips in the property toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:119 +msgid "Template Designer" +msgstr "" + +#: data/ui/glabels-ui.xml.h:120 +msgid "Template _Designer..." +msgstr "" + +#: data/ui/glabels-ui.xml.h:121 +msgid "Text color" +msgstr "" + +#: data/ui/glabels-ui.xml.h:122 +#, fuzzy +msgid "U_n-select All" +msgstr "O_dznacz wszystko" + +#: data/ui/glabels-ui.xml.h:123 +#, fuzzy +msgid "Un-select All" +msgstr "O_dznacz wszystko" + +#: data/ui/glabels-ui.xml.h:124 +msgid "Undo" +msgstr "" + +#: data/ui/glabels-ui.xml.h:125 +msgid "Undo the last action" +msgstr "" + +#: data/ui/glabels-ui.xml.h:126 +#, fuzzy +msgid "Zoom _1:1" +msgstr "Powiêkszenie 1:1" + +#: data/ui/glabels-ui.xml.h:127 +#, fuzzy +msgid "Zoom _In" +msgstr "Powiêksz" + +#: data/ui/glabels-ui.xml.h:128 +#, fuzzy +msgid "Zoom _Out" +msgstr "Pomniejsz" + +#: data/ui/glabels-ui.xml.h:129 +#, fuzzy +msgid "Zoom to _fit" +msgstr "Powiêksza 1:1" + +#: data/ui/glabels-ui.xml.h:130 +msgid "Zoom to fit window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:131 +msgid "_About..." +msgstr "" + +#: data/ui/glabels-ui.xml.h:132 +msgid "_Bottoms" +msgstr "" + +#: data/ui/glabels-ui.xml.h:135 +msgid "_Close" +msgstr "" + +#: data/ui/glabels-ui.xml.h:136 +msgid "_Contents" +msgstr "" + +#: data/ui/glabels-ui.xml.h:137 +msgid "_Copy" +msgstr "" + +#: data/ui/glabels-ui.xml.h:138 +#, fuzzy +msgid "_Create Object" +msgstr "Tworzy obiekt tekstowy" + +#: data/ui/glabels-ui.xml.h:139 +msgid "_Debug" +msgstr "" + +#: data/ui/glabels-ui.xml.h:141 +msgid "_Desktop Default" +msgstr "" + +#: data/ui/glabels-ui.xml.h:142 +msgid "_Drawing Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:143 +msgid "_Edit" +msgstr "" + +#: data/ui/glabels-ui.xml.h:145 +#, fuzzy +msgid "_File" +msgstr "Wype³nienie" + +#: data/ui/glabels-ui.xml.h:146 +msgid "_Grid" +msgstr "" + +#: data/ui/glabels-ui.xml.h:147 +msgid "_Help" +msgstr "" + +#: data/ui/glabels-ui.xml.h:148 +msgid "_Icon" +msgstr "" + +#: data/ui/glabels-ui.xml.h:152 +msgid "_Main Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:153 +#, fuzzy +msgid "_Merge Properties..." +msgstr "W³a¶ciwo¶ci z³±czania" + +#: data/ui/glabels-ui.xml.h:154 +msgid "_New" +msgstr "_Nowa" + +#: data/ui/glabels-ui.xml.h:155 +msgid "_Objects" +msgstr "" + +#: data/ui/glabels-ui.xml.h:156 +#, fuzzy +msgid "_Open..." +msgstr "Otwórz" + +#: data/ui/glabels-ui.xml.h:158 +msgid "_Paste" +msgstr "" + +#: data/ui/glabels-ui.xml.h:159 +#, fuzzy +msgid "_Print..." +msgstr "Wydrukuj" + +#: data/ui/glabels-ui.xml.h:160 +msgid "_Property Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:161 +msgid "_Quit" +msgstr "" + +#: data/ui/glabels-ui.xml.h:164 +#, fuzzy +msgid "_Save" +msgstr "Zapisz jako" + +#: data/ui/glabels-ui.xml.h:168 +#, fuzzy +msgid "_View" +msgstr "_Nowa" + +#: data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 +#: data/glade/template-designer.glade.h:5 +msgid "*" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:3 +msgid "Default page size" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:4 +msgid "Fill" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:5 +msgid "Line" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:6 +msgid "Text" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:7 +msgid "Units" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 +msgid "Alignment:" +msgstr "Wyrównanie:" + +#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 +msgid "Color:" +msgstr "Kolor:" + +#: data/glade/prefs-dialog.glade.h:10 +msgid "Font:" +msgstr "Czcionka:" + +#: data/glade/prefs-dialog.glade.h:11 +msgid "ISO A4" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:12 +msgid "Inches" +msgstr "Cale" + +#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 +msgid "Line Spacing:" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:14 +#, fuzzy +msgid "Locale" +msgstr "Skala" + +#: data/glade/prefs-dialog.glade.h:15 +msgid "Millimeters" +msgstr "Milimetry" + +#: data/glade/prefs-dialog.glade.h:16 +msgid "Object defaults" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:17 +msgid "Points" +msgstr "Punkty" + +#: data/glade/prefs-dialog.glade.h:18 +msgid "Select default properties for new objects." +msgstr "" + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "" + +#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:25 +msgid "US Letter" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 +#: data/glade/template-designer.glade.h:72 +msgid "Width:" +msgstr "Szeroko¶æ:" + +#: data/glade/object-editor.glade.h:2 +msgid "00000000000 00000" +msgstr "" + +#: data/glade/object-editor.glade.h:3 +msgid "Xxx object properties" +msgstr "" + +#: data/glade/object-editor.glade.h:5 +msgid "Allow merge to automatically shrink text" +msgstr "" + +#: data/glade/object-editor.glade.h:6 +msgid "Angle:" +msgstr "K±t" + +#: data/glade/object-editor.glade.h:7 +msgid "Checksum" +msgstr "" + +#: data/glade/object-editor.glade.h:10 +#, fuzzy +msgid "Family:" +msgstr "Wype³nienie" + +#: data/glade/object-editor.glade.h:12 +msgid "Fill" +msgstr "Wype³nienie" + +#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 +msgid "Height:" +msgstr "Wysoko¶æ:" + +#: data/glade/object-editor.glade.h:14 +msgid "Image" +msgstr "Obraz" + +#: data/glade/object-editor.glade.h:15 +msgid "Insert merge field" +msgstr "Wstaw pole z³±czenia" + +#: data/glade/object-editor.glade.h:17 +msgid "Length:" +msgstr "D³ugo¶æ:" + +#: data/glade/object-editor.glade.h:18 +msgid "Line" +msgstr "Linia" + +#: data/glade/object-editor.glade.h:20 +msgid "Literal:" +msgstr "Litera³:" + +#: data/glade/object-editor.glade.h:21 +msgid "Load image" +msgstr "" + +#: data/glade/object-editor.glade.h:22 +msgid "Position" +msgstr "Pozycja" + +#: data/glade/object-editor.glade.h:23 +msgid "Reset image size" +msgstr "Wyzeruj rozmiar obrazu" + +#: data/glade/object-editor.glade.h:24 +msgid "Size" +msgstr "Rozmiar" + +#: data/glade/object-editor.glade.h:25 +#, fuzzy +msgid "Size:" +msgstr "Rozmiar" + +#: data/glade/object-editor.glade.h:26 +#, fuzzy +msgid "Style" +msgstr "Styl" + +#: data/glade/object-editor.glade.h:27 +#, fuzzy +msgid "Style:" +msgstr "Styl" + +#: data/glade/object-editor.glade.h:30 +msgid "X:" +msgstr "X:" + +#: data/glade/object-editor.glade.h:31 +msgid "Y:" +msgstr "Y:" + +#: data/glade/object-editor.glade.h:32 +msgid "degrees" +msgstr "stopni(e)" + +#: data/glade/object-editor.glade.h:33 +msgid "dialog1" +msgstr "" + +#: data/glade/object-editor.glade.h:34 +msgid "digits:" +msgstr "" + +#: data/glade/object-editor.glade.h:35 +#, fuzzy +msgid "format:" +msgstr "Format:" + +#: data/glade/template-designer.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/template-designer.glade.h:2 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "" + +#: data/glade/template-designer.glade.h:3 +msgid "(e.g., 8163A)" +msgstr "" + +#: data/glade/template-designer.glade.h:4 +msgid "(e.g., Avery, Acme, ...)" +msgstr "" + +#: data/glade/template-designer.glade.h:6 +msgid "1. Outer radius:" +msgstr "" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "" + +#: data/glade/template-designer.glade.h:8 +#, fuzzy +msgid "1. Width:" +msgstr "Szeroko¶æ:" + +#: data/glade/template-designer.glade.h:9 +#, fuzzy +msgid "2. Height:" +msgstr "Wysoko¶æ:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" + +#: data/glade/template-designer.glade.h:30 +msgid "Design Completed" +msgstr "" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" + +#: data/glade/template-designer.glade.h:40 +msgid "Label Size (CD/DVD)" +msgstr "" + +#: data/glade/template-designer.glade.h:41 +#, fuzzy +msgid "Label Size (Round)" +msgstr "Rozmiar etykiety:" + +#: data/glade/template-designer.glade.h:42 +#, fuzzy +msgid "Label or Card Shape" +msgstr "Nowa etykieta lub karta" + +#: data/glade/template-designer.glade.h:43 +msgid "Label or Card Size (Rectangular)" +msgstr "" + +#: data/glade/template-designer.glade.h:44 +#, fuzzy +msgid "Layout #1" +msgstr "Wygl±d:" + +#: data/glade/template-designer.glade.h:45 +#, fuzzy +msgid "Layout #2" +msgstr "Wygl±d:" + +#: data/glade/template-designer.glade.h:46 +#, fuzzy +msgid "Layout(s)" +msgstr "Wygl±d:" + +#: data/glade/template-designer.glade.h:47 +#, fuzzy +msgid "Name and Description" +msgstr "Opis:" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "" + +#: data/glade/template-designer.glade.h:50 +msgid "Number of Layouts" +msgstr "" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "" + +#: data/glade/template-designer.glade.h:52 +#, fuzzy +msgid "Page Size" +msgstr "Rozmiar strony:" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "" + +#: data/glade/template-designer.glade.h:55 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "" + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "" + +#: data/glade/template-designer.glade.h:57 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "" + +#: data/glade/template-designer.glade.h:58 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "" + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "" + +#: data/glade/template-designer.glade.h:61 +#, fuzzy +msgid "Print test sheet" +msgstr "na pierwszym arkuszu" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" + +#: data/glade/template-designer.glade.h:68 +msgid "Vertical pitch (dy):" +msgstr "" + +#: data/glade/template-designer.glade.h:69 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" + +#: data/templates/paper-sizes.xml.h:1 +msgid "A0" +msgstr "" + +#: data/templates/paper-sizes.xml.h:2 +msgid "A1" +msgstr "" + +#: data/templates/paper-sizes.xml.h:3 +msgid "A10" +msgstr "" + +#: data/templates/paper-sizes.xml.h:4 +msgid "A2" +msgstr "" + +#: data/templates/paper-sizes.xml.h:5 +msgid "A3" +msgstr "" + +#: data/templates/paper-sizes.xml.h:6 +msgid "A4" +msgstr "" + +#: data/templates/paper-sizes.xml.h:7 +msgid "A5" +msgstr "" + +#: data/templates/paper-sizes.xml.h:8 +msgid "A6" +msgstr "" + +#: data/templates/paper-sizes.xml.h:9 +msgid "A7" +msgstr "" + +#: data/templates/paper-sizes.xml.h:10 +msgid "A8" +msgstr "" + +#: data/templates/paper-sizes.xml.h:11 +msgid "A9" +msgstr "" + +#: data/templates/paper-sizes.xml.h:12 +msgid "B0" +msgstr "" + +#: data/templates/paper-sizes.xml.h:13 +msgid "B1" +msgstr "" + +#: data/templates/paper-sizes.xml.h:14 +msgid "B10" +msgstr "" + +#: data/templates/paper-sizes.xml.h:15 +msgid "B2" +msgstr "" + +#: data/templates/paper-sizes.xml.h:16 +msgid "B3" +msgstr "" + +#: data/templates/paper-sizes.xml.h:17 +msgid "B4" +msgstr "" + +#: data/templates/paper-sizes.xml.h:18 +msgid "B5" +msgstr "" + +#: data/templates/paper-sizes.xml.h:19 +msgid "B6" +msgstr "" + +#: data/templates/paper-sizes.xml.h:20 +msgid "B7" +msgstr "" + +#: data/templates/paper-sizes.xml.h:21 +msgid "B8" +msgstr "" + +#: data/templates/paper-sizes.xml.h:22 +msgid "B9" +msgstr "" + +#: data/templates/paper-sizes.xml.h:23 +msgid "US Executive" +msgstr "" + +#: data/templates/paper-sizes.xml.h:24 +msgid "US Legal" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:1 +#: data/templates/zweckform-iso-templates.xml.h:1 +msgid "Address Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:2 +#: data/templates/avery-iso-templates.xml.h:2 +#: data/templates/zweckform-iso-templates.xml.h:3 +#: data/templates/misc-us-templates.xml.h:2 +#: data/templates/misc-iso-templates.xml.h:9 +msgid "Business Cards" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:3 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:4 +msgid "Diskette Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:5 +#, fuzzy +msgid "Filing Labels" +msgstr "Etykiety" + +#: data/templates/avery-us-templates.xml.h:6 +msgid "Full Sheet Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:7 +#, fuzzy +msgid "Large Round Labels" +msgstr "Rozpocznij od etykiety" + +#: data/templates/avery-us-templates.xml.h:8 +msgid "Name Badge Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:9 +msgid "Return Address Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:10 +msgid "Shipping Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:11 +#, fuzzy +msgid "Small Round Labels" +msgstr "Rozpocznij od etykiety" + +#: data/templates/avery-us-templates.xml.h:12 +#, fuzzy +msgid "Square Labels" +msgstr "Etykiety" + +#: data/templates/avery-us-templates.xml.h:13 +msgid "Video Tape Face Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:14 +msgid "Video Tape Spine Labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:1 +msgid "Address labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:3 +msgid "CD Booklet" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:4 +msgid "CD Inlet" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:5 +#: data/templates/zweckform-iso-templates.xml.h:4 +#: data/templates/misc-us-templates.xml.h:4 +#: data/templates/misc-iso-templates.xml.h:10 +#, fuzzy +msgid "CD/DVD Labels" +msgstr "Etykiety" + +#: data/templates/avery-iso-templates.xml.h:6 +msgid "Diskette labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:7 +#: data/templates/zweckform-iso-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:17 +msgid "Mailing Labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:8 +#, fuzzy +msgid "Mailing labels" +msgstr "Etykiety" + +#: data/templates/avery-iso-templates.xml.h:9 +msgid "Mini Address Labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:10 +#, fuzzy +msgid "Shipping labels" +msgstr "Otwórz etykietê" + +#: data/templates/zweckform-iso-templates.xml.h:2 +msgid "Allround Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:5 +msgid "Correction and Cover-up Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:6 +msgid "Lever Arch File Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:8 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:9 +msgid "Rectangular Copier Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:10 +#: data/templates/misc-iso-templates.xml.h:22 +msgid "Rectangular Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:11 +msgid "Video Labels (back)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:1 +msgid "Business Card CD" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:3 +msgid "CD Template Rectangles" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:5 +msgid "CD/DVD Labels (Face Only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:6 +#: data/templates/misc-iso-templates.xml.h:11 +msgid "CD/DVD Labels (face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:7 +#, fuzzy +msgid "DLT Labels" +msgstr "Etykiety" + +#: data/templates/misc-us-templates.xml.h:8 +msgid "Microtube labels" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:9 +msgid "Mini-CD Labels" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:10 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:11 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:12 +#: data/templates/misc-iso-templates.xml.h:21 +msgid "PRO CD Labels 2-up (face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:13 +msgid "Slimline CD Case (rightside up)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Slimline CD Case (upside down)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:1 +msgid "Agipa 119488: Business Cards" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:2 +msgid "Allround Labels --24" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:3 +msgid "Allround Labels --44" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:4 +msgid "Allround Labels --64" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:5 +msgid "Allround Labels --65" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:6 +msgid "Arch File Labels" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:7 +msgid "Arch File Labels (large)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:8 +msgid "Arch File Labels (small)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:12 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Diskette Labels (face only)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:14 +msgid "EPSON Photo Stickers 16" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Etiketten" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:16 +msgid "Fridge Magnet Stickers" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:18 +msgid "Mailing Labels --14" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:19 +msgid "Mailing Labels-2 columns" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:20 +msgid "Mailing Labels-3 columns" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:23 +msgid "Video Labels (face only)" +msgstr "" + +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers." +msgstr "" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "" + +#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 +#, fuzzy +msgid "gLabels Project File" +msgstr "W³a¶ciwo¶ci tekstu" + +#, fuzzy +#~ msgid "Object _Properties..." +#~ msgstr "W³a¶ciwo¶ci tekstu" + +#~ msgid "Display units" +#~ msgstr "Jednostki wy¶wietlania" + +#~ msgid "Default page size" +#~ msgstr "Domy¶lny rozmiar strony" + +#~ msgid "Outline" +#~ msgstr "Ramka" + +#~ msgid "Edit line object properties" +#~ msgstr "Modyfikacja w³a¶ciwo¶ci linii" + +#~ msgid "Edit text object properties" +#~ msgstr "Modyfikacja w³a¶ciowo¶ci tekstu" + +#~ msgid "Maintain current aspect ratio" +#~ msgstr "Utrzymywanie aktualnych proporcji" + +#, fuzzy +#~ msgid "CD Labels" +#~ msgstr "Etykiety" + +#, fuzzy +#~ msgid "Open %s" +#~ msgstr "Otwórz" + +#~ msgid "Revert to saved copy of %s?" +#~ msgstr "Przywróciæ zapisan± kopiê pliku %s?" + +#~ msgid "Unknown media type. Using default." +#~ msgstr "Nieznany typ no¶nika. U¿yto warto¶ci domy¶lnych." + +#~ msgid "" +#~ "``%s'' has been modified.\n" +#~ "\n" +#~ "Do you wish to save it?" +#~ msgstr "" +#~ "Plik \"%s\" zosta³ zmodyfikowany.\n" +#~ "\n" +#~ "Czy chcesz go zapisaæ?" + +#~ msgid "Close / Save label as" +#~ msgstr "Zamyka / Zapisuje etykietê jako" + +#~ msgid "Label no longer valid!" +#~ msgstr "Etykieta nie jest ju¿ poprawna!" + +#~ msgid "Error writing file" +#~ msgstr "B³±d podczas zapisu pliku" + +#~ msgid "Edit properties..." +#~ msgstr "Modyfikuj w³a¶ciwo¶ci..." + +#~ msgid "Appearance" +#~ msgstr "Wygl±d" + +#~ msgid "Position/Size" +#~ msgstr "Pozycja/Rozmiar" + +#~ msgid "Image format not currently supported" +#~ msgstr "Format obrazu aktualnie nie jest obs³ugiwany" + +#~ msgid "Barcode data" +#~ msgstr "Dane kodu paskowego" + +#~ msgid "%" +#~ msgstr "%" + +#~ msgid "Show text with barcode" +#~ msgstr "Wy¶wietlanie tekstu z kodem paskowym" + +#~ msgid "Fields" +#~ msgstr "Pola" + +#~ msgid "Column" +#~ msgstr "Kolumna" + +#~ msgid "Sample data" +#~ msgstr "Próbne dane" + +#~ msgid "Make a new, empty label" +#~ msgstr "Tworzy now±, pust± etykietê" + +#~ msgid " New " +#~ msgstr " Nowa " + +#~ msgid "New Label/Card" +#~ msgstr "Nowa Etykieta/Karta" + +#~ msgid " Open " +#~ msgstr " Otwórz " + +#~ msgid " Save " +#~ msgstr " Zapisz " + +#~ msgid " Print " +#~ msgstr " Wydrukuj " + +#~ msgid "Function is not implemented!" +#~ msgstr "Funkcja nie jest zaimplementowana!" diff --git a/po/pt_BR.po b/po/pt_BR.po new file mode 100644 index 00000000..2c1568eb --- /dev/null +++ b/po/pt_BR.po @@ -0,0 +1,2624 @@ +# Brazilian Portuguese translation of Glabels. +# Copyright (C) 2001 Jim Evins +# Paulo R. Ormenese , 2001. +# +msgid "" +msgstr "" +"Project-Id-Version: glabels 1.91.0\n" +"POT-Creation-Date: 2004-08-08 00:43-0400\n" +"PO-Revision-Date: 2003-01-03 23:15-0300\n" +"Last-Translator: Paulo R. Ormenese \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.c:55 +msgid "Show view debugging messages." +msgstr "Exibe mensagens de depuração de visualização." + +#: src/glabels.c:58 +msgid "Show item debugging messages." +msgstr "Exibe mensagens de depuração de item." + +#: src/glabels.c:61 +msgid "Show printing debugging messages." +msgstr "Exibe mensagens de depuração de impressão." + +#: src/glabels.c:64 +msgid "Show prefs debugging messages." +msgstr "Exibe mensagens de depuração de preferências." + +#: src/glabels.c:67 +msgid "Show file debugging messages." +msgstr "Exibe mensagens de depuração de arquivo." + +#: src/glabels.c:70 +msgid "Show document debugging messages." +msgstr "Exibe mensagens de depuração de documeto." + +#: src/glabels.c:73 +msgid "Show template debugging messages." +msgstr "Exibe mensagens de depuração de modelo." + +#: src/glabels.c:76 +#, fuzzy +msgid "Show paper debugging messages." +msgstr "Exibe mensagens de depuração de preferências." + +#: src/glabels.c:79 +msgid "Show xml debugging messages." +msgstr "Exibe mensagens de depuração de xml." + +#: src/glabels.c:82 +msgid "Show document merge debugging messages." +msgstr "Exibe mensagens de depuração de fusão de documento." + +#: src/glabels.c:85 +msgid "Show commands debugging messages." +msgstr "Exibe mensagens de depuração de comandos." + +#: src/glabels.c:88 +msgid "Show undo debugging messages." +msgstr "Exibe mensagens de depuração de desfazer." + +#: src/glabels.c:91 +msgid "Show recent debugging messages." +msgstr "Exibe mensagens de depuração de recentes" + +#: src/glabels.c:94 +msgid "Show window debugging messages." +msgstr "Exibe mensagens de depuração de janela." + +#: src/glabels.c:97 +msgid "Show ui debugging messages." +msgstr "Exibe mensagens de depuração de ui." + +#: src/glabels.c:100 +#, fuzzy +msgid "Show property_bar debugging messages." +msgstr "Exibe mensagens de depuração de preferências." + +#: src/glabels.c:103 +msgid "Show media select widget debugging messages." +msgstr "Exibe mensagens de depuração de widget de seleção de mídia." + +#: src/glabels.c:106 +msgid "Show mini preview widget debugging messages." +msgstr "Exibe mensagens de depuração de widget de mini previsão." + +#: src/glabels.c:109 +#, fuzzy +msgid "Show pixbuf cache debugging messages." +msgstr "Exibe mensagens de depuração de visualização." + +#: src/glabels.c:112 +msgid "Show widget debugging messages." +msgstr "Exibe mensagens de depuração de widget." + +#: src/glabels.c:115 +#, fuzzy +msgid "Show object editor debugging messages." +msgstr "Exibe mensagens de depuração de recentes" + +#: src/glabels.c:118 +msgid "Turn on all debugging messages." +msgstr "Ativa todas as mensagens de depuração." + +#: src/glabels.c:187 +msgid "Could not initialize Bonobo!\n" +msgstr "Impossível inicializar Bonobo!\n" + +#: src/glabels-batch.c:48 +msgid "print this message" +msgstr "mostra esta mensagem" + +#: src/glabels-batch.c:50 +msgid "print the version of glabels-batch being used" +msgstr "mostra a versão de glabels-batch que está sendo usada" + +#: src/glabels-batch.c:52 +msgid "set output filename (default=\"output.ps\")" +msgstr "define o nome do arquivo de saída (padrão=\"output.ps\")" + +#: src/glabels-batch.c:52 +msgid "filename" +msgstr "nome_de_arquivo" + +#: src/glabels-batch.c:54 +msgid "number of sheets (default=1)" +msgstr "número de páginas (padrão=1)" + +#: src/glabels-batch.c:54 +msgid "sheets" +msgstr "páginas" + +#: src/glabels-batch.c:56 +msgid "number of copies (default=1)" +msgstr "número de cópias (padrão=1)" + +#: src/glabels-batch.c:56 +msgid "copies" +msgstr "cópias" + +#: src/glabels-batch.c:58 src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "imprimir contornos (testar alinhamento da impressora)" + +#: src/glabels-batch.c:60 src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "imprimir ao contrário (como uma imagem de espelho)" + +#: src/glabels-batch.c:96 +msgid "[OPTION...] GLABELS_FILE..." +msgstr "[OPÇÃO...] ARQUIVO_GLABELS..." + +#: src/glabels-batch.c:116 +msgid "missing glabels file\n" +msgstr "faltando arquivo glabels\n" + +#: src/glabels-batch.c:157 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "impossível abrir o arquivo glabels %s\n" + +#: src/window.c:244 +msgid "(none) - gLabels" +msgstr "(sem nome) - gLabels" + +#: src/window.c:414 +msgid "(modified)" +msgstr "(modificado)" + +#: src/stock.c:65 data/ui/glabels-ui.xml.h:165 +msgid "_Select Mode" +msgstr "_Selecionar Modo" + +#: src/stock.c:66 data/ui/glabels-ui.xml.h:166 +msgid "_Text" +msgstr "_Texto" + +#: src/stock.c:67 data/ui/glabels-ui.xml.h:151 +msgid "_Line" +msgstr "_Linha" + +#: src/stock.c:68 data/ui/glabels-ui.xml.h:133 +msgid "_Box" +msgstr "_Caixa" + +#: src/stock.c:69 data/ui/glabels-ui.xml.h:144 +msgid "_Ellipse" +msgstr "_Elipse" + +#: src/stock.c:70 data/ui/glabels-ui.xml.h:149 +msgid "_Image" +msgstr "_Imagem" + +#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 +msgid "Bar_code" +msgstr "_Código barras" + +#: src/stock.c:72 +msgid "_Merge Properties" +msgstr "Propriedades de _Fusão" + +#: src/stock.c:73 +msgid "Object _Properties" +msgstr "_Propriedades de Objeto" + +#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 +msgid "Bring to _Front" +msgstr "Trazer para _Frente" + +#: src/stock.c:75 data/ui/glabels-ui.xml.h:110 +msgid "Send to _Back" +msgstr "Enviar para _trás" + +#: src/stock.c:76 data/ui/glabels-ui.xml.h:97 +msgid "Rotate _Left" +msgstr "Girar _Esquerda" + +#: src/stock.c:77 data/ui/glabels-ui.xml.h:98 +msgid "Rotate _Right" +msgstr "Girar _Direita" + +#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "Refletir _Horizontalmente" + +#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "Refletir _Verticalmente" + +#: src/stock.c:80 data/ui/glabels-ui.xml.h:150 +msgid "_Lefts" +msgstr "_Esquerdas" + +#: src/stock.c:81 data/ui/glabels-ui.xml.h:162 +msgid "_Rights" +msgstr "_Direitas" + +#: src/stock.c:82 data/ui/glabels-ui.xml.h:134 +msgid "_Centers" +msgstr "C_entros" + +#: src/stock.c:83 data/ui/glabels-ui.xml.h:167 +msgid "_Tops" +msgstr "_Topos" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "Bases" + +#: src/stock.c:85 +msgid "Centers" +msgstr "Centros" + +#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "Ce_ntro Etiqueta" + +#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "" + +#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "" + +#: src/stock.c:90 src/stock.c:92 +#, fuzzy +msgid "Linked" +msgstr "Linha" + +#: src/stock.c:91 src/stock.c:93 +#, fuzzy +msgid "Not Linked" +msgstr "Nenhum" + +#: src/ui-property-bar.c:345 src/object-editor.c:499 +#, fuzzy +msgid "Default" +msgstr "Apagar" + +#: src/ui-property-bar.c:360 src/object-editor.c:512 +msgid "No fill" +msgstr "" + +#: src/ui-property-bar.c:375 src/object-editor.c:505 +#, fuzzy +msgid "No line" +msgstr "Nenhum" + +#: src/ui-sidebar.c:180 +#, fuzzy +msgid "Object properties" +msgstr "_Propriedades de Objeto" + +#: src/commands.c:385 +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/commands.c:399 +msgid "See the file AUTHORS for additional credits," +msgstr "Veja o arquivo AUTHORS para ver créditos adicionais," + +#: src/commands.c:400 +#, fuzzy +msgid "or visit http://glabels.sourceforge.net/" +msgstr "ou visite http://snaught.com/glabels" + +#: src/commands.c:409 +msgid " " +msgstr "" + +#: src/commands.c:424 +msgid "glabels" +msgstr "glabels" + +#: src/file.c:100 +msgid "New Label or Card" +msgstr "Nova Etiqueta ou Cartão" + +#: src/file.c:132 src/file.c:304 +msgid "Media Type" +msgstr "Tipo de mídia" + +#: src/file.c:138 src/file.c:310 +msgid "Label orientation" +msgstr "Orientação da etiqueta" + +#: src/file.c:269 +#, fuzzy +msgid "Label properties" +msgstr "_Propriedades de Objeto" + +#: src/file.c:452 src/file.c:870 +msgid "All files" +msgstr "" + +#: src/file.c:457 src/file.c:875 +#, fuzzy +msgid "gLabels documents" +msgstr "Preferências do gLabels" + +#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 +msgid "Empty file name selection" +msgstr "Seleção de nome de arquivo vazia" + +#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 +msgid "Please select a file or supply a valid file name" +msgstr "Por favor, selecione um arquivo ou forneça um nome de arquivo válido" + +#: src/file.c:519 src/file.c:631 +msgid "File does not exist" +msgstr "Arquivo inexistente" + +#: src/file.c:563 data/ui/glabels-ui.xml.h:75 +msgid "Open" +msgstr "Abrir" + +#: src/file.c:565 +msgid "Open label" +msgstr "Abrir etiqueta" + +#: src/file.c:707 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "Impossível abrir o arquivo \"%s\"" + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "Formato de arquivo não suportado" + +#: src/file.c:797 src/file.c:979 src/file.c:1174 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "Impossível salvar o arquivo \"%s\"" + +#: src/file.c:805 src/file.c:987 src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "Erro encontrado ao salvar. O arquivo ainda não foi salvo." + +#: src/file.c:848 src/file.c:1048 +#, c-format +msgid "Save \"%s\" as" +msgstr "Salvar \"%s\" como" + +#: src/file.c:935 src/file.c:1131 +msgid "Please supply a valid file name" +msgstr "Por favor, forneça um nome de arquivo válido" + +#: src/file.c:952 src/file.c:1147 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "Sobrescrever o arquivo \"%s\"?" + +#: src/file.c:960 src/file.c:1155 +msgid "File already exists." +msgstr "O arquivo já existe." + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "Salvar modificações no documento \"%s\" antes de fechar?" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "Suas modificações serão perdidas se você não salvá-las." + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "Fechar sem salvar" + +#. Should not happen +#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 +#: data/glade/object-editor.glade.h:37 +msgid "points" +msgstr "pontos" + +#: src/prefs.c:158 data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "poleg." + +#: src/prefs.c:160 +msgid "mm" +msgstr "mm" + +#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 +msgid "gLabels Preferences" +msgstr "Preferências do gLabels" + +#. +#. * Submenu: Order +#. +#: src/view.c:3570 data/ui/glabels-ui.xml.h:157 +msgid "_Order" +msgstr "_Ordenar" + +#. +#. * Submenu: Rotate/Flip +#. +#: src/view.c:3591 data/ui/glabels-ui.xml.h:163 +msgid "_Rotate/Flip" +msgstr "_Girar/Refletir" + +#. +#. * Submenu: Align Horizontally +#. +#: src/view.c:3624 +msgid "Align _Horizontally" +msgstr "Alinhar _Horizontalmente" + +#. +#. * Submenu: Align Vertically +#. +#: src/view.c:3663 +msgid "Align _Vertically" +msgstr "Alinhar _Verticalmente" + +#: src/view.c:3724 data/ui/glabels-ui.xml.h:140 +msgid "_Delete" +msgstr "_Apagar" + +#. Build editor. +#: src/view-box.c:223 +#, fuzzy +msgid "Box object properties" +msgstr "Editar propriedades do objeto caixa" + +#. Build editor. +#: src/view-ellipse.c:223 +#, fuzzy +msgid "Ellipse object properties" +msgstr "Editar propriedades do objeto elipse" + +#. Build editor. +#: src/view-line.c:223 +#, fuzzy +msgid "Line object properties" +msgstr "Edita propriedades do objeto" + +#. Build editor. +#: src/view-image.c:222 +#, fuzzy +msgid "Image object properties" +msgstr "Editar propriedades do objeto imagem" + +#. Build editor. +#: src/view-text.c:250 +#, fuzzy +msgid "Text object properties" +msgstr "Edita propriedades do objeto" + +#: src/view-text.c:562 data/glade/object-editor.glade.h:28 +msgid "Text" +msgstr "Texto" + +#. Build editor. +#: src/view-barcode.c:209 +#, fuzzy +msgid "Barcode object properties" +msgstr "Editar propriedades do objeto código de barras" + +#: src/view-barcode.c:579 src/print.c:1088 +#, fuzzy +msgid "Invalid barcode data" +msgstr "Código de barras inválido" + +#: src/merge-properties-dialog.c:231 +msgid "Merge Properties" +msgstr "Propriedades de Fusão" + +#. ---- Source section ---- +#: src/merge-properties-dialog.c:237 +msgid "Source" +msgstr "Fonte" + +#: src/merge-properties-dialog.c:245 +msgid "Format:" +msgstr "Formato:" + +#. Location line +#: src/merge-properties-dialog.c:273 +msgid "Location:" +msgstr "Localização" + +#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 +msgid "Select merge-database source" +msgstr "Selecione a fonte da base de dados da fusão" + +#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 +msgid "N/A" +msgstr "Não definido" + +#. ---- Sample Fields section ---- +#: src/merge-properties-dialog.c:300 +msgid "Record selection/preview:" +msgstr "Seleção/previsão de registro:" + +#: src/merge-properties-dialog.c:326 +msgid "Select" +msgstr "Selecionar" + +#: src/merge-properties-dialog.c:334 +msgid "Record/Field" +msgstr "Registro/Campo" + +#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 +msgid "Data" +msgstr "Dado" + +#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:82 +msgid "Print" +msgstr "Imprimir" + +#: src/print-dialog.c:281 +msgid "_Job" +msgstr "_Trabalho" + +#: src/print-dialog.c:286 +msgid "P_rinter" +msgstr "Imp_ressora" + +#. ----------- Add simple-copies widget ------------ +#: src/print-dialog.c:314 +msgid "Copies" +msgstr "Cópias" + +#. ------- Add merge control widget ------------ +#: src/print-dialog.c:322 +msgid "Document merge control" +msgstr "Controle de fusão do documento" + +#. ----------- Add custom print options area ------------ +#: src/print-dialog.c:330 +msgid "Options" +msgstr "Opções" + +#: src/print-dialog.c:351 +msgid "print crop marks" +msgstr "" + +#: src/print-dialog.c:553 src/print-dialog.c:592 +msgid "Print preview" +msgstr "Visualizar impressão" + +#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 +msgid "gLabels Template Designer" +msgstr "" + +#: src/bc.c:60 +msgid "POSTNET (any)" +msgstr "" + +#: src/bc.c:63 +msgid "POSTNET-5 (ZIP only)" +msgstr "" + +#: src/bc.c:66 +msgid "POSTNET-9 (ZIP+4)" +msgstr "" + +#: src/bc.c:69 +msgid "POSTNET-11 (DPBC)" +msgstr "" + +#: src/bc.c:72 +msgid "EAN (any)" +msgstr "" + +#: src/bc.c:75 +msgid "EAN-8" +msgstr "" + +#: src/bc.c:78 +msgid "EAN-8 +2" +msgstr "" + +#: src/bc.c:81 +msgid "EAN-8 +5" +msgstr "" + +#: src/bc.c:84 +msgid "EAN-13" +msgstr "" + +#: src/bc.c:87 +msgid "EAN-13 +2" +msgstr "" + +#: src/bc.c:90 +msgid "EAN-13 +5" +msgstr "" + +#: src/bc.c:93 +msgid "UPC (UPC-A or UPC-E)" +msgstr "" + +#: src/bc.c:96 +msgid "UPC-A" +msgstr "" + +#: src/bc.c:99 +msgid "UPC-A +2" +msgstr "" + +#: src/bc.c:102 +msgid "UPC-A +5" +msgstr "" + +#: src/bc.c:105 +msgid "UPC-E" +msgstr "" + +#: src/bc.c:108 +msgid "UPC-E +2" +msgstr "" + +#: src/bc.c:111 +msgid "UPC-E +5" +msgstr "" + +#: src/bc.c:114 +msgid "ISBN" +msgstr "" + +#: src/bc.c:117 +msgid "ISBN +5" +msgstr "" + +#: src/bc.c:120 +msgid "Code 39" +msgstr "" + +#: src/bc.c:123 +msgid "Code 128" +msgstr "" + +#: src/bc.c:126 +msgid "Code 128C" +msgstr "" + +#: src/bc.c:129 +msgid "Code 128B" +msgstr "" + +#: src/bc.c:132 +msgid "Interleaved 2 of 5" +msgstr "" + +#: src/bc.c:135 +msgid "Codabar" +msgstr "" + +#: src/bc.c:138 +msgid "MSI" +msgstr "" + +#: src/bc.c:141 +msgid "Plessey" +msgstr "" + +#: src/label.c:569 +msgid "Untitled" +msgstr "Sem_título" + +#: src/xml-label.c:176 src/xml-label.c:213 +msgid "xmlParseFile error" +msgstr "erro: xmlParseFile" + +#: src/xml-label.c:250 +msgid "No document root" +msgstr "Sem raiz do documento" + +#: src/xml-label.c:264 +msgid "Importing from glabels 0.1 format" +msgstr "Importando do formato do glabels 0.1" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "Importando do formato do glabels 0.4" + +#: src/xml-label.c:279 +#, fuzzy +msgid "Importing from glabels 1.91 format" +msgstr "Importando do formato do glabels 0.1" + +#: src/xml-label.c:282 +msgid "bad document, unknown glabels Namespace" +msgstr "documento ruim, espaço de nome glabels não encontrado" + +#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "Nó raiz ruim = \"%s\"" + +#: src/xml-label.c:348 src/xml-label-191.c:165 +#, fuzzy, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "Nó raiz ruim = \"%s\"" + +#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "nó ruim = \"%s\"" + +#: src/xml-label.c:796 src/xml-label-191.c:605 +#, fuzzy, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "nó ruim = \"%s\"" + +#: src/xml-label.c:962 libglabels/xml-template.c:528 +msgid "Utf8 conversion error." +msgstr "" + +#: src/xml-label.c:969 libglabels/xml-template.c:535 +msgid "Problem saving xml file." +msgstr "Problema salvando arquivo xml." + +#. This should always be an id, but just in case a name +#. slips by! +#: src/xml-label-191.c:680 libglabels/xml-template.c:192 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "" + +#: src/xml-label-191.c:690 libglabels/xml-template.c:202 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "" + +#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 +msgid "None" +msgstr "Nenhum" + +#: src/merge-init.c:53 +msgid "Text file with comma delimeters (CSV)" +msgstr "Arquivo texto separado com vírgulas (CSV)" + +#: src/merge-init.c:60 +msgid "Text file with colon delimeters" +msgstr "Arquivo texto separado com dois pontos" + +#: src/merge-init.c:67 +msgid "Text file with tab delimeters" +msgstr "Arquivo texto separado com tab" + +#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 +msgid "File:" +msgstr "Arquivo:" + +#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 +msgid "Key:" +msgstr "Chave:" + +#: src/wdgt-print-copies.c:179 +msgid "Sheets:" +msgstr "Páginas:" + +#: src/wdgt-print-copies.c:197 +msgid "Labels" +msgstr "Etiquetas" + +#: src/wdgt-print-copies.c:200 +msgid "from:" +msgstr "de:" + +#: src/wdgt-print-copies.c:207 +msgid "to:" +msgstr "até:" + +#: src/wdgt-print-merge.c:178 +msgid "Start on label" +msgstr "Iniciar na etiqueta" + +#: src/wdgt-print-merge.c:186 +msgid "on 1st sheet" +msgstr "na primeira folha" + +#: src/wdgt-print-merge.c:195 +msgid "Copies:" +msgstr "Cópias:" + +#: src/wdgt-print-merge.c:201 +msgid "Collate" +msgstr "Ordenar" + +#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 +msgid "Description:" +msgstr "Descrição:" + +#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 +msgid "Page size:" +msgstr "Tamanho da página:" + +#: src/wdgt-media-select.c:290 +msgid "Label size:" +msgstr "Tamanho da etiqueta:" + +#: src/wdgt-media-select.c:301 +msgid "Layout:" +msgstr "Disposição:" + +#: src/wdgt-media-select.c:578 +#, c-format +msgid "%d x %d (%d per sheet)" +msgstr "%d x %d (%d por página)" + +#: src/wdgt-media-select.c:582 +#, c-format +msgid "%d per sheet" +msgstr "%d por página" + +#: src/wdgt-media-select.c:614 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: src/wdgt-media-select.c:619 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s diâmetro" + +#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s diâmetro" + +#: src/wdgt-rotate-label.c:193 +msgid "Rotate" +msgstr "Girar" + +#. This is the default custom color +#: src/mygal/color-palette.c:396 +#, fuzzy +msgid "custom" +msgstr "Personalizar" + +#. "Custom" color - we'll pop up a GnomeColorPicker +#: src/mygal/color-palette.c:438 +#, fuzzy +msgid "Custom Color:" +msgstr "Personaliza barras de ferramentas" + +#: src/mygal/color-palette.c:446 +msgid "Choose Custom Color" +msgstr "" + +#: src/mygal/color-palette.c:579 +msgid "black" +msgstr "" + +#: src/mygal/color-palette.c:580 +msgid "light brown" +msgstr "" + +#: src/mygal/color-palette.c:581 +msgid "brown gold" +msgstr "" + +#: src/mygal/color-palette.c:582 +msgid "dark green #2" +msgstr "" + +#: src/mygal/color-palette.c:583 +msgid "navy" +msgstr "" + +#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 +msgid "dark blue" +msgstr "" + +#: src/mygal/color-palette.c:585 +msgid "purple #2" +msgstr "" + +#: src/mygal/color-palette.c:586 +msgid "very dark gray" +msgstr "" + +#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 +msgid "dark red" +msgstr "" + +#: src/mygal/color-palette.c:590 +msgid "red-orange" +msgstr "" + +#: src/mygal/color-palette.c:591 +msgid "gold" +msgstr "" + +#: src/mygal/color-palette.c:592 +msgid "dark green" +msgstr "" + +#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 +msgid "dull blue" +msgstr "" + +#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 +msgid "blue" +msgstr "" + +#: src/mygal/color-palette.c:595 +msgid "dull purple" +msgstr "" + +#: src/mygal/color-palette.c:596 +msgid "dark grey" +msgstr "" + +#: src/mygal/color-palette.c:599 +msgid "red" +msgstr "" + +#: src/mygal/color-palette.c:600 +msgid "orange" +msgstr "" + +#: src/mygal/color-palette.c:601 +msgid "lime" +msgstr "" + +#: src/mygal/color-palette.c:602 +msgid "dull green" +msgstr "" + +#: src/mygal/color-palette.c:603 +msgid "dull blue #2" +msgstr "" + +#: src/mygal/color-palette.c:604 +msgid "sky blue #2" +msgstr "" + +#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 +msgid "purple" +msgstr "" + +#: src/mygal/color-palette.c:606 +msgid "gray" +msgstr "" + +#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 +#, fuzzy +msgid "magenta" +msgstr "Imagem" + +#: src/mygal/color-palette.c:610 +msgid "bright orange" +msgstr "" + +#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 +msgid "yellow" +msgstr "" + +#: src/mygal/color-palette.c:612 +#, fuzzy +msgid "green" +msgstr "graus" + +#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 +msgid "cyan" +msgstr "" + +#: src/mygal/color-palette.c:614 +msgid "bright blue" +msgstr "" + +#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 +msgid "red purple" +msgstr "" + +#: src/mygal/color-palette.c:616 +msgid "light grey" +msgstr "" + +#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 +msgid "pink" +msgstr "" + +#: src/mygal/color-palette.c:620 +msgid "light orange" +msgstr "" + +#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 +msgid "light yellow" +msgstr "" + +#: src/mygal/color-palette.c:622 +msgid "light green" +msgstr "" + +#: src/mygal/color-palette.c:623 +msgid "light cyan" +msgstr "" + +#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 +msgid "light blue" +msgstr "" + +#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 +msgid "light purple" +msgstr "" + +#: src/mygal/color-palette.c:626 +msgid "white" +msgstr "" + +#: src/mygal/color-palette.c:631 +msgid "purplish blue" +msgstr "" + +#: src/mygal/color-palette.c:635 +msgid "dark purple" +msgstr "" + +#: src/mygal/color-palette.c:637 +msgid "sky blue" +msgstr "" + +#: libglabels/template.c:848 +#, c-format +msgid "Generic %s full page" +msgstr "Página completa %s genérico" + +#: libglabels/template.c:897 +msgid "No template files found!" +msgstr "Nenhum arquivo modelo encontrado!" + +#. Create and append an "Other" entry. +#: libglabels/paper.c:67 +msgid "Other" +msgstr "" + +#: libglabels/paper.c:361 +#, fuzzy +msgid "No paper files found!" +msgstr "Nenhum arquivo modelo encontrado!" + +#: data/ui/glabels-ui.xml.h:1 +msgid "About glabels" +msgstr "Sobre glabels" + +#: data/ui/glabels-ui.xml.h:2 +msgid "About..." +msgstr "Sobre..." + +#: data/ui/glabels-ui.xml.h:3 +msgid "Align _Horizontal" +msgstr "Alinhar _Horizontal" + +#: data/ui/glabels-ui.xml.h:4 +msgid "Align _Vertical" +msgstr "Alinhar _Vertical" + +#: data/ui/glabels-ui.xml.h:5 +msgid "Align objects to bottoms" +msgstr "Alinha objetos pelas bases" + +#: data/ui/glabels-ui.xml.h:6 +msgid "Align objects to horizontal centers" +msgstr "Alinha objetos pelos centros horizontais" + +#: data/ui/glabels-ui.xml.h:7 +msgid "Align objects to left edges" +msgstr "Alinha objetos pelas bordas esquerdas" + +#: data/ui/glabels-ui.xml.h:8 +msgid "Align objects to right edges" +msgstr "Alinha objetos pelas bordas direitas" + +#: data/ui/glabels-ui.xml.h:9 +msgid "Align objects to tops" +msgstr "Alinha objetos pelos topos" + +#: data/ui/glabels-ui.xml.h:10 +msgid "Align objects to vertical centers" +msgstr "Alinha objetos pelos centros verticais" + +#: data/ui/glabels-ui.xml.h:12 +msgid "Bold" +msgstr "" + +#: data/ui/glabels-ui.xml.h:14 +#, fuzzy +msgid "Center align" +msgstr "Centros" + +#: data/ui/glabels-ui.xml.h:15 +msgid "Center objects to horizontal label center" +msgstr "Centra objetos no centro horizontal da etiqueta" + +#: data/ui/glabels-ui.xml.h:16 +msgid "Center objects to vertical label center" +msgstr "Centra objetos no centro vertical da etiqueta" + +#: data/ui/glabels-ui.xml.h:17 +msgid "Change the visibility of markup lines in the current window" +msgstr "Muda a visibilidade das linhas de marcação na janela atual" + +#: data/ui/glabels-ui.xml.h:18 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "Muda a visibilidade da barra de ferramentas de desenho na janela atual" + +#: data/ui/glabels-ui.xml.h:19 +msgid "Change the visibility of the grid in the current window" +msgstr "Muda a visibilidade da grade na janela atual" + +#: data/ui/glabels-ui.xml.h:20 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "Muda a visibilidade da barra de ferramentas principal na janela atual" + +#: data/ui/glabels-ui.xml.h:21 +#, fuzzy +msgid "Change the visibility of the property toolbar in the current window" +msgstr "Muda a visibilidade da barra de ferramentas principal na janela atual" + +#: data/ui/glabels-ui.xml.h:22 +msgid "Close" +msgstr "Fechar" + +#: data/ui/glabels-ui.xml.h:23 +msgid "Close the current file" +msgstr "Fechar o arquivo atual" + +#: data/ui/glabels-ui.xml.h:24 +msgid "Configure the application" +msgstr "Configurar a aplicação" + +#: data/ui/glabels-ui.xml.h:25 +msgid "Contents" +msgstr "Conteúdo" + +#: data/ui/glabels-ui.xml.h:26 +msgid "Copy" +msgstr "Copiar" + +#: data/ui/glabels-ui.xml.h:27 +msgid "Copy the selection" +msgstr "Copia a seleção" + +#: data/ui/glabels-ui.xml.h:28 +#, fuzzy +msgid "Create a custom template" +msgstr "Cria um novo documento" + +#: data/ui/glabels-ui.xml.h:29 +msgid "Create a new document" +msgstr "Cria um novo documento" + +#: data/ui/glabels-ui.xml.h:30 +msgid "Create barcode object" +msgstr "Criar objeto código de barras" + +#: data/ui/glabels-ui.xml.h:31 +msgid "Create box/rectangle object" +msgstr "Criar objeto caixa/retângulo" + +#: data/ui/glabels-ui.xml.h:32 +msgid "Create ellipse/circle object" +msgstr "Criar objeto elipse/círculo" + +#: data/ui/glabels-ui.xml.h:33 +msgid "Create image object" +msgstr "Criar objeto imagem" + +#: data/ui/glabels-ui.xml.h:34 +msgid "Create line object" +msgstr "Criar objeto linha" + +#: data/ui/glabels-ui.xml.h:35 +msgid "Create text object" +msgstr "Criar objeto texto" + +#: data/ui/glabels-ui.xml.h:36 +msgid "Cu_t" +msgstr "Cor_tar" + +#: data/ui/glabels-ui.xml.h:37 +msgid "Customize" +msgstr "Personalizar" + +#: data/ui/glabels-ui.xml.h:38 +msgid "Customize Drawing Toolbar" +msgstr "Personaliza barra de ferramentas de desenho" + +#: data/ui/glabels-ui.xml.h:39 +msgid "Customize Main Toolbar" +msgstr "Personaliza barra de ferramentas principal" + +#: data/ui/glabels-ui.xml.h:40 +#, fuzzy +msgid "Customize Property Toolbar" +msgstr "Personaliza barras de ferramentas" + +#: data/ui/glabels-ui.xml.h:41 +msgid "Customize toolbars" +msgstr "Personaliza barras de ferramentas" + +#: data/ui/glabels-ui.xml.h:42 +msgid "Cut" +msgstr "Cortar" + +#: data/ui/glabels-ui.xml.h:43 +msgid "Cut the selection" +msgstr "Corta a seleção" + +#: data/ui/glabels-ui.xml.h:44 +msgid "Decrease magnification" +msgstr "Diminuir aumento" + +#: data/ui/glabels-ui.xml.h:45 +msgid "Delete" +msgstr "Apagar" + +#: data/ui/glabels-ui.xml.h:46 +msgid "Delete the selected objects" +msgstr "Apaga os objetos selecionados" + +#: data/ui/glabels-ui.xml.h:47 +msgid "Drawing toolbar" +msgstr "Barra de ferramentas de desenho" + +#: data/ui/glabels-ui.xml.h:48 +msgid "Dump XML" +msgstr "Descarregar XML" + +#: data/ui/glabels-ui.xml.h:49 +msgid "Dump the UI Xml description" +msgstr "Descarrega a descrição da UI Xml" + +#: data/ui/glabels-ui.xml.h:50 +msgid "Edit merge properties" +msgstr "Editar propriedades de fusão" + +#: data/ui/glabels-ui.xml.h:54 +msgid "Flip object horizontally" +msgstr "Reflete objeto horizontalmente" + +#: data/ui/glabels-ui.xml.h:55 +msgid "Flip object vertically" +msgstr "Reflete objeto verticalmente" + +#: data/ui/glabels-ui.xml.h:56 +#, fuzzy +msgid "Font name" +msgstr "Não salve" + +#: data/ui/glabels-ui.xml.h:57 +#, fuzzy +msgid "Font selector" +msgstr "Copia a seleção" + +#: data/ui/glabels-ui.xml.h:58 +#, fuzzy +msgid "Font size" +msgstr "Não salve" + +#: data/ui/glabels-ui.xml.h:59 +msgid "Icon and _Text" +msgstr "Ícone e _Texto" + +#: data/ui/glabels-ui.xml.h:60 +msgid "Increase magnification" +msgstr "Aumentar aumento" + +#: data/ui/glabels-ui.xml.h:61 +msgid "Italic" +msgstr "" + +#: data/ui/glabels-ui.xml.h:63 +msgid "Left align" +msgstr "" + +#: data/ui/glabels-ui.xml.h:65 +msgid "Line width" +msgstr "" + +#: data/ui/glabels-ui.xml.h:66 +msgid "Lower object to bottom" +msgstr "Abaixa objeto à base" + +#: data/ui/glabels-ui.xml.h:67 +msgid "M_arkup" +msgstr "M_arcação" + +#: data/ui/glabels-ui.xml.h:68 +msgid "Main toolbar" +msgstr "Barra de ferramentas principal" + +#: data/ui/glabels-ui.xml.h:69 +msgid "Markup" +msgstr "Marcação" + +#: data/ui/glabels-ui.xml.h:70 +#, fuzzy +msgid "Modify document properties" +msgstr "Editar propriedades de fusão do documento" + +#: data/ui/glabels-ui.xml.h:71 +msgid "New" +msgstr "Novo" + +#: data/ui/glabels-ui.xml.h:72 +#, fuzzy +msgid "Object property editor" +msgstr "_Propriedades de Objeto" + +#: data/ui/glabels-ui.xml.h:73 +msgid "Only show icons in the drawing toolbar" +msgstr "Exibe somente ícones na barra de ferramentas de desenho" + +#: data/ui/glabels-ui.xml.h:74 +msgid "Only show icons in the main toolbar" +msgstr "Exibe somente ícones na barra de ferramentas principal" + +#: data/ui/glabels-ui.xml.h:76 +msgid "Open a file" +msgstr "Abrir um arquivo" + +#: data/ui/glabels-ui.xml.h:77 +msgid "Open the glabels manual" +msgstr "Abre o manual do glabels" + +#: data/ui/glabels-ui.xml.h:78 +msgid "Paste" +msgstr "Colar" + +#: data/ui/glabels-ui.xml.h:79 +msgid "Paste the clipboard" +msgstr "Cola a área de transferência" + +#: data/ui/glabels-ui.xml.h:80 +msgid "Pr_eferences..." +msgstr "Pr_eferências..." + +#: data/ui/glabels-ui.xml.h:81 +msgid "Preferences" +msgstr "Preferências" + +#: data/ui/glabels-ui.xml.h:83 +msgid "Print the current file" +msgstr "Imprime o arquivo atual" + +#: data/ui/glabels-ui.xml.h:84 +#, fuzzy +msgid "Proper_ties..." +msgstr "Propriedades" + +#: data/ui/glabels-ui.xml.h:85 +msgid "Properties" +msgstr "Propriedades" + +#: data/ui/glabels-ui.xml.h:86 +msgid "Property toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:87 +msgid "Quit" +msgstr "Sair" + +#: data/ui/glabels-ui.xml.h:88 +msgid "Quit the program" +msgstr "Sai do programa" + +#: data/ui/glabels-ui.xml.h:89 +msgid "Raise object to top" +msgstr "Sobe objetos ao topo" + +#: data/ui/glabels-ui.xml.h:90 +msgid "Recent _Files" +msgstr "_Arquivos recentes" + +#: data/ui/glabels-ui.xml.h:91 +msgid "Redo" +msgstr "Refazer" + +#: data/ui/glabels-ui.xml.h:92 +msgid "Redo the undone action" +msgstr "Refaz a ação desfeita" + +#: data/ui/glabels-ui.xml.h:93 +msgid "Remove all selections" +msgstr "Remover todas as seleções" + +#: data/ui/glabels-ui.xml.h:95 +#, no-c-format +msgid "Restore scale to 100%" +msgstr "Restaura escala para 100%" + +#: data/ui/glabels-ui.xml.h:96 +msgid "Right align" +msgstr "" + +#: data/ui/glabels-ui.xml.h:99 +msgid "Rotate object 90 clockwise" +msgstr "Gira objeto 90 sentido horário" + +#: data/ui/glabels-ui.xml.h:100 +msgid "Rotate object 90 counter-clockwise" +msgstr "Gira objeto 90 sentido anti-horário" + +#: data/ui/glabels-ui.xml.h:101 +msgid "Save" +msgstr "Salvar" + +#: data/ui/glabels-ui.xml.h:102 +msgid "Save As" +msgstr "Salvar como" + +#: data/ui/glabels-ui.xml.h:103 +msgid "Save _As..." +msgstr "Salvar _como..." + +#: data/ui/glabels-ui.xml.h:104 +msgid "Save the current file" +msgstr "Salva o arquivo atual" + +#: data/ui/glabels-ui.xml.h:105 +msgid "Save the current file with a different name" +msgstr "Salva o arquivo atual com um nome diferente" + +#: data/ui/glabels-ui.xml.h:106 +msgid "Select All" +msgstr "Selecionar Tudo" + +#: data/ui/glabels-ui.xml.h:107 +msgid "Select _All" +msgstr "Selecionar _Tudo" + +#: data/ui/glabels-ui.xml.h:108 +msgid "Select all objects" +msgstr "Seleciona todos os objetos" + +#: data/ui/glabels-ui.xml.h:109 +msgid "Select, move and modify objects" +msgstr "Seleciona, movimenta e modifica objetos" + +#: data/ui/glabels-ui.xml.h:111 +msgid "Set drawing toolbar button style according to desktop default" +msgstr "" +"Define estilo de botão da barra de ferramentas de desenho de acordo com " +"padrão do desktop" + +#: data/ui/glabels-ui.xml.h:112 +msgid "Set main toolbar button style according to desktop default" +msgstr "" +"Define estilo de botão da barra de ferramentas principal de acordo com " +"padrão do desktop" + +#: data/ui/glabels-ui.xml.h:113 +msgid "Show _Tooltips" +msgstr "Exibir _Dicas" + +#: data/ui/glabels-ui.xml.h:114 +#, fuzzy +msgid "Show both icons and texts in the drawing toolbar" +msgstr "Exibe dicas na barra de ferramentas de desenho" + +#: data/ui/glabels-ui.xml.h:115 +#, fuzzy +msgid "Show both icons and texts in the main toolbar" +msgstr "Exibe dicas na barra de ferramentas principal" + +#: data/ui/glabels-ui.xml.h:116 +msgid "Show tooltips in the drawing toolbar" +msgstr "Exibe dicas na barra de ferramentas de desenho" + +#: data/ui/glabels-ui.xml.h:117 +msgid "Show tooltips in the main toolbar" +msgstr "Exibe dicas na barra de ferramentas principal" + +#: data/ui/glabels-ui.xml.h:118 +#, fuzzy +msgid "Show tooltips in the property toolbar" +msgstr "Exibe dicas na barra de ferramentas principal" + +#: data/ui/glabels-ui.xml.h:119 +msgid "Template Designer" +msgstr "" + +#: data/ui/glabels-ui.xml.h:120 +msgid "Template _Designer..." +msgstr "" + +#: data/ui/glabels-ui.xml.h:121 +msgid "Text color" +msgstr "" + +#: data/ui/glabels-ui.xml.h:122 +msgid "U_n-select All" +msgstr "D_esmarcar Tudo" + +#: data/ui/glabels-ui.xml.h:123 +msgid "Un-select All" +msgstr "Desmarcar Tudo" + +#: data/ui/glabels-ui.xml.h:124 +msgid "Undo" +msgstr "Desfazer" + +#: data/ui/glabels-ui.xml.h:125 +msgid "Undo the last action" +msgstr "Desfaz a última ação" + +#: data/ui/glabels-ui.xml.h:126 +msgid "Zoom _1:1" +msgstr "Zoom _1:1" + +#: data/ui/glabels-ui.xml.h:127 +msgid "Zoom _In" +msgstr "M_ais Zoom" + +#: data/ui/glabels-ui.xml.h:128 +msgid "Zoom _Out" +msgstr "M_enos Zoom" + +#: data/ui/glabels-ui.xml.h:129 +#, fuzzy +msgid "Zoom to _fit" +msgstr "Zoom para 1:1" + +#: data/ui/glabels-ui.xml.h:130 +msgid "Zoom to fit window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:131 +msgid "_About..." +msgstr "_Sobre..." + +#: data/ui/glabels-ui.xml.h:132 +msgid "_Bottoms" +msgstr "_Bases" + +#: data/ui/glabels-ui.xml.h:135 +msgid "_Close" +msgstr "_Fechar" + +#: data/ui/glabels-ui.xml.h:136 +msgid "_Contents" +msgstr "_Conteúdo" + +#: data/ui/glabels-ui.xml.h:137 +msgid "_Copy" +msgstr "_Copiar" + +#: data/ui/glabels-ui.xml.h:138 +msgid "_Create Object" +msgstr "_Criar Objeto" + +#: data/ui/glabels-ui.xml.h:139 +msgid "_Debug" +msgstr "_Depurar" + +#: data/ui/glabels-ui.xml.h:141 +msgid "_Desktop Default" +msgstr "Padrão _Desktop" + +#: data/ui/glabels-ui.xml.h:142 +msgid "_Drawing Toolbar" +msgstr "Barra de _Desenho" + +#: data/ui/glabels-ui.xml.h:143 +msgid "_Edit" +msgstr "_Editar" + +#: data/ui/glabels-ui.xml.h:145 +msgid "_File" +msgstr "_Arquivo" + +#: data/ui/glabels-ui.xml.h:146 +msgid "_Grid" +msgstr "_Grade" + +#: data/ui/glabels-ui.xml.h:147 +msgid "_Help" +msgstr "A_juda" + +#: data/ui/glabels-ui.xml.h:148 +msgid "_Icon" +msgstr "_Ícone" + +#: data/ui/glabels-ui.xml.h:152 +msgid "_Main Toolbar" +msgstr "Barra _Principal" + +#: data/ui/glabels-ui.xml.h:153 +msgid "_Merge Properties..." +msgstr "Propriedades de _Fusão..." + +#: data/ui/glabels-ui.xml.h:154 +msgid "_New" +msgstr "_Novo" + +#: data/ui/glabels-ui.xml.h:155 +msgid "_Objects" +msgstr "_Objetos" + +#: data/ui/glabels-ui.xml.h:156 +msgid "_Open..." +msgstr "_Abrir..." + +#: data/ui/glabels-ui.xml.h:158 +msgid "_Paste" +msgstr "_Colar" + +#: data/ui/glabels-ui.xml.h:159 +msgid "_Print..." +msgstr "Im_primir..." + +#: data/ui/glabels-ui.xml.h:160 +#, fuzzy +msgid "_Property Toolbar" +msgstr "Barra de _Desenho" + +#: data/ui/glabels-ui.xml.h:161 +msgid "_Quit" +msgstr "_Sair" + +#: data/ui/glabels-ui.xml.h:164 +msgid "_Save" +msgstr "_Salvar" + +#: data/ui/glabels-ui.xml.h:168 +msgid "_View" +msgstr "_Visualizar" + +#: data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 +#: data/glade/template-designer.glade.h:5 +msgid "*" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:3 +msgid "Default page size" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:4 +msgid "Fill" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:5 +msgid "Line" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:6 +msgid "Text" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:7 +msgid "Units" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 +msgid "Alignment:" +msgstr "Alinhamento:" + +#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 +msgid "Color:" +msgstr "Cor:" + +#: data/glade/prefs-dialog.glade.h:10 +msgid "Font:" +msgstr "Fonte:" + +#: data/glade/prefs-dialog.glade.h:11 +msgid "ISO A4" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:12 +msgid "Inches" +msgstr "Polegadas" + +#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 +msgid "Line Spacing:" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:14 +msgid "Locale" +msgstr "Local" + +#: data/glade/prefs-dialog.glade.h:15 +msgid "Millimeters" +msgstr "Milímetros" + +#: data/glade/prefs-dialog.glade.h:16 +msgid "Object defaults" +msgstr "Padrões do objeto" + +#: data/glade/prefs-dialog.glade.h:17 +msgid "Points" +msgstr "Pontos" + +#: data/glade/prefs-dialog.glade.h:18 +msgid "Select default properties for new objects." +msgstr "Selecione as propriedades padrões para novos objetos." + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "Selecione comportamento específico do local." + +#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:25 +msgid "US Letter" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 +#: data/glade/template-designer.glade.h:72 +msgid "Width:" +msgstr "Largura:" + +#: data/glade/object-editor.glade.h:2 +msgid "00000000000 00000" +msgstr "" + +#: data/glade/object-editor.glade.h:3 +msgid "Xxx object properties" +msgstr "" + +#: data/glade/object-editor.glade.h:5 +msgid "Allow merge to automatically shrink text" +msgstr "" + +#: data/glade/object-editor.glade.h:6 +msgid "Angle:" +msgstr "Ângulo:" + +#: data/glade/object-editor.glade.h:7 +msgid "Checksum" +msgstr "" + +#: data/glade/object-editor.glade.h:10 +#, fuzzy +msgid "Family:" +msgstr "Arquivo:" + +#: data/glade/object-editor.glade.h:12 +msgid "Fill" +msgstr "Preencher" + +#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 +msgid "Height:" +msgstr "Altura:" + +#: data/glade/object-editor.glade.h:14 +msgid "Image" +msgstr "Imagem" + +#: data/glade/object-editor.glade.h:15 +msgid "Insert merge field" +msgstr "Inserir campo de fusão" + +#: data/glade/object-editor.glade.h:17 +msgid "Length:" +msgstr "Comprimento:" + +#: data/glade/object-editor.glade.h:18 +msgid "Line" +msgstr "Linha" + +#: data/glade/object-editor.glade.h:20 +msgid "Literal:" +msgstr "Literal:" + +#: data/glade/object-editor.glade.h:21 +msgid "Load image" +msgstr "" + +#: data/glade/object-editor.glade.h:22 +msgid "Position" +msgstr "Posição" + +#: data/glade/object-editor.glade.h:23 +msgid "Reset image size" +msgstr "Redefinir tamanho da imagem" + +#: data/glade/object-editor.glade.h:24 +msgid "Size" +msgstr "Tamanho" + +#: data/glade/object-editor.glade.h:25 +#, fuzzy +msgid "Size:" +msgstr "Tamanho" + +#: data/glade/object-editor.glade.h:26 +#, fuzzy +msgid "Style" +msgstr "Estilo:" + +#: data/glade/object-editor.glade.h:27 +msgid "Style:" +msgstr "Estilo:" + +#: data/glade/object-editor.glade.h:30 +msgid "X:" +msgstr "X:" + +#: data/glade/object-editor.glade.h:31 +msgid "Y:" +msgstr "Y:" + +#: data/glade/object-editor.glade.h:32 +msgid "degrees" +msgstr "graus" + +#: data/glade/object-editor.glade.h:33 +msgid "dialog1" +msgstr "" + +#: data/glade/object-editor.glade.h:34 +msgid "digits:" +msgstr "" + +#: data/glade/object-editor.glade.h:35 +#, fuzzy +msgid "format:" +msgstr "Formato:" + +#: data/glade/template-designer.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/template-designer.glade.h:2 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "" + +#: data/glade/template-designer.glade.h:3 +msgid "(e.g., 8163A)" +msgstr "" + +#: data/glade/template-designer.glade.h:4 +msgid "(e.g., Avery, Acme, ...)" +msgstr "" + +#: data/glade/template-designer.glade.h:6 +msgid "1. Outer radius:" +msgstr "" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "" + +#: data/glade/template-designer.glade.h:8 +#, fuzzy +msgid "1. Width:" +msgstr "Largura:" + +#: data/glade/template-designer.glade.h:9 +#, fuzzy +msgid "2. Height:" +msgstr "Altura:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" + +#: data/glade/template-designer.glade.h:30 +msgid "Design Completed" +msgstr "" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" + +#: data/glade/template-designer.glade.h:40 +msgid "Label Size (CD/DVD)" +msgstr "" + +#: data/glade/template-designer.glade.h:41 +#, fuzzy +msgid "Label Size (Round)" +msgstr "Tamanho da etiqueta:" + +#: data/glade/template-designer.glade.h:42 +#, fuzzy +msgid "Label or Card Shape" +msgstr "Nova Etiqueta ou Cartão" + +#: data/glade/template-designer.glade.h:43 +msgid "Label or Card Size (Rectangular)" +msgstr "" + +#: data/glade/template-designer.glade.h:44 +#, fuzzy +msgid "Layout #1" +msgstr "Disposição:" + +#: data/glade/template-designer.glade.h:45 +#, fuzzy +msgid "Layout #2" +msgstr "Disposição:" + +#: data/glade/template-designer.glade.h:46 +#, fuzzy +msgid "Layout(s)" +msgstr "Disposição:" + +#: data/glade/template-designer.glade.h:47 +#, fuzzy +msgid "Name and Description" +msgstr "Descrição:" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "" + +#: data/glade/template-designer.glade.h:50 +msgid "Number of Layouts" +msgstr "" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "" + +#: data/glade/template-designer.glade.h:52 +#, fuzzy +msgid "Page Size" +msgstr "Tamanho da página:" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "" + +#: data/glade/template-designer.glade.h:55 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "" + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "" + +#: data/glade/template-designer.glade.h:57 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "" + +#: data/glade/template-designer.glade.h:58 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "" + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "" + +#: data/glade/template-designer.glade.h:61 +#, fuzzy +msgid "Print test sheet" +msgstr "na primeira folha" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" + +#: data/glade/template-designer.glade.h:68 +msgid "Vertical pitch (dy):" +msgstr "" + +#: data/glade/template-designer.glade.h:69 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" + +#: data/templates/paper-sizes.xml.h:1 +msgid "A0" +msgstr "" + +#: data/templates/paper-sizes.xml.h:2 +msgid "A1" +msgstr "" + +#: data/templates/paper-sizes.xml.h:3 +msgid "A10" +msgstr "" + +#: data/templates/paper-sizes.xml.h:4 +msgid "A2" +msgstr "" + +#: data/templates/paper-sizes.xml.h:5 +msgid "A3" +msgstr "" + +#: data/templates/paper-sizes.xml.h:6 +msgid "A4" +msgstr "" + +#: data/templates/paper-sizes.xml.h:7 +msgid "A5" +msgstr "" + +#: data/templates/paper-sizes.xml.h:8 +msgid "A6" +msgstr "" + +#: data/templates/paper-sizes.xml.h:9 +msgid "A7" +msgstr "" + +#: data/templates/paper-sizes.xml.h:10 +msgid "A8" +msgstr "" + +#: data/templates/paper-sizes.xml.h:11 +msgid "A9" +msgstr "" + +#: data/templates/paper-sizes.xml.h:12 +msgid "B0" +msgstr "" + +#: data/templates/paper-sizes.xml.h:13 +msgid "B1" +msgstr "" + +#: data/templates/paper-sizes.xml.h:14 +msgid "B10" +msgstr "" + +#: data/templates/paper-sizes.xml.h:15 +msgid "B2" +msgstr "" + +#: data/templates/paper-sizes.xml.h:16 +msgid "B3" +msgstr "" + +#: data/templates/paper-sizes.xml.h:17 +msgid "B4" +msgstr "" + +#: data/templates/paper-sizes.xml.h:18 +msgid "B5" +msgstr "" + +#: data/templates/paper-sizes.xml.h:19 +msgid "B6" +msgstr "" + +#: data/templates/paper-sizes.xml.h:20 +msgid "B7" +msgstr "" + +#: data/templates/paper-sizes.xml.h:21 +msgid "B8" +msgstr "" + +#: data/templates/paper-sizes.xml.h:22 +msgid "B9" +msgstr "" + +#: data/templates/paper-sizes.xml.h:23 +msgid "US Executive" +msgstr "" + +#: data/templates/paper-sizes.xml.h:24 +msgid "US Legal" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:1 +#: data/templates/zweckform-iso-templates.xml.h:1 +msgid "Address Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:2 +#: data/templates/avery-iso-templates.xml.h:2 +#: data/templates/zweckform-iso-templates.xml.h:3 +#: data/templates/misc-us-templates.xml.h:2 +#: data/templates/misc-iso-templates.xml.h:9 +msgid "Business Cards" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:3 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:4 +msgid "Diskette Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:5 +#, fuzzy +msgid "Filing Labels" +msgstr "Etiquetas" + +#: data/templates/avery-us-templates.xml.h:6 +msgid "Full Sheet Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:7 +#, fuzzy +msgid "Large Round Labels" +msgstr "Iniciar na etiqueta" + +#: data/templates/avery-us-templates.xml.h:8 +msgid "Name Badge Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:9 +msgid "Return Address Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:10 +msgid "Shipping Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:11 +#, fuzzy +msgid "Small Round Labels" +msgstr "Iniciar na etiqueta" + +#: data/templates/avery-us-templates.xml.h:12 +#, fuzzy +msgid "Square Labels" +msgstr "Etiquetas" + +#: data/templates/avery-us-templates.xml.h:13 +msgid "Video Tape Face Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:14 +msgid "Video Tape Spine Labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:1 +msgid "Address labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:3 +msgid "CD Booklet" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:4 +msgid "CD Inlet" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:5 +#: data/templates/zweckform-iso-templates.xml.h:4 +#: data/templates/misc-us-templates.xml.h:4 +#: data/templates/misc-iso-templates.xml.h:10 +#, fuzzy +msgid "CD/DVD Labels" +msgstr "Etiquetas" + +#: data/templates/avery-iso-templates.xml.h:6 +#, fuzzy +msgid "Diskette labels" +msgstr "Sobre glabels" + +#: data/templates/avery-iso-templates.xml.h:7 +#: data/templates/zweckform-iso-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:17 +msgid "Mailing Labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:8 +#, fuzzy +msgid "Mailing labels" +msgstr "glabels" + +#: data/templates/avery-iso-templates.xml.h:9 +msgid "Mini Address Labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:10 +#, fuzzy +msgid "Shipping labels" +msgstr "Abrir etiqueta" + +#: data/templates/zweckform-iso-templates.xml.h:2 +#, fuzzy +msgid "Allround Labels" +msgstr "Sobre glabels" + +#: data/templates/zweckform-iso-templates.xml.h:5 +msgid "Correction and Cover-up Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:6 +msgid "Lever Arch File Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:8 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:9 +msgid "Rectangular Copier Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:10 +#: data/templates/misc-iso-templates.xml.h:22 +msgid "Rectangular Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:11 +msgid "Video Labels (back)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:1 +msgid "Business Card CD" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:3 +msgid "CD Template Rectangles" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:5 +msgid "CD/DVD Labels (Face Only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:6 +#: data/templates/misc-iso-templates.xml.h:11 +msgid "CD/DVD Labels (face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:7 +#, fuzzy +msgid "DLT Labels" +msgstr "Etiquetas" + +#: data/templates/misc-us-templates.xml.h:8 +#, fuzzy +msgid "Microtube labels" +msgstr "Sobre glabels" + +#: data/templates/misc-us-templates.xml.h:9 +msgid "Mini-CD Labels" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:10 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:11 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:12 +#: data/templates/misc-iso-templates.xml.h:21 +msgid "PRO CD Labels 2-up (face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:13 +msgid "Slimline CD Case (rightside up)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Slimline CD Case (upside down)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:1 +msgid "Agipa 119488: Business Cards" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:2 +msgid "Allround Labels --24" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:3 +msgid "Allround Labels --44" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:4 +msgid "Allround Labels --64" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:5 +msgid "Allround Labels --65" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:6 +msgid "Arch File Labels" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:7 +msgid "Arch File Labels (large)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:8 +msgid "Arch File Labels (small)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:12 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Diskette Labels (face only)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:14 +msgid "EPSON Photo Stickers 16" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Etiketten" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:16 +msgid "Fridge Magnet Stickers" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:18 +msgid "Mailing Labels --14" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:19 +msgid "Mailing Labels-2 columns" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:20 +msgid "Mailing Labels-3 columns" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:23 +msgid "Video Labels (face only)" +msgstr "" + +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers." +msgstr "" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "" + +#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 +#, fuzzy +msgid "gLabels Project File" +msgstr "_Propriedades de Objeto" + +#~ msgid "Object _Properties..." +#~ msgstr "_Propriedades do Objeto..." + +#~ msgid "Display units" +#~ msgstr "Exibir unidades" + +#~ msgid "Default page size" +#~ msgstr "Tamanho de página padrão" + +#~ msgid "Outline" +#~ msgstr "Contorno" + +#~ msgid "Edit line object properties" +#~ msgstr "Editar propriedades do objeto linha" + +#~ msgid "Edit text object properties" +#~ msgstr "Editar propriedades do objeto texto" + +#~ msgid "Edit text:" +#~ msgstr "Editar texto:" + +#~ msgid "Maintain current aspect ratio" +#~ msgstr "Manter taxa de aspecto atual" + +#, fuzzy +#~ msgid "CD Labels" +#~ msgstr "Etiquetas" + +#~ msgid "Open %s" +#~ msgstr "Abrir %s" + +#~ msgid "Scale:" +#~ msgstr "Escala:" + +#~ msgid "%" +#~ msgstr "%" + +#~ msgid "Show text with barcode" +#~ msgstr "Exibir texto com código de barras" + +#~ msgid "Edit properties..." +#~ msgstr "Editar propriedades..." + +#~ msgid "Fields" +#~ msgstr "Campos" + +#~ msgid "Column" +#~ msgstr "Coluna" + +#~ msgid "Custom field key" +#~ msgstr "Chave do campo específico" + +#~ msgid "Sample data" +#~ msgstr "Dado de amostra" + +#~ msgid "Revert to saved copy of %s?" +#~ msgstr "Reverter para a cópia gravada de %s?" + +#~ msgid "Unknown media type. Using default." +#~ msgstr "Tipo de mídia desconhecido. Usando padrão." + +#~ msgid "" +#~ "``%s'' has been modified.\n" +#~ "\n" +#~ "Do you wish to save it?" +#~ msgstr "" +#~ "``%s'' foi modificado.\n" +#~ "\n" +#~ "Deseja salvá-lo?" + +#~ msgid "Close / Save label as" +#~ msgstr "Fechar / Salvar etiqueta como" + +#~ msgid "Label no longer valid!" +#~ msgstr "Etiqueta não é mais válida" + +#~ msgid "Error writing file" +#~ msgstr "Erro gravando o arquivo" + +#~ msgid "Appearance" +#~ msgstr "Aparência" + +#~ msgid "Position/Size" +#~ msgstr "Posição/Tamanho" + +#~ msgid "Image format not currently supported" +#~ msgstr "Formato de imagem não suportado atualmente" + +#~ msgid "Barcode data" +#~ msgstr "Dado do Código de Barras:" + +#~ msgid "General" +#~ msgstr "Geral" + +#~ msgid "Make a new, empty label" +#~ msgstr "Criar uma etiqueta nova, vazia" + +#~ msgid " New " +#~ msgstr " Novo " + +#~ msgid "New Label/Card" +#~ msgstr "Nova Etiqueta/Cartão" + +#~ msgid " Open " +#~ msgstr " Abrir " + +#~ msgid " Save " +#~ msgstr " Salvar " + +#~ msgid " Print " +#~ msgstr " Imprimir " + +#~ msgid "Function is not implemented!" +#~ msgstr "Função não está implementada!" + +#~ msgid "Function is not yet implemented!" +#~ msgstr "Função ainda não implementada!" diff --git a/po/ru.po b/po/ru.po new file mode 100644 index 00000000..ff02c9e8 --- /dev/null +++ b/po/ru.po @@ -0,0 +1,3011 @@ +# Russian translation of glabels. +# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# Vitaly Lipatov , 2002, 2003, 2004, 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: glabels 2.3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-07-29 00:34+0400\n" +"PO-Revision-Date: 2009-07-29 19:58+0400\n" +"Last-Translator: Alexandre Prokoudine \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.10\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../src/glabels.c:66 ../src/glabels-batch.c:69 +msgid "[FILE...]" +msgstr "[ФАЙЛ...]" + +#: ../src/glabels.c:83 +#, fuzzy +msgid "Launch gLabels label and business card designer." +msgstr "Программа для создания этикеток и визитных карточек\n" + +#: ../src/glabels.c:91 ../src/glabels-batch.c:105 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" + +#: ../src/glabels-batch.c:53 +msgid "set output filename (default=\"output.pdf\")" +msgstr "Установить название выходного файла (по умолчанию — \"output.ps\"" + +#: ../src/glabels-batch.c:53 ../src/glabels-batch.c:67 +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 +msgid "first label on first sheet (default=1)" +msgstr "первая этикетка на первой странице (по умолчанию = 1)" + +#: ../src/glabels-batch.c:59 +msgid "first" +msgstr "первое" + +#: ../src/glabels-batch.c:61 ../data/builder/print-custom-widget.glade.h:6 +msgid "print outlines (to test printer alignment)" +msgstr "Печатать контуры этикеток (для тестирования выравнивания)" + +#: ../src/glabels-batch.c:63 ../data/builder/print-custom-widget.glade.h:5 +msgid "print in reverse (i.e. a mirror image)" +msgstr "Печатать зеркальное отображение" + +#: ../src/glabels-batch.c:65 ../data/builder/print-custom-widget.glade.h:4 +msgid "print crop marks" +msgstr "Печатать метки под обрез" + +#: ../src/glabels-batch.c:67 +msgid "input file for merging" +msgstr "Входной файл для заполнения полей" + +#: ../src/glabels-batch.c:97 +msgid "Print files created with gLabels." +msgstr "Напечатать созданные в gLabels файлы." + +#: ../src/glabels-batch.c:147 +#, c-format +msgid "cannot perform document merge with glabels file %s\n" +msgstr "Не удалось выполнить заполнение полей документа файлом gLabels %s\n" + +#: ../src/glabels-batch.c:169 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "Не удалось открыть файл %s\n" + +#: ../src/window.c:259 +msgid "(none) - gLabels" +msgstr "(нет открытых макетов) - gLabels" + +#: ../src/window.c:432 +msgid "(modified)" +msgstr "(изменено)" + +#: ../src/stock.c:72 +msgid "_Select Mode" +msgstr "_Режим выделения" + +#: ../src/stock.c:73 +msgid "_Text" +msgstr "_Текст" + +#: ../src/stock.c:74 +msgid "_Line" +msgstr "_Линия" + +#: ../src/stock.c:75 +msgid "_Box" +msgstr "_Прямоугольник" + +#: ../src/stock.c:76 +msgid "_Ellipse" +msgstr "_Эллипс" + +#: ../src/stock.c:77 +msgid "_Image" +msgstr "_Изображение" + +#: ../src/stock.c:78 +msgid "Bar_code" +msgstr "_Штрих-код" + +#: ../src/stock.c:79 +msgid "_Merge Properties" +msgstr "Заполнение полей данными" + +#: ../src/stock.c:80 +msgid "Object _Properties" +msgstr "_Свойства объекта" + +#: ../src/stock.c:81 +msgid "Bring to _Front" +msgstr "На _передний план" + +#: ../src/stock.c:82 +msgid "Send to _Back" +msgstr "На _задний план" + +#: ../src/stock.c:83 +msgid "Rotate _Left" +msgstr "Повернуть на_лево" + +#: ../src/stock.c:84 +msgid "Rotate _Right" +msgstr "Повернуть на_право" + +#: ../src/stock.c:85 +msgid "Flip _Horizontally" +msgstr "Отразить _горизонтально" + +#: ../src/stock.c:86 +msgid "Flip _Vertically" +msgstr "Отразить _вертикально" + +#: ../src/stock.c:87 +msgid "_Lefts" +msgstr "С_лева" + +#: ../src/stock.c:88 +msgid "_Rights" +msgstr "С_права" + +#: ../src/stock.c:89 +msgid "_Centers" +msgstr "По _центру" + +#: ../src/stock.c:90 +msgid "_Tops" +msgstr "По _верху" + +#: ../src/stock.c:91 +msgid "Bottoms" +msgstr "По низу" + +#: ../src/stock.c:92 +msgid "Centers" +msgstr "По центру" + +#: ../src/stock.c:93 ../src/stock.c:94 +msgid "Label Ce_nter" +msgstr "_Центр этикетки" + +#: ../src/stock.c:95 ../data/builder/property-bar.glade.h:3 +msgid "Fill color" +msgstr "Цвет заливки" + +#: ../src/stock.c:96 ../data/builder/property-bar.glade.h:8 +msgid "Line color" +msgstr "Цвет линии" + +#: ../src/stock.c:97 ../src/stock.c:99 +msgid "Linked" +msgstr "Прикреплено" + +#: ../src/stock.c:98 ../src/stock.c:100 +msgid "Not Linked" +msgstr "Не прикреплено" + +#. Menu entries. +#: ../src/ui.c:93 +msgid "_File" +msgstr "_Файл" + +#: ../src/ui.c:94 +msgid "Open Recent _Files" +msgstr "Н_едавние файлы" + +#: ../src/ui.c:95 +msgid "_Edit" +msgstr "_Правка" + +#: ../src/ui.c:96 +msgid "_View" +msgstr "_Вид" + +#: ../src/ui.c:97 +msgid "Customize Main Toolbar" +msgstr "Панель инструментов" + +#: ../src/ui.c:98 +msgid "Customize Drawing Toolbar" +msgstr "Панель рисования" + +#: ../src/ui.c:99 +msgid "Customize Properties Toolbar" +msgstr "Панель свойств" + +#: ../src/ui.c:100 +msgid "_Objects" +msgstr "_Объекты" + +#: ../src/ui.c:101 +msgid "_Create" +msgstr "_Добавить" + +#: ../src/ui.c:102 +msgid "_Order" +msgstr "_Порядок" + +#: ../src/ui.c:103 +msgid "_Rotate/Flip" +msgstr "П_овернуть/Отразить" + +#: ../src/ui.c:104 +msgid "Align _Horizontal" +msgstr "Выровнять по _горизонтали" + +#: ../src/ui.c:105 +msgid "Align _Vertical" +msgstr "Выровнять по _вертикали" + +#: ../src/ui.c:106 +msgid "_Help" +msgstr "_Справка" + +#. Popup entries. +#: ../src/ui.c:109 ../src/ui.c:110 +msgid "Context Menu" +msgstr "Контекстное меню" + +#: ../src/ui.c:115 +msgid "_New" +msgstr "_Создать" + +#: ../src/ui.c:117 +msgid "Create a new file" +msgstr "Создать новый документ" + +#: ../src/ui.c:122 +msgid "_Open..." +msgstr "_Открыть..." + +#: ../src/ui.c:124 +msgid "Open a file" +msgstr "Открыть документ" + +#: ../src/ui.c:129 +msgid "_Save" +msgstr "_Сохранить" + +#: ../src/ui.c:131 +msgid "Save current file" +msgstr "Сохранить текущий документ" + +#: ../src/ui.c:136 +msgid "Save _As..." +msgstr "Сохранить _как..." + +#: ../src/ui.c:138 +msgid "Save the current file to a different name" +msgstr "Сохранить текущий документ под другим именем" + +#: ../src/ui.c:143 +msgid "_Print..." +msgstr "_Напечатать..." + +#: ../src/ui.c:145 +msgid "Print the current file" +msgstr "Напечатать текущий файл" + +#: ../src/ui.c:150 +msgid "Properties..." +msgstr "Свойства..." + +#: ../src/ui.c:152 +msgid "Modify document properties" +msgstr "Изменить свойства документа" + +#: ../src/ui.c:157 +msgid "Template _Designer..." +msgstr "Дизайнер _шаблонов..." + +#: ../src/ui.c:159 +msgid "Create a custom template" +msgstr "Создать свой шаблон" + +#: ../src/ui.c:164 +msgid "_Close" +msgstr "_Закрыть" + +#: ../src/ui.c:166 +msgid "Close the current file" +msgstr "Закрыть текущий файл" + +#: ../src/ui.c:171 +msgid "_Quit" +msgstr "В_ыход" + +#: ../src/ui.c:173 +msgid "Quit the program" +msgstr "Завершить работу с программой" + +#: ../src/ui.c:180 +msgid "Cut" +msgstr "Вырезать" + +#: ../src/ui.c:182 +msgid "Cut the selection" +msgstr "Вырезать выделенное" + +#: ../src/ui.c:187 +msgid "Copy" +msgstr "Копировать" + +#: ../src/ui.c:189 +msgid "Copy the selection" +msgstr "Скопировать выделенное" + +#: ../src/ui.c:194 +msgid "Paste" +msgstr "Вставить" + +#: ../src/ui.c:196 +msgid "Paste the clipboard" +msgstr "Вставить из буфера" + +#: ../src/ui.c:201 +msgid "Delete" +msgstr "Удалить" + +#: ../src/ui.c:203 +msgid "Delete the selected objects" +msgstr "Удалить выбранные объекты" + +#: ../src/ui.c:208 +msgid "Select All" +msgstr "Выделить все" + +#: ../src/ui.c:210 +msgid "Select all objects" +msgstr "Выделить все объекты" + +#: ../src/ui.c:215 +msgid "Un-select All" +msgstr "Снять выделение" + +#: ../src/ui.c:217 +msgid "Remove all selections" +msgstr "Снять выделение со всех объектов" + +#: ../src/ui.c:222 +msgid "Preferences" +msgstr "Параметры" + +#: ../src/ui.c:224 +msgid "Configure the application" +msgstr "Настроить программу" + +#: ../src/ui.c:231 +msgid "Zoom in" +msgstr "Приблизить" + +#: ../src/ui.c:233 +msgid "Increase magnification" +msgstr "Уменьшить масштаб" + +#: ../src/ui.c:238 +msgid "Zoom out" +msgstr "Отдалить" + +#: ../src/ui.c:240 +msgid "Decrease magnification" +msgstr "Увеличить масштаб" + +#: ../src/ui.c:245 +msgid "Zoom 1 to 1" +msgstr "Масштаб 1:1" + +#: ../src/ui.c:247 +msgid "Restore scale to 100%" +msgstr "Восстановить масштаб 1:1" + +#: ../src/ui.c:252 +msgid "Zoom to fit" +msgstr "Уместить целиком в окне" + +#: ../src/ui.c:254 +msgid "Set scale to fit window" +msgstr "Изменить масштаб, чтобы изображение было видно полностью" + +#: ../src/ui.c:261 +msgid "Select Mode" +msgstr "Режим выбора" + +#: ../src/ui.c:263 +msgid "Select, move and modify objects" +msgstr "Выбрать, переместить или изменить объекты" + +#: ../src/ui.c:268 ../src/view-text.c:494 +#: ../data/builder/object-editor.glade.h:32 +msgid "Text" +msgstr "Текст" + +#: ../src/ui.c:270 +msgid "Create text object" +msgstr "Добавить текст" + +#: ../src/ui.c:275 +msgid "Box" +msgstr "Прямоугольник" + +#: ../src/ui.c:277 +msgid "Create box/rectangle object" +msgstr "Добавить прямоугольник" + +#: ../src/ui.c:282 ../data/builder/object-editor.glade.h:20 +msgid "Line" +msgstr "Обводка" + +#: ../src/ui.c:284 +msgid "Create line object" +msgstr "Добавить линию" + +#: ../src/ui.c:289 +msgid "Ellipse" +msgstr "Эллипс" + +#: ../src/ui.c:291 +msgid "Create ellipse/circle object" +msgstr "Добавить эллипс/круг" + +#: ../src/ui.c:296 ../data/builder/object-editor.glade.h:16 +msgid "Image" +msgstr "Изображение" + +#: ../src/ui.c:298 +msgid "Create image object" +msgstr "Добавить растровое изображение" + +#: ../src/ui.c:303 +msgid "Barcode" +msgstr "Штрих-код" + +#: ../src/ui.c:305 +msgid "Create barcode object" +msgstr "Добавить штрих-код" + +#: ../src/ui.c:310 +msgid "Bring to front" +msgstr "На передний план" + +#: ../src/ui.c:312 +msgid "Raise object to top" +msgstr "Переместить объект на передний план" + +#: ../src/ui.c:317 +msgid "Send to back" +msgstr "На задний план" + +#: ../src/ui.c:319 +msgid "Lower object to bottom" +msgstr "Переместить объект на задний план" + +#: ../src/ui.c:324 +msgid "Rotate left" +msgstr "Повернуть влево" + +#: ../src/ui.c:326 +msgid "Rotate object 90 degrees counter-clockwise" +msgstr "Повернуть объект на 90 градусов против часовой стрелки" + +#: ../src/ui.c:331 +msgid "Rotate right" +msgstr "Повернуть вправо" + +#: ../src/ui.c:333 +msgid "Rotate object 90 degrees clockwise" +msgstr "Повернуть объект на 90 градусов по часовой стрелке" + +#: ../src/ui.c:338 +msgid "Flip horizontally" +msgstr "Отразить горизонтально" + +#: ../src/ui.c:340 +msgid "Flip object horizontally" +msgstr "Отразить объект горизонтально" + +#: ../src/ui.c:345 +msgid "Flip vertically" +msgstr "Отразить вертикально" + +#: ../src/ui.c:347 +msgid "Flip object vertically" +msgstr "Отразить объект вертикально" + +#: ../src/ui.c:352 +msgid "Align left" +msgstr "Выровнять по левому краю" + +#: ../src/ui.c:354 +msgid "Align objects to left edges" +msgstr "Выровнять объекты по левому краю" + +#: ../src/ui.c:359 +msgid "Align right" +msgstr "Выровнять по правому краю" + +#: ../src/ui.c:361 +msgid "Align objects to right edges" +msgstr "Выровнять объекты по правому краю" + +#: ../src/ui.c:366 +msgid "Align horizontal center" +msgstr "Выровнять по горизонтальным центрам" + +#: ../src/ui.c:368 +msgid "Align objects to horizontal centers" +msgstr "Выровнять объекты по горизонтальным центрам" + +#: ../src/ui.c:373 +msgid "Align tops" +msgstr "Выровнять по верхнему краю" + +#: ../src/ui.c:375 +msgid "Align objects to top edges" +msgstr "Выровнять объекты по верхним краям" + +#: ../src/ui.c:380 +msgid "Align bottoms" +msgstr "Выровнять по нижнему краю" + +#: ../src/ui.c:382 +msgid "Align objects to bottom edges" +msgstr "Выровнять объекты по нижним краям" + +#: ../src/ui.c:387 +msgid "Align vertical center" +msgstr "Выровнять по вертикальным центрам" + +#: ../src/ui.c:389 +msgid "Align objects to vertical centers" +msgstr "Выровнять объекты по вертикальным центрам" + +#: ../src/ui.c:394 +msgid "Center horizontally" +msgstr "Отцентрировать по горизонтали" + +#: ../src/ui.c:396 +msgid "Center objects to horizontal label center" +msgstr "Центрировать объекты по центру горизонтальной метки" + +#: ../src/ui.c:401 +msgid "Center vertically" +msgstr "Отцентрировать по вертикали" + +#: ../src/ui.c:403 +msgid "Center objects to vertical label center" +msgstr "Центрировать объекты по центру вертикальной метки" + +#: ../src/ui.c:408 +msgid "Merge properties" +msgstr "Заполнить поля данными" + +#: ../src/ui.c:410 +msgid "Edit merge properties" +msgstr "Изменить параметры заполнения полей данными" + +#: ../src/ui.c:417 +msgid "Contents" +msgstr "Содержание" + +#: ../src/ui.c:419 +msgid "Open glabels manual" +msgstr "Показать справку по gLabels" + +#: ../src/ui.c:424 +msgid "About..." +msgstr "О программе..." + +#: ../src/ui.c:426 +msgid "About glabels" +msgstr "О gLabels" + +#: ../src/ui.c:436 +msgid "Property toolbar" +msgstr "Панель свойств" + +#: ../src/ui.c:438 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "Изменить видимость панели свойств в текущем окне" + +#: ../src/ui.c:444 +msgid "Grid" +msgstr "Сетка" + +#: ../src/ui.c:446 +msgid "Change the visibility of the grid in the current window" +msgstr "Изменить видимость сетки в текущем окне" + +#: ../src/ui.c:452 +msgid "Markup" +msgstr "Разметка" + +#: ../src/ui.c:454 +msgid "Change the visibility of markup lines in the current window" +msgstr "Изменить видимость линии разметки в текущем окне" + +#: ../src/ui.c:465 +msgid "Main toolbar" +msgstr "Показывать панель инструментов" + +#: ../src/ui.c:467 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "Изменить видимость главной панели инструментов в текущем окне" + +#: ../src/ui.c:473 +msgid "Drawing toolbar" +msgstr "Панель рисования" + +#: ../src/ui.c:475 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "Изменить видимость панели инструментов для рисования в текущем окне" + +#: ../src/ui-property-bar.c:279 ../src/prefs-dialog.c:328 +#: ../src/object-editor-bc-page.c:93 ../src/object-editor-text-page.c:93 +#: ../src/object-editor-shadow-page.c:93 +msgid "Default" +msgstr "По умолчанию" + +#: ../src/ui-property-bar.c:291 ../src/prefs-dialog.c:334 +#: ../src/object-editor-fill-page.c:79 +msgid "No Fill" +msgstr "Без заливки" + +#: ../src/ui-property-bar.c:303 ../src/prefs-dialog.c:331 +#: ../src/object-editor-line-page.c:81 +msgid "No Line" +msgstr "Без обводки" + +#: ../src/ui-sidebar.c:152 +msgid "Object properties" +msgstr "Свойства объекта" + +#: ../src/ui-commands.c:1064 +msgid "Glabels includes contributions from:" +msgstr "В разработке gLabels поучаствовали:" + +#: ../src/ui-commands.c:1070 +msgid "See the file AUTHORS for additional credits," +msgstr "" +"Подробная информация об участниках\n" +"изложена в файле AUTHORS, а также" + +#: ../src/ui-commands.c:1071 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "на сайте http://glabels.sourceforge.net/" + +#: ../src/ui-commands.c:1083 +msgid "A label and business card creation program.\n" +msgstr "Программа для создания этикетов и визитных карточек.\n" + +#: ../src/ui-commands.c:1087 +msgid "translator-credits" +msgstr "" +"Виталий Липатов , 2002-2005\n" +"Александр Прокудин , 2008" + +#: ../src/ui-commands.c:1090 +msgid "" +"Glabels is free software; you can redistribute it and/or modify it\n" +"under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but\n" +"WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" +"the GNU General Public License for more details.\n" +msgstr "" +"Glabels является свободным программным обеспечением;\n" +"вы вправе распространять её и/или модифицировать в соответствии\n" +"с условиями версии 2 либо по вашему выбору более поздней\n" +"версии Стандартной Общественной Лицензии GNU, \n" +"опубликованной Free Software Foundation.\n" +" \n" +"Мы распространяем данную программу в надежде на то, что она\n" +"будет вам полезной, однако НЕ ПРЕДОСТАВЛЯЕМ НА НЕЁ НИКАКИХ\n" +"ГАРАНТИЙ, в том числе ГАРАНТИИ ТОВАРНОГО СОСТОЯНИЯ ПРИ\n" +"ПРОДАЖЕ И ПРИГОДНОСТИ ДЛЯ ИСПОЛЬЗОВАНИЯ В КОНКРЕТНЫХ\n" +"ЦЕЛЯХ. Для получения более подробной информации ознакомьтесь\n" +"со Стандартной Общественной Лицензией GNU.\n" + +#: ../src/ui-commands.c:1116 +msgid "glabels" +msgstr "glabels" + +#: ../src/file.c:91 +msgid "New Label or Card" +msgstr "Новая этикетка или визитка" + +#: ../src/file.c:191 +msgid "Label properties" +msgstr "Свойства этикетки" + +#: ../src/file.c:292 ../src/file.c:578 +msgid "All files" +msgstr "Все файлы" + +#: ../src/file.c:297 ../src/file.c:583 +msgid "gLabels documents" +msgstr "Документы gLabels" + +#: ../src/file.c:343 ../src/file.c:640 +msgid "Empty file name selection" +msgstr "Пустой выбор файла" + +#: ../src/file.c:346 ../src/file.c:362 +msgid "Please select a file or supply a valid file name" +msgstr "Выберите файл или введите корректное название файла" + +#: ../src/file.c:359 +msgid "File does not exist" +msgstr "Файл не существует" + +#: ../src/file.c:433 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "Невозможно открыть файл \"%s\"" + +#: ../src/file.c:436 +msgid "Not a supported file format" +msgstr "Файл неподдерживаемого формата" + +#: ../src/file.c:513 ../src/file.c:690 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "Невозможно сохранить файл \"%s\"" + +#: ../src/file.c:517 ../src/file.c:694 +msgid "Error encountered during save. The file is still not saved." +msgstr "Произошла ошибка при сохранении файла. Файл всё ещё не сохранён." + +#: ../src/file.c:556 +#, c-format +msgid "Save \"%s\" as" +msgstr "Сохранить \"%s\" как" + +#: ../src/file.c:643 +msgid "Please supply a valid file name" +msgstr "Укажите корректное название файла" + +#: ../src/file.c:664 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "Перезаписать файл \"%s\"?" + +#: ../src/file.c:668 +msgid "File already exists." +msgstr "Файл уже существует." + +#: ../src/file.c:764 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "Сохранить изменения в документе \"%s\" перед закрытием?" + +#: ../src/file.c:768 +msgid "Your changes will be lost if you don't save them." +msgstr "Все изменения будут потеряны, если вы их не сохраните." + +#: ../src/file.c:771 +msgid "Close without saving" +msgstr "Закрыть без сохранения" + +#. Should not happen +#: ../src/prefs.c:159 ../src/prefs.c:166 +#: ../data/builder/object-editor.glade.h:43 +#: ../data/builder/prefs-dialog.glade.h:22 +msgid "points" +msgstr "пунктов" + +#: ../src/prefs.c:161 ../data/builder/object-editor.glade.h:42 +#: ../data/builder/template-designer.glade.h:64 +msgid "inches" +msgstr "дюймов" + +#: ../src/prefs.c:163 +msgid "mm" +msgstr "мм" + +#: ../src/prefs-dialog.c:167 ../data/builder/prefs-dialog.glade.h:21 +msgid "gLabels Preferences" +msgstr "Параметры gLabels" + +#. Build editor. +#: ../src/view-box.c:175 +msgid "Box object properties" +msgstr "Свойства прямоугольника" + +#. Build editor. +#: ../src/view-ellipse.c:175 +msgid "Ellipse object properties" +msgstr "Свойства эллипса" + +#. Build editor. +#: ../src/view-line.c:174 +msgid "Line object properties" +msgstr "Свойство линии" + +#. Build editor. +#: ../src/view-image.c:174 +msgid "Image object properties" +msgstr "Свойства изображения" + +#. Build editor. +#: ../src/view-text.c:178 +msgid "Text object properties" +msgstr "Свойства текста" + +#. Build editor. +#: ../src/view-barcode.c:174 +msgid "Barcode object properties" +msgstr "Свойства объекта типа штрих-код" + +#: ../src/object-editor-image-page.c:267 +msgid "All Files" +msgstr "Все файлы" + +#: ../src/object-editor-image-page.c:272 +msgid "All Images" +msgstr "Все изображения" + +#: ../src/object-editor-image-page.c:287 +#, c-format +msgid "%s (*.%s)" +msgstr "%s (*.%s)" + +#: ../src/merge-properties-dialog.c:271 +msgid "Merge Properties" +msgstr "Параметры заполнения данными" + +#: ../src/merge-properties-dialog.c:297 ../src/merge-properties-dialog.c:405 +msgid "Select merge-database source" +msgstr "Выбрать источник данных для заполнения данными" + +#: ../src/merge-properties-dialog.c:306 ../src/merge-properties-dialog.c:425 +msgid "N/A" +msgstr "Н/Д" + +#: ../src/merge-properties-dialog.c:332 +msgid "Select" +msgstr "Выбрано" + +#: ../src/merge-properties-dialog.c:340 +msgid "Record/Field" +msgstr "Запись/Поле" + +#: ../src/merge-properties-dialog.c:348 +#: ../data/builder/object-editor.glade.h:10 +msgid "Data" +msgstr "Данные" + +#: ../src/merge-properties-dialog.c:418 +msgid "Fixed" +msgstr "" + +#. =================================================================== +#: ../src/print-op.c:242 ../src/wdgt-print-copies.c:171 +#: ../data/templates/misc-iso-templates.xml.h:34 +msgid "Labels" +msgstr "Этикетки" + +#: ../src/template-designer.c:411 +msgid "gLabels Template Designer" +msgstr "Дизайнер шаблонов gLabels" + +#: ../src/template-designer.c:481 +msgid "Welcome" +msgstr "Добро пожаловать" + +#: ../src/template-designer.c:534 +msgid "Name and Description" +msgstr "Название и описание" + +#: ../src/template-designer.c:595 +msgid "Page Size" +msgstr "Формат страницы" + +#: ../src/template-designer.c:675 +msgid "Label or Card Shape" +msgstr "Форма этикетки или визитки" + +#: ../src/template-designer.c:735 +#, fuzzy +msgid "Label or Card Size" +msgstr "Форма этикетки или визитки" + +#: ../src/template-designer.c:844 +#, fuzzy +msgid "Label Size (round)" +msgstr "Размер метки (диаметр)" + +#: ../src/template-designer.c:935 +msgid "Label Size (CD/DVD)" +msgstr "Размер метки (CD/DVD)" + +#: ../src/template-designer.c:1036 +msgid "Number of Layouts" +msgstr "Количество форм" + +#: ../src/template-designer.c:1110 +msgid "Layout(s)" +msgstr "Формы" + +#: ../src/template-designer.c:1229 +msgid "Design Completed" +msgstr "Оформление завершено" + +#: ../src/template-designer.c:1396 +msgid "" +"Brand and part# match an existing " +"template!" +msgstr "" + +#: ../src/bc.c:68 +msgid "POSTNET (any)" +msgstr "POSTNET (любой)" + +#: ../src/bc.c:71 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (только почтовый индекс)" + +#: ../src/bc.c:74 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (ZIP+4)" + +#: ../src/bc.c:77 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: ../src/bc.c:80 +msgid "CEPNET" +msgstr "CEPNET" + +#: ../src/bc.c:83 +msgid "EAN (any)" +msgstr "EAN (любой)" + +#: ../src/bc.c:86 +msgid "EAN-8" +msgstr "EAN-8" + +#: ../src/bc.c:89 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: ../src/bc.c:92 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: ../src/bc.c:95 +msgid "EAN-13" +msgstr "EAN-13" + +#: ../src/bc.c:98 +msgid "EAN-13 +2" +msgstr "EAN-13 +2" + +#: ../src/bc.c:101 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: ../src/bc.c:104 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A or UPC-E)" + +#: ../src/bc.c:107 +msgid "UPC-A" +msgstr "UPC-A" + +#: ../src/bc.c:110 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: ../src/bc.c:113 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: ../src/bc.c:116 +msgid "UPC-E" +msgstr "UPC-E" + +#: ../src/bc.c:119 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: ../src/bc.c:122 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: ../src/bc.c:125 +msgid "ISBN" +msgstr "ISBN" + +#: ../src/bc.c:128 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: ../src/bc.c:131 +msgid "Code 39" +msgstr "Code 39" + +#: ../src/bc.c:134 +msgid "Code 128" +msgstr "Code 128" + +#: ../src/bc.c:137 +msgid "Code 128C" +msgstr "Code 128C" + +#: ../src/bc.c:140 +msgid "Code 128B" +msgstr "Code 128B" + +#: ../src/bc.c:143 +msgid "Interleaved 2 of 5" +msgstr "Interleaved 2 of 5" + +#: ../src/bc.c:146 +msgid "Codabar" +msgstr "Codabar" + +#: ../src/bc.c:149 +msgid "MSI" +msgstr "MSI" + +#: ../src/bc.c:152 +msgid "Plessey" +msgstr "Plessey" + +#: ../src/bc.c:155 +msgid "IEC16022 (DataMatrix)" +msgstr "IEC16022 (DataMatrix)" + +#: ../src/bc.c:158 +msgid "IEC18004 (QRCode)" +msgstr "IEC18004 (QRCode)" + +#: ../src/label.c:531 +msgid "Untitled" +msgstr "Без названия" + +#: ../src/label-barcode.c:426 +msgid "Barcode data empty" +msgstr "Данные штрих-кода не введены" + +#: ../src/label-barcode.c:430 +msgid "Invalid barcode data" +msgstr "Неверные данные штрих-кода" + +#: ../src/xml-label.c:189 ../src/xml-label.c:226 +msgid "xmlParseFile error" +msgstr "Ошибка при разборе файла XML" + +#: ../src/xml-label.c:262 +msgid "No document root" +msgstr "Нет корня документа" + +#: ../src/xml-label.c:270 +msgid "Importing from glabels 0.1 format" +msgstr "Выполняется импорт из файла gLabels версии 0.1" + +#: ../src/xml-label.c:279 +msgid "Importing from glabels 0.4 format" +msgstr "Выполняется импорт из файла gLabels версии 0.4" + +#: ../src/xml-label.c:288 +#, fuzzy, c-format +msgid "Unknown glabels Namespace -- Using %s" +msgstr "документ неверного типа, неизвестное пространство имён glabels" + +#: ../src/xml-label.c:319 ../src/xml-label-04.c:79 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "Неверный корневой узел = \"%s\"" + +#: ../src/xml-label.c:356 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "Неверный узел в узле документа= \"%s\"" + +#: ../src/xml-label.c:401 ../src/xml-label-04.c:127 +#, c-format +msgid "bad node = \"%s\"" +msgstr "неверный узел = \"%s\"" + +#: ../src/xml-label.c:840 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "неверный узел в узле данных= \"%s\"" + +#: ../src/xml-label.c:1077 ../libglabels/xml-template.c:670 +msgid "Utf8 conversion error." +msgstr "Ошибка преобразования UTF8." + +#: ../src/xml-label.c:1084 +msgid "Problem saving xml file." +msgstr "Неполадки при сохранении файла XML." + +#: ../src/merge.c:170 ../src/merge.c:211 ../src/merge.c:375 ../src/merge.c:378 +msgid "None" +msgstr "Нет" + +#: ../src/merge-init.c:59 +msgid "Text file with comma delimeters (CSV)" +msgstr "Текст с разделителем «запятая» (CSV)" + +#: ../src/merge-init.c:66 +msgid "Text file with colon delimeters" +msgstr "Текст с разделителем «двоеточие»" + +#: ../src/merge-init.c:73 +msgid "Text file with tab delimeters" +msgstr "Текст с разделителем «символ табуляции»" + +#: ../src/merge-init.c:82 +msgid "Data from default Evolution Addressbook" +msgstr "Данные из используемой по умолчанию адресной книги Evolution" + +#: ../src/merge-init.c:88 +msgid "Data from a file containing VCards" +msgstr "Данные из файла, содержащего VCard" + +#: ../src/merge-evolution.c:309 +msgid "Couldn't construct query" +msgstr "Не удалось сформировать запрос." + +#: ../src/merge-evolution.c:315 ../src/merge-evolution.c:326 +msgid "Couldn't open addressbook." +msgstr "Не удалось открыть адресную книгу." + +#: ../src/merge-evolution.c:341 +msgid "Couldn't list available fields." +msgstr "Не удалось перечислить доступные поля." + +#: ../src/merge-evolution.c:377 +msgid "Couldn't get contacts." +msgstr "Не удалось получить контактные данные." + +#: ../src/color-combo.c:210 +msgid "Default Color" +msgstr "Цвет по умолчанию" + +#: ../src/color-combo-menu.c:86 +msgid "Dark Red" +msgstr "Тёмно-красный" + +#: ../src/color-combo-menu.c:87 +msgid "Brown" +msgstr "Коричневый" + +#: ../src/color-combo-menu.c:88 +msgid "Dark Goldenrod" +msgstr "Темный золотарник" + +#: ../src/color-combo-menu.c:89 +msgid "Dark Green" +msgstr "Тёмно-зелёный" + +#: ../src/color-combo-menu.c:90 +msgid "Dark Cyan" +msgstr "Темно-циановый" + +#: ../src/color-combo-menu.c:91 +msgid "Navy Blue" +msgstr "Тёмно-синий" + +#: ../src/color-combo-menu.c:92 +msgid "Dark Violet" +msgstr "Тёмно-фиолетовый" + +#: ../src/color-combo-menu.c:94 +msgid "Red" +msgstr "Красный" + +#: ../src/color-combo-menu.c:95 +msgid "Orange" +msgstr "Оранжевый" + +#: ../src/color-combo-menu.c:96 +msgid "Dark Yellow" +msgstr "Темно-желтый" + +#: ../src/color-combo-menu.c:97 +msgid "Medium green" +msgstr "Тускло-зелёный" + +#: ../src/color-combo-menu.c:98 +msgid "Turquoise" +msgstr "Бирюзовый" + +#: ../src/color-combo-menu.c:99 +msgid "Blue" +msgstr "Синий" + +#: ../src/color-combo-menu.c:100 +msgid "Purple" +msgstr "Пурпурный" + +#: ../src/color-combo-menu.c:102 +msgid "Salmon" +msgstr "Сомон" + +#: ../src/color-combo-menu.c:103 +msgid "Gold" +msgstr "Золотой" + +#: ../src/color-combo-menu.c:104 +msgid "Yellow" +msgstr "Жёлтый" + +#: ../src/color-combo-menu.c:105 +msgid "Green" +msgstr "Зелёный" + +#: ../src/color-combo-menu.c:106 +msgid "Cyan" +msgstr "Циановый" + +#: ../src/color-combo-menu.c:107 +msgid "SkyBlue" +msgstr "Небесно-синий" + +#: ../src/color-combo-menu.c:108 +msgid "Violet" +msgstr "Фиолетовый" + +#: ../src/color-combo-menu.c:110 +msgid "Pink" +msgstr "Розовый" + +#: ../src/color-combo-menu.c:111 +msgid "Khaki" +msgstr "Хаки" + +#: ../src/color-combo-menu.c:112 +msgid "Light Yellow" +msgstr "Светло-жёлтый" + +#: ../src/color-combo-menu.c:113 +msgid "Light Green" +msgstr "Светло-зелёный" + +#: ../src/color-combo-menu.c:114 +msgid "Light Cyan" +msgstr "Светло-циановый" + +#: ../src/color-combo-menu.c:115 +msgid "Slate Gray" +msgstr "Аспидно-серый" + +#: ../src/color-combo-menu.c:116 +msgid "Thistle" +msgstr "Чертополох" + +#: ../src/color-combo-menu.c:118 +msgid "White" +msgstr "Белый" + +#: ../src/color-combo-menu.c:119 +#, c-format +msgid "10% Gray" +msgstr "10% серый" + +#: ../src/color-combo-menu.c:120 +#, c-format +msgid "25% Gray" +msgstr "25% серый" + +#: ../src/color-combo-menu.c:121 +#, c-format +msgid "40% Gray" +msgstr "40% серый" + +#: ../src/color-combo-menu.c:122 +#, c-format +msgid "50% Gray" +msgstr "50% серый" + +#: ../src/color-combo-menu.c:123 +#, c-format +msgid "60% Gray" +msgstr "60% серый" + +#: ../src/color-combo-menu.c:124 +msgid "Black" +msgstr "Чёрный" + +#: ../src/color-combo-menu.c:252 ../src/color-combo-menu.c:369 +msgid "Custom Color" +msgstr "Заказной цвет:" + +#: ../src/color-combo-menu.c:317 +#, c-format +msgid "Custom Color #%u" +msgstr "Заказной цвет #%u" + +#: ../src/wdgt-print-copies.c:153 +msgid "Sheets:" +msgstr "Листов:" + +#: ../src/wdgt-print-copies.c:173 +msgid "from:" +msgstr "с:" + +#: ../src/wdgt-print-copies.c:179 +msgid "to:" +msgstr "по:" + +#: ../src/wdgt-print-merge.c:154 +msgid "Start on label" +msgstr "Начать с этикетки" + +#: ../src/wdgt-print-merge.c:161 +msgid "on 1st sheet" +msgstr "на первом листе" + +#: ../src/wdgt-print-merge.c:170 +msgid "Copies:" +msgstr "Копий:" + +#: ../src/wdgt-print-merge.c:176 +msgid "Collate" +msgstr "Собирать" + +#: ../src/wdgt-media-select.c:290 ../src/wdgt-media-select.c:294 +#: ../src/wdgt-media-select.c:299 ../src/wdgt-media-select.c:308 +#: ../src/wdgt-media-select.c:311 ../src/wdgt-media-select.c:404 +#: ../src/wdgt-media-select.c:611 ../src/wdgt-media-select.c:620 +msgid "Any" +msgstr "Любой вариант" + +#: ../src/wdgt-media-select.c:645 +#, c-format +msgid "%d per sheet" +msgstr "%d на лист" + +#: ../src/wdgt-media-select.c:675 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: ../src/wdgt-media-select.c:680 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: ../src/wdgt-media-select.c:691 ../src/wdgt-media-select.c:705 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s диаметр" + +#: ../src/wdgt-media-select.c:695 ../src/wdgt-media-select.c:709 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s диаметр" + +#: ../src/wdgt-media-select.c:783 +msgid "No recent templates found." +msgstr "Недавно открывавшихся шаблонов не обнаружено." + +#: ../src/wdgt-media-select.c:784 +msgid "Try selecting a template from the \"Search all templates\" page." +msgstr "Попробуйте выбрать шаблон на вкладке «Поиск по шаблонам»." + +#: ../src/wdgt-media-select.c:863 +msgid "No match." +msgstr "Нет совпадений." + +#: ../src/wdgt-media-select.c:864 +msgid "Try selecting a different brand, page size or category." +msgstr "Попробуйте выбрать другую марку, формат страницы или категорию" + +#: ../src/wdgt-rotate-label.c:129 +msgid "Normal" +msgstr "Обычное" + +#: ../src/wdgt-rotate-label.c:130 +msgid "Rotated" +msgstr "С поворотом" + +#: ../src/critical-error-handler.c:73 +msgid "gLabels Fatal Error!" +msgstr "Фатальная ошибка gLabels!" + +#: ../src/warning-handler.c:73 +msgid "gLabels Error!" +msgstr "Ошибка gLabels!" + +#. Create and append an "Other" entry. +#: ../libglabels/db.c:118 +msgid "Other" +msgstr "Другой" + +#. Create and append a "User defined" entry. +#: ../libglabels/db.c:131 +msgid "User defined" +msgstr "Определено пользователем" + +#: ../libglabels/db.c:482 +msgid "" +"Unable to locate paper size definitions. Libglabels may not be installed " +"correctly!" +msgstr "" + +#: ../libglabels/db.c:875 +msgid "" +"Unable to locate category definitions. Libglabels may not be installed " +"correctly!" +msgstr "" + +#: ../libglabels/db.c:1461 +msgid "" +"Unable to locate any template files. Libglabels may not be installed " +"correctly!" +msgstr "" + +#: ../libglabels/db.c:1538 +#, fuzzy, c-format +msgid "Generic %s full page template" +msgstr "Основная %s полная страница" + +#: ../libglabels/xml-template.c:227 +msgid "Missing name or brand/part attributes." +msgstr "" + +#. This should always be an id, but just in case a name +#. slips by! +#: ../libglabels/xml-template.c:244 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "" +"Неизвестный идентификатор размера страницы \"%s\", пробуем как название" + +#: ../libglabels/xml-template.c:256 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "Неизвестный идентификатор размера страницы или название \"%s\"" + +#: ../libglabels/xml-template.c:615 +msgid "" +"Missing required \"brand\" or \"part\" attribute, trying deprecated name." +msgstr "" + +#: ../libglabels/xml-template.c:625 +msgid "Name attribute also missing." +msgstr "Атрибут имени также отсутствует." + +#: ../data/builder/merge-properties-dialog.glade.h:1 +msgid "Record selection/preview" +msgstr "Просмотр и выбор записей" + +#: ../data/builder/merge-properties-dialog.glade.h:2 +msgid "Source" +msgstr "Источник" + +#: ../data/builder/merge-properties-dialog.glade.h:3 +msgid "Format:" +msgstr "Формат:" + +#: ../data/builder/merge-properties-dialog.glade.h:4 +msgid "Location:" +msgstr "Расположение:" + +#: ../data/builder/merge-properties-dialog.glade.h:5 +msgid "Select all" +msgstr "Выделить всё" + +#: ../data/builder/merge-properties-dialog.glade.h:6 +msgid "Unselect all" +msgstr "Снять выделение" + +#: ../data/builder/merge-properties-dialog.glade.h:7 +#: ../data/builder/object-editor.glade.h:39 +msgid "dialog1" +msgstr "dialog1" + +#: ../data/builder/new-label-dialog.glade.h:1 +msgid "Label orientation" +msgstr "Расположение этикетки" + +#: ../data/builder/new-label-dialog.glade.h:2 +msgid "Media type" +msgstr "Тип носителя" + +#: ../data/builder/object-editor.glade.h:2 +#, no-c-format +msgid "%" +msgstr "%" + +#: ../data/builder/object-editor.glade.h:3 +msgid "00000000000 00000" +msgstr "00000000000 00000" + +#: ../data/builder/object-editor.glade.h:4 +msgid "Xxx object properties" +msgstr "Xxx свойства объекта" + +#: ../data/builder/object-editor.glade.h:5 +#: ../data/builder/prefs-dialog.glade.h:7 +msgid "Alignment:" +msgstr "Выключка:" + +#: ../data/builder/object-editor.glade.h:6 +msgid "Allow merge to automatically shrink text" +msgstr "При заполнении данными текст обрезаем" + +#: ../data/builder/object-editor.glade.h:7 +msgid "Angle:" +msgstr "Угол:" + +#: ../data/builder/object-editor.glade.h:8 +msgid "Checksum" +msgstr "Контрольная сумма" + +#: ../data/builder/object-editor.glade.h:9 +#: ../data/builder/prefs-dialog.glade.h:8 +msgid "Color:" +msgstr "Цвет:" + +#: ../data/builder/object-editor.glade.h:11 +msgid "Enable shadow" +msgstr "Отбрасывать тень" + +#: ../data/builder/object-editor.glade.h:12 +msgid "Family:" +msgstr "Семейство:" + +#: ../data/builder/object-editor.glade.h:13 +msgid "File:" +msgstr "Файл:" + +#: ../data/builder/object-editor.glade.h:14 +msgid "Fill" +msgstr "Заливка" + +#: ../data/builder/object-editor.glade.h:15 +#: ../data/builder/template-designer.glade.h:30 +msgid "Height:" +msgstr "Высота:" + +#: ../data/builder/object-editor.glade.h:17 +msgid "Insert merge field" +msgstr "Вставить объединительное поле" + +#: ../data/builder/object-editor.glade.h:18 +msgid "Key:" +msgstr "Ключ:" + +#: ../data/builder/object-editor.glade.h:19 +msgid "Length:" +msgstr "Длина:" + +#: ../data/builder/object-editor.glade.h:21 +#: ../data/builder/prefs-dialog.glade.h:12 +msgid "Line Spacing:" +msgstr "Между строк:" + +#: ../data/builder/object-editor.glade.h:22 +msgid "Literal:" +msgstr "Код:" + +#: ../data/builder/object-editor.glade.h:23 +msgid "Opacity:" +msgstr "Непрозрачность:" + +#: ../data/builder/object-editor.glade.h:24 +msgid "Position" +msgstr "Расположение" + +#: ../data/builder/object-editor.glade.h:25 +msgid "Reset image size" +msgstr "Установить размер изображения по умолчанию" + +#: ../data/builder/object-editor.glade.h:26 +msgid "Select A File" +msgstr "Выберите файл" + +#: ../data/builder/object-editor.glade.h:27 +msgid "Shadow" +msgstr "Тень" + +#: ../data/builder/object-editor.glade.h:28 +msgid "Size" +msgstr "Размер" + +#: ../data/builder/object-editor.glade.h:29 +msgid "Size:" +msgstr "Размер:" + +#: ../data/builder/object-editor.glade.h:30 +msgid "Style" +msgstr "Стиль" + +#: ../data/builder/object-editor.glade.h:31 +msgid "Style:" +msgstr "Стиль:" + +#: ../data/builder/object-editor.glade.h:33 +#: ../data/builder/prefs-dialog.glade.h:20 +#: ../data/builder/template-designer.glade.h:61 +msgid "Width:" +msgstr "Ширина:" + +#: ../data/builder/object-editor.glade.h:34 +msgid "X Offset:" +msgstr "Смещение по X:" + +#: ../data/builder/object-editor.glade.h:35 +msgid "X:" +msgstr "X:" + +#: ../data/builder/object-editor.glade.h:36 +msgid "Y Offset:" +msgstr "Смещение по Y:" + +#: ../data/builder/object-editor.glade.h:37 +msgid "Y:" +msgstr "Y:" + +#: ../data/builder/object-editor.glade.h:38 +msgid "degrees" +msgstr "градусов" + +#: ../data/builder/object-editor.glade.h:40 +msgid "digits:" +msgstr "Цифр:" + +#: ../data/builder/object-editor.glade.h:41 +msgid "format:" +msgstr "Формат:" + +#: ../data/builder/prefs-dialog.glade.h:1 +msgid " " +msgstr " " + +#: ../data/builder/prefs-dialog.glade.h:2 +msgid "Default page size" +msgstr "Размер страницы по умолчанию" + +#: ../data/builder/prefs-dialog.glade.h:3 +msgid "Fill" +msgstr "Заливка" + +#: ../data/builder/prefs-dialog.glade.h:4 +msgid "Line" +msgstr "Обводка" + +#: ../data/builder/prefs-dialog.glade.h:5 +msgid "Text" +msgstr "Текст" + +#: ../data/builder/prefs-dialog.glade.h:6 +msgid "Units" +msgstr "Единицы измерения" + +#: ../data/builder/prefs-dialog.glade.h:9 +msgid "Font:" +msgstr "Шрифт:" + +#: ../data/builder/prefs-dialog.glade.h:10 +msgid "ISO A4" +msgstr "ISO A4" + +#: ../data/builder/prefs-dialog.glade.h:11 +msgid "Inches" +msgstr "Дюймы" + +#: ../data/builder/prefs-dialog.glade.h:13 +msgid "Locale" +msgstr "Местные параметры" + +#: ../data/builder/prefs-dialog.glade.h:14 +msgid "Millimeters" +msgstr "Миллиметры" + +#: ../data/builder/prefs-dialog.glade.h:15 +msgid "Object defaults" +msgstr "Свойства объектов по умолчанию" + +#: ../data/builder/prefs-dialog.glade.h:16 +msgid "Points" +msgstr "Пункты" + +#: ../data/builder/prefs-dialog.glade.h:17 +msgid "Select default properties for new objects." +msgstr "Укажите используемые по умолчанию свойства новых объектов " + +#: ../data/builder/prefs-dialog.glade.h:18 +msgid "Select locale specific behavior." +msgstr "Укажите местные параметры" + +#. Most popular (at top of list) +#: ../data/builder/prefs-dialog.glade.h:19 +#: ../data/templates/paper-sizes.xml.h:29 +msgid "US Letter" +msgstr "US Letter" + +#: ../data/builder/print-custom-widget.glade.h:1 +msgid "Options" +msgstr "Параметры" + +#: ../data/builder/print-custom-widget.glade.h:2 +msgid "Print control (Merge)" +msgstr "Управление печатью (объединение)" + +#: ../data/builder/print-custom-widget.glade.h:3 +msgid "Print control (Simple)" +msgstr "Управление печатью (простая)" + +#: ../data/builder/property-bar.glade.h:1 +msgid "Bold" +msgstr "Жирный" + +#: ../data/builder/property-bar.glade.h:2 +msgid "Center align" +msgstr "Выровнять по центру" + +#: ../data/builder/property-bar.glade.h:4 +msgid "Font family" +msgstr "Гарнитура" + +#: ../data/builder/property-bar.glade.h:5 +msgid "Font size" +msgstr "Размер шрифта" + +#: ../data/builder/property-bar.glade.h:6 +msgid "Italic" +msgstr "Курсив" + +#: ../data/builder/property-bar.glade.h:7 +msgid "Left align" +msgstr "Выровнять слева" + +#: ../data/builder/property-bar.glade.h:9 +msgid "Line width" +msgstr "Толщина линии" + +#: ../data/builder/property-bar.glade.h:10 +msgid "Right align" +msgstr "Выровнять справа" + +#: ../data/builder/property-bar.glade.h:11 +msgid "Text Color" +msgstr "Цвет текста" + +#: ../data/builder/template-designer.glade.h:1 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(например, «Почтовые этикетки,» «Визитные карточки,» ...)" + +#: ../data/builder/template-designer.glade.h:2 +msgid "(e.g., 8163A)" +msgstr "(например, 8163A)" + +#: ../data/builder/template-designer.glade.h:3 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(например, Avery, Acme, ...)" + +#: ../data/builder/template-designer.glade.h:4 +msgid "1. Outer radius:" +msgstr "1. Наружный радиус:" + +#: ../data/builder/template-designer.glade.h:5 +msgid "1. Radius:" +msgstr "1. Радиус:" + +#: ../data/builder/template-designer.glade.h:6 +msgid "1. Width:" +msgstr "1. Ширина:" + +#: ../data/builder/template-designer.glade.h:7 +msgid "2. Height:" +msgstr "2. Высота:" + +#: ../data/builder/template-designer.glade.h:8 +msgid "2. Inner radius:" +msgstr "2. Внутренний радиус:" + +#: ../data/builder/template-designer.glade.h:9 +msgid "2. Waste (overprint allowed):" +msgstr "2. Пустое поле (на нём можно будет печать):" + +#: ../data/builder/template-designer.glade.h:10 +msgid "3. Clipping width:" +msgstr "3. Ширина для обрезки:" + +#: ../data/builder/template-designer.glade.h:11 +msgid "3. Margin" +msgstr "3. Поле" + +#: ../data/builder/template-designer.glade.h:12 +msgid "3. Round (radius of corner):" +msgstr "3. Закругление (радиус вершины):" + +#: ../data/builder/template-designer.glade.h:13 +msgid "4. Clipping height:" +msgstr "4. Высота обрезки:" + +#: ../data/builder/template-designer.glade.h:14 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "4. Пустое гориз. пространство (может быть заполнено):" + +#: ../data/builder/template-designer.glade.h:15 +msgid "5. Vert. waste (overprint allowed):" +msgstr "5. Пустое верт. пространство (может быть заполнено):" + +#: ../data/builder/template-designer.glade.h:16 +msgid "5. Waste (overprint allowed):" +msgstr "5. Пустое пространство (может быть заполнено):" + +#: ../data/builder/template-designer.glade.h:17 +msgid "6. Margin" +msgstr "6. Поле" + +#: ../data/builder/template-designer.glade.h:18 +msgid "Brand/Manufacturer:" +msgstr "Производитель или торговая марка:" + +#: ../data/builder/template-designer.glade.h:19 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD (включая CD размером с визитку)" + +#: ../data/builder/template-designer.glade.h:20 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"Поздравляем!\n" +"\n" +"Вы завершили создание шаблона в gLabels.\n" +"Для сохранения результата нажмите кнопку «Применить».\n" +"\n" +"Вы также можете нажать кнопку «Отменить», чтобы не сохранять,\n" +"либо кнопку «Назад», чтобы продолжить редактирование." + +#: ../data/builder/template-designer.glade.h:27 +msgid "Description:" +msgstr "Описание:" + +#: ../data/builder/template-designer.glade.h:28 +msgid "Distance from left edge (x0):" +msgstr "Расстояние от левого угла (x0):" + +#: ../data/builder/template-designer.glade.h:29 +msgid "Distance from top edge (y0):" +msgstr "Расстояние от верхнего угла (y0)" + +#: ../data/builder/template-designer.glade.h:31 +msgid "Horizontal pitch (dx):" +msgstr "Интервал по горизонтали (dx):" + +#: ../data/builder/template-designer.glade.h:32 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" +"Сколько макетов будет содержать шаблон? \n" +"\n" +"Макет — это набор этикеток или визиток, которые могут быть распределены по " +"простой сетке.\n" +"Большинству шаблонов требуется только один макет, как в первом примере.\n" +"Второй пример иллюстрирует случай, когда необходимо применять два макета." + +#: ../data/builder/template-designer.glade.h:37 +msgid "Layout #1" +msgstr "Макет №1" + +#: ../data/builder/template-designer.glade.h:38 +msgid "Layout #2" +msgstr "Макет №2" + +#: ../data/builder/template-designer.glade.h:39 +msgid "Number across (nx):" +msgstr "По горизонтали (nx):" + +#: ../data/builder/template-designer.glade.h:40 +msgid "Number down (ny):" +msgstr "По вертикали (ny):" + +#: ../data/builder/template-designer.glade.h:41 +msgid "Number of layouts:" +msgstr "Количество макетов:" + +#: ../data/builder/template-designer.glade.h:42 +#: ../data/builder/wdgt-media-select.glade.h:3 +msgid "Page size:" +msgstr "Формат страницы:" + +#: ../data/builder/template-designer.glade.h:43 +msgid "Part #:" +msgstr "Часть №:" + +#: ../data/builder/template-designer.glade.h:44 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "Укажите следующую идентификационную информацию для бланка." + +#: ../data/builder/template-designer.glade.h:45 +msgid "Please enter the following layout information." +msgstr "Введите следующую информацию об оформлении." + +#: ../data/builder/template-designer.glade.h:46 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "Введите геометрические размеры одиночной этикетки в вашем шаблоне." + +#: ../data/builder/template-designer.glade.h:47 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" +"Введите геометрические размеры одиночной этикетки или визитки в вашем " +"шаблоне." + +#: ../data/builder/template-designer.glade.h:48 +msgid "Please select the basic shape of the labels or cards." +msgstr "Выберите основную фигуру этикетки или карточки." + +#: ../data/builder/template-designer.glade.h:49 +msgid "Please select the page size of the template stationery." +msgstr "Выберите размер страницы для шаблона." + +#: ../data/builder/template-designer.glade.h:50 +msgid "Print test sheet" +msgstr "Напечатать тестовую страницу" + +#: ../data/builder/template-designer.glade.h:51 +msgid "Rectangular or square (can have rounded corners)" +msgstr "Прямоугольник или квадрат (может иметь скруглённые края)" + +#: ../data/builder/template-designer.glade.h:52 +msgid "Round" +msgstr "Круг" + +#: ../data/builder/template-designer.glade.h:53 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"Для данного шаблона\n" +"требуется две формы." + +#: ../data/builder/template-designer.glade.h:55 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"Для данного шаблона требуется\n" +"только одна форма." + +#: ../data/builder/template-designer.glade.h:57 +msgid "Vertical pitch (dy):" +msgstr "Интервал по вертикали (dy):" + +#: ../data/builder/template-designer.glade.h:58 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"Добро пожаловать в Дизайнер шаблонов gLabels.\n" +"\n" +"Этот диалог будет сопровождать вас в создании вашего собственного шаблона " +"gLabels." + +#: ../data/builder/template-designer.glade.h:62 +msgid "cd_size_page" +msgstr "" + +#: ../data/builder/template-designer.glade.h:63 +msgid "finish_page" +msgstr "" + +#: ../data/builder/template-designer.glade.h:65 +msgid "layout_page" +msgstr "" + +#: ../data/builder/template-designer.glade.h:66 +msgid "name_page" +msgstr "" + +#: ../data/builder/template-designer.glade.h:67 +msgid "nlayouts_page" +msgstr "" + +#: ../data/builder/template-designer.glade.h:68 +msgid "pg_size_page" +msgstr "" + +#: ../data/builder/template-designer.glade.h:69 +msgid "rect_size_page" +msgstr "" + +#: ../data/builder/template-designer.glade.h:70 +msgid "round_size_page" +msgstr "" + +#: ../data/builder/template-designer.glade.h:71 +msgid "shape_page" +msgstr "" + +#: ../data/builder/template-designer.glade.h:72 +msgid "start_page" +msgstr "" + +#: ../data/builder/wdgt-media-select.glade.h:1 +msgid "Brand:" +msgstr "Марка:" + +#: ../data/builder/wdgt-media-select.glade.h:2 +msgid "Category:" +msgstr "Категория:" + +#: ../data/builder/wdgt-media-select.glade.h:4 +msgid "Recent templates" +msgstr "Недавние шаблоны" + +#: ../data/builder/wdgt-media-select.glade.h:5 +msgid "Search all templates" +msgstr "Поиск по шаблонам" + +#. Other ISO A series sizes +#: ../data/templates/paper-sizes.xml.h:2 +msgid "A0" +msgstr "A0" + +#: ../data/templates/paper-sizes.xml.h:3 +msgid "A1" +msgstr "A1" + +#: ../data/templates/paper-sizes.xml.h:4 +msgid "A10" +msgstr "A10" + +#: ../data/templates/paper-sizes.xml.h:5 +msgid "A2" +msgstr "A2" + +#: ../data/templates/paper-sizes.xml.h:6 +msgid "A3" +msgstr "A3" + +#: ../data/templates/paper-sizes.xml.h:7 +msgid "A4" +msgstr "A4" + +#: ../data/templates/paper-sizes.xml.h:8 +msgid "A5" +msgstr "A5" + +#: ../data/templates/paper-sizes.xml.h:9 +msgid "A6" +msgstr "A6" + +#: ../data/templates/paper-sizes.xml.h:10 +msgid "A7" +msgstr "A7" + +#: ../data/templates/paper-sizes.xml.h:11 +msgid "A8" +msgstr "A8" + +#: ../data/templates/paper-sizes.xml.h:12 +msgid "A9" +msgstr "A9" + +#. ISO B series sizes +#: ../data/templates/paper-sizes.xml.h:14 +msgid "B0" +msgstr "B0" + +#: ../data/templates/paper-sizes.xml.h:15 +msgid "B1" +msgstr "B1" + +#: ../data/templates/paper-sizes.xml.h:16 +msgid "B10" +msgstr "B10" + +#: ../data/templates/paper-sizes.xml.h:17 +msgid "B2" +msgstr "B2" + +#: ../data/templates/paper-sizes.xml.h:18 +msgid "B3" +msgstr "B3" + +#: ../data/templates/paper-sizes.xml.h:19 +msgid "B4" +msgstr "B4" + +#: ../data/templates/paper-sizes.xml.h:20 +msgid "B5" +msgstr "B5" + +#: ../data/templates/paper-sizes.xml.h:21 +msgid "B6" +msgstr "B6" + +#: ../data/templates/paper-sizes.xml.h:22 +msgid "B7" +msgstr "B7" + +#: ../data/templates/paper-sizes.xml.h:23 +msgid "B8" +msgstr "B8" + +#: ../data/templates/paper-sizes.xml.h:24 +msgid "B9" +msgstr "B9" + +#: ../data/templates/paper-sizes.xml.h:25 +msgid "US Executive" +msgstr "US Executive" + +#. Other US paper sizes +#: ../data/templates/paper-sizes.xml.h:27 +msgid "US Legal" +msgstr "US Legal" + +#: ../data/templates/categories.xml.h:1 +msgid "Any card" +msgstr "Любые карточки" + +#: ../data/templates/categories.xml.h:2 +msgid "Any label" +msgstr "Любые этикетки" + +#: ../data/templates/categories.xml.h:3 +msgid "Business cards" +msgstr "Визитные карточки" + +#: ../data/templates/categories.xml.h:4 +msgid "CD/DVD or other media" +msgstr "CD/DVD и прочие носители" + +#: ../data/templates/categories.xml.h:5 +msgid "Mailing/shipping products" +msgstr "Корреспонденция" + +#: ../data/templates/categories.xml.h:6 +msgid "Rectangular labels" +msgstr "Прямоугольные этикетки" + +#: ../data/templates/categories.xml.h:7 +msgid "Round labels" +msgstr "Круглые этикетки" + +#: ../data/templates/categories.xml.h:8 +msgid "Square labels" +msgstr "Квадратные этикетки" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:2 +#: ../data/templates/avery-iso-templates.xml.h:2 +#: ../data/templates/dymo-other-templates.xml.h:4 +#: ../data/templates/misc-iso-templates.xml.h:2 +#: ../data/templates/zweckform-iso-templates.xml.h:2 +msgid "Address Labels" +msgstr "Этикетка с адресом" + +#. =================================================================== +#. ============================================================ +#. =================================================================== +#. ******************************************************************** +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:4 +#: ../data/templates/avery-iso-templates.xml.h:8 +#: ../data/templates/misc-us-templates.xml.h:4 +#: ../data/templates/misc-iso-templates.xml.h:12 +#: ../data/templates/zweckform-iso-templates.xml.h:6 +msgid "Business Cards" +msgstr "Визитные карточки" + +#. =================================================================== +#. =============================================================== +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:6 +#: ../data/templates/avery-iso-templates.xml.h:14 +#: ../data/templates/misc-us-templates.xml.h:8 +#: ../data/templates/misc-iso-templates.xml.h:16 +#: ../data/templates/zweckform-iso-templates.xml.h:8 +msgid "CD/DVD Labels" +msgstr "Этикетки для CD/DVD" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:8 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "Наклейки для CD/DVD (наклейки на диск)" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:10 +msgid "CD/DVD Labels (Spine Labels)" +msgstr "Наклейки на CD/DVD" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:12 +#: ../data/templates/avery-iso-templates.xml.h:16 +msgid "Diskette Labels" +msgstr "Наклейки на дискеты" + +#. the LSK labels can be torn in half down the center +#: ../data/templates/avery-us-templates.xml.h:14 +#, fuzzy +msgid "Divider Labels" +msgstr "Этикетки для CD" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:16 +msgid "Filing Labels" +msgstr "Заполняемые этикетки" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:18 +msgid "Full Sheet Labels" +msgstr "Этикетки на всю страницу" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:20 +msgid "ID Labels" +msgstr "Идентификационные этикетки" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:22 +#, fuzzy +msgid "Index Cards" +msgstr "Визитные карточки" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:24 +msgid "Large Round Labels" +msgstr "Этикетки с большим закруглением" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:26 +msgid "Name Badge Labels" +msgstr "Именной бейджик" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:28 +msgid "Post cards" +msgstr "Почтовые открытки" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:30 +#: ../data/templates/dymo-other-templates.xml.h:12 +msgid "Return Address Labels" +msgstr "Наклейка для обратного адреса" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:32 +#: ../data/templates/misc-us-templates.xml.h:28 +msgid "Round Labels" +msgstr "Круглые этикетки" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:34 +msgid "Shipping Labels" +msgstr "Ценники" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:36 +msgid "Small Round Labels" +msgstr "Маленькие круглые этикетки" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:38 +msgid "Square Labels" +msgstr "Прямоугольные этикетки" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:40 +msgid "Tent Cards" +msgstr "" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:42 +msgid "Video Tape Face Labels" +msgstr "Лицевые наклейки на видеокассету" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:44 +msgid "Video Tape Spine Labels" +msgstr "Торцевые наклейки на видеокассету" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:4 +msgid "Address labels" +msgstr "Адресные наклейки" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:6 +#, fuzzy +msgid "Allround labels" +msgstr "Маленькие круглые этикетки" + +#. =============================================================== +#: ../data/templates/avery-iso-templates.xml.h:10 +msgid "CD Booklet" +msgstr "Вкладыш в CD" + +#. =============================================================== +#: ../data/templates/avery-iso-templates.xml.h:12 +msgid "CD Inlet" +msgstr "Буклет для CD" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:18 +msgid "Diskette labels" +msgstr "Наклейки на дискеты" + +#. =============================================================== +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:20 +#: ../data/templates/misc-us-templates.xml.h:18 +#: ../data/templates/misc-iso-templates.xml.h:36 +#: ../data/templates/zweckform-iso-templates.xml.h:16 +msgid "Mailing Labels" +msgstr "Почтовые этикетки" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:22 +msgid "Mailing labels" +msgstr "Почтовые наклейки" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:24 +msgid "Mini Address Labels" +msgstr "Маленькие наклейки с адресом" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:26 +#, fuzzy +msgid "Mini Labels" +msgstr "Этикетки для Мини-CD" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:28 +msgid "Shipping labels" +msgstr "Ценники" + +#. =================================================================== +#: ../data/templates/avery-other-templates.xml.h:2 +msgid "File Folder Labels" +msgstr "Наклейки для папок" + +#: ../data/templates/brother-other-templates.xml.h:1 +msgid "Multi Purpose Labels 17mm x 54mm" +msgstr "" + +#: ../data/templates/brother-other-templates.xml.h:2 +#, fuzzy +msgid "Shipping Labels 62mm x 100mm" +msgstr "Ценники" + +#. +#. ********************************************************************* +#. ********************************************************************* +#. Labels for the Brother QL-500/550/650 PC Label Printers +#. +#. These templates work with the Brother Linux Printer CUPS Driver. It +#. is unknown if these work correctly with the foomatic print driver for +#. these printers. +#. +#. One difference from typical templates is that the template size is +#. not the actual media size - it is the size of the printable area, +#. which is smaller than the media size. This is because (at least with +#. the Brother driver) coordinates are relative the corner of this area. +#. +#. ********************************************************************* +#. ********************************************************************* +#. +#: ../data/templates/brother-other-templates.xml.h:20 +#, fuzzy +msgid "Standard Address Labels 29mm x 90mm" +msgstr "Этикетка с адресом" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:2 +msgid "3.5in Diskette" +msgstr "Дискета 3,5 дюйма" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:6 +msgid "File Folder" +msgstr "Папка для файлов" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:8 +msgid "Hanging Folder" +msgstr "" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:10 +msgid "Large Address Labels" +msgstr "Большие наклейки с адресом" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:14 +#, fuzzy +msgid "Shipping Address Labels" +msgstr "Маленькие наклейки с адресом" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:2 +msgid "Business Card CD" +msgstr "Визитная карточка на CD" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:6 +msgid "CD Template Rectangles" +msgstr "Прямоугольный шаблон для CD" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:10 +msgid "CD/DVD Labels (Face Only)" +msgstr "Наклейки для CD/DVD (лицевая сторона)" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:12 +#: ../data/templates/misc-iso-templates.xml.h:18 +msgid "CD/DVD Labels (face only)" +msgstr "Вкладыши CD/DVD (лицевая сторона)" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:14 +msgid "Cassette Labels" +msgstr "Наклейки на кассеты" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:16 +msgid "DLT Labels" +msgstr "Этикетки на DLT" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:20 +msgid "Microtube labels" +msgstr "Этикетки для Microtube" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:22 +msgid "Mini-CD Labels" +msgstr "Этикетки для Мини-CD" + +#: ../data/templates/misc-us-templates.xml.h:23 +#, fuzzy +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "CD CD" + +#: ../data/templates/misc-us-templates.xml.h:24 +#, fuzzy +msgid "PRO CD Labels 2-up (Face only)" +msgstr "CD" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:26 +#: ../data/templates/misc-iso-templates.xml.h:42 +#, fuzzy +msgid "PRO CD Labels 2-up (face only)" +msgstr "CD" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:30 +msgid "Slimline CD Case (rightside up)" +msgstr "Тонкие коробки для CD (правая сторона вверху)" + +#: ../data/templates/misc-us-templates.xml.h:31 +msgid "Slimline CD Case (upside down)" +msgstr "Тонкие коробки для CD (кверх ногами)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:4 +#: ../data/templates/zweckform-iso-templates.xml.h:4 +msgid "Allround Labels" +msgstr "" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:6 +#, fuzzy +msgid "Arch File Labels" +msgstr "Файл" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:8 +#, fuzzy +msgid "Arch File Labels (large)" +msgstr "Файл большой" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:10 +#, fuzzy +msgid "Arch File Labels (small)" +msgstr "Файл маленький" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:14 +msgid "CD Labels" +msgstr "Этикетки для CD" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:20 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "Наклейки стандартного формата для CD/DVD (лицевая сторона)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:22 +msgid "Diskette Labels (face only)" +msgstr "Наклейки для дискет (лицевая сторона)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:24 +msgid "EPSON Photo Stickers 16" +msgstr "EPSON Photo Stickers 16" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:26 +msgid "Etiketten" +msgstr "Этикетки" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:28 +msgid "Fridge Magnet Stickers" +msgstr "Магнитные стикеры для холодильника" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:30 +msgid "General Labels" +msgstr "Этикетки общего назначения" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:32 +msgid "Inkjet/Laser Labels 70x37mm" +msgstr "" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:38 +msgid "Mailing Labels-2 columns" +msgstr "" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:40 +msgid "Mailing Labels-3 columns" +msgstr "" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:44 +#: ../data/templates/zweckform-iso-templates.xml.h:24 +msgid "Rectangular Labels" +msgstr "Прямоугольные метки" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:46 +msgid "Video Labels (face only)" +msgstr "Наклейки на видеокассеты (лицевая сторона)" + +#. =================================================================== +#: ../data/templates/misc-other-templates.xml.h:2 +#, fuzzy +msgid "Multi-Purpose Labels" +msgstr "Этикетки для Microtube" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:10 +msgid "Correction and Cover-up Labels" +msgstr "Исправляющие и покрывающие метки" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:12 +#, fuzzy +msgid "File Back Labels" +msgstr "Заполняемые этикетки" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:14 +#, fuzzy +msgid "Lever Arch File Labels" +msgstr "Файл" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:18 +msgid "Multi-purpose Stick+Lift Labels" +msgstr "" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:20 +#, fuzzy +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "x" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:22 +msgid "Rectangular Copier Labels" +msgstr "" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:26 +msgid "Video Labels (back)" +msgstr "Видеонаклейки (оборотная сторона)" + +#: ../data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "Создание этикеток, визитных карточек и вкладышей для дисков" + +#: ../data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "Дизайнер этикеток gLabels" + +#: ../data/mime/glabels.keys.in.h:1 ../data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "Файл проекта gLabels" + +#: ../barcode-0.98/compat/getopt.c:583 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "" + +#: ../barcode-0.98/compat/getopt.c:607 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "" + +#: ../barcode-0.98/compat/getopt.c:612 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "" + +#: ../barcode-0.98/compat/getopt.c:629 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "" + +#. --option +#: ../barcode-0.98/compat/getopt.c:658 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: неизвестный ключ `--%s'\n" + +#. +option or -option +#: ../barcode-0.98/compat/getopt.c:662 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: неизвестный ключ `%c%s'\n" + +#. 1003.2 specifies the format of this message. +#: ../barcode-0.98/compat/getopt.c:688 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "" + +#: ../barcode-0.98/compat/getopt.c:691 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: некорректный ключ -- %c\n" + +#: ../barcode-0.98/compat/getopt.c:727 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: ключу необходим аргумент -- %c\n" + +#~ msgid "- gLabels label designer" +#~ msgstr "— дизайнер этикеток gLabels" + +#~ msgid "- batch process gLabels label files" +#~ msgstr "— пакетная обработка файлов этикеток gLabels" + +#~ msgid "Show tooltips" +#~ msgstr "Показывать подсказки" + +#~ msgid "Show tooltips for property toolbar" +#~ msgstr "Показывать подсказки на панели свойств" + +#~ msgid "Show tooltips for main toolbar" +#~ msgstr "Показывать подсказки в главной панели инструментов" + +#~ msgid "Show tooltips for drawing toolbar" +#~ msgstr "Показывать подсказки в панели рисования" + +#~ msgid "custom" +#~ msgstr "выборочно" + +#~ msgid "Choose Custom Color" +#~ msgstr "Выберите пользовательский цвет" + +#~ msgid "light brown" +#~ msgstr "светло-коричневый" + +#~ msgid "brown gold" +#~ msgstr "золотой коричневый" + +#~ msgid "dark green #2" +#~ msgstr "чёрно-зелёный №2" + +#~ msgid "navy" +#~ msgstr "морской" + +#~ msgid "purple #2" +#~ msgstr "пурпурный №2" + +#~ msgid "very dark gray" +#~ msgstr "очень тёмно-серый" + +#~ msgid "red-orange" +#~ msgstr "красно-оранжевый" + +#~ msgid "dull blue" +#~ msgstr "тускло-синий" + +#~ msgid "dull purple" +#~ msgstr "тускло-пурпурный" + +#~ msgid "dark grey" +#~ msgstr "тёмно-серый" + +#~ msgid "red" +#~ msgstr "красный" + +#~ msgid "lime" +#~ msgstr "лимонный" + +#~ msgid "dull blue #2" +#~ msgstr "тускло-синий №2" + +#~ msgid "sky blue #2" +#~ msgstr "небесно-синий №2" + +#~ msgid "gray" +#~ msgstr "серый" + +#~ msgid "magenta" +#~ msgstr "малиновый" + +#~ msgid "bright orange" +#~ msgstr "ярко-оранжевый" + +#~ msgid "bright blue" +#~ msgstr "ярко-синий" + +#~ msgid "red purple" +#~ msgstr "красно-пурпурный" + +#~ msgid "light grey" +#~ msgstr "светло-серый" + +#~ msgid "light orange" +#~ msgstr "светло-оранжевый" + +#~ msgid "light blue" +#~ msgstr "светло-синий" + +#~ msgid "light purple" +#~ msgstr "светло-пурпурный" + +#~ msgid "purplish blue" +#~ msgstr "пурпурно-синий" + +#~ msgid "dark purple" +#~ msgstr "тёмно-пурпурный" + +#~ msgid "Text color" +#~ msgstr "Цвет текста" + +#~ msgid " " +#~ msgstr " " + +#~ msgid " " +#~ msgstr " " + +#~ msgid "Could not initialize Bonobo!\n" +#~ msgstr "Невозможно инициализировать Bonobo!\n" + +#~ msgid "print this message" +#~ msgstr "напечатать это сообщение" + +#~ msgid "print the version of glabels-batch being used" +#~ msgstr "выводит версию используемого glabels-batch" + +#~ msgid "[OPTION...] GLABELS_FILE..." +#~ msgstr "[ПАРАМЕТРЫ...] файл_glabels..." + +#~ msgid "missing glabels file\n" +#~ msgstr "не указан файл glabels\n" + +#~ msgid "Open" +#~ msgstr "Открыть" + +#~ msgid "Align _Horizontally" +#~ msgstr "Выровнять _горизонтально" + +#~ msgid "Align _Vertically" +#~ msgstr "Выровнять _вертикально" + +#~ msgid "_Delete" +#~ msgstr "У_далить" + +#~ msgid "Print" +#~ msgstr "Напечатать" + +#~ msgid "_Job" +#~ msgstr "_Задание" + +#~ msgid "P_rinter" +#~ msgstr "П_ринтер" + +#~ msgid "Copies" +#~ msgstr "Копий" + +#~ msgid "Document merge control" +#~ msgstr "Управление объединением" + +#~ msgid "Print preview" +#~ msgstr "Просмотреть" + +#~ msgid "Importing from glabels 1.91 format" +#~ msgstr "Импортируем из формата glabels версии 1.91" + +#~ msgid "Label size:" +#~ msgstr "Размер этикетки:" + +#~ msgid "Layout:" +#~ msgstr "Формат:" + +#~ msgid "%d x %d (%d per sheet)" +#~ msgstr "%d x %d (%d на лист)" + +#~ msgid "No paper files found!" +#~ msgstr "Не найдены файлы описания бумаги!" + +#~ msgid "Close" +#~ msgstr "Закрыть" + +#~ msgid "Cu_t" +#~ msgstr "_Вырезать" + +#~ msgid "Customize" +#~ msgstr "Настроить" + +#~ msgid "Customize toolbars" +#~ msgstr "Настроить панель инструментов" + +#~ msgid "Dump XML" +#~ msgstr "Дамп XML" + +#~ msgid "Dump the UI Xml description" +#~ msgstr "Дамп XML-описания UI" + +#~ msgid "Font selector" +#~ msgstr "Выбор шрифта" + +#~ msgid "Icon and _Text" +#~ msgstr "Пиктограмма и _Текст" + +#~ msgid "M_arkup" +#~ msgstr "_Разметка" + +#~ msgid "New" +#~ msgstr "Создать" + +#~ msgid "Object property editor" +#~ msgstr "Редактор свойств объекта" + +#~ msgid "Only show icons in the main toolbar" +#~ msgstr "Показывать только картинки в главной панели инструментов" + +#~ msgid "Pr_eferences..." +#~ msgstr "_Настроить..." + +#~ msgid "Properties" +#~ msgstr "Свойства" + +#~ msgid "Quit" +#~ msgstr "Выйти" + +#~ msgid "Redo the undone action" +#~ msgstr "Повторить отменённое действие" + +#~ msgid "Save" +#~ msgstr "Сохранить" + +#~ msgid "Save As" +#~ msgstr "Сохранить как" + +#~ msgid "Select _All" +#~ msgstr "Выбрать вс_ё" + +#~ msgid "Set main toolbar button style according to desktop default" +#~ msgstr "" +#~ "Установить стиль кнопок главной панели инструментов согласно настройкам " +#~ "рабочего стола" + +#~ msgid "Show both icons and texts in the main toolbar" +#~ msgstr "Показывать и пиктограммы и текст в главной панели инструментов" + +#~ msgid "Template Designer" +#~ msgstr "Дизайнер шаблонов" + +#~ msgid "U_n-select All" +#~ msgstr "_Снять выделение со всего" + +#~ msgid "Undo" +#~ msgstr "Отменить" + +#~ msgid "Undo the last action" +#~ msgstr "Отменить последнее действие" + +#~ msgid "_About..." +#~ msgstr "_О программе..." + +#~ msgid "_Bottoms" +#~ msgstr "По _низу" + +#~ msgid "_Contents" +#~ msgstr "_Содержание справки" + +#~ msgid "_Copy" +#~ msgstr "_Запомнить" + +#~ msgid "_Create Object" +#~ msgstr "_Создать объект" + +#~ msgid "_Debug" +#~ msgstr "_Отладка" + +#~ msgid "_Desktop Default" +#~ msgstr "_Согласно настройкам рабочего стола" + +#~ msgid "_Drawing Toolbar" +#~ msgstr "Показывать панель _рисования" + +#~ msgid "_Icon" +#~ msgstr "_Пиктограмма" + +#~ msgid "_Main Toolbar" +#~ msgstr "Показывать панель _инструментов" + +#~ msgid "_Merge Properties..." +#~ msgstr "_Свойства объединения..." + +#~ msgid "_Paste" +#~ msgstr "Вст_авить" + +#~ msgid "_Property Toolbar" +#~ msgstr "Показывать панель с_войств" + +#~ msgid "*" +#~ msgstr "*" + +#~ msgid "Load image" +#~ msgstr "Загрузить изображение" + +#~ msgid "Label or Card Size (Rectangular)" +#~ msgstr "Развер этикетки или визитки (прямоугольник)" diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100644 index 00000000..af9acb41 --- /dev/null +++ b/po/zh_CN.po @@ -0,0 +1,2670 @@ +# German translation of glabels. +# Copyright (C) 2001-2008 Jim Evins +# +msgid "" +msgstr "" +"Project-Id-Version: glabels\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-05-17 14:09+0800\n" +"PO-Revision-Date: 2009-05-19 20:16-0400\n" +"Last-Translator: Careon \n" +"Language-Team: Careon \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +#: ../src/glabels.c:66 ../src/glabels-batch.c:69 +msgid "[FILE...]" +msgstr "[文件...]" + +#: ../src/glabels.c:83 +msgid "Launch gLabels label and business card designer." +msgstr "启动gLabels标签和名片设计软件。" + +#: ../src/glabels.c:91 ../src/glabels-batch.c:105 +#, c-format +msgid "" +"%s\n" +"Run '%s --help' to see a full list of available command line options.\n" +msgstr "" +"%s\n" +"运行'%s --help'来查看可用的命令参数。\n" + +#: ../src/glabels-batch.c:53 +msgid "set output filename (default=\"output.pdf\")" +msgstr "输出文件名(默认值=\"output.pdf\")" + +#: src/glabels-batch.c:56 src/glabels-batch.c:70 +msgid "filename" +msgstr "文件名" + +#: src/glabels-batch.c:54 +msgid "number of sheets (default=1)" +msgstr "每页数量(默认值=1)" + +#: src/glabels-batch.c:54 +msgid "sheets" +msgstr "数量" + +#: src/glabels-batch.c:56 +msgid "number of copies (default=1)" +msgstr "副本数量(默认值=1)" + +#: src/glabels-batch.c:56 +msgid "copies" +msgstr "副本" + +#: ../src/glabels-batch.c:59 +msgid "first label on first sheet (default=1)" +msgstr "第1页的第1个标签 (默认值=1)" + +#: ../src/glabels-batch.c:59 +msgid "first" +msgstr "第1个" + +#: src/glabels-batch.c:64 src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "打印外框线(用于校正打印机)" + +#: src/glabels-batch.c:66 src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "反转打印 (例如对称)" + +#: ../src/glabels-batch.c:65 ../data/builder/print-custom-widget.glade.h:4 +msgid "print crop marks" +msgstr "打印裁剪标记" + +#: ../src/glabels-batch.c:67 +msgid "input file for merging" +msgstr "输入要插入的文件名" + +#: ../src/glabels-batch.c:97 +msgid "Print files created with gLabels." +msgstr "打印gLabels文件。" + +#: ../src/glabels-batch.c:147 +#, c-format +msgid "cannot perform document merge with glabels file %s\n" +msgstr "" +"无法合并glabels文件%s \n" + +#: ../src/glabels-batch.c:169 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "无法打开glabels文件 %s\n" + +#: ../src/window.c:259 +msgid "(none) - gLabels" +msgstr "(无) - gLabels" + +#: src/window.c:414 +msgid "(modified)" +msgstr "(已修改)" + +#: src/stock.c:65 data/ui/glabels-ui.xml.h:162 +msgid "_Select Mode" +msgstr "选择模式(_S)" + +#: src/stock.c:66 data/ui/glabels-ui.xml.h:163 +msgid "_Text" +msgstr "文字(_T)" + +#: src/stock.c:67 data/ui/glabels-ui.xml.h:148 +msgid "_Line" +msgstr "线条(_L)" + +#: src/stock.c:68 data/ui/glabels-ui.xml.h:130 +msgid "_Box" +msgstr "矩形(_B)" + +#: src/stock.c:69 data/ui/glabels-ui.xml.h:141 +msgid "_Ellipse" +msgstr "椭圆(_E)" + +#: src/stock.c:70 +msgid "_Image" +msgstr "图片(_I)" + +#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 +msgid "Bar_code" +msgstr "条形码(_C)" + +#: src/stock.c:72 +msgid "_Merge Properties" +msgstr "合并属性(_M)" + +#: src/stock.c:73 +msgid "Object _Properties" +msgstr "对象属性(_P)" + +#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 +msgid "Bring to _Front" +msgstr "移到上层(_F)" + +#: src/stock.c:75 data/ui/glabels-ui.xml.h:109 +msgid "Send to _Back" +msgstr "移到下层(_B)" + +#: src/stock.c:76 data/ui/glabels-ui.xml.h:96 +msgid "Rotate _Left" +msgstr "向左旋转(_L)" + +#: src/stock.c:77 data/ui/glabels-ui.xml.h:97 +msgid "Rotate _Right" +msgstr "向右旋转(_R)" + +#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "水平翻转(_H)" + +#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "垂直翻转(_V)" + +#: src/stock.c:80 data/ui/glabels-ui.xml.h:147 +msgid "_Lefts" +msgstr "靠左(_L)" + +#: src/stock.c:81 data/ui/glabels-ui.xml.h:159 +msgid "_Rights" +msgstr "靠右(_R)" + +#: src/stock.c:82 data/ui/glabels-ui.xml.h:131 +msgid "_Centers" +msgstr "居中(_C)" + +#: src/stock.c:83 data/ui/glabels-ui.xml.h:164 +msgid "_Tops" +msgstr "顶部(_T)" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "底部" + +#: src/stock.c:85 +msgid "Centers" +msgstr "居中" + +#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "标签中心(_N)" + +#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "填充色" + +#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "线条颜色" + +#: src/stock.c:90 src/stock.c:92 +msgid "Linked" +msgstr "相连" + +#: src/stock.c:91 src/stock.c:93 +msgid "Not Linked" +msgstr "不相连" + +#. Menu entries. +#: ../src/ui.c:93 +msgid "_File" +msgstr "文件(_F)" + +#: ../src/ui.c:94 +msgid "Open Recent _Files" +msgstr "打开最近的文件(_F)" + +#: ../src/ui.c:95 +msgid "_Edit" +msgstr "编辑(_E)" + +#: ../src/ui.c:96 +msgid "_View" +msgstr "查看(_V)" + +#: ../src/ui.c:97 +msgid "Customize Main Toolbar" +msgstr "自定义主工具栏" + +#: ../src/ui.c:98 +msgid "Customize Drawing Toolbar" +msgstr "自定义绘图栏" + +#: ../src/ui.c:99 +msgid "Customize Properties Toolbar" +msgstr "自定义属性栏" + +#: ../src/ui.c:100 +msgid "_Objects" +msgstr "对象(_O)" + +#: ../src/ui.c:101 +msgid "_Create" +msgstr "新建(_C)" + +#: ../src/ui.c:102 +msgid "_Order" +msgstr "排序(_O)" + +#: ../src/ui.c:103 +msgid "_Rotate/Flip" +msgstr "旋转/翻转(_R)" + +#: ../src/ui.c:104 +msgid "Align _Horizontal" +msgstr "水平对齐(_H)" + +#: ../src/ui.c:105 +msgid "Align _Vertical" +msgstr "垂直对齐(_V)" + +#: ../src/ui.c:106 +msgid "_Help" +msgstr "帮助(_H)" + +#. Popup entries. +#: ../src/ui.c:109 ../src/ui.c:110 +msgid "Context Menu" +msgstr "右键菜单" + +#: ../src/ui.c:115 +msgid "_New" +msgstr "新建(_N)" + +#: ../src/ui.c:117 +msgid "Create a new file" +msgstr "新建文件" + +#: ../src/ui.c:122 +msgid "_Open..." +msgstr "打开(_O)..." + +#: ../src/ui.c:124 +msgid "Open a file" +msgstr "打开文件" + +#: ../src/ui.c:129 +msgid "_Save" +msgstr "保存(_S)" + +#: ../src/ui.c:131 +msgid "Save current file" +msgstr "保存当前文件" + +#: ../src/ui.c:136 +msgid "Save _As..." +msgstr "另存为(_A)..." + +#: ../src/ui.c:138 +msgid "Save the current file to a different name" +msgstr "保存当前文件为其它文件名" + +#: ../src/ui.c:143 +msgid "_Print..." +msgstr "打印(_P)..." + +#: ../src/ui.c:145 +msgid "Print the current file" +msgstr "打印当前文件" + +#: ../src/ui.c:150 +msgid "Properties..." +msgstr "属性..." + +#: ../src/ui.c:152 +msgid "Modify document properties" +msgstr "修改文档属性" + +#: ../src/ui.c:157 +msgid "Template _Designer..." +msgstr "模板设计工具(_D)..." + +#: ../src/ui.c:159 +msgid "Create a custom template" +msgstr "新建一个模板" + +#: ../src/ui.c:164 +msgid "_Close" +msgstr "关闭(_C)" + +#: ../src/ui.c:166 +msgid "Close the current file" +msgstr "关闭当前文件" + +#: ../src/ui.c:171 +msgid "_Quit" +msgstr "退出(_Q)" + +#: ../src/ui.c:173 +msgid "Quit the program" +msgstr "退出程序" + +#: ../src/ui.c:180 +msgid "Cut" +msgstr "剪切" + +#: ../src/ui.c:182 +msgid "Cut the selection" +msgstr "剪切选中的内容" + +#: ../src/ui.c:187 +msgid "Copy" +msgstr "复制" + +#: ../src/ui.c:189 +msgid "Copy the selection" +msgstr "复制选中的内容" + +#: ../src/ui.c:194 +msgid "Paste" +msgstr "粘贴" + +#: ../src/ui.c:196 +msgid "Paste the clipboard" +msgstr "粘贴到剪贴板" + +#: ../src/ui.c:201 +msgid "Delete" +msgstr "删除" + +#: ../src/ui.c:203 +msgid "Delete the selected objects" +msgstr "删除选中的对象" + +#: ../src/ui.c:208 +msgid "Select All" +msgstr "全选" + +#: ../src/ui.c:210 +msgid "Select all objects" +msgstr "选中全部对象" + +#: ../src/ui.c:215 +msgid "Un-select All" +msgstr "取消全选" + +#: ../src/ui.c:217 +msgid "Remove all selections" +msgstr "删除全部选中的内容" + +#: ../src/ui.c:222 +msgid "Preferences" +msgstr "参数" + +#: ../src/ui.c:224 +msgid "Configure the application" +msgstr "对程序进行设置" + +#: ../src/ui.c:231 +msgid "Zoom in" +msgstr "放大" + +#: ../src/ui.c:233 +msgid "Increase magnification" +msgstr "放大" + +#: ../src/ui.c:238 +msgid "Zoom out" +msgstr "缩小" + +#: ../src/ui.c:240 +msgid "Decrease magnification" +msgstr "缩小" + +#: ../src/ui.c:245 +msgid "Zoom 1 to 1" +msgstr "1:1 缩放" + +#: ../src/ui.c:247 +msgid "Restore scale to 100%" +msgstr "缩放到实际大小的 100% " + +#: ../src/ui.c:252 +msgid "Zoom to fit" +msgstr "最佳比例" + +#: ../src/ui.c:254 +msgid "Set scale to fit window" +msgstr "缩放到适合窗口" + +#: ../src/ui.c:261 +msgid "Select Mode" +msgstr "模式选择" + +#: ../src/ui.c:263 +msgid "Select, move and modify objects" +msgstr "选择,移动或删除对象" + +#: ../src/ui.c:268 ../src/view-text.c:494 +#: ../data/builder/object-editor.glade.h:32 +msgid "Text" +msgstr "文字" + +#: ../src/ui.c:270 +msgid "Create text object" +msgstr "新建文字对象" + +#: ../src/ui.c:275 +msgid "Box" +msgstr "矩形" + +#: ../src/ui.c:277 +msgid "Create box/rectangle object" +msgstr "新建矩形对象" + +#: ../src/ui.c:282 ../data/builder/object-editor.glade.h:20 +msgid "Line" +msgstr "线条" + +#: ../src/ui.c:284 +msgid "Create line object" +msgstr "新建线条对象" + +#: ../src/ui.c:289 +msgid "Ellipse" +msgstr "椭圆" + +#: ../src/ui.c:291 +msgid "Create ellipse/circle object" +msgstr "新建 椭圆/圆 对象" + +#: ../src/ui.c:296 ../data/builder/object-editor.glade.h:16 +msgid "Image" +msgstr "图片" + +#: ../src/ui.c:298 +msgid "Create image object" +msgstr "新建图片对象" + +#: ../src/ui.c:303 +msgid "Barcode" +msgstr "条形码" + +#: ../src/ui.c:305 +msgid "Create barcode object" +msgstr "新建条形码" + +#: ../src/ui.c:310 +msgid "Bring to front" +msgstr "移到上层" + +#: ../src/ui.c:312 +msgid "Raise object to top" +msgstr "移到最顶端" + +#: ../src/ui.c:317 +msgid "Send to back" +msgstr "移到下层" + +#: ../src/ui.c:319 +msgid "Lower object to bottom" +msgstr "把下层对象移到最底层" + +#: ../src/ui.c:324 +msgid "Rotate left" +msgstr "向左旋转" + +#: ../src/ui.c:326 +msgid "Rotate object 90 degrees counter-clockwise" +msgstr "向左旋转90度" + +#: ../src/ui.c:331 +msgid "Rotate right" +msgstr "向右旋转" + +#: ../src/ui.c:333 +msgid "Rotate object 90 degrees clockwise" +msgstr "向右旋转90度" + +#: ../src/ui.c:338 +msgid "Flip horizontally" +msgstr "水平翻转" + +#: ../src/ui.c:340 +msgid "Flip object horizontally" +msgstr "水平翻转对象" + +#: ../src/ui.c:345 +msgid "Flip vertically" +msgstr "垂直翻转" + +#: ../src/ui.c:347 +msgid "Flip object vertically" +msgstr "垂直翻转对象" + +#: ../src/ui.c:352 +msgid "Align left" +msgstr "左对齐" + +#: ../src/ui.c:354 +msgid "Align objects to left edges" +msgstr "多个对象与左边界对齐" + +#: ../src/ui.c:359 +msgid "Align right" +msgstr "右对齐" + +#: ../src/ui.c:361 +msgid "Align objects to right edges" +msgstr "多个对象与左边界对齐" + +#: ../src/ui.c:366 +msgid "Align horizontal center" +msgstr "水平中心共线" + +#: ../src/ui.c:368 +msgid "Align objects to horizontal centers" +msgstr "多个对象的水平中心共线" + +#: ../src/ui.c:373 +msgid "Align tops" +msgstr "顶端对齐" + +#: ../src/ui.c:375 +msgid "Align objects to top edges" +msgstr "多个对象与上边界对齐" + +#: ../src/ui.c:380 +msgid "Align bottoms" +msgstr "底部对齐" + +#: ../src/ui.c:382 +msgid "Align objects to bottom edges" +msgstr "多个对象与下边界对齐" + +#: ../src/ui.c:387 +msgid "Align vertical center" +msgstr "垂直中心共线" + +#: ../src/ui.c:389 +msgid "Align objects to vertical centers" +msgstr "多个对象的垂直中心共线" + +#: ../src/ui.c:394 +msgid "Center horizontally" +msgstr "水平居中" + +#: ../src/ui.c:396 +msgid "Center objects to horizontal label center" +msgstr "对象中心与水平中心重合" + +#: ../src/ui.c:401 +msgid "Center vertically" +msgstr "垂直居中" + +#: ../src/ui.c:403 +msgid "Center objects to vertical label center" +msgstr "对象中心与垂直中心重合" + +#: ../src/ui.c:408 +msgid "Merge properties" +msgstr "合并属性" + +#: ../src/ui.c:410 +msgid "Edit merge properties" +msgstr "编辑合并属性" + +#: ../src/ui.c:417 +msgid "Contents" +msgstr "内容" + +#: ../src/ui.c:419 +msgid "Open glabels manual" +msgstr "打开glabels帮助手册" + +#: ../src/ui.c:424 +msgid "About..." +msgstr "关于..." + +#: ../src/ui.c:426 +msgid "About glabels" +msgstr "关于glabels" + +# CHECK +#: ../src/ui.c:436 +msgid "Property toolbar" +msgstr "属性栏" + +#: ../src/ui.c:438 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "改变当前窗口中属性栏的可视性" + +#: ../src/ui.c:444 +msgid "Grid" +msgstr "单元格" + +#: ../src/ui.c:446 +msgid "Change the visibility of the grid in the current window" +msgstr "改变当前窗口中单元格的可视性" + +#: ../src/ui.c:452 +msgid "Markup" +msgstr "标记" + +#: ../src/ui.c:454 +msgid "Change the visibility of markup lines in the current window" +msgstr "改变当前窗口中标记线条的可视性" + +#: ../src/ui.c:465 +msgid "Main toolbar" +msgstr "主工具栏" + +#: ../src/ui.c:467 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "改变当前窗口中主工具栏的可视性" + +#: ../src/ui.c:473 +msgid "Drawing toolbar" +msgstr "绘图栏" + +#: ../src/ui.c:475 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "改变当前窗口中绘图栏的可视性" + +#: ../src/ui-property-bar.c:279 ../src/prefs-dialog.c:328 +#: ../src/object-editor-bc-page.c:93 ../src/object-editor-text-page.c:93 +#: ../src/object-editor-shadow-page.c:93 +msgid "Default" +msgstr "默认值" + +#: ../src/ui-property-bar.c:291 ../src/prefs-dialog.c:334 +#: ../src/object-editor-fill-page.c:79 +msgid "No Fill" +msgstr "没有填充" + +#: ../src/ui-property-bar.c:303 ../src/prefs-dialog.c:331 +#: ../src/object-editor-line-page.c:81 +msgid "No Line" +msgstr "没有线条" + +#: ../src/ui-sidebar.c:152 +msgid "Object properties" +msgstr "对象属性" + +#: ../src/ui-commands.c:1064 +msgid "Glabels includes contributions from:" +msgstr "Glabels 包括的发布内容来自:" + +#: ../src/ui-commands.c:1070 +msgid "See the file AUTHORS for additional credits," +msgstr "查看AUTHORS文件来获得更多信息," + +#: ../src/ui-commands.c:1071 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "或者访问 http://glabels.sourceforge.net/" + +#: ../src/ui-commands.c:1083 +msgid "A label and business card creation program.\n" +msgstr "一个标签和名片设计程序。\n" + +#: ../src/ui-commands.c:1087 +msgid "translator-credits" +msgstr "" +"Marcus Bauer \n" +"Christian Neumair \n" +"Mario Blättermann \n" +"Careone " + +#: ../src/ui-commands.c:1090 +msgid "" +"Glabels is free software; you can redistribute it and/or modify it\n" +"under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but\n" +"WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" +"the GNU General Public License for more details.\n" +msgstr "" +"Glabels is free software; you can redistribute it and/or modify it\n" +"under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" +"This program is distributed in the hope that it will be useful, but\n" +"WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See\n" +"the GNU General Public License for more details.\n" + +#: ../src/ui-commands.c:1116 +msgid "glabels" +msgstr "glabels" + +#: ../src/file.c:91 +msgid "New Label or Card" +msgstr "新建标签或名片" + +#: ../src/file.c:191 +msgid "Label properties" +msgstr "标签属性" + +#: ../src/file.c:292 ../src/file.c:578 +msgid "All files" +msgstr "全部文件" + +#: ../src/file.c:297 ../src/file.c:583 +msgid "gLabels documents" +msgstr "gLabels文件(.glabels)" + +#: ../src/file.c:343 ../src/file.c:640 +msgid "Empty file name selection" +msgstr "没有选择文件" + +#: ../src/file.c:346 ../src/file.c:362 +msgid "Please select a file or supply a valid file name" +msgstr "请选择文件,或输入文件名" + +#: src/file.c:519 src/file.c:631 +msgid "File does not exist" +msgstr "文件不存在" + +#: ../src/file.c:433 +#, c-format +msgid "Could not open file \"%s\"" +msgstr "无法打开文件 \"%s\"" + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "不支持的文件格式" + +#: ../src/file.c:513 ../src/file.c:690 +#, c-format +msgid "Could not save file \"%s\"" +msgstr "无法保存文件 \"%s\"" + +#: src/file.c:805 src/file.c:987 src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "保存时出错。文件没有保存。" + +#: ../src/file.c:556 +#, c-format +msgid "Save \"%s\" as" +msgstr " \"%s\" 另存为" + +#: src/file.c:935 src/file.c:1131 +msgid "Please supply a valid file name" +msgstr "请输入文件名" + +#: ../src/file.c:664 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "覆盖文件 \"%s\"?" + +#: src/file.c:960 src/file.c:1155 +msgid "File already exists." +msgstr "已有同名文件。" + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "在关闭前先保存文件 \"%s\"?" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "如果不保存,所做的更改会丢失。" + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "关闭(不保存)" + +#. Should not happen +#: ../src/prefs.c:159 ../src/prefs.c:166 +#: ../data/builder/object-editor.glade.h:43 +#: ../data/builder/prefs-dialog.glade.h:22 +msgid "points" +msgstr "像素" + +#: src/prefs.c:158 data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "英寸" + +#: src/prefs.c:160 +msgid "mm" +msgstr "mm" + +#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 +msgid "gLabels Preferences" +msgstr "gLabels参数" + +#. Build editor. +#: ../src/view-box.c:175 +msgid "Box object properties" +msgstr "矩形属性" + +#. Build editor. +#: src/view-ellipse.c:224 +msgid "Ellipse object properties" +msgstr "椭圆属性" + +#. Build editor. +#: src/view-line.c:224 +msgid "Line object properties" +msgstr "线条属性" + +#. Build editor. +#: src/view-image.c:223 +msgid "Image object properties" +msgstr "图片属性" + +#. Build editor. +#: src/view-text.c:251 +msgid "Text object properties" +msgstr "文字属性" + +#. Build editor. +#: ../src/view-barcode.c:174 +msgid "Barcode object properties" +msgstr "条形码属性" + +#: ../src/object-editor-image-page.c:267 +msgid "All Files" +msgstr "全部文件" + +#: ../src/object-editor-image-page.c:272 +msgid "All Images" +msgstr "全部图片" + +#: ../src/object-editor-image-page.c:287 +#, c-format +msgid "%s (*.%s)" +msgstr "%s (*.%s)" + +#: ../src/merge-properties-dialog.c:271 +msgid "Merge Properties" +msgstr "合并属性" + +#: ../src/merge-properties-dialog.c:297 ../src/merge-properties-dialog.c:405 +msgid "Select merge-database source" +msgstr "选择要插入的数据" + +#: ../src/merge-properties-dialog.c:306 ../src/merge-properties-dialog.c:425 +msgid "N/A" +msgstr "无" + +#: ../src/merge-properties-dialog.c:332 +msgid "Select" +msgstr "选择" + +#: ../src/merge-properties-dialog.c:340 +msgid "Record/Field" +msgstr "记录/区域" + +#: ../src/merge-properties-dialog.c:348 +#: ../data/builder/object-editor.glade.h:10 +msgid "Data" +msgstr "数据" + +#: ../src/merge-properties-dialog.c:418 +msgid "Fixed" +msgstr "固定值" + +#. =================================================================== +#: ../src/print-op.c:242 ../src/wdgt-print-copies.c:171 +#: ../data/templates/misc-iso-templates.xml.h:34 +msgid "Labels" +msgstr "标签" + +#: ../src/template-designer.c:411 +msgid "gLabels Template Designer" +msgstr "gLabels 模板设计工具r" + +#: ../src/template-designer.c:481 +msgid "Welcome" +msgstr "欢迎" + +#: ../src/template-designer.c:534 +msgid "Name and Description" +msgstr "名称和说明" + +#: ../src/template-designer.c:595 +msgid "Page Size" +msgstr "纸张尺寸" + +#: ../src/template-designer.c:675 +msgid "Label or Card Shape" +msgstr "标签或名片形状" + +#: ../src/template-designer.c:735 +msgid "Label or Card Size" +msgstr "标签或名片尺寸" + +#: ../src/template-designer.c:844 +msgid "Label Size (round)" +msgstr "标签尺寸(圆形)" + +#: ../src/template-designer.c:935 +msgid "Label Size (CD/DVD)" +msgstr "标签尺寸(CD/DVD)" + +#: ../src/template-designer.c:1036 +msgid "Number of Layouts" +msgstr "布局个数" + +#: ../src/template-designer.c:1110 +msgid "Layout(s)" +msgstr "布局" + +#: ../src/template-designer.c:1229 +msgid "Design Completed" +msgstr "设计完成" + +#: ../src/template-designer.c:1396 +msgid "" +"Brand and part# match an existing " +"template!" +msgstr "" +"模板中已有的品牌和规格" + +#: ../src/bc.c:67 +msgid "POSTNET (any)" +msgstr "POSTNET (通用)" + +#: ../src/bc.c:70 +msgid "POSTNET-5 (ZIP only)" +msgstr "POSTNET-5 (用于邮编)" + +#: ../src/bc.c:73 +msgid "POSTNET-9 (ZIP+4)" +msgstr "POSTNET-9 (ZIP+4)" + +#: ../src/bc.c:76 +msgid "POSTNET-11 (DPBC)" +msgstr "POSTNET-11 (DPBC)" + +#: ../src/bc.c:79 +msgid "CEPNET" +msgstr "CEPNET" + +#: ../src/bc.c:82 +msgid "EAN (any)" +msgstr "EAN (通用)" + +#: ../src/bc.c:85 +msgid "EAN-8" +msgstr "EAN-8" + +#: ../src/bc.c:88 +msgid "EAN-8 +2" +msgstr "EAN-8 +2" + +#: ../src/bc.c:91 +msgid "EAN-8 +5" +msgstr "EAN-8 +5" + +#: ../src/bc.c:94 +msgid "EAN-13" +msgstr "EAN-13" + +#: ../src/bc.c:97 +msgid "EAN-13 +2" +msgstr "EAN-13 +2" + +#: ../src/bc.c:100 +msgid "EAN-13 +5" +msgstr "EAN-13 +5" + +#: ../src/bc.c:103 +msgid "UPC (UPC-A or UPC-E)" +msgstr "UPC (UPC-A 或者 UPC-E)" + +#: ../src/bc.c:106 +msgid "UPC-A" +msgstr "UPC-A" + +#: ../src/bc.c:109 +msgid "UPC-A +2" +msgstr "UPC-A +2" + +#: ../src/bc.c:112 +msgid "UPC-A +5" +msgstr "UPC-A +5" + +#: ../src/bc.c:115 +msgid "UPC-E" +msgstr "UPC-E" + +#: ../src/bc.c:118 +msgid "UPC-E +2" +msgstr "UPC-E +2" + +#: ../src/bc.c:121 +msgid "UPC-E +5" +msgstr "UPC-E +5" + +#: ../src/bc.c:124 +msgid "ISBN" +msgstr "ISBN" + +#: ../src/bc.c:127 +msgid "ISBN +5" +msgstr "ISBN +5" + +#: ../src/bc.c:130 +msgid "Code 39" +msgstr "Code 39" + +#: ../src/bc.c:133 +msgid "Code 128" +msgstr "Code 128" + +#: ../src/bc.c:136 +msgid "Code 128C" +msgstr "Code 128C" + +#: ../src/bc.c:139 +msgid "Code 128B" +msgstr "Code 128B" + +#: ../src/bc.c:142 +msgid "Interleaved 2 of 5" +msgstr "Interleaved 2 of 5" + +#: ../src/bc.c:145 +msgid "Codabar" +msgstr "Codabar" + +#: ../src/bc.c:148 +msgid "MSI" +msgstr "MSI" + +#: ../src/bc.c:151 +msgid "Plessey" +msgstr "Plessey" + +#: ../src/bc.c:154 +msgid "IEC16022 (DataMatrix)" +msgstr "IEC16022 (DataMatrix)" + +#: ../src/label.c:531 +msgid "Untitled" +msgstr "未命名" + +#: ../src/label-barcode.c:426 +msgid "Barcode data empty" +msgstr "空条形码数据" + +#: ../src/label-barcode.c:430 +msgid "Invalid barcode data" +msgstr "条形码数据无效" + +#: ../src/xml-label.c:189 ../src/xml-label.c:226 +msgid "xmlParseFile error" +msgstr "xml文件语法错误" + +#: ../src/xml-label.c:262 +msgid "No document root" +msgstr "没有文档根" + +#: ../src/xml-label.c:270 +msgid "Importing from glabels 0.1 format" +msgstr "导入glabels 0.1格式" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "导入glabels 0.4格式" + +#: ../src/xml-label.c:288 +#, c-format +msgid "Unknown glabels Namespace -- Using %s" +msgstr "未知的glabels文件名称 -- 使用 %s" + +#: ../src/xml-label.c:319 ../src/xml-label-04.c:79 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "错误的根地址 = \"%s\"" + +#: ../src/xml-label.c:356 +#, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "文档地址内有错误点 = \"%s\"" + +#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "错误点 = \"%s\"" + +#: src/xml-label.c:796 src/xml-label-191.c:605 +#, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "数据地址内有错误点 = \"%s\"" + +#: src/xml-label.c:962 libglabels/xml-template.c:535 +msgid "Utf8 conversion error." +msgstr "UTF-8编码转换错误。" + +#: src/xml-label.c:969 libglabels/xml-template.c:542 +msgid "Problem saving xml file." +msgstr "保存xml文件时出错。" + +#: ../src/merge.c:170 ../src/merge.c:211 ../src/merge.c:375 ../src/merge.c:378 +msgid "None" +msgstr "无" + +#: ../src/merge-init.c:59 +msgid "Text file with comma delimeters (CSV)" +msgstr "用逗号分隔的文本文件 (CSV)" + +#: src/merge-init.c:60 +msgid "Text file with colon delimeters" +msgstr "用冒号分隔的文本文件 (CSV)" + +#: src/merge-init.c:67 +msgid "Text file with tab delimeters" +msgstr "用制表符分隔的文本文件 (CSV)" + +#: ../src/merge-init.c:82 +msgid "Data from default Evolution Addressbook" +msgstr "从Evolution导出的通迅录" + +#: ../src/merge-init.c:88 +msgid "Data from a file containing VCards" +msgstr "从VCards文件导出的数据" + +#: ../src/merge-evolution.c:309 +msgid "Couldn't construct query" +msgstr "不能查询数据组" + +#: ../src/merge-evolution.c:315 ../src/merge-evolution.c:326 +msgid "Couldn't open addressbook." +msgstr "不能打开通迅录" + +#: ../src/merge-evolution.c:341 +msgid "Couldn't list available fields." +msgstr "无法显示有效区域。" + +#: ../src/merge-evolution.c:377 +msgid "Couldn't get contacts." +msgstr "无法读取通迅录信息。" + +#: ../src/color-combo.c:210 +msgid "Default Color" +msgstr "默认颜色" + +#: ../src/color-combo-menu.c:86 +msgid "Dark Red" +msgstr "暗红" + +#: ../src/color-combo-menu.c:87 +msgid "Brown" +msgstr "棕色" + +#: ../src/color-combo-menu.c:88 +msgid "Dark Goldenrod" +msgstr "暗黄" + +#: ../src/color-combo-menu.c:89 +msgid "Dark Green" +msgstr "暗绿" + +#: ../src/color-combo-menu.c:90 +msgid "Dark Cyan" +msgstr "暗品红" + +#: ../src/color-combo-menu.c:91 +msgid "Navy Blue" +msgstr "海水蓝" + +#: ../src/color-combo-menu.c:92 +msgid "Dark Violet" +msgstr "紫黑" + +#: ../src/color-combo-menu.c:94 +msgid "Red" +msgstr "红色" + +#: ../src/color-combo-menu.c:95 +msgid "Orange" +msgstr "桔红" + +#: ../src/color-combo-menu.c:96 +msgid "Dark Yellow" +msgstr "暗黄" + +#: ../src/color-combo-menu.c:97 +msgid "Medium green" +msgstr "中等绿" + +#: ../src/color-combo-menu.c:98 +msgid "Turquoise" +msgstr "蓝绿" + +#: ../src/color-combo-menu.c:99 +msgid "Blue" +msgstr "蓝色" + +#: ../src/color-combo-menu.c:100 +msgid "Purple" +msgstr "紫红" + +#: ../src/color-combo-menu.c:102 +msgid "Salmon" +msgstr "马哈鱼色" + +#: ../src/color-combo-menu.c:103 +msgid "Gold" +msgstr "金黄" + +#: ../src/color-combo-menu.c:104 +msgid "Yellow" +msgstr "黄色" + +#: ../src/color-combo-menu.c:105 +msgid "Green" +msgstr "绿色" + +#: ../src/color-combo-menu.c:106 +msgid "Cyan" +msgstr "蓝绿色" + +#: ../src/color-combo-menu.c:107 +msgid "SkyBlue" +msgstr "天空蓝" + +#: ../src/color-combo-menu.c:108 +msgid "Violet" +msgstr "紫色" + +#: ../src/color-combo-menu.c:110 +msgid "Pink" +msgstr "粉红" + +#: ../src/color-combo-menu.c:111 +msgid "Khaki" +msgstr "浅棕黄色" + +#: ../src/color-combo-menu.c:112 +msgid "Light Yellow" +msgstr "浅黄" + +#: ../src/color-combo-menu.c:113 +msgid "Light Green" +msgstr "浅绿" + +#: ../src/color-combo-menu.c:114 +msgid "Light Cyan" +msgstr "浅品红色" + +#: ../src/color-combo-menu.c:115 +msgid "Slate Gray" +msgstr "石灰白" + +#: ../src/color-combo-menu.c:116 +msgid "Thistle" +msgstr "" + +#: ../src/color-combo-menu.c:118 +msgid "White" +msgstr "白色" + +#: ../src/color-combo-menu.c:119 +#, c-format +msgid "10% Gray" +msgstr "10% 灰色" + +#: ../src/color-combo-menu.c:120 +#, c-format +msgid "25% Gray" +msgstr "25% 灰色" + +#: ../src/color-combo-menu.c:121 +#, c-format +msgid "40% Gray" +msgstr "40% 灰色" + +#: ../src/color-combo-menu.c:122 +#, c-format +msgid "50% Gray" +msgstr "50% 灰色" + +#: ../src/color-combo-menu.c:123 +#, c-format +msgid "60% Gray" +msgstr "60% 灰色" + +#: ../src/color-combo-menu.c:124 +msgid "Black" +msgstr "黑色" + +#: ../src/color-combo-menu.c:252 ../src/color-combo-menu.c:369 +msgid "Custom Color" +msgstr "自定义颜色" + +#: ../src/color-combo-menu.c:317 +#, c-format +msgid "Custom Color #%u" +msgstr "自定义颜色 #%u" + +#: ../src/wdgt-print-copies.c:153 +msgid "Sheets:" +msgstr "页码:" + +#: ../src/wdgt-print-copies.c:173 +msgid "from:" +msgstr "从:" + +#: ../src/wdgt-print-copies.c:179 +msgid "to:" +msgstr "到:" + +#: ../src/wdgt-print-merge.c:154 +msgid "Start on label" +msgstr "启动后直接打开标签" + +#: ../src/wdgt-print-merge.c:161 +msgid "on 1st sheet" +msgstr "在第1页" + +#: ../src/wdgt-print-merge.c:170 +msgid "Copies:" +msgstr "副本" + +#: ../src/wdgt-print-merge.c:176 +msgid "Collate" +msgstr "集合" + +#: ../src/wdgt-media-select.c:290 ../src/wdgt-media-select.c:294 +#: ../src/wdgt-media-select.c:299 ../src/wdgt-media-select.c:308 +#: ../src/wdgt-media-select.c:311 ../src/wdgt-media-select.c:404 +#: ../src/wdgt-media-select.c:611 ../src/wdgt-media-select.c:620 +msgid "Any" +msgstr "通用" + +#: ../src/wdgt-media-select.c:645 +#, c-format +msgid "%d per sheet" +msgstr "每页 %d" + +#: ../src/wdgt-media-select.c:675 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: ../src/wdgt-media-select.c:680 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: ../src/wdgt-media-select.c:691 ../src/wdgt-media-select.c:705 +#, c-format +msgid "%s %s diameter" +msgstr "%s %s 直径" + +#: ../src/wdgt-media-select.c:695 ../src/wdgt-media-select.c:709 +#, c-format +msgid "%.5g %s diameter" +msgstr "%.5g %s 直径" + +#: ../src/wdgt-media-select.c:783 +msgid "No recent templates found." +msgstr "最近没有使用模板。" + +#: ../src/wdgt-media-select.c:784 +msgid "Try selecting a template from the \"Search all templates\" page." +msgstr "请从 \"查找全部模板\" 页面中选择一个模板。" + +#: ../src/wdgt-media-select.c:863 +msgid "No match." +msgstr "不相符。" + +#: ../src/wdgt-media-select.c:864 +msgid "Try selecting a different brand, page size or category." +msgstr "请选择其它品牌,纸张尺寸或类型。" + +#: ../src/wdgt-rotate-label.c:129 +msgid "Normal" +msgstr "正常" + +#: ../src/wdgt-rotate-label.c:130 +msgid "Rotated" +msgstr "旋转" + +#: ../src/critical-error-handler.c:73 +msgid "gLabels Fatal Error!" +msgstr "gLabels出现严重错误!" + +#: ../src/warning-handler.c:73 +msgid "gLabels Error!" +msgstr "gLabels错误!" + +#. Create and append an "Other" entry. +#: ../libglabels/db.c:118 +msgid "Other" +msgstr "其它" + +#. Create and append a "User defined" entry. +#: ../libglabels/db.c:131 +msgid "User defined" +msgstr "自定义的" + +#: ../libglabels/db.c:482 +msgid "" +"Unable to locate paper size definitions. Libglabels may not be installed " +"correctly!" +msgstr "找不到纸张尺寸定义文件。可能是glabels的库文件没有正确安装。" + +#: ../libglabels/db.c:875 +msgid "" +"Unable to locate category definitions. Libglabels may not be installed " +"correctly!" +msgstr "" +"找不到类型定义文件。可能是glabels的库文件没有正确安装。" + +#: ../libglabels/db.c:1461 +msgid "" +"Unable to locate any template files. Libglabels may not be installed " +"correctly!" +msgstr "" +"找不到模板文件。可能是glabels的库文件没有正确安装。" + +#: ../libglabels/db.c:1538 +#, c-format +msgid "Generic %s full page template" +msgstr "普通的整页模板 %s" + +#: ../libglabels/xml-template.c:227 +msgid "Missing name or brand/part attributes." +msgstr "名称或品牌/规格 属性不完整。" + +#. This should always be an id, but just in case a name +#. slips by! +#: ../libglabels/xml-template.c:244 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "未知的纸张大小id \"%s\",请试着用纸张规格" + +#: src/xml-label-191.c:690 libglabels/xml-template.c:209 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "未知的纸张大小id或规格 \"%s\"" + +#: ../libglabels/xml-template.c:615 +msgid "" +"Missing required \"brand\" or \"part\" attribute, trying deprecated name." +msgstr "" +"\"品牌\" 或者 \"规格\" 属性不完整,请尝试改变字母大小写。" + +#: ../libglabels/xml-template.c:625 +msgid "Name attribute also missing." +msgstr "名称属性也不完整。" + +#: ../data/builder/merge-properties-dialog.glade.h:1 +msgid "Record selection/preview" +msgstr "记录选择/预览" + +#: ../data/builder/merge-properties-dialog.glade.h:2 +msgid "Source" +msgstr "来源" + +#: ../data/builder/merge-properties-dialog.glade.h:3 +msgid "Format:" +msgstr "格式:" + +#: ../data/builder/merge-properties-dialog.glade.h:4 +msgid "Location:" +msgstr "位置:" + +#: ../data/builder/merge-properties-dialog.glade.h:5 +msgid "Select all" +msgstr "全选" + +#: ../data/builder/merge-properties-dialog.glade.h:6 +msgid "Unselect all" +msgstr "取消全选" + +#: ../data/builder/merge-properties-dialog.glade.h:7 +#: ../data/builder/object-editor.glade.h:39 +msgid "dialog1" +msgstr "对话框1" + +#: ../data/builder/new-label-dialog.glade.h:1 +msgid "Label orientation" +msgstr "标签方向" + +#: ../data/builder/new-label-dialog.glade.h:2 +msgid "Media type" +msgstr "介质类型" + +#: ../data/builder/object-editor.glade.h:2 +#, no-c-format +msgid "%" +msgstr "%" + +#: ../data/builder/object-editor.glade.h:3 +msgid "00000000000 00000" +msgstr "00000000000 00000" + +#: ../data/builder/object-editor.glade.h:4 +msgid "Xxx object properties" +msgstr "Xxx对象属性" + +#: ../data/builder/object-editor.glade.h:5 +#: ../data/builder/prefs-dialog.glade.h:7 +msgid "Alignment:" +msgstr "对齐:" + +#: ../data/builder/object-editor.glade.h:6 +msgid "Allow merge to automatically shrink text" +msgstr "自动调整和缩放文字" + +#: ../data/builder/object-editor.glade.h:7 +msgid "Angle:" +msgstr "角度:" + +#: ../data/builder/object-editor.glade.h:8 +msgid "Checksum" +msgstr "校验值" + +#: ../data/builder/object-editor.glade.h:9 +#: ../data/builder/prefs-dialog.glade.h:8 +msgid "Color:" +msgstr "颜色:" + +#: ../data/builder/object-editor.glade.h:11 +msgid "Enable shadow" +msgstr "使用阴影" + +#: ../data/builder/object-editor.glade.h:12 +msgid "Family:" +msgstr "系列:" + +#: ../data/builder/object-editor.glade.h:13 +msgid "File:" +msgstr "文件:" + +#: ../data/builder/object-editor.glade.h:14 +msgid "Fill" +msgstr "填充" + +#: ../data/builder/object-editor.glade.h:15 +#: ../data/builder/template-designer.glade.h:30 +msgid "Height:" +msgstr "高度:" + +#: ../data/builder/object-editor.glade.h:17 +msgid "Insert merge field" +msgstr "插入合并区域" + +#: ../data/builder/object-editor.glade.h:18 +msgid "Key:" +msgstr "键值:" + +#: ../data/builder/object-editor.glade.h:19 +msgid "Length:" +msgstr "长度:" + +#: ../data/builder/object-editor.glade.h:21 +#: ../data/builder/prefs-dialog.glade.h:12 +msgid "Line Spacing:" +msgstr "线条间隔:" + +#: ../data/builder/object-editor.glade.h:22 +msgid "Literal:" +msgstr "文字:" + +#: ../data/builder/object-editor.glade.h:23 +msgid "Opacity:" +msgstr "不透明:" + +#: ../data/builder/object-editor.glade.h:24 +msgid "Position" +msgstr "位置" + +#: ../data/builder/object-editor.glade.h:25 +msgid "Reset image size" +msgstr "恢复图片大小" + +#: ../data/builder/object-editor.glade.h:26 +msgid "Select A File" +msgstr "选择一个文件" + +#: ../data/builder/object-editor.glade.h:27 +msgid "Shadow" +msgstr "阴影" + +#: ../data/builder/object-editor.glade.h:28 +msgid "Size" +msgstr "尺寸" + +#: ../data/builder/object-editor.glade.h:29 +msgid "Size:" +msgstr "尺寸:" + +#: ../data/builder/object-editor.glade.h:30 +msgid "Style" +msgstr "规格" + +#: ../data/builder/object-editor.glade.h:31 +msgid "Style:" +msgstr "规格:" + +#: ../data/builder/object-editor.glade.h:33 +#: ../data/builder/prefs-dialog.glade.h:20 +#: ../data/builder/template-designer.glade.h:61 +msgid "Width:" +msgstr "宽度:" + +#: ../data/builder/object-editor.glade.h:34 +msgid "X Offset:" +msgstr "X 偏移量:" + +#: ../data/builder/object-editor.glade.h:35 +msgid "X:" +msgstr "X:" + +#: ../data/builder/object-editor.glade.h:36 +msgid "Y Offset:" +msgstr "Y 偏移量:" + +#: ../data/builder/object-editor.glade.h:37 +msgid "Y:" +msgstr "Y:" + +#: ../data/builder/object-editor.glade.h:38 +msgid "degrees" +msgstr "度数" + +#: ../data/builder/object-editor.glade.h:40 +msgid "digits:" +msgstr "数字位数:" + +#: ../data/builder/object-editor.glade.h:41 +msgid "format:" +msgstr "格式:" + +#: ../data/builder/prefs-dialog.glade.h:1 +msgid " " +msgstr " " + +#: ../data/builder/prefs-dialog.glade.h:2 +msgid "Default page size" +msgstr "默认纸张尺寸" + +#: ../data/builder/prefs-dialog.glade.h:3 +msgid "Fill" +msgstr "填充" + +#: ../data/builder/prefs-dialog.glade.h:4 +msgid "Line" +msgstr "线条" + +#: ../data/builder/prefs-dialog.glade.h:5 +msgid "Text" +msgstr "文字" + +#: ../data/builder/prefs-dialog.glade.h:6 +msgid "Units" +msgstr "单位" + +#: ../data/builder/prefs-dialog.glade.h:9 +msgid "Font:" +msgstr "字体:" + +#: ../data/builder/prefs-dialog.glade.h:10 +msgid "ISO A4" +msgstr "" + +#: ../data/builder/prefs-dialog.glade.h:11 +msgid "Inches" +msgstr "英寸" + +#: ../data/builder/prefs-dialog.glade.h:13 +msgid "Locale" +msgstr "本地化" + +#: ../data/builder/prefs-dialog.glade.h:14 +msgid "Millimeters" +msgstr "毫米" + +#: ../data/builder/prefs-dialog.glade.h:15 +msgid "Object defaults" +msgstr "对象默认值" + +#: ../data/builder/prefs-dialog.glade.h:16 +msgid "Points" +msgstr "像素" + +#: ../data/builder/prefs-dialog.glade.h:17 +msgid "Select default properties for new objects." +msgstr "为新对象选择默认属性" + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "本地化设置" + +#. Most popular (at top of list) +#: ../data/builder/prefs-dialog.glade.h:19 +#: ../data/templates/paper-sizes.xml.h:29 +msgid "US Letter" +msgstr "美国信封" + +#: ../data/builder/print-custom-widget.glade.h:1 +msgid "Options" +msgstr "选项" + +#: ../data/builder/print-custom-widget.glade.h:2 +msgid "Print control (Merge)" +msgstr "打印控制(合并)" + +#: ../data/builder/print-custom-widget.glade.h:3 +msgid "Print control (Simple)" +msgstr "打印控制(简单)" + +#: ../data/builder/property-bar.glade.h:1 +msgid "Bold" +msgstr "粗体" + +#: ../data/builder/property-bar.glade.h:2 +msgid "Center align" +msgstr "中心对齐" + +#: ../data/builder/property-bar.glade.h:4 +msgid "Font family" +msgstr "字体系列" + +#: ../data/builder/property-bar.glade.h:5 +msgid "Font size" +msgstr "字体大小" + +#: ../data/builder/property-bar.glade.h:6 +msgid "Italic" +msgstr "斜体" + +#: ../data/builder/property-bar.glade.h:7 +msgid "Left align" +msgstr "左对齐" + +#: ../data/builder/property-bar.glade.h:9 +msgid "Line width" +msgstr "线宽" + +#: ../data/builder/property-bar.glade.h:10 +msgid "Right align" +msgstr "右对齐" + +#: ../data/builder/property-bar.glade.h:11 +msgid "Text Color" +msgstr "文字颜色" + +#: ../data/builder/template-designer.glade.h:1 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "(例如:信封标签,名片...)" + +#: ../data/builder/template-designer.glade.h:2 +msgid "(e.g., 8163A)" +msgstr "(例如:8163A)" + +#: ../data/builder/template-designer.glade.h:3 +msgid "(e.g., Avery, Acme, ...)" +msgstr "(例如:Avery, Acme, ...)" + +#: ../data/builder/template-designer.glade.h:4 +msgid "1. Outer radius:" +msgstr "1. 外半径:" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "1. 半径:" + +#: data/glade/template-designer.glade.h:8 +msgid "1. Width:" +msgstr "1. 宽度:" + +#: data/glade/template-designer.glade.h:9 +msgid "2. Height:" +msgstr "2. 高度:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "2. 内半径:" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "2. 余量(允许叠印):" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "3. 限宽:" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "3. 页边" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "3. 环绕 (半径):" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "4. 限高:" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "4. 水平余量(允许叠印):" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "5. 垂直余量(允许叠印):" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "5. 余量(允许叠印):" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "6. 页边" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "品牌/制造商:" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "CD/DVD (包括信用卡CD)" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" +"祝贺你!\n" +"\n" +"模板设计已完成。\n" +"点击 \"应用\"来进行确认和保存。\n" +"\n" +"否则请点击 \"取消\" 来放弃设计,\n" +"或者点击 \"后退\" 继续设计。" + +#: ../data/builder/template-designer.glade.h:27 +msgid "Description:" +msgstr "说明:" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "到左边界的距离 (x0):" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "到上边界的距离 (y0):" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "水平栅距 (dx):" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" +"模板包含多少个布局? \n" +"\n" +"“层” 可以把多个标签或名片方便地排列到一个简单的小格子里。\n" +"绝大多数模板只需要1个布局,如第1个例子所示。\n" +"第2个图例说明了需要2个布局的例子。" + +#: ../data/builder/template-designer.glade.h:37 +msgid "Layout #1" +msgstr "布局 #1" + +#: data/glade/template-designer.glade.h:45 +msgid "Layout #2" +msgstr "布局 #2" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "数字交叉 (nx):" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "数字向下 (ny):" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "布局个数:" + +#: data/glade/template-designer.glade.h:52 +msgid "Page size:" +msgstr "纸张大小" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "规格 #:" + +#: ../data/builder/template-designer.glade.h:44 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "请输入模板的备注信息。" + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "请输入下面的布局数据。" + +#: data/glade/template-designer.glade.h:57 +msgid "" +"Please enter the following size parameters of a single label in your template." +msgstr "请在模板里输入单个标签的尺寸数据。" + +#: ../data/builder/template-designer.glade.h:47 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" +"请在模板里输入单个标签或名片的尺寸数据。" + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "请选择标签或名片的基本形状。" + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "请选择模板所采用的纸张大小。" + +#: data/glade/template-designer.glade.h:61 +msgid "Print test sheet" +msgstr "打印测试页" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "长方形或正方形(可以倒圆角)" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "圆形" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" +"模板需要\n" +"2个布局 " + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" +"模板需要\n" +"1个布局 " + +#: ../data/builder/template-designer.glade.h:57 +msgid "Vertical pitch (dy):" +msgstr "垂直栅距 (dy):" + +#: ../data/builder/template-designer.glade.h:58 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" +"欢迎使用 gLabels 模板设计工具。\n" +"\n" +"请参照下面的步骤来制作一个你需要的 gLabels 模板。" + +#: ../data/builder/template-designer.glade.h:62 +msgid "cd_size_page" +msgstr "光盘尺寸" + +#: ../data/builder/template-designer.glade.h:63 +msgid "finish_page" +msgstr "完成" + +#: ../data/builder/template-designer.glade.h:65 +msgid "layout_page" +msgstr "布局" + +#: ../data/builder/template-designer.glade.h:66 +msgid "name_page" +msgstr "名称" + +#: ../data/builder/template-designer.glade.h:67 +msgid "nlayouts_page" +msgstr "多层布局" + +#: ../data/builder/template-designer.glade.h:68 +msgid "pg_size_page" +msgstr "纸张大小" + +#: ../data/builder/template-designer.glade.h:69 +msgid "rect_size_page" +msgstr "矩形尺寸" + +#: ../data/builder/template-designer.glade.h:70 +msgid "round_size_page" +msgstr "圆形尺寸" + +#: ../data/builder/template-designer.glade.h:71 +msgid "shape_page" +msgstr "形状" + +#: ../data/builder/template-designer.glade.h:72 +msgid "start_page" +msgstr "起始页" + +#: ../data/builder/wdgt-media-select.glade.h:1 +msgid "Brand:" +msgstr "品牌:" + +#: ../data/builder/wdgt-media-select.glade.h:2 +msgid "Category:" +msgstr "类型:" + +#: ../data/builder/wdgt-media-select.glade.h:4 +msgid "Recent templates" +msgstr "最近的模板" + +#: ../data/builder/wdgt-media-select.glade.h:5 +msgid "Search all templates" +msgstr "查找全部模板" + +#. Other ISO A series sizes +#: ../data/templates/paper-sizes.xml.h:2 +msgid "A0" +msgstr "A0" + +#: ../data/templates/paper-sizes.xml.h:3 +msgid "A1" +msgstr "A1" + +#: ../data/templates/paper-sizes.xml.h:4 +msgid "A10" +msgstr "A10" + +#: ../data/templates/paper-sizes.xml.h:5 +msgid "A2" +msgstr "A2" + +#: ../data/templates/paper-sizes.xml.h:6 +msgid "A3" +msgstr "A3" + +#: ../data/templates/paper-sizes.xml.h:7 +msgid "A4" +msgstr "A4" + +#: ../data/templates/paper-sizes.xml.h:8 +msgid "A5" +msgstr "A5" + +#: ../data/templates/paper-sizes.xml.h:9 +msgid "A6" +msgstr "A6" + +#: ../data/templates/paper-sizes.xml.h:10 +msgid "A7" +msgstr "A7" + +#: ../data/templates/paper-sizes.xml.h:11 +msgid "A8" +msgstr "A8" + +#: ../data/templates/paper-sizes.xml.h:12 +msgid "A9" +msgstr "A9" + +#. ISO B series sizes +#: ../data/templates/paper-sizes.xml.h:14 +msgid "B0" +msgstr "B0" + +#: ../data/templates/paper-sizes.xml.h:15 +msgid "B1" +msgstr "B1" + +#: ../data/templates/paper-sizes.xml.h:16 +msgid "B10" +msgstr "B10" + +#: ../data/templates/paper-sizes.xml.h:17 +msgid "B2" +msgstr "B2" + +#: ../data/templates/paper-sizes.xml.h:18 +msgid "B3" +msgstr "B3" + +#: ../data/templates/paper-sizes.xml.h:19 +msgid "B4" +msgstr "B4" + +#: ../data/templates/paper-sizes.xml.h:20 +msgid "B5" +msgstr "B5" + +#: ../data/templates/paper-sizes.xml.h:21 +msgid "B6" +msgstr "B6" + +#: ../data/templates/paper-sizes.xml.h:22 +msgid "B7" +msgstr "B7" + +#: ../data/templates/paper-sizes.xml.h:23 +msgid "B8" +msgstr "B8" + +#: ../data/templates/paper-sizes.xml.h:24 +msgid "B9" +msgstr "B9" +#: data/templates/paper-sizes.xml.h:25 +msgid "US Executive" +msgstr "美国常用" + +#. Other US paper sizes +#: data/templates/paper-sizes.xml.h:27 +msgid "US Legal" +msgstr "美国国标" + +#: ../data/templates/categories.xml.h:1 +msgid "Any card" +msgstr "通用名片" + +#: ../data/templates/categories.xml.h:2 +msgid "Any label" +msgstr "通用标签" + +#: ../data/templates/categories.xml.h:3 +msgid "Business cards" +msgstr "名片" + +#: ../data/templates/categories.xml.h:4 +msgid "CD/DVD or other media" +msgstr "CD/DVD 或其它光盘" + +#: ../data/templates/categories.xml.h:5 +msgid "Mailing/shipping products" +msgstr "信件/快递包裹" + +#: ../data/templates/categories.xml.h:6 +msgid "Rectangular labels" +msgstr "长方形标签" + +#: ../data/templates/categories.xml.h:7 +msgid "Round labels" +msgstr "圆形标签" + +#: ../data/templates/categories.xml.h:8 +msgid "Square labels" +msgstr "正方形标签" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:2 +#: ../data/templates/avery-iso-templates.xml.h:2 +#: ../data/templates/dymo-other-templates.xml.h:4 +#: ../data/templates/misc-iso-templates.xml.h:2 +#: ../data/templates/zweckform-iso-templates.xml.h:2 +msgid "Address Labels" +msgstr "通迅录标签" + +#. =================================================================== +#. ============================================================ +#. =================================================================== +#. ******************************************************************** +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:4 +#: ../data/templates/avery-iso-templates.xml.h:8 +#: ../data/templates/misc-us-templates.xml.h:4 +#: ../data/templates/misc-iso-templates.xml.h:12 +#: ../data/templates/zweckform-iso-templates.xml.h:6 +msgid "Business Cards" +msgstr "名片" + +#. =================================================================== +#. =============================================================== +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:6 +#: ../data/templates/avery-iso-templates.xml.h:14 +#: ../data/templates/misc-us-templates.xml.h:8 +#: ../data/templates/misc-iso-templates.xml.h:16 +#: ../data/templates/zweckform-iso-templates.xml.h:8 +msgid "CD/DVD Labels" +msgstr "CD/DVD 光盘标签" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:8 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "CD/DVD 光盘标签(光盘盘面)" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:10 +msgid "CD/DVD Labels (Spine Labels)" +msgstr "CD/DVD 光盘标签(光盘盒内衬纸)" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:12 +#: ../data/templates/avery-iso-templates.xml.h:16 +msgid "Diskette Labels" +msgstr "软盘标签" + +#. the LSK labels can be torn in half down the center +#: ../data/templates/avery-us-templates.xml.h:14 +msgid "Divider Labels" +msgstr "分隔标签" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:9 +msgid "Filing Labels" +msgstr "档案标签" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:11 +msgid "Full Sheet Labels" +msgstr "整页标签" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:20 +msgid "ID Labels" +msgstr "编号卡片" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:22 +msgid "Index Cards" +msgstr "索引卡片" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:24 +msgid "Large Round Labels" +msgstr "大圆标签" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:15 +msgid "Name Badge Labels" +msgstr "铭牌标签" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:28 +msgid "Post cards" +msgstr "贺卡/明信片" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:17 +msgid "Return Address Labels" +msgstr "退回地址标签" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:32 +msgid "Round Labels" +msgstr "圆标签" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:34 +msgid "Shipping Labels" +msgstr "物流标签" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:21 +msgid "Small Round Labels" +msgstr "小圆标签" + +#. =================================================================== +#: data/templates/avery-us-templates.xml.h:23 +msgid "Square Labels" +msgstr "正方形标签" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:40 +msgid "Tent Cards" +msgstr "夹纸条" + +#. =================================================================== +#: ../data/templates/avery-us-templates.xml.h:42 +msgid "Video Tape Face Labels" +msgstr "录像带正面标签" + +#: data/templates/avery-us-templates.xml.h:25 +msgid "Video Tape Spine Labels" +msgstr "录像带背面标签" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:2 +msgid "Address labels" +msgstr "通迅录标签" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:6 +msgid "Allround labels" +msgstr "通用标签" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:6 +msgid "CD Booklet" +msgstr "CD集标签" + +#. =============================================================== +#: data/templates/avery-iso-templates.xml.h:8 +msgid "CD Inlet" +msgstr "CD单盒" + +#. =================================================================== +#: ../data/templates/avery-iso-templates.xml.h:18 +msgid "Diskette labels" +msgstr "软盘标签" + +#. =============================================================== +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:14 +#: data/templates/zweckform-iso-templates.xml.h:14 +#: data/templates/misc-iso-templates.xml.h:35 +msgid "Mailing Labels" +msgstr "信封标签" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:16 +msgid "Mailing labels" +msgstr "信封标签" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:18 +msgid "Mini Address Labels" +msgstr "地址标签" + +#. =================================================================== +#: data/templates/avery-iso-templates.xml.h:20 +msgid "Shipping labels" +msgstr "物流标签" + +#. =================================================================== +#: ../data/templates/avery-other-templates.xml.h:2 +msgid "File Folder Labels" +msgstr "文件夹标签" + +#: ../data/templates/brother-other-templates.xml.h:1 +msgid "Multi Purpose Labels 17mm x 54mm" +msgstr "多用途标签 17mm x 54mm" + +#: ../data/templates/brother-other-templates.xml.h:2 +msgid "Shipping Labels 62mm x 100mm" +msgstr "物流标签 62mm x 100mm" + +#. +#. ********************************************************************* +#. ********************************************************************* +#. Labels for the Brother QL-500/550/650 PC Label Printers +#. +#. These templates work with the Brother Linux Printer CUPS Driver. It +#. is unknown if these work correctly with the foomatic print driver for +#. these printers. +#. +#. One difference from typical templates is that the template size is +#. not the actual media size - it is the size of the printable area, +#. which is smaller than the media size. This is because (at least with +#. the Brother driver) coordinates are relative the corner of this area. +#. +#. ********************************************************************* +#. ********************************************************************* +#. +#: ../data/templates/brother-other-templates.xml.h:20 +msgid "Standard Address Labels 29mm x 90mm" +msgstr "标准通迅录 29mm x 90mm" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:2 +msgid "3.5in Diskette" +msgstr "3.5英寸软盘" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:6 +msgid "File Folder" +msgstr "文件夹" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:8 +msgid "Hanging Folder" +msgstr "挂起的公文夹" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:10 +msgid "Large Address Labels" +msgstr "大地址标签" + +#. =================================================================== +#: ../data/templates/dymo-other-templates.xml.h:14 +msgid "Shipping Address Labels" +msgstr "物流地址标签" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:2 +msgid "Business Card CD" +msgstr "名片CD" + +#. =================================================================== +#: ../data/templates/misc-us-templates.xml.h:6 +msgid "CD Template Rectangles" +msgstr "CD方盒 (方形外包装)" +msgid "CD/DVD Labels (Face Only)" +msgstr "CD/DVD光盘贴纸(盘面)" + + +#: data/templates/misc-us-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:23 +msgid "CD/DVD Labels (face only)" +msgstr "CD/DVD光盘贴纸(盘面)" + + +#: data/templates/misc-us-templates.xml.h:9 +msgid "Cassette Labels" +msgstr "磁带盒标签" + + +#: data/templates/misc-us-templates.xml.h:11 +msgid "DLT Labels" +msgstr "DLT标签" + + +#: data/templates/misc-us-templates.xml.h:13 +msgid "Microtube labels" +msgstr "细管标签" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Mini-CD Labels" +msgstr "微型CD的标签" + +#: data/templates/misc-us-templates.xml.h:15 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "超级CD标签 2-向上(光盘盘面)" + +#: data/templates/misc-us-templates.xml.h:16 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "超级CD标签 2-向上(封面)" + +#: data/templates/misc-us-templates.xml.h:17 +#: data/templates/misc-iso-templates.xml.h:42 +msgid "PRO CD Labels 2-up (face only)" +msgstr "超级CD标签 2-向上(封面)" + +#: data/templates/misc-us-templates.xml.h:13 +msgid "Slimline CD Case (rightside up)" +msgstr "CD收集盒(右侧在上)" + +#: data/templates/misc-us-templates.xml.h:19 +msgid "Slimline CD Case (upside down)" +msgstr "CD收集盒(盖子在下)" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:4 +#: ../data/templates/zweckform-iso-templates.xml.h:4 +msgid "Allround Labels" +msgstr "通用标签" + +#: data/templates/misc-iso-templates.xml.h:11 +msgid "Arch File Labels" +msgstr "档案标签" + +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Arch File Labels (large)" +msgstr "档案标签(大)" + +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Arch File Labels (small)" +msgstr "档案标签(小)" + +#: data/templates/misc-iso-templates.xml.h:19 +msgid "CD Labels" +msgstr "CD标签" + +#: data/templates/misc-iso-templates.xml.h:25 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "CD/DVD光盘贴纸标准格式(正面)" + +#: data/templates/misc-iso-templates.xml.h:27 +msgid "Diskette Labels (face only)" +msgstr "软盘标签 (封面)" + +#: data/templates/misc-iso-templates.xml.h:29 +msgid "EPSON Photo Stickers 16" +msgstr "爱普生(EPSON)相片纸" + +#: data/templates/misc-iso-templates.xml.h:31 +msgid "Etiketten" +msgstr "包装标签" + +#: data/templates/misc-iso-templates.xml.h:33 +msgid "Fridge Magnet Stickers" +msgstr "冰箱贴纸" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:30 +msgid "General Labels" +msgstr "通用标签" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:32 +msgid "Inkjet/Laser Labels 70x37mm" +msgstr "喷墨/激光打印纸 70x37mm" + +#. =================================================================== +#: data/templates/misc-iso-templates.xml.h:37 +msgid "Mailing Labels --14" +msgstr "信封标签 --14" + +#: data/templates/misc-iso-templates.xml.h:39 +msgid "Mailing Labels-2 columns" +msgstr "信封标签-2栏" + +#: data/templates/misc-iso-templates.xml.h:41 +msgid "Mailing Labels-3 columns" +msgstr "信封标签-3栏" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:44 +#: ../data/templates/zweckform-iso-templates.xml.h:24 +msgid "Rectangular Labels" +msgstr "长方形标签" + +#. =================================================================== +#: ../data/templates/misc-iso-templates.xml.h:46 +msgid "Video Labels (face only)" +msgstr "录像带标签(正面)" + +#. =================================================================== +#: ../data/templates/misc-other-templates.xml.h:2 +msgid "Multi-Purpose Labels" +msgstr "多用途标签" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:10 +msgid "Correction and Cover-up Labels" +msgstr "改错贴纸标签" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:12 +msgid "File Back Labels" +msgstr "文件备案标签" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:14 +msgid "Lever Arch File Labels" +msgstr "装订档案标签" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:18 +msgid "Multi-purpose Stick+Lift Labels" +msgstr "多用途 易事贴" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:20 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "" + +#. =================================================================== +#: data/templates/zweckform-iso-templates.xml.h:18 +msgid "Rectangular Copier Labels" +msgstr "长方形复写标签" + +#. =================================================================== +#: ../data/templates/zweckform-iso-templates.xml.h:26 +msgid "Video Labels (back)" +msgstr "录像带标签(背面)" + +#. =================================================================== +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers" +msgstr "制作标签,名片和光盘盒封面" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "gLabels标签设计工具" + +#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 +msgid "gLabels Project File" +msgstr "gLabels工程文件" + +#: ../barcode-0.98/compat/getopt.c:583 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: 选项 `%s' 有歧义\n" + +#: ../barcode-0.98/compat/getopt.c:607 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: 选项 `--%s' 不支持附加参数\n" + +#: ../barcode-0.98/compat/getopt.c:612 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: 选项 `%c%s' 不支持附加参数\n" + +#: ../barcode-0.98/compat/getopt.c:629 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: 选项 `%s' 需要附加参数\n" + +#. --option +#: ../barcode-0.98/compat/getopt.c:658 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: 未知的选项 '--%s'\n" + +#. +option or -option +#: ../barcode-0.98/compat/getopt.c:662 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: 未知的选项 `%c%s'\n" + +#. 1003.2 specifies the format of this message. +#: ../barcode-0.98/compat/getopt.c:688 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: 非法的选项 -- %c\n" + +#: ../barcode-0.98/compat/getopt.c:691 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: 无效的选项 -- %c\n" + +#: ../barcode-0.98/compat/getopt.c:727 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: 选项需要附加参数 -- %c\n" \ No newline at end of file diff --git a/po/zh_TW.Big5.po b/po/zh_TW.Big5.po new file mode 100644 index 00000000..485e1ccc --- /dev/null +++ b/po/zh_TW.Big5.po @@ -0,0 +1,2650 @@ +# Traditional Chinese Translation for glabels +# Copyright (C) 2002 Free Software Foundation, Inc. +# Shell Hung , 2002 +# +msgid "" +msgstr "" +"Project-Id-Version: glabels 0.4.4\n" +"POT-Creation-Date: 2004-08-08 00:43-0400\n" +"PO-Revision-Date: 2002-07-14 18:30+0800\n" +"Last-Translator: Shell Hung \n" +"Language-Team: zh-l10n \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=big5\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/glabels.c:55 +msgid "Show view debugging messages." +msgstr "" + +#: src/glabels.c:58 +msgid "Show item debugging messages." +msgstr "" + +#: src/glabels.c:61 +msgid "Show printing debugging messages." +msgstr "" + +#: src/glabels.c:64 +msgid "Show prefs debugging messages." +msgstr "" + +#: src/glabels.c:67 +msgid "Show file debugging messages." +msgstr "" + +#: src/glabels.c:70 +msgid "Show document debugging messages." +msgstr "" + +#: src/glabels.c:73 +msgid "Show template debugging messages." +msgstr "" + +#: src/glabels.c:76 +msgid "Show paper debugging messages." +msgstr "" + +#: src/glabels.c:79 +msgid "Show xml debugging messages." +msgstr "" + +#: src/glabels.c:82 +msgid "Show document merge debugging messages." +msgstr "" + +#: src/glabels.c:85 +msgid "Show commands debugging messages." +msgstr "" + +#: src/glabels.c:88 +msgid "Show undo debugging messages." +msgstr "" + +#: src/glabels.c:91 +msgid "Show recent debugging messages." +msgstr "" + +#: src/glabels.c:94 +msgid "Show window debugging messages." +msgstr "" + +#: src/glabels.c:97 +msgid "Show ui debugging messages." +msgstr "" + +#: src/glabels.c:100 +msgid "Show property_bar debugging messages." +msgstr "" + +#: src/glabels.c:103 +msgid "Show media select widget debugging messages." +msgstr "" + +#: src/glabels.c:106 +msgid "Show mini preview widget debugging messages." +msgstr "" + +#: src/glabels.c:109 +msgid "Show pixbuf cache debugging messages." +msgstr "" + +#: src/glabels.c:112 +msgid "Show widget debugging messages." +msgstr "" + +#: src/glabels.c:115 +msgid "Show object editor debugging messages." +msgstr "" + +#: src/glabels.c:118 +msgid "Turn on all debugging messages." +msgstr "" + +#: src/glabels.c:187 +msgid "Could not initialize Bonobo!\n" +msgstr "" + +#: src/glabels-batch.c:48 +msgid "print this message" +msgstr "¦C¦L³o­Ó°T®§" + +#: src/glabels-batch.c:50 +msgid "print the version of glabels-batch being used" +msgstr "¦C¦L¥X glabels-batch ªºª©¥»¸ê°T" + +#: src/glabels-batch.c:52 +msgid "set output filename (default=\"output.ps\")" +msgstr "³]©w¿é¥XÀɦWºÙ (¹w³]¬°\"output.ps\")" + +#: src/glabels-batch.c:52 +msgid "filename" +msgstr "ÀɮצWºÙ" + +#: src/glabels-batch.c:54 +msgid "number of sheets (default=1)" +msgstr "¯È±i¼Æ¥Ø (¹w³]¬° 1)" + +#: src/glabels-batch.c:54 +msgid "sheets" +msgstr "¯È±i" + +#: src/glabels-batch.c:56 +msgid "number of copies (default=1)" +msgstr "¥÷¼Æ (¹w³]¬° 1)" + +#: src/glabels-batch.c:56 +msgid "copies" +msgstr "¥÷¼Æ" + +#: src/glabels-batch.c:58 src/print-dialog.c:336 +msgid "print outlines (to test printer alignment)" +msgstr "¦L¥X¥~Ãä (´ú¸Õ¥´¦L¾÷°Ñ¼Æ)" + +#: src/glabels-batch.c:60 src/print-dialog.c:344 +msgid "print in reverse (i.e. a mirror image)" +msgstr "¤Ï¤è¦V¦C¦L (¦p­Ë¦V¼v¹³)" + +#: src/glabels-batch.c:96 +msgid "[OPTION...] GLABELS_FILE..." +msgstr "[¿ï¶µ...] GLABELS_FILE..." + +#: src/glabels-batch.c:116 +msgid "missing glabels file\n" +msgstr "¨S¦³¿é¤J glabels ªºÀÉ®×\n" + +#: src/glabels-batch.c:157 +#, c-format +msgid "cannot open glabels file %s\n" +msgstr "¶}±ÒÀÉ®×¥¢±Ñ %s\n" + +#: src/window.c:244 +msgid "(none) - gLabels" +msgstr "" + +#: src/window.c:414 +msgid "(modified)" +msgstr "" + +#: src/stock.c:65 data/ui/glabels-ui.xml.h:165 +#, fuzzy +msgid "_Select Mode" +msgstr "¿ï¾Ü" + +#: src/stock.c:66 data/ui/glabels-ui.xml.h:166 +#, fuzzy +msgid "_Text" +msgstr "¤å¦r" + +#: src/stock.c:67 data/ui/glabels-ui.xml.h:151 +#, fuzzy +msgid "_Line" +msgstr "½u" + +#: src/stock.c:68 data/ui/glabels-ui.xml.h:133 +#, fuzzy +msgid "_Box" +msgstr "²°¤l" + +#: src/stock.c:69 data/ui/glabels-ui.xml.h:144 +#, fuzzy +msgid "_Ellipse" +msgstr "¾ò¶ê§Î" + +#: src/stock.c:70 data/ui/glabels-ui.xml.h:149 +#, fuzzy +msgid "_Image" +msgstr "¹Ï¹³" + +#: src/stock.c:71 data/ui/glabels-ui.xml.h:11 +#, fuzzy +msgid "Bar_code" +msgstr "¼Æ½X±ø" + +#: src/stock.c:72 +#, fuzzy +msgid "_Merge Properties" +msgstr "¦X¨Ö³]©w" + +#: src/stock.c:73 +#, fuzzy +msgid "Object _Properties" +msgstr "¤å¦r¼Ë»ª" + +#: src/stock.c:74 data/ui/glabels-ui.xml.h:13 +#, fuzzy +msgid "Bring to _Front" +msgstr "±a¥X¨ì«e­±" + +#: src/stock.c:75 data/ui/glabels-ui.xml.h:110 +#, fuzzy +msgid "Send to _Back" +msgstr "©ñ¦b³Ì©³" + +#: src/stock.c:76 data/ui/glabels-ui.xml.h:97 +#, fuzzy +msgid "Rotate _Left" +msgstr "±ÛÂà" + +#: src/stock.c:77 data/ui/glabels-ui.xml.h:98 +#, fuzzy +msgid "Rotate _Right" +msgstr "±ÛÂà" + +#: src/stock.c:78 data/ui/glabels-ui.xml.h:52 +msgid "Flip _Horizontally" +msgstr "" + +#: src/stock.c:79 data/ui/glabels-ui.xml.h:53 +msgid "Flip _Vertically" +msgstr "" + +#: src/stock.c:80 data/ui/glabels-ui.xml.h:150 +msgid "_Lefts" +msgstr "" + +#: src/stock.c:81 data/ui/glabels-ui.xml.h:162 +msgid "_Rights" +msgstr "" + +#: src/stock.c:82 data/ui/glabels-ui.xml.h:134 +msgid "_Centers" +msgstr "" + +#: src/stock.c:83 data/ui/glabels-ui.xml.h:167 +#, fuzzy +msgid "_Tops" +msgstr "¤u¨ã (&_T)" + +#: src/stock.c:84 +msgid "Bottoms" +msgstr "" + +#: src/stock.c:85 +msgid "Centers" +msgstr "" + +#: src/stock.c:86 src/stock.c:87 data/ui/glabels-ui.xml.h:62 +msgid "Label Ce_nter" +msgstr "" + +#: src/stock.c:88 data/ui/glabels-ui.xml.h:51 +msgid "Fill color" +msgstr "" + +#: src/stock.c:89 data/ui/glabels-ui.xml.h:64 +msgid "Line color" +msgstr "" + +#: src/stock.c:90 src/stock.c:92 +#, fuzzy +msgid "Linked" +msgstr "½u" + +#: src/stock.c:91 src/stock.c:93 +#, fuzzy +msgid "Not Linked" +msgstr "¨S¦³" + +#: src/ui-property-bar.c:345 src/object-editor.c:499 +#, fuzzy +msgid "Default" +msgstr "§R°£" + +#: src/ui-property-bar.c:360 src/object-editor.c:512 +msgid "No fill" +msgstr "" + +#: src/ui-property-bar.c:375 src/object-editor.c:505 +#, fuzzy +msgid "No line" +msgstr "¨S¦³" + +#: src/ui-sidebar.c:180 +#, fuzzy +msgid "Object properties" +msgstr "¤å¦r¼Ë»ª" + +#: src/commands.c:385 +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/commands.c:399 +msgid "See the file AUTHORS for additional credits," +msgstr "" + +#: src/commands.c:400 +msgid "or visit http://glabels.sourceforge.net/" +msgstr "" + +#: src/commands.c:409 +msgid " " +msgstr "" + +#: src/commands.c:424 +#, fuzzy +msgid "glabels" +msgstr "¼Ðñ" + +#: src/file.c:100 +msgid "New Label or Card" +msgstr "·s¼W¼Ðñ©Î¥d" + +#: src/file.c:132 src/file.c:304 +msgid "Media Type" +msgstr "´CÅéºØÃþ" + +#: src/file.c:138 src/file.c:310 +msgid "Label orientation" +msgstr "¼Ðñ¤è¦V" + +#: src/file.c:269 +#, fuzzy +msgid "Label properties" +msgstr "¤å¦r¼Ë»ª" + +#: src/file.c:452 src/file.c:870 +msgid "All files" +msgstr "" + +#: src/file.c:457 src/file.c:875 +#, fuzzy +msgid "gLabels documents" +msgstr "Glabels: ³]©w­È" + +#: src/file.c:505 src/file.c:617 src/file.c:934 src/file.c:1130 +#, fuzzy +msgid "Empty file name selection" +msgstr "²¾°£©Ò¦³¿ï¾Ü¶µ" + +#: src/file.c:506 src/file.c:520 src/file.c:618 src/file.c:632 +msgid "Please select a file or supply a valid file name" +msgstr "" + +#: src/file.c:519 src/file.c:631 +msgid "File does not exist" +msgstr "" + +#: src/file.c:563 data/ui/glabels-ui.xml.h:75 +msgid "Open" +msgstr "¶}±Ò" + +#: src/file.c:565 +msgid "Open label" +msgstr "¶}±Ò¼Ðñ" + +#: src/file.c:707 +#, fuzzy, c-format +msgid "Could not open file \"%s\"" +msgstr "¶}±ÒÀÉ®×¥¢±Ñ" + +#: src/file.c:715 +msgid "Not a supported file format" +msgstr "" + +#: src/file.c:797 src/file.c:979 src/file.c:1174 +#, fuzzy, c-format +msgid "Could not save file \"%s\"" +msgstr "¤£¯àÀx¦sÀÉ®×" + +#: src/file.c:805 src/file.c:987 src/file.c:1182 +msgid "Error encountered during save. The file is still not saved." +msgstr "" + +#: src/file.c:848 src/file.c:1048 +#, fuzzy, c-format +msgid "Save \"%s\" as" +msgstr "Àx¦s¼Ðñ¬°..." + +#: src/file.c:935 src/file.c:1131 +#, fuzzy +msgid "Please supply a valid file name" +msgstr "½Ð¥²»Ý¿é¤JÀɮצWºÙ" + +#: src/file.c:952 src/file.c:1147 +#, c-format +msgid "Overwrite file \"%s\"?" +msgstr "" + +#: src/file.c:960 src/file.c:1155 +msgid "File already exists." +msgstr "" + +#: src/file.c:1271 +#, c-format +msgid "Save changes to document \"%s\" before closing?" +msgstr "" + +#: src/file.c:1279 +msgid "Your changes will be lost if you don't save them." +msgstr "" + +#: src/file.c:1282 +msgid "Close without saving" +msgstr "" + +#. Should not happen +#: src/prefs.c:156 src/prefs.c:163 data/glade/prefs-dialog.glade.h:23 +#: data/glade/object-editor.glade.h:37 +msgid "points" +msgstr "ÂI" + +#: src/prefs.c:158 data/glade/object-editor.glade.h:36 +#: data/glade/template-designer.glade.h:74 +msgid "inches" +msgstr "­^¤o" + +#: src/prefs.c:160 +msgid "mm" +msgstr "mm" + +#: src/prefs-dialog.c:248 data/glade/prefs-dialog.glade.h:22 +#, fuzzy +msgid "gLabels Preferences" +msgstr "Glabels: ³]©w­È" + +#. +#. * Submenu: Order +#. +#: src/view.c:3570 data/ui/glabels-ui.xml.h:157 +msgid "_Order" +msgstr "" + +#. +#. * Submenu: Rotate/Flip +#. +#: src/view.c:3591 data/ui/glabels-ui.xml.h:163 +#, fuzzy +msgid "_Rotate/Flip" +msgstr "±ÛÂà" + +#. +#. * Submenu: Align Horizontally +#. +#: src/view.c:3624 +msgid "Align _Horizontally" +msgstr "" + +#. +#. * Submenu: Align Vertically +#. +#: src/view.c:3663 +msgid "Align _Vertically" +msgstr "" + +#: src/view.c:3724 data/ui/glabels-ui.xml.h:140 +#, fuzzy +msgid "_Delete" +msgstr "§R°£" + +#. Build editor. +#: src/view-box.c:223 +#, fuzzy +msgid "Box object properties" +msgstr "­×§ï¤è¶ôª«¥ó³]©w" + +#. Build editor. +#: src/view-ellipse.c:223 +#, fuzzy +msgid "Ellipse object properties" +msgstr "­×§ï¾ò¶êª«¥ó³]©w" + +#. Build editor. +#: src/view-line.c:223 +#, fuzzy +msgid "Line object properties" +msgstr "­×§ï¤è¶ôª«¥ó³]©w" + +#. Build editor. +#: src/view-image.c:222 +#, fuzzy +msgid "Image object properties" +msgstr "­×§ï¹Ï¹³ª«¥ó³]©w" + +#. Build editor. +#: src/view-text.c:250 +#, fuzzy +msgid "Text object properties" +msgstr "­×§ï¤è¶ôª«¥ó³]©w" + +#: src/view-text.c:562 data/glade/object-editor.glade.h:28 +msgid "Text" +msgstr "¤å¦r" + +#. Build editor. +#: src/view-barcode.c:209 +#, fuzzy +msgid "Barcode object properties" +msgstr "­×§ï¼Æ½X±øª«¥ó³]©w" + +#: src/view-barcode.c:579 src/print.c:1088 +#, fuzzy +msgid "Invalid barcode data" +msgstr "¤£¥¿½Tªº¼Æ½X±ø" + +#: src/merge-properties-dialog.c:231 +#, fuzzy +msgid "Merge Properties" +msgstr "¦X¨Ö³]©w" + +#. ---- Source section ---- +#: src/merge-properties-dialog.c:237 +msgid "Source" +msgstr "¨Ó·½ÀÉ" + +#: src/merge-properties-dialog.c:245 +msgid "Format:" +msgstr "®æ¦¡:" + +#. Location line +#: src/merge-properties-dialog.c:273 +msgid "Location:" +msgstr "¦ì¸m:" + +#: src/merge-properties-dialog.c:282 src/merge-properties-dialog.c:393 +msgid "Select merge-database source" +msgstr "¿ï¾Ü¦X¨Ö¸ê®Æ®w¨Ó·½" + +#: src/merge-properties-dialog.c:289 src/merge-properties-dialog.c:404 +msgid "N/A" +msgstr "N/A" + +#. ---- Sample Fields section ---- +#: src/merge-properties-dialog.c:300 +msgid "Record selection/preview:" +msgstr "" + +#: src/merge-properties-dialog.c:326 +msgid "Select" +msgstr "¿ï¾Ü" + +#: src/merge-properties-dialog.c:334 +msgid "Record/Field" +msgstr "" + +#: src/merge-properties-dialog.c:342 data/glade/object-editor.glade.h:9 +msgid "Data" +msgstr "¸ê®Æ" + +#: src/print-dialog.c:266 data/ui/glabels-ui.xml.h:82 +msgid "Print" +msgstr "¦C¦L" + +#: src/print-dialog.c:281 +msgid "_Job" +msgstr "" + +#: src/print-dialog.c:286 +#, fuzzy +msgid "P_rinter" +msgstr "¦C¦L" + +#. ----------- Add simple-copies widget ------------ +#: src/print-dialog.c:314 +msgid "Copies" +msgstr "¥÷¼Æ" + +#. ------- Add merge control widget ------------ +#: src/print-dialog.c:322 +msgid "Document merge control" +msgstr "¤å¥ó¦X¨Ö±±¨î" + +#. ----------- Add custom print options area ------------ +#: src/print-dialog.c:330 +msgid "Options" +msgstr "³]©w" + +#: src/print-dialog.c:351 +msgid "print crop marks" +msgstr "" + +#: src/print-dialog.c:553 src/print-dialog.c:592 +msgid "Print preview" +msgstr "¹wÄý¦C¦L" + +#: src/template-designer.c:409 data/glade/template-designer.glade.h:73 +msgid "gLabels Template Designer" +msgstr "" + +#: src/bc.c:60 +msgid "POSTNET (any)" +msgstr "" + +#: src/bc.c:63 +msgid "POSTNET-5 (ZIP only)" +msgstr "" + +#: src/bc.c:66 +msgid "POSTNET-9 (ZIP+4)" +msgstr "" + +#: src/bc.c:69 +msgid "POSTNET-11 (DPBC)" +msgstr "" + +#: src/bc.c:72 +msgid "EAN (any)" +msgstr "" + +#: src/bc.c:75 +msgid "EAN-8" +msgstr "" + +#: src/bc.c:78 +msgid "EAN-8 +2" +msgstr "" + +#: src/bc.c:81 +msgid "EAN-8 +5" +msgstr "" + +#: src/bc.c:84 +msgid "EAN-13" +msgstr "" + +#: src/bc.c:87 +msgid "EAN-13 +2" +msgstr "" + +#: src/bc.c:90 +msgid "EAN-13 +5" +msgstr "" + +#: src/bc.c:93 +msgid "UPC (UPC-A or UPC-E)" +msgstr "" + +#: src/bc.c:96 +msgid "UPC-A" +msgstr "" + +#: src/bc.c:99 +msgid "UPC-A +2" +msgstr "" + +#: src/bc.c:102 +msgid "UPC-A +5" +msgstr "" + +#: src/bc.c:105 +msgid "UPC-E" +msgstr "" + +#: src/bc.c:108 +msgid "UPC-E +2" +msgstr "" + +#: src/bc.c:111 +msgid "UPC-E +5" +msgstr "" + +#: src/bc.c:114 +msgid "ISBN" +msgstr "" + +#: src/bc.c:117 +msgid "ISBN +5" +msgstr "" + +#: src/bc.c:120 +msgid "Code 39" +msgstr "" + +#: src/bc.c:123 +msgid "Code 128" +msgstr "" + +#: src/bc.c:126 +msgid "Code 128C" +msgstr "" + +#: src/bc.c:129 +msgid "Code 128B" +msgstr "" + +#: src/bc.c:132 +msgid "Interleaved 2 of 5" +msgstr "" + +#: src/bc.c:135 +msgid "Codabar" +msgstr "" + +#: src/bc.c:138 +msgid "MSI" +msgstr "" + +#: src/bc.c:141 +msgid "Plessey" +msgstr "" + +#: src/label.c:569 +msgid "Untitled" +msgstr "" + +#: src/xml-label.c:176 src/xml-label.c:213 +msgid "xmlParseFile error" +msgstr "xmlParseFile ¿ù»~" + +#: src/xml-label.c:250 +msgid "No document root" +msgstr "¨S¦³¤å¥ó©lºÝ" + +#: src/xml-label.c:264 +msgid "Importing from glabels 0.1 format" +msgstr "" + +#: src/xml-label.c:272 +msgid "Importing from glabels 0.4 format" +msgstr "" + +#: src/xml-label.c:279 +msgid "Importing from glabels 1.91 format" +msgstr "" + +#: src/xml-label.c:282 +#, fuzzy +msgid "bad document, unknown glabels Namespace" +msgstr "¤£¥¿½Tªº¤å¥óºØÃþ, §ä¤£¨ì glabels ®æ¦¡" + +#: src/xml-label.c:311 src/xml-label-04.c:75 src/xml-label-191.c:131 +#, c-format +msgid "Bad root node = \"%s\"" +msgstr "¿ù»~ªº°ò½X = \"%s\"" + +#: src/xml-label.c:348 src/xml-label-191.c:165 +#, fuzzy, c-format +msgid "bad node in Document node = \"%s\"" +msgstr "¿ù»~ªº°ò½X = \"%s\"" + +#: src/xml-label.c:393 src/xml-label-04.c:123 src/xml-label-191.c:197 +#, c-format +msgid "bad node = \"%s\"" +msgstr "¿ù»~ªº¸`ÂI = \"%s\"" + +#: src/xml-label.c:796 src/xml-label-191.c:605 +#, fuzzy, c-format +msgid "bad node in Data node = \"%s\"" +msgstr "¿ù»~ªº¸`ÂI = \"%s\"" + +#: src/xml-label.c:962 libglabels/xml-template.c:528 +msgid "Utf8 conversion error." +msgstr "" + +#: src/xml-label.c:969 libglabels/xml-template.c:535 +msgid "Problem saving xml file." +msgstr "Àx¦s XML Àɮ׮ɵo¥Í¿ù»~." + +#. This should always be an id, but just in case a name +#. slips by! +#: src/xml-label-191.c:680 libglabels/xml-template.c:192 +#, c-format +msgid "Unknown page size id \"%s\", trying as name" +msgstr "" + +#: src/xml-label-191.c:690 libglabels/xml-template.c:202 +#, c-format +msgid "Unknown page size id or name \"%s\"" +msgstr "" + +#: src/merge.c:172 src/merge.c:213 src/merge.c:399 src/merge.c:402 +msgid "None" +msgstr "¨S¦³" + +#: src/merge-init.c:53 +#, fuzzy +msgid "Text file with comma delimeters (CSV)" +msgstr "¥H³r¸¹¤À®æ (CSV)" + +#: src/merge-init.c:60 +#, fuzzy +msgid "Text file with colon delimeters" +msgstr "¥H«_¸¹¤À®æ" + +#: src/merge-init.c:67 +#, fuzzy +msgid "Text file with tab delimeters" +msgstr "¥H [TAB] ¬°¤À®æ" + +#: src/wdgt-image-select.c:201 data/glade/object-editor.glade.h:11 +#, fuzzy +msgid "File:" +msgstr "¶ñº¡" + +#: src/wdgt-image-select.c:245 data/glade/object-editor.glade.h:16 +msgid "Key:" +msgstr "¸ê®Æ­È:" + +#: src/wdgt-print-copies.c:179 +msgid "Sheets:" +msgstr "¯È±i:" + +#: src/wdgt-print-copies.c:197 +msgid "Labels" +msgstr "¼Ðñ" + +#: src/wdgt-print-copies.c:200 +msgid "from:" +msgstr "¥Ñ:" + +#: src/wdgt-print-copies.c:207 +msgid "to:" +msgstr "¨ì:" + +#: src/wdgt-print-merge.c:178 +msgid "Start on label" +msgstr "¥Ñ¸Tñ¶}¯Å" + +#: src/wdgt-print-merge.c:186 +msgid "on 1st sheet" +msgstr "¦b­º±i¯È" + +#: src/wdgt-print-merge.c:195 +msgid "Copies:" +msgstr "¥÷¼Æ:" + +#: src/wdgt-print-merge.c:201 +msgid "Collate" +msgstr "®Õ¹ï" + +#: src/wdgt-media-select.c:269 data/glade/template-designer.glade.h:29 +msgid "Description:" +msgstr "´y­z:" + +#: src/wdgt-media-select.c:279 data/glade/template-designer.glade.h:53 +msgid "Page size:" +msgstr "¯È±i¤j¤p:" + +#: src/wdgt-media-select.c:290 +msgid "Label size:" +msgstr "¼Ðñ¤j¤p:" + +#: src/wdgt-media-select.c:301 +msgid "Layout:" +msgstr "ª©­±:" + +#: src/wdgt-media-select.c:578 +#, c-format +msgid "%d x %d (%d per sheet)" +msgstr "%d x %d (¨C­¶ %d)" + +#: src/wdgt-media-select.c:582 +#, fuzzy, c-format +msgid "%d per sheet" +msgstr "%d x %d (¨C­¶ %d)" + +#: src/wdgt-media-select.c:614 +#, c-format +msgid "%s x %s %s" +msgstr "%s x %s %s" + +#: src/wdgt-media-select.c:619 +#, c-format +msgid "%.5g x %.5g %s" +msgstr "%.5g x %.5g %s" + +#: src/wdgt-media-select.c:630 src/wdgt-media-select.c:644 +#, c-format +msgid "%s %s diameter" +msgstr "" + +#: src/wdgt-media-select.c:634 src/wdgt-media-select.c:648 +#, c-format +msgid "%.5g %s diameter" +msgstr "" + +#: src/wdgt-rotate-label.c:193 +msgid "Rotate" +msgstr "±ÛÂà" + +#. This is the default custom color +#: src/mygal/color-palette.c:396 +#, fuzzy +msgid "custom" +msgstr "¦Û­qÄæ¦ìÆ_" + +#. "Custom" color - we'll pop up a GnomeColorPicker +#: src/mygal/color-palette.c:438 +#, fuzzy +msgid "Custom Color:" +msgstr "ÃC¦â:" + +#: src/mygal/color-palette.c:446 +msgid "Choose Custom Color" +msgstr "" + +#: src/mygal/color-palette.c:579 +msgid "black" +msgstr "" + +#: src/mygal/color-palette.c:580 +msgid "light brown" +msgstr "" + +#: src/mygal/color-palette.c:581 +msgid "brown gold" +msgstr "" + +#: src/mygal/color-palette.c:582 +msgid "dark green #2" +msgstr "" + +#: src/mygal/color-palette.c:583 +msgid "navy" +msgstr "" + +#: src/mygal/color-palette.c:584 src/mygal/color-palette.c:640 +msgid "dark blue" +msgstr "" + +#: src/mygal/color-palette.c:585 +msgid "purple #2" +msgstr "" + +#: src/mygal/color-palette.c:586 +msgid "very dark gray" +msgstr "" + +#: src/mygal/color-palette.c:589 src/mygal/color-palette.c:645 +msgid "dark red" +msgstr "" + +#: src/mygal/color-palette.c:590 +msgid "red-orange" +msgstr "" + +#: src/mygal/color-palette.c:591 +msgid "gold" +msgstr "" + +#: src/mygal/color-palette.c:592 +msgid "dark green" +msgstr "" + +#: src/mygal/color-palette.c:593 src/mygal/color-palette.c:646 +msgid "dull blue" +msgstr "" + +#: src/mygal/color-palette.c:594 src/mygal/color-palette.c:647 +msgid "blue" +msgstr "" + +#: src/mygal/color-palette.c:595 +msgid "dull purple" +msgstr "" + +#: src/mygal/color-palette.c:596 +msgid "dark grey" +msgstr "" + +#: src/mygal/color-palette.c:599 +msgid "red" +msgstr "" + +#: src/mygal/color-palette.c:600 +msgid "orange" +msgstr "" + +#: src/mygal/color-palette.c:601 +msgid "lime" +msgstr "" + +#: src/mygal/color-palette.c:602 +msgid "dull green" +msgstr "" + +#: src/mygal/color-palette.c:603 +msgid "dull blue #2" +msgstr "" + +#: src/mygal/color-palette.c:604 +msgid "sky blue #2" +msgstr "" + +#: src/mygal/color-palette.c:605 src/mygal/color-palette.c:644 +msgid "purple" +msgstr "" + +#: src/mygal/color-palette.c:606 +msgid "gray" +msgstr "" + +#: src/mygal/color-palette.c:609 src/mygal/color-palette.c:641 +#, fuzzy +msgid "magenta" +msgstr "¹Ï¹³" + +#: src/mygal/color-palette.c:610 +msgid "bright orange" +msgstr "" + +#: src/mygal/color-palette.c:611 src/mygal/color-palette.c:642 +msgid "yellow" +msgstr "" + +#: src/mygal/color-palette.c:612 +#, fuzzy +msgid "green" +msgstr "«×¼Æ" + +#: src/mygal/color-palette.c:613 src/mygal/color-palette.c:643 +msgid "cyan" +msgstr "" + +#: src/mygal/color-palette.c:614 +msgid "bright blue" +msgstr "" + +#: src/mygal/color-palette.c:615 src/mygal/color-palette.c:632 +msgid "red purple" +msgstr "" + +#: src/mygal/color-palette.c:616 +msgid "light grey" +msgstr "" + +#: src/mygal/color-palette.c:619 src/mygal/color-palette.c:636 +msgid "pink" +msgstr "" + +#: src/mygal/color-palette.c:620 +msgid "light orange" +msgstr "" + +#: src/mygal/color-palette.c:621 src/mygal/color-palette.c:633 +msgid "light yellow" +msgstr "" + +#: src/mygal/color-palette.c:622 +msgid "light green" +msgstr "" + +#: src/mygal/color-palette.c:623 +msgid "light cyan" +msgstr "" + +#: src/mygal/color-palette.c:624 src/mygal/color-palette.c:634 +msgid "light blue" +msgstr "" + +#: src/mygal/color-palette.c:625 src/mygal/color-palette.c:638 +msgid "light purple" +msgstr "" + +#: src/mygal/color-palette.c:626 +msgid "white" +msgstr "" + +#: src/mygal/color-palette.c:631 +msgid "purplish blue" +msgstr "" + +#: src/mygal/color-palette.c:635 +msgid "dark purple" +msgstr "" + +#: src/mygal/color-palette.c:637 +msgid "sky blue" +msgstr "" + +#: libglabels/template.c:848 +#, c-format +msgid "Generic %s full page" +msgstr "" + +#: libglabels/template.c:897 +msgid "No template files found!" +msgstr "§ä¤£¨ì¼Ëª©ÀÉ®× !" + +#. Create and append an "Other" entry. +#: libglabels/paper.c:67 +msgid "Other" +msgstr "" + +#: libglabels/paper.c:361 +#, fuzzy +msgid "No paper files found!" +msgstr "§ä¤£¨ì¼Ëª©ÀÉ®× !" + +#: data/ui/glabels-ui.xml.h:1 +msgid "About glabels" +msgstr "" + +#: data/ui/glabels-ui.xml.h:2 +msgid "About..." +msgstr "" + +#: data/ui/glabels-ui.xml.h:3 +msgid "Align _Horizontal" +msgstr "" + +#: data/ui/glabels-ui.xml.h:4 +msgid "Align _Vertical" +msgstr "" + +#: data/ui/glabels-ui.xml.h:5 +msgid "Align objects to bottoms" +msgstr "" + +#: data/ui/glabels-ui.xml.h:6 +msgid "Align objects to horizontal centers" +msgstr "" + +#: data/ui/glabels-ui.xml.h:7 +msgid "Align objects to left edges" +msgstr "" + +#: data/ui/glabels-ui.xml.h:8 +msgid "Align objects to right edges" +msgstr "" + +#: data/ui/glabels-ui.xml.h:9 +msgid "Align objects to tops" +msgstr "" + +#: data/ui/glabels-ui.xml.h:10 +msgid "Align objects to vertical centers" +msgstr "" + +#: data/ui/glabels-ui.xml.h:12 +msgid "Bold" +msgstr "" + +#: data/ui/glabels-ui.xml.h:14 +#, fuzzy +msgid "Center align" +msgstr "¤@¯ë" + +#: data/ui/glabels-ui.xml.h:15 +msgid "Center objects to horizontal label center" +msgstr "" + +#: data/ui/glabels-ui.xml.h:16 +msgid "Center objects to vertical label center" +msgstr "" + +#: data/ui/glabels-ui.xml.h:17 +msgid "Change the visibility of markup lines in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:18 +msgid "Change the visibility of the drawing toolbar in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:19 +msgid "Change the visibility of the grid in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:20 +msgid "Change the visibility of the main toolbar in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:21 +msgid "Change the visibility of the property toolbar in the current window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:22 +msgid "Close" +msgstr "" + +#: data/ui/glabels-ui.xml.h:23 +#, fuzzy +msgid "Close the current file" +msgstr "Àx¦s²{¦bÀÉ®×" + +#: data/ui/glabels-ui.xml.h:24 +msgid "Configure the application" +msgstr "" + +#: data/ui/glabels-ui.xml.h:25 +msgid "Contents" +msgstr "" + +#: data/ui/glabels-ui.xml.h:26 +msgid "Copy" +msgstr "" + +#: data/ui/glabels-ui.xml.h:27 +#, fuzzy +msgid "Copy the selection" +msgstr "²¾°£©Ò¦³¿ï¾Ü¶µ" + +#: data/ui/glabels-ui.xml.h:28 +#, fuzzy +msgid "Create a custom template" +msgstr "µe½uª«¥ó" + +#: data/ui/glabels-ui.xml.h:29 +#, fuzzy +msgid "Create a new document" +msgstr "µe½uª«¥ó" + +#: data/ui/glabels-ui.xml.h:30 +msgid "Create barcode object" +msgstr "«Ø¥ß¼Æ½X±ø" + +#: data/ui/glabels-ui.xml.h:31 +msgid "Create box/rectangle object" +msgstr "«Ø¥ß·sªº²°¤l/¤è§Îª«¥ó" + +#: data/ui/glabels-ui.xml.h:32 +msgid "Create ellipse/circle object" +msgstr "«Ø¥ß¾ò¶ê§Î/¹Ï§Îª«¥ó" + +#: data/ui/glabels-ui.xml.h:33 +msgid "Create image object" +msgstr "«Ø¥ß¼v¹³ª«¥ó" + +#: data/ui/glabels-ui.xml.h:34 +msgid "Create line object" +msgstr "µe½uª«¥ó" + +#: data/ui/glabels-ui.xml.h:35 +msgid "Create text object" +msgstr "«Ø¥ß·sªº¤å¦rª«¥ó" + +#: data/ui/glabels-ui.xml.h:36 +msgid "Cu_t" +msgstr "" + +#: data/ui/glabels-ui.xml.h:37 +#, fuzzy +msgid "Customize" +msgstr "¦Û­qÄæ¦ìÆ_" + +#: data/ui/glabels-ui.xml.h:38 +msgid "Customize Drawing Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:39 +msgid "Customize Main Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:40 +msgid "Customize Property Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:41 +msgid "Customize toolbars" +msgstr "" + +#: data/ui/glabels-ui.xml.h:42 +msgid "Cut" +msgstr "" + +#: data/ui/glabels-ui.xml.h:43 +msgid "Cut the selection" +msgstr "" + +#: data/ui/glabels-ui.xml.h:44 +msgid "Decrease magnification" +msgstr "" + +#: data/ui/glabels-ui.xml.h:45 +msgid "Delete" +msgstr "§R°£" + +#: data/ui/glabels-ui.xml.h:46 +#, fuzzy +msgid "Delete the selected objects" +msgstr "«Ø¥ß·sªº¤å¦rª«¥ó" + +#: data/ui/glabels-ui.xml.h:47 +msgid "Drawing toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:48 +msgid "Dump XML" +msgstr "" + +#: data/ui/glabels-ui.xml.h:49 +msgid "Dump the UI Xml description" +msgstr "" + +#: data/ui/glabels-ui.xml.h:50 +msgid "Edit merge properties" +msgstr "­×§ï¦X¨Ö³]©w" + +#: data/ui/glabels-ui.xml.h:54 +msgid "Flip object horizontally" +msgstr "" + +#: data/ui/glabels-ui.xml.h:55 +msgid "Flip object vertically" +msgstr "" + +#: data/ui/glabels-ui.xml.h:56 +#, fuzzy +msgid "Font name" +msgstr "¤£­nÀx¦s" + +#: data/ui/glabels-ui.xml.h:57 +#, fuzzy +msgid "Font selector" +msgstr "²¾°£©Ò¦³¿ï¾Ü¶µ" + +#: data/ui/glabels-ui.xml.h:58 +#, fuzzy +msgid "Font size" +msgstr "¤£­nÀx¦s" + +#: data/ui/glabels-ui.xml.h:59 +msgid "Icon and _Text" +msgstr "" + +#: data/ui/glabels-ui.xml.h:60 +msgid "Increase magnification" +msgstr "" + +#: data/ui/glabels-ui.xml.h:61 +msgid "Italic" +msgstr "" + +#: data/ui/glabels-ui.xml.h:63 +msgid "Left align" +msgstr "" + +#: data/ui/glabels-ui.xml.h:65 +msgid "Line width" +msgstr "" + +#: data/ui/glabels-ui.xml.h:66 +msgid "Lower object to bottom" +msgstr "" + +#: data/ui/glabels-ui.xml.h:67 +msgid "M_arkup" +msgstr "" + +#: data/ui/glabels-ui.xml.h:68 +msgid "Main toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:69 +msgid "Markup" +msgstr "" + +#: data/ui/glabels-ui.xml.h:70 +#, fuzzy +msgid "Modify document properties" +msgstr "­×§ï¤å¥ó¦X¨Ö³]©w" + +#: data/ui/glabels-ui.xml.h:71 +#, fuzzy +msgid "New" +msgstr "·s¼W (&_N)" + +#: data/ui/glabels-ui.xml.h:72 +#, fuzzy +msgid "Object property editor" +msgstr "¤å¦r¼Ë»ª" + +#: data/ui/glabels-ui.xml.h:73 +msgid "Only show icons in the drawing toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:74 +msgid "Only show icons in the main toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:76 +msgid "Open a file" +msgstr "¶}±ÒÀÉ®×" + +#: data/ui/glabels-ui.xml.h:77 +#, fuzzy +msgid "Open the glabels manual" +msgstr "¶}±Ò¼Ðñ" + +#: data/ui/glabels-ui.xml.h:78 +msgid "Paste" +msgstr "" + +#: data/ui/glabels-ui.xml.h:79 +msgid "Paste the clipboard" +msgstr "" + +#: data/ui/glabels-ui.xml.h:80 +#, fuzzy +msgid "Pr_eferences..." +msgstr "Glabels: ³]©w­È" + +#: data/ui/glabels-ui.xml.h:81 +#, fuzzy +msgid "Preferences" +msgstr "Glabels: ³]©w­È" + +#: data/ui/glabels-ui.xml.h:83 +#, fuzzy +msgid "Print the current file" +msgstr "¦C¦L²{¦³ÀÉ®×" + +#: data/ui/glabels-ui.xml.h:84 +#, fuzzy +msgid "Proper_ties..." +msgstr "¤å¦r¼Ë»ª" + +#: data/ui/glabels-ui.xml.h:85 +#, fuzzy +msgid "Properties" +msgstr "¤å¦r¼Ë»ª" + +#: data/ui/glabels-ui.xml.h:86 +msgid "Property toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:87 +msgid "Quit" +msgstr "" + +#: data/ui/glabels-ui.xml.h:88 +msgid "Quit the program" +msgstr "" + +#: data/ui/glabels-ui.xml.h:89 +msgid "Raise object to top" +msgstr "" + +#: data/ui/glabels-ui.xml.h:90 +msgid "Recent _Files" +msgstr "" + +#: data/ui/glabels-ui.xml.h:91 +msgid "Redo" +msgstr "" + +#: data/ui/glabels-ui.xml.h:92 +msgid "Redo the undone action" +msgstr "" + +#: data/ui/glabels-ui.xml.h:93 +msgid "Remove all selections" +msgstr "²¾°£©Ò¦³¿ï¾Ü¶µ" + +#: data/ui/glabels-ui.xml.h:95 +#, no-c-format +msgid "Restore scale to 100%" +msgstr "" + +#: data/ui/glabels-ui.xml.h:96 +msgid "Right align" +msgstr "" + +#: data/ui/glabels-ui.xml.h:99 +msgid "Rotate object 90 clockwise" +msgstr "" + +#: data/ui/glabels-ui.xml.h:100 +msgid "Rotate object 90 counter-clockwise" +msgstr "" + +#: data/ui/glabels-ui.xml.h:101 +#, fuzzy +msgid "Save" +msgstr "¥t¦s¬°..." + +#: data/ui/glabels-ui.xml.h:102 +msgid "Save As" +msgstr "¥t¦s¬°..." + +#: data/ui/glabels-ui.xml.h:103 +#, fuzzy +msgid "Save _As..." +msgstr "¥t¦s¬°..." + +#: data/ui/glabels-ui.xml.h:104 +#, fuzzy +msgid "Save the current file" +msgstr "Àx¦s²{¦bÀÉ®×" + +#: data/ui/glabels-ui.xml.h:105 +msgid "Save the current file with a different name" +msgstr "" + +#: data/ui/glabels-ui.xml.h:106 +#, fuzzy +msgid "Select All" +msgstr "¤Ï¿ï¾Ü¥þ³¡ (&_N)" + +#: data/ui/glabels-ui.xml.h:107 +#, fuzzy +msgid "Select _All" +msgstr "¤Ï¿ï¾Ü¥þ³¡ (&_N)" + +#: data/ui/glabels-ui.xml.h:108 +#, fuzzy +msgid "Select all objects" +msgstr "¿ï¾Ü, ²¾°Ê¤Î­×§ïª«¥ó" + +#: data/ui/glabels-ui.xml.h:109 +msgid "Select, move and modify objects" +msgstr "¿ï¾Ü, ²¾°Ê¤Î­×§ïª«¥ó" + +#: data/ui/glabels-ui.xml.h:111 +msgid "Set drawing toolbar button style according to desktop default" +msgstr "" + +#: data/ui/glabels-ui.xml.h:112 +msgid "Set main toolbar button style according to desktop default" +msgstr "" + +#: data/ui/glabels-ui.xml.h:113 +msgid "Show _Tooltips" +msgstr "" + +#: data/ui/glabels-ui.xml.h:114 +msgid "Show both icons and texts in the drawing toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:115 +msgid "Show both icons and texts in the main toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:116 +msgid "Show tooltips in the drawing toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:117 +msgid "Show tooltips in the main toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:118 +msgid "Show tooltips in the property toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:119 +msgid "Template Designer" +msgstr "" + +#: data/ui/glabels-ui.xml.h:120 +msgid "Template _Designer..." +msgstr "" + +#: data/ui/glabels-ui.xml.h:121 +msgid "Text color" +msgstr "" + +#: data/ui/glabels-ui.xml.h:122 +#, fuzzy +msgid "U_n-select All" +msgstr "¤Ï¿ï¾Ü¥þ³¡ (&_N)" + +#: data/ui/glabels-ui.xml.h:123 +#, fuzzy +msgid "Un-select All" +msgstr "¤Ï¿ï¾Ü¥þ³¡ (&_N)" + +#: data/ui/glabels-ui.xml.h:124 +msgid "Undo" +msgstr "" + +#: data/ui/glabels-ui.xml.h:125 +msgid "Undo the last action" +msgstr "" + +#: data/ui/glabels-ui.xml.h:126 +#, fuzzy +msgid "Zoom _1:1" +msgstr "1:1 Åã¥Ü" + +#: data/ui/glabels-ui.xml.h:127 +#, fuzzy +msgid "Zoom _In" +msgstr "©ñ¤j" + +#: data/ui/glabels-ui.xml.h:128 +#, fuzzy +msgid "Zoom _Out" +msgstr "ÁY¤p" + +#: data/ui/glabels-ui.xml.h:129 +#, fuzzy +msgid "Zoom to _fit" +msgstr "1:1 Åã¥Ü" + +#: data/ui/glabels-ui.xml.h:130 +msgid "Zoom to fit window" +msgstr "" + +#: data/ui/glabels-ui.xml.h:131 +msgid "_About..." +msgstr "" + +#: data/ui/glabels-ui.xml.h:132 +msgid "_Bottoms" +msgstr "" + +#: data/ui/glabels-ui.xml.h:135 +msgid "_Close" +msgstr "" + +#: data/ui/glabels-ui.xml.h:136 +msgid "_Contents" +msgstr "" + +#: data/ui/glabels-ui.xml.h:137 +msgid "_Copy" +msgstr "" + +#: data/ui/glabels-ui.xml.h:138 +#, fuzzy +msgid "_Create Object" +msgstr "«Ø¥ß·sªº¤å¦rª«¥ó" + +#: data/ui/glabels-ui.xml.h:139 +msgid "_Debug" +msgstr "" + +#: data/ui/glabels-ui.xml.h:141 +msgid "_Desktop Default" +msgstr "" + +#: data/ui/glabels-ui.xml.h:142 +msgid "_Drawing Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:143 +msgid "_Edit" +msgstr "" + +#: data/ui/glabels-ui.xml.h:145 +#, fuzzy +msgid "_File" +msgstr "¶ñº¡" + +#: data/ui/glabels-ui.xml.h:146 +msgid "_Grid" +msgstr "" + +#: data/ui/glabels-ui.xml.h:147 +msgid "_Help" +msgstr "" + +#: data/ui/glabels-ui.xml.h:148 +msgid "_Icon" +msgstr "" + +#: data/ui/glabels-ui.xml.h:152 +msgid "_Main Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:153 +#, fuzzy +msgid "_Merge Properties..." +msgstr "¦X¨Ö³]©w" + +#: data/ui/glabels-ui.xml.h:154 +msgid "_New" +msgstr "·s¼W (&_N)" + +#: data/ui/glabels-ui.xml.h:155 +msgid "_Objects" +msgstr "" + +#: data/ui/glabels-ui.xml.h:156 +#, fuzzy +msgid "_Open..." +msgstr "¶}±Ò" + +#: data/ui/glabels-ui.xml.h:158 +msgid "_Paste" +msgstr "" + +#: data/ui/glabels-ui.xml.h:159 +#, fuzzy +msgid "_Print..." +msgstr "¦C¦L" + +#: data/ui/glabels-ui.xml.h:160 +msgid "_Property Toolbar" +msgstr "" + +#: data/ui/glabels-ui.xml.h:161 +msgid "_Quit" +msgstr "" + +#: data/ui/glabels-ui.xml.h:164 +#, fuzzy +msgid "_Save" +msgstr "¥t¦s¬°..." + +#: data/ui/glabels-ui.xml.h:168 +#, fuzzy +msgid "_View" +msgstr "·s¼W (&_N)" + +#: data/glade/prefs-dialog.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/prefs-dialog.glade.h:2 data/glade/object-editor.glade.h:1 +#: data/glade/template-designer.glade.h:5 +msgid "*" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:3 +msgid "Default page size" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:4 +msgid "Fill" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:5 +msgid "Line" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:6 +msgid "Text" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:7 +msgid "Units" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:8 data/glade/object-editor.glade.h:4 +msgid "Alignment:" +msgstr "¹ï¸m:" + +#: data/glade/prefs-dialog.glade.h:9 data/glade/object-editor.glade.h:8 +msgid "Color:" +msgstr "ÃC¦â:" + +#: data/glade/prefs-dialog.glade.h:10 +msgid "Font:" +msgstr "¦r«¬:" + +#: data/glade/prefs-dialog.glade.h:11 +msgid "ISO A4" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:12 +msgid "Inches" +msgstr "­^¤o" + +#: data/glade/prefs-dialog.glade.h:13 data/glade/object-editor.glade.h:19 +msgid "Line Spacing:" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:14 +#, fuzzy +msgid "Locale" +msgstr "¤ñ¨Ò:" + +#: data/glade/prefs-dialog.glade.h:15 +msgid "Millimeters" +msgstr "²@¦Ì" + +#: data/glade/prefs-dialog.glade.h:16 +msgid "Object defaults" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:17 +msgid "Points" +msgstr "ÂI" + +#: data/glade/prefs-dialog.glade.h:18 +msgid "Select default properties for new objects." +msgstr "" + +#: data/glade/prefs-dialog.glade.h:19 +msgid "Select locale specific behavior." +msgstr "" + +#: data/glade/prefs-dialog.glade.h:20 data/templates/paper-sizes.xml.h:25 +msgid "US Letter" +msgstr "" + +#: data/glade/prefs-dialog.glade.h:21 data/glade/object-editor.glade.h:29 +#: data/glade/template-designer.glade.h:72 +msgid "Width:" +msgstr "Áï«×:" + +#: data/glade/object-editor.glade.h:2 +msgid "00000000000 00000" +msgstr "" + +#: data/glade/object-editor.glade.h:3 +msgid "Xxx object properties" +msgstr "" + +#: data/glade/object-editor.glade.h:5 +msgid "Allow merge to automatically shrink text" +msgstr "" + +#: data/glade/object-editor.glade.h:6 +msgid "Angle:" +msgstr "¨¤«×:" + +#: data/glade/object-editor.glade.h:7 +msgid "Checksum" +msgstr "" + +#: data/glade/object-editor.glade.h:10 +#, fuzzy +msgid "Family:" +msgstr "¶ñº¡" + +#: data/glade/object-editor.glade.h:12 +msgid "Fill" +msgstr "¶ñº¡" + +#: data/glade/object-editor.glade.h:13 data/glade/template-designer.glade.h:33 +msgid "Height:" +msgstr "°ª«×:" + +#: data/glade/object-editor.glade.h:14 +msgid "Image" +msgstr "¹Ï¹³" + +#: data/glade/object-editor.glade.h:15 +msgid "Insert merge field" +msgstr "´¡¤J¦X¨Ö¦C" + +#: data/glade/object-editor.glade.h:17 +msgid "Length:" +msgstr "ªø«×:" + +#: data/glade/object-editor.glade.h:18 +msgid "Line" +msgstr "½u" + +#: data/glade/object-editor.glade.h:20 +msgid "Literal:" +msgstr "¤å¦r:" + +#: data/glade/object-editor.glade.h:21 +msgid "Load image" +msgstr "" + +#: data/glade/object-editor.glade.h:22 +msgid "Position" +msgstr "¦ì¸m" + +#: data/glade/object-editor.glade.h:23 +msgid "Reset image size" +msgstr "­«³]¹Ï¹³¤j¤p" + +#: data/glade/object-editor.glade.h:24 +msgid "Size" +msgstr "¤j¤p" + +#: data/glade/object-editor.glade.h:25 +#, fuzzy +msgid "Size:" +msgstr "¤j¤p" + +#: data/glade/object-editor.glade.h:26 +#, fuzzy +msgid "Style" +msgstr "¼Ë¦¡" + +#: data/glade/object-editor.glade.h:27 +#, fuzzy +msgid "Style:" +msgstr "¼Ë¦¡" + +#: data/glade/object-editor.glade.h:30 +msgid "X:" +msgstr "X:" + +#: data/glade/object-editor.glade.h:31 +msgid "Y:" +msgstr "Y:" + +#: data/glade/object-editor.glade.h:32 +msgid "degrees" +msgstr "«×¼Æ" + +#: data/glade/object-editor.glade.h:33 +msgid "dialog1" +msgstr "" + +#: data/glade/object-editor.glade.h:34 +msgid "digits:" +msgstr "" + +#: data/glade/object-editor.glade.h:35 +#, fuzzy +msgid "format:" +msgstr "®æ¦¡:" + +#: data/glade/template-designer.glade.h:1 +msgid " " +msgstr "" + +#: data/glade/template-designer.glade.h:2 +msgid "(e.g., \"Mailing Labels,\" \"Business Cards,\" ...)" +msgstr "" + +#: data/glade/template-designer.glade.h:3 +msgid "(e.g., 8163A)" +msgstr "" + +#: data/glade/template-designer.glade.h:4 +msgid "(e.g., Avery, Acme, ...)" +msgstr "" + +#: data/glade/template-designer.glade.h:6 +msgid "1. Outer radius:" +msgstr "" + +#: data/glade/template-designer.glade.h:7 +msgid "1. Radius:" +msgstr "" + +#: data/glade/template-designer.glade.h:8 +#, fuzzy +msgid "1. Width:" +msgstr "Áï«×:" + +#: data/glade/template-designer.glade.h:9 +#, fuzzy +msgid "2. Height:" +msgstr "°ª«×:" + +#: data/glade/template-designer.glade.h:10 +msgid "2. Inner radius:" +msgstr "" + +#: data/glade/template-designer.glade.h:11 +msgid "2. Waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:12 +msgid "3. Clipping width:" +msgstr "" + +#: data/glade/template-designer.glade.h:13 +msgid "3. Margin" +msgstr "" + +#: data/glade/template-designer.glade.h:14 +msgid "3. Round (radius of corner):" +msgstr "" + +#: data/glade/template-designer.glade.h:15 +msgid "4. Clipping height:" +msgstr "" + +#: data/glade/template-designer.glade.h:16 +msgid "4. Horiz. waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:17 +msgid "5. Vert. waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:18 +msgid "5. Waste (overprint allowed):" +msgstr "" + +#: data/glade/template-designer.glade.h:19 +msgid "6. Margin" +msgstr "" + +#: data/glade/template-designer.glade.h:20 +msgid "Brand/Manufacturer:" +msgstr "" + +#: data/glade/template-designer.glade.h:21 +msgid "CD/DVD (including credit card CDs)" +msgstr "" + +#: data/glade/template-designer.glade.h:22 +msgid "" +"Congratulations!\n" +"\n" +"You have completed the gLabels Template Designer.\n" +"If you wish to accept and save your design, click \"Apply.\"\n" +"\n" +"Otherwise, you may click \"Cancel\" to abandon your design\n" +"or \"Back\" to continue editing this design." +msgstr "" + +#: data/glade/template-designer.glade.h:30 +msgid "Design Completed" +msgstr "" + +#: data/glade/template-designer.glade.h:31 +msgid "Distance from left edge (x0):" +msgstr "" + +#: data/glade/template-designer.glade.h:32 +msgid "Distance from top edge (y0):" +msgstr "" + +#: data/glade/template-designer.glade.h:34 +msgid "Horizontal pitch (dx):" +msgstr "" + +#: data/glade/template-designer.glade.h:35 +msgid "" +"How many layouts will your template contain? \n" +"\n" +"A layout is a set of labels or cards that can be arranged in a simple grid.\n" +"Most templates only need one layout, as in the first example.\n" +"The second example illustrates when two layouts are needed." +msgstr "" + +#: data/glade/template-designer.glade.h:40 +msgid "Label Size (CD/DVD)" +msgstr "" + +#: data/glade/template-designer.glade.h:41 +#, fuzzy +msgid "Label Size (Round)" +msgstr "¼Ðñ¤j¤p:" + +#: data/glade/template-designer.glade.h:42 +#, fuzzy +msgid "Label or Card Shape" +msgstr "·s¼W¼Ðñ©Î¥d" + +#: data/glade/template-designer.glade.h:43 +msgid "Label or Card Size (Rectangular)" +msgstr "" + +#: data/glade/template-designer.glade.h:44 +#, fuzzy +msgid "Layout #1" +msgstr "ª©­±:" + +#: data/glade/template-designer.glade.h:45 +#, fuzzy +msgid "Layout #2" +msgstr "ª©­±:" + +#: data/glade/template-designer.glade.h:46 +#, fuzzy +msgid "Layout(s)" +msgstr "ª©­±:" + +#: data/glade/template-designer.glade.h:47 +#, fuzzy +msgid "Name and Description" +msgstr "´y­z:" + +#: data/glade/template-designer.glade.h:48 +msgid "Number across (nx):" +msgstr "" + +#: data/glade/template-designer.glade.h:49 +msgid "Number down (ny):" +msgstr "" + +#: data/glade/template-designer.glade.h:50 +msgid "Number of Layouts" +msgstr "" + +#: data/glade/template-designer.glade.h:51 +msgid "Number of layouts:" +msgstr "" + +#: data/glade/template-designer.glade.h:52 +#, fuzzy +msgid "Page Size" +msgstr "¯È±i¤j¤p:" + +#: data/glade/template-designer.glade.h:54 +msgid "Part #:" +msgstr "" + +#: data/glade/template-designer.glade.h:55 +msgid "" +"Please enter the following identifying information about the template " +"stationery." +msgstr "" + +#: data/glade/template-designer.glade.h:56 +msgid "Please enter the following layout information." +msgstr "" + +#: data/glade/template-designer.glade.h:57 +msgid "" +"Please enter the following size parameters of a single label in your " +"template." +msgstr "" + +#: data/glade/template-designer.glade.h:58 +msgid "" +"Please enter the following size parameters of a single label or card in your " +"template." +msgstr "" + +#: data/glade/template-designer.glade.h:59 +msgid "Please select the basic shape of the labels or cards." +msgstr "" + +#: data/glade/template-designer.glade.h:60 +msgid "Please select the page size of the template stationery." +msgstr "" + +#: data/glade/template-designer.glade.h:61 +#, fuzzy +msgid "Print test sheet" +msgstr "¦b­º±i¯È" + +#: data/glade/template-designer.glade.h:62 +msgid "Rectangular or square (can have rounded corners)" +msgstr "" + +#: data/glade/template-designer.glade.h:63 +msgid "Round" +msgstr "" + +#: data/glade/template-designer.glade.h:64 +msgid "" +"Templates needing\n" +"two layouts." +msgstr "" + +#: data/glade/template-designer.glade.h:66 +msgid "" +"Templates needing only\n" +"one layout." +msgstr "" + +#: data/glade/template-designer.glade.h:68 +msgid "Vertical pitch (dy):" +msgstr "" + +#: data/glade/template-designer.glade.h:69 +msgid "" +"Welcome to the gLabels Template Designer.\n" +"\n" +"This dialog will assist you in the creation of a custom gLabels template." +msgstr "" + +#: data/templates/paper-sizes.xml.h:1 +msgid "A0" +msgstr "" + +#: data/templates/paper-sizes.xml.h:2 +msgid "A1" +msgstr "" + +#: data/templates/paper-sizes.xml.h:3 +msgid "A10" +msgstr "" + +#: data/templates/paper-sizes.xml.h:4 +msgid "A2" +msgstr "" + +#: data/templates/paper-sizes.xml.h:5 +msgid "A3" +msgstr "" + +#: data/templates/paper-sizes.xml.h:6 +msgid "A4" +msgstr "" + +#: data/templates/paper-sizes.xml.h:7 +msgid "A5" +msgstr "" + +#: data/templates/paper-sizes.xml.h:8 +msgid "A6" +msgstr "" + +#: data/templates/paper-sizes.xml.h:9 +msgid "A7" +msgstr "" + +#: data/templates/paper-sizes.xml.h:10 +msgid "A8" +msgstr "" + +#: data/templates/paper-sizes.xml.h:11 +msgid "A9" +msgstr "" + +#: data/templates/paper-sizes.xml.h:12 +msgid "B0" +msgstr "" + +#: data/templates/paper-sizes.xml.h:13 +msgid "B1" +msgstr "" + +#: data/templates/paper-sizes.xml.h:14 +msgid "B10" +msgstr "" + +#: data/templates/paper-sizes.xml.h:15 +msgid "B2" +msgstr "" + +#: data/templates/paper-sizes.xml.h:16 +msgid "B3" +msgstr "" + +#: data/templates/paper-sizes.xml.h:17 +msgid "B4" +msgstr "" + +#: data/templates/paper-sizes.xml.h:18 +msgid "B5" +msgstr "" + +#: data/templates/paper-sizes.xml.h:19 +msgid "B6" +msgstr "" + +#: data/templates/paper-sizes.xml.h:20 +msgid "B7" +msgstr "" + +#: data/templates/paper-sizes.xml.h:21 +msgid "B8" +msgstr "" + +#: data/templates/paper-sizes.xml.h:22 +msgid "B9" +msgstr "" + +#: data/templates/paper-sizes.xml.h:23 +msgid "US Executive" +msgstr "" + +#: data/templates/paper-sizes.xml.h:24 +msgid "US Legal" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:1 +#: data/templates/zweckform-iso-templates.xml.h:1 +msgid "Address Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:2 +#: data/templates/avery-iso-templates.xml.h:2 +#: data/templates/zweckform-iso-templates.xml.h:3 +#: data/templates/misc-us-templates.xml.h:2 +#: data/templates/misc-iso-templates.xml.h:9 +msgid "Business Cards" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:3 +msgid "CD/DVD Labels (Disc Labels)" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:4 +msgid "Diskette Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:5 +#, fuzzy +msgid "Filing Labels" +msgstr "¼Ðñ" + +#: data/templates/avery-us-templates.xml.h:6 +msgid "Full Sheet Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:7 +#, fuzzy +msgid "Large Round Labels" +msgstr "¥Ñ¸Tñ¶}¯Å" + +#: data/templates/avery-us-templates.xml.h:8 +msgid "Name Badge Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:9 +msgid "Return Address Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:10 +msgid "Shipping Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:11 +#, fuzzy +msgid "Small Round Labels" +msgstr "¥Ñ¸Tñ¶}¯Å" + +#: data/templates/avery-us-templates.xml.h:12 +#, fuzzy +msgid "Square Labels" +msgstr "¼Ðñ" + +#: data/templates/avery-us-templates.xml.h:13 +msgid "Video Tape Face Labels" +msgstr "" + +#: data/templates/avery-us-templates.xml.h:14 +msgid "Video Tape Spine Labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:1 +msgid "Address labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:3 +msgid "CD Booklet" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:4 +msgid "CD Inlet" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:5 +#: data/templates/zweckform-iso-templates.xml.h:4 +#: data/templates/misc-us-templates.xml.h:4 +#: data/templates/misc-iso-templates.xml.h:10 +#, fuzzy +msgid "CD/DVD Labels" +msgstr "¼Ðñ" + +#: data/templates/avery-iso-templates.xml.h:6 +msgid "Diskette labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:7 +#: data/templates/zweckform-iso-templates.xml.h:7 +#: data/templates/misc-iso-templates.xml.h:17 +msgid "Mailing Labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:8 +#, fuzzy +msgid "Mailing labels" +msgstr "¼Ðñ" + +#: data/templates/avery-iso-templates.xml.h:9 +msgid "Mini Address Labels" +msgstr "" + +#: data/templates/avery-iso-templates.xml.h:10 +#, fuzzy +msgid "Shipping labels" +msgstr "¶}±Ò¼Ðñ" + +#: data/templates/zweckform-iso-templates.xml.h:2 +msgid "Allround Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:5 +msgid "Correction and Cover-up Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:6 +msgid "Lever Arch File Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:8 +msgid "QSL-Karten Etiketten 70mm x 50,8mm" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:9 +msgid "Rectangular Copier Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:10 +#: data/templates/misc-iso-templates.xml.h:22 +msgid "Rectangular Labels" +msgstr "" + +#: data/templates/zweckform-iso-templates.xml.h:11 +msgid "Video Labels (back)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:1 +msgid "Business Card CD" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:3 +msgid "CD Template Rectangles" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:5 +msgid "CD/DVD Labels (Face Only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:6 +#: data/templates/misc-iso-templates.xml.h:11 +msgid "CD/DVD Labels (face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:7 +#, fuzzy +msgid "DLT Labels" +msgstr "¼Ðñ" + +#: data/templates/misc-us-templates.xml.h:8 +msgid "Microtube labels" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:9 +msgid "Mini-CD Labels" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:10 +msgid "PRO CD Labels 2-up (CD spine only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:11 +msgid "PRO CD Labels 2-up (Face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:12 +#: data/templates/misc-iso-templates.xml.h:21 +msgid "PRO CD Labels 2-up (face only)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:13 +msgid "Slimline CD Case (rightside up)" +msgstr "" + +#: data/templates/misc-us-templates.xml.h:14 +msgid "Slimline CD Case (upside down)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:1 +msgid "Agipa 119488: Business Cards" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:2 +msgid "Allround Labels --24" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:3 +msgid "Allround Labels --44" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:4 +msgid "Allround Labels --64" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:5 +msgid "Allround Labels --65" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:6 +msgid "Arch File Labels" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:7 +msgid "Arch File Labels (large)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:8 +msgid "Arch File Labels (small)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:12 +msgid "CD/DVD Labels Standard Format (face only)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:13 +msgid "Diskette Labels (face only)" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:14 +msgid "EPSON Photo Stickers 16" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:15 +msgid "Etiketten" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:16 +msgid "Fridge Magnet Stickers" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:18 +msgid "Mailing Labels --14" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:19 +msgid "Mailing Labels-2 columns" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:20 +msgid "Mailing Labels-3 columns" +msgstr "" + +#: data/templates/misc-iso-templates.xml.h:23 +msgid "Video Labels (face only)" +msgstr "" + +#: data/desktop/glabels.desktop.in.h:1 +msgid "Create labels, business cards and media covers." +msgstr "" + +#: data/desktop/glabels.desktop.in.h:2 +msgid "gLabels Label Designer" +msgstr "" + +#: data/mime/glabels.keys.in.h:1 data/mime/glabels.xml.in.h:1 +#, fuzzy +msgid "gLabels Project File" +msgstr "¤å¦r¼Ë»ª" + +#, fuzzy +#~ msgid "Object _Properties..." +#~ msgstr "¤å¦r¼Ë»ª" + +#~ msgid "Display units" +#~ msgstr "Åã¥Ü³æ¦ì" + +#~ msgid "Default page size" +#~ msgstr "¹w³]¯È±i¤j¤p" + +#~ msgid "Outline" +#~ msgstr "¥~Ãä" + +#~ msgid "Edit line object properties" +#~ msgstr "­×§ï½uª«¥óªº³]©w" + +#~ msgid "Edit text object properties" +#~ msgstr "­×§ï¤å¦rª«¥óªº³]©w" + +#~ msgid "Maintain current aspect ratio" +#~ msgstr "«O¯d²{¦³ªº¤j¤p¤ñ¨Ò" + +#, fuzzy +#~ msgid "CD Labels" +#~ msgstr "¼Ðñ" + +#, fuzzy +#~ msgid "Open %s" +#~ msgstr "¶}±Ò" + +#~ msgid "Revert to saved copy of %s?" +#~ msgstr "­n¸ü¤J¤wÀx¦sªº³Æ¥÷ %s ?" + +#~ msgid "Unknown media type. Using default." +#~ msgstr "¤£©úªº´CÅéÃþ§Î. ¨Ï¥Î¹w³]." + +#~ msgid "" +#~ "``%s'' has been modified.\n" +#~ "\n" +#~ "Do you wish to save it?" +#~ msgstr "" +#~ "``%s`` ¤w³Q­×§ï.\n" +#~ "\n" +#~ "­n²{¦bÀx¦s¶Ü ?" + +#~ msgid "Close / Save label as" +#~ msgstr "Ãö³¬ / Àx¦s¼Ðñ¬°..." + +#~ msgid "Label no longer valid!" +#~ msgstr "¼Ðñ¨Ã¤£¬O¥¿½T¥iŪªº !" + +#~ msgid "Error writing file" +#~ msgstr "¦b¼g¤JÀɮ׮ɵo¥Í¿ù»~" + +#~ msgid "Edit properties..." +#~ msgstr "­×§ï³]©w..." + +#~ msgid "Appearance" +#~ msgstr "¼Ë»ª" + +#~ msgid "Position/Size" +#~ msgstr "¦ì¸m/¤j¤p" + +#~ msgid "Image format not currently supported" +#~ msgstr "¹Ï¹³®æ¦¡¨Ã¨S¦³¤ä´©" + +#~ msgid "Barcode data" +#~ msgstr "¼Æ½X±ø¸ê®Æ" + +#~ msgid "%" +#~ msgstr "%" + +#~ msgid "Show text with barcode" +#~ msgstr "Åã¥Ü¼Æ½X±ø¤å¦r" + +#~ msgid "Fields" +#~ msgstr "Äæ¦ì" + +#~ msgid "Column" +#~ msgstr "¦C" + +#~ msgid "Sample data" +#~ msgstr "¼Ë¥»¸ê®Æ" + +#~ msgid "Make a new, empty label" +#~ msgstr "»s§@·sÀÉ, ªÅªº¼Ëñ" + +#~ msgid " New " +#~ msgstr " ·s¼W " + +#~ msgid "New Label/Card" +#~ msgstr "·s¼W¼Ðñ/¥d" + +#~ msgid " Open " +#~ msgstr " ¶}±Ò " + +#~ msgid " Save " +#~ msgstr " Àx¦s " + +#~ msgid " Print " +#~ msgstr " ¦C¦L " + +#~ msgid "Function is not implemented!" +#~ msgstr "¥\¯à¥¼§¹¦¨ !" diff --git a/qrencode-3.1.0/COPYING b/qrencode-3.1.0/COPYING new file mode 100644 index 00000000..2d2d780e --- /dev/null +++ b/qrencode-3.1.0/COPYING @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +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 and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, 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 library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete 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 distribute a copy of this License along with the +Library. + + 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 Library or any portion +of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +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 Library, 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 Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you 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. + + If distribution of 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 satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be 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. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library 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. + + 9. 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 Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +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 with +this License. + + 11. 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 Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library 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 Library. + +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. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library 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. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser 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 Library +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 Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +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 + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. 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 LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +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. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/qrencode-3.1.0/ChangeLog b/qrencode-3.1.0/ChangeLog new file mode 100644 index 00000000..e4950e9e --- /dev/null +++ b/qrencode-3.1.0/ChangeLog @@ -0,0 +1,447 @@ +2009.06.06 Kentaro FUKUCHI + * Backported from the main trunk. + * Makefile.am: + - Dependency check was incorrect because of misconfiguration. + * Version 3.1.0 has been released. + +2009.05.30 Kentaro FUKUCHI + * qrinput.c: + - padlen check was wrong in QRinput_appendPaddingBit(). + * tests/test_qrinput.c: + - Stop printing bstream->data. + - test_padding2() has been added. + +2009.05.21 Kentaro FUKUCHI + * qrinput.c: + - 'padding' was not initialize. + +2009.05.20 Kentaro FUKUCHI + * qrenc.c, qrinput.c, qrencode.c: + - Some compile warnings cleared. + * qrencode.c, tests/test_qrencode.c: + - NULL check of an input arg has been added to + QRcode_encodeString8bit(). + - NULL check test and empty string test have been added for + QRcode_encodeString8bit(). + * qrinput.h, qrencode_inner.h, split.c: + - Copyright year updates. + * split.[ch]: + - Split_splitStringToQRinput() set errno EINVAL if input string is + NULL or empty. + - Documentation improved. + * qrenc.c: + - perror() is now used to show the details of some errors. + * qrencode.[ch]: + - Some functions now set errno appropriately. + - Typo fixes. + +2009.05.20 Kentaro FUKUCHI + * tests/create_frame_pattern.c, tests/Makefile.am: + - New test tool "create_frame_pattern" has been added. + * tests/test_qrspec.c: + - test_alignment1() has been replaced with test_newframe(). + test_newframe() compares newly created frames with frame pattern + data created by create_frame_pattern. + * tests/frame, tests/Makefile.am: + - Pattern file "frame" has been added to EXTRA_DIST. + * mask.c: + - Very small improvement. Unnecessary malloc()s are reduced. + * tests/test_qrencode.c: + - Two new tests have been added. + * split.c: + - NULL check and string length check have been added. + * qrspec.c, tests/test_qrinput.c: + - Forgotten padding bits bug has been fixed. (enbugged at 2009.5.18) + - New test for the bug above has been added. + * qrspec.[ch], qrencode_inner.h: + - Some function becomes __STATIC and their declarations have been + moved to qrencode_inner.h. + * tests/prof_qrencode.c: + - Now liberates all heap at the end of the program. + +2009.05.19 Kentaro FUKUCHI + * qrencode.c, qrencode_inner.h: + - calloc() is now used to initialize rsblock. + - Number of malloc()s in RSblock_initBlock() has been integrated to + one malloc() in QRraw_new(). + * rscode.c: + - A very small code improvement. + * qrinput.[ch]: + - More return value checks. + - Code cleanups. + * tests/common.h, tests/test_{split,monkey,qrinput}.c: + - Tests improved. + * qrspec.[ch], tests/test_qrspec.c: + - Code cleanups. + - QRspec_rs{Data,Ecc}Length() have been added. + * tests/view_qrcode.c: + - Code cleanups. + - Disabled mask setting in structured mode. + * tests/common.h: + - assert_nothing() has been added. + * qrinput.c, qrencode.c, tests/test_*.c: + - Various *_free() now allow NULL pointer. (nothing performed) + * qrspec.[ch]: + - Alignment pattern is now put by QRspec_putAlignmentPattern(). + QRspec_getAlignmentPattern() and QRspec_freeAlignment() have been + removed. + +2009.05.18 Kentaro FUKUCHI + * qrencode.c: + - More return value checks. + * bitstream.c: + - BitStream_free() allows NULL pointer (nothing performed). + * qrinput.c: + - QRinput_List_freeEntry() and QRinput_free() allow NULL pointer. + - QRinput_createPaddingBit() has been replaced with + QRinput_appendPaddingBit(). + - QRinput_convertData() now sets errno to EINVAL when input is too + large. + - More return value checks. Mainly for ENOMEM error. + +2009.05.16 Kentaro FUKUCHI + * qrencode.h: + - Indent improvement. + * Makefile.am: + - qrencode.spec has been added to EXTRA_DIST. + +2009.05.14 Kentaro FUKUCHI + * qrinput.c, qrencode.c, qrspe.c: + - More return value checks. Mainly for ENOMEM error. + * qrspec.[ch], qrencode.c, tests/test_qrspec.c: + - QRspec_getEccSpec() now accepts an int array instead to return + multiple values instead of returning dynamic allocated array. + * mask.c, rscode.c: + - More return value checks from malloc(). + * configure.ac: + - Added "--enable-mudflap" option. + * rscode.[ch]: + - Added free_rs_cache() for debug purpose. + * tests/test_{monkey,qrencode,rs}.c: + - Call free_rs_cache() at the end of the tests. + * qrencode.c: + - QRraw_new() and RSblock_init() have been improved. + - Eliminated unnecessary calls of init_rs(). + * autogen.sh, configure.ac: + - Darwin workarounds. + * tests/common.h, tests/test_bitstream.c: + - New tests have been added. + +2009.05.12 Kentaro FUKUCHI + * bitstream.c: + - BitStream_toByte() had returned non-NULL for an empty BitStream. + * tests/test_bitstream.c: + - test_null() has been added. + * qrinput.c: + - A possible memory leak has been eliminated. It happend when a wrong + version number was given. + * tests/test_qriput.c: + - Memory leaks have been eliminated. + +2009.05.01 Kentaro FUKUCHI + * Bumped vertion to 3.1.0. + +2009.04.30 Kentaro FUKUCHI + * bistream.[ch]: + - Internal representation of BitStream has been changed from + NUL-terminated string to unsigned char array. + * tests/common.h, tests/test_{bitstream,qrinput}.c: + - Some test sequences have been updated (see above). + +2009.03.25 Kentaro FUKUCHI + * configure.ac: + - "--without-tests" has become default setting. + * bitstream.[ch]: + - Now functions strictly check return value from malloc() and return + error if it fails. + +2008.10.31 Kentaro FUKUCHI + * tests/commo.h: + - __FUNCTION__ has been replaced with __func__, to follow the C99 + standard. + - The way of variadic macros has been changed, to follow the C99 + standard. + +2008.10.11 Kentaro FUKUCHI + * qrencode_inner.h: + - Now this header is called only by test programs. + * qrencode.c, qrencode_inner.h: + - Some definitions and declares written in qrencode_inner.h have been + moved into qrencode.c: + - QRraw_*() have been declared as __STATIC. + * mask.[ch], qrencode.c, qrencode_inner.h: + - Mask_makeMask() now requires QRecLevel. + - QRencode_writeFormatInformation() has been renamed and moved to + Mask_writeFormatInformation(), and become __STATIC. + * tests/*.c: + - Unneeded #include "qrencode_inner.h" have been removed. + +2008.10.11 Kentaro FUKUCHI + * autogen.sh: + - Darwin workaround. + * configure.ac: + - Now config.h offers "__STATIC" macro becomes "static" when + "--without-tests" is specified. This macro is useful for functions + called from test programs but not from other library codes. + * qrinput.c: + - Very little performance improvement. + * mask.c: + - Code cleanups. + +2008.09.12 Kentaro FUKUCHI + * tests/view_qrcode.c: + - Unused variable 'pitch' has been removed from draw_QRcode(). + +2008.06.03 Kentaro FUKUCHI + * Merged to the main trunk. + +2008.06.01 Kentaro FUKUCHI + * qrenc.c: + - Now it does not show the full usage when unrecognized options are + given. + - When "--help" is given, it displays the long usage. + * Version 3.0.3 has been released. + +2008.05.26 Kentaro FUKUCHI + * qrenc.c, tests/view_qrcode.c: + - getopt_long_only() has been replaced with getopt_long() which is + widely available. (Thanks to Gavan Fantom) + - Now it accepts long options. + * qrencode.1.in: + - followed the above changes. + * Bumped version to 3.0.3. + +2008.05.18 Kentaro FUKUCHI + * qrspec.c: + - The bit order of "Version information" has been corrected. + (Thanks to Paul Janssesn) + * configure.ac, Makefile.am: + - The "--without-tests" has been added to the configure script. + * qrencode.spec.in: + - Uses "--without-tests". + * Version 3.0.2 has been released. + +2008.05.14 Kentaro FUKUCHI + * various files: + - Some compile-time warnings/erros with g++ have been fixed. + (Thanks to wangsai) + +2008.05.09 Kentaro FUKUCHI + * qrenc.c: + - Now qrencode writes an image file in binary mode for non-POSIX + platform, such as MS-Windows. (bug report from Paul Janssens) + * Makefile.am: + - tests/test_all.sh has been added. + * tests/test_all.sh: + - Now it exits immediately if any test fails. + * Version 3.0.1 has been released. + +2008.05.01 Kentaro FUKUCHI + * qrencode.spec.in: + - Added the man page to the files section. + +2008.04.30 Kentaro FUKUCHI + * Version 3.0.0 has been released. + +2008.04.23 Kentaro FUKUCHI + * Version 3.0.0rc3 has been released. + - This will probably be the final release candidate, if all goes well. + +2008.04.23 Kentaro FUKUCHI + * split.c: + - Split_identifyMode() now uses isdigit() and isalnum() macros. + * qrinput.c: + - Error checks have been improved. + * qrenc.c, tests/view_qrcode.c: + - Return value checks have been added. + - Structured-append encode with version 0 now returns error. + * qrencode.[ch]: + - QRencode_encodeStructuredInput() -> QRencode_encodeInputStructured() + (for consistency with other QRencode_encode*Structured() functions) + * mask.c: + - A code block never called has been eliminated. + +2008.04.14 Kentaro FUKUCHI + * Version 3.0.0rc2 has been released. + +2008.04.20 Kentaro FUKUCHI + * qrencode.h: + - QR_MODE_NUL has been added to QRencodeMode. Basically it is used + only by Split_identifyMode(). + * qrinput.[ch], split.c: + - QRinput_identifyMode() has been moved to split.c, changed to static + and now needs a hint. + * split.c: + - Auto-splitting has been improved. + * qrinput.c: + - A memory leak has been fixed. + * configure.ac: + - The "--enable-gprof" and "--enable-gcov" options have been added. + * Makefile.am: + - man1_MANS has been moved into the "if BUILD_TOOLS - endif" block. + +2008.04.14 Kentaro FUKUCHI + * Version 3.0.0rc1 has been released. + +2008.04.14 Kentaro FUKUCHI + * Bumped version to 3.0.0. + * qrencode.[ch]: + - QRcode_encodeInput() has changed the API. Previously it takes a + QRinput, version and level, but now it takes only a QRinput, because + QRinput holds the version and level in it. From 3.0.0, you should + set them by calling QRinput_setVersion() and + QRinput_setErrorCorrectionLevel(), or use QRinput_new2() to + instantiate a QRinput object. + +2008.04.14 Kentaro FUKUCHI + * qrspe.c: + - NULL check has been added. + * split.[ch]: + - API changed. + * qrencode.c: + - Arguments (version and level) are now checked in QRcode_encodeMask(). + Internal functions trust the arguments are valid. + - Error checks improved. + * qrinput.c: + - Error checks improved. + * qrencode.h: + - Documentation improvements. + +2008.04.13 Kentaro FUKUCHI + * qrencode.c, qrencode_innter.h, tests/view_qrcode.c: + - Changed API of QRcode_encodeMask(). + * qrencode.[ch], qrinput.[ch], split.[ch]: + - Some functions now set errno appropriately. + +2008.04.09 Kentaro FUKUCHI + * qrencode.h, qrinput.c: + - QRinput_Struct_insertStructuredAppendHeaders() and + QRinput_insertStructuredAppendHeader now returns error, when the + input contains too many structured inputs. + * qrencode.c: + - QRcode_encodeInputToStructured() now returns NULL when + QRinput_splitQRinputToStruct() fails. + * tests/view_qrcode.c: + - Segmentation fault bug has been fixed. (see previous memo) + +2008.04.08 Kentaro FUKUCHI + * qrinput.c: + - Fixed a bug in QRinput_estimateBitStreamSizeOfEntry(). It could + overestimate the size. + * rscode.c: + - Optimized the order of the parameters equality test in init_rs(). + * qrspec.c, qrspec.h: + - Added QRspec_clearCache(). + * tests/test_estimatebit.c: + - Bug fixed in test_numbit3(). + +2008.04.07 Kentaro FUKUCHI + * Bumped version to 2.1.0. + * Structured append is now supported (patches from Yusuke Mihara): + - Two new types, QRcode_List and QRinput_Struct, have been added. + - Following functions have been added: + - QRcode_encodeStructuredInput() + - QRcode_encodeStringStructured() + - QRcode_encodeString8bitStructured() + - Some functions to handle structured append symbols have been added. + See Doxygen-ized descriptions for the details. + * qrenc.c: + - "-S" option has been added for structured append. + * split.h: + - "extern" was dropped. + * qrinput.h, qrencode.h: + - Moved declarations of QRinput_{get,set}{Version,ErrorCorrectionLevel} + from qrinput.h to qrencode.h. Now they are publicly accessible. + * qrencode.h, qrinput.h, qrinput.c: + - Added QRinput_new2(). + - QRinput_newEntry(), QRinput_freeEntry have been renamed to + QRinput_List_newEntry(), QRinput_List_freeEntry(). + * split.c: + - Bug fix: Split_eat8() now eats at least 1 byte. Previously it could + produce a 0-length input entry. + +2008.01.23 Kentaro FUKUCHI + * qrencode.1.in, Makefile.am, configure.ac: + - Manpage of qrencode has been added. + * qrenc.c, tests/view_qrcode.c: + - Usage message has been updated. + +2008.01.18 Kentaro FUKUCHI + * split.c: + - Bug fixes. + * tests/test_split.c: + - Followed recent API changes. + - Added new test "test_toupper()". + * qrenc.c, tests/view_qrcode.c: + - Source-level compatibility has been improved. + - view_qrcode now accepts stdin like qrencode. + - Usage message has been updated/fixed. + * Copyright year has been updated. + +2008.01.16 Kentaro FUKUCHI + * qrinput.c, split.c: + - Case-sensitive mode becomes now default mode. + - Alphabet-Numeric mode now encodes only upper-case alphabet and + numeric characters. If "-i" option is given, split.c converts + lower-case characters to upper-case characters at first. + * qrenc.c, tests/view_qrcode.c: + - Case-sensitive mode becomes now default mode. + - Option "-i" has been added. + +2007.12.14 Kentaro FUKUCHI + * tests/test_qrencode.c: + - New test has been added. + * tests/view_qrcode.c: + - Options supported. + - Default mask is now -1 (auto). + +2007.12.13 Kentaro FUKUCHI + * qrencode.[ch]: + - QRcode_writeFormatInformation now returns a number of dark modules. + * mask.c: + - The mask evaluation function now writes format information before + evaluation. (Philippe Delcroix) + * split.[ch]: + - Case-sensitive mode has been added to QRcode_encodeString(). + - "-8" option has been added to qrenc.c. + - "-c" now encodes in improved case-sensitive mode. + * tests/test_{split,qrencode}.c: + - test_split*() have been moved to test_split.c. + +2007.12.10 Kentaro FUKUCHI + * Bumped version to 2.0.0. + * Merged to main trunk. + * mask.[ch], split.[ch]: + - Masking functions and splitString functions are separated from + qrencode.c. + * mqrspec.[ch]: + - Specification of Micro QR code has been added, but not used yet. + +2007.03.24 Kentaro FUKUCHI + * Bumped version to 1.0.2. + +2007.03.24 Kentaro FUKUCHI + * qrencode.c (QRcode_splitStringToQRinput): + - a small bug fix. (Thanks to NANKI Haruo) + * qrencode.h: + - "extern "C"" barrier has been added for C++. + * test/view_qrcode.c: + - a typo fix. + +2006.12.27 Kentaro FUKUCHI + * Bumped version to 1.0.1. + +2006.12.27 Kentaro FUKUCHI + * qrenc.c, qrencode.[ch]: + - Added force 8-bit encoding mode. + * Makefile.am : + - Automake/Autoconf files have been added to dist-package. + +2006.12.17 Kentaro FUKUCHI + * qrencode_inner.h, qrencode.c: + - Removed unused member variable "b2" from QRRawCode. + * configure.ac, Makefile.am, acinclude.m4: + - Better configuration of libpng. (now uses pkg-config correctly) + +2006.12.02 Kentaro FUKUCHI + * Bumped version to 1.0.0. diff --git a/qrencode-3.1.0/Doxyfile b/qrencode-3.1.0/Doxyfile new file mode 100644 index 00000000..f4aa9431 --- /dev/null +++ b/qrencode-3.1.0/Doxyfile @@ -0,0 +1,1252 @@ +# Doxyfile 1.4.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = QRencode + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = YES + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = qrencode.h + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/qrencode-3.1.0/Makefile.am b/qrencode-3.1.0/Makefile.am new file mode 100644 index 00000000..ab517d0d --- /dev/null +++ b/qrencode-3.1.0/Makefile.am @@ -0,0 +1,66 @@ +INCLUDES = \ + $(GLABELS_CFLAGS) + +QR_ENCODE_FILES = \ + qrencode.c \ + qrencode.h \ + qrencode_inner.h \ + qrinput.c \ + qrinput.h \ + bitstream.c \ + bitstream.h \ + qrspec.c \ + qrspec.h \ + rscode.c \ + rscode.h \ + split.c \ + split.h \ + mask.c \ + mask.h + + +noinst_LTLIBRARIES = libqrencode.la + +libqrencode_la_SOURCES = $(QR_ENCODE_FILES) + +EXTRA_DIST = \ + acinclude.m4 \ + autogen.sh \ + configure.ac.dist \ + ChangeLog \ + COPYING \ + Doxyfile \ + libqrencode.pc.in \ + Makefile.am \ + Makefile.am.dist \ + Makefile.in.dist \ + NEWS \ + qrencode.spec.in \ + qrencode.spec \ + qrencode.1.in \ + README \ + README.glabels \ + tests/common.h \ + tests/create_frame_pattern.c \ + tests/frame \ + tests/Makefile.am \ + tests/Makefile.in \ + tests/prof_qrencode.c \ + tests/test_all.sh \ + tests/test_bitstream.c \ + tests/test_estimatebit.c \ + tests/test_monkey.c \ + tests/test_qrencode.c \ + tests/test_qrinput.c \ + tests/test_qrspec.c \ + tests/test_rs.c \ + tests/test_split.c \ + tests/view_qrcode.c \ + TODO \ + use/compile \ + use/config.guess \ + use/config.sub \ + use/depcomp \ + use/install-sh \ + use/ltmain.sh \ + use/missing diff --git a/qrencode-3.1.0/Makefile.am.dist b/qrencode-3.1.0/Makefile.am.dist new file mode 100644 index 00000000..f48b6ed4 --- /dev/null +++ b/qrencode-3.1.0/Makefile.am.dist @@ -0,0 +1,36 @@ +AUTOMAKE_OPTIONS = foreign + +SUBDIRS = . + +if BUILD_TESTS +SUBDIRS += tests +endif + +lib_LTLIBRARIES = libqrencode.la + +libqrencode_la_SOURCES = qrencode.c qrencode_inner.h \ + qrinput.c qrinput.h \ + bitstream.c bitstream.h \ + qrspec.c qrspec.h \ + rscode.c rscode.h \ + split.c split.h \ + mask.c mask.h + +libqrencode_la_LDFLAGS = -version-number $(MAJOR_VERSION):$(MINOR_VERSION):$(MICRO_VERSION) + +include_HEADERS = qrencode.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libqrencode.pc + +EXTRA_DIST = libqrencode.pc.in autogen.sh configure.ac acinclude.m4 \ + Makefile.am tests/Makefile.am qrencode.spec.in qrencode.spec \ + qrencode.1.in Doxyfile tests/test_all.sh + +if BUILD_TOOLS +bin_PROGRAMS = qrencode +qrencode_SOURCES = qrenc.c +qrencode_CFLAGS = $(png_CFLAGS) +qrencode_LDADD = libqrencode.la $(png_LIBS) +man1_MANS = qrencode.1 +endif diff --git a/qrencode-3.1.0/Makefile.in.dist b/qrencode-3.1.0/Makefile.in.dist new file mode 100644 index 00000000..b9a518dd --- /dev/null +++ b/qrencode-3.1.0/Makefile.in.dist @@ -0,0 +1,944 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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. + +@SET_MAKE@ + + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@BUILD_TESTS_TRUE@am__append_1 = tests +@BUILD_TOOLS_TRUE@bin_PROGRAMS = qrencode$(EXEEXT) +subdir = . +DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(srcdir)/libqrencode.pc.in \ + $(srcdir)/qrencode.1.in $(srcdir)/qrencode.spec.in \ + $(top_srcdir)/configure COPYING ChangeLog NEWS TODO \ + use/compile use/config.guess use/config.sub use/depcomp \ + use/install-sh use/ltmain.sh use/missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = libqrencode.pc qrencode.spec qrencode.1 +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(includedir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libqrencode_la_LIBADD = +am_libqrencode_la_OBJECTS = qrencode.lo qrinput.lo bitstream.lo \ + qrspec.lo rscode.lo split.lo mask.lo +libqrencode_la_OBJECTS = $(am_libqrencode_la_OBJECTS) +libqrencode_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libqrencode_la_LDFLAGS) $(LDFLAGS) -o $@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am__qrencode_SOURCES_DIST = qrenc.c +@BUILD_TOOLS_TRUE@am_qrencode_OBJECTS = qrencode-qrenc.$(OBJEXT) +qrencode_OBJECTS = $(am_qrencode_OBJECTS) +am__DEPENDENCIES_1 = +@BUILD_TOOLS_TRUE@qrencode_DEPENDENCIES = libqrencode.la \ +@BUILD_TOOLS_TRUE@ $(am__DEPENDENCIES_1) +qrencode_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(qrencode_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/use/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libqrencode_la_SOURCES) $(qrencode_SOURCES) +DIST_SOURCES = $(libqrencode_la_SOURCES) $(am__qrencode_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man1_MANS) +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = . tests +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAJOR_VERSION = @MAJOR_VERSION@ +MAKEINFO = @MAKEINFO@ +MICRO_VERSION = @MICRO_VERSION@ +MINOR_VERSION = @MINOR_VERSION@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +png_CFLAGS = @png_CFLAGS@ +png_LIBS = @png_LIBS@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +SUBDIRS = . $(am__append_1) +lib_LTLIBRARIES = libqrencode.la +libqrencode_la_SOURCES = qrencode.c qrencode_inner.h \ + qrinput.c qrinput.h \ + bitstream.c bitstream.h \ + qrspec.c qrspec.h \ + rscode.c rscode.h \ + split.c split.h \ + mask.c mask.h + +libqrencode_la_LDFLAGS = -version-number $(MAJOR_VERSION):$(MINOR_VERSION):$(MICRO_VERSION) +include_HEADERS = qrencode.h +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libqrencode.pc +EXTRA_DIST = libqrencode.pc.in autogen.sh configure.ac acinclude.m4 \ + Makefile.am tests/Makefile.am qrencode.spec.in qrencode.spec \ + qrencode.1.in Doxyfile tests/test_all.sh + +@BUILD_TOOLS_TRUE@qrencode_SOURCES = qrenc.c +@BUILD_TOOLS_TRUE@qrencode_CFLAGS = $(png_CFLAGS) +@BUILD_TOOLS_TRUE@qrencode_LDADD = libqrencode.la $(png_LIBS) +@BUILD_TOOLS_TRUE@man1_MANS = qrencode.1 +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +libqrencode.pc: $(top_builddir)/config.status $(srcdir)/libqrencode.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +qrencode.spec: $(top_builddir)/config.status $(srcdir)/qrencode.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +qrencode.1: $(top_builddir)/config.status $(srcdir)/qrencode.1.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libqrencode.la: $(libqrencode_la_OBJECTS) $(libqrencode_la_DEPENDENCIES) + $(libqrencode_la_LINK) -rpath $(libdir) $(libqrencode_la_OBJECTS) $(libqrencode_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +qrencode$(EXEEXT): $(qrencode_OBJECTS) $(qrencode_DEPENDENCIES) + @rm -f qrencode$(EXEEXT) + $(qrencode_LINK) $(qrencode_OBJECTS) $(qrencode_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitstream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrencode-qrenc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrencode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrinput.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qrspec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rscode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +qrencode-qrenc.o: qrenc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qrencode_CFLAGS) $(CFLAGS) -MT qrencode-qrenc.o -MD -MP -MF $(DEPDIR)/qrencode-qrenc.Tpo -c -o qrencode-qrenc.o `test -f 'qrenc.c' || echo '$(srcdir)/'`qrenc.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/qrencode-qrenc.Tpo $(DEPDIR)/qrencode-qrenc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='qrenc.c' object='qrencode-qrenc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qrencode_CFLAGS) $(CFLAGS) -c -o qrencode-qrenc.o `test -f 'qrenc.c' || echo '$(srcdir)/'`qrenc.c + +qrencode-qrenc.obj: qrenc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qrencode_CFLAGS) $(CFLAGS) -MT qrencode-qrenc.obj -MD -MP -MF $(DEPDIR)/qrencode-qrenc.Tpo -c -o qrencode-qrenc.obj `if test -f 'qrenc.c'; then $(CYGPATH_W) 'qrenc.c'; else $(CYGPATH_W) '$(srcdir)/qrenc.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/qrencode-qrenc.Tpo $(DEPDIR)/qrencode-qrenc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='qrenc.c' object='qrencode-qrenc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qrencode_CFLAGS) $(CFLAGS) -c -o qrencode-qrenc.obj `if test -f 'qrenc.c'; then $(CYGPATH_W) 'qrenc.c'; else $(CYGPATH_W) '$(srcdir)/qrenc.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $$i; then file=$$i; \ + else file=$(srcdir)/$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +# 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. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + 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) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + 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) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \ + config.h +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ + clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-includeHEADERS install-man \ + install-pkgconfigDATA + +install-dvi: install-dvi-recursive + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: install-man1 + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES uninstall-man uninstall-pkgconfigDATA + +uninstall-man: uninstall-man1 + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-binPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzma \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man install-man1 install-pdf \ + install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-man uninstall-man1 uninstall-pkgconfigDATA + +# 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/qrencode-3.1.0/NEWS b/qrencode-3.1.0/NEWS new file mode 100644 index 00000000..ebe82537 --- /dev/null +++ b/qrencode-3.1.0/NEWS @@ -0,0 +1,149 @@ +libqrencode NEWS - Overview of changes +====================================== + +Version 3.1.0 (2009.6.6) +------------------------ +* Various code cleanups and performance improves. +* Strict internal error checks have been added. +* "--without-tests" has become default setting. Specify "--with-tests" to + compile test programs. +* Some memory leak bugs have been fixed. + +Release Note: + +This release focuses on the code cleanup and performance improve. Encoding time +has been improved, drastically in large symbols. Basically this update only +changes its internal code. The API is not changed, no need to recompile user +applications that includes only qrencode.h. If your application refers the +internal data representation (not recommended), see ChangeLog for further +information. + +Version 3.0.3 (2008.6.1) +------------------------ +* Portability enhancement. (Thanks to Gavan Fantom) +* The command line tool "qrencode" now accepts long options. See the man page + for the detailed instruction. + +Release Note: + +This release improves the portability of our command line tool "qrencode". +The library is not changed so that any applications using libqrencode are not +affected. + +From this release, qrencode accepts "long" options, such as "--help". See the +manpage for the detailed instructions. + +Qrencode now uses getopt_long() instead of getopt_long_only() which is not +available in some operating systems. If the getopt_long() is not provided or +the implementation of it is not compatible with GNU's one, please try +qrencode-3.0.3-gnulib, that contains the source code of the getopt_long(). +Gnulib version is a test release. If you feel happy with it, please let us know +and the future releases will include gnulib. + +Version 3.0.2 (2008.5.18) +------------------------- +* Some compile-time warnings/erros with g++ have been fixed. + (Thanks to wangsai) +* The bit order of "Version information" has been corrected. + Symbols greater than version 6 were affected. (Thanks to Paul Janssesn) +* The "--without-tests" option has been added to the configure script. + +Version 3.0.1 (2008.5.9) +------------------------ +* A bug fix for non-POSIX platform. (Thanks to Paul Janssens) +* The RPM spec file now packages the man page correctly. + +Version 3.0.0 (2008.4.30) +------------------------- +* The interface of QRencode_encodeInput() has been changed. User applications + using it must be modified. +* Structured append support has been added. (patches from Yusuke Mihara) +* The "-S" option for structured append has been added to qrencode and + view_qrcode. +* Some functions now set errno to indicate errors. +* Some bug fixes. + +Release Note: + +Now libqrencode supports "structured-append" of symbols. A large data set can +be split into multiple QR code symbols. The basic usage of structured-append +is not so different from the single symbol encoding: just call +QRcode_encodeStringStructured() or QRcode_encodeString8bitStructured() and +they return a list of symbols. Instead of giving a string, you can encode +an explicitly typed data. See the manual generated by Doxygen for the detailed +usage. + +Many thanks to Yusuke Mihara, who contributed a patch to add support of +structured-append to version 1.0.2. + +API changes: +* Incompatible API changes: + - QRencode_encodeInput +* New types: + - QRinput_Struct + - QRcode_List +* New functions: + - QRinput_new2 + - QRinput_Struct_new + - QRinput_Struct_setParity + - QRinput_Struct_appendInput + - QRinput_Struct_free + - QRinput_Struct_insertStructuredAppendHeaders + - QRinput_splitQRinputToStruct + - QRcode_encodeStructuredInput + - QRcode_encodeStringStructured + - QRcode_encodeString8bitStructured + - QRcode_List_size + - QRcode_List_free +* Declarations moved to qrencode.h: + - QRinput_getErrorCorrectionLevel + - QRinput_setErrorCorrectionLevel + - QRinput_getVersion + - QRinput_setVersion + +Version 2.0.0 (2008.1.24) +-------------------------- +Summary: +* "-i" option to ignore case distinctions has been added to qrencode and + view_qrcode. +* "-c" option (case-sensitive mode) of qrencode is now enabled by default and + has been improved. See details in Release Note section. +* "-8" option has been added to qrencode to encode whole data in 8-bit mode. +* tests/view_qrcode now accepts various options like qrencode. +* Man page has been added. +* Code cleanup. +* The mask evaluation bug has been fixed. (Philippe Delcroix) + +* API changes + - QRcode_encodeString() now receives case-sensitive flag. + - QRcode_encodeStringCase() has been removed. + - QRcode_encodeString8bit() has been added. + +Release Note: + +Previously libqrencode encodes lower-case alphabet characters in Alphabet- +Numeric mode (upper-case alphabet and numeric) by default. According to the +specification of QR code, however, it is clearly claimed that Alphabet-Numeric +mode provides only upper-case alphabet (+ numeric and some symbol) characters. +Since this version, libqrencode distinguishes lower-case and upper-case of +alphabet characters by default. Because of that, "-c" option of qrencode +is now deprecated, and "-i" option has been added. By giving "-i", qrencode +converts lower-case characters to upper-case if possible, then encode a QR code +symbol. Please read qrencode.h for the details about API changes if you are +going to use this library. + +Many thanks to NANKI Haruo for his suggestions. + +Version 1.0.2 (2007.03.24) +-------------------------- +* A small bug fix. (Thanks to NANKI Haruo) +* 'extern "C"' barrier has been added to qrencode.h. + +Version 1.0.1 (2006.12.27) +-------------------------- +* Added "force 8-bit encoding mode". +* Configure script finds libpng's header correctly. + +Version 1.0.0 (2006.12.12) +-------------------------- +* The first public release. diff --git a/qrencode-3.1.0/README b/qrencode-3.1.0/README new file mode 100644 index 00000000..f99ad69b --- /dev/null +++ b/qrencode-3.1.0/README @@ -0,0 +1,115 @@ +libqrencode 3.1.0 - QR Code encoding library + +GENERAL INFORMATION +=================== +Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D +symbology that can be scanned by handy terminals such as a mobile phone with +CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has +high robustness. + +Libqrencode accepts a string or a list of data chunks then encodes in a QR Code +symbol as a bitmap array. While other QR Code applications generate an image +file, using libqrencode allows applications to render QR Code symbols from raw +bitmap data directly. This library also contains a command-line utility outputs +a QR Code symbol as a PNG image. It will help light-weight CGI programs. + + +SPECIFICATION +============= +Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial +Standards) X0510:2004 or ISO/IEC 18004. Most of features in the specification +are implemented such as: +- Numeric, alphabet, Japanese kanji (Shift-JIS) or any 8 bit code can be + embedded +- Optimized encoding of a string +- Structured-append of symbols + +Currently the following features are not supported: +- ECI and FNC1 mode +- Micro QR Code +- QR Code model 1 (deprecated) + + +INSTALL +======= + +Requirements +------------ +Some test programs or utility tools uses SDL or PNG, but the library itself +has no dependencies. You can skip compiling those tools if you want not to +install programs using SDL or PNG. + +Compile & install +----------------- +Just try + +./configure +make +make install + +This compiles and installs the library and header file to the appropriate +directories. By default, /usr/local/lib and /usr/local/include. You can change +the destination directory by passing some options to the configure script. +Run "./configure --help" to see the list of options. + +It also installs a binary "qrencode" to /usr/local/bin. If you want not to +install it, give "--without-tools" option to the configure script. + + +USAGE +===== +Basic usages of this library are written in the header file (qrencode.h). +You can generate a manual of the library by using Doxygen. + + +WARNINGS +======== +Some functions are THREAD UNSAFE. See qrencode.h for the details. + +Carefully use the qrencode command if it is used by a web application (CGI). +For example, giving "-s" option with too large number to qrencode may cause DoS. +You should limit the parameter by your application. + + +LICENSING INFORMATION +===================== +Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + +This library is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 2.1 of the License, or any later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this library; if not, write to the Free Software Foundation, Inc., 51 +Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +CONTACTS +======== +Visit the homepage at: + +http://megaui.net/fukuchi/works/qrencode/index.en.html + +for new releases. + +Please mail any bug reports, suggestions, comments and questions to +Kentaro Fukuchi . Questions of license compliance +are also welcome. + + +ACKNOWLEDGMENTS +=============== +QR Code is registered trademarks of DENSO WAVE INCORPORATED in JAPAN and other +countries. + +Reed-Solomon code encoder is written by Phil Karn, KA9Q. +Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q + +NANKI Haruo - improved lower-case characteres encoding +Philippe Delcroix - improved mask evaluation +Yusuke Mihara - structured-append support +Shigeyuki Hirai, Paul Janssens, wangsai, Gavan Fantom - bug report / suggestion diff --git a/qrencode-3.1.0/README.glabels b/qrencode-3.1.0/README.glabels new file mode 100644 index 00000000..a6c41da9 --- /dev/null +++ b/qrencode-3.1.0/README.glabels @@ -0,0 +1,8 @@ +The following changes have been made to the stock qrencode-3.1.0 distribution +to facilitate compilation with glabels: + + Makefile.am renamed to Makefile.am.dist + Makefile.in renamed to Makefile.in.dist + configure.ac renamed to configure.ac.dist + added Makefile.am, which is configured from ../configure.in + diff --git a/qrencode-3.1.0/TODO b/qrencode-3.1.0/TODO new file mode 100644 index 00000000..8564ee9a --- /dev/null +++ b/qrencode-3.1.0/TODO @@ -0,0 +1,12 @@ +Thread unsafe. +Only two functions, QRspec_newFrame() and init_rs(), are thread unsafe, but +most of qrencode functions are thread unsafe because of them. + +This package contains +*.c and *.h files (total): 8077 lines, 198863 bytes. +configure script : 22539 lines, 725612 bytes. +It's absolutely crazy. + +Documents (not only the README, but also the manual of the library) needs +revision of grammer, spell or to resolve ambiguity or incomplete descriptions. +Feel really free to send us your revision. diff --git a/qrencode-3.1.0/acinclude.m4 b/qrencode-3.1.0/acinclude.m4 new file mode 100644 index 00000000..e69de29b diff --git a/qrencode-3.1.0/aclocal.m4 b/qrencode-3.1.0/aclocal.m4 new file mode 100644 index 00000000..9d176209 --- /dev/null +++ b/qrencode-3.1.0/aclocal.m4 @@ -0,0 +1,9217 @@ +# generated automatically by aclocal 1.10.2 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This file 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. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, +[m4_warning([this file was generated for autoconf 2.63. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file 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. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\[$]0 --fallback-echo"')dnl " + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; +esac + +_LT_OUTPUT_LIBTOOL_INIT +]) + + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +cat >"$CONFIG_LT" <<_LTEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate a libtool stub with the current configuration. + +lt_cl_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec AS_MESSAGE_LOG_FD>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec AS_MESSAGE_LOG_FD>>config.log + $lt_cl_success || AS_EXIT(1) +fi +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_SHELL_INIT + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[_LT_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +[$]* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(lt_ECHO) +]) +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], + [An echo program that does not interpret backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method == "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE(int foo(void) {}, + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + ) + LDFLAGS="$save_LDFLAGS" + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], + [[If ld is used when linking, flag to hardcode $libdir into a binary + during linking. This must work even if $libdir does not exist]]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [fix_srcfile_path], [1], + [Fix the shell variable $srcfile for the compiler]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_PROG_CXX +# ------------ +# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ +# compiler, we have our own version here. +m4_defun([_LT_PROG_CXX], +[ +pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) +AC_PROG_CXX +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_CXX + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_CXX], []) + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[AC_REQUIRE([_LT_PROG_CXX])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 will use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + xl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=echo + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_PROG_F77 +# ------------ +# Since AC_PROG_F77 is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_F77], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) +AC_PROG_F77 +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_F77 + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_F77], []) + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_REQUIRE([_LT_PROG_F77])dnl +AC_LANG_PUSH(Fortran 77) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_PROG_FC +# ----------- +# Since AC_PROG_FC is broken, in that it returns the empty string +# if there is no fortran compiler, we have our own version here. +m4_defun([_LT_PROG_FC], +[ +pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) +AC_PROG_FC +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi +popdef([AC_MSG_ERROR]) +])# _LT_PROG_FC + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([_LT_PROG_FC], []) + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_REQUIRE([_LT_PROG_FC])dnl +AC_LANG_PUSH(Fortran) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC="$lt_save_CC" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_XSI_SHELLFNS +# --------------------- +# Bourne and XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_XSI_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $[*] )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +dnl func_dirname_and_basename +dnl A portable version of this function is already defined in general.m4sh +dnl so there is no need for it here. + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[[^=]]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$[@]"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]+=\$[2]" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$[1]=\$$[1]\$[2]" +} + +_LT_EOF + ;; + esac +]) + +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file 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. + +# serial 6 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) + +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file 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. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) + +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file 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. + +# Generated from ltversion.in. + +# serial 3012 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6]) +m4_define([LT_PACKAGE_REVISION], [1.3012]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6' +macro_revision='1.3012' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) + +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file 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. + +# serial 4 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + ifelse([$4], , [AC_MSG_ERROR(dnl +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES + +# Configure paths for SDL +# Sam Lantinga 9/21/99 +# stolen from Manish Singh +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS +dnl +AC_DEFUN([AM_PATH_SDL], +[dnl +dnl Get the cflags and libraries from the sdl-config script +dnl +AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], + sdl_prefix="$withval", sdl_prefix="") +AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], + sdl_exec_prefix="$withval", sdl_exec_prefix="") +AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], + , enable_sdltest=yes) + + if test x$sdl_exec_prefix != x ; then + sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config + fi + fi + if test x$sdl_prefix != x ; then + sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_prefix/bin/sdl-config + fi + fi + + if test "x$prefix" != xNONE; then + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + fi + AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) + min_sdl_version=ifelse([$1], ,0.11.0,$1) + AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) + no_sdl="" + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` + + sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" +dnl +dnl Now check if the installed SDL is sufficiently new. (Also sanity +dnl checks the results of sdl-config to some extent +dnl + rm -f conf.sdltest + AC_TRY_RUN([ +#include +#include +#include +#include "SDL.h" + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (int argc, char *argv[]) +{ + int major, minor, micro; + char *tmp_version; + + /* This hangs on some systems (?) + system ("touch conf.sdltest"); + */ + { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_sdl_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_sdl_version"); + exit(1); + } + + if (($sdl_major_version > major) || + (($sdl_major_version == major) && ($sdl_minor_version > minor)) || + (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); + printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); + printf("*** to point to the correct copy of sdl-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$SDL_CONFIG" = "no" ; then + echo "*** The sdl-config script installed by SDL could not be found" + echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the SDL_CONFIG environment variable to the" + echo "*** full path to sdl-config." + else + if test -f conf.sdltest ; then + : + else + echo "*** Could not run SDL test program, checking why..." + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + AC_TRY_LINK([ +#include +#include "SDL.h" + +int main(int argc, char *argv[]) +{ return 0; } +#undef main +#define main K_and_R_C_main +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding SDL or finding the wrong" + echo "*** version of SDL. If it is not finding SDL, 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 SDL was incorrectly installed" + echo "*** or that you have moved SDL since it was installed. In the latter case, you" + echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + SDL_CFLAGS="" + SDL_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(SDL_CFLAGS) + AC_SUBST(SDL_LIBS) + rm -f conf.sdltest +]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file 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. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10.2], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10.2])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file 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. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008 Free Software Foundation, Inc. +# +# This file 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. + +# serial 13 + +# 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. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 6 + +# AM_PROG_CC_C_O +# -------------- +# Like AC_PROG_CC_C_O, but changed for automake. +AC_DEFUN([AM_PROG_CC_C_O], +[AC_REQUIRE([AC_PROG_CC_C_O])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +dnl Make sure AC_PROG_CC is never called again, or it will override our +dnl setting of CC. +m4_define([AC_PROG_CC], + [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file 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. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file 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. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# 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 conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $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]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file 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. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([acinclude.m4]) diff --git a/qrencode-3.1.0/autogen.sh b/qrencode-3.1.0/autogen.sh new file mode 100755 index 00000000..d1b19557 --- /dev/null +++ b/qrencode-3.1.0/autogen.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e + +if [ `uname -s` = Darwin ]; then + LIBTOOLIZE=glibtoolize +else + LIBTOOLIZE=libtoolize +fi + +if [ -d /usr/local/share/aclocal ]; then + ACLOCAL_DIR=/usr/local/share/aclocal +elif [ -d /opt/local/share/aclocal ]; then + ACLOCAL_DIR=/opt/local/share/aclocal +elif [ -d /usr/share/aclocal ]; then + ACLOCAL_DIR=/usr/share/aclocal +fi + +if [ ! -d use ]; then + mkdir use +fi + +autoheader + +aclocal -I $ACLOCAL_DIR + +$LIBTOOLIZE --automake --copy +automake --add-missing --copy + +autoconf diff --git a/qrencode-3.1.0/bitstream.c b/qrencode-3.1.0/bitstream.c new file mode 100644 index 00000000..36a8ee6e --- /dev/null +++ b/qrencode-3.1.0/bitstream.c @@ -0,0 +1,235 @@ +/* + * qrencode - QR Code encoder + * + * Binary sequence class. + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include + +#include "bitstream.h" + +BitStream *BitStream_new(void) +{ + BitStream *bstream; + + bstream = (BitStream *)malloc(sizeof(BitStream)); + if(bstream == NULL) return NULL; + + bstream->length = 0; + bstream->data = NULL; + + return bstream; +} + +static int BitStream_allocate(BitStream *bstream, int length) +{ + unsigned char *data; + + if(bstream == NULL) { + return -1; + } + + data = (unsigned char *)malloc(length); + if(data == NULL) { + return -1; + } + + if(bstream->data) { + free(bstream->data); + } + bstream->length = length; + bstream->data = data; + + return 0; +} + +static BitStream *BitStream_newFromNum(int bits, unsigned int num) +{ + unsigned int mask; + int i; + unsigned char *p; + BitStream *bstream; + + bstream = BitStream_new(); + if(bstream == NULL) return NULL; + + if(BitStream_allocate(bstream, bits)) { + BitStream_free(bstream); + return NULL; + } + + p = bstream->data; + mask = 1 << (bits - 1); + for(i=0; i> 1; + } + + return bstream; +} + +static BitStream *BitStream_newFromBytes(int size, unsigned char *data) +{ + unsigned char mask; + int i, j; + unsigned char *p; + BitStream *bstream; + + bstream = BitStream_new(); + if(bstream == NULL) return NULL; + + if(BitStream_allocate(bstream, size * 8)) { + BitStream_free(bstream); + return NULL; + } + + p = bstream->data; + for(i=0; i> 1; + } + } + + return bstream; +} + +int BitStream_append(BitStream *bstream, BitStream *arg) +{ + unsigned char *data; + + if(arg == NULL) { + return -1; + } + if(arg->length == 0) { + return 0; + } + if(bstream->length == 0) { + if(BitStream_allocate(bstream, arg->length)) { + return -1; + } + memcpy(bstream->data, arg->data, arg->length); + return 0; + } + + data = (unsigned char *)malloc(bstream->length + arg->length); + if(data == NULL) { + return -1; + } + memcpy(data, bstream->data, bstream->length); + memcpy(data + bstream->length, arg->data, arg->length); + + free(bstream->data); + bstream->length += arg->length; + bstream->data = data; + + return 0; +} + +int BitStream_appendNum(BitStream *bstream, int bits, unsigned int num) +{ + BitStream *b; + int ret; + + if(bits == 0) return 0; + + b = BitStream_newFromNum(bits, num); + if(b == NULL) return -1; + + ret = BitStream_append(bstream, b); + BitStream_free(b); + + return ret; +} + +int BitStream_appendBytes(BitStream *bstream, int size, unsigned char *data) +{ + BitStream *b; + int ret; + + if(size == 0) return 0; + + b = BitStream_newFromBytes(size, data); + if(b == NULL) return -1; + + ret = BitStream_append(bstream, b); + BitStream_free(b); + + return ret; +} + +unsigned char *BitStream_toByte(BitStream *bstream) +{ + int i, j, size, bytes; + unsigned char *data, v; + unsigned char *p; + + size = BitStream_size(bstream); + if(size == 0) { + return NULL; + } + data = (unsigned char *)malloc((size + 7) / 8); + if(data == NULL) { + return NULL; + } + + bytes = size / 8; + + p = bstream->data; + for(i=0; idata); + free(bstream); + } +} diff --git a/qrencode-3.1.0/bitstream.h b/qrencode-3.1.0/bitstream.h new file mode 100644 index 00000000..5a5ac904 --- /dev/null +++ b/qrencode-3.1.0/bitstream.h @@ -0,0 +1,38 @@ +/* + * qrencode - QR Code encoder + * + * Binary sequence class. + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __BITSTREAM_H__ +#define __BITSTREAM_H__ + +typedef struct { + int length; + unsigned char *data; +} BitStream; + +extern BitStream *BitStream_new(void); +extern int BitStream_append(BitStream *bstream, BitStream *arg); +extern int BitStream_appendNum(BitStream *bstream, int bits, unsigned int num); +extern int BitStream_appendBytes(BitStream *bstream, int size, unsigned char *data); +#define BitStream_size(__bstream__) (__bstream__->length) +extern unsigned char *BitStream_toByte(BitStream *bstream); +extern void BitStream_free(BitStream *bstream); + +#endif /* __BITSTREAM_H__ */ diff --git a/qrencode-3.1.0/config.h.in b/qrencode-3.1.0/config.h.in new file mode 100644 index 00000000..30a0f4b9 --- /dev/null +++ b/qrencode-3.1.0/config.h.in @@ -0,0 +1,75 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to 'static' if no test programs will be compiled. */ + #define __STATIC static + diff --git a/qrencode-3.1.0/configure b/qrencode-3.1.0/configure new file mode 100755 index 00000000..917cb2f8 --- /dev/null +++ b/qrencode-3.1.0/configure @@ -0,0 +1,15327 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.63. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$lt_ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +ECHO=${lt_ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<_LT_EOF +$* +_LT_EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$lt_ECHO"; then + if test "X${echo_test_string+set}" != Xset; then + # find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if { echo_test_string=`eval $cmd`; } 2>/dev/null && + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null + then + break + fi + done + fi + + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : + else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$ECHO" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + ECHO='print -r' + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + ECHO='printf %s\n' + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + ECHO="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + ECHO="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + ECHO=echo + fi + fi + fi + fi + fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +lt_ECHO=$ECHO +if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="QRencode" +ac_unique_file="qrencode.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS +LIBOBJS +HAVE_SDL_FALSE +HAVE_SDL_TRUE +SDL_LIBS +SDL_CFLAGS +SDL_CONFIG +BUILD_TESTS_FALSE +BUILD_TESTS_TRUE +png_LIBS +png_CFLAGS +BUILD_TOOLS_FALSE +BUILD_TOOLS_TRUE +PKG_CONFIG +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +RANLIB +AR +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +SED +LIBTOOL +EGREP +GREP +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +VERSION +MICRO_VERSION +MINOR_VERSION +MAJOR_VERSION +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_static +enable_dependency_tracking +enable_shared +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +with_tools +with_tests +with_sdl_prefix +with_sdl_exec_prefix +enable_sdltest +enable_gprof +enable_gcov +enable_mudflap +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +PKG_CONFIG +png_CFLAGS +png_LIBS' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +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=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -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_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$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 ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$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 | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$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 ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + 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 | -n) + 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 ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$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_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=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 ;; + + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# 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 the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + 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 + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # 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 <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --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 + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-static[=PKGS] build static libraries [default=no] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --disable-sdltest Do not try to compile and run a test SDL program + --enable-gprof generate extra code to write profile information + suitable for gprof [default=no] + --enable-gcov generate extra code to write coverage information + suitable for gcov [default=no] + --enable-mudflap generate extra code to check memory leaks + [default=no] + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-tools build utility tools [default=yes] + --with-tests build tests [default=no] + --with-sdl-prefix=PFX Prefix where SDL is installed (optional) + --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + PKG_CONFIG path to pkg-config utility + png_CFLAGS C compiler flags for png, overriding pkg-config + png_LIBS linker flags for png, overriding pkg-config + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.63 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.63. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +MAJOR_VERSION=3 +MINOR_VERSION=1 +MICRO_VERSION=0 +VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION + + + + + + +ac_config_headers="$ac_config_headers config.h" + +ac_aux_dir= +for ac_dir in use "$srcdir"/use; 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 + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in use \"$srcdir\"/use" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in use \"$srcdir\"/use" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if test "${ac_cv_target+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +$as_echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +am__api_version='1.10' + +# 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 +# AmigaOS /C/install, which installs bootblocks on floppy discs +# 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" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +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. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&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}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# 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 conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $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". + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +$as_echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=qrencode + VERSION=$VERSION + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + + + + + + + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +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 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_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 $# != 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 + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + fi +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest$ac_cv_exeext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&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 +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* 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; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const /**/ +_ACEOF + +fi + +{ $as_echo "$as_me:$LINENO: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +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 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_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 $# != 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 + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&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 +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* 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; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +if test "x$CC" != xcc; then + { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest2.$ac_objext && { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + test -f conftest2.$ac_objext && { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define NO_MINUS_C_MINUS_O 1 +_ACEOF + +fi + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + + +# 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 +# AmigaOS /C/install, which installs bootblocks on floppy discs +# 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" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /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 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +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. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&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}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.2.6' +macro_revision='1.3012' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + $as_unset ac_script || ac_script= + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if test "${lt_cv_path_LD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test "${lt_cv_path_NM+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$ac_tool_prefix"; then + for ac_prog in "dumpbin -symbols" "link -dump -symbols" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in "dumpbin -symbols" "link -dump -symbols" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:6046: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:6049: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:6052: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + +# find the maximum length of command line arguments +{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ + = "XX$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:$LINENO: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:$LINENO: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:$LINENO: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:$LINENO: result: ok" >&5 +$as_echo "ok" >&6; } +fi + + + + + + + + + + + + + + + + + + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 7257 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_cc_needs_belf=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_cc_needs_belf=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_NMEDIT="nmedit" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LIPO="${ac_tool_prefix}lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_LIPO="lipo" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL="${ac_tool_prefix}otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL="otool" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OTOOL64="otool64" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + lt_cv_ld_exported_symbols_list=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + lt_cv_ld_exported_symbols_list=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + + + + + + + + + + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:$LINENO: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8665: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8669: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl*) + # IBM XL C 8.0/Fortran 10.1 on PPC + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } + + + + + + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:9004: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:9008: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:9109: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:9113: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:9164: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:9168: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld='-rpath $libdir' + archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + link_all_deplibs=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat >conftest.$ac_ext <<_ACEOF +int foo(void) {} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +$as_echo "$archive_cmds_need_lc" >&6; } + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then + shlibpath_overrides_runpath=yes +fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 +$as_echo_n "checking for shl_load... " >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* 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_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +$as_echo "$ac_cv_func_shl_load" >&6; } +if test "x$ac_cv_func_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_shl_load=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +/* 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_dlopen || defined __stub___dlopen +choke me +#endif + +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_svld_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dld_dld_link=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 11977 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 12073 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi + +fi + +ac_config_files="$ac_config_files Makefile libqrencode.pc tests/Makefile qrencode.spec qrencode.1" + + + +# Check whether --with-tools was given. +if test "${with_tools+set}" = set; then + withval=$with_tools; build_tools=$withval +else + build_tools=yes +fi + + if test "x$build_tools" = "xyes" ; then + BUILD_TOOLS_TRUE= + BUILD_TOOLS_FALSE='#' +else + BUILD_TOOLS_TRUE='#' + BUILD_TOOLS_FALSE= +fi + +if test x$build_tools = xyes ; then + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for png" >&5 +$as_echo_n "checking for png... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$png_CFLAGS"; then + pkg_cv_png_CFLAGS="$png_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\"libpng12\"\"") >&5 + ($PKG_CONFIG --exists --print-errors ""libpng12"") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_png_CFLAGS=`$PKG_CONFIG --cflags ""libpng12"" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$png_LIBS"; then + pkg_cv_png_LIBS="$png_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\"libpng12\"\"") >&5 + ($PKG_CONFIG --exists --print-errors ""libpng12"") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_png_LIBS=`$PKG_CONFIG --libs ""libpng12"" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + png_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors ""libpng12""` + else + png_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors ""libpng12""` + fi + # Put the nasty error message in config.log where it belongs + echo "$png_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements (\"libpng12\") were not met: + +$png_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables png_CFLAGS +and png_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (\"libpng12\") were not met: + +$png_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables png_CFLAGS +and png_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables png_CFLAGS +and png_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables png_CFLAGS +and png_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + png_CFLAGS=$pkg_cv_png_CFLAGS + png_LIBS=$pkg_cv_png_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi +fi + + +# Check whether --with-tests was given. +if test "${with_tests+set}" = set; then + withval=$with_tests; build_tests=$withval +else + build_tests=no +fi + + if test "x$build_tests" = "xyes" ; then + BUILD_TESTS_TRUE= + BUILD_TESTS_FALSE='#' +else + BUILD_TESTS_TRUE='#' + BUILD_TESTS_FALSE= +fi + + + +if test x$build_tests = xyes ; then +echo "#define __STATIC" >>confdefs.h +else +echo "#define __STATIC static" >>confdefs.h +fi + + +if test x$build_tests = xyes ; then + SDL_REQUIRED_VERSION=1.2.0 + +# Check whether --with-sdl-prefix was given. +if test "${with_sdl_prefix+set}" = set; then + withval=$with_sdl_prefix; sdl_prefix="$withval" +else + sdl_prefix="" +fi + + +# Check whether --with-sdl-exec-prefix was given. +if test "${with_sdl_exec_prefix+set}" = set; then + withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval" +else + sdl_exec_prefix="" +fi + +# Check whether --enable-sdltest was given. +if test "${enable_sdltest+set}" = set; then + enableval=$enable_sdltest; +else + enable_sdltest=yes +fi + + + if test x$sdl_exec_prefix != x ; then + sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config + fi + fi + if test x$sdl_prefix != x ; then + sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then + SDL_CONFIG=$sdl_prefix/bin/sdl-config + fi + fi + + if test "x$prefix" != xNONE; then + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + fi + # Extract the first word of "sdl-config", so it can be a program name with args. +set dummy sdl-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_SDL_CONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $SDL_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no" + ;; +esac +fi +SDL_CONFIG=$ac_cv_path_SDL_CONFIG +if test -n "$SDL_CONFIG"; then + { $as_echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5 +$as_echo "$SDL_CONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + min_sdl_version=$SDL_REQUIRED_VERSION + { $as_echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5 +$as_echo_n "checking for SDL - version >= $min_sdl_version... " >&6; } + no_sdl="" + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` + + sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + rm -f conf.sdltest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#include "SDL.h" + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main (int argc, char *argv[]) +{ + int major, minor, micro; + char *tmp_version; + + /* This hangs on some systems (?) + system ("touch conf.sdltest"); + */ + { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_sdl_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_sdl_version"); + exit(1); + } + + if (($sdl_major_version > major) || + (($sdl_major_version == major) && ($sdl_minor_version > minor)) || + (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); + printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); + printf("*** to point to the correct copy of sdl-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +no_sdl=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + if test "$SDL_CONFIG" = "no" ; then + echo "*** The sdl-config script installed by SDL could not be found" + echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the SDL_CONFIG environment variable to the" + echo "*** full path to sdl-config." + else + if test -f conf.sdltest ; then + : + else + echo "*** Could not run SDL test program, checking why..." + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "SDL.h" + +int main(int argc, char *argv[]) +{ return 0; } +#undef main +#define main K_and_R_C_main + +int +main () +{ + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding SDL or finding the wrong" + echo "*** version of SDL. If it is not finding SDL, 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" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means SDL was incorrectly installed" + echo "*** or that you have moved SDL since it was installed. In the latter case, you" + echo "*** may want to edit the sdl-config script: $SDL_CONFIG" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + SDL_CFLAGS="" + SDL_LIBS="" + { $as_echo "$as_me:$LINENO: WARNING: *** SDL $SDL_REQUIRED_VERSION or better is required." >&5 +$as_echo "$as_me: WARNING: *** SDL $SDL_REQUIRED_VERSION or better is required." >&2;} + fi + + + rm -f conf.sdltest + +fi + if test "x$SDL_CFLAGS" != "x" ; then + HAVE_SDL_TRUE= + HAVE_SDL_FALSE='#' +else + HAVE_SDL_TRUE='#' + HAVE_SDL_FALSE= +fi + + + +# Check whether --enable-gprof was given. +if test "${enable_gprof+set}" = set; then + enableval=$enable_gprof; +else + enable_gprof=no +fi + + +# Check whether --enable-gcov was given. +if test "${enable_gcov+set}" = set; then + enableval=$enable_gcov; +else + enable_gcov=no +fi + + +# Check whether --enable-mudflap was given. +if test "${enable_mudflap+set}" = set; then + enableval=$enable_mudflap; +else + enable_mudflap=no +fi + + +CFLAGS="-Wall $CFLAGS" + +if test $enable_gprof = yes; then + CFLAGS="$CFLAGS -g -pg" +fi + +if test $enable_gcov = yes; then + CFLAGS="$CFLAGS --coverage" +fi + +if test $enable_mudflap = yes; then + CFLAGS="$CFLAGS -fmudflap" + LDFLAGS="$LDFLAGS -lmudflap" +fi + +cat >confcache <<\_ACEOF +# 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, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# 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. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_TOOLS_TRUE}" && test -z "${BUILD_TOOLS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_TOOLS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BUILD_TOOLS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${BUILD_TESTS_TRUE}" && test -z "${BUILD_TESTS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_TESTS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"BUILD_TESTS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_SDL_TRUE}" && test -z "${HAVE_SDL_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"HAVE_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.63. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTION]... [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' +macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' +pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' +host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' +host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' +host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' +build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' +build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' +build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' +SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' +Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' +GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' +EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' +FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' +LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' +LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' +ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' +exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' +lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' +reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' +AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' +STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' +RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' +compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' +GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' +SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' +ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' +need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' +LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' +libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' +fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' +need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' +version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' +runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' +libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' +soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' +finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' +old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' +striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +AR \ +AR_FLAGS \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +SHELL \ +ECHO \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_wl \ +lt_prog_compiler_pic \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_flag_spec_ld \ +hardcode_libdir_separator \ +fix_srcfile_path \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +finish_eval \ +old_striplib \ +striplib; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec; do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Fix-up fallback echo if it was mangled by the above quoting rules. +case \$lt_ECHO in +*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` + ;; +esac + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "libqrencode.pc") CONFIG_FILES="$CONFIG_FILES libqrencode.pc" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "qrencode.spec") CONFIG_FILES="$CONFIG_FILES qrencode.spec" ;; + "qrencode.1") CONFIG_FILES="$CONFIG_FILES qrencode.1" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="" + +# ### BEGIN LIBTOOL CONFIG + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} + +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} + +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} + +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} + +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' + +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` +} + +_LT_EOF +esac + +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} + +_LT_EOF + ;; + esac + + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + +echo "" +echo "Options used to compile and link:" +echo " CC = $CC" +echo " CFLAGS = $CFLAGS" +echo " CPPFLAGS = $CPPFLAGS" +echo " CXX = $CXX" +echo " CXXFLAGS = $CXXFLAGS" +echo " LDFLAGS = $LDFLAGS" +echo "" diff --git a/qrencode-3.1.0/configure.ac.dist b/qrencode-3.1.0/configure.ac.dist new file mode 100644 index 00000000..9ae82f9d --- /dev/null +++ b/qrencode-3.1.0/configure.ac.dist @@ -0,0 +1,102 @@ +AC_INIT(QRencode) + +MAJOR_VERSION=3 +MINOR_VERSION=1 +MICRO_VERSION=0 +VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION +AC_SUBST(MAJOR_VERSION) +AC_SUBST(MINOR_VERSION) +AC_SUBST(MICRO_VERSION) +AC_SUBST(VERSION) + +AC_CONFIG_SRCDIR([qrencode.c]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_AUX_DIR(use) +AC_CONFIG_MACRO_DIR([m4]) +AC_CANONICAL_HOST +AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE(qrencode, $VERSION) + +AC_DISABLE_STATIC +AC_C_CONST +AC_C_INLINE +AC_HEADER_STDC + +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_INSTALL +AC_PROG_LIBTOOL +PKG_PROG_PKG_CONFIG + +AC_CONFIG_FILES([Makefile libqrencode.pc tests/Makefile qrencode.spec qrencode.1]) + +dnl --with-tools +AC_ARG_WITH([tools], [AC_HELP_STRING([--with-tools], [build utility tools [default=yes]])], + [build_tools=$withval], [build_tools=yes]) +AM_CONDITIONAL(BUILD_TOOLS, [test "x$build_tools" = "xyes" ]) +if test x$build_tools = xyes ; then + PKG_CHECK_MODULES(png, "libpng12") +fi + +dnl --with-tests +AC_ARG_WITH([tests], [AC_HELP_STRING([--with-tests], [build tests [default=no]])], + [build_tests=$withval], [build_tests=no]) +AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes" ]) +AH_VERBATIM([tests], +[/* Define to 'static' if no test programs will be compiled. */ + #define __STATIC static + ]) +if test x$build_tests = xyes ; then +echo "#define __STATIC" >>confdefs.h +else +echo "#define __STATIC static" >>confdefs.h +fi + + +if test x$build_tests = xyes ; then + SDL_REQUIRED_VERSION=1.2.0 + AM_PATH_SDL($SDL_REQUIRED_VERSION,,AC_MSG_WARN([*** SDL $SDL_REQUIRED_VERSION or better is required.])) +fi +AM_CONDITIONAL(HAVE_SDL, [test "x$SDL_CFLAGS" != "x" ]) + + +dnl --enable-gprof +AC_ARG_ENABLE([gprof], [AC_HELP_STRING([--enable-gprof], [generate extra code to write profile information suitable for gprof [default=no]])], + [], [enable_gprof=no]) + +dnl --enable-gcov +AC_ARG_ENABLE([gcov], [AC_HELP_STRING([--enable-gcov], [generate extra code to write coverage information suitable for gcov [default=no]])], + [], [enable_gcov=no]) + +dnl --enable-mudflap +AC_ARG_ENABLE([mudflap], [AC_HELP_STRING([--enable-mudflap], [generate extra code to check memory leaks [default=no]])], + [], [enable_mudflap=no]) + +dnl set CFLAGS +CFLAGS="-Wall $CFLAGS" + +if test $enable_gprof = yes; then + CFLAGS="$CFLAGS -g -pg" +fi + +if test $enable_gcov = yes; then + CFLAGS="$CFLAGS --coverage" +fi + +if test $enable_mudflap = yes; then + CFLAGS="$CFLAGS -fmudflap" + LDFLAGS="$LDFLAGS -lmudflap" +fi + +AC_OUTPUT + +echo "" +echo "Options used to compile and link:" +echo " CC = $CC" +echo " CFLAGS = $CFLAGS" +echo " CPPFLAGS = $CPPFLAGS" +echo " CXX = $CXX" +echo " CXXFLAGS = $CXXFLAGS" +echo " LDFLAGS = $LDFLAGS" +echo "" diff --git a/qrencode-3.1.0/libqrencode.pc.in b/qrencode-3.1.0/libqrencode.pc.in new file mode 100644 index 00000000..da3c8de5 --- /dev/null +++ b/qrencode-3.1.0/libqrencode.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libqrencode +Description: A QR Code encoding library +Version: @VERSION@ +Libs: -L${libdir} -lqrencode diff --git a/qrencode-3.1.0/mask.c b/qrencode-3.1.0/mask.c new file mode 100644 index 00000000..9bf1279e --- /dev/null +++ b/qrencode-3.1.0/mask.c @@ -0,0 +1,296 @@ +/* + * qrencode - QR Code encoder + * + * Masking. + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include "config.h" +#include "qrencode.h" +#include "qrspec.h" +#include "mask.h" + +__STATIC int Mask_writeFormatInformation(int width, unsigned char *frame, int mask, QRecLevel level) +{ + unsigned int format; + unsigned char v; + int i; + int blacks = 0; + + format = QRspec_getFormatInfo(mask, level); + + for(i=0; i<8; i++) { + if(format & 1) { + blacks += 2; + v = 0x85; + } else { + v = 0x84; + } + frame[width * 8 + width - 1 - i] = v; + if(i < 6) { + frame[width * i + 8] = v; + } else { + frame[width * (i + 1) + 8] = v; + } + format= format >> 1; + } + for(i=0; i<7; i++) { + if(format & 1) { + blacks += 2; + v = 0x85; + } else { + v = 0x84; + } + frame[width * (width - 7 + i) + 8] = v; + if(i == 0) { + frame[width * 8 + 7] = v; + } else { + frame[width * 8 + 6 - i] = v; + } + format= format >> 1; + } + + return blacks; +} + +/** + * Demerit coefficients. + * See Section 8.8.2, pp.45, JIS X0510:2004. + */ +#define N1 (3) +#define N2 (3) +#define N3 (40) +#define N4 (10) + +#define MASKMAKER(__exp__) \ + int x, y;\ + int b = 0;\ +\ + for(y=0; y= 5) { + demerit += N1 + (runLength[i] - 5); + //n1 += N1 + (runLength[i] - 5); + } + if((i & 1)) { + if(i >= 3 && i < length-2 && (runLength[i] % 3) == 0) { + fact = runLength[i] / 3; + if(runLength[i-2] == fact && + runLength[i-1] == fact && + runLength[i+1] == fact && + runLength[i+2] == fact) { + if(runLength[i-3] < 0 || runLength[i-3] >= 4 * fact) { + demerit += N3; + //n3 += N3; + } else if(i+3 >= length || runLength[i+3] >= 4 * fact) { + demerit += N3; + //n3 += N3; + } + } + } + } + } + + return demerit; +} + +__STATIC int Mask_evaluateSymbol(int width, unsigned char *frame) +{ + int x, y; + unsigned char *p; + unsigned char b22, w22; + int head; + int demerit = 0; + + p = frame; + for(y=0; y 0 && y > 0) { + b22 = p[0] & p[-1] & p[-width] & p [-width-1]; + w22 = p[0] | p[-1] | p[-width] | p [-width-1]; + if((b22 | (w22 ^ 1))&1) { + demerit += N2; + } + } + if(x == 0 && (p[0] & 1)) { + runLength[0] = -1; + head = 1; + runLength[head] = 1; + } else if(x > 0) { + if((p[0] ^ p[-1]) & 1) { + head++; + runLength[head] = 1; + } else { + runLength[head]++; + } + } + p++; + } + demerit += Mask_calcN1N3(head+1, runLength); + } + + for(x=0; x 0) { + if((p[0] ^ p[-width]) & 1) { + head++; + runLength[head] = 1; + } else { + runLength[head]++; + } + } + p+=width; + } + demerit += Mask_calcN1N3(head+1, runLength); + } + + return demerit; +} + +unsigned char *Mask_mask(int width, unsigned char *frame, QRecLevel level) +{ + int i; + unsigned char *mask, *bestMask; + int minDemerit = INT_MAX; + int bestMaskNum = 0; + int blacks; + int demerit; + + mask = (unsigned char *)malloc(width * width); + if(mask == NULL) return NULL; + bestMask = NULL; + + for(i=0; i<8; i++) { +// n1 = n2 = n3 = n4 = 0; + demerit = 0; + blacks = maskMakers[i](width, frame, mask); + blacks += Mask_writeFormatInformation(width, mask, i, level); + blacks = 100 * blacks / (width * width); + demerit = (abs(blacks - 50) / 5) * N4; +// n4 = demerit; + demerit += Mask_evaluateSymbol(width, mask); +// printf("(%d,%d,%d,%d)=%d\n", n1, n2, n3 ,n4, demerit); + if(demerit < minDemerit) { + minDemerit = demerit; + bestMaskNum = i; + if(bestMask != NULL) { + free(bestMask); + } + bestMask = (unsigned char *)malloc(width * width); + if(bestMask == NULL) break; + memcpy(bestMask, mask, width * width); + } + } + free(mask); + return bestMask; +} diff --git a/qrencode-3.1.0/mask.h b/qrencode-3.1.0/mask.h new file mode 100644 index 00000000..1c227ab6 --- /dev/null +++ b/qrencode-3.1.0/mask.h @@ -0,0 +1,30 @@ +/* + * qrencode - QR Code encoder + * + * Masking. + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __MASK_H__ +#define __MASK_H__ + +#include "qrinput.h" + +extern unsigned char *Mask_makeMask(int width, unsigned char *frame, int mask, QRecLevel level); +extern unsigned char *Mask_mask(int width, unsigned char *frame, QRecLevel level); + +#endif /* __MASK_H__ */ diff --git a/qrencode-3.1.0/qrenc.c b/qrencode-3.1.0/qrenc.c new file mode 100644 index 00000000..c68aec31 --- /dev/null +++ b/qrencode-3.1.0/qrenc.c @@ -0,0 +1,453 @@ +/** + * qrencode - QR Code encoder + * + * QR Code encoding tool + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include + +#include "config.h" +#include "qrencode.h" + +static int casesensitive = 1; +static int eightbit = 0; +static int version = 0; +static int size = 3; +static int margin = 4; +static int structured = 0; +static QRecLevel level = QR_ECLEVEL_L; +static QRencodeMode hint = QR_MODE_8; + +static const struct option options[] = { + {"help" , no_argument , NULL, 'h'}, + {"output" , required_argument, NULL, 'o'}, + {"level" , required_argument, NULL, 'l'}, + {"size" , required_argument, NULL, 's'}, + {"symversion" , required_argument, NULL, 'v'}, + {"margin" , required_argument, NULL, 'm'}, + {"structured" , no_argument , NULL, 'S'}, + {"kanji" , no_argument , NULL, 'k'}, + {"casesensitive", no_argument , NULL, 'c'}, + {"ignorecase" , no_argument , NULL, 'i'}, + {"8bit" , no_argument , NULL, '8'}, + {"version" , no_argument , NULL, 'V'}, + {NULL, 0, NULL, 0} +}; + +static char *optstring = "ho:l:s:v:m:Skci8V"; + +static void usage(int help, int longopt) +{ + fprintf(stderr, +"qrencode version %s\n" +"Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi\n", VERSION); + if(help) { + if(longopt) { + fprintf(stderr, +"Usage: qrencode [OPTION]... [STRING]\n" +"Encode input data in a QR Code and save as a PNG image.\n\n" +" -h, --help display the help message. -h displays only the help of short\n" +" options.\n\n" +" -o FILENAME, --output=FILENAME\n" +" write PNG image to FILENAME. If '-' is specified, the result\n" +" will be output to standard output. If -S is given, structured\n" +" symbols are written to FILENAME-01.png, FILENAME-02.png, ...;\n" +" if specified, remove a trailing '.png' from FILENAME.\n\n" +" -s NUMBER, --size=NUMBER\n" +" specify the size of dot (pixel). (default=3)\n\n" +" -l {LMQH}, --level={LMQH}\n" +" specify error collectin level from L (lowest) to H (highest).\n" +" (default=L)\n\n" +" -v NUMBER, --symversion=NUMBER\n" +" specify the version of the symbol. (default=auto)\n\n" +" -m NUMBER, --margin=NUMBER\n" +" specify the width of margin. (default=4)\n\n" +" -S, --structured\n" +" make structured symbols. Version must be specified.\n\n" +" -k, --kanji assume that the input text contains kanji (shift-jis).\n\n" +" -c, --casesensitive\n" +" encode lower-case alphabet characters in 8-bit mode. (default)\n\n" +" -i, --ignorecase\n" +" ignore case distinctions and use only upper-case characters.\n\n" +" -8, -8bit encode entire data in 8-bit mode. -k, -c and -i will be ignored.\n\n" +" -V, --version\n" +" display the version number and copyrights of the qrencode.\n\n" +" [STRING] input data. If it is not specified, data will be taken from\n" +" standard input.\n" + ); + } else { + fprintf(stderr, +"Usage: qrencode [OPTION]... [STRING]\n" +"Encode input data in a QR Code and save as a PNG image.\n\n" +" -h display this message.\n" +" --help display the usage of long options.\n" +" -o FILENAME write PNG image to FILENAME. If '-' is specified, the result\n" +" will be output to standard output. If -S is given, structured\n" +" symbols are written to FILENAME-01.png, FILENAME-02.png, ...;\n" +" if specified, remove a trailing '.png' from FILENAME.\n" +" -s NUMBER specify the size of dot (pixel). (default=3)\n" +" -l {LMQH} specify error collectin level from L (lowest) to H (highest).\n" +" (default=L)\n" +" -v NUMBER specify the version of the symbol. (default=auto)\n" +" -m NUMBER specify the width of margin. (default=4)\n" +" -S make structured symbols. Version must be specified.\n" +" -k assume that the input text contains kanji (shift-jis).\n" +" -c encode lower-case alphabet characters in 8-bit mode. (default)\n" +" -i ignore case distinctions and use only upper-case characters.\n" +" -8 encode entire data in 8-bit mode. -k, -c and -i will be ignored.\n" +" -V display the version number and copyrights of the qrencode.\n" +" [STRING] input data. If it is not specified, data will be taken from\n" +" standard input.\n" + ); + } + } +} + +#define MAX_DATA_SIZE (7090 * 16) /* from the specification */ +static char *readStdin(void) +{ + char *buffer; + int ret; + + buffer = (char *)malloc(MAX_DATA_SIZE); + if(buffer == NULL) { + fprintf(stderr, "Memory allocation failed.\n"); + exit(EXIT_FAILURE); + } + ret = fread(buffer, 1, MAX_DATA_SIZE, stdin); + if(ret == 0) { + fprintf(stderr, "No input data.\n"); + exit(EXIT_FAILURE); + } + if(feof(stdin) == 0) { + fprintf(stderr, "Input data is too large.\n"); + exit(EXIT_FAILURE); + } + + buffer[ret] = '\0'; + + return buffer; +} + +static int writePNG(QRcode *qrcode, const char *outfile) +{ + static FILE *fp; // avoid clobbering by setjmp. + png_structp png_ptr; + png_infop info_ptr; + unsigned char *row, *p, *q; + int x, y, xx, yy, bit; + int realwidth; + + realwidth = (qrcode->width + margin * 2) * size; + row = (unsigned char *)malloc((realwidth + 7) / 8); + if(row == NULL) { + fprintf(stderr, "Failed to allocate memory.\n"); + exit(EXIT_FAILURE); + } + + if(outfile[0] == '-' && outfile[1] == '\0') { + fp = stdout; + } else { + fp = fopen(outfile, "wb"); + if(fp == NULL) { + fprintf(stderr, "Failed to create file: %s\n", outfile); + perror(NULL); + exit(EXIT_FAILURE); + } + } + + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if(png_ptr == NULL) { + fprintf(stderr, "Failed to initialize PNG writer.\n"); + exit(EXIT_FAILURE); + } + + info_ptr = png_create_info_struct(png_ptr); + if(info_ptr == NULL) { + fprintf(stderr, "Failed to initialize PNG write.\n"); + exit(EXIT_FAILURE); + } + + if(setjmp(png_jmpbuf(png_ptr))) { + png_destroy_write_struct(&png_ptr, &info_ptr); + fprintf(stderr, "Failed to write PNG image.\n"); + exit(EXIT_FAILURE); + } + + png_init_io(png_ptr, fp); + png_set_IHDR(png_ptr, info_ptr, + realwidth, realwidth, + 1, + PNG_COLOR_TYPE_GRAY, + PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_DEFAULT, + PNG_FILTER_TYPE_DEFAULT); + png_write_info(png_ptr, info_ptr); + + /* top margin */ + memset(row, 0xff, (realwidth + 7) / 8); + for(y=0; ydata; + for(y=0; ywidth; y++) { + bit = 7; + memset(row, 0xff, (realwidth + 7) / 8); + q = row; + q += margin * size / 8; + bit = 7 - (margin * size % 8); + for(x=0; xwidth; x++) { + for(xx=0; xx 4) { + q = base + strlen(base) - 4; + if(strcasecmp(".png", q) == 0) { + suffix = strdup(q); + *q = '\0'; + } + } + + qrlist = encodeStructured(intext); + if(qrlist == NULL) { + perror("Failed to encode the input data:"); + exit(EXIT_FAILURE); + } + + for(p = qrlist; p != NULL; p = p->next) { + if(p->code == NULL) { + fprintf(stderr, "Failed to encode the input data.\n"); + exit(EXIT_FAILURE); + } + if(suffix) { + snprintf(filename, FILENAME_MAX, "%s-%02d%s", base, i, suffix); + } else { + snprintf(filename, FILENAME_MAX, "%s-%02d", base, i); + } + writePNG(p->code, filename); + i++; + } + + free(base); + if(suffix) { + free(suffix); + } + + QRcode_List_free(qrlist); +} + +int main(int argc, char **argv) +{ + int opt, lindex = -1; + char *outfile = NULL; + char *intext = NULL; + + while((opt = getopt_long(argc, argv, optstring, options, &lindex)) != -1) { + switch(opt) { + case 'h': + if(lindex == 0) { + usage(1, 1); + } else { + usage(1, 0); + } + exit(0); + break; + case 'o': + outfile = optarg; + break; + case 's': + size = atoi(optarg); + if(size <= 0) { + fprintf(stderr, "Invalid size: %d\n", size); + exit(EXIT_FAILURE); + } + break; + case 'v': + version = atoi(optarg); + if(version < 0) { + fprintf(stderr, "Invalid version: %d\n", version); + exit(EXIT_FAILURE); + } + break; + case 'l': + switch(*optarg) { + case 'l': + case 'L': + level = QR_ECLEVEL_L; + break; + case 'm': + case 'M': + level = QR_ECLEVEL_M; + break; + case 'q': + case 'Q': + level = QR_ECLEVEL_Q; + break; + case 'h': + case 'H': + level = QR_ECLEVEL_H; + break; + default: + fprintf(stderr, "Invalid level: %s\n", optarg); + exit(EXIT_FAILURE); + break; + } + break; + case 'm': + margin = atoi(optarg); + if(margin < 0) { + fprintf(stderr, "Invalid margin: %d\n", margin); + exit(EXIT_FAILURE); + } + break; + case 'S': + structured = 1; + case 'k': + hint = QR_MODE_KANJI; + break; + case 'c': + casesensitive = 1; + break; + case 'i': + casesensitive = 0; + break; + case '8': + eightbit = 1; + break; + case 'V': + usage(0, 0); + exit(0); + break; + default: + fprintf(stderr, "Try `qrencode --help' for more information.\n"); + exit(EXIT_FAILURE); + break; + } + } + + if(argc == 1) { + usage(1, 0); + exit(0); + } + + if(outfile == NULL) { + fprintf(stderr, "No output filename is given.\n"); + exit(EXIT_FAILURE); + } + + if(optind < argc) { + intext = argv[optind]; + } + if(intext == NULL) { + intext = readStdin(); + } + + if(structured) { + if(version == 0) { + fprintf(stderr, "Version must be specified to encode structured symbols.\n"); + exit(EXIT_FAILURE); + } + qrencodeStructured(intext, outfile); + } else { + qrencode(intext, outfile); + } + + return 0; +} diff --git a/qrencode-3.1.0/qrencode.1.in b/qrencode-3.1.0/qrencode.1.in new file mode 100644 index 00000000..85b26047 --- /dev/null +++ b/qrencode-3.1.0/qrencode.1.in @@ -0,0 +1,73 @@ +.TH QRENCODE 1 "Jan. 23, 2008" "qrencode @VERSION@" +.SH NAME +qrencode \- Encode input data in a QR Code and save as a PNG image. +.SH SYNOPSIS +.B "qrencode" +[OPTION]... +[STRING] + +.SH DESCRIPTION +Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D +symbology that can be scanned by handy terminals such as a mobile phone with +CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has +high robustness. + +Qrencode is a utility software using libqrencode to encode string data in +a QR Code and save as a PNG image. + +.SH OPTIONS +.TP +.B \-h, --help +display help message. +.TP +.B \-o FILENAME, --output=FILENAME +write PNG image to FILENAME. If '-' is specified, the result will be output +to standard output. +.TP +.B \-s NUMBER, --size=NUMBER +specify the size of dot (pixel). (default=3) +.TP +.B \-l {LMQH}, --level={LMQH} +specify error collectin level from L (lowest) to H (highest). (default=L) +.TP +.B \-v NUMBER, --symversion=NUMBER +specify the version of the symbol. (default=auto) +.TP +.B \-m NUMBER, --margin=NUMBER +specify the width of margin. (default=4) +.TP +.B \-S, --structured +make structured symbols. Version must be specified. +.TP +.B \-k, --kanji +assume that the input text contains kanji (shift-jis). +.TP +.B \-c, --casesensitive +encode lower-case alphabet characters in 8-bit mode. (default) +.TP +.B \-i, --ignorecase +ignore case distinctions and use only upper-case characters. +.TP +.B \-8, --8bit +encode entire data in 8-bit mode. -k, -c and -i will be ignored. +.TP +.B \-V, --version +display the version number and copyrights of the qrencode. +.TP +.B [STRING] +input data. If it is not specified, data will be taken from standard input. + +.SH EXAMPLES +.TP +.B qrencode -l L -v 1 -o output.png 'Hello, world!' +encode into a symbol version 1, level L. +.TP +.B qrencode -iSv 1 --output=output.png +read standard input and encode it into a structured-appended symbols in +case-insensitive mode. + +.SH AUTHOR +Written by Kentaro Fukuchi. + +.SH COPYRIGHT +Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi. diff --git a/qrencode-3.1.0/qrencode.c b/qrencode-3.1.0/qrencode.c new file mode 100644 index 00000000..1a642f04 --- /dev/null +++ b/qrencode-3.1.0/qrencode.c @@ -0,0 +1,634 @@ +/* + * qrencode - QR Code encoder + * + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include + +#include "config.h" +#include "qrencode.h" +#include "qrspec.h" +#include "bitstream.h" +#include "qrinput.h" +#include "rscode.h" +#include "split.h" +#include "mask.h" + +/****************************************************************************** + * Raw code + *****************************************************************************/ + +typedef struct { + int dataLength; + unsigned char *data; + int eccLength; + unsigned char *ecc; +} RSblock; + +typedef struct { + int version; + unsigned char *datacode; + unsigned char *ecccode; + int blocks; + RSblock *rsblock; + int count; + int dataLength; + int eccLength; + int b1; +} QRRawCode; + +static void RSblock_initBlock(RSblock *block, int dl, unsigned char *data, int el, unsigned char *ecc, RS *rs) +{ + block->dataLength = dl; + block->data = data; + block->eccLength = el; + block->ecc = ecc; + + encode_rs_char(rs, data, ecc); +} + +static int RSblock_init(RSblock *blocks, int spec[5], unsigned char *data, unsigned char *ecc) +{ + int i; + RSblock *block; + unsigned char *dp, *ep; + RS *rs; + int el, dl; + + dl = QRspec_rsDataCodes1(spec); + el = QRspec_rsEccCodes1(spec); + rs = init_rs(8, 0x11d, 0, 1, el, 255 - dl - el); + if(rs == NULL) return -1; + + block = blocks; + dp = data; + ep = ecc; + for(i=0; idatacode = QRinput_getByteStream(input); + if(raw->datacode == NULL) { + free(raw); + return NULL; + } + + QRspec_getEccSpec(input->version, input->level, spec); + + raw->version = input->version; + raw->b1 = QRspec_rsBlockNum1(spec); + raw->dataLength = QRspec_rsDataLength(spec); + raw->eccLength = QRspec_rsEccLength(spec); + raw->ecccode = (unsigned char *)malloc(raw->eccLength); + if(raw->ecccode == NULL) { + free(raw->datacode); + free(raw); + return NULL; + } + + raw->blocks = QRspec_rsBlockNum(spec); + raw->rsblock = (RSblock *)calloc(sizeof(RSblock), raw->blocks); + if(raw->rsblock == NULL) { + QRraw_free(raw); + return NULL; + } + ret = RSblock_init(raw->rsblock, spec, raw->datacode, raw->ecccode); + if(ret < 0) { + QRraw_free(raw); + return NULL; + } + + raw->count = 0; + + return raw; +} + +/** + * Return a code (byte). + * This function can be called iteratively. + * @param raw raw code. + * @return code + */ +__STATIC unsigned char QRraw_getCode(QRRawCode *raw) +{ + int col, row; + unsigned char ret; + + if(raw->count < raw->dataLength) { + row = raw->count % raw->blocks; + col = raw->count / raw->blocks; + if(col >= raw->rsblock[row].dataLength) { + row += raw->b1; + } + ret = raw->rsblock[row].data[col]; + } else if(raw->count < raw->dataLength + raw->eccLength) { + row = (raw->count - raw->dataLength) % raw->blocks; + col = (raw->count - raw->dataLength) / raw->blocks; + ret = raw->rsblock[row].ecc[col]; + } else { + return 0; + } + raw->count++; + return ret; +} + +__STATIC void QRraw_free(QRRawCode *raw) +{ + if(raw != NULL) { + free(raw->datacode); + free(raw->ecccode); + if(raw->rsblock != NULL) { + free(raw->rsblock); + } + free(raw); + } +} + +/****************************************************************************** + * Frame filling + *****************************************************************************/ + +typedef struct { + int width; + unsigned char *frame; + int x, y; + int dir; + int bit; +} FrameFiller; + +static FrameFiller *FrameFiller_new(int width, unsigned char *frame) +{ + FrameFiller *filler; + + filler = (FrameFiller *)malloc(sizeof(FrameFiller)); + if(filler == NULL) return NULL; + filler->width = width; + filler->frame = frame; + filler->x = width - 1; + filler->y = width - 1; + filler->dir = -1; + filler->bit = -1; + + return filler; +} + +static unsigned char *FrameFiller_next(FrameFiller *filler) +{ + unsigned char *p; + int x, y, w; + + if(filler->bit == -1) { + filler->bit = 0; + return filler->frame + filler->y * filler->width + filler->x; + } + + x = filler->x; + y = filler->y; + p = filler->frame; + w = filler->width; + + if(filler->bit == 0) { + x--; + filler->bit++; + } else { + x++; + y += filler->dir; + filler->bit--; + } + + if(filler->dir < 0) { + if(y < 0) { + y = 0; + x -= 2; + filler->dir = 1; + if(x == 6) { + x--; + y = 9; + } + } + } else { + if(y == w) { + y = w - 1; + x -= 2; + filler->dir = -1; + if(x == 6) { + x--; + y -= 8; + } + } + } + if(x < 0 || y < 0) return NULL; + + filler->x = x; + filler->y = y; + + if(p[y * w + x] & 0x80) { + // This tail recursion could be optimized. + return FrameFiller_next(filler); + } + return &p[y * w + x]; +} + +#if 0 +unsigned char *FrameFiller_fillerTest(int version) +{ + int width, length; + unsigned char *frame, *p; + FrameFiller *filler; + int i, j; + unsigned char cl = 1; + unsigned char ch = 0; + + width = QRspec_getWidth(version); + frame = QRspec_newFrame(version); + filler = FrameFiller_new(width, frame); + length = QRspec_getDataLength(version, QR_ECLEVEL_L) + + QRspec_getECCLength(version, QR_ECLEVEL_L); + + for(i=0; iversion = version; + qrcode->width = width; + qrcode->data = data; + + return qrcode; +} + +void QRcode_free(QRcode *qrcode) +{ + if(qrcode != NULL) { + free(qrcode->data); + free(qrcode); + } +} + +__STATIC QRcode *QRcode_encodeMask(QRinput *input, int mask) +{ + int width, version; + QRRawCode *raw; + unsigned char *frame, *masked, *p, code, bit; + FrameFiller *filler; + int i, j; + QRcode *qrcode; + + if(input->version < 0 || input->version > QRSPEC_VERSION_MAX) { + errno = EINVAL; + return NULL; + } + if(input->level > QR_ECLEVEL_H) { + errno = EINVAL; + return NULL; + } + + raw = QRraw_new(input); + if(raw == NULL) return NULL; + + version = raw->version; + width = QRspec_getWidth(version); + frame = QRspec_newFrame(version); + if(frame == NULL) { + QRraw_free(raw); + return NULL; + } + filler = FrameFiller_new(width, frame); + if(filler == NULL) { + QRraw_free(raw); + free(frame); + return NULL; + } + + /* inteleaved data and ecc codes */ + for(i=0; idataLength + raw->eccLength; i++) { + code = QRraw_getCode(raw); + bit = 0x80; + for(j=0; j<8; j++) { + p = FrameFiller_next(filler); + *p = 0x02 | ((bit & code) != 0); + bit = bit >> 1; + } + } + QRraw_free(raw); + /* remainder bits */ + j = QRspec_getRemainder(version); + for(i=0; ilevel); + } else { + masked = Mask_makeMask(width, frame, mask, input->level); + } + if(masked == NULL) { + free(frame); + return NULL; + } + qrcode = QRcode_new(version, width, masked); + + free(frame); + + return qrcode; +} + +QRcode *QRcode_encodeInput(QRinput *input) +{ + return QRcode_encodeMask(input, -1); +} + +QRcode *QRcode_encodeString8bit(const char *string, int version, QRecLevel level) +{ + QRinput *input; + QRcode *code; + int ret; + + if(string == NULL) { + errno = EINVAL; + return NULL; + } + + input = QRinput_new2(version, level); + if(input == NULL) return NULL; + + ret = QRinput_append(input, QR_MODE_8, strlen(string), (unsigned char *)string); + if(ret < 0) { + QRinput_free(input); + return NULL; + } + code = QRcode_encodeInput(input); + QRinput_free(input); + + return code; +} + +QRcode *QRcode_encodeString(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive) +{ + QRinput *input; + QRcode *code; + int ret; + + if(hint != QR_MODE_8 && hint != QR_MODE_KANJI) { + errno = EINVAL; + return NULL; + } + + input = QRinput_new2(version, level); + if(input == NULL) return NULL; + + ret = Split_splitStringToQRinput(string, input, hint, casesensitive); + if(ret < 0) { + QRinput_free(input); + return NULL; + } + + code = QRcode_encodeInput(input); + QRinput_free(input); + + return code; +} + +/****************************************************************************** + * Structured QR-code encoding + *****************************************************************************/ + +static QRcode_List *QRcode_List_newEntry(void) +{ + QRcode_List *entry; + + entry = (QRcode_List *)malloc(sizeof(QRcode_List)); + if(entry == NULL) return NULL; + + entry->next = NULL; + entry->code = NULL; + + return entry; +} + +static void QRcode_List_freeEntry(QRcode_List *entry) +{ + if(entry != NULL) { + QRcode_free(entry->code); + free(entry); + } +} + +void QRcode_List_free(QRcode_List *qrlist) +{ + QRcode_List *list = qrlist, *next; + + while(list != NULL) { + next = list->next; + QRcode_List_freeEntry(list); + list = next; + } +} + +int QRcode_List_size(QRcode_List *qrlist) +{ + QRcode_List *list = qrlist; + int size = 0; + + while(list != NULL) { + size++; + list = list->next; + } + + return size; +} + +#if 0 +static unsigned char QRcode_parity(const char *str, int size) +{ + unsigned char parity = 0; + int i; + + for(i=0; ihead; + + while(list != NULL) { + if(head == NULL) { + entry = QRcode_List_newEntry(); + if(entry == NULL) goto ABORT; + head = entry; + tail = head; + } else { + entry = QRcode_List_newEntry(); + if(entry == NULL) goto ABORT; + tail->next = entry; + tail = tail->next; + } + tail->code = QRcode_encodeInput(list->input); + if(tail->code == NULL) { + goto ABORT; + } + list = list->next; + } + + return head; +ABORT: + QRcode_List_free(head); + return NULL; +} + +static QRcode_List *QRcode_encodeInputToStructured(QRinput *input) +{ + QRinput_Struct *s; + QRcode_List *codes; + + s = QRinput_splitQRinputToStruct(input); + if(s == NULL) return NULL; + + codes = QRcode_encodeInputStructured(s); + QRinput_Struct_free(s); + + return codes; +} + +QRcode_List *QRcode_encodeString8bitStructured(const char *string, int version, QRecLevel level) +{ + QRinput *input; + QRcode_List *codes; + int ret; + + if(version <= 0) { + errno = EINVAL; + return NULL; + } + + input = QRinput_new2(version, level); + if(input == NULL) return NULL; + + ret = QRinput_append(input, QR_MODE_8, strlen(string), (unsigned char *)string); + if(ret < 0) { + QRinput_free(input); + return NULL; + } + codes = QRcode_encodeInputToStructured(input); + QRinput_free(input); + + return codes; +} + +QRcode_List *QRcode_encodeStringStructured(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive) +{ + QRinput *input; + QRcode_List *codes; + int ret; + + if(version <= 0) { + errno = EINVAL; + return NULL; + } + if(hint != QR_MODE_8 && hint != QR_MODE_KANJI) { + errno = EINVAL; + return NULL; + } + + input = QRinput_new2(version, level); + if(input == NULL) return NULL; + + ret = Split_splitStringToQRinput(string, input, hint, casesensitive); + if(ret < 0) { + QRinput_free(input); + return NULL; + } + codes = QRcode_encodeInputToStructured(input); + QRinput_free(input); + + return codes; +} diff --git a/qrencode-3.1.0/qrencode.h b/qrencode-3.1.0/qrencode.h new file mode 100644 index 00000000..342df3bd --- /dev/null +++ b/qrencode-3.1.0/qrencode.h @@ -0,0 +1,426 @@ +/** + * qrencode - QR Code encoder + * + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** \mainpage + * Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D + * symbology. + * + * \section encoding Encoding + * + * There are two ways to encode data: encoding a string or + * encoding a structured data. + * + * \subsection encoding-string Encoding a string + * You can encode a string by calling QRcode_encodeString(). + * The given string is parsed automatically and encoded. If you want to encode + * data that can be represented as a C string style (NUL terminated), you can + * simply use this way. + * + * If the input data contains Kanji (Shift-JIS) characters and you want to + * encode them as Kanji in QR Code, you should give QR_MODE_KANJI as a hint. + * Otherwise, all of non-alphanumeric characters are encoded as 8 bit data. + * If you want to encode a whole string in 8 bit mode, use + * QRcode_encodeString8bit() instead. + * + * Please note that a C string can not contain NUL character. If your data + * contains NUL, you should chose the second way. + * + * \subsection encoding-input Encoding a structured data + * You can construct a structured input data manually. If the structure of the + * input data is known, you can use this way. + * At first, create a ::QRinput object by QRinput_new(). Then add input data + * to the QRinput object by QRinput_append(). Finally call QRcode_encodeInput() + * to encode the QRinput data. + * You can reuse the QRinput data again to encode it in other symbols with + * different parameters. + * + * \section result Result + * The encoded symbol is resulted as a ::QRcode object. It will contain + * its version number, width of the symbol and an array represents the symbol. + * See ::QRcode for the details. You can free the object by QRcode_free(). + * + * Please note that the version of the result may be larger than specified. + * In such cases, the input data would be too large to be encoded in a + * symbol of the specified version. + * + * \section structured Structured append + * Libqrencode can generate "Structured-appended" symbols that enables to split + * a large data set into mulitple QR codes. A QR code reader concatenates + * multiple QR code symbols into a string. + * Just like QRcode_encodeString(), you can use QRcode_encodeStringStructured() + * to generate structured-appended symbols. This functions returns an instance + * of ::QRcode_List. The returned list is a singly-linked list of QRcode: you + * can retrieve each QR code in this way: + * + * \code + * QRcode_List *qrcodes; + * QRcode_List *entry; + * QRcode *qrcode; + * + * qrcodes = QRcode_encodeStringStructured(...); + * entry = qrcodes; + * while(entry != NULL) { + * qrcode = entry->code; + * // do something + * entry = entry->next; + * } + * QRcode_List_free(entry); + * \endcode + * + * Instead of using auto-parsing functions, you can construct your own + * structured input. At first, instantiate an object of ::QRinput_Struct + * by calling QRinput_Struct_new(). This object can hold multiple ::QRinput, + * and one QR code is generated for a ::QRinput. + * QRinput_Struct_appendInput() appends a ::QRinput to a ::QRinput_Struct + * object. In order to generate structured-appended symbols, it is required to + * embed headers to each symbol. You can use + * QRinput_Struct_insertStructuredAppendHeaders() to insert appropriate + * headers to each symbol. You should call this function just once before + * encoding symbols. + */ + +#ifndef __QRENCODE_H__ +#define __QRENCODE_H__ + +#if defined(__cplusplus) +extern "C" { +#endif + +/** + * Encoding mode. + */ +typedef enum { + QR_MODE_NUL = -1, ///< Terminator (NUL character). Internal use only + QR_MODE_NUM = 0, ///< Numeric mode + QR_MODE_AN, ///< Alphabet-numeric mode + QR_MODE_8, ///< 8-bit data mode + QR_MODE_KANJI, ///< Kanji (shift-jis) mode + QR_MODE_STRUCTURE, ///< Internal use only +} QRencodeMode; + +/** + * Level of error correction. + */ +typedef enum { + QR_ECLEVEL_L = 0, ///< lowest + QR_ECLEVEL_M, + QR_ECLEVEL_Q, + QR_ECLEVEL_H ///< highest +} QRecLevel; + +/****************************************************************************** + * Input data (qrinput.c) + *****************************************************************************/ + +/** + * Singly linked list to contain input strings. An instance of this class + * contains its version and error correction level too. It is required to + * set them by QRinput_setVersion() and QRinput_setErrorCorrectionLevel(), + * or use QRinput_new2() to instantiate an object. + */ +typedef struct _QRinput QRinput; + +/** + * Instantiate an input data object. The version is set to 0 (auto-select) + * and the error correction level is set to QR_ECLEVEL_L. + * @return an input object (initialized). On error, NULL is returned and errno + * is set to indicate the error. + * @throw ENOMEM unable to allocate memory. + */ +extern QRinput *QRinput_new(void); + +/** + * Instantiate an input data object. + * @param version version number. + * @param level Error correction level. + * @return an input object (initialized). On error, NULL is returned and errno + * is set to indicate the error. + * @throw ENOMEM unable to allocate memory for input objects. + * @throw EINVAL invalid arguments. + */ +extern QRinput *QRinput_new2(int version, QRecLevel level); + +/** + * Append data to an input object. + * The data is copied and appended to the input object. + * @param input input object. + * @param mode encoding mode. + * @param size size of data (byte). + * @param data a pointer to the memory area of the input data. + * @retval 0 success. + * @retval -1 an error occurred and errno is set to indeicate the error. + * See Execptions for the details. + * @throw ENOMEM unable to allocate memory. + * @throw EINVAL input data is invalid. + * + */ +extern int QRinput_append(QRinput *input, QRencodeMode mode, int size, const unsigned char *data); + +/** + * Get current version. + * @param input input object. + * @return current version. + */ +extern int QRinput_getVersion(QRinput *input); + +/** + * Set version of the QR-code that is to be encoded. + * @param input input object. + * @param version version number (0 = auto) + * @retval 0 success. + * @retval -1 invalid argument. + */ +extern int QRinput_setVersion(QRinput *input, int version); + +/** + * Get current error correction level. + * @param input input object. + * @return Current error correcntion level. + */ +extern QRecLevel QRinput_getErrorCorrectionLevel(QRinput *input); + +/** + * Set error correction level of the QR-code that is to be encoded. + * @param input input object. + * @param level Error correction level. + * @retval 0 success. + * @retval -1 invalid argument. + */ +extern int QRinput_setErrorCorrectionLevel(QRinput *input, QRecLevel level); + +/** + * Free the input object. + * All of data chunks in the input object are freed too. + * @param input input object. + */ +extern void QRinput_free(QRinput *input); + +/** + * Validate the input data. + * @param mode encoding mode. + * @param size size of data (byte). + * @param data a pointer to the memory area of the input data. + * @retval 0 success. + * @retval -1 invalid arguments. + */ +extern int QRinput_check(QRencodeMode mode, int size, const unsigned char *data); + +/** + * Set of QRinput for structured symbols. + */ +typedef struct _QRinput_Struct QRinput_Struct; + +/** + * Instantiate a set of input data object. + * @return an instance of QRinput_Struct. On error, NULL is returned and errno + * is set to indicate the error. + * @throw ENOMEM unable to allocate memory. + */ +extern QRinput_Struct *QRinput_Struct_new(void); + +/** + * Set parity of structured symbols. + * @param s structured input object. + * @param parity parity of s. + */ +extern void QRinput_Struct_setParity(QRinput_Struct *s, unsigned char parity); + +/** + * Append a QRinput object to the set. + * @warning never append the same QRinput object twice or more. + * @param s structured input object. + * @param input an input object. + * @retval >0 number of input objects in the structure. + * @retval -1 an error occurred. See Exceptions for the details. + * @throw ENOMEM unable to allocate memory. + */ +extern int QRinput_Struct_appendInput(QRinput_Struct *s, QRinput *input); + +/** + * Free all of QRinput in the set. + * @param s a structured input object. + */ +extern void QRinput_Struct_free(QRinput_Struct *s); + +/** + * Split a QRinput to QRinput_Struct. It calculates a parity, set it, then + * insert structured-append headers. + * @param input input object. Version number and error correction level must be + * set. + * @return a set of input data. On error, NULL is returned, and errno is set + * to indicate the error. See Exceptions for the details. + * @throw ERANGE input data is too large. + * @throw EINVAL invalid input data. + * @throw ENOMEM unable to allocate memory. + */ +extern QRinput_Struct *QRinput_splitQRinputToStruct(QRinput *input); + +/** + * Insert structured-append headers to the input structure. It calculates + * a parity and set it if the parity is not set yet. + * @param s input structure + * @retval 0 success. + * @retval -1 an error occurred and errno is set to indeicate the error. + * See Execptions for the details. + * @throw EINVAL invalid input object. + * @throw ENOMEM unable to allocate memory. + */ +extern int QRinput_Struct_insertStructuredAppendHeaders(QRinput_Struct *s); + +/****************************************************************************** + * QRcode output (qrencode.c) + *****************************************************************************/ + +/** + * QRcode class. + * Symbol data is represented as an array contains width*width uchars. + * Each uchar represents a module (dot). If the less significant bit of + * the uchar is 1, the corresponding module is black. The other bits are + * meaningless for usual applications, but here its specification is described. + * + *
    + * MSB 76543210 LSB
    + *     |||||||`- 1=black/0=white
    + *     ||||||`-- data and ecc code area
    + *     |||||`--- format information
    + *     ||||`---- version information
    + *     |||`----- timing pattern
    + *     ||`------ alignment pattern
    + *     |`------- finder pattern and separator
    + *     `-------- non-data modules (format, timing, etc.)
    + * 
    + */ +typedef struct { + int version; ///< version of the symbol + int width; ///< width of the symbol + unsigned char *data; ///< symbol data +} QRcode; + +/** + * Singly-linked list of QRcode. Used to represent a structured symbols. + * A list is terminated with NULL. + */ +typedef struct _QRcode_List QRcode_List; + +struct _QRcode_List { + QRcode *code; + QRcode_List *next; +}; + +/** + * Create a symbol from the input data. + * @warning This function is THREAD UNSAFE. + * @param input input data. + * @return an instance of QRcode class. The version of the result QRcode may + * be larger than the designated version. On error, NULL is returned, + * and errno is set to indicate the error. See Exceptions for the + * details. + * @throw EINVAL invalid input object. + * @throw ENOMEM unable to allocate memory for input objects. + */ +extern QRcode *QRcode_encodeInput(QRinput *input); + +/** + * Create a symbol from the string. The library automatically parses the input + * string and encodes in a QR Code symbol. + * @warning This function is THREAD UNSAFE. + * @param string input string. It must be NULL terminated. + * @param version version of the symbol. If 0, the library chooses the minimum + * version for the given input data. + * @param level error correction level. + * @param hint tell the library how non-alphanumerical characters should be + * encoded. If QR_MODE_KANJI is given, kanji characters will be + * encoded as Shif-JIS characters. If QR_MODE_8 is given, all of + * non-alphanumerical characters will be encoded as is. If you want + * to embed UTF-8 string, choose this. + * @param casesensitive case-sensitive(1) or not(0). + * @return an instance of QRcode class. The version of the result QRcode may + * be larger than the designated version. On error, NULL is returned, + * and errno is set to indicate the error. See Exceptions for the + * details. + * @throw EINVAL invalid input object. + * @throw ENOMEM unable to allocate memory for input objects. + */ +extern QRcode *QRcode_encodeString(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive); + +/** + * Same to QRcode_encodeString(), but encode whole data in 8-bit mode. + * @warning This function is THREAD UNSAFE. + */ +extern QRcode *QRcode_encodeString8bit(const char *string, int version, QRecLevel level); + +/** + * Free the instance of QRcode class. + * @param qrcode an instance of QRcode class. + */ +extern void QRcode_free(QRcode *qrcode); + +/** + * Create structured symbols from the input data. + * @warning This function is THREAD UNSAFE. + * @param s + * @return a singly-linked list of QRcode. + */ +extern QRcode_List *QRcode_encodeInputStructured(QRinput_Struct *s); + +/** + * Create structured symbols from the string. The library automatically parses + * the input string and encodes in a QR Code symbol. + * @warning This function is THREAD UNSAFE. + * @param string input string. It should be NULL terminated. + * @param version version of the symbol. + * @param level error correction level. + * @param hint tell the library how non-alphanumerical characters should be + * encoded. If QR_MODE_KANJI is given, kanji characters will be + * encoded as Shif-JIS characters. If QR_MODE_8 is given, all of + * non-alphanumerical characters will be encoded as is. If you want + * to embed UTF-8 string, choose this. + * @param casesensitive case-sensitive(1) or not(0). + * @return a singly-linked list of QRcode. On error, NULL is returned, and + * errno is set to indicate the error. See Exceptions for the details. + * @throw EINVAL invalid input object. + * @throw ENOMEM unable to allocate memory for input objects. + */ +extern QRcode_List *QRcode_encodeStringStructured(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive); + +/** + * Same to QRcode_encodeStringStructured(), but encode whole data in 8-bit mode. + * @warning This function is THREAD UNSAFE. + */ +extern QRcode_List *QRcode_encodeString8bitStructured(const char *string, int version, QRecLevel level); + +/** + * Return the number of symbols included in a QRcode_List. + * @param qrlist a head entry of a QRcode_List. + * @return number of symbols in the list. + */ +extern int QRcode_List_size(QRcode_List *qrlist); + +/** + * Free the QRcode_List. + * @param qrlist a head entry of a QRcode_List. + */ +extern void QRcode_List_free(QRcode_List *qrlist); + +#if defined(__cplusplus) +} +#endif + +#endif /* __QRENCODE_H__ */ diff --git a/qrencode-3.1.0/qrencode.spec b/qrencode-3.1.0/qrencode.spec new file mode 100644 index 00000000..10c4f14f --- /dev/null +++ b/qrencode-3.1.0/qrencode.spec @@ -0,0 +1,70 @@ +%define ver 3.1.0 +%define rel 1 + +Name: qrencode +Version: %{ver} +Release: %{rel}%{?dist} +Summary: Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D symbology that can be scanned by handy terminals such as a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. + +Group: System Environment/Libraries +License: LGPLv2+ +URL: http://megaui.net/fukuchi/works/qrencode/ +Source0: http://megaui.net/fukuchi/works/qrencode/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1. + +%package devel +Summary: Development files for libqrencode +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1. + +This package contains development files for libqrencode. + +%prep +%setup -q + + +%build +%configure --without-tests +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc COPYING TODO ChangeLog NEWS README +%{_libdir}/libqrencode.so.* +%{_bindir}/qrencode +%{_mandir}/man1/qrencode.1.gz + +%files devel +%defattr(-,root,root,-) +%{_includedir}/qrencode.h +%{_libdir}/libqrencode.so +%{_libdir}/pkgconfig/libqrencode.pc + +%changelog +* Fri May 01 2008 Kentaro Fukuchi 3.0.1-1 +- The man page has been packaged correctly. +* Tue May 15 2007 Kentaro Fukuchi 1.0.2-2 +- Summary has been synchronized to README. +* Thu May 09 2007 Katsumi Saito 1.0.2-1 +- Initial RPM release diff --git a/qrencode-3.1.0/qrencode.spec.in b/qrencode-3.1.0/qrencode.spec.in new file mode 100644 index 00000000..f03947ad --- /dev/null +++ b/qrencode-3.1.0/qrencode.spec.in @@ -0,0 +1,70 @@ +%define ver @VERSION@ +%define rel 1 + +Name: qrencode +Version: %{ver} +Release: %{rel}%{?dist} +Summary: Libqrencode is a library for encoding data in a QR Code symbol, a kind of 2D symbology that can be scanned by handy terminals such as a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. + +Group: System Environment/Libraries +License: LGPLv2+ +URL: http://megaui.net/fukuchi/works/qrencode/ +Source0: http://megaui.net/fukuchi/works/qrencode/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1. + +%package devel +Summary: Development files for libqrencode +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Libqrencode supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1. + +This package contains development files for libqrencode. + +%prep +%setup -q + + +%build +%configure --without-tests +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc COPYING TODO ChangeLog NEWS README +%{_libdir}/libqrencode.so.* +%{_bindir}/qrencode +%{_mandir}/man1/qrencode.1.gz + +%files devel +%defattr(-,root,root,-) +%{_includedir}/qrencode.h +%{_libdir}/libqrencode.so +%{_libdir}/pkgconfig/libqrencode.pc + +%changelog +* Fri May 01 2008 Kentaro Fukuchi 3.0.1-1 +- The man page has been packaged correctly. +* Tue May 15 2007 Kentaro Fukuchi 1.0.2-2 +- Summary has been synchronized to README. +* Thu May 09 2007 Katsumi Saito 1.0.2-1 +- Initial RPM release diff --git a/qrencode-3.1.0/qrencode_inner.h b/qrencode-3.1.0/qrencode_inner.h new file mode 100644 index 00000000..a476fdd4 --- /dev/null +++ b/qrencode-3.1.0/qrencode_inner.h @@ -0,0 +1,81 @@ +/** + * qrencode - QR Code encoder + * + * Header for test use + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __QRENCODE_INNER_H__ +#define __QRENCODE_INNER_H__ + +/** + * This header file includes definitions for test use. + */ +extern BitStream *QRinput_mergeBitStream(QRinput *input); +extern BitStream *QRinput_getBitStream(QRinput *input); +extern int QRinput_estimateBitStreamSize(QRinput *input, int version); +extern int QRinput_splitEntry(QRinput_List *entry, int bytes); +extern int QRinput_lengthOfCode(QRencodeMode mode, int version, int bits); +extern int QRinput_insertStructuredAppendHeader(QRinput *input, int size, int index, unsigned char parity); + + +/****************************************************************************** + * Raw code + *****************************************************************************/ + +typedef struct { + int dataLength; + unsigned char *data; + int eccLength; + unsigned char *ecc; +} RSblock; + +typedef struct { + int version; + unsigned char *datacode; + unsigned char *ecccode; + int blocks; + RSblock *rsblock; + int count; + int dataLength; + int eccLength; + int b1; +} QRRawCode; + +extern QRRawCode *QRraw_new(QRinput *input); +extern unsigned char QRraw_getCode(QRRawCode *raw); +extern void QRraw_free(QRRawCode *raw); + +/****************************************************************************** + * Frame filling + *****************************************************************************/ +extern unsigned char *FrameFiller_fillerTest(int version); + +/****************************************************************************** + * QR-code encoding + *****************************************************************************/ +extern QRcode *QRcode_encodeMask(QRinput *input, int mask); + + +/****************************************************************************** + * Mask + *****************************************************************************/ + +extern int Mask_evaluateSymbol(int width, unsigned char *frame); +extern int Mask_writeFormatInformation(int width, unsigned char *frame, int mask, QRecLevel level); + +#endif /* __QRENCODE_INNER_H__ */ diff --git a/qrencode-3.1.0/qrinput.c b/qrencode-3.1.0/qrinput.c new file mode 100644 index 00000000..153caae1 --- /dev/null +++ b/qrencode-3.1.0/qrinput.c @@ -0,0 +1,1329 @@ +/* + * qrencode - QR Code encoder + * + * Input data chunk class + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include + +#include "config.h" +#include "qrencode.h" +#include "qrspec.h" +#include "bitstream.h" +#include "qrinput.h" + +/****************************************************************************** + * Entry of input data + *****************************************************************************/ + +static QRinput_List *QRinput_List_newEntry(QRencodeMode mode, int size, const unsigned char *data) +{ + QRinput_List *entry; + + if(QRinput_check(mode, size, data)) { + errno = EINVAL; + return NULL; + } + + entry = (QRinput_List *)malloc(sizeof(QRinput_List)); + if(entry == NULL) return NULL; + + entry->mode = mode; + entry->size = size; + entry->data = (unsigned char *)malloc(size); + if(entry->data == NULL) { + free(entry); + return NULL; + } + memcpy(entry->data, data, size); + entry->bstream = NULL; + entry->next = NULL; + + return entry; +} + +static void QRinput_List_freeEntry(QRinput_List *entry) +{ + if(entry != NULL) { + free(entry->data); + BitStream_free(entry->bstream); + free(entry); + } +} + +static QRinput_List *QRinput_List_dup(QRinput_List *entry) +{ + QRinput_List *n; + + n = (QRinput_List *)malloc(sizeof(QRinput_List)); + if(n == NULL) return NULL; + + n->mode = entry->mode; + n->size = entry->size; + n->data = (unsigned char *)malloc(n->size); + if(n->data == NULL) { + free(n); + return NULL; + } + memcpy(n->data, entry->data, entry->size); + n->bstream = NULL; + n->next = NULL; + + return n; +} + +/****************************************************************************** + * Input Data + *****************************************************************************/ + +QRinput *QRinput_new(void) +{ + return QRinput_new2(0, QR_ECLEVEL_L); +} + +QRinput *QRinput_new2(int version, QRecLevel level) +{ + QRinput *input; + + if(version < 0 || version > QRSPEC_VERSION_MAX || level > QR_ECLEVEL_H) { + errno = EINVAL; + return NULL; + } + + input = (QRinput *)malloc(sizeof(QRinput)); + if(input == NULL) return NULL; + + input->head = NULL; + input->tail = NULL; + input->version = version; + input->level = level; + + return input; +} + +int QRinput_getVersion(QRinput *input) +{ + return input->version; +} + +int QRinput_setVersion(QRinput *input, int version) +{ + if(version < 0 || version > QRSPEC_VERSION_MAX) { + errno = EINVAL; + return -1; + } + + input->version = version; + + return 0; +} + +QRecLevel QRinput_getErrorCorrectionLevel(QRinput *input) +{ + return input->level; +} + +int QRinput_setErrorCorrectionLevel(QRinput *input, QRecLevel level) +{ + if(level > QR_ECLEVEL_H) { + errno = EINVAL; + return -1; + } + + input->level = level; + + return 0; +} + +static void QRinput_appendEntry(QRinput *input, QRinput_List *entry) +{ + if(input->tail == NULL) { + input->head = entry; + input->tail = entry; + } else { + input->tail->next = entry; + input->tail = entry; + } + entry->next = NULL; +} + +int QRinput_append(QRinput *input, QRencodeMode mode, int size, const unsigned char *data) +{ + QRinput_List *entry; + + entry = QRinput_List_newEntry(mode, size, data); + if(entry == NULL) { + return -1; + } + + QRinput_appendEntry(input, entry); + + return 0; +} + +/** + * Insert a structured-append header to the head of the input data. + * @param input input data. + * @param size number of structured symbols. + * @param index index number of the symbol. (1 <= index <= size) + * @param parity parity among input data. (NOTE: each symbol of a set of structured symbols has the same parity data) + * @retval 0 success. + * @retval -1 error occurred and errno is set to indeicate the error. See Execptions for the details. + * @throw EINVAL invalid parameter. + * @throw ENOMEM unable to allocate memory. + */ +__STATIC int QRinput_insertStructuredAppendHeader(QRinput *input, int size, int index, unsigned char parity) +{ + QRinput_List *entry; + unsigned char buf[3]; + + if(size > MAX_STRUCTURED_SYMBOLS) { + errno = EINVAL; + return -1; + } + if(index <= 0 || index > MAX_STRUCTURED_SYMBOLS) { + errno = EINVAL; + return -1; + } + + buf[0] = (unsigned char)size; + buf[1] = (unsigned char)index; + buf[2] = parity; + entry = QRinput_List_newEntry(QR_MODE_STRUCTURE, 3, buf); + if(entry == NULL) { + return -1; + } + + entry->next = input->head; + input->head = entry; + + return 0; +} + +void QRinput_free(QRinput *input) +{ + QRinput_List *list, *next; + + if(input != NULL) { + list = input->head; + while(list != NULL) { + next = list->next; + QRinput_List_freeEntry(list); + list = next; + } + free(input); + } +} + +static unsigned char QRinput_calcParity(QRinput *input) +{ + unsigned char parity = 0; + QRinput_List *list; + int i; + + list = input->head; + while(list != NULL) { + if(list->mode != QR_MODE_STRUCTURE) { + for(i=list->size-1; i>=0; i--) { + parity ^= list->data[i]; + } + } + list = list->next; + } + + return parity; +} + +QRinput *QRinput_dup(QRinput *input) +{ + QRinput *n; + QRinput_List *list, *e; + + n = QRinput_new2(input->version, input->level); + if(n == NULL) return NULL; + + list = input->head; + while(list != NULL) { + e = QRinput_List_dup(list); + if(e == NULL) { + QRinput_free(n); + return NULL; + } + QRinput_appendEntry(n, e); + list = list->next; + } + + return n; +} + +/****************************************************************************** + * Numeric data + *****************************************************************************/ + +/** + * Check the input data. + * @param size + * @param data + * @return result + */ +static int QRinput_checkModeNum(int size, const char *data) +{ + int i; + + for(i=0; i '9') + return -1; + } + + return 0; +} + +/** + * Estimates the length of the encoded bit stream of numeric data. + * @param size + * @return number of bits + */ +int QRinput_estimateBitsModeNum(int size) +{ + int w; + int bits; + + w = size / 3; + bits = w * 10; + switch(size - w * 3) { + case 1: + bits += 4; + break; + case 2: + bits += 7; + break; + default: + break; + } + + return bits; +} + +/** + * Convert the number data to a bit stream. + * @param entry + * @retval 0 success + * @retval -1 an error occurred and errno is set to indeicate the error. + * See Execptions for the details. + * @throw ENOMEM unable to allocate memory. + */ +static int QRinput_encodeModeNum(QRinput_List *entry, int version) +{ + int words, i, ret; + unsigned int val; + + words = entry->size / 3; + entry->bstream = BitStream_new(); + if(entry->bstream == NULL) return -1; + + val = 0x1; + ret = BitStream_appendNum(entry->bstream, 4, val); + if(ret < 0) goto ABORT; + + val = entry->size; + ret = BitStream_appendNum(entry->bstream, QRspec_lengthIndicator(QR_MODE_NUM, version), val); + if(ret < 0) goto ABORT; + + for(i=0; idata[i*3 ] - '0') * 100; + val += (entry->data[i*3+1] - '0') * 10; + val += (entry->data[i*3+2] - '0'); + + ret = BitStream_appendNum(entry->bstream, 10, val); + if(ret < 0) goto ABORT; + } + + if(entry->size - words * 3 == 1) { + val = entry->data[words*3] - '0'; + ret = BitStream_appendNum(entry->bstream, 4, val); + if(ret < 0) goto ABORT; + } else if(entry->size - words * 3 == 2) { + val = (entry->data[words*3 ] - '0') * 10; + val += (entry->data[words*3+1] - '0'); + BitStream_appendNum(entry->bstream, 7, val); + if(ret < 0) goto ABORT; + } + + return 0; +ABORT: + BitStream_free(entry->bstream); + entry->bstream = NULL; + return -1; +} + +/****************************************************************************** + * Alphabet-numeric data + *****************************************************************************/ + +const signed char QRinput_anTable[128] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 +}; + +/** + * Check the input data. + * @param size + * @param data + * @return result + */ +static int QRinput_checkModeAn(int size, const char *data) +{ + int i; + + for(i=0; isize / 2; + entry->bstream = BitStream_new(); + if(entry->bstream == NULL) return -1; + + val = 0x2; + ret = BitStream_appendNum(entry->bstream, 4, val); + if(ret < 0) goto ABORT; + + val = entry->size; + ret = BitStream_appendNum(entry->bstream, QRspec_lengthIndicator(QR_MODE_AN, version), val); + if(ret < 0) goto ABORT; + + for(i=0; idata[i*2 ]) * 45; + val += (unsigned int)QRinput_lookAnTable(entry->data[i*2+1]); + + ret = BitStream_appendNum(entry->bstream, 11, val); + if(ret < 0) goto ABORT; + } + + if(entry->size & 1) { + val = (unsigned int)QRinput_lookAnTable(entry->data[words * 2]); + + ret = BitStream_appendNum(entry->bstream, 6, val); + if(ret < 0) goto ABORT; + } + + return 0; +ABORT: + BitStream_free(entry->bstream); + entry->bstream = NULL; + return -1; +} + +/****************************************************************************** + * 8 bit data + *****************************************************************************/ + +/** + * Estimates the length of the encoded bit stream of 8 bit data. + * @param size + * @return number of bits + */ +int QRinput_estimateBitsMode8(int size) +{ + return size * 8; +} + +/** + * Convert the 8bits data to a bit stream. + * @param entry + * @retval 0 success + * @retval -1 an error occurred and errno is set to indeicate the error. + * See Execptions for the details. + * @throw ENOMEM unable to allocate memory. + */ +static int QRinput_encodeMode8(QRinput_List *entry, int version) +{ + int ret, i; + unsigned int val; + + entry->bstream = BitStream_new(); + if(entry->bstream == NULL) return -1; + + val = 0x4; + ret = BitStream_appendNum(entry->bstream, 4, val); + if(ret < 0) goto ABORT; + + val = entry->size; + ret = BitStream_appendNum(entry->bstream, QRspec_lengthIndicator(QR_MODE_8, version), val); + if(ret < 0) goto ABORT; + + for(i=0; isize; i++) { + ret = BitStream_appendNum(entry->bstream, 8, entry->data[i]); + if(ret < 0) goto ABORT; + } + + return 0; +ABORT: + BitStream_free(entry->bstream); + entry->bstream = NULL; + return -1; +} + + +/****************************************************************************** + * Kanji data + *****************************************************************************/ + +/** + * Estimates the length of the encoded bit stream of kanji data. + * @param size + * @return number of bits + */ +int QRinput_estimateBitsModeKanji(int size) +{ + return (size / 2) * 13; +} + +/** + * Check the input data. + * @param size + * @param data + * @return result + */ +static int QRinput_checkModeKanji(int size, const unsigned char *data) +{ + int i; + unsigned int val; + + if(size & 1) + return -1; + + for(i=0; i 0x9ffc && val < 0xe040) || val > 0xebbf) { + return -1; + } + } + + return 0; +} + +/** + * Convert the kanji data to a bit stream. + * @param entry + * @retval 0 success + * @retval -1 an error occurred and errno is set to indeicate the error. + * See Execptions for the details. + * @throw ENOMEM unable to allocate memory. + */ +static int QRinput_encodeModeKanji(QRinput_List *entry, int version) +{ + int ret, i; + unsigned int val, h; + + entry->bstream = BitStream_new(); + if(entry->bstream == NULL) return -1; + + val = 0x8; + ret = BitStream_appendNum(entry->bstream, 4, val); + if(ret < 0) goto ABORT; + + val = entry->size / 2; + ret = BitStream_appendNum(entry->bstream, QRspec_lengthIndicator(QR_MODE_KANJI, version), val); + if(ret < 0) goto ABORT; + + for(i=0; isize; i+=2) { + val = ((unsigned int)entry->data[i] << 8) | entry->data[i+1]; + if(val <= 0x9ffc) { + val -= 0x8140; + } else { + val -= 0xc140; + } + h = (val >> 8) * 0xc0; + val = (val & 0xff) + h; + + ret = BitStream_appendNum(entry->bstream, 13, val); + if(ret < 0) goto ABORT; + } + + return 0; +ABORT: + BitStream_free(entry->bstream); + entry->bstream = NULL; + return -1; +} + +/****************************************************************************** + * Structured Symbol + *****************************************************************************/ + +/** + * Convert a structure symbol code to a bit stream. + * @param entry + * @retval 0 success + * @retval -1 an error occurred and errno is set to indeicate the error. + * See Execptions for the details. + * @throw ENOMEM unable to allocate memory. + */ +static int QRinput_encodeModeStructure(QRinput_List *entry) +{ + int ret; + + entry->bstream = BitStream_new(); + if(entry->bstream == NULL) return -1; + + ret = BitStream_appendNum(entry->bstream, 4, 0x03); + if(ret < 0) goto ABORT; + ret = BitStream_appendNum(entry->bstream, 4, entry->data[1] - 1); + if(ret < 0) goto ABORT; + ret = BitStream_appendNum(entry->bstream, 4, entry->data[0] - 1); + if(ret < 0) goto ABORT; + ret = BitStream_appendNum(entry->bstream, 8, entry->data[2]); + if(ret < 0) goto ABORT; + + return 0; +ABORT: + BitStream_free(entry->bstream); + entry->bstream = NULL; + return -1; +} + +/****************************************************************************** + * Validation + *****************************************************************************/ + +int QRinput_check(QRencodeMode mode, int size, const unsigned char *data) +{ + if(size <= 0) return -1; + + switch(mode) { + case QR_MODE_NUM: + return QRinput_checkModeNum(size, (const char *)data); + break; + case QR_MODE_AN: + return QRinput_checkModeAn(size, (const char *)data); + break; + case QR_MODE_KANJI: + return QRinput_checkModeKanji(size, data); + break; + case QR_MODE_8: + return 0; + break; + case QR_MODE_STRUCTURE: + return 0; + break; + default: + break; + } + + return -1; +} + +/****************************************************************************** + * Estimation of the bit length + *****************************************************************************/ + +/** + * Estimates the length of the encoded bit stream on the current version. + * @param entry + * @param version version of the symbol + * @return number of bits + */ +static int QRinput_estimateBitStreamSizeOfEntry(QRinput_List *entry, int version) +{ + int bits = 0; + int l, m; + int num; + + if(version == 0) version = 1; + + switch(entry->mode) { + case QR_MODE_NUM: + bits = QRinput_estimateBitsModeNum(entry->size); + break; + case QR_MODE_AN: + bits = QRinput_estimateBitsModeAn(entry->size); + break; + case QR_MODE_8: + bits = QRinput_estimateBitsMode8(entry->size); + break; + case QR_MODE_KANJI: + bits = QRinput_estimateBitsModeKanji(entry->size); + break; + case QR_MODE_STRUCTURE: + return STRUCTURE_HEADER_BITS; + default: + return 0; + } + + l = QRspec_lengthIndicator(entry->mode, version); + m = 1 << l; + num = (entry->size + m - 1) / m; + + bits += num * (4 + l); // mode indicator (4bits) + length indicator + + return bits; +} + +/** + * Estimates the length of the encoded bit stream of the data. + * @param input input data + * @param version version of the symbol + * @return number of bits + */ +__STATIC int QRinput_estimateBitStreamSize(QRinput *input, int version) +{ + QRinput_List *list; + int bits = 0; + + list = input->head; + while(list != NULL) { + bits += QRinput_estimateBitStreamSizeOfEntry(list, version); + list = list->next; + } + + return bits; +} + +/** + * Estimates the required version number of the symbol. + * @param input input data + * @return required version number + */ +static int QRinput_estimateVersion(QRinput *input) +{ + int bits; + int version, prev; + + version = 0; + do { + prev = version; + bits = QRinput_estimateBitStreamSize(input, prev); + version = QRspec_getMinimumVersion((bits + 7) / 8, input->level); + if (version < 0) { + return -1; + } + } while (version > prev); + + return version; +} + +/** + * Returns required length in bytes for specified mode, version and bits. + * @param mode + * @param version + * @param bits + * @return required length of code words in bytes. + */ +__STATIC int QRinput_lengthOfCode(QRencodeMode mode, int version, int bits) +{ + int payload, size, chunks, remain, maxsize; + + payload = bits - 4 - QRspec_lengthIndicator(mode, version); + switch(mode) { + case QR_MODE_NUM: + chunks = payload / 10; + remain = payload - chunks * 10; + size = chunks * 3; + if(remain >= 7) { + size += 2; + } else if(remain >= 4) { + size += 1; + } + break; + case QR_MODE_AN: + chunks = payload / 11; + remain = payload - chunks * 11; + size = chunks * 2; + if(remain >= 6) size++; + break; + case QR_MODE_8: + size = payload / 8; + break; + case QR_MODE_KANJI: + size = (payload / 13) * 2; + break; + case QR_MODE_STRUCTURE: + size = payload / 8; + break; + default: + size = 0; + break; + } + maxsize = QRspec_maximumWords(mode, version); + if(size < 0) size = 0; + if(size > maxsize) size = maxsize; + + return size; +} + +/****************************************************************************** + * Data conversion + *****************************************************************************/ + +/** + * Convert the input data in the data chunk to a bit stream. + * @param entry + * @return number of bits (>0) or -1 for failure. + */ +static int QRinput_encodeBitStream(QRinput_List *entry, int version) +{ + int words, ret; + QRinput_List *st1 = NULL, *st2 = NULL; + + if(entry->bstream != NULL) { + BitStream_free(entry->bstream); + entry->bstream = NULL; + } + + words = QRspec_maximumWords(entry->mode, version); + if(entry->size > words) { + st1 = QRinput_List_newEntry(entry->mode, words, entry->data); + if(st1 == NULL) goto ABORT; + st2 = QRinput_List_newEntry(entry->mode, entry->size - words, &entry->data[words]); + if(st2 == NULL) goto ABORT; + + ret = QRinput_encodeBitStream(st1, version); + if(ret < 0) goto ABORT; + ret = QRinput_encodeBitStream(st2, version); + if(ret < 0) goto ABORT; + entry->bstream = BitStream_new(); + if(entry->bstream == NULL) goto ABORT; + ret = BitStream_append(entry->bstream, st1->bstream); + if(ret < 0) goto ABORT; + ret = BitStream_append(entry->bstream, st2->bstream); + if(ret < 0) goto ABORT; + QRinput_List_freeEntry(st1); + QRinput_List_freeEntry(st2); + } else { + ret = 0; + switch(entry->mode) { + case QR_MODE_NUM: + ret = QRinput_encodeModeNum(entry, version); + break; + case QR_MODE_AN: + ret = QRinput_encodeModeAn(entry, version); + break; + case QR_MODE_8: + ret = QRinput_encodeMode8(entry, version); + break; + case QR_MODE_KANJI: + ret = QRinput_encodeModeKanji(entry, version); + break; + case QR_MODE_STRUCTURE: + ret = QRinput_encodeModeStructure(entry); + break; + default: + break; + } + if(ret < 0) return -1; + } + + return BitStream_size(entry->bstream); +ABORT: + QRinput_List_freeEntry(st1); + QRinput_List_freeEntry(st2); + return -1; +} + +/** + * Convert the input data to a bit stream. + * @param input input data. + * @retval 0 success + * @retval -1 an error occurred and errno is set to indeicate the error. + * See Execptions for the details. + * @throw ENOMEM unable to allocate memory. + */ +static int QRinput_createBitStream(QRinput *input) +{ + QRinput_List *list; + int bits, total = 0; + + list = input->head; + while(list != NULL) { + bits = QRinput_encodeBitStream(list, input->version); + if(bits < 0) return -1; + total += bits; + list = list->next; + } + + return total; +} + +/** + * Convert the input data to a bit stream. + * When the version number is given and that is not sufficient, it is increased + * automatically. + * @param input input data. + * @retval 0 success + * @retval -1 an error occurred and errno is set to indeicate the error. + * See Execptions for the details. + * @throw ENOMEM unable to allocate memory. + * @throw EINVAL input is too large. + */ +static int QRinput_convertData(QRinput *input) +{ + int bits; + int ver; + + ver = QRinput_estimateVersion(input); + if(ver > QRinput_getVersion(input)) { + QRinput_setVersion(input, ver); + } + + for(;;) { + bits = QRinput_createBitStream(input); + if(bits < 0) return -1; + ver = QRspec_getMinimumVersion((bits + 7) / 8, input->level); + if(ver < 0) { + errno = EINVAL; + return -1; + } else if(ver > QRinput_getVersion(input)) { + QRinput_setVersion(input, ver); + } else { + break; + } + } + + return 0; +} + +/** + * Append padding bits for the input data. + * @param bstream Bitstream to be appended. + * @param input input data. + * @retval 0 success + * @retval -1 an error occurred and errno is set to indeicate the error. + * See Execptions for the details. + * @throw ENOMEM unable to allocate memory. + */ +static int QRinput_appendPaddingBit(BitStream *bstream, QRinput *input) +{ + int bits, maxbits, words, maxwords, i, ret; + BitStream *padding = NULL; + unsigned char *padbuf; + int padlen; + + bits = BitStream_size(bstream); + maxwords = QRspec_getDataLength(input->version, input->level); + maxbits = maxwords * 8; + + if(maxbits == bits) { + return 0; + } + + if(maxbits - bits < 5) { + ret = BitStream_appendNum(bstream, maxbits - bits, 0); + goto DONE; + } + + bits += 4; + words = (bits + 7) / 8; + + padding = BitStream_new(); + if(padding == NULL) return -1; + ret = BitStream_appendNum(padding, words * 8 - bits + 4, 0); + if(ret < 0) goto DONE; + + padlen = maxwords - words; + if(padlen > 0) { + padbuf = (unsigned char *)malloc(padlen); + if(padbuf == NULL) { + ret = -1; + goto DONE; + } + for(i=0; ihead; + while(list != NULL) { + ret = BitStream_append(bstream, list->bstream); + if(ret < 0) { + BitStream_free(bstream); + return NULL; + } + list = list->next; + } + + return bstream; +} + +/** + * Merge all bit streams in the input data and append padding bits + * @param input input data. + * @return padded merged bit stream + */ + +__STATIC BitStream *QRinput_getBitStream(QRinput *input) +{ + BitStream *bstream; + int ret; + + bstream = QRinput_mergeBitStream(input); + if(bstream == NULL) { + return NULL; + } + ret = QRinput_appendPaddingBit(bstream, input); + if(ret < 0) { + BitStream_free(bstream); + return NULL; + } + + return bstream; +} + +/** + * Pack all bit streams padding bits into a byte array. + * @param input input data. + * @return padded merged byte stream + */ + +unsigned char *QRinput_getByteStream(QRinput *input) +{ + BitStream *bstream; + unsigned char *array; + + bstream = QRinput_getBitStream(input); + if(bstream == NULL) { + return NULL; + } + array = BitStream_toByte(bstream); + BitStream_free(bstream); + + return array; +} + +/****************************************************************************** + * Structured input data + *****************************************************************************/ + +static QRinput_InputList *QRinput_InputList_newEntry(QRinput *input) +{ + QRinput_InputList *entry; + + entry = (QRinput_InputList *)malloc(sizeof(QRinput_InputList)); + if(entry == NULL) return NULL; + + entry->input = input; + entry->next = NULL; + + return entry; +} + +static void QRinput_InputList_freeEntry(QRinput_InputList *entry) +{ + if(entry != NULL) { + QRinput_free(entry->input); + free(entry); + } +} + +QRinput_Struct *QRinput_Struct_new(void) +{ + QRinput_Struct *s; + + s = (QRinput_Struct *)malloc(sizeof(QRinput_Struct)); + if(s == NULL) return NULL; + + s->size = 0; + s->parity = -1; + s->head = NULL; + s->tail = NULL; + + return s; +} + +void QRinput_Struct_setParity(QRinput_Struct *s, unsigned char parity) +{ + s->parity = (int)parity; +} + +int QRinput_Struct_appendInput(QRinput_Struct *s, QRinput *input) +{ + QRinput_InputList *e; + + e = QRinput_InputList_newEntry(input); + if(e == NULL) return -1; + + s->size++; + if(s->tail == NULL) { + s->head = e; + s->tail = e; + } else { + s->tail->next = e; + s->tail = e; + } + + return s->size; +} + +void QRinput_Struct_free(QRinput_Struct *s) +{ + QRinput_InputList *list, *next; + + if(s != NULL) { + list = s->head; + while(list != NULL) { + next = list->next; + QRinput_InputList_freeEntry(list); + list = next; + } + free(s); + } +} + +static unsigned char QRinput_Struct_calcParity(QRinput_Struct *s) +{ + QRinput_InputList *list; + unsigned char parity = 0; + + list = s->head; + while(list != NULL) { + parity ^= QRinput_calcParity(list->input); + list = list->next; + } + + QRinput_Struct_setParity(s, parity); + + return parity; +} + +static int QRinput_List_shrinkEntry(QRinput_List *entry, int bytes) +{ + unsigned char *data; + + data = (unsigned char *)malloc(bytes); + if(data == NULL) return -1; + + memcpy(data, entry->data, bytes); + free(entry->data); + entry->data = data; + entry->size = bytes; + + return 0; +} + +__STATIC int QRinput_splitEntry(QRinput_List *entry, int bytes) +{ + QRinput_List *e; + int ret; + + e = QRinput_List_newEntry(entry->mode, entry->size - bytes, entry->data + bytes); + if(e == NULL) { + return -1; + } + + ret = QRinput_List_shrinkEntry(entry, bytes); + if(ret < 0) { + QRinput_List_freeEntry(e); + return -1; + } + + e->next = entry->next; + entry->next = e; + + return 0; +} + +QRinput_Struct *QRinput_splitQRinputToStruct(QRinput *input) +{ + QRinput *p; + QRinput_Struct *s; + int bits, maxbits, nextbits, bytes, ret; + QRinput_List *list, *next, *prev; + + s = QRinput_Struct_new(); + if(s == NULL) return NULL; + + input = QRinput_dup(input); + if(input == NULL) { + QRinput_Struct_free(s); + return NULL; + } + + QRinput_Struct_setParity(s, QRinput_calcParity(input)); + maxbits = QRspec_getDataLength(input->version, input->level) * 8 - STRUCTURE_HEADER_BITS; + + if(maxbits <= 0) { + QRinput_Struct_free(s); + QRinput_free(input); + return NULL; + } + + bits = 0; + list = input->head; + prev = NULL; + while(list != NULL) { + nextbits = QRinput_estimateBitStreamSizeOfEntry(list, input->version); + if(bits + nextbits <= maxbits) { + ret = QRinput_encodeBitStream(list, input->version); + if(ret < 0) goto ABORT; + bits += ret; + prev = list; + list = list->next; + } else { + bytes = QRinput_lengthOfCode(list->mode, input->version, maxbits - bits); + if(bytes > 0) { + /* Splits this entry into 2 entries. */ + ret = QRinput_splitEntry(list, bytes); + if(ret < 0) goto ABORT; + /* First half is the tail of the current input. */ + next = list->next; + list->next = NULL; + /* Second half is the head of the next input, p.*/ + p = QRinput_new2(input->version, input->level); + if(p == NULL) goto ABORT; + p->head = next; + /* Renew QRinput.tail. */ + p->tail = input->tail; + input->tail = list; + /* Point to the next entry. */ + prev = list; + list = next; + } else { + /* Current entry will go to the next input. */ + prev->next = NULL; + p = QRinput_new2(input->version, input->level); + if(p == NULL) goto ABORT; + p->head = list; + p->tail = input->tail; + input->tail = prev; + } + ret = QRinput_Struct_appendInput(s, input); + if(ret < 0) goto ABORT; + input = p; + bits = 0; + } + } + QRinput_Struct_appendInput(s, input); + if(s->size > MAX_STRUCTURED_SYMBOLS) { + QRinput_Struct_free(s); + errno = ERANGE; + return NULL; + } + ret = QRinput_Struct_insertStructuredAppendHeaders(s); + if(ret < 0) { + QRinput_Struct_free(s); + return NULL; + } + + return s; + +ABORT: + QRinput_free(input); + QRinput_Struct_free(s); + return NULL; +} + +int QRinput_Struct_insertStructuredAppendHeaders(QRinput_Struct *s) +{ + int num, i; + QRinput_InputList *list; + + if(s->parity < 0) { + QRinput_Struct_calcParity(s); + } + num = 0; + list = s->head; + while(list != NULL) { + num++; + list = list->next; + } + i = 1; + list = s->head; + while(list != NULL) { + if(QRinput_insertStructuredAppendHeader(list->input, num, i, s->parity)) + return -1; + i++; + list = list->next; + } + + return 0; +} diff --git a/qrencode-3.1.0/qrinput.h b/qrencode-3.1.0/qrinput.h new file mode 100644 index 00000000..21ced704 --- /dev/null +++ b/qrencode-3.1.0/qrinput.h @@ -0,0 +1,103 @@ +/* + * qrencode - QR Code encoder + * + * Input data chunk class + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __QRINPUT_H__ +#define __QRINPUT_H__ + +#include "qrencode.h" +#include "bitstream.h" + +/****************************************************************************** + * Entry of input data + *****************************************************************************/ +typedef struct _QRinput_List QRinput_List; + +struct _QRinput_List { + QRencodeMode mode; + int size; ///< Size of data chunk (byte). + unsigned char *data; ///< Data chunk. + BitStream *bstream; + QRinput_List *next; +}; + +/****************************************************************************** + * Input Data + *****************************************************************************/ +struct _QRinput { + int version; + QRecLevel level; + QRinput_List *head; + QRinput_List *tail; +}; + +/****************************************************************************** + * Structured append input data + *****************************************************************************/ +typedef struct _QRinput_InputList QRinput_InputList; + +struct _QRinput_InputList { + QRinput *input; + QRinput_InputList *next; +}; + +struct _QRinput_Struct { + int size; ///< number of structured symbols + int parity; + QRinput_InputList *head; + QRinput_InputList *tail; +}; + +/** + * Pack all bit streams padding bits into a byte array. + * @param input input data. + * @return padded merged byte stream + */ +extern unsigned char *QRinput_getByteStream(QRinput *input); + + +extern int QRinput_estimateBitsModeNum(int size); +extern int QRinput_estimateBitsModeAn(int size); +extern int QRinput_estimateBitsMode8(int size); +extern int QRinput_estimateBitsModeKanji(int size); + +extern QRinput *QRinput_dup(QRinput *input); + +extern const signed char QRinput_anTable[128]; + +/** + * Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). + * @param __c__ character + * @return value + */ +#define QRinput_lookAnTable(__c__) \ + ((__c__ & 0x80)?-1:QRinput_anTable[(int)__c__]) + +/** + * Length of a segment of structured-append header. + */ +#define STRUCTURE_HEADER_BITS 20 + +/** + * Maximum number of symbols in a set of structured-appended symbols. + */ +#define MAX_STRUCTURED_SYMBOLS 16 + +#endif /* __QRINPUT_H__ */ diff --git a/qrencode-3.1.0/qrspec.c b/qrencode-3.1.0/qrspec.c new file mode 100644 index 00000000..1a04a954 --- /dev/null +++ b/qrencode-3.1.0/qrspec.c @@ -0,0 +1,540 @@ +/* + * qrencode - QR Code encoder + * + * QR Code specification in convenient format. + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include + +#include "config.h" +#include "qrspec.h" + +/****************************************************************************** + * Version and capacity + *****************************************************************************/ + +typedef struct { + int width; //< Edge length of the symbol + int words; //< Data capacity (bytes) + int remainder; //< Remainder bit (bits) + int ec[4]; //< Number of ECC code (bytes) +} QRspec_Capacity; + +/** + * Table of the capacity of symbols + * See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004. + */ +static const QRspec_Capacity qrspecCapacity[QRSPEC_VERSION_MAX + 1] = { + { 0, 0, 0, { 0, 0, 0, 0}}, + { 21, 26, 0, { 7, 10, 13, 17}}, // 1 + { 25, 44, 7, { 10, 16, 22, 28}}, + { 29, 70, 7, { 15, 26, 36, 44}}, + { 33, 100, 7, { 20, 36, 52, 64}}, + { 37, 134, 7, { 26, 48, 72, 88}}, // 5 + { 41, 172, 7, { 36, 64, 96, 112}}, + { 45, 196, 0, { 40, 72, 108, 130}}, + { 49, 242, 0, { 48, 88, 132, 156}}, + { 53, 292, 0, { 60, 110, 160, 192}}, + { 57, 346, 0, { 72, 130, 192, 224}}, //10 + { 61, 404, 0, { 80, 150, 224, 264}}, + { 65, 466, 0, { 96, 176, 260, 308}}, + { 69, 532, 0, { 104, 198, 288, 352}}, + { 73, 581, 3, { 120, 216, 320, 384}}, + { 77, 655, 3, { 132, 240, 360, 432}}, //15 + { 81, 733, 3, { 144, 280, 408, 480}}, + { 85, 815, 3, { 168, 308, 448, 532}}, + { 89, 901, 3, { 180, 338, 504, 588}}, + { 93, 991, 3, { 196, 364, 546, 650}}, + { 97, 1085, 3, { 224, 416, 600, 700}}, //20 + {101, 1156, 4, { 224, 442, 644, 750}}, + {105, 1258, 4, { 252, 476, 690, 816}}, + {109, 1364, 4, { 270, 504, 750, 900}}, + {113, 1474, 4, { 300, 560, 810, 960}}, + {117, 1588, 4, { 312, 588, 870, 1050}}, //25 + {121, 1706, 4, { 336, 644, 952, 1110}}, + {125, 1828, 4, { 360, 700, 1020, 1200}}, + {129, 1921, 3, { 390, 728, 1050, 1260}}, + {133, 2051, 3, { 420, 784, 1140, 1350}}, + {137, 2185, 3, { 450, 812, 1200, 1440}}, //30 + {141, 2323, 3, { 480, 868, 1290, 1530}}, + {145, 2465, 3, { 510, 924, 1350, 1620}}, + {149, 2611, 3, { 540, 980, 1440, 1710}}, + {153, 2761, 3, { 570, 1036, 1530, 1800}}, + {157, 2876, 0, { 570, 1064, 1590, 1890}}, //35 + {161, 3034, 0, { 600, 1120, 1680, 1980}}, + {165, 3196, 0, { 630, 1204, 1770, 2100}}, + {169, 3362, 0, { 660, 1260, 1860, 2220}}, + {173, 3532, 0, { 720, 1316, 1950, 2310}}, + {177, 3706, 0, { 750, 1372, 2040, 2430}} //40 +}; + +int QRspec_getDataLength(int version, QRecLevel level) +{ + return qrspecCapacity[version].words - qrspecCapacity[version].ec[level]; +} + +int QRspec_getECCLength(int version, QRecLevel level) +{ + return qrspecCapacity[version].ec[level]; +} + +int QRspec_getMinimumVersion(int size, QRecLevel level) +{ + int i; + int words; + + for(i=1; i<= QRSPEC_VERSION_MAX; i++) { + words = qrspecCapacity[i].words - qrspecCapacity[i].ec[level]; + if(words >= size) return i; + } + + return -1; +} + +int QRspec_getWidth(int version) +{ + return qrspecCapacity[version].width; +} + +int QRspec_getRemainder(int version) +{ + return qrspecCapacity[version].remainder; +} + +/****************************************************************************** + * Length indicator + *****************************************************************************/ + +static const int lengthTableBits[4][3] = { + {10, 12, 14}, + { 9, 11, 13}, + { 8, 16, 16}, + { 8, 10, 12} +}; + +int QRspec_lengthIndicator(QRencodeMode mode, int version) +{ + int l; + + if(mode == QR_MODE_STRUCTURE) return 0; + if(version <= 9) { + l = 0; + } else if(version <= 26) { + l = 1; + } else { + l = 2; + } + + return lengthTableBits[mode][l]; +} + +int QRspec_maximumWords(QRencodeMode mode, int version) +{ + int l; + int bits; + int words; + + if(mode == QR_MODE_STRUCTURE) return 3; + if(version <= 9) { + l = 0; + } else if(version <= 26) { + l = 1; + } else { + l = 2; + } + + bits = lengthTableBits[mode][l]; + words = (1 << bits) - 1; + if(mode == QR_MODE_KANJI) { + words *= 2; // the number of bytes is required + } + + return words; +} + +/****************************************************************************** + * Error correction code + *****************************************************************************/ + +/** + * Table of the error correction code (Reed-Solomon block) + * See Table 12-16 (pp.30-36), JIS X0510:2004. + */ +static const int eccTable[QRSPEC_VERSION_MAX+1][4][2] = { + {{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}}, + {{ 1, 0}, { 1, 0}, { 1, 0}, { 1, 0}}, // 1 + {{ 1, 0}, { 1, 0}, { 1, 0}, { 1, 0}}, + {{ 1, 0}, { 1, 0}, { 2, 0}, { 2, 0}}, + {{ 1, 0}, { 2, 0}, { 2, 0}, { 4, 0}}, + {{ 1, 0}, { 2, 0}, { 2, 2}, { 2, 2}}, // 5 + {{ 2, 0}, { 4, 0}, { 4, 0}, { 4, 0}}, + {{ 2, 0}, { 4, 0}, { 2, 4}, { 4, 1}}, + {{ 2, 0}, { 2, 2}, { 4, 2}, { 4, 2}}, + {{ 2, 0}, { 3, 2}, { 4, 4}, { 4, 4}}, + {{ 2, 2}, { 4, 1}, { 6, 2}, { 6, 2}}, //10 + {{ 4, 0}, { 1, 4}, { 4, 4}, { 3, 8}}, + {{ 2, 2}, { 6, 2}, { 4, 6}, { 7, 4}}, + {{ 4, 0}, { 8, 1}, { 8, 4}, {12, 4}}, + {{ 3, 1}, { 4, 5}, {11, 5}, {11, 5}}, + {{ 5, 1}, { 5, 5}, { 5, 7}, {11, 7}}, //15 + {{ 5, 1}, { 7, 3}, {15, 2}, { 3, 13}}, + {{ 1, 5}, {10, 1}, { 1, 15}, { 2, 17}}, + {{ 5, 1}, { 9, 4}, {17, 1}, { 2, 19}}, + {{ 3, 4}, { 3, 11}, {17, 4}, { 9, 16}}, + {{ 3, 5}, { 3, 13}, {15, 5}, {15, 10}}, //20 + {{ 4, 4}, {17, 0}, {17, 6}, {19, 6}}, + {{ 2, 7}, {17, 0}, { 7, 16}, {34, 0}}, + {{ 4, 5}, { 4, 14}, {11, 14}, {16, 14}}, + {{ 6, 4}, { 6, 14}, {11, 16}, {30, 2}}, + {{ 8, 4}, { 8, 13}, { 7, 22}, {22, 13}}, //25 + {{10, 2}, {19, 4}, {28, 6}, {33, 4}}, + {{ 8, 4}, {22, 3}, { 8, 26}, {12, 28}}, + {{ 3, 10}, { 3, 23}, { 4, 31}, {11, 31}}, + {{ 7, 7}, {21, 7}, { 1, 37}, {19, 26}}, + {{ 5, 10}, {19, 10}, {15, 25}, {23, 25}}, //30 + {{13, 3}, { 2, 29}, {42, 1}, {23, 28}}, + {{17, 0}, {10, 23}, {10, 35}, {19, 35}}, + {{17, 1}, {14, 21}, {29, 19}, {11, 46}}, + {{13, 6}, {14, 23}, {44, 7}, {59, 1}}, + {{12, 7}, {12, 26}, {39, 14}, {22, 41}}, //35 + {{ 6, 14}, { 6, 34}, {46, 10}, { 2, 64}}, + {{17, 4}, {29, 14}, {49, 10}, {24, 46}}, + {{ 4, 18}, {13, 32}, {48, 14}, {42, 32}}, + {{20, 4}, {40, 7}, {43, 22}, {10, 67}}, + {{19, 6}, {18, 31}, {34, 34}, {20, 61}},//40 +}; + +void QRspec_getEccSpec(int version, QRecLevel level, int spec[5]) +{ + int b1, b2; + int data, ecc; + + b1 = eccTable[version][level][0]; + b2 = eccTable[version][level][1]; + data = QRspec_getDataLength(version, level); + ecc = QRspec_getECCLength(version, level); + + if(b2 == 0) { + spec[0] = b1; + spec[1] = data / b1; + spec[2] = ecc / b1; + spec[3] = spec[4] = 0; + } else { + spec[0] = b1; + spec[1] = data / (b1 + b2); + spec[2] = ecc / (b1 + b2); + spec[3] = b2; + spec[4] = spec[1] + 1; + } +} + +/****************************************************************************** + * Alignment pattern + *****************************************************************************/ + +/** + * Positions of alignment patterns. + * This array includes only the second and the third position of the alignment + * patterns. Rest of them can be calculated from the distance between them. + * + * See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + */ +static const int alignmentPattern[QRSPEC_VERSION_MAX+1][2] = { + { 0, 0}, + { 0, 0}, {18, 0}, {22, 0}, {26, 0}, {30, 0}, // 1- 5 + {34, 0}, {22, 38}, {24, 42}, {26, 46}, {28, 50}, // 6-10 + {30, 54}, {32, 58}, {34, 62}, {26, 46}, {26, 48}, //11-15 + {26, 50}, {30, 54}, {30, 56}, {30, 58}, {34, 62}, //16-20 + {28, 50}, {26, 50}, {30, 54}, {28, 54}, {32, 58}, //21-25 + {30, 58}, {34, 62}, {26, 50}, {30, 54}, {26, 52}, //26-30 + {30, 56}, {34, 60}, {30, 58}, {34, 62}, {30, 54}, //31-35 + {24, 50}, {28, 54}, {32, 58}, {26, 54}, {30, 58}, //35-40 +}; + +/** + * Put an alignment marker. + * @param frame + * @param width + * @param ox,oy center coordinate of the pattern + */ +static void QRspec_putAlignmentMarker(unsigned char *frame, int width, int ox, int oy) +{ + static const unsigned char finder[] = { + 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, + 0xa1, 0xa0, 0xa0, 0xa0, 0xa1, + 0xa1, 0xa0, 0xa1, 0xa0, 0xa1, + 0xa1, 0xa0, 0xa0, 0xa0, 0xa1, + 0xa1, 0xa1, 0xa1, 0xa1, 0xa1, + }; + int x, y; + const unsigned char *s; + + frame += (oy - 2) * width + ox - 2; + s = finder; + for(y=0; y<5; y++) { + for(x=0; x<5; x++) { + frame[x] = s[x]; + } + frame += width; + s += 5; + } +} + +__STATIC void QRspec_putAlignmentPattern(int version, unsigned char *frame, int width) +{ + int d, w, x, y, cx, cy; + + if(version < 2) return; + + d = alignmentPattern[version][1] - alignmentPattern[version][0]; + if(d < 0) { + w = 2; + } else { + w = (width - alignmentPattern[version][0]) / d + 2; + } + + if(w * w - 3 == 1) { + x = alignmentPattern[version][0]; + y = alignmentPattern[version][0]; + QRspec_putAlignmentMarker(frame, width, x, y); + return; + } + + cx = alignmentPattern[version][0]; + for(x=1; x QRSPEC_VERSION_MAX) return 0; + + return versionPattern[version -7]; +} + +/****************************************************************************** + * Format information + *****************************************************************************/ + +/* See calcFormatInfo in tests/test_qrspec.c */ +static const unsigned int formatInfo[4][8] = { + {0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976}, + {0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0}, + {0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed}, + {0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b} +}; + +unsigned int QRspec_getFormatInfo(int mask, QRecLevel level) +{ + if(mask < 0 || mask > 7) return 0; + + return formatInfo[level][mask]; +} + +/****************************************************************************** + * Frame + *****************************************************************************/ + +/** + * Cache of initial frames. + */ +/* C99 says that static storage shall be initialized to a null pointer + * by compiler. */ +static unsigned char *frames[QRSPEC_VERSION_MAX + 1]; + +/** + * Put a finder pattern. + * @param frame + * @param width + * @param ox,oy upper-left coordinate of the pattern + */ +static void putFinderPattern(unsigned char *frame, int width, int ox, int oy) +{ + static const unsigned char finder[] = { + 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, + 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, + 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, + 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, + 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, + 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, + 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, + }; + int x, y; + const unsigned char *s; + + frame += oy * width + ox; + s = finder; + for(y=0; y<7; y++) { + for(x=0; x<7; x++) { + frame[x] = s[x]; + } + frame += width; + s += 7; + } +} + + +static unsigned char *QRspec_createFrame(int version) +{ + unsigned char *frame, *p, *q; + int width; + int x, y; + unsigned int verinfo, v; + + width = qrspecCapacity[version].width; + frame = (unsigned char *)malloc(width * width); + if(frame == NULL) return NULL; + + memset(frame, 0, width * width); + /* Finder pattern */ + putFinderPattern(frame, width, 0, 0); + putFinderPattern(frame, width, width - 7, 0); + putFinderPattern(frame, width, 0, width - 7); + /* Separator */ + p = frame; + q = frame + width * (width - 7); + for(y=0; y<7; y++) { + p[7] = 0xc0; + p[width - 8] = 0xc0; + q[7] = 0xc0; + p += width; + q += width; + } + memset(frame + width * 7, 0xc0, 8); + memset(frame + width * 8 - 8, 0xc0, 8); + memset(frame + width * (width - 8), 0xc0, 8); + /* Mask format information area */ + memset(frame + width * 8, 0x84, 9); + memset(frame + width * 9 - 8, 0x84, 8); + p = frame + 8; + for(y=0; y<8; y++) { + *p = 0x84; + p += width; + } + p = frame + width * (width - 7) + 8; + for(y=0; y<7; y++) { + *p = 0x84; + p += width; + } + /* Timing pattern */ + p = frame + width * 6 + 8; + q = frame + width * 8 + 6; + for(x=1; x= 7) { + verinfo = QRspec_getVersionPattern(version); + + p = frame + width * (width - 11); + v = verinfo; + for(x=0; x<6; x++) { + for(y=0; y<3; y++) { + p[width * y + x] = 0x88 | (v & 1); + v = v >> 1; + } + } + + p = frame + width - 11; + v = verinfo; + for(y=0; y<6; y++) { + for(x=0; x<3; x++) { + p[x] = 0x88 | (v & 1); + v = v >> 1; + } + p += width; + } + } + /* and a little bit... */ + frame[width * (width - 8) + 8] = 0x81; + + return frame; +} + +unsigned char *QRspec_newFrame(int version) +{ + unsigned char *frame; + int width; + + if(version < 1 || version > QRSPEC_VERSION_MAX) return NULL; + + if(frames[version] == NULL) { + frames[version] = QRspec_createFrame(version); + } + if(frames[version] == NULL) return NULL; + + width = qrspecCapacity[version].width; + frame = (unsigned char *)malloc(width * width); + if(frame == NULL) return NULL; + memcpy(frame, frames[version], width * width); + + return frame; +} + +void QRspec_clearCache(void) +{ + int i; + + for(i=1; i<=QRSPEC_VERSION_MAX; i++) { + free(frames[i]); + } +} diff --git a/qrencode-3.1.0/qrspec.h b/qrencode-3.1.0/qrspec.h new file mode 100644 index 00000000..a544e9b1 --- /dev/null +++ b/qrencode-3.1.0/qrspec.h @@ -0,0 +1,171 @@ +/* + * qrencode - QR Code encoder + * + * QR Code specification in convenient format. + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __QRSPEC_H__ +#define __QRSPEC_H__ + +#include "qrencode.h" + +/****************************************************************************** + * Version and capacity + *****************************************************************************/ + +/** + * Maximum version (size) of QR-code symbol. + */ +#define QRSPEC_VERSION_MAX 40 + +/** + * Maximum width of a symbol + */ +#define QRSPEC_WIDTH_MAX 177 + +/** + * Return maximum data code length (bytes) for the version. + * @param version + * @param level + * @return maximum size (bytes) + */ +extern int QRspec_getDataLength(int version, QRecLevel level); + +/** + * Return maximum error correction code length (bytes) for the version. + * @param version + * @param level + * @return ECC size (bytes) + */ +extern int QRspec_getECCLength(int version, QRecLevel level); + +/** + * Return a version number that satisfies the input code length. + * @param size input code length (byte) + * @param level + * @return version number + */ +extern int QRspec_getMinimumVersion(int size, QRecLevel level); + +/** + * Return the width of the symbol for the version. + * @param version + * @return width + */ +extern int QRspec_getWidth(int version); + +/** + * Return the numer of remainder bits. + * @param version + * @return number of remainder bits + */ +extern int QRspec_getRemainder(int version); + +/****************************************************************************** + * Length indicator + *****************************************************************************/ + +/** + * Return the size of lenght indicator for the mode and version. + * @param mode + * @param version + * @return the size of the appropriate length indicator (bits). + */ +extern int QRspec_lengthIndicator(QRencodeMode mode, int version); + +/** + * Return the maximum length for the mode and version. + * @param mode + * @param version + * @return the maximum length (bytes) + */ +extern int QRspec_maximumWords(QRencodeMode mode, int version); + +/****************************************************************************** + * Error correction code + *****************************************************************************/ + +/** + * Return an array of ECC specification. + * @param version + * @param level + * @param spec an array of ECC specification contains as following: + * {# of type1 blocks, # of data code, # of ecc code, + * # of type2 blocks, # of data code} + */ +void QRspec_getEccSpec(int version, QRecLevel level, int spec[5]); + +#define QRspec_rsBlockNum(__spec__) (__spec__[0] + __spec__[3]) +#define QRspec_rsBlockNum1(__spec__) (__spec__[0]) +#define QRspec_rsDataCodes1(__spec__) (__spec__[1]) +#define QRspec_rsEccCodes1(__spec__) (__spec__[2]) +#define QRspec_rsBlockNum2(__spec__) (__spec__[3]) +#define QRspec_rsDataCodes2(__spec__) (__spec__[4]) +#define QRspec_rsEccCodes2(__spec__) (__spec__[2]) + +#define QRspec_rsDataLength(__spec__) \ + ((QRspec_rsBlockNum1(__spec__) * QRspec_rsDataCodes1(__spec__)) + \ + (QRspec_rsBlockNum2(__spec__) * QRspec_rsDataCodes2(__spec__))) +#define QRspec_rsEccLength(__spec__) \ + (QRspec_rsBlockNum(__spec__) * QRspec_rsEccCodes1(__spec__)) + +/****************************************************************************** + * Version information pattern + *****************************************************************************/ + +/** + * Return BCH encoded version information pattern that is used for the symbol + * of version 7 or greater. Use lower 18 bits. + * @param version + * @return BCH encoded version information pattern + */ +extern unsigned int QRspec_getVersionPattern(int version); + +/****************************************************************************** + * Format information + *****************************************************************************/ + +/** + * Return BCH encoded format information pattern. + * @param mask + * @param level + * @return BCH encoded format information pattern + */ +extern unsigned int QRspec_getFormatInfo(int mask, QRecLevel level); + +/****************************************************************************** + * Frame + *****************************************************************************/ + +/** + * Return a copy of initialized frame. + * When the same version is requested twice or more, a copy of cached frame + * is returned. + * WARNING: Thread unsafe!!! + * @param version + * @return Array of unsigned char. You can free it by free(). + */ +extern unsigned char *QRspec_newFrame(int version); + +/** + * Clear the frame cache. Typically for debug. + * WARNING: Thread unsafe!!! + */ +extern void QRspec_clearCache(void); + +#endif /* __QRSPEC_H__ */ diff --git a/qrencode-3.1.0/rscode.c b/qrencode-3.1.0/rscode.c new file mode 100644 index 00000000..c92f6f23 --- /dev/null +++ b/qrencode-3.1.0/rscode.c @@ -0,0 +1,304 @@ +/* + * qrencode - QR Code encoder + * + * Reed solomon encoder. This code is taken from Phil Karn's libfec then + * editted and packed into a pair of .c and .h files. + * + * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q + * (libfec is released under the GNU Lesser General Public License.) + * + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include "rscode.h" + +/* Stuff specific to the 8-bit symbol version of the general purpose RS codecs + * + */ +typedef unsigned char data_t; + + +/** + * Reed-Solomon codec control block + */ +struct _RS { + int mm; /* Bits per symbol */ + int nn; /* Symbols per block (= (1<= rs->nn) { + x -= rs->nn; + x = (x >> rs->mm) + (x & rs->nn); + } + return x; +} + + +#define MODNN(x) modnn(rs,x) + +#define MM (rs->mm) +#define NN (rs->nn) +#define ALPHA_TO (rs->alpha_to) +#define INDEX_OF (rs->index_of) +#define GENPOLY (rs->genpoly) +#define NROOTS (rs->nroots) +#define FCR (rs->fcr) +#define PRIM (rs->prim) +#define IPRIM (rs->iprim) +#define PAD (rs->pad) +#define A0 (NN) + + +/* Initialize a Reed-Solomon codec + * symsize = symbol size, bits + * gfpoly = Field generator polynomial coefficients + * fcr = first root of RS code generator polynomial, index form + * prim = primitive element to generate polynomial roots + * nroots = RS code generator polynomial degree (number of roots) + * pad = padding bytes at front of shortened block + */ +static RS *init_rs_char(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad) +{ + RS *rs; + + +/* Common code for intializing a Reed-Solomon control block (char or int symbols) + * Copyright 2004 Phil Karn, KA9Q + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ +//#undef NULL +//#define NULL ((void *)0) + + int i, j, sr,root,iprim; + + rs = NULL; + /* Check parameter ranges */ + if(symsize < 0 || symsize > (int)(8*sizeof(data_t))){ + goto done; + } + + if(fcr < 0 || fcr >= (1<= (1<= (1<= ((1<mm = symsize; + rs->nn = (1<pad = pad; + + rs->alpha_to = (data_t *)malloc(sizeof(data_t)*(rs->nn+1)); + if(rs->alpha_to == NULL){ + free(rs); + rs = NULL; + goto done; + } + rs->index_of = (data_t *)malloc(sizeof(data_t)*(rs->nn+1)); + if(rs->index_of == NULL){ + free(rs->alpha_to); + free(rs); + rs = NULL; + goto done; + } + + /* Generate Galois field lookup tables */ + rs->index_of[0] = A0; /* log(zero) = -inf */ + rs->alpha_to[A0] = 0; /* alpha**-inf = 0 */ + sr = 1; + for(i=0;inn;i++){ + rs->index_of[sr] = i; + rs->alpha_to[i] = sr; + sr <<= 1; + if(sr & (1<nn; + } + if(sr != 1){ + /* field generator polynomial is not primitive! */ + free(rs->alpha_to); + free(rs->index_of); + free(rs); + rs = NULL; + goto done; + } + + /* Form RS code generator polynomial from its roots */ + rs->genpoly = (data_t *)malloc(sizeof(data_t)*(nroots+1)); + if(rs->genpoly == NULL){ + free(rs->alpha_to); + free(rs->index_of); + free(rs); + rs = NULL; + goto done; + } + rs->fcr = fcr; + rs->prim = prim; + rs->nroots = nroots; + rs->gfpoly = gfpoly; + + /* Find prim-th root of 1, used in decoding */ + for(iprim=1;(iprim % prim) != 0;iprim += rs->nn) + ; + rs->iprim = iprim / prim; + + rs->genpoly[0] = 1; + for (i = 0,root=fcr*prim; i < nroots; i++,root += prim) { + rs->genpoly[i+1] = 1; + + /* Multiply rs->genpoly[] by @**(root + x) */ + for (j = i; j > 0; j--){ + if (rs->genpoly[j] != 0) + rs->genpoly[j] = rs->genpoly[j-1] ^ rs->alpha_to[modnn(rs,rs->index_of[rs->genpoly[j]] + root)]; + else + rs->genpoly[j] = rs->genpoly[j-1]; + } + /* rs->genpoly[0] can never be zero */ + rs->genpoly[0] = rs->alpha_to[modnn(rs,rs->index_of[rs->genpoly[0]] + root)]; + } + /* convert rs->genpoly[] to index form for quicker encoding */ + for (i = 0; i <= nroots; i++) + rs->genpoly[i] = rs->index_of[rs->genpoly[i]]; + done:; + + return rs; +} + +RS *init_rs(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad) +{ + RS *rs; + + for(rs = rslist; rs != NULL; rs = rs->next) { + if(rs->pad != pad) continue; + if(rs->nroots != nroots) continue; + if(rs->mm != symsize) continue; + if(rs->gfpoly != gfpoly) continue; + if(rs->fcr != fcr) continue; + if(rs->prim != prim) continue; + + goto DONE; + } + + rs = init_rs_char(symsize, gfpoly, fcr, prim, nroots, pad); + if(rs == NULL) goto DONE; + rs->next = rslist; + rslist = rs; + +DONE: + return rs; +} + + +void free_rs_char(RS *rs) +{ + free(rs->alpha_to); + free(rs->index_of); + free(rs->genpoly); + free(rs); +} + +void free_rs_cache(void) +{ + RS *rs, *next; + + rs = rslist; + while(rs != NULL) { + next = rs->next; + free_rs_char(rs); + rs = next; + } +} + +/* The guts of the Reed-Solomon encoder, meant to be #included + * into a function body with the following typedefs, macros and variables supplied + * according to the code parameters: + + * data_t - a typedef for the data symbol + * data_t data[] - array of NN-NROOTS-PAD and type data_t to be encoded + * data_t parity[] - an array of NROOTS and type data_t to be written with parity symbols + * NROOTS - the number of roots in the RS code generator polynomial, + * which is the same as the number of parity symbols in a block. + Integer variable or literal. + * + * NN - the total number of symbols in a RS block. Integer variable or literal. + * PAD - the number of pad symbols in a block. Integer variable or literal. + * ALPHA_TO - The address of an array of NN elements to convert Galois field + * elements in index (log) form to polynomial form. Read only. + * INDEX_OF - The address of an array of NN elements to convert Galois field + * elements in polynomial form to index (log) form. Read only. + * MODNN - a function to reduce its argument modulo NN. May be inline or a macro. + * GENPOLY - an array of NROOTS+1 elements containing the generator polynomial in index form + + * The memset() and memmove() functions are used. The appropriate header + * file declaring these functions (usually ) must be included by the calling + * program. + + * Copyright 2004, Phil Karn, KA9Q + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ + +#undef A0 +#define A0 (NN) /* Special reserved value encoding zero in index form */ + +void encode_rs_char(RS *rs, const data_t *data, data_t *parity) +{ + int i, j; + data_t feedback; + + memset(parity,0,NROOTS*sizeof(data_t)); + + for(i=0;i + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __RSCODE_H__ +#define __RSCODE_H__ + +/* + * General purpose RS codec, 8-bit symbols. + */ + +typedef struct _RS RS; + +/* WARNING: Thread unsafe!!! */ +extern RS *init_rs(int symsize, int gfpoly, int fcr, int prim, int nroots, int pad); +extern void encode_rs_char(RS *rs, const unsigned char *data, unsigned char *parity); +extern void free_rs_char(RS *rs); +extern void free_rs_cache(void); + +#endif /* __RSCODE_H__ */ diff --git a/qrencode-3.1.0/split.c b/qrencode-3.1.0/split.c new file mode 100644 index 00000000..4bb8e55b --- /dev/null +++ b/qrencode-3.1.0/split.c @@ -0,0 +1,297 @@ +/* + * qrencode - QR Code encoder + * + * Input data splitter. + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include "qrencode.h" +#include "qrinput.h" +#include "qrspec.h" +#include "split.h" + +#define isdigit(__c__) ((unsigned char)((signed char)(__c__) - '0') < 10) +#define isalnum(__c__) (QRinput_lookAnTable(__c__) >= 0) + +static QRencodeMode Split_identifyMode(const char *string, QRencodeMode hint) +{ + unsigned char c, d; + unsigned int word; + + c = string[0]; + + if(c == '\0') return QR_MODE_NUL; + if(isdigit(c)) { + return QR_MODE_NUM; + } else if(isalnum(c)) { + return QR_MODE_AN; + } else if(hint == QR_MODE_KANJI) { + d = string[1]; + if(d != '\0') { + word = ((unsigned int)c << 8) | d; + if((word >= 0x8140 && word <= 0x9ffc) || (word >= 0xe040 && word <= 0xebbf)) { + return QR_MODE_KANJI; + } + } + } + + return QR_MODE_8; +} + +static int Split_eatNum(const char *string, QRinput *input, QRencodeMode hint); +static int Split_eatAn(const char *string, QRinput *input, QRencodeMode hint); +static int Split_eat8(const char *string, QRinput *input, QRencodeMode hint); +static int Split_eatKanji(const char *string, QRinput *input, QRencodeMode hint); + +static int Split_eatNum(const char *string, QRinput *input,QRencodeMode hint) +{ + const char *p; + int ret; + int run; + int dif; + int ln; + QRencodeMode mode; + + ln = QRspec_lengthIndicator(QR_MODE_NUM, input->version); + + p = string; + while(isdigit(*p)) { + p++; + } + run = p - string; + mode = Split_identifyMode(p, hint); + if(mode == QR_MODE_8) { + dif = QRinput_estimateBitsModeNum(run) + 4 + ln + + QRinput_estimateBitsMode8(1) /* + 4 + l8 */ + - QRinput_estimateBitsMode8(run + 1) /* - 4 - l8 */; + if(dif > 0) { + return Split_eat8(string, input, hint); + } + } + if(mode == QR_MODE_AN) { + dif = QRinput_estimateBitsModeNum(run) + 4 + ln + + QRinput_estimateBitsModeAn(1) /* + 4 + la */ + - QRinput_estimateBitsModeAn(run + 1) /* - 4 - la */; + if(dif > 0) { + return Split_eatAn(string, input, hint); + } + } + + ret = QRinput_append(input, QR_MODE_NUM, run, (unsigned char *)string); + if(ret < 0) return -1; + + return run; +} + +static int Split_eatAn(const char *string, QRinput *input, QRencodeMode hint) +{ + const char *p, *q; + int ret; + int run; + int dif; + int la, ln; + + la = QRspec_lengthIndicator(QR_MODE_AN, input->version); + ln = QRspec_lengthIndicator(QR_MODE_NUM, input->version); + + p = string; + while(isalnum(*p)) { + if(isdigit(*p)) { + q = p; + while(isdigit(*q)) { + q++; + } + dif = QRinput_estimateBitsModeAn(p - string) /* + 4 + la */ + + QRinput_estimateBitsModeNum(q - p) + 4 + ln + - QRinput_estimateBitsModeAn(q - string) /* - 4 - la */; + if(dif < 0) { + break; + } else { + p = q; + } + } else { + p++; + } + } + + run = p - string; + + if(*p && !isalnum(*p)) { + dif = QRinput_estimateBitsModeAn(run) + 4 + la + + QRinput_estimateBitsMode8(1) /* + 4 + l8 */ + - QRinput_estimateBitsMode8(run + 1) /* - 4 - l8 */; + if(dif > 0) { + return Split_eat8(string, input, hint); + } + } + + ret = QRinput_append(input, QR_MODE_AN, run, (unsigned char *)string); + if(ret < 0) return -1; + + return run; +} + +static int Split_eatKanji(const char *string, QRinput *input, QRencodeMode hint) +{ + const char *p; + int ret; + int run; + + p = string; + while(Split_identifyMode(p, hint) == QR_MODE_KANJI) { + p += 2; + } + run = p - string; + ret = QRinput_append(input, QR_MODE_KANJI, run, (unsigned char *)string); + if(ret < 0) return -1; + + return run; +} + +static int Split_eat8(const char *string, QRinput *input, QRencodeMode hint) +{ + const char *p, *q; + QRencodeMode mode; + int ret; + int run; + int dif; + int la, ln; + + la = QRspec_lengthIndicator(QR_MODE_AN, input->version); + ln = QRspec_lengthIndicator(QR_MODE_NUM, input->version); + + p = string + 1; + while(*p != '\0') { + mode = Split_identifyMode(p, hint); + if(mode == QR_MODE_KANJI) { + break; + } + if(mode == QR_MODE_NUM) { + q = p; + while(isdigit(*q)) { + q++; + } + dif = QRinput_estimateBitsMode8(p - string) /* + 4 + l8 */ + + QRinput_estimateBitsModeNum(q - p) + 4 + ln + - QRinput_estimateBitsMode8(q - string) /* - 4 - l8 */; + if(dif < 0) { + break; + } else { + p = q; + } + } else if(mode == QR_MODE_AN) { + q = p; + while(isalnum(*q)) { + q++; + } + dif = QRinput_estimateBitsMode8(p - string) /* + 4 + l8 */ + + QRinput_estimateBitsModeAn(q - p) + 4 + la + - QRinput_estimateBitsMode8(q - string) /* - 4 - l8 */; + if(dif < 0) { + break; + } else { + p = q; + } + } else { + p++; + } + } + + run = p - string; + ret = QRinput_append(input, QR_MODE_8, run, (unsigned char *)string); + if(ret < 0) return -1; + + return run; +} + +static int Split_splitString(const char *string, QRinput *input, + QRencodeMode hint) +{ + int length; + QRencodeMode mode; + + if(*string == '\0') return 0; + + mode = Split_identifyMode(string, hint); + if(mode == QR_MODE_NUM) { + length = Split_eatNum(string, input, hint); + } else if(mode == QR_MODE_AN) { + length = Split_eatAn(string, input, hint); + } else if(mode == QR_MODE_KANJI && hint == QR_MODE_KANJI) { + length = Split_eatKanji(string, input, hint); + } else { + length = Split_eat8(string, input, hint); + } + if(length == 0) return 0; + if(length < 0) return -1; + return Split_splitString(&string[length], input, hint); +} + +static char *dupAndToUpper(const char *str, QRencodeMode hint) +{ + char *newstr, *p; + QRencodeMode mode; + + newstr = strdup(str); + if(newstr == NULL) return NULL; + + p = newstr; + while(*p != '\0') { + mode = Split_identifyMode(p, hint); + if(mode == QR_MODE_KANJI) { + p += 2; + } else { + if (*p >= 'a' && *p <= 'z') { + *p = (char)((int)*p - 32); + } + p++; + } + } + + return newstr; +} + +int Split_splitStringToQRinput(const char *string, QRinput *input, + QRencodeMode hint, int casesensitive) +{ + char *newstr; + int ret; + + if(string == NULL || *string == '\0') { + errno = EINVAL; + return -1; + } + if(!casesensitive) { + newstr = dupAndToUpper(string, hint); + if(newstr == NULL) return -1; + ret = Split_splitString(newstr, input, hint); + free(newstr); + } else { + ret = Split_splitString(string, input, hint); + } + + return ret; +} diff --git a/qrencode-3.1.0/split.h b/qrencode-3.1.0/split.h new file mode 100644 index 00000000..6a495e49 --- /dev/null +++ b/qrencode-3.1.0/split.h @@ -0,0 +1,47 @@ +/* + * qrencode - QR Code encoder + * + * Input data splitter. + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __SPLIT_H__ +#define __SPLIT_H__ + +#include "qrencode.h" + +/** + * Split the input string (null terminated) into QRinput. + * @param string input string + * @param hint give QR_MODE_KANJI if the input string contains Kanji character encoded in Shift-JIS. If not, give QR_MODE_8. + * @param casesensitive 0 for case-insensitive encoding (all alphabet characters are replaced to UPPER-CASE CHARACTERS. + * @retval 0 success. + * @retval -1 an error occurred. errno is set to indicate the error. See + * Exceptions for the details. + * @throw EINVAL invalid input object. + * @throw ENOMEM unable to allocate memory for input objects. + */ +extern int Split_splitStringToQRinput(const char *string, QRinput *input, + QRencodeMode hint, int casesensitive); + +#endif /* __SPLIT_H__ */ diff --git a/qrencode-3.1.0/tests/Makefile.am b/qrencode-3.1.0/tests/Makefile.am new file mode 100644 index 00000000..d43b4af0 --- /dev/null +++ b/qrencode-3.1.0/tests/Makefile.am @@ -0,0 +1,47 @@ +if HAVE_SDL +sdlPROGRAMS = view_qrcode +endif + +noinst_PROGRAMS = test_qrinput test_bitstream test_estimatebit \ + test_qrspec test_rs test_qrencode prof_qrencode \ + test_split test_monkey create_frame_pattern \ + $(sdlPROGRAMS) + +EXTRA_DIST = frame + +test_qrinput_SOURCES = test_qrinput.c common.h +test_qrinput_LDADD = ../libqrencode.la + +test_bitstream_SOURCES = test_bitstream.c common.h +test_bitstream_LDADD = ../libqrencode.la + +test_estimatebit_SOURCES = test_estimatebit.c common.h +test_estimatebit_LDADD = ../libqrencode.la + +test_qrspec_SOURCES = test_qrspec.c common.h +test_qrspec_LDADD = ../libqrencode.la + +test_rs_SOURCES = test_rs.c common.h +test_rs_LDADD = ../libqrencode.la + +test_qrencode_SOURCES = test_qrencode.c common.h +test_qrencode_LDADD = ../libqrencode.la + +test_split_SOURCES = test_split.c common.h +test_split_LDADD = ../libqrencode.la + +test_monkey_SOURCES = test_monkey.c common.h +test_monkey_LDADD = ../libqrencode.la + +prof_qrencode_SOURCES = prof_qrencode.c +prof_qrencode_LDADD = ../libqrencode.la + +create_frame_pattern_SOURCES = create_frame_pattern.c +create_frame_pattern_CFLAGS = $(png_CFLAGS) +create_frame_pattern_LDADD = ../libqrencode.la $(png_LIBS) + +if HAVE_SDL +view_qrcode_SOURCES = view_qrcode.c common.h +view_qrcode_CFLAGS= $(SDL_CFLAGS) +view_qrcode_LDADD = ../libqrencode.la $(SDL_LIBS) +endif diff --git a/qrencode-3.1.0/tests/Makefile.in b/qrencode-3.1.0/tests/Makefile.in new file mode 100644 index 00000000..4580407f --- /dev/null +++ b/qrencode-3.1.0/tests/Makefile.in @@ -0,0 +1,599 @@ +# Makefile.in generated by automake 1.10.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +noinst_PROGRAMS = test_qrinput$(EXEEXT) test_bitstream$(EXEEXT) \ + test_estimatebit$(EXEEXT) test_qrspec$(EXEEXT) \ + test_rs$(EXEEXT) test_qrencode$(EXEEXT) prof_qrencode$(EXEEXT) \ + test_split$(EXEEXT) test_monkey$(EXEEXT) \ + create_frame_pattern$(EXEEXT) $(am__EXEEXT_1) +subdir = tests +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +@HAVE_SDL_TRUE@am__EXEEXT_1 = view_qrcode$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am_create_frame_pattern_OBJECTS = \ + create_frame_pattern-create_frame_pattern.$(OBJEXT) +create_frame_pattern_OBJECTS = $(am_create_frame_pattern_OBJECTS) +am__DEPENDENCIES_1 = +create_frame_pattern_DEPENDENCIES = ../libqrencode.la \ + $(am__DEPENDENCIES_1) +create_frame_pattern_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(create_frame_pattern_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_prof_qrencode_OBJECTS = prof_qrencode.$(OBJEXT) +prof_qrencode_OBJECTS = $(am_prof_qrencode_OBJECTS) +prof_qrencode_DEPENDENCIES = ../libqrencode.la +am_test_bitstream_OBJECTS = test_bitstream.$(OBJEXT) +test_bitstream_OBJECTS = $(am_test_bitstream_OBJECTS) +test_bitstream_DEPENDENCIES = ../libqrencode.la +am_test_estimatebit_OBJECTS = test_estimatebit.$(OBJEXT) +test_estimatebit_OBJECTS = $(am_test_estimatebit_OBJECTS) +test_estimatebit_DEPENDENCIES = ../libqrencode.la +am_test_monkey_OBJECTS = test_monkey.$(OBJEXT) +test_monkey_OBJECTS = $(am_test_monkey_OBJECTS) +test_monkey_DEPENDENCIES = ../libqrencode.la +am_test_qrencode_OBJECTS = test_qrencode.$(OBJEXT) +test_qrencode_OBJECTS = $(am_test_qrencode_OBJECTS) +test_qrencode_DEPENDENCIES = ../libqrencode.la +am_test_qrinput_OBJECTS = test_qrinput.$(OBJEXT) +test_qrinput_OBJECTS = $(am_test_qrinput_OBJECTS) +test_qrinput_DEPENDENCIES = ../libqrencode.la +am_test_qrspec_OBJECTS = test_qrspec.$(OBJEXT) +test_qrspec_OBJECTS = $(am_test_qrspec_OBJECTS) +test_qrspec_DEPENDENCIES = ../libqrencode.la +am_test_rs_OBJECTS = test_rs.$(OBJEXT) +test_rs_OBJECTS = $(am_test_rs_OBJECTS) +test_rs_DEPENDENCIES = ../libqrencode.la +am_test_split_OBJECTS = test_split.$(OBJEXT) +test_split_OBJECTS = $(am_test_split_OBJECTS) +test_split_DEPENDENCIES = ../libqrencode.la +am__view_qrcode_SOURCES_DIST = view_qrcode.c common.h +@HAVE_SDL_TRUE@am_view_qrcode_OBJECTS = \ +@HAVE_SDL_TRUE@ view_qrcode-view_qrcode.$(OBJEXT) +view_qrcode_OBJECTS = $(am_view_qrcode_OBJECTS) +@HAVE_SDL_TRUE@view_qrcode_DEPENDENCIES = ../libqrencode.la \ +@HAVE_SDL_TRUE@ $(am__DEPENDENCIES_1) +view_qrcode_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(view_qrcode_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/use/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(create_frame_pattern_SOURCES) $(prof_qrencode_SOURCES) \ + $(test_bitstream_SOURCES) $(test_estimatebit_SOURCES) \ + $(test_monkey_SOURCES) $(test_qrencode_SOURCES) \ + $(test_qrinput_SOURCES) $(test_qrspec_SOURCES) \ + $(test_rs_SOURCES) $(test_split_SOURCES) \ + $(view_qrcode_SOURCES) +DIST_SOURCES = $(create_frame_pattern_SOURCES) \ + $(prof_qrencode_SOURCES) $(test_bitstream_SOURCES) \ + $(test_estimatebit_SOURCES) $(test_monkey_SOURCES) \ + $(test_qrencode_SOURCES) $(test_qrinput_SOURCES) \ + $(test_qrspec_SOURCES) $(test_rs_SOURCES) \ + $(test_split_SOURCES) $(am__view_qrcode_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAJOR_VERSION = @MAJOR_VERSION@ +MAKEINFO = @MAKEINFO@ +MICRO_VERSION = @MICRO_VERSION@ +MINOR_VERSION = @MINOR_VERSION@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +png_CFLAGS = @png_CFLAGS@ +png_LIBS = @png_LIBS@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@HAVE_SDL_TRUE@sdlPROGRAMS = view_qrcode +EXTRA_DIST = frame +test_qrinput_SOURCES = test_qrinput.c common.h +test_qrinput_LDADD = ../libqrencode.la +test_bitstream_SOURCES = test_bitstream.c common.h +test_bitstream_LDADD = ../libqrencode.la +test_estimatebit_SOURCES = test_estimatebit.c common.h +test_estimatebit_LDADD = ../libqrencode.la +test_qrspec_SOURCES = test_qrspec.c common.h +test_qrspec_LDADD = ../libqrencode.la +test_rs_SOURCES = test_rs.c common.h +test_rs_LDADD = ../libqrencode.la +test_qrencode_SOURCES = test_qrencode.c common.h +test_qrencode_LDADD = ../libqrencode.la +test_split_SOURCES = test_split.c common.h +test_split_LDADD = ../libqrencode.la +test_monkey_SOURCES = test_monkey.c common.h +test_monkey_LDADD = ../libqrencode.la +prof_qrencode_SOURCES = prof_qrencode.c +prof_qrencode_LDADD = ../libqrencode.la +create_frame_pattern_SOURCES = create_frame_pattern.c +create_frame_pattern_CFLAGS = $(png_CFLAGS) +create_frame_pattern_LDADD = ../libqrencode.la $(png_LIBS) +@HAVE_SDL_TRUE@view_qrcode_SOURCES = view_qrcode.c common.h +@HAVE_SDL_TRUE@view_qrcode_CFLAGS = $(SDL_CFLAGS) +@HAVE_SDL_TRUE@view_qrcode_LDADD = ../libqrencode.la $(SDL_LIBS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +create_frame_pattern$(EXEEXT): $(create_frame_pattern_OBJECTS) $(create_frame_pattern_DEPENDENCIES) + @rm -f create_frame_pattern$(EXEEXT) + $(create_frame_pattern_LINK) $(create_frame_pattern_OBJECTS) $(create_frame_pattern_LDADD) $(LIBS) +prof_qrencode$(EXEEXT): $(prof_qrencode_OBJECTS) $(prof_qrencode_DEPENDENCIES) + @rm -f prof_qrencode$(EXEEXT) + $(LINK) $(prof_qrencode_OBJECTS) $(prof_qrencode_LDADD) $(LIBS) +test_bitstream$(EXEEXT): $(test_bitstream_OBJECTS) $(test_bitstream_DEPENDENCIES) + @rm -f test_bitstream$(EXEEXT) + $(LINK) $(test_bitstream_OBJECTS) $(test_bitstream_LDADD) $(LIBS) +test_estimatebit$(EXEEXT): $(test_estimatebit_OBJECTS) $(test_estimatebit_DEPENDENCIES) + @rm -f test_estimatebit$(EXEEXT) + $(LINK) $(test_estimatebit_OBJECTS) $(test_estimatebit_LDADD) $(LIBS) +test_monkey$(EXEEXT): $(test_monkey_OBJECTS) $(test_monkey_DEPENDENCIES) + @rm -f test_monkey$(EXEEXT) + $(LINK) $(test_monkey_OBJECTS) $(test_monkey_LDADD) $(LIBS) +test_qrencode$(EXEEXT): $(test_qrencode_OBJECTS) $(test_qrencode_DEPENDENCIES) + @rm -f test_qrencode$(EXEEXT) + $(LINK) $(test_qrencode_OBJECTS) $(test_qrencode_LDADD) $(LIBS) +test_qrinput$(EXEEXT): $(test_qrinput_OBJECTS) $(test_qrinput_DEPENDENCIES) + @rm -f test_qrinput$(EXEEXT) + $(LINK) $(test_qrinput_OBJECTS) $(test_qrinput_LDADD) $(LIBS) +test_qrspec$(EXEEXT): $(test_qrspec_OBJECTS) $(test_qrspec_DEPENDENCIES) + @rm -f test_qrspec$(EXEEXT) + $(LINK) $(test_qrspec_OBJECTS) $(test_qrspec_LDADD) $(LIBS) +test_rs$(EXEEXT): $(test_rs_OBJECTS) $(test_rs_DEPENDENCIES) + @rm -f test_rs$(EXEEXT) + $(LINK) $(test_rs_OBJECTS) $(test_rs_LDADD) $(LIBS) +test_split$(EXEEXT): $(test_split_OBJECTS) $(test_split_DEPENDENCIES) + @rm -f test_split$(EXEEXT) + $(LINK) $(test_split_OBJECTS) $(test_split_LDADD) $(LIBS) +view_qrcode$(EXEEXT): $(view_qrcode_OBJECTS) $(view_qrcode_DEPENDENCIES) + @rm -f view_qrcode$(EXEEXT) + $(view_qrcode_LINK) $(view_qrcode_OBJECTS) $(view_qrcode_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_frame_pattern-create_frame_pattern.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prof_qrencode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bitstream.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_estimatebit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_monkey.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_qrencode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_qrinput.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_qrspec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_split.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view_qrcode-view_qrcode.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +create_frame_pattern-create_frame_pattern.o: create_frame_pattern.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(create_frame_pattern_CFLAGS) $(CFLAGS) -MT create_frame_pattern-create_frame_pattern.o -MD -MP -MF $(DEPDIR)/create_frame_pattern-create_frame_pattern.Tpo -c -o create_frame_pattern-create_frame_pattern.o `test -f 'create_frame_pattern.c' || echo '$(srcdir)/'`create_frame_pattern.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/create_frame_pattern-create_frame_pattern.Tpo $(DEPDIR)/create_frame_pattern-create_frame_pattern.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='create_frame_pattern.c' object='create_frame_pattern-create_frame_pattern.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(create_frame_pattern_CFLAGS) $(CFLAGS) -c -o create_frame_pattern-create_frame_pattern.o `test -f 'create_frame_pattern.c' || echo '$(srcdir)/'`create_frame_pattern.c + +create_frame_pattern-create_frame_pattern.obj: create_frame_pattern.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(create_frame_pattern_CFLAGS) $(CFLAGS) -MT create_frame_pattern-create_frame_pattern.obj -MD -MP -MF $(DEPDIR)/create_frame_pattern-create_frame_pattern.Tpo -c -o create_frame_pattern-create_frame_pattern.obj `if test -f 'create_frame_pattern.c'; then $(CYGPATH_W) 'create_frame_pattern.c'; else $(CYGPATH_W) '$(srcdir)/create_frame_pattern.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/create_frame_pattern-create_frame_pattern.Tpo $(DEPDIR)/create_frame_pattern-create_frame_pattern.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='create_frame_pattern.c' object='create_frame_pattern-create_frame_pattern.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(create_frame_pattern_CFLAGS) $(CFLAGS) -c -o create_frame_pattern-create_frame_pattern.obj `if test -f 'create_frame_pattern.c'; then $(CYGPATH_W) 'create_frame_pattern.c'; else $(CYGPATH_W) '$(srcdir)/create_frame_pattern.c'; fi` + +view_qrcode-view_qrcode.o: view_qrcode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(view_qrcode_CFLAGS) $(CFLAGS) -MT view_qrcode-view_qrcode.o -MD -MP -MF $(DEPDIR)/view_qrcode-view_qrcode.Tpo -c -o view_qrcode-view_qrcode.o `test -f 'view_qrcode.c' || echo '$(srcdir)/'`view_qrcode.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/view_qrcode-view_qrcode.Tpo $(DEPDIR)/view_qrcode-view_qrcode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='view_qrcode.c' object='view_qrcode-view_qrcode.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(view_qrcode_CFLAGS) $(CFLAGS) -c -o view_qrcode-view_qrcode.o `test -f 'view_qrcode.c' || echo '$(srcdir)/'`view_qrcode.c + +view_qrcode-view_qrcode.obj: view_qrcode.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(view_qrcode_CFLAGS) $(CFLAGS) -MT view_qrcode-view_qrcode.obj -MD -MP -MF $(DEPDIR)/view_qrcode-view_qrcode.Tpo -c -o view_qrcode-view_qrcode.obj `if test -f 'view_qrcode.c'; then $(CYGPATH_W) 'view_qrcode.c'; else $(CYGPATH_W) '$(srcdir)/view_qrcode.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/view_qrcode-view_qrcode.Tpo $(DEPDIR)/view_qrcode-view_qrcode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='view_qrcode.c' object='view_qrcode-view_qrcode.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(view_qrcode_CFLAGS) $(CFLAGS) -c -o view_qrcode-view_qrcode.obj `if test -f 'view_qrcode.c'; then $(CYGPATH_W) 'view_qrcode.c'; else $(CYGPATH_W) '$(srcdir)/view_qrcode.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + +# 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/qrencode-3.1.0/tests/common.h b/qrencode-3.1.0/tests/common.h new file mode 100644 index 00000000..6156c7cb --- /dev/null +++ b/qrencode-3.1.0/tests/common.h @@ -0,0 +1,199 @@ +/* + * common part of test units. + */ + +#ifndef __COMMON_H__ +#define __COMMON_H__ + +#include +#include "../qrencode.h" +#include "../qrinput.h" +#include "../bitstream.h" +#include "../qrencode_inner.h" + +#define testStart(__arg__) (testStartReal(__func__, __arg__)) +#define testEndExp(__arg__) (testEnd(!(__arg__))) + +static int tests = 0; +static int failed = 0; +static int assertionFailed = 0; +static int assertionNum = 0; +static const char *testName = NULL; +static const char *testFunc = NULL; +char levelChar[4] = {'L', 'M', 'Q', 'H'}; +const char *modeStr[5] = {"nm", "an", "8", "kj", "st"}; + +void printQRinput(QRinput *input) +{ + QRinput_List *list; + unsigned char *p; + int i; + + list = input->head; + while(list != NULL) { + p = list->data; + for(i=0; isize; i++) { + printf("0x%02x,", list->data[i]); + } + list = list->next; + } + printf("\n"); +} + +void printQRinputInfo(QRinput *input) +{ + QRinput_List *list; + BitStream *b; + int i; + + printf("QRinput info:\n"); + printf(" version: %d\n", input->version); + printf(" level : %c\n", levelChar[input->level]); + list = input->head; + i = 0; + while(list != NULL) { + i++; + list = list->next; + } + printf(" chunks: %d\n", i); + b = QRinput_mergeBitStream(input); + if(b != NULL) { + printf(" bitstream-size: %d\n", BitStream_size(b)); + BitStream_free(b); + } + + list = input->head; + i = 0; + while(list != NULL) { + printf("\t#%d: mode = %s, size = %d\n", i, modeStr[list->mode], list->size); + i++; + list = list->next; + } +} + +void testStartReal(const char *func, const char *name) +{ + tests++; + testName = name; + testFunc = func; + assertionFailed = 0; + assertionNum = 0; + printf("_____%d: %s: %s...\n", tests, func, name); +} + +void testEnd(int result) +{ + printf(".....%d: %s: %s, ", tests, testFunc, testName); + if(result) { + puts("FAILED."); + failed++; + } else { + puts("PASSED."); + } +} + +#define assert_exp(__exp__, ...) \ +{assertionNum++;if(!(__exp__)) {assertionFailed++; printf(__VA_ARGS__);}} + +#define assert_zero(__exp__, ...) assert_exp((__exp__) == 0, __VA_ARGS__) +#define assert_nonzero(__exp__, ...) assert_exp((__exp__) != 0, __VA_ARGS__) +#define assert_null(__ptr__, ...) assert_exp((__ptr__) == NULL, __VA_ARGS__) +#define assert_nonnull(__ptr__, ...) assert_exp((__ptr__) != NULL, __VA_ARGS__) +#define assert_equal(__e1__, __e2__, ...) assert_exp((__e1__) == (__e2__), __VA_ARGS__) +#define assert_notequal(__e1__, __e2__, ...) assert_exp((__e1__) != (__e2__), __VA_ARGS__) +#define assert_nothing(__exp__, ...) {printf(__VA_ARGS__); __exp__;} + +void testFinish(void) +{ + printf(".....%d: %s: %s, ", tests, testFunc, testName); + if(assertionFailed) { + printf("FAILED. (%d assertions failed.)\n", assertionFailed); + failed++; + } else { + printf("PASSED. (%d assertions passed.)\n", assertionNum); + } +} + +void report() +{ + printf("Total %d tests, %d fails.\n", tests, failed); + if(failed) exit(-1); +} + +int ncmpBin(char *correct, BitStream *bstream, int len) +{ + int i, bit; + + if(len != BitStream_size(bstream)) { + printf("Length is not match: %d, %d expected.\n", BitStream_size(bstream), len); + return -1; + } + + for(i=0; idata[i] != bit) return -1; + } + + return 0; +} + +int cmpBin(char *correct, BitStream *bstream) +{ + int len; + + len = strlen(correct); + return ncmpBin(correct, bstream, len); +} + +char *sprintfBin(int size, unsigned char *data) +{ + int i, j; + unsigned char mask; + int b, r; + char *str, *p; + + str = (char *)malloc(size + 1); + p = str; + b = size / 8; + for(i=0; i> 1; + } + } + r = size - b * 8; + if(r) { + mask = 1 << (r - 1); + for(i=0; i> 1; + } + } + *p = '\0'; + + return str; +} + +static char qrModeChar[4] = {'n', 'a', '8', 'k'}; +void printQrinput(QRinput *input) +{ + QRinput_List *list; + + list = input->head; + while(list != NULL) { + printf("%c(%d)\n", qrModeChar[list->mode], list->size); + list = list->next; + } +} +#endif /* __COMMON_H__ */ diff --git a/qrencode-3.1.0/tests/create_frame_pattern.c b/qrencode-3.1.0/tests/create_frame_pattern.c new file mode 100644 index 00000000..786309fe --- /dev/null +++ b/qrencode-3.1.0/tests/create_frame_pattern.c @@ -0,0 +1,170 @@ +/* + * This tool creates a frame pattern data for debug purpose used by + * test_qrspec. test_qrspec and create_frame_pattern uses the same function + * of libqrencode. This means the test is meaningless if test_qrspec is run + * with a pattern data created by create_frame_pattern of the same version. + * In order to test it correctly, create a pattern data by the tool of the + * previous version, or use the frame data attached to the package. + */ + +#include +#include +#include +#include "common.h" +#include "../qrspec.h" + +void append_pattern(int version, FILE *fp) +{ + int width; + unsigned char *frame; + + frame = QRspec_newFrame(version); + width = QRspec_getWidth(version); + fwrite(frame, 1, width * width, fp); + free(frame); +} + +static int writePNG(unsigned char *frame, int width, const char *outfile) +{ + static FILE *fp; + png_structp png_ptr; + png_infop info_ptr; + unsigned char *row, *p, *q; + int x, y, xx, yy, bit; + int realwidth; + const int margin = 0; + const int size = 1; + + realwidth = (width + margin * 2) * size; + row = (unsigned char *)malloc((realwidth + 7) / 8); + if(row == NULL) { + fprintf(stderr, "Failed to allocate memory.\n"); + exit(EXIT_FAILURE); + } + + if(outfile[0] == '-' && outfile[1] == '\0') { + fp = stdout; + } else { + fp = fopen(outfile, "wb"); + if(fp == NULL) { + fprintf(stderr, "Failed to create file: %s\n", outfile); + perror(NULL); + exit(EXIT_FAILURE); + } + } + + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if(png_ptr == NULL) { + fclose(fp); + fprintf(stderr, "Failed to initialize PNG writer.\n"); + exit(EXIT_FAILURE); + } + + info_ptr = png_create_info_struct(png_ptr); + if(info_ptr == NULL) { + fclose(fp); + fprintf(stderr, "Failed to initialize PNG write.\n"); + exit(EXIT_FAILURE); + } + + if(setjmp(png_jmpbuf(png_ptr))) { + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(fp); + fprintf(stderr, "Failed to write PNG image.\n"); + exit(EXIT_FAILURE); + } + + png_init_io(png_ptr, fp); + png_set_IHDR(png_ptr, info_ptr, + realwidth, realwidth, + 1, + PNG_COLOR_TYPE_GRAY, + PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_DEFAULT, + PNG_FILTER_TYPE_DEFAULT); + png_write_info(png_ptr, info_ptr); + + /* top margin */ + memset(row, 0xff, (realwidth + 7) / 8); + for(y=0; y +#include +#include +#include +#include +#include "../qrencode.h" +#include "../qrspec.h" +#include "../rscode.h" + +struct timeval tv; +void timerStart(const char *str) +{ + printf("%s: START\n", str); + gettimeofday(&tv, NULL); +} + +void timerStop(void) +{ + struct timeval tc; + + gettimeofday(&tc, NULL); + printf("STOP: %ld msec\n", (tc.tv_sec - tv.tv_sec) * 1000 + + (tc.tv_usec - tv.tv_usec) / 1000); +} + +void prof_ver1to10(void) +{ + QRcode *code; + int i; + int version; + static const char *data = "This is test."; + + timerStart("Version 1 - 10 (500 symbols for each)"); + for(i=0; i<500; i++) { + for(version = 0; version < 11; version++) { + code = QRcode_encodeString(data, version, QR_ECLEVEL_L, QR_MODE_8, 0); + if(code == NULL) { + perror("Failed to encode:"); + } else { + QRcode_free(code); + } + } + } + timerStop(); +} + +void prof_ver31to40(void) +{ + QRcode *code; + int i; + int version; + static const char *data = "This is test."; + + timerStart("Version 31 - 40 (50 symbols for each)"); + for(i=0; i<50; i++) { + for(version = 31; version < 41; version++) { + code = QRcode_encodeString(data, version, QR_ECLEVEL_L, QR_MODE_8, 0); + if(code == NULL) { + perror("Failed to encode:"); + } else { + QRcode_free(code); + } + } + } + timerStop(); +} + +int main() +{ + prof_ver1to10(); + prof_ver31to40(); + + QRspec_clearCache(); + free_rs_cache(); + + return 0; +} diff --git a/qrencode-3.1.0/tests/test_all.sh b/qrencode-3.1.0/tests/test_all.sh new file mode 100755 index 00000000..c71f28d8 --- /dev/null +++ b/qrencode-3.1.0/tests/test_all.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e +./test_bitstream +./test_estimatebit +./test_qrencode +./test_qrinput +./test_qrspec +./test_rs +./test_split +./test_monkey diff --git a/qrencode-3.1.0/tests/test_bitstream.c b/qrencode-3.1.0/tests/test_bitstream.c new file mode 100644 index 00000000..8c853777 --- /dev/null +++ b/qrencode-3.1.0/tests/test_bitstream.c @@ -0,0 +1,150 @@ +#include +#include +#include "common.h" +#include "../bitstream.h" + +void test_null(void) +{ + BitStream *bstream; + + testStart("Empty stream"); + bstream = BitStream_new(); + assert_zero(BitStream_size(bstream), "Size of empty BitStream is not 0."); + assert_null(BitStream_toByte(bstream), "BitStream_toByte returned non-NULL."); + assert_nothing(BitStream_free(NULL), "Check BitStream_free(NULL).\n"); + testFinish(); + + BitStream_free(bstream); +} + +void test_num(void) +{ + BitStream *bstream; + unsigned int data = 0x13579bdf; + char correct[] = "0010011010101111001101111011111"; + + testStart("New from num"); + bstream = BitStream_new(); + BitStream_appendNum(bstream, 31, data); + testEnd(cmpBin(correct, bstream)); + + BitStream_free(bstream); +} + +void test_bytes(void) +{ + BitStream *bstream; + unsigned char data[1] = {0x3a}; + char correct[] = "00111010"; + + testStart("New from bytes"); + bstream = BitStream_new(); + BitStream_appendBytes(bstream, 1, data); + testEnd(cmpBin(correct, bstream)); + BitStream_free(bstream); +} + +void test_appendNum(void) +{ + BitStream *bstream; + char correct[] = "10001010111111111111111100010010001101000101011001111000"; + + testStart("Append Num"); + bstream = BitStream_new(); + + BitStream_appendNum(bstream, 8, 0x0000008a); + assert_zero(ncmpBin(correct, bstream, 8), "Internal data is incorrect."); + + BitStream_appendNum(bstream, 16, 0x0000ffff); + assert_zero(ncmpBin(correct, bstream, 24), "Internal data is incorrect."); + + BitStream_appendNum(bstream, 32, 0x12345678); + + assert_zero(cmpBin(correct, bstream), "Internal data is incorrect."); + testFinish(); + + BitStream_free(bstream); +} + +void test_appendBytes(void) +{ + BitStream *bstream; + unsigned char data[8]; + char correct[] = "10001010111111111111111100010010001101000101011001111000"; + + testStart("Append Bytes"); + bstream = BitStream_new(); + + data[0] = 0x8a; + BitStream_appendBytes(bstream, 1, data); + assert_zero(ncmpBin(correct, bstream, 8), "Internal data is incorrect."); + + data[0] = 0xff; + data[1] = 0xff; + BitStream_appendBytes(bstream, 2, data); + assert_zero(ncmpBin(correct, bstream, 24), "Internal data is incorrect."); + + data[0] = 0x12; + data[1] = 0x34; + data[2] = 0x56; + data[3] = 0x78; + BitStream_appendBytes(bstream, 4, data); + + assert_zero(cmpBin(correct, bstream), "Internal data is incorrect."); + testFinish(); + + BitStream_free(bstream); +} + +void test_toByte(void) +{ + BitStream *bstream; + unsigned char correct[] = { + 0x8a, 0xff, 0xff, 0x12, 0x34, 0x56, 0x78 + }; + unsigned char *result; + + testStart("Convert to a byte array"); + bstream = BitStream_new(); + + BitStream_appendBytes(bstream, 1, &correct[0]); + BitStream_appendBytes(bstream, 2, &correct[1]); + BitStream_appendBytes(bstream, 4, &correct[3]); + + result = BitStream_toByte(bstream); + testEnd(memcmp(correct, result, 7)); + + BitStream_free(bstream); + free(result); +} + +void test_size(void) +{ + BitStream *bstream; + + testStart("size check"); + bstream = BitStream_new(); + assert_equal(BitStream_size(bstream), 0, "Initialized BitStream is not 0 length"); + BitStream_appendNum(bstream, 1, 0); + assert_equal(BitStream_size(bstream), 1, "Size incorrect. (first append)"); + BitStream_appendNum(bstream, 2, 0); + assert_equal(BitStream_size(bstream), 3, "Size incorrect. (second append)"); + testFinish(); + + BitStream_free(bstream); +} + +int main(int argc, char **argv) +{ + test_null(); + test_num(); + test_bytes(); + test_appendNum(); + test_appendBytes(); + test_toByte(); + test_size(); + + report(); + + return 0; +} diff --git a/qrencode-3.1.0/tests/test_estimatebit.c b/qrencode-3.1.0/tests/test_estimatebit.c new file mode 100644 index 00000000..4e65eb63 --- /dev/null +++ b/qrencode-3.1.0/tests/test_estimatebit.c @@ -0,0 +1,158 @@ +#include +#include +#include +#include "common.h" +#include "../qrinput.h" + +QRinput *gstream; + +void test_numbit(void) +{ + QRinput *stream; + char num[9]="01234567"; + int bits; + + testStart("Estimation of Numeric stream (8 digits)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); + bits = QRinput_estimateBitStreamSize(stream, 0); + testEndExp(bits == 41); + + QRinput_append(gstream, QR_MODE_NUM, 8, (unsigned char *)num); + QRinput_free(stream); +} + +void test_numbit2(void) +{ + QRinput *stream; + char num[17]="0123456789012345"; + int bits; + + testStart("Estimation of Numeric stream (16 digits)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_NUM, 16, (unsigned char *)num); + bits = QRinput_estimateBitStreamSize(stream, 0); + testEndExp(bits == 68); + + QRinput_append(gstream, QR_MODE_NUM, 16, (unsigned char *)num); + QRinput_free(stream); +} + +void test_numbit3(void) +{ + QRinput *stream; + char *num; + int bits; + + testStart("Estimation of Numeric stream (400 digits)"); + stream = QRinput_new(); + num = (char *)malloc(401); + memset(num, '1', 400); + num[400] = '\0'; + QRinput_append(stream, QR_MODE_NUM, 400, (unsigned char *)num); + bits = QRinput_estimateBitStreamSize(stream, 0); + /* 4 + 10 + 133*10 + 4 = 1348 */ + testEndExp(bits == 1348); + + QRinput_append(gstream, QR_MODE_NUM, 400, (unsigned char *)num); + QRinput_free(stream); + free(num); +} + +void test_an(void) +{ + QRinput *stream; + char str[6]="AC-42"; + int bits; + + testStart("Estimation of Alphabet-Numeric stream (5 chars)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_AN, 5, (unsigned char *)str); + bits = QRinput_estimateBitStreamSize(stream, 0); + testEndExp(bits == 41); + + QRinput_append(gstream, QR_MODE_AN, 5, (unsigned char *)str); + QRinput_free(stream); +} + +void test_8(void) +{ + QRinput *stream; + char str[9]="12345678"; + int bits; + + testStart("Estimation of 8 bit data stream (8 bytes)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_8, 8, (unsigned char *)str); + bits = QRinput_estimateBitStreamSize(stream, 0); + testEndExp(bits == 76); + + QRinput_append(gstream, QR_MODE_8, 8, (unsigned char *)str); + QRinput_free(stream); +} + +void test_structure(void) +{ + QRinput *stream; + int bits; + + testStart("Estimation of a structure-append header"); + stream = QRinput_new(); + QRinput_insertStructuredAppendHeader(stream, 10, 1, 0); + bits = QRinput_estimateBitStreamSize(stream, 1); + testEndExp(bits == 20); + + QRinput_insertStructuredAppendHeader(gstream, 10, 1, 0); + QRinput_free(stream); +} + +void test_kanji(void) +{ + int res; + + QRinput *stream; + unsigned char str[4]= {0x93, 0x5f,0xe4, 0xaa}; + int bits; + + testStart("Estimation of Kanji stream (2 chars)"); + stream = QRinput_new(); + res = QRinput_append(stream, QR_MODE_KANJI, 4, (unsigned char *)str); + if(res < 0) { + printf("Failed to add.\n"); + testEnd(1); + } else { + bits = QRinput_estimateBitStreamSize(stream, 0); + testEndExp(bits == 38); + QRinput_append(gstream, QR_MODE_KANJI, 4, (unsigned char *)str); + } + + QRinput_free(stream); +} + +void test_mix(void) +{ + int bits; + + testStart("Estimation of Mixed stream"); + bits = QRinput_estimateBitStreamSize(gstream, 0); + testEndExp(bits == (41 + 68 + 1348 + 41 + 76 + 38 + 20)); + QRinput_free(gstream); +} + +int main(int argc, char **argv) +{ + gstream = QRinput_new(); + + test_numbit(); + test_numbit2(); + test_numbit3(); + test_an(); + test_8(); + test_kanji(); + test_structure(); + test_mix(); + + report(); + + return 0; +} diff --git a/qrencode-3.1.0/tests/test_monkey.c b/qrencode-3.1.0/tests/test_monkey.c new file mode 100644 index 00000000..8986fe72 --- /dev/null +++ b/qrencode-3.1.0/tests/test_monkey.c @@ -0,0 +1,326 @@ +#include +#include +#include +#include "common.h" +#include "../qrinput.h" +#include "../split.h" +#include "../qrspec.h" +#include "../rscode.h" + +#define MAX_LENGTH 7091 +static char data[MAX_LENGTH]; +static char check[MAX_LENGTH]; + +static const char *AN = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"; + +#define drand(__scale__) ((__scale__) * (double)rand() / ((double)RAND_MAX + 1.0)) + +int fill8bitData(void) +{ + int len, i; + + len = 1 + (int)drand((MAX_LENGTH - 2)); + for(i=0; ihead; + i = 0; + while(list != NULL) { + memcpy(check + i, list->data, list->size); + i += list->size; + list = list->next; + } + if(i != len) { + printf("#%d: length is not correct. (%d should be %d)\n", num, i, len); + } + + check[i] = '\0'; + ret = memcmp(data, check, len); + if(ret != 0) { + printf("#%d: data mismatched.\n", num); + list = input->head; + i = 0; + while(list != NULL) { + ret = memcmp(data + i, list->data, list->size); + printf("wrong chunk:\n"); + printf(" position: %d\n", i); + printf(" mode : %d\n", list->mode); + printf(" size : %d\n", list->size); + printf(" data : %.*s\n", list->size, list->data); + i += list->size; + list = list->next; + } + exit(1); + } + QRinput_free(input); +} + +void monkey_split_an(int loop) +{ + int i; + + puts("Monkey test: Split_splitStringToQRinput() - AlphaNumeric string."); + srand(0); + for(i=0; ihead; + i = 0; + while(list != NULL) { + memcpy(check + i, list->data, list->size); + i += list->size; + list = list->next; + } + if(i != len) { + printf("#%d: length is not correct. (%d should be %d)\n", num, i, len); + } + + check[i] = '\0'; + ret = memcmp(data, check, len); + if(ret != 0) { + printf("#%d: data mismatched.\n", num); + list = input->head; + i = 0; + while(list != NULL) { + ret = memcmp(data + i, list->data, list->size); + printf("wrong chunk:\n"); + printf(" position: %d\n", i); + printf(" mode : %d\n", list->mode); + printf(" size : %d\n", list->size); + printf(" data : %.*s\n", list->size, list->data); + i += list->size; + list = list->next; + } + exit(1); + } + QRinput_free(input); +} + +void monkey_split_8(int loop) +{ + int i; + + puts("Monkey test: Split_splitStringToQRinput() - 8bit char string."); + srand(0); + for(i=0; ihead; + i = 0; + while(list != NULL) { + memcpy(check + i, list->data, list->size); + i += list->size; + list = list->next; + } + if(i != len) { + printf("#%d: length is not correct. (%d should be %d)\n", num, i, len); + } + + check[i] = '\0'; + ret = memcmp(data, check, len); + if(ret != 0) { + printf("#%d: data mismatched.\n", num); + list = input->head; + i = 0; + while(list != NULL) { + ret = memcmp(data + i, list->data, list->size); + printf("wrong chunk:\n"); + printf(" position: %d\n", i); + printf(" mode : %d\n", list->mode); + printf(" size : %d\n", list->size); + printf(" data : %.*s\n", list->size, list->data); + i += list->size; + list = list->next; + } + exit(1); + } + QRinput_free(input); +} + +void monkey_split_kanji(int loop) +{ + int i; + + puts("Monkey test: Split_splitStringToQRinput() - kanji string."); + srand(0); + for(i=0; ihead; + i = 0; + while(il != NULL) { + if(il->input->version != version) { + printf("Test: version %d, level %c\n", version, levelChar[level]); + printf("wrong version number.\n"); + printQRinputInfo(il->input); + exit(1); + } + i++; + il = il->next; + } + codes = QRcode_encodeInputStructured(s); + if(codes == NULL) { + perror("test_split_structure aborted at QRcode_encodeInputStructured():"); + QRinput_free(input); + QRinput_Struct_free(s); + return; + } + list = codes; + il = s->head; + c = 0; + while(list != NULL) { + if(list->code->version != version) { + printf("#%d: data mismatched.\n", num); + printf("Test: version %d, level %c\n", version, levelChar[level]); + printf("code #%d\n", c); + printf("Version mismatch: %d should be %d\n", list->code->version, version); + printf("max bits: %d\n", QRspec_getDataLength(version, level) * 8 - 20); + printQRinputInfo(il->input); + printQRinput(input); + exit(1); + } + list = list->next; + il = il->next; + c++; + } + + QRinput_free(input); + QRinput_Struct_free(s); + QRcode_List_free(codes); +} + +void monkey_split_structure(int loop) +{ + int i; + + puts("Monkey test: QRinput_splitQRinputToStruct."); + srand(0); + for(i=0; i +#include +#include "common.h" +#include "../qrencode_inner.h" +#include "../qrspec.h" +#include "../qrinput.h" +#include "../mask.h" +#include "../rscode.h" + +int inputSize(QRinput *input) +{ + BitStream *bstream; + int size; + + bstream = QRinput_mergeBitStream(input); + size = BitStream_size(bstream); + BitStream_free(bstream); + + return size; +} + +void test_iterate() +{ + int i; + QRinput *stream; + char num[9] = "01234567"; + unsigned char *data; + QRRawCode *raw; + int err = 0; + + testStart("Test getCode (1-L)"); + stream = QRinput_new(); + QRinput_setVersion(stream, 1); + QRinput_setErrorCorrectionLevel(stream, QR_ECLEVEL_L); + QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); + + raw = QRraw_new(stream); + data = raw->datacode; + for(i=0; idataLength; i++) { + if(data[i] != QRraw_getCode(raw)) { + err++; + } + } + + QRinput_free(stream); + QRraw_free(raw); + testEnd(err); +} + +void test_iterate2() +{ + int i; + QRinput *stream; + char num[9] = "01234567"; + QRRawCode *raw; + int err = 0; + unsigned char correct[] = { + 0x10, 0x11, 0xec, 0xec, 0x20, 0xec, 0x11, 0x11, + 0x0c, 0x11, 0xec, 0xec, 0x56, 0xec, 0x11, 0x11, + 0x61, 0x11, 0xec, 0xec, 0x80, 0xec, 0x11, 0x11, + 0xec, 0x11, 0xec, 0xec, 0x11, 0xec, 0x11, 0x11, + 0xec, 0x11, 0xec, 0xec, 0x11, 0xec, 0x11, 0x11, + 0xec, 0x11, 0xec, 0xec, 0x11, 0x11, + 0x5c, 0xde, 0x68, 0x68, 0x4d, 0xb3, 0xdb, 0xdb, + 0xd5, 0x14, 0xe1, 0xe1, 0x5b, 0x2a, 0x1f, 0x1f, + 0x49, 0xc4, 0x78, 0x78, 0xf7, 0xe0, 0x5b, 0x5b, + 0xc3, 0xa7, 0xc1, 0xc1, 0x5d, 0x9a, 0xea, 0xea, + 0x48, 0xad, 0x9d, 0x9d, 0x58, 0xb3, 0x3f, 0x3f, + 0x10, 0xdb, 0xbf, 0xbf, 0xeb, 0xec, 0x05, 0x05, + 0x98, 0x35, 0x83, 0x83, 0xa9, 0x95, 0xa6, 0xa6, + 0xea, 0x7b, 0x8d, 0x8d, 0x04, 0x3c, 0x08, 0x08, + 0x64, 0xce, 0x3e, 0x3e, 0x4d, 0x9b, 0x30, 0x30, + 0x4e, 0x65, 0xd6, 0xd6, 0xe4, 0x53, 0x2c, 0x2c, + 0x46, 0x1d, 0x2e, 0x2e, 0x29, 0x16, 0x27, 0x27 + }; + + testStart("Test getCode (5-H)"); + stream = QRinput_new(); + QRinput_setVersion(stream, 5); + QRinput_setErrorCorrectionLevel(stream, QR_ECLEVEL_H); + QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); + + raw = QRraw_new(stream); + for(i=0; idataLength; i++) { + if(correct[i] != QRraw_getCode(raw)) { + err++; + } + } + + QRinput_free(stream); + QRraw_free(raw); + testEnd(err); +} + +#if 0 +void print_filler(void) +{ + int width; + int x, y; + int version = 5; + unsigned char *frame; + + width = QRspec_getWidth(version); + frame = FrameFiller_fillerTest(version); + + for(y=0; y 5)] & 1; + if(decode & 1) b1++; + } + for(i=0; i<7; i++) { + decode = decode << 1; + decode |= frame[width * ((6 - i) + (i < 1)) + 8] & 1; + if(decode & 1) b1++; + } + if(decode != format) { + printf("Upper-left format information is invalid.\n"); + printf("%08x, %08x\n", format, decode); + testEnd(1); + return; + } + decode = 0; + for(i=0; i<7; i++) { + decode = decode << 1; + decode |= frame[width * (width - 1 - i) + 8] & 1; + if(decode & 1) b1++; + } + for(i=0; i<8; i++) { + decode = decode << 1; + decode |= frame[width * 8 + width - 8 + i] & 1; + if(decode & 1) b1++; + } + if(decode != format) { + printf("Bottom and right format information is invalid.\n"); + printf("%08x, %08x\n", format, decode); + testEnd(1); + return; + } + + if(b2 != blacks || b1 != b2) { + printf("Number of dark modules is incorrect.\n"); + printf("Return value: %d, dark modules in frame: %d, should be: %d\n", blacks, b1, b2); + testEnd(1); + return; + } + + free(frame); + + testEnd(0); +} + +#define N1 (3) +#define N2 (3) +#define N3 (40) +#define N4 (10) + +void test_eval(void) +{ + unsigned char *frame; + int w = 6; + int demerit; + + frame = (unsigned char *)malloc(w * w); + + testStart("Test mask evaluation (all white)"); + memset(frame, 0, w * w); + demerit = Mask_evaluateSymbol(w, frame); + testEndExp(demerit == ((N1 + 1)*w*2 + N2 * (w - 1) * (w - 1))); + + testStart("Test mask evaluation (all black)"); + memset(frame, 1, w * w); + demerit = Mask_evaluateSymbol(w, frame); + testEndExp(demerit == ((N1 + 1)*w*2 + N2 * (w - 1) * (w - 1))); + + free(frame); +} + +/* .#.#.#.#.# + * #.#.#.#.#. + * ..##..##.. + * ##..##..## + * ...###...# + * ###...###. + * ....####.. + * ####....## + * .....##### + * #####..... + */ +void test_eval2(void) +{ + unsigned char *frame; + int w = 10; + int demerit; + int x; + + frame = (unsigned char *)malloc(w * w); + + testStart("Test mask evaluation (run length penalty check)"); + for(x=0; xwidth; + frame = qrcode->data; + for(y=0; y> (20-x)) & 1) != (frame[y*w+x]&1)) { + printf("Diff in mask=%d (%d,%d)\n", mask, x, y); + err++; + } + } + } + QRcode_free(qrcode); + } + QRinput_free(stream); + testEnd(err); +} + +void test_encode2(void) +{ + QRcode *qrcode; + + testStart("Test encode (2-H) (no padding test)"); + qrcode = QRcode_encodeString("abcdefghijk123456789012", 0, QR_ECLEVEL_H, QR_MODE_8, 0); + testEndExp(qrcode->version == 2); + QRcode_free(qrcode); +} + +void test_encode3(void) +{ + QRcode *code1, *code2; + QRinput *input; + + testStart("Compare encodeString and encodeInput"); + code1 = QRcode_encodeString("0123456", 0, QR_ECLEVEL_L, QR_MODE_8, 0); + input = QRinput_new2(0, QR_ECLEVEL_L); + QRinput_append(input, QR_MODE_NUM, 7, (unsigned char *)"0123456"); + code2 = QRcode_encodeInput(input); + testEnd(memcmp(code1->data, code2->data, code1->width * code1->width)); + + QRcode_free(code1); + QRcode_free(code2); + QRinput_free(input); +} + +void test_encodeNull(void) +{ + QRcode *qrcode; + + testStart("Test encode NULL."); + qrcode = QRcode_encodeString(NULL, 0, QR_ECLEVEL_H, QR_MODE_8, 0); + assert_null(qrcode, "QRcode_encodeString() returned something.\n"); + testFinish(); + if(qrcode != NULL) QRcode_free(qrcode); +} + + +void test_encodeEmpty(void) +{ + QRcode *qrcode; + + testStart("Test encode an empty string."); + qrcode = QRcode_encodeString("", 0, QR_ECLEVEL_H, QR_MODE_8, 0); + assert_null(qrcode, "QRcode_encodeString() returned something.\n"); + testFinish(); + if(qrcode != NULL) QRcode_free(qrcode); +} + +void test_encodeNull8(void) +{ + QRcode *qrcode; + + testStart("Test encode NULL."); + qrcode = QRcode_encodeString8bit(NULL, 0, QR_ECLEVEL_H); + assert_null(qrcode, "QRcode_encodeString8bit() returned something.\n"); + testFinish(); + if(qrcode != NULL) QRcode_free(qrcode); +} + + +void test_encodeEmpty8(void) +{ + QRcode *qrcode; + + testStart("Test encode an empty string."); + qrcode = QRcode_encodeString8bit("", 0, QR_ECLEVEL_H); + assert_null(qrcode, "QRcode_encodeString8bit() returned something.\n"); + testFinish(); + if(qrcode != NULL) QRcode_free(qrcode); +} + +void test_encodeTooLong(void) +{ + QRcode *code; + char *data; + + testStart("Encode too large data"); + data = (char *)malloc(4300); + memset(data, 'a', 4295); + memset(data + 4295, '0', 4); + data[4299] = '\0'; + + code = QRcode_encodeString(data, 0, QR_ECLEVEL_L, QR_MODE_8, 0); + testEndExp(code == NULL); + + if(code != NULL) { + printf("%d, %d\n", code->version, code->width); + QRcode_free(code); + } + free(data); +} + +void test_01234567(void) +{ + QRinput *stream; + char num[9] = "01234567"; + int i, err = 0; + QRcode *qrcode; + unsigned char correct[] = { +0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, 0x84, 0x03, 0x02, 0x03, 0x03, 0xc0, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, +0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, 0xc0, 0x84, 0x03, 0x03, 0x03, 0x03, 0xc0, 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, +0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x02, 0x02, 0x02, 0xc0, 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, +0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x03, 0x02, 0x02, 0x02, 0xc0, 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, +0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x03, 0x03, 0x03, 0xc0, 0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, +0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x02, 0x02, 0x03, 0xc0, 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, +0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, 0x91, 0x90, 0x91, 0x90, 0x91, 0xc0, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, +0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x85, 0x02, 0x02, 0x03, 0x03, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +0x85, 0x84, 0x85, 0x85, 0x85, 0x85, 0x91, 0x84, 0x84, 0x03, 0x02, 0x02, 0x03, 0x84, 0x85, 0x85, 0x85, 0x85, 0x85, 0x84, 0x84, +0x02, 0x02, 0x02, 0x03, 0x02, 0x03, 0x90, 0x03, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x02, 0x02, +0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x91, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, +0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x90, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, +0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x91, 0x03, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, +0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x81, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03, 0x03, 0x02, 0x02, +0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, 0x84, 0x03, 0x03, 0x02, 0x03, 0x02, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, +0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x02, 0x03, +0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x02, 0x02, +0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, +0xc1, 0xc0, 0xc1, 0xc1, 0xc1, 0xc0, 0xc1, 0xc0, 0x85, 0x02, 0x03, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02, +0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, 0xc0, 0x84, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x03, 0x03, 0x02, +0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, 0x85, 0x03, 0x03, 0x03, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x03, 0x02, 0x02}; + + testStart("Encode 01234567 in 1-M"); + stream = QRinput_new2(1, QR_ECLEVEL_M); + QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); + qrcode = QRcode_encodeInput(stream); + for(i=0; iwidth * qrcode->width; i++) { + if(qrcode->data[i] != correct[i]) { + err++; + } + } + testEnd(err); + QRinput_free(stream); + QRcode_free(qrcode); +} + +void print_01234567(void) +{ + QRinput *stream; + char num[9] = "01234567"; + unsigned char *frame; + int x, y, w; + QRcode *qrcode; + + stream = QRinput_new2(1, QR_ECLEVEL_M); + QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); + qrcode = QRcode_encodeInput(stream); + w = qrcode->width; + frame = qrcode->data; + for(y=0; yversion = -1; + input->level = QR_ECLEVEL_L; + code = QRcode_encodeInput(input); + assert_null(code, "invalid version(-1) was not checked.\n"); + if(code != NULL) QRcode_free(code); + + input->version = 41; + input->level = QR_ECLEVEL_L; + code = QRcode_encodeInput(input); + assert_null(code, "invalid version(41) access was not checked.\n"); + if(code != NULL) QRcode_free(code); + + input->version = 1; + input->level = (QRecLevel)(QR_ECLEVEL_H + 1); + code = QRcode_encodeInput(input); + assert_null(code, "invalid level(H+1) access was not checked.\n"); + if(code != NULL) QRcode_free(code); + + input->version = 1; + input->level = (QRecLevel)-1; + code = QRcode_encodeInput(input); + assert_null(code, "invalid level(-1) access was not checked.\n"); + if(code != NULL) QRcode_free(code); + + QRinput_free(input); + + testFinish(); +} + +void test_struct_semilong(void) +{ + QRcode_List *codes, *list; + const char *str = "asdfasdfasdfasdfasdfASDFASDASDFASDFAsdfasdfasdfasdASDFASDFADSADadsfasdf"; + int num, size; + + testStart("Testing semi-long structured-append symbols"); + codes = QRcode_encodeString8bitStructured(str, 1, QR_ECLEVEL_L); + list = codes; + num = 0; + while(list != NULL) { + num++; + assert_equal(list->code->version, 1, "version number is %d (1 expected)\n", list->code->version); + list = list->next; + } + size = QRcode_List_size(codes); + assert_equal(num, size, "QRcode_List_size returns wrong size?"); + QRcode_List_free(codes); + + codes = QRcode_encodeStringStructured(str, 1, QR_ECLEVEL_L, QR_MODE_8, 1); + list = codes; + num = 0; + while(list != NULL) { + num++; + assert_equal(list->code->version, 1, "version number is %d (1 expected)\n", list->code->version); + list = list->next; + } + size = QRcode_List_size(codes); + assert_equal(num, size, "QRcode_List_size returns wrong size?"); + QRcode_List_free(codes); + + testFinish(); +} + +void test_struct_example(void) +{ + QRcode_List *codes, *list; + const char *str = "an example of four Structured Append symbols,"; + int num; + + testStart("Testing the example of structured-append symbols"); + codes = QRcode_encodeString8bitStructured(str, 1, QR_ECLEVEL_M); + list = codes; + num = 0; + while(list != NULL) { + num++; + assert_equal(list->code->version, 1, "version number is %d (1 expected)\n", list->code->version); + list = list->next; + } + assert_equal(num, 4, "number of symbols is %d (4 expected).", num); + testFinish(); + QRcode_List_free(codes); +} + +void test_null_free(void) +{ + testStart("Testing free NULL pointers"); + assert_nothing(QRcode_free(NULL), "Check QRcode_free(NULL).\n"); + assert_nothing(QRcode_List_free(NULL), "Check QRcode_List_free(NULL).\n"); + assert_nothing(QRraw_free(NULL), "Check QRraw_free(NULL).\n"); + testFinish(); +} + +int main(int argc, char **argv) +{ + test_iterate(); + test_iterate2(); +// print_filler(); +// test_filler(); +// print_mask(); + test_format(); + test_eval(); + test_eval2(); + test_eval3(); + test_encode(); + test_encode2(); + test_encode3(); + test_encodeNull(); + test_encodeEmpty(); + test_encodeNull8(); + test_encodeEmpty8(); + test_encodeTooLong(); + test_01234567(); + test_invalid_input(); +// print_01234567(); + test_struct_example(); + test_struct_semilong(); + test_null_free(); + + QRspec_clearCache(); + free_rs_cache(); + + report(); + + return 0; +} diff --git a/qrencode-3.1.0/tests/test_qrinput.c b/qrencode-3.1.0/tests/test_qrinput.c new file mode 100644 index 00000000..b625ebd7 --- /dev/null +++ b/qrencode-3.1.0/tests/test_qrinput.c @@ -0,0 +1,835 @@ +#include +#include +#include +#include "common.h" +#include "../qrinput.h" +#include "../qrencode_inner.h" +#include "../split.h" + +void test_encodeKanji(void) +{ + QRinput *stream; + unsigned char str[4]= {0x93, 0x5f,0xe4, 0xaa}; + unsigned char *buf; + char correct[] = "10000000001001101100111111101010101010"; + BitStream *bstream; + + testStart("Encoding kanji stream."); + buf = (unsigned char *)malloc(4); + memcpy(buf, str, 4); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_KANJI, 4, buf); + bstream = QRinput_mergeBitStream(stream); + testEnd(cmpBin(correct, bstream)); + QRinput_free(stream); + BitStream_free(bstream); + free(buf); +} + +void test_encode8(void) +{ + QRinput *stream; + char str[] = "AC-42"; + char correct[] = "0100000001010100000101000011001011010011010000110010"; + BitStream *bstream; + + testStart("Encoding 8bit stream."); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_8, 5, (unsigned char *)str); + bstream = QRinput_mergeBitStream(stream); + testEnd(cmpBin(correct, bstream)); + QRinput_free(stream); + BitStream_free(bstream); +} + +void test_encode8_versionup(void) +{ + QRinput *stream; + BitStream *bstream; + char *str; + int version; + + testStart("Encoding 8bit stream. (auto-version up test)"); + str = (char *)malloc(2900); + memset(str, 0xff, 2900); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_8, 2900, (unsigned char *)str); + bstream = QRinput_mergeBitStream(stream); + version = QRinput_getVersion(stream); + assert_equal(version, 40, "Version is %d (40 expected).\n", version); + testFinish(); + QRinput_free(stream); + BitStream_free(bstream); + free(str); +} + +void test_encodeAn(void) +{ + QRinput *stream; + char str[] = "AC-42"; + char correct[] = "00100000001010011100111011100111001000010"; + BitStream *bstream; + + testStart("Encoding alphabet-numeric stream."); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_AN, 5, (unsigned char *)str); + bstream = QRinput_mergeBitStream(stream); + testEnd(cmpBin(correct, bstream)); + QRinput_free(stream); + BitStream_free(bstream); +} + +void test_encodeAn2(void) +{ + QRinput *stream; + char str[] = "!,;$%"; + int ret; + + testStart("Encoding INVALID alphabet-numeric stream."); + stream = QRinput_new(); + ret = QRinput_append(stream, QR_MODE_AN, 5, (unsigned char *)str); + testEnd(!ret); + QRinput_free(stream); +} + +void test_encodeNumeric(void) +{ + QRinput *stream; + char num[9] = "01234567"; + char correct[] = "00010000001000000000110001010110011000011"; + BitStream *bstream; + + testStart("Encoding numeric stream. (8 digits)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); + bstream = QRinput_mergeBitStream(stream); + testEnd(cmpBin(correct, bstream)); + QRinput_free(stream); + BitStream_free(bstream); +} + +void test_encodeNumeric_versionup(void) +{ + QRinput *stream; + BitStream *bstream; + char *str; + int version; + + testStart("Encoding numeric stream. (auto-version up test)"); + str = (char *)malloc(1050); + memset(str, '1', 1050); + stream = QRinput_new2(0, QR_ECLEVEL_L); + QRinput_append(stream, QR_MODE_NUM, 1050, (unsigned char *)str); + bstream = QRinput_mergeBitStream(stream); + version = QRinput_getVersion(stream); + assert_equal(version, 14, "Version is %d (14 expected).", version); + testFinish(); + QRinput_free(stream); + BitStream_free(bstream); + free(str); +} + +void test_encodeNumericPadded(void) +{ + QRinput *stream; + char num[9] = "01234567"; + char *correct; + char *correctHead = "000100000010000000001100010101100110000110000000"; + BitStream *bstream; + int flag, i; + + testStart("Encoding numeric stream. (8 digits)(padded)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)num); + bstream = QRinput_getBitStream(stream); + correct = (char *)malloc(19 * 8 + 1); + correct[0] = '\0'; + strcat(correct, correctHead); + for(i=0; i<13; i++) { + strcat(correct, (i&1)?"00010001":"11101100"); + } + flag = cmpBin(correct, bstream); + testEnd(flag); + + free(correct); + QRinput_free(stream); + BitStream_free(bstream); +} + +void test_encodeNumericPadded2(void) +{ + QRinput *stream; + char num[8] = "0123456"; + char *correct; + char *correctHead = "000100000001110000001100010101100101100000000000"; + BitStream *bstream; + int flag, i; + + testStart("Encoding numeric stream. (7 digits)(padded)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_NUM, 7, (unsigned char *)num); + bstream = QRinput_getBitStream(stream); + correct = (char *)malloc(19 * 8 + 1); + correct[0] = '\0'; + strcat(correct, correctHead); + for(i=0; i<13; i++) { + strcat(correct, (i&1)?"00010001":"11101100"); + } + flag = cmpBin(correct, bstream); + testEnd(flag); + + free(correct); + QRinput_free(stream); + BitStream_free(bstream); +} + +void test_padding(void) +{ + QRinput *input; + BitStream *bstream; + int i, size; + char data[] = "0123456789ABCDeFG"; + unsigned char c; + + testStart("Padding bit check. (less than 5 bits)"); + input = QRinput_new2(0, QR_ECLEVEL_L); + QRinput_append(input, QR_MODE_8, 17, (unsigned char *)data); + bstream = QRinput_getBitStream(input); + size = BitStream_size(bstream); + assert_equal(size, 152, "# of bit is incorrect (%d != 152).\n", size); + c = 0; + for(i=0; i<4; i++) { + c += bstream->data[size - i - 1]; + } + assert_zero(c, "Padding bits are not zero."); + testFinish(); + + QRinput_free(input); + BitStream_free(bstream); +} + +void test_padding2(void) +{ + QRinput *input; + BitStream *bstream; + int i, size, ret; + char data[] = "0123456789ABCDeF"; + char correct[153]; + unsigned char c; + + testStart("Padding bit check. (1 or 2 padding bytes)"); + + /* 16 byte data (4 bit terminator and 1 byte padding) */ + memset(correct, 0, 153); + memcpy(correct, "010000010000", 12); + for(size=0; size<16; size++) { + c = 0x80; + for(i=0; i<8; i++) { + correct[size * 8 + i + 12] = (data[size]&c)?'1':'0'; + c = c >> 1; + } + } + memcpy(correct + 140, "000011101100", 12); + + input = QRinput_new2(1, QR_ECLEVEL_L); + QRinput_append(input, QR_MODE_8, 16, (unsigned char *)data); + bstream = QRinput_getBitStream(input); + size = BitStream_size(bstream); + assert_equal(size, 152, "16byte: # of bit is incorrect (%d != 152).\n", size); + ret = ncmpBin(correct, bstream, 152); + assert_zero(ret, "Padding bits incorrect.\n"); + + QRinput_free(input); + BitStream_free(bstream); + + /* 15 byte data (4 bit terminator and 2 byte paddings) */ + + memcpy(correct, "010000001111", 12); + memcpy(correct + 132, "00001110110000010001", 20); + + input = QRinput_new2(1, QR_ECLEVEL_L); + QRinput_append(input, QR_MODE_8, 15, (unsigned char *)data); + bstream = QRinput_getBitStream(input); + size = BitStream_size(bstream); + assert_equal(size, 152, "15byte: # of bit is incorrect (%d != 152).\n", size); + ret = ncmpBin(correct, bstream, 152); + assert_zero(ret, "Padding bits incorrect.\n"); + + testFinish(); + + QRinput_free(input); + BitStream_free(bstream); +} + +void test_encodeNumeric2(void) +{ + QRinput *stream; + char num[] = "0123456789012345"; + char correct[] = "00010000010000000000110001010110011010100110111000010100111010100101"; + BitStream *bstream; + + testStart("Encoding numeric stream. (16 digits)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_NUM, 16, (unsigned char *)num); + bstream = QRinput_mergeBitStream(stream); + testEnd(cmpBin(correct, bstream)); + QRinput_free(stream); + BitStream_free(bstream); +} + +void test_encodeNumeric3(void) +{ + QRinput *stream; + char num[9] = "0123456"; + char correct[] = "0001""0000000111""0000001100""0101011001""0110"; + BitStream *bstream; + + testStart("Encoding numeric stream. (7 digits)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_NUM, 7, (unsigned char *)num); + bstream = QRinput_mergeBitStream(stream); + testEnd(cmpBin(correct, bstream)); + QRinput_free(stream); + BitStream_free(bstream); +} + +void test_encodeTooLong(void) +{ + QRinput *stream; + unsigned char *data; + BitStream *bstream; + + data = (unsigned char *)malloc(4297); + memset(data, 'A', 4297); + + testStart("Encoding long string. (4297 bytes of alphanumeric)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_AN, 4297, data); + bstream = QRinput_mergeBitStream(stream); + testEndExp(bstream == NULL); + QRinput_free(stream); + if(bstream != NULL) { + BitStream_free(bstream); + } + free(data); +} + +void test_encodeAnNum(void) +{ + QRinput *input; + BitStream *bstream; + + testStart("Bit length check of alpha-numeric stream. (11 + 12)"); + input = QRinput_new(); + QRinput_append(input, QR_MODE_AN, 11, (unsigned char *)"ABCDEFGHIJK"); + QRinput_append(input, QR_MODE_NUM, 12, (unsigned char *)"123456789012"); + bstream = QRinput_mergeBitStream(input); + testEndExp(BitStream_size(bstream) == 128); + QRinput_free(input); + BitStream_free(bstream); + + testStart("Bit length check of alphabet stream. (23)"); + input = QRinput_new(); + QRinput_append(input, QR_MODE_AN, 23, (unsigned char *)"ABCDEFGHIJK123456789012"); + bstream = QRinput_mergeBitStream(input); + testEndExp(BitStream_size(bstream) == 140); + QRinput_free(input); + BitStream_free(bstream); +} + +void test_struct_listop(void) +{ + QRinput_Struct *s; + QRinput *inputs[5]; + QRinput_InputList *l; + int i, ret; + + testStart("QRinput_Struct list operation test."); + s = QRinput_Struct_new(); + QRinput_Struct_setParity(s, 10); + assert_nonnull(s, "QRinput_Struct_new() failed."); + assert_equal(s->parity, 10, "QRinput_Struct_setParity() failed."); + + for(i=0; i<5; i++) { + inputs[i] = QRinput_new(); + QRinput_append(inputs[i], QR_MODE_AN, 5, (unsigned char *)"ABCDE"); + ret = QRinput_Struct_appendInput(s, inputs[i]); + } + assert_equal(ret, 5, "QRinput_Struct_appendInput() returns wrong num?"); + assert_equal(s->size, 5, "QRiput_Struct.size counts wrong number."); + + l = s->head; + i = 0; + while(l != NULL) { + assert_equal(l->input, inputs[i], "QRinput_Struct input list order would be wrong?"); + l = l->next; + i++; + } + + QRinput_Struct_free(s); + testFinish(); +} + +void test_insertStructuredAppendHeader(void) +{ + QRinput *stream; + char correct[] = "0011000011111010010101000000000101000001"; + BitStream *bstream; + int ret; + + testStart("Insert a structured-append header"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_8, 1, (unsigned char *)"A"); + ret = QRinput_insertStructuredAppendHeader(stream, 16, 1, 0xa5); + assert_zero(ret, "QRinput_insertStructuredAppendHeader() returns nonzero.\n"); + bstream = QRinput_mergeBitStream(stream); + assert_nonnull(bstream->data, "Bstream->data is null."); + assert_zero(cmpBin(correct, bstream), "bitstream is wrong."); + testFinish(); + + QRinput_free(stream); + BitStream_free(bstream); +} + +void test_insertStructuredAppendHeader_error(void) +{ + QRinput *stream; + int ret; + + testStart("Insert a structured-append header (errors expected)"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_8, 1, (unsigned char *)"A"); + ret = QRinput_insertStructuredAppendHeader(stream, 17, 1, 0xa5); + assert_equal(-1, ret, "QRinput_insertStructuredAppendHeader() returns 0."); + assert_equal(EINVAL, errno, "errno is not set correctly (%d returned).", errno); + ret = QRinput_insertStructuredAppendHeader(stream, 16, 17, 0xa5); + assert_equal(-1, ret, "QRinput_insertStructuredAppendHeader() returns 0."); + assert_equal(EINVAL, errno, "errno is not set correctly (%d returned).", errno); + ret = QRinput_insertStructuredAppendHeader(stream, 16, 0, 0xa5); + assert_equal(-1, ret, "QRinput_insertStructuredAppendHeader() returns 0."); + assert_equal(EINVAL, errno, "errno is not set correctly (%d returned).", errno); + testFinish(); + + QRinput_free(stream); +} + +void test_struct_insertStructuredAppendHeaders(void) +{ + QRinput *input; + QRinput_Struct *s; + QRinput_InputList *p; + int i; + + testStart("Insert structured-append headers to a QRinput_Struct."); + s = QRinput_Struct_new(); + for(i=0; i<10; i++) { + input = QRinput_new(); + QRinput_append(input, QR_MODE_8, 1, (unsigned char *)"A"); + QRinput_Struct_appendInput(s, input); + } + QRinput_Struct_insertStructuredAppendHeaders(s); + p = s->head; + i = 1; + while(p != NULL) { + assert_equal(p->input->head->mode, QR_MODE_STRUCTURE, "a structured-append header is not inserted."); + assert_equal(p->input->head->data[0], 10, "size of the structured-header is wrong: #%d, %d should be %d\n", i, p->input->head->data[0], 10); + assert_equal(p->input->head->data[1], i, "index of the structured-header is wrong: #%d, %d should be %d\n", i, p->input->head->data[1], i); + assert_equal(p->input->head->data[2], 0, "parity of the structured-header is wrong: #%d\n", i); + p = p->next; + i++; + } + testFinish(); + QRinput_Struct_free(s); +} + +static int check_lengthOfCode(QRencodeMode mode, char *data, int size, int version) +{ + QRinput *input; + BitStream *b; + int bits; + int bytes; + + input = QRinput_new(); + QRinput_setVersion(input, version); + QRinput_append(input, mode, size, (unsigned char *)data); + b = QRinput_mergeBitStream(input); + bits = BitStream_size(b); + bytes = QRinput_lengthOfCode(mode, version, bits); + QRinput_free(input); + BitStream_free(b); + + return bytes; +} + +void test_lengthOfCode_num(void) +{ + int i, bytes; + char *data; + + data = (char *)malloc(8000); + for(i=0; i<8000; i++) { + data[i] = '0' + i % 10; + } + + testStart("Checking length of code (numeric)"); + for(i=1; i<=9; i++) { + bytes = check_lengthOfCode(QR_MODE_NUM, data, i, 1); + assert_equal(i, bytes, "lengthOfCode failed. (QR_MODE_NUM, version:1, size:%d)\n", i); + } + for(i=1023; i<=1025; i++) { + bytes = check_lengthOfCode(QR_MODE_NUM, data, i, 1); + assert_equal(1023, bytes, "lengthOfCode failed. (QR_MODE_NUM, version:1, size:%d)\n", i); + } + testFinish(); + free(data); +} + +void test_lengthOfCode_kanji(void) +{ + int i, bytes; + unsigned char str[4]= {0x93, 0x5f,0xe4, 0xaa}; + + testStart("Checking length of code (kanji)"); + for(i=2; i<=4; i+=2) { + bytes = check_lengthOfCode(QR_MODE_KANJI, (char *)str, i, 1); + assert_equal(i, bytes, "lengthOfCode failed. (QR_MODE_KANJI, version:1, size:%d)\n", i); + } + testFinish(); +} + +void test_struct_split_example(void) +{ + QRinput *input; + QRinput_Struct *s; + QRinput_InputList *e; + QRinput_List *l; + const char *str[4] = { "an example ", "of four Str", "uctured Appe", "nd symbols,"}; + int i; + BitStream *bstream; + + testStart("Testing the example of structured-append symbols"); + s = QRinput_Struct_new(); + for(i=0; i<4; i++) { + input = QRinput_new2(1, QR_ECLEVEL_M); + QRinput_append(input, QR_MODE_8, strlen(str[i]), (unsigned char *)str[i]); + QRinput_Struct_appendInput(s, input); + } + QRinput_Struct_insertStructuredAppendHeaders(s); + e = s->head; + i = 0; + while(e != NULL) { + bstream = QRinput_mergeBitStream(e->input); + BitStream_free(bstream); + l = e->input->head->next; + assert_equal(l->mode, QR_MODE_8, "#%d: wrong mode (%d).\n", i, l->mode); + assert_equal(e->input->level, QR_ECLEVEL_M, "#%d: wrong level (%d).\n", i, e->input->level); + + e = e->next; + i++; + } + testFinish(); + QRinput_Struct_free(s); +} + +void test_struct_split_tooLarge(void) +{ + QRinput *input; + QRinput_Struct *s; + char *str; + int errsv; + + testStart("Testing structured-append symbols. (too large data)"); + str = (char *)malloc(128); + memset(str, 'a', 128); + input = QRinput_new2(1, QR_ECLEVEL_H); + QRinput_append(input, QR_MODE_8, 128, (unsigned char *)str); + s = QRinput_splitQRinputToStruct(input); + errsv = errno; + assert_null(s, "returns non-null."); + assert_equal(errsv, ERANGE, "did not return ERANGE."); + testFinish(); + if(s != NULL) QRinput_Struct_free(s); + QRinput_free(input); + free(str); +} + +void test_struct_split_invalidVersion(void) +{ + QRinput *input; + QRinput_Struct *s; + char *str; + int errsv; + + testStart("Testing structured-append symbols. (invalid version 0)"); + str = (char *)malloc(128); + memset(str, 'a', 128); + input = QRinput_new2(0, QR_ECLEVEL_H); + QRinput_append(input, QR_MODE_8, 128, (unsigned char *)str); + s = QRinput_splitQRinputToStruct(input); + errsv = errno; + assert_null(s, "returns non-null."); + assert_equal(errsv, ERANGE, "did not return ERANGE."); + testFinish(); + if(s != NULL) QRinput_Struct_free(s); + QRinput_free(input); + free(str); +} + +void test_splitentry(void) +{ + QRinput *i1, *i2; + QRinput_List *e; + const char *str = "abcdefghij"; + int size1, size2, i; + unsigned char *d1, *d2; + + testStart("Testing QRinput_splitEntry. (next == NULL)"); + i1 = QRinput_new(); + QRinput_append(i1, QR_MODE_8, strlen(str), (unsigned char *)str); + + i2 = QRinput_dup(i1); + e = i2->head; + + e = i2->head; + QRinput_splitEntry(e, 4); + + size1 = size2 = 0; + e = i1->head; + while(e != NULL) { + size1 += e->size; + e = e->next; + } + e = i2->head; + while(e != NULL) { + size2 += e->size; + e = e->next; + } + + d1 = (unsigned char *)malloc(size1); + e = i1->head; + i = 0; + while(e != NULL) { + memcpy(&d1[i], e->data, e->size); + i += e->size; + e = e->next; + } + d2 = (unsigned char *)malloc(size2); + e = i2->head; + i = 0; + while(e != NULL) { + memcpy(&d2[i], e->data, e->size); + i += e->size; + e = e->next; + } + + assert_equal(size1, size2, "sizes are different. (%d:%d)\n", size1, size2); + assert_equal(i2->head->size, 4, "split failed (first half)"); + assert_equal(i2->head->next->size, 6, "split failed(second half)"); + assert_zero(memcmp(d1, d2, size1), "strings are different."); + QRinput_free(i1); + QRinput_free(i2); + free(d1); + free(d2); + + testFinish(); +} + +void test_splitentry2(void) +{ + QRinput *i1, *i2; + QRinput_List *e; + const char *str = "abcdefghij"; + int size1, size2, i; + unsigned char *d1, *d2; + + testStart("Testing QRinput_splitEntry. (next != NULL)"); + i1 = QRinput_new(); + QRinput_append(i1, QR_MODE_8, strlen(str), (unsigned char *)str); + QRinput_append(i1, QR_MODE_8, strlen(str), (unsigned char *)str); + + i2 = QRinput_dup(i1); + e = i2->head; + + e = i2->head; + QRinput_splitEntry(e, 4); + + size1 = size2 = 0; + e = i1->head; + while(e != NULL) { + size1 += e->size; + e = e->next; + } + e = i2->head; + while(e != NULL) { + size2 += e->size; + e = e->next; + } + + d1 = (unsigned char *)malloc(size1); + e = i1->head; + i = 0; + while(e != NULL) { + memcpy(&d1[i], e->data, e->size); + i += e->size; + e = e->next; + } + d2 = (unsigned char *)malloc(size2); + e = i2->head; + i = 0; + while(e != NULL) { + memcpy(&d2[i], e->data, e->size); + i += e->size; + e = e->next; + } + + assert_equal(size1, size2, "sizes are different. (%d:%d)\n", size1, size2); + assert_equal(i2->head->size, 4, "split failed (first half)"); + assert_equal(i2->head->next->size, 6, "split failed(second half)"); + assert_zero(memcmp(d1, d2, size1), "strings are different."); + QRinput_free(i1); + QRinput_free(i2); + free(d1); + free(d2); + + testFinish(); +} + +void test_splitentry3(void) +{ + QRinput *input; + QRinput_Struct *s; + QRinput_List *e00, *e01, *e10, *e11; + QRinput_InputList *list; + const char *str = "abcdefghijklmno"; + + testStart("Testing QRinput_splitEntry. (does not split an entry)"); + /* version 1 symbol contains 152 bit (19 byte) data. + * 20 bits for a structured-append header, so 132 bits can be used. + * 15 bytes of 8-bit data is suitable for the symbol. + * (mode(4) + length(8) + data(120) == 132.) + */ + input = QRinput_new2(1, QR_ECLEVEL_L); + QRinput_append(input, QR_MODE_8, strlen(str), (unsigned char *)str); + QRinput_append(input, QR_MODE_8, strlen(str), (unsigned char *)str); + s = QRinput_splitQRinputToStruct(input); + list = s->head; + e00 = list->input->head; + e01 = e00->next; + list = list->next; + e10 = list->input->head; + e11 = e00->next; + + assert_equal(e00->mode, QR_MODE_STRUCTURE, "Structure header is missing?"); + assert_equal(e01->mode, QR_MODE_8, "no data?!"); + assert_null(e01->next, "Input list is not terminated!\n"); + assert_equal(e10->mode, QR_MODE_STRUCTURE, "Structure header is missing?"); + assert_equal(e11->mode, QR_MODE_8, "no data?!"); + assert_null(e11->next, "Input list is not terminated!\n"); + + QRinput_free(input); + QRinput_Struct_free(s); + testFinish(); +} + +void test_parity(void) +{ + QRinput *input; + QRinput_Struct *s; + const char *text = "an example of four Structured Append symbols,"; + const char *str[4] = { + "an example ", + "of four Str", + "uctured Appe", + "nd symbols,"}; + unsigned char p1, p2; + int i, len; + + testStart("Testing parity calc."); + s = QRinput_Struct_new(); + for(i=0; i<4; i++) { + input = QRinput_new2(1, QR_ECLEVEL_M); + QRinput_append(input, QR_MODE_8, strlen(str[i]), (unsigned char *)str[i]); + QRinput_Struct_appendInput(s, input); + } + QRinput_Struct_insertStructuredAppendHeaders(s); + p1 = s->parity; + + p2 = 0; + len = strlen(text); + for(i=0; iparity; + + p2 = 0; + len = strlen(text); + for(i=0; i +#include +#include "common.h" +#include "../qrspec.h" + +void print_eccTable(void) +{ + int i, j; + int ecc; + int data; + int spec[5]; + + for(i=1; i<=QRSPEC_VERSION_MAX; i++) { + printf("Version %2d\n", i); + for(j=0; j<4; j++) { + QRspec_getEccSpec(i, (QRecLevel)j, spec); + data = QRspec_rsBlockNum1(spec) * QRspec_rsDataCodes1(spec) + + QRspec_rsBlockNum2(spec) * QRspec_rsDataCodes2(spec); + ecc = QRspec_rsBlockNum1(spec) * QRspec_rsEccCodes1(spec) + + QRspec_rsBlockNum2(spec) * QRspec_rsEccCodes2(spec); + printf("%3d\t", ecc); + printf("%2d\t", QRspec_rsBlockNum1(spec)); + printf("(%3d, %3d, %3d)\n", + QRspec_rsDataCodes1(spec) + QRspec_rsEccCodes1(spec), + QRspec_rsDataCodes1(spec), + QRspec_rsEccCodes1(spec)); + if(QRspec_rsBlockNum2(spec) > 0) { + printf("\t%2d\t", QRspec_rsBlockNum2(spec)); + printf("(%3d, %3d, %3d)\n", + QRspec_rsDataCodes2(spec) + QRspec_rsEccCodes2(spec), + QRspec_rsDataCodes2(spec), + QRspec_rsEccCodes2(spec)); + } + } + } +} + +void test_eccTable(void) +{ + int i, j; + int ecc; + int data; + int err = 0; + int spec[5]; + + testStart("Checking ECC table."); + for(i=1; i<=QRSPEC_VERSION_MAX; i++) { + for(j=0; j<4; j++) { + QRspec_getEccSpec(i, (QRecLevel)j, spec); + data = QRspec_rsBlockNum1(spec) * QRspec_rsDataCodes1(spec) + + QRspec_rsBlockNum2(spec) * QRspec_rsDataCodes2(spec); + ecc = QRspec_rsBlockNum1(spec) * QRspec_rsEccCodes1(spec) + + QRspec_rsBlockNum2(spec) * QRspec_rsEccCodes2(spec); + if(data + ecc != QRspec_getDataLength(i, (QRecLevel)j) + QRspec_getECCLength(i, (QRecLevel)j)) { + printf("Error in version %d, level %d: invalid size\n", i, j); + printf("%d %d %d %d %d %d\n", spec[0], spec[1], spec[2], spec[3], spec[4], spec[2]); + err++; + } + if(ecc != QRspec_getECCLength(i, (QRecLevel)j)) { + printf("Error in version %d, level %d: invalid data\n", i, j); + printf("%d %d %d %d %d %d\n", spec[0], spec[1], spec[2], spec[3], spec[4], spec[2]); + err++; + } + } + } + testEnd(err); +} + +void test_eccTable2(void) +{ + int i; + int spec[5]; + + const int correct[7][6] = { + { 8, 1, 0, 2, 60, 38}, + { 8, 1, 1, 2, 61, 39}, + {24, 2, 0, 11, 54, 24}, + {24, 2, 1, 16, 55, 25}, + {32, 0, 0, 17, 145, 115}, + {40, 3, 0, 20, 45, 15}, + {40, 3, 1, 61, 46, 16}, + }; + + testStart("Checking ECC table(2)"); + for(i=0; i<7; i++) { + QRspec_getEccSpec(correct[i][0], (QRecLevel)correct[i][1], spec); + if(correct[i][2] == 0) { + assert_equal(QRspec_rsBlockNum1(spec), correct[i][3], + "Error in version %d, level %d. rsBlockNum1 was %d, expected %d.\n", + correct[i][0], correct[i][1], + QRspec_rsBlockNum1(spec), correct[i][3]); + assert_equal(QRspec_rsDataCodes1(spec) + QRspec_rsEccCodes1(spec), correct[i][4], + "Error in version %d, level %d. rsDataCodes1 + rsEccCodes1 was %d, expected %d.\n", + correct[i][0], correct[i][1], + QRspec_rsDataCodes1(spec) + QRspec_rsEccCodes1(spec), correct[i][4]); + assert_equal(QRspec_rsDataCodes1(spec), correct[i][5], + "Error in version %d, level %d. rsDataCodes1 was %d, expected %d.\n", + correct[i][0], correct[i][1], + QRspec_rsDataCodes1(spec), correct[i][5]); + } else { + assert_equal(QRspec_rsBlockNum2(spec), correct[i][3], + "Error in version %d, level %d. rsBlockNum2 was %d, expected %d.\n", + correct[i][0], correct[i][1], + QRspec_rsBlockNum2(spec), correct[i][3]); + assert_equal(QRspec_rsDataCodes2(spec) + QRspec_rsEccCodes2(spec), correct[i][4], + "Error in version %d, level %d. rsDataCodes2 + rsEccCodes2 was %d, expected %d.\n", + correct[i][0], correct[i][1], + QRspec_rsDataCodes2(spec) + QRspec_rsEccCodes2(spec), correct[i][4]); + assert_equal(QRspec_rsDataCodes2(spec), correct[i][5], + "Error in version %d, level %d. rsDataCodes2 was %d, expected %d.\n", + correct[i][0], correct[i][1], + QRspec_rsDataCodes2(spec), correct[i][5]); + } + } + testFinish(); +} + +void test_newframe(void) +{ + unsigned char buf[QRSPEC_WIDTH_MAX * QRSPEC_WIDTH_MAX]; + int i, width; + size_t len; + FILE *fp; + unsigned char *frame; + + testStart("Checking newly created frame."); + fp = fopen("frame", "rb"); + if(fp == NULL) { + perror("Failed to open \"frame\":"); + abort(); + } + for(i=1; i<=QRSPEC_VERSION_MAX; i++) { + frame = QRspec_newFrame(i); + width = QRspec_getWidth(i); + len = fread(buf, 1, width * width, fp); + if((int)len != width * width) { + perror("Failed to read the pattern file:"); + abort(); + } + assert_zero(memcmp(frame, buf, len), "frame pattern mismatch (version %d)\n", i); + free(frame); + } + + testFinish(); + fclose(fp); +} + +#if 0 +/* This test is used to check positions of alignment pattern. See Appendix E + * (pp.71) of JIS X0510:2004 and compare to the output. Before comment out + * this test, change the value of the pattern marker's center dot from 0xa1 + * to 0xb1 (QRspec_putAlignmentMarker() : finder). + */ +void test_alignment(void) +{ + unsigned char *frame; + int i, x, y, width, c; + + testStart("Checking alignment pattern."); + for(i=2; i<=QRSPEC_VERSION_MAX; i++) { + printf("%2d", i); + frame = QRspec_newFrame(i); + width = QRspec_getWidth(i); + c = 0; + for(x=0; x> 12) != (unsigned int)version) { + printf("Error in version %d.\n", version); + err++; + continue; + } + mask = 0x40; + for(i=0; mask != 0; i++) { + if(version & mask) break; + mask = mask >> 1; + } + c = 6 - i; + data = version << 12; + code = 0x1f25 << c; + mask = 0x40000 >> (6 - c); + for(i=0; i<=c; i++) { + if(mask & data) { + data ^= code; + } + code = code >> 1; + mask = mask >> 1; + } + data = (version << 12) | (data & 0xfff); + if(data != pattern) { + printf("Error in version %d\n", version); + err++; + } + } +} + +void print_newFrame(void) +{ + int width; + int x, y; + unsigned char *frame; + + frame = QRspec_newFrame(7); + width = QRspec_getWidth(7); + for(y=0; y> 1; + } + c = 4 - i; + code = 0x537 << c ; //10100110111 + b = 1 << (10 + c); + for(i=0; i<=c; i++) { + if(b & ecc) { + ecc ^= code; + } + code = code >> 1; + b = b >> 1; + } + + return (data | ecc) ^ 0x5412; +} + +void test_format(void) +{ + unsigned int format; + int i, j; + int err = 0; + + testStart("Format info test"); + for(i=0; i<4; i++) { + for(j=0; j<8; j++) { + format = calcFormatInfo(j, (QRecLevel)i); +// printf("0x%04x, ", format); + if(format != QRspec_getFormatInfo(j, (QRecLevel)i)) { + printf("Level %d, mask %x\n", i, j); + err++; + } + } +// printf("\n"); + } + testEnd(err); +} + +int main(int argc, char **argv) +{ + test_eccTable(); + test_eccTable2(); + //print_eccTable(); + test_newframe(); + //test_alignment(); + test_verpat(); + //print_newFrame(); + test_format(); + + QRspec_clearCache(); + + report(); + + return 0; +} diff --git a/qrencode-3.1.0/tests/test_rs.c b/qrencode-3.1.0/tests/test_rs.c new file mode 100644 index 00000000..60e9a487 --- /dev/null +++ b/qrencode-3.1.0/tests/test_rs.c @@ -0,0 +1,38 @@ +#include +#include +#include "common.h" +#include "../qrencode_inner.h" +#include "../qrinput.h" +#include "../rscode.h" + +/* See pp. 73 of JIS X0510:2004 */ +void test_rscode1(void) +{ + QRinput *stream; + QRRawCode *code; + static const char str[9] = "01234567"; + static unsigned char correct[26] = { + 0x10, 0x20, 0x0c, 0x56, 0x61, 0x80, 0xec, 0x11, 0xec, 0x11, 0xec, 0x11, + 0xec, 0x11, 0xec, 0x11, 0xa5, 0x24, 0xd4, 0xc1, 0xed, 0x36, 0xc7, 0x87, + 0x2c, 0x55}; + + testStart("RS ecc test"); + stream = QRinput_new(); + QRinput_append(stream, QR_MODE_NUM, 8, (unsigned char *)str); + QRinput_setErrorCorrectionLevel(stream, QR_ECLEVEL_M); + code = QRraw_new(stream); + + testEnd(memcmp(correct + 16, code->rsblock[0].ecc, 10)); + QRinput_free(stream); + QRraw_free(code); +} + +int main(int argc, char **argv) +{ + test_rscode1(); + + free_rs_cache(); + report(); + + return 0; +} diff --git a/qrencode-3.1.0/tests/test_split.c b/qrencode-3.1.0/tests/test_split.c new file mode 100644 index 00000000..4c28e171 --- /dev/null +++ b/qrencode-3.1.0/tests/test_split.c @@ -0,0 +1,414 @@ +#include +#include +#include +#include "common.h" +#include "../qrspec.h" +#include "../qrinput.h" +#include "../mask.h" +#include "../split.h" +#include "../bitstream.h" + +static int inputTest(QRinput_List *list, const char *fmt, ...) +{ + va_list ap; + int size; + QRencodeMode mode; + int i, err = 0; + + va_start(ap, fmt); + i = 1; + while(*fmt) { + if(list == NULL) { + err = 1; + break; + } + size = va_arg(ap, int); + if(list->size != size) { + err = 1; + break; + } + + switch(*fmt++) { + case 'n': + mode = QR_MODE_NUM; + break; + case 'a': + mode = QR_MODE_AN; + break; + case 'k': + mode = QR_MODE_KANJI; + break; + case '8': + mode = QR_MODE_8; + break; + default: + return -1; + break; + } + if(list->mode != mode) { + err = 1; + break; + } + list = list->next; + i++; + } + va_end(ap); + if(list != NULL) { + err = 1; + } + if(err) { + return -i; + } + return 0; +} + +int inputSize(QRinput *input) +{ + BitStream *bstream; + int size; + + bstream = QRinput_mergeBitStream(input); + size = BitStream_size(bstream); + BitStream_free(bstream); + + return size; +} + +void test_split1(void) +{ + QRinput *input; + BitStream *stream; + + testStart("Split test: null string"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("", input, QR_MODE_8, 0); + stream = QRinput_mergeBitStream(input); + testEndExp(BitStream_size(stream) == 0); + QRinput_free(input); + BitStream_free(stream); +} + +void test_split2(void) +{ + QRinput *input; + QRinput_List *list; + int err = 0; + + testStart("Split test: single typed strings (num)"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("0123", input, QR_MODE_8, 0); + list = input->head; + if(inputTest(list, "n", 4)) { + err++; + } + testEnd(err); + QRinput_free(input); + + err = 0; + testStart("Split test: single typed strings (num2)"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("12345678901234567890", input, QR_MODE_KANJI, 0); + list = input->head; + if(inputTest(list, "n", 20)) { + err++; + } + testEnd(err); + QRinput_free(input); +} + +void test_split3(void) +{ + QRinput *input; + QRinput_List *list; + int err = 0; + + testStart("Split test: single typed strings (an)"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("ab:-E", input, QR_MODE_8, 0); + list = input->head; + if(inputTest(list, "a", 5)) { + printQrinput(input); + err++; + } + testEnd(err); + QRinput_free(input); + + err = 0; + testStart("Split test: num + an"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("0123abcde", input, QR_MODE_KANJI, 0); + list = input->head; + if(inputTest(list, "a", 9)) { + err++; + } + testEnd(err); + QRinput_free(input); + + err = 0; + testStart("Split test: an + num + an"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("Ab345fg", input, QR_MODE_KANJI, 0); + list = input->head; + if(inputTest(list, "a", 7)) { + err++; + } + testEnd(err); + QRinput_free(input); +} + +void test_split4(void) +{ + QRinput *input; + QRinput *i1, *i2; + int s1, s2, size; +#define CHUNKA "ABCDEFGHIJK" +#define CHUNKB "123456" +#define CHUNKC "1234567" + + testStart("Split test: an and num entries"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput(CHUNKA/**/CHUNKB, input, QR_MODE_8, 0); + i1 = QRinput_new(); + QRinput_append(i1, QR_MODE_AN, 17, (unsigned char *)CHUNKA/**/CHUNKB); + i2 = QRinput_new(); + QRinput_append(i2, QR_MODE_AN, 11, (unsigned char *)CHUNKA); + QRinput_append(i2, QR_MODE_NUM, 6, (unsigned char *)CHUNKB); + + size = inputSize(input); + s1 = inputSize(i1); + s2 = inputSize(i2); + testEndExp(size == ((s1 < s2)?s1:s2)); + QRinput_free(input); + QRinput_free(i1); + QRinput_free(i2); + + testStart("Split test: num and an entries"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput(CHUNKB/**/CHUNKA, input, QR_MODE_8, 0); + i1 = QRinput_new(); + QRinput_append(i1, QR_MODE_AN, 17, (unsigned char *)CHUNKB/**/CHUNKA); + i2 = QRinput_new(); + QRinput_append(i2, QR_MODE_NUM, 6, (unsigned char *)CHUNKB); + QRinput_append(i2, QR_MODE_AN, 11, (unsigned char *)CHUNKA); + + size = inputSize(input); + s1 = inputSize(i1); + s2 = inputSize(i2); + testEndExp(size == ((s1 < s2)?s1:s2)); + QRinput_free(input); + QRinput_free(i1); + QRinput_free(i2); + + testStart("Split test: num and an entries (should be splitted)"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput(CHUNKC/**/CHUNKA, input, QR_MODE_8, 0); + i1 = QRinput_new(); + QRinput_append(i1, QR_MODE_AN, 18, (unsigned char *)CHUNKC/**/CHUNKA); + i2 = QRinput_new(); + QRinput_append(i2, QR_MODE_NUM, 7, (unsigned char *)CHUNKC); + QRinput_append(i2, QR_MODE_AN, 11, (unsigned char *)CHUNKA); + + size = inputSize(input); + s1 = inputSize(i1); + s2 = inputSize(i2); + testEndExp(size == ((s1 < s2)?s1:s2)); + QRinput_free(input); + QRinput_free(i1); + QRinput_free(i2); +} + +void test_split5(void) +{ + QRinput *input; + QRinput_List *list; + int err = 0; + + testStart("Split test: bit, an, bit, num"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("\x82\xd9""abcdeabcdea\x82\xb0""123456", input, QR_MODE_8, 0); + list = input->head; + if(inputTest(list, "8a8n", 2, 11, 2, 6)) { + err++; + } + testEnd(err); + QRinput_free(input); +} + +void test_split6(void) +{ + QRinput *input; + QRinput_List *list; + int err = 0; + + testStart("Split test: kanji, an, kanji, num"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("\x82\xd9""abcdeabcdea\x82\xb0""123456", input, QR_MODE_KANJI, 0); + list = input->head; + if(inputTest(list, "kakn", 2, 11, 2, 6)) { + printQrinput(input); + err++; + } + testEnd(err); + QRinput_free(input); +} + +void test_split7(void) +{ + QRinput *input; + QRinput_List *list; + int err = 0; + + testStart("Split test: an and num as bits"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("\x82\xd9""abcde\x82\xb0""12345", input, QR_MODE_8, 0); + list = input->head; + if(inputTest(list, "8n", 9, 5)) { + err++; + } + testEnd(err); + QRinput_free(input); +} + +void test_split8(void) +{ + QRinput *input; + QRinput_List *list; + int err = 0; + + testStart("Split test: terminated with a half of kanji code"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("\x82\xd9""abcdefgh\x82", input, QR_MODE_KANJI, 0); + list = input->head; + if(inputTest(list, "ka8", 2, 8, 1)) { + err++; + } + testEnd(err); + QRinput_free(input); +} + +void test_split3c(void) +{ + QRinput *input; + QRinput_List *list; + int err = 0; + + testStart("Split test: single typed strings (an, case-sensitive)"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("ab:-E", input, QR_MODE_8, 1); + list = input->head; + if(inputTest(list, "8", 5)) { + err++; + } + testEnd(err); + QRinput_free(input); + + err = 0; + testStart("Split test: num + an"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("0123abcde", input, QR_MODE_KANJI, 1); + list = input->head; + if(inputTest(list, "n8", 4, 5)) { + err++; + } + testEnd(err); + QRinput_free(input); + + err = 0; + testStart("Split test: an + num + an"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("Ab345fg", input, QR_MODE_KANJI, 1); + list = input->head; + if(inputTest(list, "8", 7)) { + printQrinput(input); + err++; + } + testEnd(err); + QRinput_free(input); +} + +void test_toupper(void) +{ + QRinput *input; + QRinput_List *list; + int err = 0; + + testStart("Split test: check dupAndToUpper (lower->upper)"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("abcde", input, QR_MODE_8, 0); + list = input->head; + if(inputTest(list, "a", 5)) { + err++; + } + if(strncmp((char *)list->data, "ABCDE", list->size)) { + err++; + } + testEnd(err); + QRinput_free(input); + + err = 0; + testStart("Split test: check dupAndToUpper (kanji)"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("\x83n\x83q\x83t\x83w\x83z", input, QR_MODE_KANJI, 0); + list = input->head; + if(inputTest(list, "k", 10)) { + printQrinput(input); + err++; + } + if(strncmp((char *)list->data, "\x83n\x83q\x83t\x83w\x83z", list->size)) { + err++; + } + testEnd(err); + QRinput_free(input); + + err = 0; + testStart("Split test: check dupAndToUpper (8bit)"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("\x83n\x83q\x83t\x83w\x83z", input, QR_MODE_8, 0); + list = input->head; + if(inputTest(list, "8", 10)) { + printQrinput(input); + err++; + } + if(strncmp((char *)list->data, "\x83N\x83Q\x83T\x83W\x83Z", list->size)) { + err++; + } + testEnd(err); + QRinput_free(input); +} + +void test_splitNum8(void) +{ + QRinput *input; + QRinput_List *list; + int err = 0; + + testStart("Split test: num and 8bit to 8bit"); + input = QRinput_new2(0, QR_ECLEVEL_L); + Split_splitStringToQRinput("1abcdefg", input, QR_MODE_8, 1); + list = input->head; + if(inputTest(list, "8", 8)) { + err++; + printQRinputInfo(input); + } + testEnd(err); + QRinput_free(input); +} + +int main(int argc, char **argv) +{ + test_split1(); + test_split2(); + test_split3(); + test_split4(); + test_split5(); + test_split6(); + test_split7(); + test_split8(); + test_split3c(); + test_toupper(); + test_splitNum8(); + + report(); + + return 0; +} diff --git a/qrencode-3.1.0/tests/view_qrcode.c b/qrencode-3.1.0/tests/view_qrcode.c new file mode 100644 index 00000000..ed86183c --- /dev/null +++ b/qrencode-3.1.0/tests/view_qrcode.c @@ -0,0 +1,497 @@ +#include +#include +#include +#include +#include +#include +#include "../config.h" +#include "../qrspec.h" +#include "../qrinput.h" +#include "../split.h" +#include "../qrencode_inner.h" + +static SDL_Surface *screen = NULL; +static int casesensitive = 1; +static int eightbit = 0; +static int version = 1; +static int size = 4; +static int margin = 4; +static int structured = 0; +static QRecLevel level = QR_ECLEVEL_L; +static QRencodeMode hint = QR_MODE_8; + +static char **textv; +static int textc; + +static const struct option options[] = { + {"help" , no_argument , NULL, 'h'}, + {"level" , required_argument, NULL, 'l'}, + {"size" , required_argument, NULL, 's'}, + {"symversion" , required_argument, NULL, 'v'}, + {"margin" , required_argument, NULL, 'm'}, + {"structured" , no_argument , NULL, 'S'}, + {"kanji" , no_argument , NULL, 'k'}, + {"casesensitive", no_argument , NULL, 'c'}, + {"ignorecase" , no_argument , NULL, 'i'}, + {"8bit" , no_argument , NULL, '8'}, + {"version" , no_argument , NULL, 'V'}, + {NULL, 0, NULL, 0} +}; + +static char *optstring = "ho:l:s:v:m:Skci8V"; + +static char levelChar[4] = {'L', 'M', 'Q', 'H'}; +static void usage(int help, int longopt) +{ + fprintf(stderr, +"view_qrcode version %s\n" +"Copyright (C) 2008, 2009 Kentaro Fukuchi\n", VERSION); + if(help) { + if(longopt) { + fprintf(stderr, +"Usage: view_qrcode [OPTION]... [STRING]\n" +"Encode input data in a QR Code and display.\n\n" +" -h, --help display the help message. -h displays only the help of short\n" +" options.\n\n" +" -s NUMBER, --size=NUMBER\n" +" specify the size of dot (pixel). (default=3)\n\n" +" -l {LMQH}, --level={LMQH}\n" +" specify error collectin level from L (lowest) to H (highest).\n" +" (default=L)\n\n" +" -v NUMBER, --symversion=NUMBER\n" +" specify the version of the symbol. (default=auto)\n\n" +" -m NUMBER, --margin=NUMBER\n" +" specify the width of margin. (default=4)\n\n" +" -S, --structured\n" +" make structured symbols. Version must be specified.\n\n" +" -k, --kanji assume that the input text contains kanji (shift-jis).\n\n" +" -c, --casesensitive\n" +" encode lower-case alphabet characters in 8-bit mode. (default)\n\n" +" -i, --ignorecase\n" +" ignore case distinctions and use only upper-case characters.\n\n" +" -8, -8bit encode entire data in 8-bit mode. -k, -c and -i will be ignored.\n\n" +" -V, --version\n" +" display the version number and copyrights of the qrencode.\n\n" +" [STRING] input data. If it is not specified, data will be taken from\n" +" standard input.\n" + ); + } else { + fprintf(stderr, +"Usage: view_qrcode [OPTION]... [STRING]\n" +"Encode input data in a QR Code and display.\n\n" +" -h display this message.\n" +" --help display the usage of long options.\n" +" -s NUMBER specify the size of dot (pixel). (default=3)\n" +" -l {LMQH} specify error collectin level from L (lowest) to H (highest).\n" +" (default=L)\n" +" -v NUMBER specify the version of the symbol. (default=auto)\n" +" -m NUMBER specify the width of margin. (default=4)\n" +" -S make structured symbols. Version must be specified.\n" +" -k assume that the input text contains kanji (shift-jis).\n" +" -c encode lower-case alphabet characters in 8-bit mode. (default)\n" +" -i ignore case distinctions and use only upper-case characters.\n" +" -8 encode entire data in 8-bit mode. -k, -c and -i will be ignored.\n" +" -V display the version number and copyrights of the qrencode.\n" +" [STRING] input data. If it is not specified, data will be taken from\n" +" standard input.\n" + ); + } + } +} + +#define MAX_DATA_SIZE (7090 * 16) /* from the specification */ +static char *readStdin(void) +{ + char *buffer; + int ret; + + buffer = (char *)malloc(MAX_DATA_SIZE); + ret = fread(buffer, 1, MAX_DATA_SIZE, stdin); + if(ret == 0) { + fprintf(stderr, "No input data.\n"); + exit(1); + } + if(!feof(stdin)) { + fprintf(stderr, "Input data is too large.\n"); + exit(1); + } + + buffer[ret] = '\0'; + + return buffer; +} + +static void draw_QRcode(QRcode *qrcode, int ox, int oy) +{ + int x, y, width; + unsigned char *p; + SDL_Rect rect; + + ox += margin * size; + oy += margin * size; + width = qrcode->width; + p = qrcode->data; + for(y=0; yversion; + width = (qrcode->width + margin * 2) * size; + + screen = SDL_SetVideoMode(width, width, 32, 0); + SDL_FillRect(screen, NULL, 0xffffff); + draw_QRcode(qrcode, 0, 0); + SDL_Flip(screen); + QRcode_free(qrcode); +} + +void draw_structuredQRcode(QRinput_Struct *s) +{ + int i, w, h, n, x, y; + int swidth; + QRcode_List *qrcodes, *p; + + qrcodes = QRcode_encodeInputStructured(s); + if(qrcodes == NULL) return; + + swidth = (qrcodes->code->width + margin * 2) * size; + n = QRcode_List_size(qrcodes); + w = (n < 4)?n:4; + h = (n - 1) / 4 + 1; + + screen = SDL_SetVideoMode(swidth * w, swidth * h, 32, 0); + SDL_FillRect(screen, NULL, 0xffffff); + + p = qrcodes; + for(i=0; icode, x, y); + p = p->next; + } + SDL_Flip(screen); + QRcode_List_free(qrcodes); +} + +void draw_structuredQRcodeFromText(int argc, char **argv) +{ + QRinput_Struct *s; + QRinput *input; + int i, ret; + + s = QRinput_Struct_new(); + if(s == NULL) { + fprintf(stderr, "Failed to allocate memory.\n"); + exit(1); + } + for(i=0; i QRSPEC_VERSION_MAX) + version = QRSPEC_VERSION_MAX; + loop = 0; + break; + case SDLK_LEFT: + version--; + if(version < 1) + version = 1; + loop = 0; + break; + case SDLK_UP: + size++; + loop = 0; + break; + case SDLK_DOWN: + size--; + if(size < 1) size = 1; + loop = 0; + break; + case SDLK_0: + case SDLK_1: + case SDLK_2: + case SDLK_3: + case SDLK_4: + case SDLK_5: + case SDLK_6: + case SDLK_7: + if(!mode && !structured) { + mask = (event.key.keysym.sym - SDLK_0); + loop = 0; + } + break; + case SDLK_8: + if(!mode && !structured) { + mask = -1; + loop = 0; + } + break; + case SDLK_l: + level = QR_ECLEVEL_L; + loop = 0; + break; + case SDLK_m: + level = QR_ECLEVEL_M; + loop = 0; + break; + case SDLK_h: + level = QR_ECLEVEL_H; + loop = 0; + break; + case SDLK_q: + level = QR_ECLEVEL_Q; + loop = 0; + break; + case SDLK_ESCAPE: + loop = 0; + flag = 0; + break; + default: + break; + } + } + if(event.type == SDL_QUIT) { + loop = 0; + flag = 0; + } + } + } + } +} + +void view_simple(const char *str) +{ + QRinput *input; + int ret; + + input = QRinput_new2(version, level); + if(input == NULL) { + fprintf(stderr, "Memory allocation error.\n"); + exit(1); + } + if(eightbit) { + ret = QRinput_append(input, QR_MODE_8, strlen(str), (unsigned char *)str); + } else { + ret = Split_splitStringToQRinput(str, input, hint, casesensitive); + } + if(ret < 0) { + perror("Encoding the input string"); + exit(1); + } + + view(0, input); + + QRinput_free(input); +} + +void view_multiText(char **argv, int argc) +{ + textc = argc; + textv = argv; + + view(1, NULL); +} + +int main(int argc, char **argv) +{ + int opt, lindex = -1; + char *intext = NULL; + + while((opt = getopt_long(argc, argv, optstring, options, &lindex)) != -1) { + switch(opt) { + case 'h': + if(lindex == 0) { + usage(1, 1); + } else { + usage(1, 0); + } + exit(0); + break; + case 's': + size = atoi(optarg); + if(size <= 0) { + fprintf(stderr, "Invalid size: %d\n", size); + exit(1); + } + break; + case 'v': + version = atoi(optarg); + if(version < 0) { + fprintf(stderr, "Invalid version: %d\n", version); + exit(1); + } + break; + case 'l': + switch(*optarg) { + case 'l': + case 'L': + level = QR_ECLEVEL_L; + break; + case 'm': + case 'M': + level = QR_ECLEVEL_M; + break; + case 'q': + case 'Q': + level = QR_ECLEVEL_Q; + break; + case 'h': + case 'H': + level = QR_ECLEVEL_H; + break; + default: + fprintf(stderr, "Invalid level: %s\n", optarg); + exit(1); + break; + } + break; + case 'm': + margin = atoi(optarg); + if(margin < 0) { + fprintf(stderr, "Invalid margin: %d\n", margin); + exit(1); + } + break; + case 'S': + structured = 1; + case 'k': + hint = QR_MODE_KANJI; + break; + case 'c': + casesensitive = 1; + break; + case 'i': + casesensitive = 0; + break; + case '8': + eightbit = 1; + break; + case 'V': + usage(0, 0); + exit(0); + break; + default: + fprintf(stderr, "Try `view_qrcode --help' for more information.\n"); + exit(1); + break; + } + } + if(argc == 1) { + usage(1, 0); + exit(0); + } + + if(optind < argc) { + intext = argv[optind]; + } + if(intext == NULL) { + intext = readStdin(); + } + + if(SDL_Init(SDL_INIT_VIDEO) < 0) { + fprintf(stderr, "Failed initializing SDL: %s\n", SDL_GetError()); + return -1; + } + if(structured && version < 1) { + fprintf(stderr, "Version number must be greater than 0 to encode structured symbols.\n"); + exit(1); + } + if(structured && (argc - optind > 1)) { + view_multiText(argv + optind, argc - optind); + } else { + view_simple(intext); + } + + SDL_Quit(); + + return 0; +} diff --git a/qrencode-3.1.0/use/compile b/qrencode-3.1.0/use/compile new file mode 100755 index 00000000..1b1d2321 --- /dev/null +++ b/qrencode-3.1.0/use/compile @@ -0,0 +1,142 @@ +#! /bin/sh +# Wrapper for compilers which do not understand `-c -o'. + +scriptversion=2005-05-14.22 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; +esac + +ofile= +cfile= +eat= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we strip `-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/qrencode-3.1.0/use/config.guess b/qrencode-3.1.0/use/config.guess new file mode 100755 index 00000000..f32079ab --- /dev/null +++ b/qrencode-3.1.0/use/config.guess @@ -0,0 +1,1526 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2008-01-23' + +# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[456]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/qrencode-3.1.0/use/config.sub b/qrencode-3.1.0/use/config.sub new file mode 100755 index 00000000..6759825a --- /dev/null +++ b/qrencode-3.1.0/use/config.sub @@ -0,0 +1,1658 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. + +timestamp='2008-01-16' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/qrencode-3.1.0/use/depcomp b/qrencode-3.1.0/use/depcomp new file mode 100755 index 00000000..e5f9736c --- /dev/null +++ b/qrencode-3.1.0/use/depcomp @@ -0,0 +1,589 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2007-03-29.01 + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/qrencode-3.1.0/use/install-sh b/qrencode-3.1.0/use/install-sh new file mode 100755 index 00000000..a5897de6 --- /dev/null +++ b/qrencode-3.1.0/use/install-sh @@ -0,0 +1,519 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# 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. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # 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 $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/qrencode-3.1.0/use/ltmain.sh b/qrencode-3.1.0/use/ltmain.sh new file mode 100755 index 00000000..b612e9a6 --- /dev/null +++ b/qrencode-3.1.0/use/ltmain.sh @@ -0,0 +1,8412 @@ +# Generated from ltmain.m4sh. + +# ltmain.sh (GNU libtool) 2.2.6 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print informational messages (default) +# --version print version information +# -h, --help print short or long help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-1ubuntu1 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="2.2.6 Debian-2.2.6a-1ubuntu1" +TIMESTAMP="" +package_revision=1.3012 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# NLS nuisances: We save the old values to restore during execute mode. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done + +$lt_unset CDPATH + + + + + +: ${CP="cp -f"} +: ${ECHO="echo"} +: ${EGREP="/bin/grep -E"} +: ${FGREP="/bin/grep -F"} +: ${GREP="/bin/grep"} +: ${LN_S="ln -s"} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SED="/bin/sed"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} + +# Generated shell functions inserted here. + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +# In the unlikely event $progname began with a '-', it would play havoc with +# func_echo (imagine progname=-n), so we prepend ./ in that case: +func_dirname_and_basename "$progpath" +progname=$func_basename_result +case $progname in + -*) progname=./$progname ;; +esac + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=: + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname${mode+: }$mode: $*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + done + my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "X$my_tmpdir" | $Xsed +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "X$1" | $Xsed \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + + + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $SED -n '/^# Usage:/,/# -h/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + $ECHO + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help +# Echo long help message to standard output and exit. +func_help () +{ + $SED -n '/^# Usage:/,/# Report bugs to/ { + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + p + }' < "$progpath" + exit $? +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + func_error "missing argument for $1" + exit_cmd=exit +} + +exit_cmd=: + + + + + +# Check that we have a working $ECHO. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then + # Yippee, $ECHO works! + : +else + # Restart under the correct shell, and then maybe $ECHO will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# Parse options once, thoroughly. This comes as soon as possible in +# the script to make things like `libtool --version' happen quickly. +{ + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Parse non-mode specific arguments: + while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --config) func_config ;; + + --debug) preserve_args="$preserve_args $opt" + func_echo "enabling shell trace mode" + opt_debug='set -x' + $opt_debug + ;; + + -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break + execute_dlfiles="$execute_dlfiles $1" + shift + ;; + + --dry-run | -n) opt_dry_run=: ;; + --features) func_features ;; + --finish) mode="finish" ;; + + --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break + case $1 in + # Valid mode arguments: + clean) ;; + compile) ;; + execute) ;; + finish) ;; + install) ;; + link) ;; + relink) ;; + uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac + + mode="$1" + shift + ;; + + --preserve-dup-deps) + opt_duplicate_deps=: ;; + + --quiet|--silent) preserve_args="$preserve_args $opt" + opt_silent=: + ;; + + --verbose| -v) preserve_args="$preserve_args $opt" + opt_silent=false + ;; + + --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break + preserve_args="$preserve_args $opt $1" + func_enable_tag "$1" # tagname is set here + shift + ;; + + # Separate optargs to long options: + -dlopen=*|--mode=*|--tag=*) + func_opt_split "$opt" + set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + shift + ;; + + -\?|-h) func_usage ;; + --help) opt_help=: ;; + --version) func_version ;; + + -*) func_fatal_help "unrecognized option \`$opt'" ;; + + *) nonopt="$opt" + break + ;; + esac + done + + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + ;; + esac + + # Having warned about all mis-specified options, bail out if + # anything was wrong. + $exit_cmd $EXIT_FAILURE +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +## ----------- ## +## Main. ## +## ----------- ## + +$opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + test -z "$mode" && func_fatal_error "error: you must specify a MODE." + + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$mode' for more information." +} + + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_ltwrapper_scriptname_result="" + if func_ltwrapper_executable_p "$1"; then + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + fi +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_quote_for_eval "$arg" + CC_quoted="$CC_quoted $func_quote_for_eval_result" + done + case "$@ " in + " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T <?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + removelist="$removelist $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + removelist="$removelist $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + command="$command -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + command="$command -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + command="$command$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { +test "$mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$mode'" + ;; + esac + + $ECHO + $ECHO "Try \`$progname --help' for more information about other modes." + + exit $? +} + + # Now that we've collected a possible --mode arg, show help if necessary + $opt_help && func_mode_help + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_quote_for_eval "$file" + args="$args $func_quote_for_eval_result" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + $ECHO "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + $ECHO "X----------------------------------------------------------------------" | $Xsed + $ECHO "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + $ECHO + $ECHO "If you ever happen to want to link against installed libraries" + $ECHO "in a given directory, LIBDIR, you must either use libtool, and" + $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" + $ECHO "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" + $ECHO " during execution" + fi + if test -n "$runpath_var"; then + $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" + $ECHO " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $ECHO + + $ECHO "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" + $ECHO "pages." + ;; + *) + $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + $ECHO "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS +} + +test "$mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + install_prog="$install_prog$func_quote_for_eval_result" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + install_prog="$install_prog $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_verbose "extracting global C symbols from \`$progfile'" + $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + $ECHO >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +" + case $host in + *cygwin* | *mingw* | *cegcc* ) + $ECHO >> "$output_objdir/$my_dlsyms" "\ +/* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs. */" + lt_dlsym_const= ;; + *osf5*) + echo >> "$output_objdir/$my_dlsyms" "\ +/* This system does not cope well with relocations in const data */" + lt_dlsym_const= ;; + *) + lt_dlsym_const=const ;; + esac + + $ECHO >> "$output_objdir/$my_dlsyms" "\ +extern $lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +$lt_dlsym_const lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + $ECHO >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) symtab_cflags="$symtab_cflags $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + + +# func_emit_wrapper_part1 [arg=no] +# +# Emit the first part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part1 () +{ + func_emit_wrapper_part1_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part1_arg1=$1 + fi + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + ECHO=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$ECHO works! + : + else + # Restart under the correct shell, and then maybe \$ECHO will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $ECHO "\ + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done +" +} +# end: func_emit_wrapper_part1 + +# func_emit_wrapper_part2 [arg=no] +# +# Emit the second part of a libtool wrapper script on stdout. +# For more information, see the description associated with +# func_emit_wrapper(), below. +func_emit_wrapper_part2 () +{ + func_emit_wrapper_part2_arg1=no + if test -n "$1" ; then + func_emit_wrapper_part2_arg1=$1 + fi + + $ECHO "\ + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} +# end: func_emit_wrapper_part2 + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=no + if test -n "$1" ; then + func_emit_wrapper_arg1=$1 + fi + + # split this up so that func_emit_cwrapperexe_src + # can call each part independently. + func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" + func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" +} + + +# func_to_host_path arg +# +# Convert paths to host format when used with build tools. +# Intended for use with "native" mingw (where libtool itself +# is running under the msys shell), or in the following cross- +# build environments: +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# where wine is equipped with the `winepath' executable. +# In the native mingw case, the (msys) shell automatically +# converts paths for any non-msys applications it launches, +# but that facility isn't available from inside the cwrapper. +# Similar accommodations are necessary for $host mingw and +# $build cygwin. Calling this function does no harm for other +# $host/$build combinations not listed above. +# +# ARG is the path (on $build) that should be converted to +# the proper representation for $host. The result is stored +# in $func_to_host_path_result. +func_to_host_path () +{ + func_to_host_path_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + case $build in + *mingw* ) # actually, msys + # awkward: cmd appends spaces to result + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_path_tmp1=`( cmd //c echo "$1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_path_tmp1=`cygpath -w "$1"` + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # Unfortunately, winepath does not exit with a non-zero + # error code, so we are forced to check the contents of + # stdout. On the other hand, if the command is not + # found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both + # error code of zero AND non-empty stdout, which explains + # the odd construction: + func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then + func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ + $SED -e "$lt_sed_naive_backslashify"` + else + # Allow warning below. + func_to_host_path_result="" + fi + ;; + esac + if test -z "$func_to_host_path_result" ; then + func_error "Could not determine host path corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_path_result="$1" + fi + ;; + esac + fi +} +# end: func_to_host_path + +# func_to_host_pathlist arg +# +# Convert pathlists to host format when used with build tools. +# See func_to_host_path(), above. This function supports the +# following $build/$host combinations (but does no harm for +# combinations not listed here): +# $build $host +# mingw (msys) mingw [e.g. native] +# cygwin mingw +# *nix + wine mingw +# +# Path separators are also converted from $build format to +# $host format. If ARG begins or ends with a path separator +# character, it is preserved (but converted to $host format) +# on output. +# +# ARG is a pathlist (on $build) that should be converted to +# the proper representation on $host. The result is stored +# in $func_to_host_pathlist_result. +func_to_host_pathlist () +{ + func_to_host_pathlist_result="$1" + if test -n "$1" ; then + case $host in + *mingw* ) + lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_to_host_pathlist_tmp2="$1" + # Once set for this call, this variable should not be + # reassigned. It is used in tha fallback case. + func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e 's|^:*||' -e 's|:*$||'` + case $build in + *mingw* ) # Actually, msys. + # Awkward: cmd appends spaces to result. + lt_sed_strip_trailing_spaces="s/[ ]*\$//" + func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + *cygwin* ) + func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ + $SED -e "$lt_sed_naive_backslashify"` + ;; + * ) + # unfortunately, winepath doesn't convert pathlists + func_to_host_pathlist_result="" + func_to_host_pathlist_oldIFS=$IFS + IFS=: + for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do + IFS=$func_to_host_pathlist_oldIFS + if test -n "$func_to_host_pathlist_f" ; then + func_to_host_path "$func_to_host_pathlist_f" + if test -n "$func_to_host_path_result" ; then + if test -z "$func_to_host_pathlist_result" ; then + func_to_host_pathlist_result="$func_to_host_path_result" + else + func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" + fi + fi + fi + IFS=: + done + IFS=$func_to_host_pathlist_oldIFS + ;; + esac + if test -z "$func_to_host_pathlist_result" ; then + func_error "Could not determine the host path(s) corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This may break if $1 contains DOS-style drive + # specifications. The fix is not to complicate the expression + # below, but for the user to provide a working wine installation + # with winepath so that path translation in the cross-to-mingw + # case works properly. + lt_replace_pathsep_nix_to_dos="s|:|;|g" + func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ + $SED -e "$lt_replace_pathsep_nix_to_dos"` + fi + # Now, add the leading and trailing path separators back + case "$1" in + :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" + ;; + esac + case "$1" in + *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" + ;; + esac + ;; + esac + fi +} +# end: func_to_host_pathlist + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +# define setmode _setmode +#else +# include +# include +# ifdef __CYGWIN__ +# include +# define HAVE_SETENV +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +#ifdef _MSC_VER +# define S_IXUSR _S_IEXEC +# define stat _stat +# ifndef _INTPTR_T_DEFINED +# define intptr_t int +# endif +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifdef __CYGWIN__ +# define FOPEN_WB "wb" +#endif + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#undef LTWRAPPER_DEBUGPRINTF +#if defined DEBUGWRAPPER +# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args +static void +ltwrapper_debugprintf (const char *fmt, ...) +{ + va_list args; + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); +} +#else +# define LTWRAPPER_DEBUGPRINTF(args) +#endif + +const char *program_name = NULL; + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_fatal (const char *message, ...); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_opt_process_env_set (const char *arg); +void lt_opt_process_env_prepend (const char *arg); +void lt_opt_process_env_append (const char *arg); +int lt_split_name_value (const char *arg, char** name, char** value); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); + +static const char *script_text_part1 = +EOF + + func_emit_wrapper_part1 yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ "/' -e 's/$/\\n"/' + echo ";" + cat <"))); + for (i = 0; i < newargc; i++) + { + LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + } + +EOF + + case $host_os in + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ + LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + return 127; + } + return rval; +EOF + ;; + *) + cat <<"EOF" + execv (lt_argv_zero, newargz); + return rval; /* =127, but avoids unused variable warning */ +EOF + ;; + esac + + cat <<"EOF" +} + +void * +xmalloc (size_t num) +{ + void *p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), + string) : NULL; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char) name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable (const char *path) +{ + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", + path ? (*path ? path : "EMPTY!") : "NULL!")); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", + wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", + tmp_pathspec)); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + char *errstr = strerror (errno); + lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal ("Could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} + +void +lt_setenv (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", + (name ? name : ""), + (value ? value : ""))); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +int +lt_split_name_value (const char *arg, char** name, char** value) +{ + const char *p; + int len; + if (!arg || !*arg) + return 1; + + p = strchr (arg, (int)'='); + + if (!p) + return 1; + + *value = xstrdup (++p); + + len = strlen (arg) - strlen (*value); + *name = XMALLOC (char, len); + strncpy (*name, arg, len-1); + (*name)[len - 1] = '\0'; + + return 0; +} + +void +lt_opt_process_env_set (const char *arg) +{ + char *name = NULL; + char *value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); + } + + lt_setenv (name, value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_prepend (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_opt_process_env_append (const char *arg) +{ + char *name = NULL; + char *value = NULL; + char *new_value = NULL; + + if (lt_split_name_value (arg, &name, &value) != 0) + { + XFREE (name); + XFREE (value); + lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); + } + + new_value = lt_extend_str (getenv (name), value, 1); + lt_setenv (name, new_value); + XFREE (new_value); + XFREE (name); + XFREE (value); +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + (name ? name : ""), + (value ? value : ""))); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + + +EOF +} +# end: func_emit_cwrapperexe_src + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + weak_libs="$weak_libs $arg" + prev= + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname '-L' '' "$arg" + dir=$func_stripname_result + if test -z "$dir"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + arg="$arg $wl$func_quote_for_eval_result" + compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" + linker_flags="$linker_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_duplicate_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + case $lib in + *.la) func_source "$lib" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + case " $weak_libs " in + *" $deplib_base "*) ;; + *) deplibs="$deplibs $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + dir=$func_stripname_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $ECHO + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because the file extensions .$libext of this argument makes me believe" + $ECHO "*** that it is just a static archive that I should not use here." + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + newlib_search_path="$newlib_search_path $func_stripname_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) temp_rpath="$temp_rpath$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + $ECHO + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $ECHO + $ECHO "*** And there doesn't seem to be a static archive available" + $ECHO "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $ECHO + $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $ECHO "*** But as you try to build a module library, libtool will still create " + $ECHO "*** a static module, that should work as long as the dlopening application" + $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_dirname "$deplib" "" "." + dir="$func_dirname_result" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + $ECHO + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + libobjs="$libobjs $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` + # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` + # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $ECHO + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + $ECHO "*** I have the capability to make that library automatically link in when" + $ECHO "*** you link to this library. But I can only do this if you have a" + $ECHO "*** shared version of the library, which you do not appear to have" + $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ + -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + done + fi + if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | + $GREP . >/dev/null; then + $ECHO + if test "X$deplibs_check_method" = "Xnone"; then + $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + else + $ECHO "*** Warning: inter-library dependencies are not known to be supported." + fi + $ECHO "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $ECHO + $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + $ECHO "*** a static module, that should work as long as the dlopening" + $ECHO "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $ECHO + $ECHO "*** However, this would only work if libtool was able to extract symbol" + $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" + $ECHO "*** not find such a program. So, this module is probably useless." + $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $ECHO "*** The inter-library dependencies that have been dropped here will be" + $ECHO "*** automatically added whenever a program is linked with this library" + $ECHO "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $ECHO + $ECHO "*** Since this library must not contain undefined symbols," + $ECHO "*** because either the platform does not support them or" + $ECHO "*** it was explicitly requested with -no-undefined," + $ECHO "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + delfiles="$delfiles $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + func_len " $cmd" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + $ECHO 'INPUT (' > $output + for obj in $save_libobjs + do + $ECHO "$obj" >> $output + done + $ECHO ')' >> $output + delfiles="$delfiles $output" + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + $ECHO "$obj" >> $output + done + delfiles="$delfiles $output" + output=$firstobj\"$file_list_spec$output\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + delfiles="$delfiles $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + libobjs="$libobjs $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *cegcc) + # Disable wrappers for cegcc, we are cross compiling anyway. + wrappers_required=no + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $ECHO for shipping. + if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + oldobjs="$oldobjs $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $dlprefiles + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $ECHO "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlfiles="$newdlfiles $libdir/$name" + ;; + *) newdlfiles="$newdlfiles $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + newdlprefiles="$newdlprefiles $libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$mode" = link || test "$mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) RM="$RM $arg"; rmforce=yes ;; + -*) RM="$RM $arg" ;; + *) files="$files $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$mode" = uninstall || test "$mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/qrencode-3.1.0/use/missing b/qrencode-3.1.0/use/missing new file mode 100755 index 00000000..1c8ff704 --- /dev/null +++ b/qrencode-3.1.0/use/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 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., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -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 + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + 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 + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. 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 $msg. You should only need it if + you modified \`${configure_ac}'. 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 $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. 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_ac}` + 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 $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + 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 + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. 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 test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. 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 test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. 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." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + 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 prerequisites 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 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 00000000..a1c833cc --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,323 @@ +LIB_BARCODE_DIR = ../barcode-0.98 +LIB_IEC16022_DIR = ../iec16022-0.2.1 +LIB_QRENCODE_DIR = ../qrencode-3.1.0 + +SUBDIRS= pixmaps stock-pixmaps + +bin_PROGRAMS = glabels glabels-batch + +INCLUDES = \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(LIB_BARCODE_DIR) \ + -I$(LIB_IEC16022_DIR) \ + -I$(LIB_QRENCODE_DIR) \ + $(GLABELS_CFLAGS) \ + $(DISABLE_DEPRECATED_CFLAGS) \ + -DPREFIX=\""$(prefix)"\" \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + -DDATADIR=\""$(datadir)"\" \ + -DLIBDIR=\""$(libdir)"\" \ + -DGLABELS_LOCALEDIR=\""$(datadir)/locale"\" \ + -DGLABELS_BUILDER_DIR=\""$(datadir)/glabels/builder/"\" \ + -DGLABELS_ICON_DIR=\""$(datadir)/pixmaps/"\" \ + -DGLABELS_PIXMAP_DIR=\""$(datadir)/pixmaps/glabels/"\" \ + -DG_LOG_DOMAIN=\""glabels\"" + +glabels_LDFLAGS = -export-dynamic + +glabels_LDADD = \ + $(GLABELS_LIBS) \ + ../libglabels/libglabels.la \ + $(LIB_BARCODE_DIR)/libbarcode.la \ + $(LIB_IEC16022_DIR)/libiec16022.la \ + $(LIB_QRENCODE_DIR)/libqrencode.la + +glabels_batch_LDFLAGS = -export-dynamic + +glabels_batch_LDADD = \ + $(GLABELS_LIBS) \ + ../libglabels/libglabels.la \ + $(LIB_BARCODE_DIR)/libbarcode.la \ + $(LIB_IEC16022_DIR)/libiec16022.la \ + $(LIB_QRENCODE_DIR)/libqrencode.la + +BUILT_SOURCES = \ + marshal.c \ + marshal.h + +glabels_SOURCES = \ + glabels.c \ + warning-handler.c \ + warning-handler.h \ + critical-error-handler.c \ + critical-error-handler.h \ + window.c \ + window.h \ + stock.c \ + stock.h \ + ui.h \ + ui.c \ + ui-util.h \ + ui-util.c \ + ui-commands.h \ + ui-commands.c \ + ui-property-bar.h \ + ui-property-bar.c \ + ui-sidebar.h \ + ui-sidebar.c \ + file.h \ + file.c \ + file-util.h \ + file-util.c \ + new-label-dialog.h \ + new-label-dialog.c \ + recent.h \ + recent.c \ + prefs.c \ + prefs.h \ + prefs-model.c \ + prefs-model.h \ + prefs-dialog.c \ + prefs-dialog.h \ + hig.h \ + view.c \ + view.h \ + view-object.c \ + view-object.h \ + view-box.c \ + view-box.h \ + view-ellipse.c \ + view-ellipse.h \ + view-line.c \ + view-line.h \ + view-image.c \ + view-image.h \ + view-text.c \ + view-text.h \ + view-barcode.c \ + view-barcode.h \ + merge-properties-dialog.c \ + merge-properties-dialog.h \ + object-editor.c \ + object-editor.h \ + object-editor-private.h \ + object-editor-position-page.c \ + object-editor-size-page.c \ + object-editor-lsize-page.c \ + object-editor-line-page.c \ + object-editor-fill-page.c \ + object-editor-image-page.c \ + object-editor-text-page.c \ + object-editor-edit-page.c \ + object-editor-bc-page.c \ + object-editor-data-page.c \ + object-editor-shadow-page.c \ + print.c \ + print.h \ + print-op.c \ + print-op.h \ + print-op-dialog.c \ + print-op-dialog.h \ + template-designer.c \ + template-designer.h \ + bc.c \ + bc.h \ + bc-gnubarcode.c \ + bc-gnubarcode.h \ + bc-postnet.c \ + bc-postnet.h \ + bc-iec16022.c \ + bc-iec16022.h \ + bc-iec18004.c \ + bc-iec18004.h \ + label.c \ + label.h \ + label-object.c \ + label-object.h \ + label-text.c \ + label-text.h \ + label-box.c \ + label-box.h \ + label-line.c \ + label-line.h \ + label-ellipse.c \ + label-ellipse.h \ + label-image.c \ + label-image.h \ + label-barcode.c \ + label-barcode.h \ + xml-label.c \ + xml-label.h \ + xml-label-04.c \ + xml-label-04.h \ + pixbuf-cache.c \ + pixbuf-cache.h \ + merge.c \ + merge.h \ + merge-init.c \ + merge-init.h \ + merge-text.c \ + merge-text.h \ + merge-evolution.c \ + merge-evolution.h \ + merge-vcard.c \ + merge-vcard.h \ + text-node.c \ + text-node.h \ + mini-preview-pixbuf.c \ + mini-preview-pixbuf.h \ + mini-preview-pixbuf-cache.c \ + mini-preview-pixbuf-cache.h \ + wdgt-media-select.c \ + wdgt-media-select.h \ + mini-preview.c \ + mini-preview.h \ + mini-label-preview.c \ + mini-label-preview.h \ + rotate-label-button.c \ + rotate-label-button.h \ + wdgt-chain-button.c \ + wdgt-chain-button.h \ + wdgt-merge-menu.c \ + wdgt-merge-menu.h \ + color-combo.c \ + color-combo.h \ + color-combo-button.c \ + color-combo-button.h \ + color-combo-menu.c \ + color-combo-menu.h \ + color-combo-color-menu-item.c \ + color-combo-color-menu-item.h \ + color-combo-history.c \ + color-combo-history.h \ + color-swatch.c \ + color-swatch.h \ + font-combo.c \ + font-combo.h \ + font-combo-menu.c \ + font-combo-menu.h \ + font-combo-menu-item.c \ + font-combo-menu-item.h \ + font-sample.c \ + font-sample.h \ + font-util.c \ + font-util.h \ + cairo-label-path.c \ + cairo-label-path.h \ + cairo-markup-path.c \ + cairo-markup-path.h \ + cairo-ellipse-path.c \ + cairo-ellipse-path.h \ + combo-util.c \ + combo-util.h \ + builder-util.c \ + builder-util.h \ + str-util.c \ + str-util.h \ + color.c \ + color.h \ + debug.c \ + debug.h \ + $(BUILT_SOURCES) + + +glabels_batch_SOURCES = \ + glabels-batch.c \ + file-util.h \ + file-util.c \ + print.c \ + print.h \ + print-op.c \ + print-op.h \ + bc.c \ + bc.h \ + bc-gnubarcode.c \ + bc-gnubarcode.h \ + bc-postnet.c \ + bc-postnet.h \ + bc-iec16022.c \ + bc-iec16022.h \ + bc-iec18004.c \ + bc-iec18004.h \ + label.c \ + label.h \ + label-object.c \ + label-object.h \ + label-text.c \ + label-text.h \ + label-box.c \ + label-box.h \ + label-line.c \ + label-line.h \ + label-ellipse.c \ + label-ellipse.h \ + label-image.c \ + label-image.h \ + label-barcode.c \ + label-barcode.h \ + xml-label.c \ + xml-label.h \ + xml-label-04.c \ + xml-label-04.h \ + pixbuf-cache.c \ + pixbuf-cache.h \ + merge.c \ + merge.h \ + merge-init.c \ + merge-init.h \ + merge-text.c \ + merge-text.h \ + merge-evolution.c \ + merge-evolution.h \ + merge-vcard.c \ + merge-vcard.h \ + text-node.c \ + text-node.h \ + prefs.c \ + prefs.h \ + prefs-model.c \ + prefs-model.h \ + font-util.c \ + font-util.h \ + str-util.c \ + str-util.h \ + color.c \ + color.h \ + debug.c \ + debug.h \ + hig.h \ + cairo-label-path.c \ + cairo-label-path.h \ + cairo-ellipse-path.c \ + cairo-ellipse-path.h \ + $(BUILT_SOURCES) + +marshal.h: marshal.list $(GLIB_GENMARSHAL) + $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=gl_marshal > $@ + +marshal.c: marshal.list $(GLIB_GENMARSHAL) + $(AM_V_GEN) echo "#include \"marshal.h\"" > $@ && \ + $(GLIB_GENMARSHAL) $< --body --prefix=gl_marshal >> $@ + +EXTRA_DIST = \ + marshal.list + +CLEANFILES = $(BUILT_SOURCES) + +$(bin_PROGRAMS): $(LIB_BARCODE_DIR)/libbarcode.la \ + $(LIB_IEC16022_DIR)/libiec16022.la \ + ../libglabels/libglabels.la + +$(LIB_BARCODE_DIR)/libbarcode.la: + cd $(LIB_BARCODE_DIR); $(MAKE) + +$(LIB_IEC16022_DIR)/libiec16022.la: + cd $(LIB_IEC16022_DIR); $(MAKE) + +$(LIB_QRENCODE_DIR)/libqrencode.la: + cd $(LIB_QRENCODE_DIR); $(MAKE) + +../libglabels/libglabels.la: + cd ../libglabels; $(MAKE) + diff --git a/src/bc-gnubarcode.c b/src/bc-gnubarcode.c new file mode 100644 index 00000000..6ce051d0 --- /dev/null +++ b/src/bc-gnubarcode.c @@ -0,0 +1,450 @@ +/* + * bc-gnubarcode.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "bc-gnubarcode.h" + +#include +#include +#include +#include /* GNU Barcode */ + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ +#define SHRINK_AMOUNT 0.15 /* shrink bars to account for ink spreading */ +#define FONT_SCALE 0.95 /* Shrink fonts just a hair */ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ +static glBarcode *render_pass1 (struct Barcode_Item *bci, + gint flags); + +static gboolean is_length_valid (const gchar *digits, + gint n1, + gint n2); + +static gboolean is_length1_valid (const gchar *digits, + gint n1, + gint n2); + +static gboolean is_length2_valid (const gchar *digits, + gint n1, + gint n2); + + +/*****************************************************************************/ +/* Generate intermediate representation of barcode. */ +/*****************************************************************************/ +glBarcode * +gl_barcode_gnubarcode_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits) +{ + glBarcode *gbc; + struct Barcode_Item *bci; + gint flags; + + /* Assign type flag. Pre-filter by length for subtypes. */ + if (g_ascii_strcasecmp (id, "EAN") == 0) { + flags = BARCODE_EAN; + } else if (g_ascii_strcasecmp (id, "EAN-8") == 0) { + if (!is_length_valid (digits, 7, 8)) { + return NULL; + } + flags = BARCODE_EAN; + } else if (g_ascii_strcasecmp (id, "EAN-8+2") == 0) { + if (!is_length1_valid (digits, 7, 8) || !is_length2_valid (digits, 2, 2)) { + return NULL; + } + flags = BARCODE_EAN; + } else if (g_ascii_strcasecmp (id, "EAN-8+5") == 0) { + if (!is_length1_valid (digits, 7, 8) || !is_length2_valid (digits, 5, 5)) { + return NULL; + } + flags = BARCODE_EAN; + } else if (g_ascii_strcasecmp (id, "EAN-13") == 0) { + if (!is_length_valid (digits, 12, 13)) { + return NULL; + } + flags = BARCODE_EAN; + } else if (g_ascii_strcasecmp (id, "EAN-13+2") == 0) { + if (!is_length1_valid (digits, 12,13) || !is_length2_valid (digits, 2,2)) { + return NULL; + } + flags = BARCODE_EAN; + } else if (g_ascii_strcasecmp (id, "EAN-13+5") == 0) { + if (!is_length1_valid (digits, 12,13) || !is_length2_valid (digits, 5,5)) { + return NULL; + } + flags = BARCODE_EAN; + } else if (g_ascii_strcasecmp (id, "UPC") == 0) { + flags = BARCODE_UPC; + } else if (g_ascii_strcasecmp (id, "UPC-A") == 0) { + if (!is_length_valid (digits, 11, 12)) { + return NULL; + } + flags = BARCODE_UPC; + } else if (g_ascii_strcasecmp (id, "UPC-A+2") == 0) { + if (!is_length1_valid (digits, 11,12) || !is_length2_valid (digits, 2,2)) { + return NULL; + } + flags = BARCODE_UPC; + } else if (g_ascii_strcasecmp (id, "UPC-A+5") == 0) { + if (!is_length1_valid (digits, 11,12) || !is_length2_valid (digits, 5,5)) { + return NULL; + } + flags = BARCODE_UPC; + } else if (g_ascii_strcasecmp (id, "UPC-E") == 0) { + if (!is_length_valid (digits, 6, 8)) { + return NULL; + } + flags = BARCODE_UPC; + } else if (g_ascii_strcasecmp (id, "UPC-E+2") == 0) { + if (!is_length1_valid (digits, 6, 8) || !is_length2_valid (digits, 2,2)) { + return NULL; + } + flags = BARCODE_UPC; + } else if (g_ascii_strcasecmp (id, "UPC-E+5") == 0) { + if (!is_length1_valid (digits, 6, 8) || !is_length2_valid (digits, 5,5)) { + return NULL; + } + flags = BARCODE_UPC; + } else if (g_ascii_strcasecmp (id, "ISBN") == 0) { + if (!is_length_valid (digits, 9, 10)) { + return NULL; + } + flags = BARCODE_ISBN; + } else if (g_ascii_strcasecmp (id, "ISBN+5") == 0) { + if (!is_length1_valid (digits, 9, 10) || !is_length2_valid (digits, 5,5)) { + return NULL; + } + flags = BARCODE_ISBN; + } else if (g_ascii_strcasecmp (id, "Code39") == 0) { + flags = BARCODE_39; + } else if (g_ascii_strcasecmp (id, "Code128") == 0) { + flags = BARCODE_128; + } else if (g_ascii_strcasecmp (id, "Code128C") == 0) { + flags = BARCODE_128C; + } else if (g_ascii_strcasecmp (id, "Code128B") == 0) { + flags = BARCODE_128B; + } else if (g_ascii_strcasecmp (id, "I25") == 0) { + flags = BARCODE_I25; + } else if (g_ascii_strcasecmp (id, "CBR") == 0) { + flags = BARCODE_CBR; + } else if (g_ascii_strcasecmp (id, "MSI") == 0) { + flags = BARCODE_MSI; + } else if (g_ascii_strcasecmp (id, "PLS") == 0) { + flags = BARCODE_PLS; + } else { + g_message( "Illegal barcode id %s", id ); + flags = BARCODE_ANY; + } + + + bci = Barcode_Create ((char *)digits); + + /* First encode using GNU Barcode library */ + if (!text_flag) { + flags |= BARCODE_NO_ASCII; + } + if (!checksum_flag) { + flags |= BARCODE_NO_CHECKSUM; + } + + bci->scalef = 0.0; + bci->width = w; + bci->height = h; + + Barcode_Encode (bci, flags); + if (!bci->partial || !bci->textinfo) { + Barcode_Delete (bci); + return NULL; + } + + /* now render with our custom back-end, + to create appropriate intermdediate format */ + gbc = render_pass1 (bci, flags); + + 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, + gint flags) +{ + gint validbits = BARCODE_NO_ASCII; + glBarcode *gbc; + glBarcodeLine *line; + glBarcodeChar *bchar; + gdouble scalef = 1.0; + gdouble x; + gint i, j, barlen; + gdouble f1, f2; + gint mode = '-'; /* text below bars */ + gdouble x0, y0, yr; + gchar *p, c; + + if (bci->width > (2*bci->margin)) { + bci->width -= 2*bci->margin; + } + if (bci->height > (2*bci->margin)) { + bci->height -= 2*bci->margin; + } + + /* If any flag is clear in "flags", inherit it from "bci->flags" */ + if (!(flags & BARCODE_NO_ASCII)) { + flags |= bci->flags & BARCODE_NO_ASCII; + } + flags = bci->flags = (flags & validbits) | (bci->flags & ~validbits); + + /* 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 scale factor depends on bar length */ + if (!bci->scalef) { + if (!bci->width) bci->width = barlen; /* default */ + scalef = bci->scalef = (double)bci->width / (double)barlen; + if (scalef < 0.5) scalef = 0.5; + } + + /* The width defaults to "just enough" */ + bci->width = barlen * scalef + 1; + + /* But it can be too small, in this case enlarge and center the area */ + if (bci->width < barlen * scalef) { + int wid = barlen * scalef + 1; + bci->xoff -= (wid - bci->width)/2 ; + bci->width = wid; + /* Can't extend too far on the left */ + if (bci->xoff < 0) { + bci->width += -bci->xoff; + bci->xoff = 0; + } + } + + /* The height defaults to 80 points (rescaled) */ + if (!bci->height) + bci->height = 80 * scalef; + + /* If too small (5 + text), reduce the scale factor and center */ + i = 5 + 10 * ((bci->flags & BARCODE_NO_ASCII)==0); + if (bci->height < i * scalef ) { + bci->height = i * scalef; + } + + gbc = g_new0 (glBarcode, 1); + + /* Now traverse the code string and create a list of lines */ + x = bci->margin + (bci->partial[0] - '0') * scalef; + 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 * scalef) / 2; + y0 = bci->margin; + yr = bci->height; + if (!(bci->flags & BARCODE_NO_ASCII)) { /* leave space for text */ + if (mode == '-') { + /* text below bars: 10 or 5 points */ + yr -= (isdigit (*p) ? 10 : 5) * scalef; + } else { /* '+' */ + /* above bars: 10 or 0 from bottom, + and 10 from top */ + y0 += 10 * scalef; + yr -= (isdigit (*p) ? 20 : 10) * scalef; + } + } + line = g_new0 (glBarcodeLine, 1); + line->x = x0; + line->y = y0; + line->length = yr; + line->width = (j * scalef) - SHRINK_AMOUNT; + gbc->lines = g_list_append (gbc->lines, line); + } + x += j * scalef; + + } + + /* Now the text */ + mode = '-'; /* reinstantiate default */ + if (!(bci->flags & BARCODE_NO_ASCII)) { + 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) { + g_message ("impossible data: %s", p); + continue; + } + bchar = g_new0 (glBarcodeChar, 1); + bchar->x = f1 * scalef + bci->margin; + if (mode == '-') { + bchar->y = + bci->margin + bci->height - 8 * scalef; + } else { + bchar->y = bci->margin; + } + bchar->fsize = f2 * FONT_SCALE * scalef; + 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; +} + + +/*--------------------------------------------------------------------------*/ +/* Validate specific length of string (for subtypes). */ +/*--------------------------------------------------------------------------*/ +static gboolean +is_length_valid (const gchar *digits, + gint n1, + gint n2) +{ + gchar *p; + gint i; + + if (!digits) { + return FALSE; + } + + for (p = (gchar *)digits, i=0; *p != 0; p++) { + if (g_ascii_isdigit (*p)) { + i++; + } + } + + return (i >= n1) && (i <= n2); +} + + +/*--------------------------------------------------------------------------*/ +/* Validate specific length of string (for subtypes). */ +/*--------------------------------------------------------------------------*/ +static gboolean +is_length1_valid (const gchar *digits, + gint n1, + gint n2) +{ + gchar *p; + gint i; + + if (!digits) { + return FALSE; + } + + for (p = (gchar *)digits, i=0; !g_ascii_isspace (*p) && *p != 0; p++) { + if (g_ascii_isdigit (*p)) { + i++; + } + } + + return (i >= n1) && (i <= n2); +} + + +/*--------------------------------------------------------------------------*/ +/* Validate specific length of second string (for subtypes). */ +/*--------------------------------------------------------------------------*/ +static gboolean +is_length2_valid (const gchar *digits, + gint n1, + gint n2) +{ + gchar *p; + gint i; + + if (!digits) { + return FALSE; + } + + for (p = (gchar *)digits; !g_ascii_isspace (*p) && (*p != 0); p++) { + /* Skip over 1st string */ + } + + for (i=0; *p != 0; p++) { + if (g_ascii_isdigit (*p)) { + i++; + } + } + + return (i >= n1) && (i <= n2); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/bc-gnubarcode.h b/src/bc-gnubarcode.h new file mode 100644 index 00000000..ac96b346 --- /dev/null +++ b/src/bc-gnubarcode.h @@ -0,0 +1,48 @@ +/* + * bc-gnubarcode.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __BC_GNUBARCODE_H__ +#define __BC_GNUBARCODE_H__ + +#include "bc.h" + +G_BEGIN_DECLS + +glBarcode *gl_barcode_gnubarcode_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits); + +G_END_DECLS + +#endif /* __BC_GNUBARCODE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/bc-iec16022.c b/src/bc-iec16022.c new file mode 100644 index 00000000..3ccdc043 --- /dev/null +++ b/src/bc-iec16022.c @@ -0,0 +1,156 @@ +/* + * bc-iec16022.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "bc-iec16022.h" + +#include +#include +#include +#include +#include + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ +#define MIN_PIXEL_SIZE 1.0 + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ +static glBarcode *render_iec16022 (const gchar *grid, + gint i_width, + gint i_height, + gdouble w, + gdouble h); + + +/*****************************************************************************/ +/* Generate intermediate representation of barcode. */ +/*****************************************************************************/ +glBarcode * +gl_barcode_iec16022_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits) +{ + gchar *grid; + gint i_width, i_height; + glBarcode *gbc; + + if ( strlen (digits) == 0 ) + { + return NULL; + } + + i_width = 0; + i_height = 0; + + grid = (gchar *)iec16022ecc200 (&i_width, &i_height, NULL, + strlen (digits), (unsigned char *)digits, + NULL, NULL, NULL); + + /* now render with our custom back-end, + to create appropriate intermdediate format */ + gbc = render_iec16022 (grid, i_width, i_height, w, h); + + free (grid); + return gbc; +} + + +/*-------------------------------------------------------------------------- + * PRIVATE. Render to glBarcode intermediate representation of barcode. + *--------------------------------------------------------------------------*/ +static glBarcode * +render_iec16022 (const gchar *grid, + gint i_width, + gint i_height, + gdouble w, + gdouble h) +{ + glBarcode *gbc; + glBarcodeLine *line; + gint x, y; + gdouble aspect_ratio, pixel_size; + + /* Treat requested size as a bounding box, scale to maintain aspect + * ratio while fitting it in this bounding box. */ + aspect_ratio = (gdouble)i_height / (gdouble)i_width; + if ( h > w*aspect_ratio ) { + h = w * aspect_ratio; + } else { + w = h / aspect_ratio; + } + + /* Now determine pixel size. */ + pixel_size = w / i_width; + if ( pixel_size < MIN_PIXEL_SIZE ) + { + pixel_size = MIN_PIXEL_SIZE; + } + + gbc = g_new0 (glBarcode, 1); + + /* Now traverse the code string and create a list of boxes */ + for ( y = i_height-1; y >= 0; y-- ) + { + + for ( x = 0; x < i_width; x++ ) + { + + if (*grid++) + { + line = g_new0 (glBarcodeLine, 1); + line->x = x*pixel_size + pixel_size/2.0; + line->y = y*pixel_size; + line->length = pixel_size; + line->width = pixel_size; + gbc->lines = g_list_append (gbc->lines, line); + } + + } + + } + + /* Fill in other info */ + gbc->height = i_height * pixel_size; + gbc->width = i_width * pixel_size; + + return gbc; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/bc-iec16022.h b/src/bc-iec16022.h new file mode 100644 index 00000000..64655b0b --- /dev/null +++ b/src/bc-iec16022.h @@ -0,0 +1,48 @@ +/* + * bc-iec16022.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __BC_IEC16022_H__ +#define __BC_IEC16022_H__ + +#include "bc.h" + +G_BEGIN_DECLS + +glBarcode *gl_barcode_iec16022_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits); + +G_END_DECLS + +#endif /* __BC_IEC16022_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/bc-iec18004.c b/src/bc-iec18004.c new file mode 100644 index 00000000..bef0fd89 --- /dev/null +++ b/src/bc-iec18004.c @@ -0,0 +1,165 @@ +/* + * bc-iec18004.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "bc-iec18004.h" + +#include +#include +#include +#include +#include + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + +#define MIN_PIXEL_SIZE 1.0 + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ +static glBarcode *render_iec18004 (const gchar *grid, + gint i_width, + gint i_height, + gdouble w, + gdouble h); + + +/*****************************************************************************/ +/* Generate intermediate representation of barcode. */ +/*****************************************************************************/ +glBarcode * +gl_barcode_iec18004_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits) +{ + gint i_width, i_height; + glBarcode *gbc; + QRcode *qrcode; + + if ( strlen (digits) == 0 ) + { + return NULL; + } + + i_width = 0; + i_height = 0; + + qrcode = QRcode_encodeString ((const char *)digits, 0, QR_ECLEVEL_M, + QR_MODE_8, 1); + if (qrcode == NULL) + { + return NULL; + } + + i_width = i_height = qrcode->width; + gbc = render_iec18004 ((const gchar *)qrcode->data, i_width, i_height, + w, h); + + QRcode_free ( qrcode ); + + return gbc; +} + + +/*-------------------------------------------------------------------------- + * PRIVATE. Render to glBarcode intermediate representation of barcode. + *--------------------------------------------------------------------------*/ +static glBarcode * +render_iec18004 (const gchar *grid, + gint i_width, + gint i_height, + gdouble w, + gdouble h) +{ + glBarcode *gbc; + glBarcodeLine *line; + gint x, y; + gdouble aspect_ratio, pixel_size; + + /* Treat requested size as a bounding box, scale to maintain aspect + * ratio while fitting it in this bounding box. */ + aspect_ratio = (gdouble)i_height / (gdouble)i_width; + if ( h > w*aspect_ratio ) { + h = w * aspect_ratio; + } else { + w = h / aspect_ratio; + } + + /* Now determine pixel size. */ + pixel_size = w / i_width; + if ( pixel_size < MIN_PIXEL_SIZE ) + { + pixel_size = MIN_PIXEL_SIZE; + } + + gbc = g_new0 (glBarcode, 1); + + /* Now traverse the code string and create a list of boxes */ + for ( y = 0; y < i_height; y++ ) + { + for ( x = 0; x < i_width; x++ ) + { + + /* Symbol data is represented as an array contains + * width*width uchars. Each uchar represents a module + * (dot). If the less significant bit of the uchar + * is 1, the corresponding module is black. The other + * bits are meaningless for us. */ + if ((*grid++) & 1) + { + line = g_new0 (glBarcodeLine, 1); + line->x = x*pixel_size + pixel_size/2.0; + line->y = y*pixel_size; + line->length = pixel_size; + line->width = pixel_size; + gbc->lines = g_list_append (gbc->lines, line); + } + + } + + } + + /* Fill in other info */ + gbc->height = i_height * pixel_size; + gbc->width = i_width * pixel_size; + + return gbc; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/bc-iec18004.h b/src/bc-iec18004.h new file mode 100644 index 00000000..2c3e7eeb --- /dev/null +++ b/src/bc-iec18004.h @@ -0,0 +1,48 @@ +/* + * bc-iec18004.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __BC_IEC18004_H__ +#define __BC_IEC18004_H__ + +#include "bc.h" + +G_BEGIN_DECLS + +glBarcode *gl_barcode_iec18004_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits); + +G_END_DECLS + +#endif /* __BC_IEC18004_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/bc-postnet.c b/src/bc-postnet.c new file mode 100644 index 00000000..52c07dba --- /dev/null +++ b/src/bc-postnet.c @@ -0,0 +1,231 @@ +/* + * bc-postnet.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +/* + * This module implements the POSTNET barcode specified in the USPS + * publication 25, Mar 2001. + */ + +#include + +#include "bc-postnet.h" + +#include +#include + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ +#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 + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ +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"; + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ +static gchar *postnet_code (const gchar *digits); + +static gboolean is_length_valid (const gchar *digits, + gint n); + + +/****************************************************************************/ +/* Generate list of lines that form the barcode for the given digits. */ +/****************************************************************************/ +glBarcode * +gl_barcode_postnet_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits) +{ + gchar *code, *p; + glBarcode *gbc; + glBarcodeLine *line; + gdouble x; + + /* Validate code length for all subtypes. */ + if ( (g_ascii_strcasecmp (id, "POSTNET") == 0) ) { + if (!is_length_valid (digits, 5) && + !is_length_valid (digits, 9) && + !is_length_valid (digits, 11)) { + return NULL; + } + } + if ( (g_ascii_strcasecmp (id, "POSTNET-5") == 0) ) { + if (!is_length_valid (digits, 5)) { + return NULL; + } + } + if ( (g_ascii_strcasecmp (id, "POSTNET-9") == 0) ) { + if (!is_length_valid (digits, 9)) { + return NULL; + } + } + if ( (g_ascii_strcasecmp (id, "POSTNET-11") == 0) ) { + if (!is_length_valid (digits, 11)) { + return NULL; + } + } + if ( (g_ascii_strcasecmp (id, "CEPNET") == 0) ) { + if (!is_length_valid (digits, 8)) { + return NULL; + } + } + + /* First get code string */ + code = postnet_code (digits); + if (code == NULL) { + return NULL; + } + + gbc = g_new0 (glBarcode, 1); + + /* 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 (const 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 = (gchar *)digits, len = 0; (*p != 0) && (len < 11); p++) { + if (g_ascii_isdigit (*p)) { + /* Only translate valid characters (0-9) */ + d = (*p) - '0'; + sum += d; + code = g_string_append (code, symbols[d]); + 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; +} + + +/*--------------------------------------------------------------------------*/ +/* Validate specific length of string (for subtypes). */ +/*--------------------------------------------------------------------------*/ +static gboolean +is_length_valid (const gchar *digits, + gint n) +{ + gchar *p; + gint i; + + if (!digits) { + return FALSE; + } + + for (p = (gchar *)digits, i=0; *p != 0; p++) { + if (g_ascii_isdigit (*p)) { + i++; + } + } + + return (i == n); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/bc-postnet.h b/src/bc-postnet.h new file mode 100644 index 00000000..0945670d --- /dev/null +++ b/src/bc-postnet.h @@ -0,0 +1,48 @@ +/* + * bc-postnet.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __BC_POSTNET_H__ +#define __BC_POSTNET_H__ + +#include "bc.h" + +G_BEGIN_DECLS + +glBarcode *gl_barcode_postnet_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits); + +G_END_DECLS + +#endif /* __BC_POSTNET_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/bc.c b/src/bc.c new file mode 100644 index 00000000..7c35234a --- /dev/null +++ b/src/bc.c @@ -0,0 +1,411 @@ +/* + * bc.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "bc.h" + +#include +#include + +#include "bc-postnet.h" +#include "bc-gnubarcode.h" +#include "bc-iec16022.h" +#include "bc-iec18004.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +typedef struct { + gchar *id; + gchar *name; + glBarcodeNewFunc new; + gboolean can_text; + gboolean text_optional; + gboolean can_checksum; + gboolean checksum_optional; + gchar *default_digits; + gboolean can_freeform; + guint prefered_n; +} Backend; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static const Backend backends[] = { + + { "POSTNET", N_("POSTNET (any)"), gl_barcode_postnet_new, + FALSE, FALSE, TRUE, FALSE, "12345-6789-12", FALSE, 11}, + + { "POSTNET-5", N_("POSTNET-5 (ZIP only)"), gl_barcode_postnet_new, + FALSE, FALSE, TRUE, FALSE, "12345", FALSE, 5}, + + { "POSTNET-9", N_("POSTNET-9 (ZIP+4)"), gl_barcode_postnet_new, + FALSE, FALSE, TRUE, FALSE, "12345-6789", FALSE, 9}, + + { "POSTNET-11", N_("POSTNET-11 (DPBC)"), gl_barcode_postnet_new, + FALSE, FALSE, TRUE, FALSE, "12345-6789-12", FALSE, 11}, + + { "CEPNET", N_("CEPNET"), gl_barcode_postnet_new, + FALSE, FALSE, TRUE, FALSE, "12345-678", FALSE, 8}, + + { "EAN", N_("EAN (any)"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "000000000000 00000", FALSE, 17}, + + { "EAN-8", N_("EAN-8"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "0000000", FALSE, 7}, + + { "EAN-8+2", N_("EAN-8 +2"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "0000000 00", FALSE, 9}, + + { "EAN-8+5", N_("EAN-8 +5"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "0000000 00000", FALSE, 12}, + + { "EAN-13", N_("EAN-13"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "000000000000", FALSE, 12}, + + { "EAN-13+2", N_("EAN-13 +2"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "000000000000 00", FALSE, 14}, + + { "EAN-13+5", N_("EAN-13 +5"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "000000000000 00000", FALSE, 17}, + + { "UPC", N_("UPC (UPC-A or UPC-E)"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "00000000000 00000", FALSE, 16}, + + { "UPC-A", N_("UPC-A"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "00000000000", FALSE, 11}, + + { "UPC-A+2", N_("UPC-A +2"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "00000000000 00", FALSE, 13}, + + { "UPC-A+5", N_("UPC-A +5"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "00000000000 00000", FALSE, 16}, + + { "UPC-E", N_("UPC-E"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "000000", FALSE, 6}, + + { "UPC-E+2", N_("UPC-E +2"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "000000 00", FALSE, 8}, + + { "UPC-E+5", N_("UPC-E +5"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "000000 00000", FALSE, 11}, + + { "ISBN", N_("ISBN"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, TRUE, "0-00000-000-0", FALSE, 10}, + + { "ISBN+5", N_("ISBN +5"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, TRUE, "0-00000-000-0 00000", FALSE, 15}, + + { "Code39", N_("Code 39"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, + + { "Code128", N_("Code 128"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, + + { "Code128C", N_("Code 128C"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, FALSE, "0000000000", TRUE, 10}, + + { "Code128B", N_("Code 128B"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, + + { "I25", N_("Interleaved 2 of 5"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, + + { "CBR", N_("Codabar"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, + + { "MSI", N_("MSI"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, + + { "PLS", N_("Plessey"), gl_barcode_gnubarcode_new, + TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10}, + + { "IEC16022", N_("IEC16022 (DataMatrix)"), gl_barcode_iec16022_new, + FALSE, FALSE, TRUE, FALSE, "12345678", TRUE, 8}, + + { "IEC18004", N_("IEC18004 (QRCode)"), gl_barcode_iec18004_new, + FALSE, FALSE, TRUE, FALSE, "12345678", TRUE, 8}, + + { NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL, FALSE, 0} + +}; + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + + +/*---------------------------------------------------------------------------*/ +/* Convert id to index into above table. */ +/*---------------------------------------------------------------------------*/ +static gint +id_to_index (const gchar *id) +{ + gint i; + + if (id == 0) { + return 0; /* NULL request default. I.e., the first element. */ + } + + for (i=0; backends[i].id != NULL; i++) { + if (g_ascii_strcasecmp (id, backends[i].id) == 0) { + return i; + } + } + + g_message( "Unknown barcode id \"%s\"", id ); + return 0; +} + + +/*---------------------------------------------------------------------------*/ +/* Convert name to index into above table. */ +/*---------------------------------------------------------------------------*/ +static gint +name_to_index (const gchar *name) +{ + gint i; + + g_return_val_if_fail (name!=NULL, 0); + + for (i=0; backends[i].id != NULL; i++) { + if (strcmp (name, backends[i].name) == 0) { + return i; + } + } + + g_message( "Unknown barcode name \"%s\"", name ); + return 0; +} + + +/*****************************************************************************/ +/* Call appropriate barcode backend to create barcode in intermediate format.*/ +/*****************************************************************************/ +glBarcode * +gl_barcode_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits) +{ + glBarcode *gbc; + gint i; + + g_return_val_if_fail (digits!=NULL, NULL); + + i = id_to_index (id); + gbc = backends[i].new (backends[i].id, + text_flag, + checksum_flag, + w, + h, + digits); + + 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; + } +} + + +/*****************************************************************************/ +/* Get a list of names for valid barcode styles. */ +/*****************************************************************************/ +GList * +gl_barcode_get_styles_list (void) +{ + gint i; + GList *list = NULL; + + for (i=0; backends[i].id != NULL; i++) { + list = g_list_append (list, g_strdup (backends[i].name)); + } + + return list; +} + + +/*****************************************************************************/ +/* Free up a previously allocated list of style names. */ +/*****************************************************************************/ +void +gl_barcode_free_styles_list (GList *styles_list) +{ + GList *p; + + for (p=styles_list; p != NULL; p=p->next) { + g_free (p->data); + p->data = NULL; + } + + g_list_free (styles_list); +} + + +/*****************************************************************************/ +/* Return an appropriate set of digits for the given barcode style. */ +/*****************************************************************************/ +gchar * +gl_barcode_default_digits (const gchar *id, + guint n) +{ + int i; + + i = id_to_index (id); + + if (backends[i].can_freeform) { + + return g_strnfill (MAX (n,1), '0'); + + } else { + + return g_strdup (backends[i].default_digits); + + } +} + + +/*****************************************************************************/ +/* Query text capabilities. */ +/*****************************************************************************/ +gboolean +gl_barcode_can_text (const gchar *id) +{ + return backends[id_to_index (id)].can_text; +} + + +gboolean +gl_barcode_text_optional (const gchar *id) +{ + return backends[id_to_index (id)].text_optional; +} + + +/*****************************************************************************/ +/* Query checksum capabilities. */ +/*****************************************************************************/ +gboolean +gl_barcode_can_csum (const gchar *id) +{ + return backends[id_to_index (id)].can_checksum; +} + + +gboolean +gl_barcode_csum_optional (const gchar *id) +{ + return backends[id_to_index (id)].checksum_optional; +} + + +/*****************************************************************************/ +/* Query if freeform input is allowed. */ +/*****************************************************************************/ +gboolean +gl_barcode_can_freeform (const gchar *id) +{ + return backends[id_to_index (id)].can_freeform; +} + + +/*****************************************************************************/ +/* Query prefered number of digits of input. */ +/*****************************************************************************/ +guint +gl_barcode_get_prefered_n (const gchar *id) +{ + return backends[id_to_index (id)].prefered_n; +} + + +/*****************************************************************************/ +/* Convert style to text. */ +/*****************************************************************************/ +const gchar * +gl_barcode_id_to_name (const gchar *id) +{ + return backends[id_to_index (id)].name; +} + + +/*****************************************************************************/ +/* Convert name to style. */ +/*****************************************************************************/ +const gchar * +gl_barcode_name_to_id (const gchar *name) +{ + g_return_val_if_fail (name!=NULL, backends[0].id); + + return backends[name_to_index (name)].id; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/bc.h b/src/bc.h new file mode 100644 index 00000000..1e62a6fa --- /dev/null +++ b/src/bc.h @@ -0,0 +1,96 @@ +/* + * bc.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __BC_H__ +#define __BC_H__ + +#include +#include + +G_BEGIN_DECLS + +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; + +typedef glBarcode *(*glBarcodeNewFunc) (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits); + + +#define GL_BARCODE_FONT_FAMILY "Sans" +#define GL_BARCODE_FONT_WEIGHT PANGO_WEIGHT_NORMAL + + +glBarcode *gl_barcode_new (const gchar *id, + gboolean text_flag, + gboolean checksum_flag, + gdouble w, + gdouble h, + const gchar *digits); + +void gl_barcode_free (glBarcode **bc); + +GList *gl_barcode_get_styles_list (void); +void gl_barcode_free_styles_list (GList *styles_list); + +gchar *gl_barcode_default_digits (const gchar *id, + guint n); + +gboolean gl_barcode_can_text (const gchar *id); +gboolean gl_barcode_text_optional (const gchar *id); + +gboolean gl_barcode_can_csum (const gchar *id); +gboolean gl_barcode_csum_optional (const gchar *id); + +gboolean gl_barcode_can_freeform (const gchar *id); +guint gl_barcode_get_prefered_n (const gchar *id); + +const gchar *gl_barcode_id_to_name (const gchar *id); +const gchar *gl_barcode_name_to_id (const gchar *name); + +G_END_DECLS + +#endif /* __BC_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/builder-util.c b/src/builder-util.c new file mode 100644 index 00000000..e78c2303 --- /dev/null +++ b/src/builder-util.c @@ -0,0 +1,65 @@ +/* + * builder-util.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "builder-util.h" + + +/****************************************************************************/ +/* Get widgets from GtkBuilder "en masse." */ +/****************************************************************************/ +void gl_builder_util_get_widgets (GtkBuilder *builder, + gchar *first_name, + ...) +{ + va_list args; + gchar *name; + GtkWidget **p_widget; + + va_start (args, first_name); + + for ( name = first_name; name; name = va_arg (args, gchar *) ) + { + p_widget = va_arg (args, GtkWidget **); + + *p_widget = GTK_WIDGET (gtk_builder_get_object (builder, name)); + + if (!*p_widget) + { + g_critical ("Could not load widget \"%s\".\n\ngLabels may not be installed correctly!", + name); + break; + } + } + + va_end (args); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/builder-util.h b/src/builder-util.h new file mode 100644 index 00000000..c3e55493 --- /dev/null +++ b/src/builder-util.h @@ -0,0 +1,46 @@ +/* + * builder-util.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __BUILDER_UTIL_H__ +#define __BUILDER_UTIL_H__ + +#include +#include + +G_BEGIN_DECLS + +void gl_builder_util_get_widgets (GtkBuilder *builder, + gchar *first_name, + ...); + +G_END_DECLS + +#endif /* __BUILDER_UTIL_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/cairo-ellipse-path.c b/src/cairo-ellipse-path.c new file mode 100644 index 00000000..b0fd4493 --- /dev/null +++ b/src/cairo-ellipse-path.c @@ -0,0 +1,86 @@ +/* + * cairo-ellipse-path.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "cairo-ellipse-path.h" + +#include + +#include "debug.h" + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + +#define ARC_FINE 2 + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + + +/*****************************************************************************/ +/* Create ellipse path */ +/*****************************************************************************/ +void +gl_cairo_ellipse_path (cairo_t *cr, + gdouble rx, + gdouble ry) +{ + gdouble x, y; + gint i_theta; + + gl_debug (DEBUG_VIEW, "START"); + + cairo_new_path (cr); + cairo_move_to (cr, 2*rx, ry); + for (i_theta = ARC_FINE; i_theta <= 360; i_theta += ARC_FINE) { + x = rx + rx * cos (i_theta * G_PI / 180.0); + y = ry + ry * sin (i_theta * G_PI / 180.0); + cairo_line_to (cr, x, y); + } + cairo_close_path (cr); + + gl_debug (DEBUG_VIEW, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/cairo-ellipse-path.h b/src/cairo-ellipse-path.h new file mode 100644 index 00000000..9da409af --- /dev/null +++ b/src/cairo-ellipse-path.h @@ -0,0 +1,47 @@ +/* + * cairo-ellipse-path.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __CAIRO_ELLIPSE_PATH_H__ +#define __CAIRO_ELLIPSE_PATH_H__ + +#include +#include + +G_BEGIN_DECLS + +void gl_cairo_ellipse_path (cairo_t *cr, + gdouble rx, + gdouble ry); + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/cairo-label-path.c b/src/cairo-label-path.c new file mode 100644 index 00000000..59b8db13 --- /dev/null +++ b/src/cairo-label-path.c @@ -0,0 +1,274 @@ +/* + * cairo-label-path.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "cairo-label-path.h" + +#include + +#include "debug.h" + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_cairo_rect_label_path (cairo_t *cr, + lglTemplate *template, + gboolean rotate_flag, + gboolean waste_flag); +static void gl_cairo_round_label_path (cairo_t *cr, + lglTemplate *template, + gboolean rotate_flag, + gboolean waste_flag); +static void gl_cairo_cd_label_path (cairo_t *cr, + lglTemplate *template, + gboolean rotate_flag, + gboolean waste_flag); + + +/*--------------------------------------------------------------------------*/ +/* Create label path */ +/*--------------------------------------------------------------------------*/ +void +gl_cairo_label_path (cairo_t *cr, + lglTemplate *template, + gboolean rotate_flag, + gboolean waste_flag) +{ + const lglTemplateFrame *frame; + + gl_debug (DEBUG_PATH, "START"); + + frame = (lglTemplateFrame *)template->frames->data; + + switch (frame->shape) { + + case LGL_TEMPLATE_FRAME_SHAPE_RECT: + gl_cairo_rect_label_path (cr, template, rotate_flag, waste_flag); + break; + + case LGL_TEMPLATE_FRAME_SHAPE_ROUND: + gl_cairo_round_label_path (cr, template, rotate_flag, waste_flag); + break; + + case LGL_TEMPLATE_FRAME_SHAPE_CD: + gl_cairo_cd_label_path (cr, template, rotate_flag, waste_flag); + break; + + default: + g_message ("Unknown label style"); + break; + } + + gl_debug (DEBUG_PATH, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Create rectangular label path */ +/*--------------------------------------------------------------------------*/ +static void +gl_cairo_rect_label_path (cairo_t *cr, + lglTemplate *template, + gboolean rotate_flag, + gboolean waste_flag) +{ + const lglTemplateFrame *frame; + gdouble w, h, r; + gdouble x_waste, y_waste; + + gl_debug (DEBUG_PATH, "START"); + + frame = (lglTemplateFrame *)template->frames->data; + r = frame->rect.r; + + x_waste = 0.0; + y_waste = 0.0; + + if (rotate_flag) + { + lgl_template_frame_get_size (frame, &h, &w); + if (waste_flag) + { + x_waste = frame->rect.y_waste; + y_waste = frame->rect.x_waste; + } + } + else + { + lgl_template_frame_get_size (frame, &w, &h); + if (waste_flag) + { + x_waste = frame->rect.x_waste; + y_waste = frame->rect.y_waste; + } + } + + + if ( r == 0.0 ) + { + cairo_rectangle (cr, -x_waste, -y_waste, w+x_waste, h+y_waste); + } + else + { + cairo_new_path (cr); + cairo_arc_negative (cr, r-x_waste, r-y_waste, r, 3*G_PI/2, G_PI); + cairo_arc_negative (cr, r-x_waste, h-r+y_waste, r, G_PI, G_PI/2); + cairo_arc_negative (cr, w-r+x_waste, h-r+y_waste, r, G_PI/2, 0.); + cairo_arc_negative (cr, w-r+x_waste, r-y_waste, r, 2*G_PI, 3*G_PI/2); + cairo_close_path (cr); + } + + gl_debug (DEBUG_PATH, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Create round label path */ +/*--------------------------------------------------------------------------*/ +static void +gl_cairo_round_label_path (cairo_t *cr, + lglTemplate *template, + gboolean rotate_flag, + gboolean waste_flag) +{ + const lglTemplateFrame *frame; + gdouble w, h; + gdouble waste; + + gl_debug (DEBUG_PATH, "START"); + + frame = (lglTemplateFrame *)template->frames->data; + + if (rotate_flag) + { + lgl_template_frame_get_size (frame, &h, &w); + } + else + { + lgl_template_frame_get_size (frame, &w, &h); + } + + if (waste_flag) + { + waste = frame->round.waste; + } + else + { + waste = 0.0; + } + + cairo_arc (cr, w/2, h/2, w/2+waste, 0.0, 2*G_PI); + cairo_close_path (cr); + + gl_debug (DEBUG_PATH, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Create cd label path */ +/*--------------------------------------------------------------------------*/ +static void +gl_cairo_cd_label_path (cairo_t *cr, + lglTemplate *template, + gboolean rotate_flag, + gboolean waste_flag) +{ + const lglTemplateFrame *frame; + gdouble w, h; + gdouble xc, yc; + gdouble r1, r2; + gdouble theta1, theta2; + gdouble waste; + + gl_debug (DEBUG_PATH, "START"); + + frame = (lglTemplateFrame *)template->frames->data; + + if (rotate_flag) + { + lgl_template_frame_get_size (frame, &h, &w); + } + else + { + lgl_template_frame_get_size (frame, &w, &h); + } + + xc = w/2.0; + yc = h/2.0; + + r1 = frame->cd.r1; + r2 = frame->cd.r2; + + if (waste_flag) + { + waste = frame->cd.waste; + } + else + { + waste = 0.0; + } + + /* + * Outer path (may be clipped in the case of a business card type CD) + */ + theta1 = acos (w / (2.0*r1)); + theta2 = asin (h / (2.0*r1)); + + cairo_new_path (cr); + cairo_arc (cr, xc, yc, r1+waste, theta1, theta2); + cairo_arc (cr, xc, yc, r1+waste, G_PI-theta2, G_PI-theta1); + cairo_arc (cr, xc, yc, r1+waste, G_PI+theta1, G_PI+theta2); + cairo_arc (cr, xc, yc, r1+waste, 2*G_PI-theta2, 2*G_PI-theta1); + cairo_close_path (cr); + + + /* + * Inner path (hole) + */ + cairo_new_sub_path (cr); + cairo_arc (cr, xc, yc, r2-waste, 0.0, 2*G_PI); + cairo_close_path (cr); + + gl_debug (DEBUG_PATH, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/cairo-label-path.h b/src/cairo-label-path.h new file mode 100644 index 00000000..9bb3c23d --- /dev/null +++ b/src/cairo-label-path.h @@ -0,0 +1,47 @@ +/* + * cairo-label-path.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __CAIRO_LABEL_PATH_H__ +#define __CAIRO_LABEL_PATH_H__ + +#include +#include + +G_BEGIN_DECLS + +void gl_cairo_label_path (cairo_t *cr, + lglTemplate *template, + gboolean rotate_flag, + gboolean waste_flag); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/cairo-markup-path.c b/src/cairo-markup-path.c new file mode 100644 index 00000000..7a8bab38 --- /dev/null +++ b/src/cairo-markup-path.c @@ -0,0 +1,330 @@ +/* + * cairo-markup-path.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "cairo-markup-path.h" + +#include + +#include "debug.h" + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_cairo_markup_margin_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label); + +static void gl_cairo_markup_margin_rect_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label); + +static void gl_cairo_markup_margin_round_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label); + +static void gl_cairo_markup_margin_cd_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label); + +static void gl_cairo_markup_line_path (cairo_t *cr, + const lglTemplateMarkup *markup); + +static void gl_cairo_markup_circle_path (cairo_t *cr, + const lglTemplateMarkup *markup); + +static void gl_cairo_markup_rect_path (cairo_t *cr, + const lglTemplateMarkup *markup); + + +/*--------------------------------------------------------------------------*/ +/* Create markup path */ +/*--------------------------------------------------------------------------*/ +void +gl_cairo_markup_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label) +{ + gl_debug (DEBUG_PATH, "START"); + + switch (markup->type) { + case LGL_TEMPLATE_MARKUP_MARGIN: + gl_cairo_markup_margin_path (cr, markup, label); + break; + case LGL_TEMPLATE_MARKUP_LINE: + gl_cairo_markup_line_path (cr, markup); + break; + case LGL_TEMPLATE_MARKUP_CIRCLE: + gl_cairo_markup_circle_path (cr, markup); + break; + case LGL_TEMPLATE_MARKUP_RECT: + gl_cairo_markup_rect_path (cr, markup); + break; + default: + g_message ("Unknown template markup type"); + break; + } + + gl_debug (DEBUG_PATH, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw margin markup. */ +/*---------------------------------------------------------------------------*/ +static void +gl_cairo_markup_margin_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label) +{ + const lglTemplateFrame *frame; + + gl_debug (DEBUG_PATH, "START"); + + frame = (lglTemplateFrame *)label->template->frames->data; + + switch (frame->shape) { + + case LGL_TEMPLATE_FRAME_SHAPE_RECT: + gl_cairo_markup_margin_rect_path (cr, markup, label); + break; + + case LGL_TEMPLATE_FRAME_SHAPE_ROUND: + gl_cairo_markup_margin_round_path (cr, markup, label); + break; + + case LGL_TEMPLATE_FRAME_SHAPE_CD: + gl_cairo_markup_margin_cd_path (cr, markup, label); + break; + + default: + g_message ("Unknown template label style"); + break; + } + + gl_debug (DEBUG_PATH, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw simple recangular margin. */ +/*---------------------------------------------------------------------------*/ +static void +gl_cairo_markup_margin_rect_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label) +{ + const lglTemplateFrame *frame; + gdouble w, h, r, m; + + gl_debug (DEBUG_PATH, "START"); + + frame = (lglTemplateFrame *)label->template->frames->data; + + m = markup->margin.size; + + lgl_template_frame_get_size (frame, &w, &h); + w = w - 2*m; + h = h - 2*m; + r = MAX (frame->rect.r - m, 0.0); + + if ( r == 0.0 ) + { + cairo_rectangle (cr, m, m, w, h); + } + else + { + cairo_new_path (cr); + cairo_arc_negative (cr, m+r, m+r, r, 3*G_PI/2, G_PI); + cairo_arc_negative (cr, m+r, m+h-r, r, G_PI, G_PI/2); + cairo_arc_negative (cr, m+w-r, m+h-r, r, G_PI/2, 0.); + cairo_arc_negative (cr, m+w-r, m+r, r, 2*G_PI, 3*G_PI/2); + cairo_close_path (cr); + } + + gl_debug (DEBUG_PATH, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw round margin. */ +/*---------------------------------------------------------------------------*/ +static void +gl_cairo_markup_margin_round_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label) +{ + const lglTemplateFrame *frame; + gdouble r, m; + + gl_debug (DEBUG_PATH, "START"); + + frame = (lglTemplateFrame *)label->template->frames->data; + + r = frame->round.r; + m = markup->margin.size; + + cairo_arc (cr, r, r, r-m, 0, 2*G_PI); + cairo_close_path (cr); + + gl_debug (DEBUG_PATH, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw CD margins. */ +/*---------------------------------------------------------------------------*/ +static void +gl_cairo_markup_margin_cd_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label) +{ + const lglTemplateFrame *frame; + gdouble m, r1, r2; + gdouble theta1, theta2; + gdouble xc, yc; + gdouble w, h; + + gl_debug (DEBUG_PATH, "START"); + + frame = (lglTemplateFrame *)label->template->frames->data; + + lgl_template_frame_get_size (frame, &w, &h); + xc = w/2.0; + yc = h/2.0; + + m = markup->margin.size; + r1 = frame->cd.r1 - m; + r2 = frame->cd.r2 + m; + + + /* + * Outer path (may be clipped) + */ + theta1 = acos ((w-2*m) / (2.0*r1)); + theta2 = asin ((h-2*m) / (2.0*r1)); + + cairo_new_path (cr); + cairo_arc (cr, xc, yc, r1, theta1, theta2); + cairo_arc (cr, xc, yc, r1, G_PI-theta2, G_PI-theta1); + cairo_arc (cr, xc, yc, r1, G_PI+theta1, G_PI+theta2); + cairo_arc (cr, xc, yc, r1, 2*G_PI-theta2, 2*G_PI-theta1); + cairo_close_path (cr); + + + /* Inner path (hole) */ + cairo_new_sub_path (cr); + cairo_arc (cr, xc, yc, r2, 0.0, 2*G_PI); + cairo_close_path (cr); + + gl_debug (DEBUG_PATH, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw line markup. */ +/*---------------------------------------------------------------------------*/ +static void +gl_cairo_markup_line_path (cairo_t *cr, + const lglTemplateMarkup *markup) +{ + gl_debug (DEBUG_PATH, "START"); + + cairo_move_to (cr, markup->line.x1, markup->line.y1); + cairo_line_to (cr, markup->line.x2, markup->line.y2); + + gl_debug (DEBUG_PATH, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw circle markup. */ +/*---------------------------------------------------------------------------*/ +static void +gl_cairo_markup_circle_path (cairo_t *cr, + const lglTemplateMarkup *markup) +{ + gl_debug (DEBUG_PATH, "START"); + + cairo_arc (cr, + markup->circle.x0, markup->circle.y0, + markup->circle.r, + 0.0, 2*G_PI); + cairo_close_path (cr); + + gl_debug (DEBUG_PATH, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw rect markup. */ +/*---------------------------------------------------------------------------*/ +static void +gl_cairo_markup_rect_path (cairo_t *cr, + const lglTemplateMarkup *markup) +{ + gdouble x1 = markup->rect.x1; + gdouble y1 = markup->rect.y1; + gdouble w = markup->rect.w; + gdouble h = markup->rect.h; + gdouble r = markup->rect.r; + + gl_debug (DEBUG_PATH, "START"); + + if ( r == 0.0 ) + { + cairo_rectangle (cr, x1, y1, w, h); + } + else + { + cairo_new_path (cr); + cairo_arc_negative (cr, x1+r, y1+r, r, 3*G_PI/2, G_PI); + cairo_arc_negative (cr, x1+r, y1+h-r, r, G_PI, G_PI/2); + cairo_arc_negative (cr, x1+w-r, y1+h-r, r, G_PI/2, 0.); + cairo_arc_negative (cr, x1+w-r, y1+r, r, 2*G_PI, 3*G_PI/2); + cairo_close_path (cr); + } + + gl_debug (DEBUG_PATH, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/cairo-markup-path.h b/src/cairo-markup-path.h new file mode 100644 index 00000000..3f375b20 --- /dev/null +++ b/src/cairo-markup-path.h @@ -0,0 +1,47 @@ +/* + * cairo-markup-path.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __CAIRO_MARKUP_PATH_H__ +#define __CAIRO_MARKUP_PATH_H__ + +#include +#include +#include "label.h" + +G_BEGIN_DECLS + +void gl_cairo_markup_path (cairo_t *cr, + const lglTemplateMarkup *markup, + glLabel *label); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-combo-button.c b/src/color-combo-button.c new file mode 100644 index 00000000..65461be2 --- /dev/null +++ b/src/color-combo-button.c @@ -0,0 +1,426 @@ +/* + * color-combo-button.c + * Copyright (C) 2008-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "color-combo-button.h" + +#include +#include + +#include "color-combo-menu.h" +#include "color-swatch.h" +#include "color.h" +#include "marshal.h" + +#define IMAGE_W 24 +#define IMAGE_H 24 + +#define SWATCH_H 5 + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +/** GL_COLOR_COMBO_BUTTON Private fields */ +struct _glColorComboButtonPrivate { + + guint color; + gboolean is_default_flag; + + guint default_color; + + GtkWidget *button; + GtkWidget *button_vbox; + GtkWidget *swatch; + GtkWidget *dropdown_button; + + GtkWidget *menu; +}; + +enum { + COLOR_CHANGED, + LAST_SIGNAL +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static guint signals[LAST_SIGNAL] = {0}; + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void +gl_color_combo_button_finalize (GObject *object); + +static void +button_clicked_cb (glColorComboButton *this); + +static gboolean +dropdown_button_press_event_cb (GtkWidget *widget, + GdkEventButton *event, + glColorComboButton *this); + +static void +menu_color_changed_cb (glColorComboMenu *object, + guint color, + gboolean is_default, + glColorComboButton *this); + +static void +menu_selection_done_cb (GtkMenuShell *object, + glColorComboButton *this); + + +/*****************************************************************************/ +/* Object infrastructure. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glColorComboButton, gl_color_combo_button, GTK_TYPE_HBOX); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_button_class_init (glColorComboButtonClass *class) +{ + GObjectClass *gobject_class = (GObjectClass *) class; + + gl_color_combo_button_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_color_combo_button_finalize; + + signals[COLOR_CHANGED] = + g_signal_new ("color_changed", + G_OBJECT_CLASS_TYPE (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glColorComboButtonClass, color_changed), + NULL, NULL, + gl_marshal_VOID__UINT_BOOLEAN, + G_TYPE_NONE, + 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); + +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_button_init (glColorComboButton *this) +{ + GtkWidget *arrow; + + gtk_box_set_spacing (GTK_BOX (this), 0); + + this->priv = g_new0 (glColorComboButtonPrivate, 1); + + this->priv->button_vbox = gtk_vbox_new (FALSE, 0); + + this->priv->button = gtk_toggle_button_new (); + gtk_container_add (GTK_CONTAINER (this->priv->button), this->priv->button_vbox); + gtk_button_set_focus_on_click (GTK_BUTTON (this->priv->button), FALSE); + g_signal_connect_swapped (this->priv->button, "clicked", + G_CALLBACK(button_clicked_cb), this); + + gtk_box_pack_start (GTK_BOX (this), this->priv->button, FALSE, FALSE, 0); + + this->priv->dropdown_button = gtk_toggle_button_new (); + arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN); + gtk_container_add (GTK_CONTAINER (this->priv->dropdown_button), arrow); + gtk_button_set_relief (GTK_BUTTON (this->priv->dropdown_button), GTK_RELIEF_NONE); + gtk_button_set_focus_on_click (GTK_BUTTON (this->priv->dropdown_button), FALSE); + g_signal_connect (this->priv->dropdown_button, "button_press_event", + G_CALLBACK(dropdown_button_press_event_cb), this); + + gtk_box_pack_start (GTK_BOX (this), this->priv->dropdown_button, FALSE, FALSE, 0); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_color_combo_button_finalize (GObject *object) +{ + glColorComboButton *this; + + g_return_if_fail (object && IS_GL_COLOR_COMBO_BUTTON (object)); + this = GL_COLOR_COMBO_BUTTON (object); + + g_object_ref_sink (this->priv->menu); + g_free (this->priv); + + G_OBJECT_CLASS (gl_color_combo_button_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_color_combo_button_new (GdkPixbuf *icon, + const gchar *default_label, + guint default_color, + guint color) +{ + glColorComboButton *this; + GdkPixbuf *pixbuf; + GtkWidget *wimage; + + this = g_object_new (TYPE_GL_COLOR_COMBO_BUTTON, NULL); + + if (!default_label) + { + default_label = _("Default Color"); + } + + this->priv->default_color = default_color; + this->priv->color = color; + + if (icon) + { + pixbuf = gdk_pixbuf_new_subpixbuf (icon, 0, 0, IMAGE_W, IMAGE_H-SWATCH_H); + wimage = gtk_image_new_from_pixbuf (pixbuf); + g_object_unref (G_OBJECT (pixbuf)); + gtk_box_pack_start (GTK_BOX (this->priv->button_vbox), wimage, FALSE, FALSE, 0); + + this->priv->swatch = gl_color_swatch_new (IMAGE_W, SWATCH_H, color); + } + else + { + this->priv->swatch = gl_color_swatch_new (IMAGE_W, IMAGE_H, color); + } + gtk_box_pack_start (GTK_BOX (this->priv->button_vbox), this->priv->swatch, FALSE, FALSE, 0); + + this->priv->menu = gl_color_combo_menu_new (default_label, color); + gtk_widget_show_all (this->priv->menu); + + g_signal_connect (this->priv->menu, "color_changed", + G_CALLBACK (menu_color_changed_cb), this); + g_signal_connect (this->priv->menu, "selection_done", + G_CALLBACK (menu_selection_done_cb), this); + + return GTK_WIDGET (this); +} + + +/*****************************************************************************/ +/* Set color. */ +/*****************************************************************************/ +void +gl_color_combo_button_set_color (glColorComboButton *this, + guint color) +{ + this->priv->color = color; + + gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), color); +} + + +/*****************************************************************************/ +/* Set to default color. */ +/*****************************************************************************/ +void +gl_color_combo_button_set_to_default (glColorComboButton *this) +{ + gl_color_combo_button_set_color (this, this->priv->default_color); +} + +/*****************************************************************************/ +/* Get color. */ +/*****************************************************************************/ +guint +gl_color_combo_button_get_color (glColorComboButton *this, + gboolean *is_default) +{ + if (is_default) + { + *is_default = this->priv->is_default_flag; + } + + return this->priv->color; +} + + +/*****************************************************************************/ +/** Set relief style. */ +/*****************************************************************************/ +void +gl_color_combo_button_set_relief( glColorComboButton *this, + GtkReliefStyle relief ) +{ + gtk_button_set_relief (GTK_BUTTON (this->priv->button), relief); +} + + +/*****************************************************************************/ +/* Color button "clicked" callback. */ +/*****************************************************************************/ +static void +button_clicked_cb( glColorComboButton *this ) +{ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->button), + FALSE); + + g_signal_emit (this, signals[COLOR_CHANGED], 0, + this->priv->color, + this->priv->is_default_flag); +} + + +/*****************************************************************************/ +/* Menu positioning function. */ +/*****************************************************************************/ +static void +menu_position_function (GtkMenu *menu, + gint *x, + gint *y, + gboolean *push_in, + gpointer user_data) +{ + glColorComboButton *this = GL_COLOR_COMBO_BUTTON (user_data); + gint x1, y1; + gint menu_h, menu_w; + + gdk_window_get_origin (GTK_WIDGET (this)->window, &x1, &y1); + *x = x1 + GTK_WIDGET (this)->allocation.x; + *y = y1 + GTK_WIDGET (this)->allocation.y + + GTK_WIDGET (this)->allocation.height; + + menu_h = this->priv->menu->allocation.height; + menu_w = this->priv->menu->allocation.width; + + if ((*y + menu_h) > gdk_screen_height ()) + { + *y = y1 + GTK_WIDGET (this)->allocation.y - menu_h; + if ( *y < 0 ) + { + *y = gdk_screen_height () - menu_h; + } + } + + if ((*x + menu_w) > gdk_screen_width ()) + { + *x = gdk_screen_width () - menu_w; + } + + *push_in = TRUE; +} + + +/*****************************************************************************/ +/* Dropdown button "button_press_event" callback. */ +/*****************************************************************************/ +static gboolean +dropdown_button_press_event_cb (GtkWidget *widget, + GdkEventButton *event, + glColorComboButton *this) +{ + switch (event->button) + { + + case 1: + g_signal_handlers_block_by_func (G_OBJECT (this->priv->button), + button_clicked_cb, this); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->button), + TRUE); + g_signal_handlers_unblock_by_func (G_OBJECT (this->priv->button), + button_clicked_cb, this); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->dropdown_button), + TRUE); + + gtk_menu_popup (GTK_MENU (this->priv->menu), + NULL, NULL, + menu_position_function, this, + event->button, event->time); + break; + + default: + break; + + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Menu "color changed" callback. */ +/*****************************************************************************/ +static void +menu_color_changed_cb (glColorComboMenu *object, + guint color, + gboolean is_default, + glColorComboButton *this) +{ + if (is_default) + { + this->priv->color = this->priv->default_color; + } + else + { + this->priv->color = color; + } + this->priv->is_default_flag = is_default; + + gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), + this->priv->color); + + g_signal_emit (this, signals[COLOR_CHANGED], 0, + this->priv->color, + this->priv->is_default_flag); +} + + +/*****************************************************************************/ +/* Menu "color changed" callback. */ +/*****************************************************************************/ +static void +menu_selection_done_cb (GtkMenuShell *object, + glColorComboButton *this) +{ + g_signal_handlers_block_by_func (G_OBJECT (this->priv->button), + button_clicked_cb, this); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->button), + FALSE); + g_signal_handlers_unblock_by_func (G_OBJECT (this->priv->button), + button_clicked_cb, this); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this->priv->dropdown_button), + FALSE); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-combo-button.h b/src/color-combo-button.h new file mode 100644 index 00000000..f5878476 --- /dev/null +++ b/src/color-combo-button.h @@ -0,0 +1,95 @@ +/* + * color-combo-button.h + * Copyright (C) 2008-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __GL_COLOR_COMBO_BUTTON_H__ +#define __GL_COLOR_COMBO_BUTTON_H__ + + +#include + + +G_BEGIN_DECLS + +#define TYPE_GL_COLOR_COMBO_BUTTON (gl_color_combo_button_get_type ()) +#define GL_COLOR_COMBO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GL_COLOR_COMBO_BUTTON, glColorComboButton)) +#define GL_COLOR_COMBO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GL_COLOR_COMBO_BUTTON, glColorComboButtonClass)) +#define IS_GL_COLOR_COMBO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GL_COLOR_COMBO_BUTTON)) +#define IS_GL_COLOR_COMBO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GL_COLOR_COMBO_BUTTON)) +#define GL_COLOR_COMBO_BUTTON_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), TYPE_GL_COLOR_COMBO_BUTTON, glColorComboButtonClass)) + + +typedef struct _glColorComboButton glColorComboButton; +typedef struct _glColorComboButtonPrivate glColorComboButtonPrivate; +typedef struct _glColorComboButtonClass glColorComboButtonClass; + + +struct _glColorComboButton { + GtkHBox parent; + + glColorComboButtonPrivate *priv; +}; + +struct _glColorComboButtonClass { + GtkHBoxClass parent_class; + + /* + * Signals + */ + void (*color_changed) (glColorComboButton *object, + guint color, + gboolean is_default, + gpointer user_data); + +}; + + +GType gl_color_combo_button_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_color_combo_button_new (GdkPixbuf *icon, + const gchar *default_label, + guint default_color, + guint color); + +void gl_color_combo_button_set_color (glColorComboButton *this, + guint color); + +void gl_color_combo_button_set_to_default (glColorComboButton *this); + +guint gl_color_combo_button_get_color (glColorComboButton *this, + gboolean *is_default); + +void gl_color_combo_button_set_relief (glColorComboButton *this, + GtkReliefStyle relief); + + +G_END_DECLS + +#endif /* __GL_COLOR_COMBO_BUTTON_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-combo-color-menu-item.c b/src/color-combo-color-menu-item.c new file mode 100644 index 00000000..bdaca24a --- /dev/null +++ b/src/color-combo-color-menu-item.c @@ -0,0 +1,170 @@ +/* + * color-combo-color-menu-item.c + * Copyright (C) 2008 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "color-combo-color-menu-item.h" + +#include +#include + +#include "color-swatch.h" +#include "color.h" +#include "marshal.h" + + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + +#define SIZE 20 + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glColorComboColorMenuItemPrivate { + + gint id; + + GtkWidget *swatch; +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_color_combo_color_menu_item_finalize (GObject *object); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glColorComboColorMenuItem, gl_color_combo_color_menu_item, GTK_TYPE_MENU_ITEM); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_color_menu_item_class_init (glColorComboColorMenuItemClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + + gl_color_combo_color_menu_item_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_color_combo_color_menu_item_finalize; +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_color_menu_item_init (glColorComboColorMenuItem *this) +{ + this->priv = g_new0 (glColorComboColorMenuItemPrivate, 1); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_color_combo_color_menu_item_finalize (GObject *object) +{ + glColorComboColorMenuItem *this = GL_COLOR_COMBO_COLOR_MENU_ITEM (object); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_COLOR_COMBO_COLOR_MENU_ITEM (object)); + + g_free (this->priv); + + G_OBJECT_CLASS (gl_color_combo_color_menu_item_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_color_combo_color_menu_item_new (gint id, + guint color, + const gchar *tip) +{ + glColorComboColorMenuItem *this; + + this = g_object_new (GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM, NULL); + + this->priv->id = id; + + this->priv->swatch = gl_color_swatch_new (SIZE, SIZE, color); + gtk_container_add (GTK_CONTAINER (this), this->priv->swatch); + + gtk_widget_set_tooltip_text (GTK_WIDGET (this), tip); + + return GTK_WIDGET (this); +} + + +/*****************************************************************************/ +/* Set color. */ +/*****************************************************************************/ +void +gl_color_combo_color_menu_item_set_color(glColorComboColorMenuItem *this, + gint id, + guint color, + const gchar *tip) +{ + this->priv->id = id; + + gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), color); + + gtk_widget_set_tooltip_text (GTK_WIDGET (this), tip); +} + + +/*****************************************************************************/ +/* Get id. */ +/*****************************************************************************/ +gint +gl_color_combo_color_menu_item_get_id (glColorComboColorMenuItem *this) +{ + return this->priv->id; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-combo-color-menu-item.h b/src/color-combo-color-menu-item.h new file mode 100644 index 00000000..15d59353 --- /dev/null +++ b/src/color-combo-color-menu-item.h @@ -0,0 +1,82 @@ +/* + * color-combo-color-menu-item.h + * Copyright (C) 2008 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __COLOR_COMBO_COLOR_MENU_ITEM_H__ +#define __COLOR_COMBO_COLOR_MENU_ITEM_H__ + + +#include + + +G_BEGIN_DECLS + +#define GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM (gl_color_combo_color_menu_item_get_type ()) +#define GL_COLOR_COMBO_COLOR_MENU_ITEM(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM, glColorComboColorMenuItem )) +#define GL_COLOR_COMBO_COLOR_MENU_ITEM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM, glColorComboColorMenuItemClass)) +#define GL_IS_COLOR_COMBO_COLOR_MENU_ITEM(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM)) +#define GL_IS_COLOR_COMBO_COLOR_MENU_ITEM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_COLOR_COMBO_COLOR_MENU_ITEM)) + +typedef struct _glColorComboColorMenuItem glColorComboColorMenuItem; +typedef struct _glColorComboColorMenuItemPrivate glColorComboColorMenuItemPrivate; +typedef struct _glColorComboColorMenuItemClass glColorComboColorMenuItemClass; + +struct _glColorComboColorMenuItem { + GtkMenuItem parent_widget; + + glColorComboColorMenuItemPrivate *priv; +}; + +struct _glColorComboColorMenuItemClass { + GtkMenuItemClass parent_class; +}; + + +GType gl_color_combo_color_menu_item_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_color_combo_color_menu_item_new (gint id, + guint color, + const gchar *tip); + +gint gl_color_combo_color_menu_item_get_id (glColorComboColorMenuItem *this); + +void gl_color_combo_color_menu_item_set_color(glColorComboColorMenuItem *this, + gint id, + guint color, + const gchar *tip); + + +G_END_DECLS + +#endif /* __COLOR_COMBO_COLOR_MENU_ITEM_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-combo-history.c b/src/color-combo-history.c new file mode 100644 index 00000000..31eacf49 --- /dev/null +++ b/src/color-combo-history.c @@ -0,0 +1,181 @@ +/* + * color-combo-history.c + * Copyright (C) 2008 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "color-combo-history.h" + +#include "color.h" + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +/** GL_COLOR_COMBO_HISTORY Private fields */ +struct _glColorComboHistoryPrivate { + + guint max_n; + + guint n; + guint *color; +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_color_combo_history_finalize (GObject *object); + + +/*****************************************************************************/ +/* Object infrastructure. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glColorComboHistory, gl_color_combo_history, G_TYPE_OBJECT); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_history_class_init (glColorComboHistoryClass *class) +{ + GObjectClass *gobject_class = (GObjectClass *) class; + + gl_color_combo_history_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_color_combo_history_finalize; +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_history_init (glColorComboHistory *this) +{ + this->priv = g_new0 (glColorComboHistoryPrivate, 1); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_color_combo_history_finalize (GObject *object) +{ + glColorComboHistory *this; + + g_return_if_fail (object && IS_GL_COLOR_COMBO_HISTORY (object)); + this = GL_COLOR_COMBO_HISTORY (object); + + g_free (this->priv->color); + g_free (this->priv); + + G_OBJECT_CLASS (gl_color_combo_history_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +glColorComboHistory * +gl_color_combo_history_new (guint n) +{ + glColorComboHistory *this; + + this = g_object_new (TYPE_GL_COLOR_COMBO_HISTORY, NULL); + + this->priv->max_n = n; + this->priv->n = 0; + if (n > 0) + { + this->priv->color = g_new0 (guint, n); + } + + return this; +} + + +/*****************************************************************************/ +/* Add color to history. */ +/*****************************************************************************/ +void +gl_color_combo_history_add_color (glColorComboHistory *this, + guint color) +{ + guint i; + + /* + * First check for duplicate color. + */ + for ( i=0; i < this->priv->n; i++ ) + { + if ( this->priv->color[i] == color ) + { + return; + } + } + + /* + * Simple case. + */ + if ( this->priv->n < this->priv->max_n ) + { + this->priv->color[ this->priv->n ] = color; + this->priv->n++; + + return; + } + + /* Move colors down, dropping oldest. */ + for ( i=0; i < (this->priv->n - 1); i++ ) + { + this->priv->color[i] = this->priv->color[i+1]; + } + this->priv->color[ this->priv->n - 1 ] = color; +} + +/*****************************************************************************/ +/* Get color. */ +/*****************************************************************************/ +guint +gl_color_combo_history_get_color (glColorComboHistory *this, + guint i) +{ + return this->priv->color[i]; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-combo-history.h b/src/color-combo-history.h new file mode 100644 index 00000000..a5439a39 --- /dev/null +++ b/src/color-combo-history.h @@ -0,0 +1,82 @@ +/* + * color-combo-history.h + * Copyright (C) 2008 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __GL_COLOR_COMBO_HISTORY_H__ +#define __GL_COLOR_COMBO_HISTORY_H__ + + +#include + + +G_BEGIN_DECLS + +/* Utility Macros */ +#define TYPE_GL_COLOR_COMBO_HISTORY (gl_color_combo_history_get_type ()) +#define GL_COLOR_COMBO_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GL_COLOR_COMBO_HISTORY, glColorComboHistory)) +#define GL_COLOR_COMBO_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GL_COLOR_COMBO_HISTORY, glColorComboHistoryClass)) +#define IS_GL_COLOR_COMBO_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GL_COLOR_COMBO_HISTORY)) +#define IS_GL_COLOR_COMBO_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GL_COLOR_COMBO_HISTORY)) +#define GL_COLOR_COMBO_HISTORY_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), TYPE_GL_COLOR_COMBO_HISTORY, glColorComboHistoryClass)) + + +/* Type definitions */ +typedef struct _glColorComboHistory glColorComboHistory; +typedef struct _glColorComboHistoryPrivate glColorComboHistoryPrivate; +typedef struct _glColorComboHistoryClass glColorComboHistoryClass; + + +/** GL_COLOR_COMBO_HISTORY Object */ +struct _glColorComboHistory { + GObject parent; + + glColorComboHistoryPrivate *priv; +}; + +/** GL_COLOR_COMBO_HISTORY Class */ +struct _glColorComboHistoryClass { + GObjectClass parent_class; +}; + + +GType gl_color_combo_history_get_type (void) G_GNUC_CONST; + +glColorComboHistory *gl_color_combo_history_new (guint n); + +void gl_color_combo_history_add_color (glColorComboHistory *this, + guint color); + +guint gl_color_combo_history_get_color (glColorComboHistory *this, + guint i); + + +G_END_DECLS + +#endif /* __GL_COLOR_COMBO_HISTORY_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-combo-menu.c b/src/color-combo-menu.c new file mode 100644 index 00000000..d24a233b --- /dev/null +++ b/src/color-combo-menu.c @@ -0,0 +1,452 @@ +/* + * color-combo-menu.c + * Copyright (C) 2008 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "color-combo-menu.h" + +#include +#include + +#include "color-combo-color-menu-item.h" +#include "color-combo-history.h" +#include "color.h" +#include "marshal.h" + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + +#define PALETTE_COLS 7 +#define PALETTE_ROWS (G_N_ELEMENTS(color_table)/PALETTE_COLS + (G_N_ELEMENTS(color_table)%PALETTE_COLS ? 1 : 0)) + +#define ROW_DEFAULT (0) +#define ROW_SEP_1 (ROW_DEFAULT + 1) +#define ROW_PALETTE (ROW_SEP_1 + 1) +#define ROW_SEP_2 (ROW_PALETTE + PALETTE_ROWS) +#define ROW_HISTORY (ROW_SEP_2 + 1) +#define ROW_SEP_3 (ROW_HISTORY + 1) +#define ROW_CUSTOM (ROW_SEP_3 + 1) + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glColorComboMenuPrivate { + + GtkWidget *default_menu_item; + GtkWidget *custom_menu_item; + + GtkWidget *history_menu_item[PALETTE_COLS]; + + guint color; +}; + +enum { + COLOR_CHANGED, + LAST_SIGNAL +}; + +typedef struct { + guint color; + gchar *name; +} ColorTableEntry; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +static guint signals[LAST_SIGNAL] = {0}; + +static ColorTableEntry color_table[] = +{ + + { GL_COLOR (139, 0, 0), N_("Dark Red") }, + { GL_COLOR (165, 42, 42), N_("Brown") }, + { GL_COLOR (205, 149, 12), N_("Dark Goldenrod") }, + { GL_COLOR ( 0, 100, 0), N_("Dark Green") }, + { GL_COLOR ( 0, 139, 139), N_("Dark Cyan") }, + { GL_COLOR ( 0, 0, 128), N_("Navy Blue") }, + { GL_COLOR (148, 0, 211), N_("Dark Violet") }, + + { GL_COLOR (255, 0, 0), N_("Red") }, + { GL_COLOR (255, 165, 0), N_("Orange") }, + { GL_COLOR (205, 205, 0), N_("Dark Yellow") }, + { GL_COLOR ( 0, 205, 0), N_("Medium green") }, + { GL_COLOR ( 64, 224, 208), N_("Turquoise") }, + { GL_COLOR ( 0, 0, 255), N_("Blue") }, + { GL_COLOR (160, 32, 240), N_("Purple") }, + + { GL_COLOR (250, 128, 114), N_("Salmon") }, + { GL_COLOR (255, 215, 0), N_("Gold") }, + { GL_COLOR (255, 255, 0), N_("Yellow") }, + { GL_COLOR ( 0, 255, 0), N_("Green") }, + { GL_COLOR ( 0, 255, 255), N_("Cyan") }, + { GL_COLOR (135, 206, 235), N_("SkyBlue") }, + { GL_COLOR (238, 130, 238), N_("Violet") }, + + { GL_COLOR (255, 192, 203), N_("Pink") }, + { GL_COLOR (255, 246, 143), N_("Khaki") }, + { GL_COLOR (255, 255, 224), N_("Light Yellow") }, + { GL_COLOR (144, 238, 144), N_("Light Green") }, + { GL_COLOR (224, 255, 255), N_("Light Cyan") }, + { GL_COLOR (198, 226, 255), N_("Slate Gray") }, + { GL_COLOR (216, 191, 216), N_("Thistle") }, + + { GL_COLOR (255, 255, 255), N_("White") }, + { GL_COLOR (230, 230, 230), N_("10% Gray") }, + { GL_COLOR (192, 192, 192), N_("25% Gray") }, + { GL_COLOR (153, 153, 153), N_("40% Gray") }, + { GL_COLOR (128, 128, 128), N_("50% Gray") }, + { GL_COLOR (102, 102, 102), N_("60% Gray") }, + { GL_COLOR ( 0, 0, 0), N_("Black") }, + +}; + +static glColorComboHistory *custom_color_history = NULL; + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_color_combo_menu_finalize (GObject *object); + +static void load_custom_color_history (glColorComboMenu *this); + +static gboolean map_event_cb (GtkWidget *widget, + GdkEventAny *event); + +static void default_menu_item_activate_cb (glColorComboMenu *this); +static void custom_menu_item_activate_cb (glColorComboMenu *this); + +static void palette_menu_item_activate_cb (GtkMenuItem *item, + glColorComboMenu *this); + +static void history_menu_item_activate_cb (GtkMenuItem *item, + glColorComboMenu *this); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glColorComboMenu, gl_color_combo_menu, GTK_TYPE_MENU); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_menu_class_init (glColorComboMenuClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); + + gl_color_combo_menu_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_color_combo_menu_finalize; + + widget_class->map_event = map_event_cb; + + signals[COLOR_CHANGED] = + g_signal_new ("color_changed", + G_OBJECT_CLASS_TYPE (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glColorComboMenuClass, color_changed), + NULL, NULL, + gl_marshal_VOID__UINT_BOOLEAN, + G_TYPE_NONE, + 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_menu_init (glColorComboMenu *this) +{ + GtkWidget *separator_menu_item; + gint i, i_row, i_col; + GtkWidget *palette_menu_item; + + + /* + * Initialize history, if needed. + */ + if ( !custom_color_history ) + { + custom_color_history = gl_color_combo_history_new (PALETTE_COLS); + } + + + this->priv = g_new0 (glColorComboMenuPrivate, 1); + + this->priv->default_menu_item = gtk_menu_item_new_with_label (""); + gtk_menu_attach (GTK_MENU (this), this->priv->default_menu_item, + 0, PALETTE_COLS, ROW_DEFAULT, ROW_DEFAULT+1); + + separator_menu_item = gtk_separator_menu_item_new (); + gtk_menu_attach (GTK_MENU (this), separator_menu_item, + 0, PALETTE_COLS, ROW_SEP_1, ROW_SEP_1+1); + + for ( i=0; i < G_N_ELEMENTS(color_table); i++ ) + { + + i_row = i / PALETTE_COLS; + i_col = i % PALETTE_COLS; + + palette_menu_item = gl_color_combo_color_menu_item_new (i, + color_table[i].color, + color_table[i].name); + g_signal_connect (palette_menu_item, "activate", + G_CALLBACK (palette_menu_item_activate_cb), this); + + gtk_menu_attach (GTK_MENU (this), palette_menu_item, + i_col, i_col+1, + ROW_PALETTE+i_row, ROW_PALETTE+i_row+1); + } + + separator_menu_item = gtk_separator_menu_item_new (); + gtk_menu_attach (GTK_MENU (this), separator_menu_item, + 0, PALETTE_COLS, ROW_SEP_2, ROW_SEP_2+1); + + for ( i=0; i < PALETTE_COLS; i++ ) + { + this->priv->history_menu_item[i] = + gl_color_combo_color_menu_item_new (i, 0, NULL); + gtk_widget_set_sensitive (this->priv->history_menu_item[i], FALSE); + g_signal_connect (this->priv->history_menu_item[i], "activate", + G_CALLBACK (history_menu_item_activate_cb), this); + gtk_menu_attach (GTK_MENU (this), this->priv->history_menu_item[i], + i, i+1, + ROW_HISTORY, ROW_HISTORY+1); + } + + separator_menu_item = gtk_separator_menu_item_new (); + gtk_menu_attach (GTK_MENU (this), separator_menu_item, + 0, PALETTE_COLS, ROW_SEP_3, ROW_SEP_3+1); + + this->priv->custom_menu_item = gtk_menu_item_new_with_label (_("Custom Color")); + gtk_menu_attach (GTK_MENU (this), this->priv->custom_menu_item, + 0, PALETTE_COLS, ROW_CUSTOM, ROW_CUSTOM+1); + + g_signal_connect_swapped (this->priv->default_menu_item, "activate", + G_CALLBACK (default_menu_item_activate_cb), this); + g_signal_connect_swapped (this->priv->custom_menu_item, "activate", + G_CALLBACK (custom_menu_item_activate_cb), this); + +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_color_combo_menu_finalize (GObject *object) +{ + glColorComboMenu *this = GL_COLOR_COMBO_MENU (object); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_COLOR_COMBO_MENU (object)); + + g_free (this->priv); + + G_OBJECT_CLASS (gl_color_combo_menu_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_color_combo_menu_new (const gchar *default_label, + guint color) +{ + glColorComboMenu *this; + + this = g_object_new (gl_color_combo_menu_get_type (), NULL); + + gtk_label_set_text ( GTK_LABEL (gtk_bin_get_child (GTK_BIN (this->priv->default_menu_item))), + default_label); + + this->priv->color = color; + + return GTK_WIDGET (this); +} + + +/*****************************************************************************/ +/* Load menu with custom color history. */ +/*****************************************************************************/ +static void +load_custom_color_history (glColorComboMenu *this) +{ + guint i; + guint color; + gchar *tip; + + for ( i=0; i < PALETTE_COLS; i++ ) + { + color = gl_color_combo_history_get_color (custom_color_history, i); + + if (color) + { + tip = g_strdup_printf (_("Custom Color #%u"), i+1); + + gl_color_combo_color_menu_item_set_color (GL_COLOR_COMBO_COLOR_MENU_ITEM (this->priv->history_menu_item[i]), + i, + color, + tip); + g_free (tip); + gtk_widget_set_sensitive (this->priv->history_menu_item[i], TRUE); + } + } +} + + +/*****************************************************************************/ +/* Map event callback. */ +/*****************************************************************************/ +static gboolean +map_event_cb (GtkWidget *widget, + GdkEventAny *event) +{ + glColorComboMenu *this = GL_COLOR_COMBO_MENU (widget); + + load_custom_color_history (this); + + return FALSE; +} + + +/*****************************************************************************/ +/* "Default" menu_item activate callback. */ +/*****************************************************************************/ +static void +default_menu_item_activate_cb (glColorComboMenu *this) +{ + g_signal_emit (this, signals[COLOR_CHANGED], 0, + NULL, TRUE); + + gtk_widget_hide (GTK_WIDGET (this)); +} + + +/*****************************************************************************/ +/* "Custom color" menu_item activate callback. */ +/*****************************************************************************/ +static void +custom_menu_item_activate_cb (glColorComboMenu *this) +{ + GtkWidget *custom_dialog; + GtkWidget *colorsel; + gint response; + GdkColor color; + + gtk_widget_hide (GTK_WIDGET (this)); + + custom_dialog = gtk_color_selection_dialog_new (_("Custom Color")); + + colorsel = GTK_COLOR_SELECTION_DIALOG (custom_dialog)->colorsel; + color.red = GL_COLOR_F_RED (this->priv->color) * 65535; + color.green = GL_COLOR_F_GREEN (this->priv->color) * 65535; + color.blue = GL_COLOR_F_BLUE (this->priv->color) * 65535; + + gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (colorsel), + &color); + + response = gtk_dialog_run (GTK_DIALOG (custom_dialog)); + + switch (response) { + + case GTK_RESPONSE_OK: + gtk_color_selection_get_current_color (GTK_COLOR_SELECTION (colorsel), + &color); + this->priv->color = GL_COLOR ((color.red >>8), + (color.green >>8), + (color.blue >>8)); + + gl_color_combo_history_add_color (custom_color_history, + this->priv->color); + + g_signal_emit (this, signals[COLOR_CHANGED], 0, + this->priv->color, FALSE); + + gtk_widget_destroy (custom_dialog); + break; + default: + gtk_widget_destroy (custom_dialog); + break; + } +} + + +/*****************************************************************************/ +/* Palette color changed callback. */ +/*****************************************************************************/ +static void +palette_menu_item_activate_cb (GtkMenuItem *item, + glColorComboMenu *this) +{ + gint i; + + i = gl_color_combo_color_menu_item_get_id (GL_COLOR_COMBO_COLOR_MENU_ITEM (item)); + + this->priv->color = color_table[i].color; + + g_signal_emit (this, signals[COLOR_CHANGED], 0, + this->priv->color, FALSE); + + gtk_widget_hide (GTK_WIDGET (this)); +} + +/*****************************************************************************/ +/* History color menu item callback. */ +/*****************************************************************************/ +static void +history_menu_item_activate_cb (GtkMenuItem *item, + glColorComboMenu *this) +{ + gint i; + + i = gl_color_combo_color_menu_item_get_id (GL_COLOR_COMBO_COLOR_MENU_ITEM (item)); + + this->priv->color = gl_color_combo_history_get_color (custom_color_history, + i); + + g_signal_emit (this, signals[COLOR_CHANGED], 0, + this->priv->color, FALSE); + + gtk_widget_hide (GTK_WIDGET (this)); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-combo-menu.h b/src/color-combo-menu.h new file mode 100644 index 00000000..e309e0a0 --- /dev/null +++ b/src/color-combo-menu.h @@ -0,0 +1,84 @@ +/* + * color-combo-menu.h + * Copyright (C) 2008 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __COLOR_COMBO_MENU_H__ +#define __COLOR_COMBO_MENU_H__ + +#include + + +G_BEGIN_DECLS + +#define GL_TYPE_COLOR_COMBO_MENU (gl_color_combo_menu_get_type ()) +#define GL_COLOR_COMBO_MENU(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_COLOR_COMBO_MENU, glColorComboMenu )) +#define GL_COLOR_COMBO_MENU_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_COLOR_COMBO_MENU, glColorComboMenuClass)) +#define GL_IS_COLOR_COMBO_MENU(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_COLOR_COMBO_MENU)) +#define GL_IS_COLOR_COMBO_MENU_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_COLOR_COMBO_MENU)) + +typedef struct _glColorComboMenu glColorComboMenu; +typedef struct _glColorComboMenuPrivate glColorComboMenuPrivate; +typedef struct _glColorComboMenuClass glColorComboMenuClass; + +struct _glColorComboMenu { + GtkMenu parent_widget; + + glColorComboMenuPrivate *priv; +}; + +struct _glColorComboMenuClass { + GtkMenuClass parent_class; + + /* + * Signals + */ + void (*color_changed) (glColorComboMenu *object, + guint color, + gboolean is_default, + gpointer user_data); + +}; + + +GType gl_color_combo_menu_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_color_combo_menu_new (const gchar *default_label, + guint color); + + +G_END_DECLS + + +#endif /* __COLOR_COMBO_MENU_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ + diff --git a/src/color-combo.c b/src/color-combo.c new file mode 100644 index 00000000..250292d4 --- /dev/null +++ b/src/color-combo.c @@ -0,0 +1,353 @@ +/* + * color-combo.c + * Copyright (C) 2008-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "color-combo.h" + +#include +#include + +#include "color-combo-menu.h" +#include "color-swatch.h" +#include "color.h" +#include "marshal.h" + + +#define IMAGE_W 24 +#define IMAGE_H 24 + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +/** GL_COLOR_COMBO Private fields */ +struct _glColorComboPrivate { + + guint color; + gboolean is_default_flag; + + guint default_color; + + GtkWidget *swatch; + + GtkWidget *menu; +}; + +enum { + COLOR_CHANGED, + LAST_SIGNAL +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static guint signals[LAST_SIGNAL] = {0}; + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_color_combo_finalize (GObject *object); + +static gboolean +button_press_event_cb (GtkWidget *widget, + GdkEventButton *event, + glColorCombo *this); + +static void +menu_color_changed_cb (glColorComboMenu *object, + guint color, + gboolean is_default, + glColorCombo *this); + +static void +menu_selection_done_cb (GtkMenuShell *object, + glColorCombo *this); + + +/*****************************************************************************/ +/* Object infrastructure. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glColorCombo, gl_color_combo, GTK_TYPE_TOGGLE_BUTTON); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_class_init (glColorComboClass *class) +{ + GObjectClass *gobject_class = (GObjectClass *) class; + + gl_color_combo_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_color_combo_finalize; + + signals[COLOR_CHANGED] = + g_signal_new ("color_changed", + G_OBJECT_CLASS_TYPE (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glColorComboClass, color_changed), + NULL, NULL, + gl_marshal_VOID__UINT_BOOLEAN, + G_TYPE_NONE, + 2, G_TYPE_POINTER, G_TYPE_BOOLEAN); + +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_color_combo_init (glColorCombo *this) +{ + GtkWidget *hbox; + GtkWidget *arrow; + + this->priv = g_new0 (glColorComboPrivate, 1); + + hbox = gtk_hbox_new (FALSE, 3); + gtk_container_add (GTK_CONTAINER (this), hbox); + + this->priv->swatch = gl_color_swatch_new (IMAGE_W, IMAGE_H, GL_COLOR_NONE); + gtk_box_pack_start (GTK_BOX (hbox), this->priv->swatch, TRUE, TRUE, 0); + + arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN); + gtk_box_pack_end (GTK_BOX (hbox), arrow, FALSE, FALSE, 0); + + g_signal_connect (this, "button_press_event", + G_CALLBACK(button_press_event_cb), this); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_color_combo_finalize (GObject *object) +{ + glColorCombo *this; + + g_return_if_fail (object && IS_GL_COLOR_COMBO (object)); + this = GL_COLOR_COMBO (object); + + g_object_ref_sink (this->priv->menu); + g_free (this->priv); + + G_OBJECT_CLASS (gl_color_combo_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_color_combo_new (const gchar *default_label, + guint default_color, + guint color) +{ + glColorCombo *this; + + this = g_object_new (TYPE_GL_COLOR_COMBO, NULL); + + if (!default_label) + { + default_label = _("Default Color"); + } + + this->priv->default_color = default_color; + this->priv->color = color; + + gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), color); + + this->priv->menu = gl_color_combo_menu_new (default_label, + color); + gtk_widget_show_all (this->priv->menu); + + g_signal_connect (this->priv->menu, "color_changed", + G_CALLBACK (menu_color_changed_cb), this); + g_signal_connect (this->priv->menu, "selection_done", + G_CALLBACK (menu_selection_done_cb), this); + + return GTK_WIDGET (this); +} + + +/*****************************************************************************/ +/* Set color. */ +/*****************************************************************************/ +void +gl_color_combo_set_color (glColorCombo *this, + guint color) +{ + this->priv->color = color; + + gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), color); +} + + +/*****************************************************************************/ +/* Set to default color. */ +/*****************************************************************************/ +void +gl_color_combo_set_to_default (glColorCombo *this) +{ + gl_color_combo_set_color (this, this->priv->default_color); +} + +/*****************************************************************************/ +/* Get color. */ +/*****************************************************************************/ +guint +gl_color_combo_get_color (glColorCombo *this, + gboolean *is_default) +{ + if (is_default) + { + *is_default = this->priv->is_default_flag; + } + + return this->priv->color; +} + + +/*****************************************************************************/ +/* Menu positioning function. */ +/*****************************************************************************/ +static void +menu_position_function (GtkMenu *menu, + gint *x, + gint *y, + gboolean *push_in, + gpointer user_data) +{ + glColorCombo *this = GL_COLOR_COMBO (user_data); + gint x1, y1; + gint menu_h, menu_w; + + gdk_window_get_origin (GTK_WIDGET (this)->window, &x1, &y1); + *x = x1 + GTK_WIDGET (this)->allocation.x; + *y = y1 + GTK_WIDGET (this)->allocation.y + + GTK_WIDGET (this)->allocation.height; + + menu_h = this->priv->menu->allocation.height; + menu_w = this->priv->menu->allocation.width; + + if ((*y + menu_h) > gdk_screen_height ()) + { + *y = y1 + GTK_WIDGET (this)->allocation.y - menu_h; + if ( *y < 0 ) + { + *y = gdk_screen_height () - menu_h; + } + } + + if ((*x + menu_w) > gdk_screen_width ()) + { + *x = gdk_screen_width () - menu_w; + } + + *push_in = TRUE; +} + + +/*****************************************************************************/ +/* Button "button_press_event" callback. */ +/*****************************************************************************/ +static gboolean +button_press_event_cb (GtkWidget *widget, + GdkEventButton *event, + glColorCombo *this) +{ + switch (event->button) + { + + case 1: + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this), TRUE); + + gtk_menu_popup (GTK_MENU (this->priv->menu), + NULL, NULL, + menu_position_function, this, + event->button, event->time); + break; + + default: + break; + + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Menu "color changed" callback. */ +/*****************************************************************************/ +static void +menu_color_changed_cb (glColorComboMenu *object, + guint color, + gboolean is_default, + glColorCombo *this) +{ + if (is_default) + { + this->priv->color = this->priv->default_color; + } + else + { + this->priv->color = color; + } + this->priv->is_default_flag = is_default; + + gl_color_swatch_set_color (GL_COLOR_SWATCH (this->priv->swatch), + this->priv->color); + + g_signal_emit (this, signals[COLOR_CHANGED], 0, + this->priv->color, + this->priv->is_default_flag); +} + + +/*****************************************************************************/ +/* Menu "color changed" callback. */ +/*****************************************************************************/ +static void +menu_selection_done_cb (GtkMenuShell *object, + glColorCombo *this) +{ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this), FALSE); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-combo.h b/src/color-combo.h new file mode 100644 index 00000000..baa928d9 --- /dev/null +++ b/src/color-combo.h @@ -0,0 +1,94 @@ +/* + * color-combo.h + * Copyright (C) 2008-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __GL_COLOR_COMBO_H__ +#define __GL_COLOR_COMBO_H__ + + +#include + + +G_BEGIN_DECLS + +#define TYPE_GL_COLOR_COMBO (gl_color_combo_get_type ()) +#define GL_COLOR_COMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GL_COLOR_COMBO, glColorCombo)) +#define GL_COLOR_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GL_COLOR_COMBO, glColorComboClass)) +#define IS_GL_COLOR_COMBO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GL_COLOR_COMBO)) +#define IS_GL_COLOR_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GL_COLOR_COMBO)) +#define GL_COLOR_COMBO_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), TYPE_GL_COLOR_COMBO, glColorComboClass)) + + +typedef struct _glColorCombo glColorCombo; +typedef struct _glColorComboPrivate glColorComboPrivate; +typedef struct _glColorComboClass glColorComboClass; + + +struct _glColorCombo { + GtkToggleButton parent; + + glColorComboPrivate *priv; +}; + +struct _glColorComboClass { + GtkToggleButtonClass parent_class; + + /* + * Signals + */ + void (*color_changed) (glColorCombo *object, + guint color, + gboolean is_default, + gpointer user_data); + +}; + + +GType gl_color_combo_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_color_combo_new (const gchar *default_label, + guint default_color, + guint color); + +void gl_color_combo_set_color (glColorCombo *this, + guint color); + +void gl_color_combo_set_to_default (glColorCombo *this); + +guint gl_color_combo_get_color (glColorCombo *this, + gboolean *is_default); + +void gl_color_combo_set_relief (glColorCombo *this, + GtkReliefStyle relief); + + +G_END_DECLS + +#endif /* __GL_COLOR_COMBO_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-swatch.c b/src/color-swatch.c new file mode 100644 index 00000000..ae71f1a7 --- /dev/null +++ b/src/color-swatch.c @@ -0,0 +1,260 @@ +/* + * color-swatch.c + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "color-swatch.h" + +#include "color.h" +#include "marshal.h" + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glColorSwatchPrivate { + + guint color; + +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_color_swatch_finalize (GObject *object); + +static void style_set_cb (GtkWidget *widget, + GtkStyle *previous_style); + +static void redraw (glColorSwatch *this); + +static gboolean expose_event_cb (GtkWidget *widget, + GdkEventExpose *event); + +static void draw_swatch (glColorSwatch *this, + cairo_t *cr); + + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glColorSwatch, gl_color_swatch, GTK_TYPE_DRAWING_AREA); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_color_swatch_class_init (glColorSwatchClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); + + gl_color_swatch_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_color_swatch_finalize; + + widget_class->expose_event = expose_event_cb; + widget_class->style_set = style_set_cb; +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_color_swatch_init (glColorSwatch *this) +{ + GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW); + + this->priv = g_new0 (glColorSwatchPrivate, 1); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_color_swatch_finalize (GObject *object) +{ + glColorSwatch *this = GL_COLOR_SWATCH (object); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_COLOR_SWATCH (object)); + + g_free (this->priv); + + G_OBJECT_CLASS (gl_color_swatch_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_color_swatch_new (gint w, + gint h, + guint color) +{ + glColorSwatch *this; + + this = g_object_new (GL_TYPE_COLOR_SWATCH, NULL); + + this->priv->color = color; + + gtk_widget_set_size_request (GTK_WIDGET (this), w, h); + + return GTK_WIDGET (this); +} + + +/*****************************************************************************/ +/* Set color. */ +/*****************************************************************************/ +void +gl_color_swatch_set_color (glColorSwatch *this, + guint color) +{ + this->priv->color = color; + + redraw (this); +} + + +/*--------------------------------------------------------------------------*/ +/* Style set handler (updates colors when style/theme changes). */ +/*--------------------------------------------------------------------------*/ +static void +style_set_cb (GtkWidget *widget, + GtkStyle *previous_style) +{ + redraw (GL_COLOR_SWATCH (widget)); +} + + +/*****************************************************************************/ +/* Request redraw. */ +/*****************************************************************************/ +static void +redraw (glColorSwatch *this) +{ + GdkRegion *region; + + if (GTK_WIDGET_REALIZED (GTK_WIDGET (this))) + { + /* redraw the cairo canvas forcing an expose event */ + region = gdk_drawable_get_clip_region (GTK_WIDGET (this)->window); + gdk_window_invalidate_region (GTK_WIDGET (this)->window, region, TRUE); + gdk_region_destroy (region); + } +} + + +/*****************************************************************************/ +/* "Expose event" callback. */ +/*****************************************************************************/ +static gboolean +expose_event_cb (GtkWidget *widget, + GdkEventExpose *event) +{ + cairo_t *cr; + + cr = gdk_cairo_create (widget->window); + + cairo_rectangle (cr, + event->area.x, event->area.y, + event->area.width, event->area.height); + cairo_clip (cr); + + cairo_translate (cr, widget->allocation.x, widget->allocation.y); + + draw_swatch (GL_COLOR_SWATCH (widget), cr); + + cairo_destroy (cr); + + return FALSE; +} + + +/*****************************************************************************/ +/* Draw swatch. */ +/*****************************************************************************/ +static void +draw_swatch (glColorSwatch *this, + cairo_t *cr) +{ + GtkStyle *style; + gdouble w, h; + guint fill_color, line_color; + + + cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); + + + w = GTK_WIDGET (this)->allocation.width; + h = GTK_WIDGET (this)->allocation.height; + + + style = gtk_widget_get_style (GTK_WIDGET (this)); + if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) ) + { + fill_color = this->priv->color; + line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); + } + else + { + fill_color = GL_COLOR_NONE; + line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_INSENSITIVE]); + } + + cairo_rectangle( cr, 0, 0, w-1, h-1 ); + + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); + cairo_fill_preserve( cr ); + + cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (line_color)); + cairo_set_line_width (cr, 1.0); + cairo_stroke (cr); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color-swatch.h b/src/color-swatch.h new file mode 100644 index 00000000..c6e05fb9 --- /dev/null +++ b/src/color-swatch.h @@ -0,0 +1,78 @@ +/* + * color-swatch.h + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __COLOR_SWATCH_H__ +#define __COLOR_SWATCH_H__ + + +#include + + +G_BEGIN_DECLS + +#define GL_TYPE_COLOR_SWATCH (gl_color_swatch_get_type ()) +#define GL_COLOR_SWATCH(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_COLOR_SWATCH, glColorSwatch )) +#define GL_COLOR_SWATCH_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_COLOR_SWATCH, glColorSwatchClass)) +#define GL_IS_COLOR_SWATCH(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_COLOR_SWATCH)) +#define GL_IS_COLOR_SWATCH_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_COLOR_SWATCH)) + +typedef struct _glColorSwatch glColorSwatch; +typedef struct _glColorSwatchPrivate glColorSwatchPrivate; +typedef struct _glColorSwatchClass glColorSwatchClass; + +struct _glColorSwatch { + GtkDrawingArea parent_widget; + + glColorSwatchPrivate *priv; +}; + +struct _glColorSwatchClass { + GtkDrawingAreaClass parent_class; +}; + + +GType gl_color_swatch_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_color_swatch_new (gint w, + gint h, + guint color); + +void gl_color_swatch_set_color(glColorSwatch *this, + guint color); + + +G_END_DECLS + +#endif /* __COLOR_SWATCH_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color.c b/src/color.c new file mode 100644 index 00000000..2a87c9e1 --- /dev/null +++ b/src/color.c @@ -0,0 +1,260 @@ +/* + * color.c + * Copyright (C) 2002-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "color.h" + +#include + + +/*****************************************************************************/ +/* Apply given opacity to given color. */ +/*****************************************************************************/ +guint +gl_color_set_opacity (guint color, + gdouble opacity) +{ + guint new_color; + + new_color = (color & 0xFFFFFF00) | (((guint)(255.0*opacity)) & 0xFF); + + return new_color; +} + + +/*****************************************************************************/ +/* Resolve actual shadow color by adjusting opacity. */ +/*****************************************************************************/ +guint +gl_color_shadow (guint base_color, + gdouble opacity, + guint object_color) +{ + guint color; + + color = gl_color_set_opacity (base_color, + opacity * GL_COLOR_F_ALPHA (object_color)); + + return color; +} + + +/*****************************************************************************/ +/* Convert gLabels color into a GdkColor */ +/*****************************************************************************/ +GdkColor * +gl_color_to_gdk_color (guint color) +{ + GdkColor *gdk_color; + + gdk_color = g_new0 (GdkColor, 1); + + gdk_color->red = GL_COLOR_F_RED (color) * 65535; + gdk_color->green = GL_COLOR_F_GREEN (color) * 65535; + gdk_color->blue = GL_COLOR_F_BLUE (color) * 65535; + + return gdk_color; +} + + +/*****************************************************************************/ +/* Convert GdkColor into a gLabels color */ +/*****************************************************************************/ +guint +gl_color_from_gdk_color (GdkColor *gdk_color) +{ + guint color; + + color = GL_COLOR ((gdk_color->red >>8), + (gdk_color->green >>8), + (gdk_color->blue >>8)); + + return color; +} + + +/****************************************************************************/ +/* Create a single color node with default color. */ +/****************************************************************************/ +glColorNode * +gl_color_node_new_default (void) +{ + glColorNode* color_node; + + color_node = g_new0(glColorNode,1); + + color_node->field_flag = FALSE; + color_node->color = GL_COLOR_NONE; + color_node->key = NULL; + + return color_node; +} + + +/****************************************************************************/ +/* Copy a single color node. */ +/****************************************************************************/ +glColorNode * +gl_color_node_dup (glColorNode *src) +{ + glColorNode *dst; + + if ( src == NULL ) return NULL; + + dst = g_new0 (glColorNode, 1); + + dst->field_flag = src->field_flag; + if (src->key != NULL) + { + dst->key = g_strdup (src->key); + } + else + { + dst->key = NULL; + } + dst->color = src->color; + + return dst; +} + + +/****************************************************************************/ +/* Compare 2 color nodes for equality. */ +/****************************************************************************/ +gboolean +gl_color_node_equal (glColorNode *color_node1, + glColorNode *color_node2) +{ + /* First take care of the case of either or both being NULL. */ + if ( color_node1 == NULL ) + { + return ( color_node2 == NULL ); + } + else + { + if ( color_node2 == NULL ) + { + return FALSE; + } + } + + /* Bail if field flags differ. */ + if ( color_node1->field_flag != color_node2->field_flag ) + { + return FALSE; + } + + /* Now take care of the case of either or both color fields being different. */ + if ( color_node1->color != color_node2->color ) + { + return FALSE; + } + + /* Then take care of the case of either or both key fields being NULL. */ + if ( color_node1->key == NULL ) + { + return ( color_node2->key == NULL ); + } + else + { + if ( color_node2->key == NULL ) + { + return FALSE; + } + } + + /* Field flags are identical, so now compare the keys. */ + return (strcmp (color_node1->key, color_node2->key) == 0); +} + + +/****************************************************************************/ +/* Expand single node into representative color. */ +/****************************************************************************/ +guint +gl_color_node_expand (glColorNode *color_node, + glMergeRecord *record) +{ + gchar *text; + GdkColor *gdk_color; + guint color; + + if (color_node->field_flag) + { + if (record == NULL) + { + return GL_COLOR_NONE; + } + else + { + text = gl_merge_eval_key (record, color_node->key); + if (text != NULL) + { + gdk_color = g_new0 (GdkColor, 1); + if (gdk_color_parse (text, gdk_color)) + { + color = gl_color_from_gdk_color (gdk_color); + g_free (gdk_color); + return color; + } + else + { + g_free (gdk_color); + return GL_COLOR_NONE; + } + } + else + { + return GL_COLOR_NONE; + } + } + } + else + { + return color_node->color; + } +} + + +/****************************************************************************/ +/* Free a single color node. */ +/****************************************************************************/ +void +gl_color_node_free (glColorNode **color_node) +{ + if ( *color_node == NULL ) return; + + g_free ((*color_node)->key); + (*color_node)->key = NULL; + g_free (*color_node); + *color_node = NULL; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/color.h b/src/color.h new file mode 100644 index 00000000..48feed7e --- /dev/null +++ b/src/color.h @@ -0,0 +1,133 @@ +/* + * color.h + * Copyright (C) 2002-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __COLOR_H__ +#define __COLOR_H__ + +#include "merge.h" +#include + +G_BEGIN_DECLS + +/* + * gLabels stores colors as a 32-bit unsigned integer in RGBA format (MSByte = Red) + */ +#define GL_COLOR(r,g,b) ( (((unsigned int) (r) & 0xff) << 24) \ + | (((unsigned int) (g) & 0xff) << 16) \ + | (((unsigned int) (b) & 0xff) << 8) \ + | 0xff ) + +#define GL_COLOR_A(r,g,b,a) ( (((unsigned int) (r) & 0xff) << 24) \ + | (((unsigned int) (g) & 0xff) << 16) \ + | (((unsigned int) (b) & 0xff) << 8) \ + | ( (unsigned int) (a) & 0xff ) ) + + +#define GL_COLOR_NONE GL_COLOR_A(0,0,0,0) +#define GL_COLOR_BLACK GL_COLOR_A(0,0,0,255) +#define GL_COLOR_WHITE GL_COLOR_A(255,255,255,255) + +#define GL_COLOR_TEXT_DEFAULT GL_COLOR_BLACK +#define GL_COLOR_BC_DEFAULT GL_COLOR_BLACK +#define GL_COLOR_NO_LINE GL_COLOR_NONE +#define GL_COLOR_NO_FILL GL_COLOR_NONE +#define GL_COLOR_FILL_MERGE_DEFAULT GL_COLOR_A(255,255,255,128) +#define GL_COLOR_MERGE_DEFAULT GL_COLOR_A(0,0,0,128) +#define GL_COLOR_SHADOW_DEFAULT GL_COLOR(0,0,0) +#define GL_COLOR_SHADOW_MERGE_DEFAULT GL_COLOR_A(0,0,0,255) + + +/* + * Extract components as floating point (0.0 .. 1.0) + */ +#define GL_COLOR_F_RED(x) ( (((x)>>24) & 0xff) / 255.0 ) +#define GL_COLOR_F_GREEN(x) ( (((x)>>16) & 0xff) / 255.0 ) +#define GL_COLOR_F_BLUE(x) ( (((x)>>8) & 0xff) / 255.0 ) +#define GL_COLOR_F_ALPHA(x) ( ( (x) & 0xff) / 255.0 ) + +/* + * Extract arguments for cairo_set_source_rgb() + */ +#define GL_COLOR_RGB_ARGS(x) \ + GL_COLOR_F_RED(x), \ + GL_COLOR_F_GREEN(x), \ + GL_COLOR_F_BLUE(x) + +/* + * Extract arguments for cairo_set_source_rgba() + */ +#define GL_COLOR_RGBA_ARGS(x) \ + GL_COLOR_F_RED(x), \ + GL_COLOR_F_GREEN(x), \ + GL_COLOR_F_BLUE(x), \ + GL_COLOR_F_ALPHA(x) + + + + +guint gl_color_set_opacity (guint color, + gdouble opacity); + +guint gl_color_shadow (guint base_color, + gdouble opacity, + guint object_color); + +/* + * Routines to convert to/from GdkColor. + */ +GdkColor *gl_color_to_gdk_color (guint color); + +guint gl_color_from_gdk_color (GdkColor *gdk_color); + + + +/* + * Color nodes + */ +typedef struct { + gboolean field_flag; + guint color; + gchar *key; +} glColorNode; + +glColorNode *gl_color_node_new_default (void); + +glColorNode *gl_color_node_dup (glColorNode *color_node); +gboolean gl_color_node_equal (glColorNode *color_node1, + glColorNode *color_node2); +guint gl_color_node_expand (glColorNode *color_node, + glMergeRecord *record); +void gl_color_node_free (glColorNode **color_node); + + +G_END_DECLS + +#endif /* __COLOR_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/combo-util.c b/src/combo-util.c new file mode 100644 index 00000000..0ca90f1f --- /dev/null +++ b/src/combo-util.c @@ -0,0 +1,148 @@ +/* + * combo-util.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "combo-util.h" + +#include + + +/****************************************************************************/ +/* Convienience function to set strings in a text combo_box from a GList */ +/****************************************************************************/ +void +gl_combo_util_set_strings (GtkComboBox *combo, + GList *list) +{ + GtkTreeModel *model; + GList *p; + + g_return_if_fail (list); + + model = gtk_combo_box_get_model(combo); + gtk_list_store_clear (GTK_LIST_STORE (model)); + + for (p=list; p!=NULL; p=p->next) { + if (p->data) { + gtk_combo_box_append_text (combo, p->data); + } + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. gl_combo_util_set_active_text support. */ +/*---------------------------------------------------------------------------*/ + +typedef struct { + const gchar *text; + GtkTreeIter iter; + gboolean found; +} TextSearchData; + +static gboolean +search_text_func (GtkTreeModel *model, + GtkTreePath *path, + GtkTreeIter *iter, + gpointer data) +{ + TextSearchData *search_data = (TextSearchData *)data; + gchar *text = NULL; + + gtk_tree_model_get (model, iter, 0, &text, -1); + + if (strcmp (text,search_data->text) == 0) { + search_data->found = TRUE; + search_data->iter = *iter; + } + + g_free (text); + + return FALSE; +} + + +/****************************************************************************/ +/* Convienience function to set active text in a text combo_box from text */ +/****************************************************************************/ +void +gl_combo_util_set_active_text (GtkComboBox *combo, + const gchar *text) +{ + GtkTreeModel *model = gtk_combo_box_get_model(combo); + + g_return_if_fail (GTK_IS_LIST_STORE (model)); + + if (!text) { + + gtk_combo_box_set_active (combo, -1); + + } else { + TextSearchData search_data; + + search_data.text = text; + search_data.found = FALSE; + + gtk_tree_model_foreach (model, search_text_func, &search_data); + if (search_data.found) { + gtk_combo_box_set_active_iter (combo, + &search_data.iter); + } else { + gtk_combo_box_set_active (combo, -1); + } + + } + +} + + +/****************************************************************************/ +/* Convienience function to add a simple text model to an existing */ +/* combo_box. This is needed since combo_boxes created with glade do not */ +/* use the gtk_combo_box_new_text() constructor. */ +/****************************************************************************/ +void +gl_combo_util_add_text_model (GtkComboBox *combo) +{ + GtkCellRenderer *cell; + GtkListStore *store; + + store = gtk_list_store_new (1, G_TYPE_STRING); + gtk_combo_box_set_model (combo, GTK_TREE_MODEL (store)); + g_object_unref (store); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, + "text", 0, + NULL); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/combo-util.h b/src/combo-util.h new file mode 100644 index 00000000..2205b6f2 --- /dev/null +++ b/src/combo-util.h @@ -0,0 +1,50 @@ +/* + * combo-util.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __COMBO_UTIL_H__ +#define __COMBO_UTIL_H__ + +#include +#include + +G_BEGIN_DECLS + +void gl_combo_util_set_strings (GtkComboBox *combo, + GList *list); + +void gl_combo_util_set_active_text (GtkComboBox *combo, + const gchar *text); + +void gl_combo_util_add_text_model (GtkComboBox *combo); + +G_END_DECLS + +#endif /* __COMBO_UTIL_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/critical-error-handler.c b/src/critical-error-handler.c new file mode 100644 index 00000000..0d9fed1d --- /dev/null +++ b/src/critical-error-handler.c @@ -0,0 +1,90 @@ +/* + * critical-error-handler.h + * Copyright (C) 2005-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "critical-error-handler.h" + +#include +#include +#include +#include + + +static void critical_error_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); + + +/***************************************************************************/ +/* Initialize error handler. */ +/***************************************************************************/ +void +gl_critical_error_handler_init (void) +{ + g_log_set_handler ("LibGlabels", + G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, + critical_error_handler, + "libglabels"); + + g_log_set_handler (G_LOG_DOMAIN, + G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, + critical_error_handler, + "glabels"); +} + + +/*-------------------------------------------------------------------------*/ +/* PRIVATE. Actual error handler. */ +/*-------------------------------------------------------------------------*/ +static void +critical_error_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data) +{ + GtkWidget *dialog; + + dialog = gtk_message_dialog_new (NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_NONE, + _("gLabels Fatal Error!")); + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), + "%s", message); + gtk_dialog_add_button (GTK_DIALOG (dialog), + GTK_STOCK_QUIT, 0); + + gtk_dialog_run (GTK_DIALOG (dialog)); + + abort (); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/critical-error-handler.h b/src/critical-error-handler.h new file mode 100644 index 00000000..e356ebf2 --- /dev/null +++ b/src/critical-error-handler.h @@ -0,0 +1,43 @@ +/* + * critical-error-handler.h + * Copyright (C) 2005-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __CRITICAL_ERROR_HANDLER_H__ +#define __CRITICAL_ERROR_HANDLER_H__ + +#include + +G_BEGIN_DECLS + +void gl_critical_error_handler_init (void); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/debug.c b/src/debug.c new file mode 100644 index 00000000..ce53820a --- /dev/null +++ b/src/debug.c @@ -0,0 +1,137 @@ +/* + * debug.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +/* + * This file is based on gedit-debug.c from gedit2: + * + * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence + * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi + * + */ + +#include "debug.h" + +#include + + +glDebugSection debug_flags = GLABELS_DEBUG_NONE; + + +/****************************************************************************/ +/* Initialize debug flags, based on environmental variables. */ +/****************************************************************************/ +void +gl_debug_init (void) +{ + if (g_getenv ("GLABELS_DEBUG") != NULL) + { + /* enable all debugging */ + debug_flags = ~GLABELS_DEBUG_NONE; + return; + } + + if (g_getenv ("GLABELS_DEBUG_VIEW") != NULL) + debug_flags |= GLABELS_DEBUG_VIEW; + if (g_getenv ("GLABELS_DEBUG_ITEM") != NULL) + debug_flags |= GLABELS_DEBUG_ITEM; + if (g_getenv ("GLABELS_DEBUG_PRINT") != NULL) + debug_flags |= GLABELS_DEBUG_PRINT; + if (g_getenv ("GLABELS_DEBUG_PREFS") != NULL) + debug_flags |= GLABELS_DEBUG_PREFS; + if (g_getenv ("GLABELS_DEBUG_FILE") != NULL) + debug_flags |= GLABELS_DEBUG_FILE; + if (g_getenv ("GLABELS_DEBUG_LABEL") != NULL) + debug_flags |= GLABELS_DEBUG_LABEL; + if (g_getenv ("GLABELS_DEBUG_TEMPLATE") != NULL) + debug_flags |= GLABELS_DEBUG_TEMPLATE; + if (g_getenv ("GLABELS_DEBUG_PAPER") != NULL) + debug_flags |= GLABELS_DEBUG_PAPER; + if (g_getenv ("GLABELS_DEBUG_XML") != NULL) + debug_flags |= GLABELS_DEBUG_XML; + if (g_getenv ("GLABELS_DEBUG_MERGE") != NULL) + debug_flags |= GLABELS_DEBUG_MERGE; + if (g_getenv ("GLABELS_DEBUG_UNDO") != NULL) + debug_flags |= GLABELS_DEBUG_UNDO; + if (g_getenv ("GLABELS_DEBUG_RECENT") != NULL) + debug_flags |= GLABELS_DEBUG_RECENT; + if (g_getenv ("GLABELS_DEBUG_COMMANDS") != NULL) + debug_flags |= GLABELS_DEBUG_COMMANDS; + if (g_getenv ("GLABELS_DEBUG_WINDOW") != NULL) + debug_flags |= GLABELS_DEBUG_WINDOW; + if (g_getenv ("GLABELS_DEBUG_UI") != NULL) + debug_flags |= GLABELS_DEBUG_UI; + if (g_getenv ("GLABELS_DEBUG_PROPERTY_BAR") != NULL) + debug_flags |= GLABELS_DEBUG_PROPERTY_BAR; + if (g_getenv ("GLABELS_DEBUG_MEDIA_SELECT") != NULL) + debug_flags |= GLABELS_DEBUG_MEDIA_SELECT; + if (g_getenv ("GLABELS_DEBUG_MINI_PREVIEW") != NULL) + debug_flags |= GLABELS_DEBUG_MINI_PREVIEW; + if (g_getenv ("GLABELS_DEBUG_PIXBUF_CACHE") != NULL) + debug_flags |= GLABELS_DEBUG_PIXBUF_CACHE; + if (g_getenv ("GLABELS_DEBUG_EDITOR") != NULL) + debug_flags |= GLABELS_DEBUG_EDITOR; + if (g_getenv ("GLABELS_DEBUG_WDGT") != NULL) + debug_flags |= GLABELS_DEBUG_WDGT; + if (g_getenv ("GLABELS_DEBUG_PATH") != NULL) + debug_flags |= GLABELS_DEBUG_PATH; + if (g_getenv ("GLABELS_DEBUG_MERGE_MENU") != NULL) + debug_flags |= GLABELS_DEBUG_MERGE_MENU; +} + + +/****************************************************************************/ +/* Print debugging information. */ +/****************************************************************************/ +void +gl_debug (glDebugSection section, + const gchar *file, + gint line, + const gchar *function, + const gchar *format, + ...) +{ + if (debug_flags & section) + { + va_list args; + gchar *msg; + + g_return_if_fail (format != NULL); + + va_start (args, format); + msg = g_strdup_vprintf (format, args); + va_end (args); + + g_print ("%s:%d (%s) %s\n", file, line, function, msg); + + g_free (msg); + } + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/debug.h b/src/debug.h new file mode 100644 index 00000000..6dced6d4 --- /dev/null +++ b/src/debug.h @@ -0,0 +1,119 @@ +/* + * debug.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +/* + * This file is based on gedit-debug.h from gedit2: + * + * Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence + * Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi + * + */ +#ifndef __DEBUG_H__ +#define __DEBUG_H__ + +#include + +G_BEGIN_DECLS + +/* + * Set an environmental var of the same name to turn on + * debugging output. Setting GLABELS_DEBUG will turn on all + * sections. + */ + +typedef enum { + GLABELS_DEBUG_NONE = 0, + GLABELS_DEBUG_VIEW = 1 << 0, + GLABELS_DEBUG_ITEM = 1 << 1, + GLABELS_DEBUG_PRINT = 1 << 2, + GLABELS_DEBUG_PREFS = 1 << 3, + GLABELS_DEBUG_FILE = 1 << 4, + GLABELS_DEBUG_LABEL = 1 << 5, + GLABELS_DEBUG_TEMPLATE = 1 << 6, + GLABELS_DEBUG_PAPER = 1 << 7, + GLABELS_DEBUG_XML = 1 << 8, + GLABELS_DEBUG_MERGE = 1 << 9, + GLABELS_DEBUG_UNDO = 1 << 10, + GLABELS_DEBUG_RECENT = 1 << 11, + GLABELS_DEBUG_COMMANDS = 1 << 12, + GLABELS_DEBUG_WINDOW = 1 << 13, + GLABELS_DEBUG_UI = 1 << 14, + GLABELS_DEBUG_PROPERTY_BAR = 1 << 15, + GLABELS_DEBUG_MEDIA_SELECT = 1 << 16, + GLABELS_DEBUG_MINI_PREVIEW = 1 << 17, + GLABELS_DEBUG_PIXBUF_CACHE = 1 << 18, + GLABELS_DEBUG_EDITOR = 1 << 19, + GLABELS_DEBUG_WDGT = 1 << 20, + GLABELS_DEBUG_PATH = 1 << 21, + GLABELS_DEBUG_MERGE_MENU = 1 << 22, +} glDebugSection; + + +#ifndef __GNUC__ +#define __FUNCTION__ "" +#endif + +#define DEBUG_VIEW GLABELS_DEBUG_VIEW, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_ITEM GLABELS_DEBUG_ITEM, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_PRINT GLABELS_DEBUG_PRINT, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_PREFS GLABELS_DEBUG_PREFS, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_FILE GLABELS_DEBUG_FILE, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_LABEL GLABELS_DEBUG_LABEL, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_TEMPLATE GLABELS_DEBUG_TEMPLATE,__FILE__, __LINE__, __FUNCTION__ +#define DEBUG_PAPER GLABELS_DEBUG_PAPER, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_XML GLABELS_DEBUG_XML, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_MERGE GLABELS_DEBUG_MERGE, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_UNDO GLABELS_DEBUG_UNDO, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_RECENT GLABELS_DEBUG_RECENT, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_COMMANDS GLABELS_DEBUG_COMMANDS,__FILE__, __LINE__, __FUNCTION__ +#define DEBUG_WINDOW GLABELS_DEBUG_WINDOW, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_UI GLABELS_DEBUG_UI, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_PROPERTY_BAR GLABELS_DEBUG_PROPERTY_BAR, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_MEDIA_SELECT GLABELS_DEBUG_MEDIA_SELECT, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_MINI_PREVIEW GLABELS_DEBUG_MINI_PREVIEW, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_PIXBUF_CACHE GLABELS_DEBUG_PIXBUF_CACHE, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_EDITOR GLABELS_DEBUG_EDITOR, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_WDGT GLABELS_DEBUG_WDGT, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_PATH GLABELS_DEBUG_PATH, __FILE__, __LINE__, __FUNCTION__ +#define DEBUG_MERGE_MENU GLABELS_DEBUG_MERGE_MENU, __FILE__, __LINE__, __FUNCTION__ + +void gl_debug_init (void); + +void gl_debug (glDebugSection section, + const gchar *file, + gint line, + const gchar *function, + const gchar *format, + ...); + +G_END_DECLS + +#endif /* __DEBUG_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/file-util.c b/src/file-util.c new file mode 100644 index 00000000..684c7faa --- /dev/null +++ b/src/file-util.c @@ -0,0 +1,101 @@ +/* + * file-util.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "file-util.h" + +#include + + +/****************************************************************************/ +/* Append ".glabels" extension to filename if needed. */ +/****************************************************************************/ +gchar * +gl_file_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; +} + + +/****************************************************************************/ +/* Remove ".glabels" extension from filename if needed. */ +/****************************************************************************/ +gchar * +gl_file_util_remove_extension (const gchar *orig_filename) +{ + gchar *new_filename, *extension; + + new_filename = g_strdup (orig_filename); + + extension = strrchr (new_filename, '.'); + if (extension != NULL) { + if (g_strcasecmp (extension, ".glabels") == 0) { + *extension = 0; /* truncate string, rm extension */ + } + } + + return new_filename; +} + + +/****************************************************************************/ +/* Make sure we have an absolute path to filename. */ +/****************************************************************************/ +gchar * +gl_file_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_build_filename (pwd, filename, NULL); + g_free (pwd); + } + + return absolute_filename; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/file-util.h b/src/file-util.h new file mode 100644 index 00000000..50c447c1 --- /dev/null +++ b/src/file-util.h @@ -0,0 +1,46 @@ +/* + * file-util.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __FILE_UTIL_H__ +#define __FILE_UTIL_H__ + +#include + +G_BEGIN_DECLS + +gchar *gl_file_util_add_extension (const gchar *orig_filename); +gchar *gl_file_util_remove_extension (const gchar *orig_filename); + +gchar *gl_file_util_make_absolute (const gchar *filename); + +G_END_DECLS + +#endif /* __FILE_UTIL_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/file.c b/src/file.c new file mode 100644 index 00000000..3f0c6336 --- /dev/null +++ b/src/file.c @@ -0,0 +1,860 @@ +/* + * file.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "file.h" + +#include +#include +#include + +#include "xml-label.h" +#include "recent.h" +#include "file-util.h" +#include "window.h" +#include "new-label-dialog.h" +#include "libglabels/libglabels.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +/* Saved state for new dialog */ +static gchar *page_size = NULL; +static gchar *category = 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 new_response (GtkDialog *dialog, + gint response, + gpointer user_data); + +static void properties_response (GtkDialog *dialog, + gint response, + gpointer user_data); + +static void open_response (GtkDialog *chooser, + gint response, + glWindow *window); +static void save_as_response (GtkDialog *chooser, + gint response, + glLabel *label); + + +/*****************************************************************************/ +/* "New" menu callback. */ +/*****************************************************************************/ +void +gl_file_new (glWindow *window) +{ + GtkWidget *dialog; + + gl_debug (DEBUG_FILE, "START"); + + g_return_if_fail (window && GTK_IS_WINDOW (window)); + + dialog = gl_new_label_dialog_new (GTK_WINDOW (window)); + gtk_window_set_title (GTK_WINDOW (dialog), _("New Label or Card")); + + g_object_set_data (G_OBJECT (dialog), "parent_window", window); + + g_signal_connect (G_OBJECT(dialog), "response", + G_CALLBACK (new_response), dialog); + + if (page_size != NULL) { + gl_new_label_dialog_set_filter_parameters (GL_NEW_LABEL_DIALOG (dialog), + page_size, + category); + } + if (sheet_name != NULL) { + gl_new_label_dialog_set_template_name (GL_NEW_LABEL_DIALOG (dialog), + sheet_name); + } + gl_new_label_dialog_set_rotate_state (GL_NEW_LABEL_DIALOG (dialog), rotate_flag); + + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); + gtk_widget_show_all (GTK_WIDGET (dialog)); + + gl_debug (DEBUG_FILE, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. New "ok" button callback. */ +/*---------------------------------------------------------------------------*/ +static void +new_response (GtkDialog *dialog, + gint response, + gpointer user_data) +{ + lglTemplate *template; + glLabel *label; + glWindow *window; + GtkWidget *new_window; + + gl_debug (DEBUG_FILE, "START"); + + switch (response) { + + case GTK_RESPONSE_OK: + + gl_new_label_dialog_get_filter_parameters (GL_NEW_LABEL_DIALOG (dialog), + &page_size, + &category); + + if (sheet_name != NULL) + g_free (sheet_name); + sheet_name = + gl_new_label_dialog_get_template_name (GL_NEW_LABEL_DIALOG (dialog)); + + rotate_flag = + gl_new_label_dialog_get_rotate_state (GL_NEW_LABEL_DIALOG (dialog)); + + template = lgl_db_lookup_template_from_name (sheet_name); + + label = GL_LABEL(gl_label_new ()); + gl_label_set_template (label, template); + gl_label_set_rotate_flag (label, rotate_flag); + + lgl_template_free (template); + + window = + GL_WINDOW (g_object_get_data (G_OBJECT (dialog), + "parent_window")); + if ( gl_window_is_empty (window) ) { + gl_window_set_label (window, label); + } else { + new_window = gl_window_new_from_label (label); + gtk_widget_show_all (new_window); + } + + break; + + default: + break; + } + + gtk_widget_destroy (GTK_WIDGET (dialog)); + + gl_debug (DEBUG_FILE, "END"); +} + + +/*****************************************************************************/ +/* "Properties" menu callback. */ +/*****************************************************************************/ +void +gl_file_properties (glLabel *label, + glWindow *window) +{ + GtkWidget *dialog; + gchar *name; + + gl_debug (DEBUG_FILE, "START"); + + g_return_if_fail (label && GL_IS_LABEL (label)); + g_return_if_fail (window && GTK_IS_WINDOW (window)); + + dialog = gl_new_label_dialog_new (GTK_WINDOW (window)); + gtk_window_set_title (GTK_WINDOW (dialog), _("Label properties")); + + g_object_set_data (G_OBJECT (dialog), "label", label); + + g_signal_connect (G_OBJECT(dialog), "response", + G_CALLBACK (properties_response), dialog); + + if (label->template->paper_id != NULL) { + gl_new_label_dialog_set_filter_parameters (GL_NEW_LABEL_DIALOG (dialog), + label->template->paper_id, + NULL); + } + name = lgl_template_get_name (label->template); + if (name != NULL) { + gl_new_label_dialog_set_template_name (GL_NEW_LABEL_DIALOG (dialog), name); + } + g_free (name); + + gl_new_label_dialog_set_rotate_state (GL_NEW_LABEL_DIALOG (dialog), + label->rotate_flag); + + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); + gtk_widget_show_all (GTK_WIDGET (dialog)); + + gl_debug (DEBUG_FILE, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Properties "ok" button callback. */ +/*---------------------------------------------------------------------------*/ +static void +properties_response (GtkDialog *dialog, + gint response, + gpointer user_data) +{ + lglTemplate *template; + glLabel *label; + + gl_debug (DEBUG_FILE, "START"); + + switch (response) { + + case GTK_RESPONSE_OK: + + gl_new_label_dialog_get_filter_parameters (GL_NEW_LABEL_DIALOG (dialog), + &page_size, + &category); + + if (sheet_name != NULL) + g_free (sheet_name); + sheet_name = + gl_new_label_dialog_get_template_name (GL_NEW_LABEL_DIALOG (dialog)); + + rotate_flag = + gl_new_label_dialog_get_rotate_state (GL_NEW_LABEL_DIALOG (dialog)); + + template = lgl_db_lookup_template_from_name (sheet_name); + + label = GL_LABEL(g_object_get_data (G_OBJECT (dialog), "label")); + gl_label_set_template (label, template); + gl_label_set_rotate_flag (label, rotate_flag); + + break; + + default: + break; + } + + gtk_widget_destroy (GTK_WIDGET (dialog)); + + gl_debug (DEBUG_FILE, "END"); +} + + +/*****************************************************************************/ +/* "Open" menu callback. */ +/*****************************************************************************/ +void +gl_file_open (glWindow *window) +{ + GtkWidget *chooser; + GtkFileFilter *filter; + + gl_debug (DEBUG_FILE, "START"); + + g_return_if_fail (window != NULL); + + chooser = gtk_file_chooser_dialog_new ("Open label", + GTK_WINDOW (window), + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + + /* Recover state of open dialog */ + if (open_path != NULL) { + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(chooser), + open_path); + } + + filter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (filter, "*"); + gtk_file_filter_set_name (filter, _("All files")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); + + filter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (filter, "*.glabels"); + gtk_file_filter_set_name (filter, _("gLabels documents")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); + + gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), filter); + + g_signal_connect (G_OBJECT (chooser), "response", + G_CALLBACK (open_response), window); + + /* show the dialog */ + gtk_widget_show (GTK_WIDGET (chooser)); + + gl_debug (DEBUG_FILE, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Open "response" callback. */ +/*---------------------------------------------------------------------------*/ +static void +open_response (GtkDialog *chooser, + gint response, + glWindow *window) +{ + gchar *raw_filename; + gchar *filename; + GtkWidget *dialog; + + gl_debug (DEBUG_FILE, "START"); + + g_return_if_fail (chooser && GTK_IS_FILE_CHOOSER (chooser)); + g_return_if_fail (window && GTK_IS_WINDOW (window)); + + switch (response) { + + case GTK_RESPONSE_ACCEPT: + /* get the filename */ + raw_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(chooser)); + filename = g_filename_to_utf8 (raw_filename, -1, NULL, NULL, NULL); + + if (!raw_filename || + !filename || + g_file_test (raw_filename, G_FILE_TEST_IS_DIR)) { + + dialog = gtk_message_dialog_new (GTK_WINDOW(chooser), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_CLOSE, + _("Empty file name selection")); + gtk_message_dialog_format_secondary_text ( + GTK_MESSAGE_DIALOG (dialog), + _("Please select a file or supply a valid file name")); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + + } else { + + if (!g_file_test (raw_filename, G_FILE_TEST_IS_REGULAR)) { + + dialog = gtk_message_dialog_new (GTK_WINDOW(chooser), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_CLOSE, + _("File does not exist")); + gtk_message_dialog_format_secondary_text ( + GTK_MESSAGE_DIALOG (dialog), + _("Please select a file or supply a valid file name")); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + + + } else { + + if ( gl_file_open_real (filename, window) ) { + gtk_widget_destroy (GTK_WIDGET (chooser)); + } + + } + + } + + g_free (filename); + g_free (raw_filename); + break; + + default: + gtk_widget_destroy (GTK_WIDGET (chooser)); + break; + + } + + gl_debug (DEBUG_FILE, "END"); +} + + +/*****************************************************************************/ +/* "Open recent" menu callback. */ +/*****************************************************************************/ +void +gl_file_open_recent (const gchar *filename, + glWindow *window) +{ + gl_debug (DEBUG_FILE, ""); + + if (filename) { + gl_debug (DEBUG_FILE, "open recent: %s", filename); + + gl_file_open_real (filename, window); + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Open a file. */ +/*---------------------------------------------------------------------------*/ +gboolean +gl_file_open_real (const gchar *filename, + glWindow *window) +{ + gchar *abs_filename; + glLabel *label; + glXMLLabelStatus status; + GtkWidget *new_window; + + gl_debug (DEBUG_FILE, "START"); + + abs_filename = gl_file_util_make_absolute (filename); + label = gl_xml_label_open (abs_filename, &status); + if (!label) { + GtkWidget *dialog; + + gl_debug (DEBUG_FILE, "couldn't open file"); + + dialog = gtk_message_dialog_new (GTK_WINDOW (window), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + _("Could not open file \"%s\""), + filename); + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), + _("Not a supported file format")); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + + g_free (abs_filename); + + gl_debug (DEBUG_FILE, "END false"); + + return FALSE; + + } else { + + if ( gl_window_is_empty (GL_WINDOW(window)) ) { + gl_window_set_label (GL_WINDOW(window), label); + } else { + new_window = gl_window_new_from_label (label); + gtk_widget_show_all (new_window); + } + + gl_recent_add_utf8_filename (abs_filename); + + if (open_path != NULL) + g_free (open_path); + open_path = g_path_get_dirname (abs_filename); + g_free (abs_filename); + + gl_debug (DEBUG_FILE, "END true"); + + return TRUE; + + } +} + + +/*****************************************************************************/ +/* "Save" menu callback. */ +/*****************************************************************************/ +gboolean +gl_file_save (glLabel *label, + glWindow *window) +{ + glXMLLabelStatus status; + gchar *filename = NULL; + + gl_debug (DEBUG_FILE, ""); + + g_return_val_if_fail (label != NULL, FALSE); + + if (gl_label_is_untitled (label)) + { + gl_debug (DEBUG_FILE, "Untitled"); + + return gl_file_save_as (label, window); + } + + if (!gl_label_is_modified (label)) + { + gl_debug (DEBUG_FILE, "Not modified"); + + return TRUE; + } + + filename = gl_label_get_filename (label); + g_return_val_if_fail (filename != NULL, FALSE); + + gl_xml_label_save (label, filename, &status); + + if (status != XML_LABEL_OK) + { + GtkWidget *dialog; + + gl_debug (DEBUG_FILE, "FAILED"); + + dialog = gtk_message_dialog_new (GTK_WINDOW (window), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + _("Could not save file \"%s\""), + filename); + gtk_message_dialog_format_secondary_text ( + GTK_MESSAGE_DIALOG (dialog), + _("Error encountered during save. The file is still not saved.")); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + + g_free (filename); + + return FALSE; + } + else + { + gl_debug (DEBUG_FILE, "OK"); + + gl_recent_add_utf8_filename (filename); + + g_free (filename); + + return TRUE; + } +} + + +/*****************************************************************************/ +/* "Save As" menu callback. */ +/*****************************************************************************/ +gboolean +gl_file_save_as (glLabel *label, + glWindow *window) +{ + GtkWidget *chooser; + GtkFileFilter *filter; + gboolean saved_flag = FALSE; + gchar *name, *title; + + gl_debug (DEBUG_FILE, "START"); + + g_return_val_if_fail (label && GL_IS_LABEL(label), FALSE); + g_return_val_if_fail (window && GL_IS_WINDOW(window), FALSE); + + name = gl_label_get_short_name (label); + title = g_strdup_printf (_("Save \"%s\" as"), name); + g_free (name); + + chooser = gtk_file_chooser_dialog_new (title, + GTK_WINDOW (window), + GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, + NULL); + + gtk_window_set_modal (GTK_WINDOW (chooser), TRUE); + + g_free (title); + + /* Recover proper state of save-as dialog */ + if (save_path != NULL) { + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(chooser), + save_path); + } + + filter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (filter, "*"); + gtk_file_filter_set_name (filter, _("All files")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); + + filter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (filter, "*.glabels"); + gtk_file_filter_set_name (filter, _("gLabels documents")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter); + + gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), filter); + + g_signal_connect (G_OBJECT (chooser), "response", + G_CALLBACK (save_as_response), label); + + g_object_set_data (G_OBJECT (chooser), "saved_flag", &saved_flag); + + /* show the dialog */ + gtk_widget_show (GTK_WIDGET (chooser)); + + /* Hold here and process events until we are done with this dialog. */ + /* This is so we can return a boolean result of our save attempt. */ + gtk_main (); + + gl_debug (DEBUG_FILE, "END"); + + /* Return flag as set by one of the above callbacks, TRUE = saved */ + return saved_flag; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. "Save As" ok button callback. */ +/*---------------------------------------------------------------------------*/ +static void +save_as_response (GtkDialog *chooser, + gint response, + glLabel *label) +{ + gchar *raw_filename, *filename, *full_filename; + GtkWidget *dialog; + glXMLLabelStatus status; + gboolean *saved_flag; + gboolean cancel_flag = FALSE; + + gl_debug (DEBUG_FILE, "START"); + + g_return_if_fail (GTK_IS_FILE_CHOOSER (chooser)); + + saved_flag = g_object_get_data (G_OBJECT(chooser), "saved_flag"); + + switch (response) { + + case GTK_RESPONSE_ACCEPT: + /* get the filename */ + raw_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(chooser)); + + gl_debug (DEBUG_FILE, "raw_filename = \"%s\"", raw_filename); + + if (!raw_filename || g_file_test (raw_filename, G_FILE_TEST_IS_DIR)) { + + dialog = gtk_message_dialog_new (GTK_WINDOW(chooser), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_CLOSE, + _("Empty file name selection")); + gtk_message_dialog_format_secondary_text ( + GTK_MESSAGE_DIALOG (dialog), + _("Please supply a valid file name")); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + + } else { + + full_filename = gl_file_util_add_extension (raw_filename); + + filename = g_filename_to_utf8 (full_filename, -1, + NULL, NULL, NULL); + + gl_debug (DEBUG_FILE, "filename = \"%s\"", filename); + + if (g_file_test (full_filename, G_FILE_TEST_IS_REGULAR)) { + gint ret; + + dialog = gtk_message_dialog_new (GTK_WINDOW(chooser), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + _("Overwrite file \"%s\"?"), + filename); + gtk_message_dialog_format_secondary_text ( + GTK_MESSAGE_DIALOG (dialog), + _("File already exists.")); + + ret = gtk_dialog_run (GTK_DIALOG (dialog)); + if ( ret == GTK_RESPONSE_NO ) { + cancel_flag = TRUE; + } + gtk_widget_destroy (dialog); + } + + if (!cancel_flag) { + + gl_xml_label_save (label, filename, &status); + + gl_debug (DEBUG_FILE, "status of save = %d", status); + + if ( status != XML_LABEL_OK ) { + + dialog = gtk_message_dialog_new ( + GTK_WINDOW(chooser), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + _("Could not save file \"%s\""), + filename); + gtk_message_dialog_format_secondary_text ( + GTK_MESSAGE_DIALOG (dialog), + _("Error encountered during save. The file is still not saved.")); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + + } else { + + *saved_flag = TRUE; + + gl_recent_add_utf8_filename (filename); + + if (save_path != NULL) + g_free (save_path); + save_path = g_path_get_dirname (filename); + + gtk_widget_destroy (GTK_WIDGET (chooser)); + gtk_main_quit (); + } + + } + + g_free (filename); + g_free (full_filename); + } + + g_free (raw_filename); + break; + + default: + *saved_flag = FALSE; + gtk_widget_destroy (GTK_WIDGET (chooser)); + gtk_main_quit (); + break; + + } + + gl_debug (DEBUG_FILE, "END"); +} + + +/*****************************************************************************/ +/* "Close" menu callback. */ +/*****************************************************************************/ +gboolean +gl_file_close (glWindow *window) +{ + glView *view; + glLabel *label; + gboolean close = TRUE; + + gl_debug (DEBUG_FILE, "START"); + + g_return_val_if_fail (window && GL_IS_WINDOW(window), TRUE); + + if ( !gl_window_is_empty (window) ) { + + view = GL_VIEW(window->view); + label = view->label; + + if (gl_label_is_modified (label)) { + GtkWidget *dialog; + gchar *fname = NULL; + gint ret; + + fname = gl_label_get_short_name (label); + + dialog = gtk_message_dialog_new (GTK_WINDOW(window), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_NONE, + _("Save changes to document \"%s\" before closing?"), + fname); + gtk_message_dialog_format_secondary_text ( + GTK_MESSAGE_DIALOG (dialog), + _("Your changes will be lost if you don't save them.")); + + gtk_dialog_add_button (GTK_DIALOG (dialog), + _("Close without saving"), + GTK_RESPONSE_NO); + + gtk_dialog_add_button (GTK_DIALOG (dialog), + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + + gtk_dialog_add_button (GTK_DIALOG (dialog), + GTK_STOCK_SAVE, GTK_RESPONSE_YES); + + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES); + + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); + + ret = gtk_dialog_run (GTK_DIALOG (dialog)); + + gtk_widget_destroy (dialog); + + g_free (fname); + + switch (ret) + { + case GTK_RESPONSE_YES: + close = gl_file_save (label, window); + break; + case GTK_RESPONSE_NO: + close = TRUE; + break; + default: + close = FALSE; + } + + gl_debug (DEBUG_FILE, "CLOSE: %s", close ? "TRUE" : "FALSE"); + } + + } + + if (close) { + gtk_widget_destroy (GTK_WIDGET(window)); + + if ( gl_window_get_window_list () == NULL ) { + + gl_debug (DEBUG_FILE, "All windows closed."); + + gtk_main_quit (); + } + + } + + gl_debug (DEBUG_FILE, "END"); + + return close; +} + + +/*****************************************************************************/ +/* "Exit" menu callback. */ +/*****************************************************************************/ +void +gl_file_exit (void) +{ + const GList *window_list; + GList *p, *p_next; + + gl_debug (DEBUG_FILE, "START"); + + window_list = gl_window_get_window_list (); + + for (p=(GList *)window_list; p != NULL; p=p_next) { + p_next = p->next; + + gl_file_close (GL_WINDOW(p->data)); + } + + gl_debug (DEBUG_FILE, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/file.h b/src/file.h new file mode 100644 index 00000000..3ac975e1 --- /dev/null +++ b/src/file.h @@ -0,0 +1,72 @@ +/* + * file.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __FILE_H__ +#define __FILE_H__ + +#include + +#include "label.h" +#include "window.h" + +G_BEGIN_DECLS + +void gl_file_new (glWindow *window); + + +void gl_file_properties (glLabel *label, + glWindow *window); + + +void gl_file_open (glWindow *window); + + +void gl_file_open_recent (const gchar *filename, + glWindow *window); + +gboolean gl_file_open_real (const gchar *filename, + glWindow *window); + + +gboolean gl_file_save (glLabel *label, + glWindow *window); + +gboolean gl_file_save_as (glLabel *label, + glWindow *window); + + +gboolean gl_file_close (glWindow *window); + +void gl_file_exit (void); + +G_END_DECLS + +#endif /* __FILE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/font-combo-menu-item.c b/src/font-combo-menu-item.c new file mode 100644 index 00000000..a1b4e497 --- /dev/null +++ b/src/font-combo-menu-item.c @@ -0,0 +1,164 @@ +/* + * font-combo-menu-item.c + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "font-combo-menu-item.h" + +#include +#include + +#include "font-sample.h" +#include "marshal.h" + + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + +#define SAMPLE_W 32 +#define SAMPLE_H 24 + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glFontComboMenuItemPrivate { + + gchar *font_family; + +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_font_combo_menu_item_finalize (GObject *object); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glFontComboMenuItem, gl_font_combo_menu_item, GTK_TYPE_MENU_ITEM); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_font_combo_menu_item_class_init (glFontComboMenuItemClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + + gl_font_combo_menu_item_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_font_combo_menu_item_finalize; +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_font_combo_menu_item_init (glFontComboMenuItem *this) +{ + this->priv = g_new0 (glFontComboMenuItemPrivate, 1); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_font_combo_menu_item_finalize (GObject *object) +{ + glFontComboMenuItem *this = GL_FONT_COMBO_MENU_ITEM (object); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_FONT_COMBO_MENU_ITEM (object)); + + g_free (this->priv->font_family); + g_free (this->priv); + + G_OBJECT_CLASS (gl_font_combo_menu_item_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_font_combo_menu_item_new (gchar *font_family) +{ + glFontComboMenuItem *this; + GtkWidget *hbox; + GtkWidget *sample; + GtkWidget *label; + gchar *markup; + + this = g_object_new (GL_TYPE_FONT_COMBO_MENU_ITEM, NULL); + + this->priv->font_family = g_strdup (font_family); + + hbox = gtk_hbox_new (FALSE, 6); + gtk_container_add (GTK_CONTAINER (this), hbox); + + sample = gl_font_sample_new (SAMPLE_W, SAMPLE_H, "Aa", font_family); + gtk_box_pack_start (GTK_BOX (hbox), sample, FALSE, FALSE, 0); + + label = gtk_label_new (font_family); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + + markup = g_strdup_printf ("ABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz\n0123456789", + font_family); + gtk_widget_set_tooltip_markup (GTK_WIDGET (this), markup); + g_free (markup); + + return GTK_WIDGET (this); +} + + +/*****************************************************************************/ +/* Get family. */ +/*****************************************************************************/ +gchar * +gl_font_combo_menu_item_get_family (glFontComboMenuItem *this) +{ + return g_strdup (this->priv->font_family); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/font-combo-menu-item.h b/src/font-combo-menu-item.h new file mode 100644 index 00000000..30681616 --- /dev/null +++ b/src/font-combo-menu-item.h @@ -0,0 +1,75 @@ +/* + * font-combo-menu-item.h + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __FONT_COMBO_MENU_ITEM_H__ +#define __FONT_COMBO_MENU_ITEM_H__ + + +#include + + +G_BEGIN_DECLS + +#define GL_TYPE_FONT_COMBO_MENU_ITEM (gl_font_combo_menu_item_get_type ()) +#define GL_FONT_COMBO_MENU_ITEM(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_FONT_COMBO_MENU_ITEM, glFontComboMenuItem )) +#define GL_FONT_COMBO_MENU_ITEM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_FONT_COMBO_MENU_ITEM, glFontComboMenuItemClass)) +#define GL_IS_FONT_COMBO_MENU_ITEM(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_FONT_COMBO_MENU_ITEM)) +#define GL_IS_FONT_COMBO_MENU_ITEM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_FONT_COMBO_MENU_ITEM)) + +typedef struct _glFontComboMenuItem glFontComboMenuItem; +typedef struct _glFontComboMenuItemPrivate glFontComboMenuItemPrivate; +typedef struct _glFontComboMenuItemClass glFontComboMenuItemClass; + +struct _glFontComboMenuItem { + GtkMenuItem parent_widget; + + glFontComboMenuItemPrivate *priv; +}; + +struct _glFontComboMenuItemClass { + GtkMenuItemClass parent_class; +}; + + +GType gl_font_combo_menu_item_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_font_combo_menu_item_new (gchar *font_family); + +gchar *gl_font_combo_menu_item_get_family (glFontComboMenuItem *this); + + +G_END_DECLS + +#endif /* __FONT_COMBO_MENU_ITEM_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/font-combo-menu.c b/src/font-combo-menu.c new file mode 100644 index 00000000..34c93979 --- /dev/null +++ b/src/font-combo-menu.c @@ -0,0 +1,239 @@ +/* + * font-combo-menu.c + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "font-combo-menu.h" + +#include +#include + +#include "font-combo-menu-item.h" +#include "font-util.h" +#include "marshal.h" + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glFontComboMenuPrivate { + + gchar *font_family; + +}; + +enum { + FONT_CHANGED, + LAST_SIGNAL +}; + +gchar *standard_families[] = { "Sans", "Serif", "Monospace", NULL }; + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +static guint signals[LAST_SIGNAL] = {0}; + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_font_combo_menu_finalize (GObject *object); + +static void menu_item_activate_cb (glFontComboMenuItem *item, + glFontComboMenu *this); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glFontComboMenu, gl_font_combo_menu, GTK_TYPE_MENU); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_font_combo_menu_class_init (glFontComboMenuClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + + gl_font_combo_menu_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_font_combo_menu_finalize; + + signals[FONT_CHANGED] = + g_signal_new ("font_changed", + G_OBJECT_CLASS_TYPE (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glFontComboMenuClass, font_changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, 0); +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_font_combo_menu_init (glFontComboMenu *this) +{ + gint i; + GtkWidget *menu_item; + GtkWidget *sub_menu; + const GList *list; + GList *p; + + this->priv = g_new0 (glFontComboMenuPrivate, 1); + + + for ( i = 0; standard_families[i] != NULL; i++ ) + { + menu_item = gl_font_combo_menu_item_new (standard_families[i]); + gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); + g_signal_connect (menu_item, "activate", + G_CALLBACK (menu_item_activate_cb), this); + } + + menu_item = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); + + menu_item = gtk_menu_item_new_with_label (_("Proportional fonts")); + gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); + + sub_menu = gtk_menu_new (); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), sub_menu); + + list = gl_font_util_get_proportional_families (); + for ( p = (GList *)list; p != NULL; p = p->next ) + { + menu_item = gl_font_combo_menu_item_new (p->data); + gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item); + g_signal_connect (menu_item, "activate", + G_CALLBACK (menu_item_activate_cb), this); + } + + menu_item = gtk_menu_item_new_with_label (_("Fixed-width fonts")); + gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); + + sub_menu = gtk_menu_new (); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), sub_menu); + + list = gl_font_util_get_fixed_width_families (); + for ( p = (GList *)list; p != NULL; p = p->next ) + { + menu_item = gl_font_combo_menu_item_new (p->data); + gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item); + g_signal_connect (menu_item, "activate", + G_CALLBACK (menu_item_activate_cb), this); + } + + menu_item = gtk_menu_item_new_with_label (_("All fonts")); + gtk_menu_shell_append (GTK_MENU_SHELL (this), menu_item); + + sub_menu = gtk_menu_new (); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), sub_menu); + + list = gl_font_util_get_all_families (); + for ( p = (GList *)list; p != NULL; p = p->next ) + { + menu_item = gl_font_combo_menu_item_new (p->data); + gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item); + g_signal_connect (menu_item, "activate", + G_CALLBACK (menu_item_activate_cb), this); + } + +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_font_combo_menu_finalize (GObject *object) +{ + glFontComboMenu *this = GL_FONT_COMBO_MENU (object); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_FONT_COMBO_MENU (object)); + + g_free (this->priv); + + G_OBJECT_CLASS (gl_font_combo_menu_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_font_combo_menu_new (void) +{ + glFontComboMenu *this; + + this = g_object_new (gl_font_combo_menu_get_type (), NULL); + + return GTK_WIDGET (this); +} + + +/*****************************************************************************/ +/* menu_item activate callback. */ +/*****************************************************************************/ +static void menu_item_activate_cb (glFontComboMenuItem *item, + glFontComboMenu *this) +{ + this->priv->font_family = gl_font_combo_menu_item_get_family (item); + + g_signal_emit (this, signals[FONT_CHANGED], 0); + + gtk_widget_hide (GTK_WIDGET (this)); +} + + +/*****************************************************************************/ +/* Get font family name. */ +/*****************************************************************************/ +gchar * +gl_font_combo_menu_get_family (glFontComboMenu *this) +{ + return g_strdup (this->priv->font_family); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/font-combo-menu.h b/src/font-combo-menu.h new file mode 100644 index 00000000..d40fa43a --- /dev/null +++ b/src/font-combo-menu.h @@ -0,0 +1,83 @@ +/* + * font-combo-menu.h + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __FONT_COMBO_MENU_H__ +#define __FONT_COMBO_MENU_H__ + +#include + + +G_BEGIN_DECLS + +#define GL_TYPE_FONT_COMBO_MENU (gl_font_combo_menu_get_type ()) +#define GL_FONT_COMBO_MENU(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_FONT_COMBO_MENU, glFontComboMenu )) +#define GL_FONT_COMBO_MENU_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_FONT_COMBO_MENU, glFontComboMenuClass)) +#define GL_IS_FONT_COMBO_MENU(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_FONT_COMBO_MENU)) +#define GL_IS_FONT_COMBO_MENU_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_FONT_COMBO_MENU)) + +typedef struct _glFontComboMenu glFontComboMenu; +typedef struct _glFontComboMenuPrivate glFontComboMenuPrivate; +typedef struct _glFontComboMenuClass glFontComboMenuClass; + +struct _glFontComboMenu { + GtkMenu parent_widget; + + glFontComboMenuPrivate *priv; +}; + +struct _glFontComboMenuClass { + GtkMenuClass parent_class; + + /* + * Signals + */ + void (*font_changed) (glFontComboMenu *object, + gpointer user_data); + +}; + + +GType gl_font_combo_menu_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_font_combo_menu_new (void); + +gchar *gl_font_combo_menu_get_family (glFontComboMenu *this); + + +G_END_DECLS + + +#endif /* __FONT_COMBO_MENU_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ + diff --git a/src/font-combo.c b/src/font-combo.c new file mode 100644 index 00000000..ffd8877e --- /dev/null +++ b/src/font-combo.c @@ -0,0 +1,321 @@ +/* + * font-combo.c + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "font-combo.h" + +#include +#include + +#include "font-combo-menu.h" +#include "font-util.h" +#include "marshal.h" + + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +/** GL_FONT_COMBO Private fields */ +struct _glFontComboPrivate { + + gchar *font_family; + + GtkWidget *label; + + GtkWidget *menu; +}; + +enum { + CHANGED, + LAST_SIGNAL +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static guint signals[LAST_SIGNAL] = {0}; + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_font_combo_finalize (GObject *object); + +static gboolean +button_press_event_cb (GtkWidget *widget, + GdkEventButton *event, + glFontCombo *this); + +static void +menu_font_changed_cb (glFontComboMenu *menu, + glFontCombo *this); + +static void +menu_selection_done_cb (GtkMenuShell *object, + glFontCombo *this); + + +/*****************************************************************************/ +/* Object infrastructure. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glFontCombo, gl_font_combo, GTK_TYPE_TOGGLE_BUTTON); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_font_combo_class_init (glFontComboClass *class) +{ + GObjectClass *gobject_class = (GObjectClass *) class; + + gl_font_combo_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_font_combo_finalize; + + signals[CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glFontComboClass, changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, 0); +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_font_combo_init (glFontCombo *this) +{ + GtkWidget *hbox; + GtkWidget *arrow; + + this->priv = g_new0 (glFontComboPrivate, 1); + + hbox = gtk_hbox_new (FALSE, 3); + gtk_container_add (GTK_CONTAINER (this), hbox); + + this->priv->label = gtk_label_new (""); + gtk_misc_set_alignment (GTK_MISC (this->priv->label), 0.0, 0.5); + gtk_widget_set_size_request (this->priv->label, 180, -1); + gtk_box_pack_start (GTK_BOX (hbox), this->priv->label, TRUE, TRUE, 0); + + arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN); + gtk_box_pack_end (GTK_BOX (hbox), arrow, FALSE, FALSE, 0); + + g_signal_connect (this, "button_press_event", + G_CALLBACK(button_press_event_cb), this); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_font_combo_finalize (GObject *object) +{ + glFontCombo *this; + + g_return_if_fail (object && IS_GL_FONT_COMBO (object)); + this = GL_FONT_COMBO (object); + + g_free (this->priv->font_family); + g_object_ref_sink (this->priv->menu); + g_free (this->priv); + + G_OBJECT_CLASS (gl_font_combo_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_font_combo_new (const gchar *font_family) +{ + glFontCombo *this; + + this = g_object_new (TYPE_GL_FONT_COMBO, NULL); + + this->priv->font_family = gl_font_util_validate_family (font_family); + + gtk_label_set_text (GTK_LABEL (this->priv->label), this->priv->font_family); + + this->priv->menu = gl_font_combo_menu_new (); + + gtk_widget_show_all (this->priv->menu); + + g_signal_connect (this->priv->menu, "font_changed", + G_CALLBACK (menu_font_changed_cb), this); + g_signal_connect (this->priv->menu, "selection_done", + G_CALLBACK (menu_selection_done_cb), this); + + return GTK_WIDGET (this); +} + + +/*****************************************************************************/ +/** Set relief style. */ +/*****************************************************************************/ +void +gl_font_combo_set_relief( glFontCombo *this, + GtkReliefStyle relief ) +{ + gtk_button_set_relief (GTK_BUTTON (this), relief); +} + + +/*****************************************************************************/ +/* Set font family. */ +/*****************************************************************************/ +void +gl_font_combo_set_family (glFontCombo *this, + const gchar *font_family) +{ + + this->priv->font_family = gl_font_util_validate_family (font_family); + + gtk_label_set_text (GTK_LABEL (this->priv->label), this->priv->font_family); +} + + +/*****************************************************************************/ +/* Get font family. */ +/*****************************************************************************/ +gchar * +gl_font_combo_get_family (glFontCombo *this) +{ + return g_strdup (this->priv->font_family); +} + + +/*****************************************************************************/ +/* Menu positioning function. */ +/*****************************************************************************/ +static void +menu_position_function (GtkMenu *menu, + gint *x, + gint *y, + gboolean *push_in, + gpointer user_data) +{ + glFontCombo *this = GL_FONT_COMBO (user_data); + gint x1, y1; + gint menu_h, menu_w; + + gdk_window_get_origin (GTK_WIDGET (this)->window, &x1, &y1); + *x = x1 + GTK_WIDGET (this)->allocation.x; + *y = y1 + GTK_WIDGET (this)->allocation.y + + GTK_WIDGET (this)->allocation.height; + + menu_h = this->priv->menu->allocation.height; + menu_w = this->priv->menu->allocation.width; + + if ((*y + menu_h) > gdk_screen_height ()) + { + *y = y1 + GTK_WIDGET (this)->allocation.y - menu_h; + if ( *y < 0 ) + { + *y = gdk_screen_height () - menu_h; + } + } + + if ((*x + menu_w) > gdk_screen_width ()) + { + *x = gdk_screen_width () - menu_w; + } + + *push_in = TRUE; +} + + +/*****************************************************************************/ +/* Button "button_press_event" callback. */ +/*****************************************************************************/ +static gboolean +button_press_event_cb (GtkWidget *widget, + GdkEventButton *event, + glFontCombo *this) +{ + switch (event->button) + { + + case 1: + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this), TRUE); + + gtk_menu_popup (GTK_MENU (this->priv->menu), + NULL, NULL, + menu_position_function, this, + event->button, event->time); + break; + + default: + break; + + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Menu "font changed" callback. */ +/*****************************************************************************/ +static void +menu_font_changed_cb (glFontComboMenu *menu, + glFontCombo *this) +{ + this->priv->font_family = gl_font_combo_menu_get_family (menu); + + gtk_label_set_text (GTK_LABEL (this->priv->label), this->priv->font_family); + + g_signal_emit (this, signals[CHANGED], 0); +} + + +/*****************************************************************************/ +/* Menu "selection done" callback. */ +/*****************************************************************************/ +static void +menu_selection_done_cb (GtkMenuShell *object, + glFontCombo *this) +{ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (this), FALSE); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/font-combo.h b/src/font-combo.h new file mode 100644 index 00000000..a7b9de6b --- /dev/null +++ b/src/font-combo.h @@ -0,0 +1,87 @@ +/* + * font-combo.h + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __GL_FONT_COMBO_H__ +#define __GL_FONT_COMBO_H__ + + +#include + + +G_BEGIN_DECLS + +#define TYPE_GL_FONT_COMBO (gl_font_combo_get_type ()) +#define GL_FONT_COMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GL_FONT_COMBO, glFontCombo)) +#define GL_FONT_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GL_FONT_COMBO, glFontComboClass)) +#define IS_GL_FONT_COMBO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GL_FONT_COMBO)) +#define IS_GL_FONT_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GL_FONT_COMBO)) +#define GL_FONT_COMBO_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), TYPE_GL_FONT_COMBO, glFontComboClass)) + + +typedef struct _glFontCombo glFontCombo; +typedef struct _glFontComboPrivate glFontComboPrivate; +typedef struct _glFontComboClass glFontComboClass; + + +struct _glFontCombo { + GtkToggleButton parent; + + glFontComboPrivate *priv; +}; + +struct _glFontComboClass { + GtkToggleButtonClass parent_class; + + /* + * Signals + */ + void (*changed) (glFontCombo *object, + gpointer user_data); + +}; + + +GType gl_font_combo_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_font_combo_new (const gchar *font_family); + +void gl_font_combo_set_family (glFontCombo *this, + const gchar *font_family); + +gchar *gl_font_combo_get_family (glFontCombo *this); + +void gl_font_combo_set_relief (glFontCombo *this, + GtkReliefStyle relief); + + +G_END_DECLS + +#endif /* __GL_COLOR_COMBO_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/font-sample.c b/src/font-sample.c new file mode 100644 index 00000000..da2c13aa --- /dev/null +++ b/src/font-sample.c @@ -0,0 +1,299 @@ +/* + * font-sample.c + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "font-sample.h" + +#include "marshal.h" +#include "color.h" + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + +#define MARGIN 2 + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glFontSamplePrivate { + + gchar *sample_text; + + gchar *font_family; +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_font_sample_finalize (GObject *object); + +static void style_set_cb (GtkWidget *widget, + GtkStyle *previous_style); + +static void redraw (glFontSample *this); + +static gboolean expose_event_cb (GtkWidget *widget, + GdkEventExpose *event); + +static void draw_sample (glFontSample *this, + cairo_t *cr); + + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glFontSample, gl_font_sample, GTK_TYPE_DRAWING_AREA); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_font_sample_class_init (glFontSampleClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); + + gl_font_sample_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_font_sample_finalize; + + widget_class->expose_event = expose_event_cb; + widget_class->style_set = style_set_cb; +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_font_sample_init (glFontSample *this) +{ + GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW); + + this->priv = g_new0 (glFontSamplePrivate, 1); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_font_sample_finalize (GObject *object) +{ + glFontSample *this = GL_FONT_SAMPLE (object); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_FONT_SAMPLE (object)); + + g_free (this->priv->sample_text); + g_free (this->priv->font_family); + g_free (this->priv); + + G_OBJECT_CLASS (gl_font_sample_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_font_sample_new (gint w, + gint h, + const gchar *sample_text, + const gchar *font_family) +{ + glFontSample *this; + + this = g_object_new (GL_TYPE_FONT_SAMPLE, NULL); + + this->priv->sample_text = g_strdup (sample_text); + this->priv->font_family = g_strdup (font_family); + + gtk_widget_set_size_request (GTK_WIDGET (this), w, h); + + return GTK_WIDGET (this); +} + + +/*--------------------------------------------------------------------------*/ +/* Style set handler (updates colors when style/theme changes). */ +/*--------------------------------------------------------------------------*/ +static void +style_set_cb (GtkWidget *widget, + GtkStyle *previous_style) +{ + redraw (GL_FONT_SAMPLE (widget)); +} + + +/*****************************************************************************/ +/* Request redraw. */ +/*****************************************************************************/ +static void +redraw (glFontSample *this) +{ + GdkRegion *region; + + if (GTK_WIDGET_REALIZED (GTK_WIDGET (this))) + { + /* redraw the cairo canvas forcing an expose event */ + region = gdk_drawable_get_clip_region (GTK_WIDGET (this)->window); + gdk_window_invalidate_region (GTK_WIDGET (this)->window, region, TRUE); + gdk_region_destroy (region); + } +} + + +/*****************************************************************************/ +/* "Expose event" callback. */ +/*****************************************************************************/ +static gboolean +expose_event_cb (GtkWidget *widget, + GdkEventExpose *event) +{ + cairo_t *cr; + + cr = gdk_cairo_create (widget->window); + + cairo_rectangle (cr, + event->area.x, event->area.y, + event->area.width, event->area.height); + cairo_clip (cr); + + cairo_translate (cr, widget->allocation.x, widget->allocation.y); + + draw_sample (GL_FONT_SAMPLE (widget), cr); + + cairo_destroy (cr); + + return FALSE; +} + + +/*****************************************************************************/ +/* Draw sample. */ +/*****************************************************************************/ +static void +draw_sample (glFontSample *this, + cairo_t *cr) +{ + GtkStyle *style; + gdouble w, h; + guint fill_color, line_color; + PangoLayout *layout; + PangoFontDescription *desc; + PangoRectangle ink_rect, logical_rect; + gdouble layout_x, layout_y, layout_width, layout_height; + + + + w = GTK_WIDGET (this)->allocation.width; + h = GTK_WIDGET (this)->allocation.height; + + + style = gtk_widget_get_style (GTK_WIDGET (this)); + if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) ) + { + fill_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); + line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); + } + else + { + fill_color = GL_COLOR_NONE; + line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_INSENSITIVE]); + } + + + cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); + + cairo_rectangle( cr, 0, 0, w-1, h-1 ); + + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); + cairo_fill_preserve( cr ); + + cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (line_color)); + cairo_set_line_width (cr, 1.0); + cairo_stroke (cr); + + + cairo_set_antialias (cr, CAIRO_ANTIALIAS_DEFAULT); + + + layout = pango_cairo_create_layout (cr); + + desc = pango_font_description_new (); + pango_font_description_set_family (desc, this->priv->font_family); + pango_font_description_set_weight (desc, PANGO_WEIGHT_NORMAL); + pango_font_description_set_style (desc, PANGO_STYLE_NORMAL); + pango_font_description_set_size (desc, 0.6 * h * PANGO_SCALE); + + pango_layout_set_font_description (layout, desc); + pango_font_description_free (desc); + + pango_layout_set_text (layout, this->priv->sample_text, -1); + pango_layout_set_width (layout, -1); + pango_layout_get_pixel_extents (layout, &ink_rect, &logical_rect); + layout_width = MAX (logical_rect.width, ink_rect.width); + layout_height = MAX (logical_rect.height, ink_rect.height); + + layout_x = (w - layout_width) / 2.0; + layout_y = (h - layout_height) / 2.0; + + if (ink_rect.x < logical_rect.x) + { + layout_x += logical_rect.x - ink_rect.x; + } + + if (ink_rect.y < logical_rect.y) + { + layout_y += logical_rect.y - ink_rect.y; + } + + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); + cairo_move_to (cr, layout_x, layout_y); + pango_cairo_show_layout (cr, layout); + + g_object_unref (layout); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/font-sample.h b/src/font-sample.h new file mode 100644 index 00000000..7946e774 --- /dev/null +++ b/src/font-sample.h @@ -0,0 +1,76 @@ +/* + * font-sample.h + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __FONT_SAMPLE_H__ +#define __FONT_SAMPLE_H__ + + +#include + + +G_BEGIN_DECLS + +#define GL_TYPE_FONT_SAMPLE (gl_font_sample_get_type ()) +#define GL_FONT_SAMPLE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_FONT_SAMPLE, glFontSample )) +#define GL_FONT_SAMPLE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_FONT_SAMPLE, glFontSampleClass)) +#define GL_IS_FONT_SAMPLE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_FONT_SAMPLE)) +#define GL_IS_FONT_SAMPLE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_FONT_SAMPLE)) + +typedef struct _glFontSample glFontSample; +typedef struct _glFontSamplePrivate glFontSamplePrivate; +typedef struct _glFontSampleClass glFontSampleClass; + +struct _glFontSample { + GtkDrawingArea parent_widget; + + glFontSamplePrivate *priv; +}; + +struct _glFontSampleClass { + GtkDrawingAreaClass parent_class; +}; + + +GType gl_font_sample_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_font_sample_new (gint w, + gint h, + const gchar *sample_text, + const gchar *font_family); + + +G_END_DECLS + +#endif /* __FONT_SAMPLE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/font-util.c b/src/font-util.c new file mode 100644 index 00000000..e4cd2e08 --- /dev/null +++ b/src/font-util.c @@ -0,0 +1,196 @@ +/* + * font-util.h + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "font-util.h" + +#include +#include +#include + +#include + + +/****************************************************************************/ +/* Get list of all available font families. */ +/****************************************************************************/ +const GList * +gl_font_util_get_all_families (void) +{ + static GList *list = NULL; + PangoFontMap *fontmap; + PangoContext *context; + PangoFontFamily **families; + gint n; + gint i; + gchar *name; + + if ( !list ) + { + fontmap = pango_cairo_font_map_new (); + context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fontmap)); + + pango_context_list_families (context, &families, &n); + + for ( i=0; idata); /* 1st entry */ + } + else + { + good_family = NULL; + } + + return good_family; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/font-util.h b/src/font-util.h new file mode 100644 index 00000000..79449efa --- /dev/null +++ b/src/font-util.h @@ -0,0 +1,47 @@ +/* + * font-util.h + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __FONT_UTIL_H__ +#define __FONT_UTIL_H__ + +#include + +G_BEGIN_DECLS + +const GList *gl_font_util_get_all_families (void); +const GList *gl_font_util_get_proportional_families (void); +const GList *gl_font_util_get_fixed_width_families (void); + +gchar *gl_font_util_validate_family (const gchar *family); + +G_END_DECLS + +#endif /* __FONT_UTIL_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/glabels-batch.c b/src/glabels-batch.c new file mode 100644 index 00000000..ac574326 --- /dev/null +++ b/src/glabels-batch.c @@ -0,0 +1,200 @@ +/* + * glabels-batch.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include + +#include + +#include +#include "merge-init.h" +#include "xml-label.h" +#include "print.h" +#include "print-op.h" +#include "file-util.h" +#include "prefs.h" +#include "debug.h" + +/*============================================*/ +/* Private globals */ +/*============================================*/ +static gchar *output = "output.pdf"; +static gint n_copies = 1; +static gint n_sheets = 1; +static gint first = 1; +static gboolean outline_flag = FALSE; +static gboolean reverse_flag = FALSE; +static gboolean crop_marks_flag = FALSE; +static gchar *input = NULL; +static gchar **remaining_args = NULL; + +static GOptionEntry option_entries[] = { + {"output", 'o', 0, G_OPTION_ARG_STRING, &output, + N_("set output filename (default=\"output.pdf\")"), N_("filename")}, + {"sheets", 's', 0, G_OPTION_ARG_INT, &n_sheets, + N_("number of sheets (default=1)"), N_("sheets")}, + {"copies", 'c', 0, G_OPTION_ARG_INT, &n_copies, + N_("number of copies (default=1)"), N_("copies")}, + {"first", 'f', 0, G_OPTION_ARG_INT, &first, + N_("first label on first sheet (default=1)"), N_("first")}, + {"outline", 'l', 0, G_OPTION_ARG_NONE, &outline_flag, + N_("print outlines (to test printer alignment)"), NULL}, + {"reverse", 'r', 0, G_OPTION_ARG_NONE, &reverse_flag, + N_("print in reverse (i.e. a mirror image)"), NULL}, + {"cropmarks", 'C', 0, G_OPTION_ARG_NONE, &crop_marks_flag, + N_("print crop marks"), NULL}, + {"input", 'i', 0, G_OPTION_ARG_STRING, &input, + N_("input file for merging"), N_("filename")}, + { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, + &remaining_args, NULL, N_("[FILE...]") }, + { NULL } +}; + + + +/*****************************************************************************/ +/* Main */ +/*****************************************************************************/ +int +main (int argc, char **argv) +{ + GOptionContext *option_context; + GList *p, *file_list = NULL; + gchar *abs_fn; + glLabel *label = NULL; + glMerge *merge = NULL; + lglTemplateFrame *frame; + glXMLLabelStatus status; + glPrintOp *print_op; + gchar *utf8_filename; + GError *error = NULL; + + bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + + option_context = g_option_context_new (NULL); + g_option_context_set_summary (option_context, + _("Print files created with gLabels.")); + g_option_context_add_main_entries (option_context, option_entries, GETTEXT_PACKAGE); + + + /* Initialize minimal gnome program */ + gtk_init (&argc, &argv); + if (!g_option_context_parse (option_context, &argc, &argv, &error)) + { + g_print(_("%s\nRun '%s --help' to see a full list of available command line options.\n"), + error->message, argv[0]); + g_error_free (error); + return 1; + } + + + /* create file list */ + if (remaining_args != NULL) { + gint i, num_args; + + num_args = g_strv_length (remaining_args); + for (i = 0; i < num_args; ++i) { + utf8_filename = g_filename_to_utf8 (remaining_args[i], -1, NULL, NULL, NULL); + if (utf8_filename) + file_list = g_list_append (file_list, utf8_filename); + } + g_strfreev (remaining_args); + remaining_args = NULL; + } + + /* initialize components */ + gl_debug_init (); + gl_merge_init (); + lgl_db_init (); + gl_prefs_init (); + + /* now print the files */ + for (p = file_list; p; p = p->next) { + g_print ("LABEL FILE = %s\n", (gchar *) p->data); + label = gl_xml_label_open (p->data, &status); + + + if ( status == XML_LABEL_OK ) { + + merge = gl_label_get_merge (label); + if (input != NULL) { + if (merge != NULL) { + gl_merge_set_src(merge, input); + gl_label_set_merge(label, merge); + } else { + fprintf ( stderr, + _("cannot perform document merge with glabels file %s\n"), + (char *)p->data ); + } + } + abs_fn = gl_file_util_make_absolute ( output ); + frame = (lglTemplateFrame *)label->template->frames->data; + + print_op = gl_print_op_new (label); + gl_print_op_set_filename (print_op, abs_fn); + gl_print_op_set_n_copies (print_op, n_copies); + gl_print_op_set_first (print_op, first); + gl_print_op_set_outline_flag (print_op, outline_flag); + gl_print_op_set_reverse_flag (print_op, reverse_flag); + gl_print_op_set_crop_marks_flag (print_op, crop_marks_flag); + if (merge) + { + gl_print_op_set_n_sheets (print_op, + ceil ((double)(first-1 + n_copies * gl_merge_get_record_count(merge)) + / lgl_template_frame_get_n_labels (frame))); + } + else + { + gl_print_op_set_n_sheets (print_op, n_sheets); + gl_print_op_set_last (print_op, + lgl_template_frame_get_n_labels (frame)); + } + gtk_print_operation_run (GTK_PRINT_OPERATION (print_op), + GTK_PRINT_OPERATION_ACTION_EXPORT, + NULL, + NULL); + + g_object_unref (label); + } + else { + fprintf ( stderr, _("cannot open glabels file %s\n"), + (char *)p->data ); + } + } + + g_list_free (file_list); + + return 0; +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/glabels.c b/src/glabels.c new file mode 100644 index 00000000..14e300bb --- /dev/null +++ b/src/glabels.c @@ -0,0 +1,163 @@ +/* + * glabels.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include + +#include +#include "warning-handler.h" +#include "critical-error-handler.h" +#include "stock.h" +#include "merge-init.h" +#include "recent.h" +#include "mini-preview-pixbuf-cache.h" +#include "prefs.h" +#include "debug.h" +#include "window.h" +#include "file.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private globals */ +/*========================================================*/ + + +/*========================================================*/ +/* Local function prototypes */ +/*========================================================*/ + + +/****************************************************************************/ +/* main program */ +/****************************************************************************/ +int +main (int argc, char **argv) +{ + gchar **remaining_args = NULL; + GOptionEntry option_entries[] = { + { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, + &remaining_args, NULL, N_("[FILE...]") }, + { NULL } + }; + + GOptionContext *option_context; + gchar *icon_file; + GList *file_list = NULL, *p; + GtkWidget *win; + gchar *utf8_filename; + GError *error = NULL; + + bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + + option_context = g_option_context_new (NULL); + g_option_context_set_summary (option_context, + _("Launch gLabels label and business card designer.")); + g_option_context_add_main_entries (option_context, option_entries, GETTEXT_PACKAGE); + + + /* Initialize program */ + gtk_init( &argc, &argv ); + if (!g_option_context_parse (option_context, &argc, &argv, &error)) + { + g_print(_("%s\nRun '%s --help' to see a full list of available command line options.\n"), + error->message, argv[0]); + g_error_free (error); + return 1; + } + + + /* Install GUI handlers for critical error and warning messages */ + gl_critical_error_handler_init(); + gl_warning_handler_init(); + + /* Set default icon */ + icon_file = GLABELS_ICON_DIR "glabels.png"; + if (!g_file_test (icon_file, G_FILE_TEST_EXISTS)) + { + g_message ("Could not find %s", icon_file); + } + else + { + gtk_window_set_default_icon_from_file (icon_file, NULL); + } + + + /* Initialize subsystems */ + gl_debug_init (); + gl_stock_init (); + lgl_db_init (); + gl_prefs_init (); + gl_mini_preview_pixbuf_cache_init (); + gl_merge_init (); + gl_recent_init (); + + + /* Parse args and build the list of files to be loaded at startup */ + if (remaining_args != NULL) { + gint i, num_args; + + num_args = g_strv_length (remaining_args); + for (i = 0; i < num_args; ++i) { + utf8_filename = g_filename_to_utf8 (remaining_args[i], -1, NULL, NULL, NULL); + if (utf8_filename) + file_list = g_list_append (file_list, utf8_filename); + } + g_strfreev (remaining_args); + remaining_args = NULL; + } + + + /* Open files or create empty top-level window. */ + for (p = file_list; p; p = p->next) { + win = gl_window_new_from_file (p->data); + gtk_widget_show_all (win); + g_free (p->data); + } + if ( gl_window_get_window_list() == NULL ) { + win = gl_window_new (); + gtk_widget_show_all (win); + } + g_list_free (file_list); + + + /* Begin main loop */ + gtk_main(); + + return 0; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/hig.h b/src/hig.h new file mode 100644 index 00000000..7db439a8 --- /dev/null +++ b/src/hig.h @@ -0,0 +1,45 @@ +/* + * hig.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __HIG_H__ +#define __HIG_H__ + +#include + +G_BEGIN_DECLS + +#define GL_HIG_PAD1 6 +#define GL_HIG_PAD2 12 + +G_END_DECLS + +#endif /* __HIG_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-barcode.c b/src/label-barcode.c new file mode 100644 index 00000000..c45c20c2 --- /dev/null +++ b/src/label-barcode.c @@ -0,0 +1,503 @@ +/* + * label-barcode.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "label-barcode.h" + +#include +#include +#include + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + +#define FONT_SCALE (72.0/96.0) + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glLabelBarcodePrivate { + glTextNode *text_node; + gchar *id; + glColorNode *color_node; + gboolean text_flag; + gboolean checksum_flag; + guint format_digits; +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_label_barcode_finalize (GObject *object); + +static void copy (glLabelObject *dst_object, + glLabelObject *src_object); + +static void get_size (glLabelObject *object, + gdouble *w, + gdouble *h); + +static void set_line_color (glLabelObject *object, + glColorNode *line_color); + +static glColorNode *get_line_color (glLabelObject *object); + +static void draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glLabelBarcode, gl_label_barcode, GL_TYPE_LABEL_OBJECT); + + +static void +gl_label_barcode_class_init (glLabelBarcodeClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); + + gl_label_barcode_parent_class = g_type_class_peek_parent (class); + + label_object_class->copy = copy; + label_object_class->get_size = get_size; + label_object_class->set_line_color = set_line_color; + label_object_class->get_line_color = get_line_color; + label_object_class->draw_object = draw_object; + label_object_class->draw_shadow = NULL; + + object_class->finalize = gl_label_barcode_finalize; +} + + +static void +gl_label_barcode_init (glLabelBarcode *lbc) +{ + lbc->priv = g_new0 (glLabelBarcodePrivate, 1); + lbc->priv->color_node = gl_color_node_new_default (); + lbc->priv->text_node = gl_text_node_new_from_text (""); +} + + +static void +gl_label_barcode_finalize (GObject *object) +{ + glLabelBarcode *lbc = GL_LABEL_BARCODE (object); + + g_return_if_fail (object && GL_IS_LABEL_BARCODE (object)); + + gl_text_node_free (&lbc->priv->text_node); + g_free (lbc->priv->id); + gl_color_node_free (&(lbc->priv->color_node)); + g_free (lbc->priv); + + G_OBJECT_CLASS (gl_label_barcode_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/* NEW label "barcode" object. */ +/*****************************************************************************/ +GObject * +gl_label_barcode_new (glLabel *label) +{ + glLabelBarcode *lbc; + + lbc = g_object_new (gl_label_barcode_get_type(), NULL); + + gl_label_object_set_parent (GL_LABEL_OBJECT(lbc), label); + + return G_OBJECT (lbc); +} + + +/*****************************************************************************/ +/* Copy object contents. */ +/*****************************************************************************/ +static void +copy (glLabelObject *dst_object, + glLabelObject *src_object) +{ + glLabelBarcode *lbc = (glLabelBarcode *)src_object; + glLabelBarcode *new_lbc = (glLabelBarcode *)dst_object; + glTextNode *text_node; + gchar *id; + gboolean text_flag; + gboolean checksum_flag; + glColorNode *color_node; + guint format_digits; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); + g_return_if_fail (new_lbc && GL_IS_LABEL_BARCODE (new_lbc)); + + text_node = gl_label_barcode_get_data (lbc); + gl_label_barcode_get_props (lbc, &id, &text_flag, &checksum_flag, &format_digits); + color_node = get_line_color (src_object); + + gl_label_barcode_set_data (new_lbc, text_node); + gl_label_barcode_set_props (new_lbc, id, text_flag, checksum_flag, format_digits); + set_line_color (dst_object, color_node); + + gl_color_node_free (&color_node); + gl_text_node_free (&text_node); + g_free (id); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set object params. */ +/*****************************************************************************/ +void +gl_label_barcode_set_data (glLabelBarcode *lbc, + glTextNode *text_node) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); + + if (!gl_text_node_equal (lbc->priv->text_node, text_node)) { + + gl_text_node_free (&lbc->priv->text_node); + lbc->priv->text_node = gl_text_node_dup (text_node); + + gl_label_object_emit_changed (GL_LABEL_OBJECT(lbc)); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +void +gl_label_barcode_set_props (glLabelBarcode *lbc, + gchar *id, + gboolean text_flag, + gboolean checksum_flag, + guint format_digits) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); + + if ( ((lbc->priv->id == NULL) && (id != NULL)) + || (g_ascii_strcasecmp (lbc->priv->id, id) != 0) + || (lbc->priv->text_flag != text_flag) + || (lbc->priv->checksum_flag != checksum_flag) + || (lbc->priv->format_digits != format_digits)) { + + lbc->priv->id = g_strdup (id); + lbc->priv->text_flag = text_flag; + lbc->priv->checksum_flag = checksum_flag; + lbc->priv->format_digits = format_digits; + + gl_label_object_emit_changed (GL_LABEL_OBJECT(lbc)); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Get object params. */ +/*****************************************************************************/ +glTextNode * +gl_label_barcode_get_data (glLabelBarcode *lbc) +{ + g_return_val_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc), NULL); + + return gl_text_node_dup (lbc->priv->text_node); +} + + +void +gl_label_barcode_get_props (glLabelBarcode *lbc, + gchar **id, + gboolean *text_flag, + gboolean *checksum_flag, + guint *format_digits) +{ + g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); + + *id = g_strdup (lbc->priv->id); + *text_flag = lbc->priv->text_flag; + *checksum_flag = lbc->priv->checksum_flag; + *format_digits = lbc->priv->format_digits; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get object size method. */ +/*---------------------------------------------------------------------------*/ +static void +get_size (glLabelObject *object, + gdouble *w, + gdouble *h) +{ + glLabelBarcode *lbc = (glLabelBarcode *)object; + gchar *data; + gdouble w_parent, h_parent; + glBarcode *gbc; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (lbc && GL_IS_LABEL_BARCODE (lbc)); + + gl_label_object_get_raw_size (object, &w_parent, &h_parent); + + if (lbc->priv->text_node->field_flag) { + data = gl_barcode_default_digits (lbc->priv->id, + lbc->priv->format_digits); + } else { + data = gl_text_node_expand (lbc->priv->text_node, NULL); + } + + gbc = gl_barcode_new (lbc->priv->id, + lbc->priv->text_flag, + lbc->priv->checksum_flag, + w_parent, + h_parent, + data); + g_free (data); + + if ( gbc == NULL ) { + /* Try again with default digits. */ + data = gl_barcode_default_digits (lbc->priv->id, + lbc->priv->format_digits); + gbc = gl_barcode_new (lbc->priv->id, + lbc->priv->text_flag, + lbc->priv->checksum_flag, + w_parent, + h_parent, + data); + g_free (data); + } + + if ( gbc != NULL ) + { + *w = gbc->width; + *h = gbc->height; + } + else + { + /* If we still can't render, just set a default size. */ + *w = 144; + *h = 72; + } + + gl_barcode_free (&gbc); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set line color method. */ +/*---------------------------------------------------------------------------*/ +static void +set_line_color (glLabelObject *object, + glColorNode *line_color_node) +{ + glLabelBarcode *lbarcode = (glLabelBarcode *)object; + + g_return_if_fail (lbarcode && GL_IS_LABEL_BARCODE (lbarcode)); + + if ( !gl_color_node_equal(lbarcode->priv->color_node, line_color_node) ) { + + gl_color_node_free (&(lbarcode->priv->color_node)); + lbarcode->priv->color_node = gl_color_node_dup (line_color_node); + gl_label_object_emit_changed (GL_LABEL_OBJECT(lbarcode)); + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get line color method. */ +/*---------------------------------------------------------------------------*/ +static glColorNode* +get_line_color (glLabelObject *object) +{ + glLabelBarcode *lbarcode = (glLabelBarcode *)object; + + g_return_val_if_fail (lbarcode && GL_IS_LABEL_BARCODE (lbarcode), NULL); + + return gl_color_node_dup (lbarcode->priv->color_node); +} + + +/*****************************************************************************/ +/* Draw object method. */ +/*****************************************************************************/ +static void +draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + gdouble x0, y0; + cairo_matrix_t matrix; + glBarcode *gbc; + glBarcodeLine *line; + glBarcodeChar *bchar; + GList *li; + gdouble y_offset; + PangoLayout *layout; + PangoFontDescription *desc; + gchar *text, *cstring; + glTextNode *text_node; + gchar *id; + gboolean text_flag; + gboolean checksum_flag; + guint color; + glColorNode *color_node; + guint format_digits; + gdouble w, h; + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_get_position (object, &x0, &y0); + gl_label_object_get_matrix (object, &matrix); + + text_node = gl_label_barcode_get_data (GL_LABEL_BARCODE (object)); + gl_label_barcode_get_props (GL_LABEL_BARCODE (object), + &id, &text_flag, &checksum_flag, &format_digits); + + color_node = gl_label_object_get_line_color (object); + color = gl_color_node_expand (color_node, record); + if (color_node->field_flag && screen_flag) + { + color = GL_COLOR_MERGE_DEFAULT; + } + gl_color_node_free (&color_node); + + gl_label_object_get_size (object, &w, &h); + + text_node = gl_label_barcode_get_data(GL_LABEL_BARCODE(object)); + text = gl_text_node_expand (text_node, record); + if (text_node->field_flag && screen_flag) { + text = gl_barcode_default_digits (id, format_digits); + } + + gbc = gl_barcode_new (id, text_flag, checksum_flag, w, h, text); + + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (color)); + + if (gbc == NULL) { + + layout = pango_cairo_create_layout (cr); + + desc = pango_font_description_new (); + pango_font_description_set_family (desc, GL_BARCODE_FONT_FAMILY); + pango_font_description_set_size (desc, 12 * PANGO_SCALE * FONT_SCALE); + pango_layout_set_font_description (layout, desc); + pango_font_description_free (desc); + + if (text == NULL || *text == '\0') + { + pango_layout_set_text (layout, _("Barcode data empty"), -1); + } + else + { + pango_layout_set_text (layout, _("Invalid barcode data"), -1); + } + + cairo_move_to (cr, 0, 0); + pango_cairo_show_layout (cr, layout); + + g_object_unref (layout); + + } else { + + for (li = gbc->lines; li != NULL; li = li->next) { + line = (glBarcodeLine *) li->data; + + cairo_move_to (cr, line->x, line->y); + cairo_line_to (cr, line->x, line->y + line->length); + cairo_set_line_width (cr, line->width); + cairo_stroke (cr); + } + + for (li = gbc->chars; li != NULL; li = li->next) { + bchar = (glBarcodeChar *) li->data; + + layout = pango_cairo_create_layout (cr); + + desc = pango_font_description_new (); + pango_font_description_set_family (desc, GL_BARCODE_FONT_FAMILY); + pango_font_description_set_size (desc, bchar->fsize * PANGO_SCALE * FONT_SCALE); + pango_layout_set_font_description (layout, desc); + pango_font_description_free (desc); + + cstring = g_strdup_printf ("%c", bchar->c); + pango_layout_set_text (layout, cstring, -1); + g_free (cstring); + + y_offset = 0.2 * bchar->fsize; + + cairo_move_to (cr, bchar->x, bchar->y-y_offset); + pango_cairo_show_layout (cr, layout); + + g_object_unref (layout); + + } + + gl_barcode_free (&gbc); + + } + + g_free (text); + gl_text_node_free (&text_node); + g_free (id); + + gl_debug (DEBUG_LABEL, "END"); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-barcode.h b/src/label-barcode.h new file mode 100644 index 00000000..61fde06b --- /dev/null +++ b/src/label-barcode.h @@ -0,0 +1,86 @@ +/* + * label-barcode.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __LABEL_BARCODE_H__ +#define __LABEL_BARCODE_H__ + +#include "bc.h" +#include "text-node.h" +#include "label-object.h" + +G_BEGIN_DECLS + + +#define GL_TYPE_LABEL_BARCODE (gl_label_barcode_get_type ()) +#define GL_LABEL_BARCODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_BARCODE, glLabelBarcode)) +#define GL_LABEL_BARCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_BARCODE, glLabelBarcodeClass)) +#define GL_IS_LABEL_BARCODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_BARCODE)) +#define GL_IS_LABEL_BARCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_BARCODE)) + +typedef struct _glLabelBarcode glLabelBarcode; +typedef struct _glLabelBarcodeClass glLabelBarcodeClass; + +typedef struct _glLabelBarcodePrivate glLabelBarcodePrivate; + +struct _glLabelBarcode { + glLabelObject object; + + glLabelBarcodePrivate *priv; +}; + +struct _glLabelBarcodeClass { + glLabelObjectClass parent_class; +}; + + +GType gl_label_barcode_get_type (void) G_GNUC_CONST; + +GObject *gl_label_barcode_new (glLabel *label); + +void gl_label_barcode_set_data (glLabelBarcode *lbc, + glTextNode *text_node); +void gl_label_barcode_set_props (glLabelBarcode *lbc, + gchar *id, + gboolean text_flag, + gboolean checksum_flag, + guint format_digits); + +glTextNode *gl_label_barcode_get_data (glLabelBarcode *lbc); +void gl_label_barcode_get_props (glLabelBarcode *lbc, + gchar **id, + gboolean *text_flag, + gboolean *checksum_flag, + guint *format_digits); + +G_END_DECLS + +#endif /* __LABEL_BARCODE_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-box.c b/src/label-box.c new file mode 100644 index 00000000..26797368 --- /dev/null +++ b/src/label-box.c @@ -0,0 +1,418 @@ +/* + * label-box.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include "label-box.h" + +#include + +#include "debug.h" + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glLabelBoxPrivate { + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_label_box_finalize (GObject *object); + +static void copy (glLabelObject *dst_object, + glLabelObject *src_object); + +static void set_fill_color (glLabelObject *object, + glColorNode *fill_color_node); + +static void set_line_color (glLabelObject *object, + glColorNode *line_color_node); + +static void set_line_width (glLabelObject *object, + gdouble line_width); + +static glColorNode* get_fill_color (glLabelObject *object); + +static glColorNode* get_line_color (glLabelObject *object); + +static gdouble get_line_width (glLabelObject *object); + +static void draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + +static void draw_shadow (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glLabelBox, gl_label_box, GL_TYPE_LABEL_OBJECT); + + +static void +gl_label_box_class_init (glLabelBoxClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); + + gl_label_box_parent_class = g_type_class_peek_parent (class); + + label_object_class->copy = copy; + label_object_class->set_fill_color = set_fill_color; + label_object_class->set_line_color = set_line_color; + label_object_class->set_line_width = set_line_width; + label_object_class->get_fill_color = get_fill_color; + label_object_class->get_line_color = get_line_color; + label_object_class->get_line_width = get_line_width; + label_object_class->draw_object = draw_object; + label_object_class->draw_shadow = draw_shadow; + + object_class->finalize = gl_label_box_finalize; +} + + +static void +gl_label_box_init (glLabelBox *lbox) +{ + lbox->priv = g_new0 (glLabelBoxPrivate, 1); + lbox->priv->line_color_node = gl_color_node_new_default (); + lbox->priv->fill_color_node = gl_color_node_new_default (); +} + + +static void +gl_label_box_finalize (GObject *object) +{ + glLabelBox *lbox = GL_LABEL_BOX (object); + + g_return_if_fail (object && GL_IS_LABEL_BOX (object)); + + gl_color_node_free (&(lbox->priv->fill_color_node)); + gl_color_node_free (&(lbox->priv->line_color_node)); + g_free (lbox->priv); + + G_OBJECT_CLASS (gl_label_box_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/* NEW label "box" object. */ +/*****************************************************************************/ +GObject * +gl_label_box_new (glLabel *label) +{ + glLabelBox *lbox; + + lbox = g_object_new (gl_label_box_get_type(), NULL); + + gl_label_object_set_parent (GL_LABEL_OBJECT(lbox), label); + + return G_OBJECT (lbox); +} + + +/*****************************************************************************/ +/* Copy object contents. */ +/*****************************************************************************/ +static void +copy (glLabelObject *dst_object, + glLabelObject *src_object) +{ + glLabelBox *lbox = (glLabelBox *)src_object; + glLabelBox *new_lbox = (glLabelBox *)dst_object; + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); + g_return_if_fail (new_lbox && GL_IS_LABEL_BOX (new_lbox)); + + line_width = get_line_width (src_object); + line_color_node = get_line_color (src_object); + fill_color_node = get_fill_color (src_object); + + set_line_width (dst_object, line_width); + set_line_color (dst_object, line_color_node); + set_fill_color (dst_object, fill_color_node); + + gl_color_node_free (&line_color_node); + gl_color_node_free (&fill_color_node); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set fill color method. */ +/*---------------------------------------------------------------------------*/ +static void +set_fill_color (glLabelObject *object, + glColorNode *fill_color_node) +{ + glLabelBox *lbox = (glLabelBox *)object; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); + + if (!gl_color_node_equal (lbox->priv->fill_color_node, fill_color_node)) { + + gl_color_node_free (&(lbox->priv->fill_color_node)); + lbox->priv->fill_color_node = gl_color_node_dup (fill_color_node); + + gl_label_object_emit_changed (GL_LABEL_OBJECT(lbox)); + } + gl_debug (DEBUG_LABEL, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set line color method. */ +/*---------------------------------------------------------------------------*/ +static void +set_line_color (glLabelObject *object, + glColorNode *line_color_node) +{ + glLabelBox *lbox = (glLabelBox *)object; + + g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); + + if ( !gl_color_node_equal (lbox->priv->line_color_node, line_color_node )) { + gl_color_node_free (&(lbox->priv->line_color_node)); + lbox->priv->line_color_node = gl_color_node_dup (line_color_node); + gl_label_object_emit_changed (GL_LABEL_OBJECT(lbox)); + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set line width method. */ +/*---------------------------------------------------------------------------*/ +static void +set_line_width (glLabelObject *object, + gdouble line_width) +{ + glLabelBox *lbox = (glLabelBox *)object; + + g_return_if_fail (lbox && GL_IS_LABEL_BOX (lbox)); + + if ( lbox->priv->line_width != line_width ) { + lbox->priv->line_width = line_width; + gl_label_object_emit_changed (GL_LABEL_OBJECT(lbox)); + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get fill color method. */ +/*---------------------------------------------------------------------------*/ +static gdouble +get_line_width (glLabelObject *object) +{ + glLabelBox *lbox = (glLabelBox *)object; + + g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0.0); + + return lbox->priv->line_width; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get line color method. */ +/*---------------------------------------------------------------------------*/ +static glColorNode* +get_line_color (glLabelObject *object) +{ + glLabelBox *lbox = (glLabelBox *)object; + + g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0); + + return gl_color_node_dup (lbox->priv->line_color_node); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get line width method. */ +/*---------------------------------------------------------------------------*/ +static glColorNode* +get_fill_color (glLabelObject *object) +{ + glLabelBox *lbox = (glLabelBox *)object; + + g_return_val_if_fail (lbox && GL_IS_LABEL_BOX (lbox), 0); + + return gl_color_node_dup (lbox->priv->fill_color_node); +} + + +/*****************************************************************************/ +/* Draw object method. */ +/*****************************************************************************/ +static void +draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + guint line_color; + guint fill_color; + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_get_size (object, &w, &h); + + line_width = gl_label_object_get_line_width (object); + + line_color_node = gl_label_object_get_line_color (object); + fill_color_node = gl_label_object_get_fill_color (object); + line_color = gl_color_node_expand (line_color_node, record); + fill_color = gl_color_node_expand (fill_color_node, record); + if (line_color_node->field_flag && screen_flag) + { + line_color = GL_COLOR_MERGE_DEFAULT; + } + if (fill_color_node->field_flag && screen_flag) + { + fill_color = GL_COLOR_FILL_MERGE_DEFAULT; + } + + + cairo_rectangle (cr, 0.0, 0.0, w, h); + + /* Paint fill color */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); + cairo_fill_preserve (cr); + + /* Draw outline */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); + cairo_set_line_width (cr, line_width); + cairo_stroke (cr); + + gl_color_node_free (&line_color_node); + gl_color_node_free (&fill_color_node); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Draw shadow method. */ +/*****************************************************************************/ +static void +draw_shadow (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + guint line_color; + guint fill_color; + glColorNode *shadow_color_node; + guint shadow_color; + gdouble shadow_opacity; + guint shadow_line_color; + guint shadow_fill_color; + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_get_size (object, &w, &h); + + line_width = gl_label_object_get_line_width (object); + + line_color_node = gl_label_object_get_line_color (object); + fill_color_node = gl_label_object_get_fill_color (object); + line_color = gl_color_node_expand (line_color_node, record); + fill_color = gl_color_node_expand (fill_color_node, record); + if (line_color_node->field_flag && screen_flag) + { + line_color = GL_COLOR_MERGE_DEFAULT; + } + if (fill_color_node->field_flag && screen_flag) + { + fill_color = GL_COLOR_FILL_MERGE_DEFAULT; + } + + shadow_color_node = gl_label_object_get_shadow_color (object); + shadow_color = gl_color_node_expand (shadow_color_node, record); + if (shadow_color_node->field_flag && screen_flag) + { + shadow_color = GL_COLOR_SHADOW_MERGE_DEFAULT; + } + shadow_opacity = gl_label_object_get_shadow_opacity (object); + shadow_line_color = gl_color_shadow (shadow_color, shadow_opacity, line_color_node->color); + shadow_fill_color = gl_color_shadow (shadow_color, shadow_opacity, fill_color_node->color); + + + cairo_rectangle (cr, 0.0, 0.0, w, h); + + + /* Draw fill shadow */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_fill_color)); + cairo_fill_preserve (cr); + + /* Draw outline shadow */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_line_color)); + cairo_set_line_width (cr, line_width); + cairo_stroke (cr); + + + gl_color_node_free (&line_color_node); + gl_color_node_free (&fill_color_node); + gl_color_node_free (&shadow_color_node); + + gl_debug (DEBUG_LABEL, "END"); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-box.h b/src/label-box.h new file mode 100644 index 00000000..fdd623f7 --- /dev/null +++ b/src/label-box.h @@ -0,0 +1,69 @@ +/* + * label-box.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __LABEL_BOX_H__ +#define __LABEL_BOX_H__ + +#include "label-object.h" + + +G_BEGIN_DECLS + + +#define GL_TYPE_LABEL_BOX (gl_label_box_get_type ()) +#define GL_LABEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_BOX, glLabelBox)) +#define GL_LABEL_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_BOX, glLabelBoxClass)) +#define GL_IS_LABEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_BOX)) +#define GL_IS_LABEL_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_BOX)) + +typedef struct _glLabelBox glLabelBox; +typedef struct _glLabelBoxClass glLabelBoxClass; + +typedef struct _glLabelBoxPrivate glLabelBoxPrivate; + +struct _glLabelBox { + glLabelObject object; + + glLabelBoxPrivate *priv; +}; + +struct _glLabelBoxClass { + glLabelObjectClass parent_class; +}; + +GType gl_label_box_get_type (void) G_GNUC_CONST; + +GObject *gl_label_box_new (glLabel *label); + +G_END_DECLS + +#endif /* __LABEL_BOX_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-ellipse.c b/src/label-ellipse.c new file mode 100644 index 00000000..d3270680 --- /dev/null +++ b/src/label-ellipse.c @@ -0,0 +1,421 @@ +/* + * label-ellipse.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include "label-ellipse.h" + +#include +#include + +#include "cairo-ellipse-path.h" + +#include "debug.h" + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glLabelEllipsePrivate { + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; +}; + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_label_ellipse_finalize (GObject *object); + +static void copy (glLabelObject *dst_object, + glLabelObject *src_object); + +static void set_fill_color (glLabelObject *object, + glColorNode *fill_color_node); + +static void set_line_color (glLabelObject *object, + glColorNode *line_color_node); + +static void set_line_width (glLabelObject *object, + gdouble line_width); + +static glColorNode* get_fill_color (glLabelObject *object); + +static glColorNode* get_line_color (glLabelObject *object); + +static gdouble get_line_width (glLabelObject *object); + +static void draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + +static void draw_shadow (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glLabelEllipse, gl_label_ellipse, GL_TYPE_LABEL_OBJECT); + + +static void +gl_label_ellipse_class_init (glLabelEllipseClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); + + gl_label_ellipse_parent_class = g_type_class_peek_parent (class); + + label_object_class->copy = copy; + label_object_class->set_fill_color = set_fill_color; + label_object_class->set_line_color = set_line_color; + label_object_class->set_line_width = set_line_width; + label_object_class->get_fill_color = get_fill_color; + label_object_class->get_line_color = get_line_color; + label_object_class->get_line_width = get_line_width; + label_object_class->draw_object = draw_object; + label_object_class->draw_shadow = draw_shadow; + + object_class->finalize = gl_label_ellipse_finalize; +} + + +static void +gl_label_ellipse_init (glLabelEllipse *lellipse) +{ + lellipse->priv = g_new0 (glLabelEllipsePrivate, 1); + lellipse->priv->line_color_node = gl_color_node_new_default (); + lellipse->priv->fill_color_node = gl_color_node_new_default (); +} + + +static void +gl_label_ellipse_finalize (GObject *object) +{ + glLabelEllipse *lellipse = GL_LABEL_ELLIPSE (object); + + g_return_if_fail (object && GL_IS_LABEL_ELLIPSE (object)); + + gl_color_node_free (&(lellipse->priv->line_color_node)); + gl_color_node_free (&(lellipse->priv->fill_color_node)); + g_free (lellipse->priv); + + G_OBJECT_CLASS (gl_label_ellipse_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/* NEW label "ellipse" object. */ +/*****************************************************************************/ +GObject * +gl_label_ellipse_new (glLabel *label) +{ + glLabelEllipse *lellipse; + + lellipse = g_object_new (gl_label_ellipse_get_type(), NULL); + + gl_label_object_set_parent (GL_LABEL_OBJECT(lellipse), label); + + return G_OBJECT (lellipse); +} + + +/*****************************************************************************/ +/* Copy object contents. */ +/*****************************************************************************/ +static void +copy (glLabelObject *dst_object, + glLabelObject *src_object) +{ + glLabelEllipse *lellipse = (glLabelEllipse *)src_object; + glLabelEllipse *new_lellipse = (glLabelEllipse *)dst_object; + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); + g_return_if_fail (new_lellipse && GL_IS_LABEL_ELLIPSE (new_lellipse)); + + line_width = get_line_width (src_object); + line_color_node = get_line_color (src_object); + fill_color_node = get_fill_color (src_object); + + set_line_width (dst_object, line_width); + set_line_color (dst_object, line_color_node); + set_fill_color (dst_object, fill_color_node); + + gl_color_node_free (&line_color_node); + gl_color_node_free (&fill_color_node); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set fill color method. */ +/*---------------------------------------------------------------------------*/ +static void +set_fill_color (glLabelObject *object, + glColorNode *fill_color_node) +{ + glLabelEllipse *lellipse = (glLabelEllipse *)object; + + g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); + + if (!gl_color_node_equal (lellipse->priv->fill_color_node, fill_color_node)) { + + gl_color_node_free (&(lellipse->priv->fill_color_node)); + lellipse->priv->fill_color_node = gl_color_node_dup (fill_color_node); + + gl_label_object_emit_changed (GL_LABEL_OBJECT(lellipse)); + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set line color method. */ +/*---------------------------------------------------------------------------*/ +static void +set_line_color (glLabelObject *object, + glColorNode *line_color_node) +{ + glLabelEllipse *lellipse = (glLabelEllipse *)object; + + g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); + + if ( !gl_color_node_equal (lellipse->priv->line_color_node, line_color_node) ) { + + gl_color_node_free (&(lellipse->priv->line_color_node)); + lellipse->priv->line_color_node = gl_color_node_dup (line_color_node); + + gl_label_object_emit_changed (GL_LABEL_OBJECT(lellipse)); + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set line width method. */ +/*---------------------------------------------------------------------------*/ +static void +set_line_width (glLabelObject *object, + gdouble line_width) +{ + glLabelEllipse *lellipse = (glLabelEllipse *)object; + + g_return_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse)); + + if ( lellipse->priv->line_width != line_width ) { + lellipse->priv->line_width = line_width; + gl_label_object_emit_changed (GL_LABEL_OBJECT(lellipse)); + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get fill color method. */ +/*---------------------------------------------------------------------------*/ +static gdouble +get_line_width (glLabelObject *object) +{ + glLabelEllipse *lellipse = (glLabelEllipse *)object; + + g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0.0); + + return lellipse->priv->line_width; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get line color method. */ +/*---------------------------------------------------------------------------*/ +static glColorNode* +get_line_color (glLabelObject *object) +{ + glLabelEllipse *lellipse = (glLabelEllipse *)object; + + g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0); + + return gl_color_node_dup (lellipse->priv->line_color_node); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get line width method. */ +/*---------------------------------------------------------------------------*/ +static glColorNode* +get_fill_color (glLabelObject *object) +{ + glLabelEllipse *lellipse = (glLabelEllipse *)object; + + g_return_val_if_fail (lellipse && GL_IS_LABEL_ELLIPSE (lellipse), 0); + + return gl_color_node_dup (lellipse->priv->fill_color_node); +} + + +/*****************************************************************************/ +/* Draw object method. */ +/*****************************************************************************/ +static void +draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + guint line_color; + guint fill_color; + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_get_size (object, &w, &h); + + line_width = gl_label_object_get_line_width (object); + + line_color_node = gl_label_object_get_line_color (object); + fill_color_node = gl_label_object_get_fill_color (object); + line_color = gl_color_node_expand (line_color_node, record); + fill_color = gl_color_node_expand (fill_color_node, record); + if (line_color_node->field_flag && screen_flag) + { + line_color = GL_COLOR_MERGE_DEFAULT; + } + if (fill_color_node->field_flag && screen_flag) + { + fill_color = GL_COLOR_FILL_MERGE_DEFAULT; + } + + + gl_cairo_ellipse_path (cr, w/2, h/2); + + /* Paint fill color */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); + cairo_fill_preserve (cr); + + /* Draw outline */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); + cairo_set_line_width (cr, line_width); + cairo_stroke (cr); + + gl_color_node_free (&line_color_node); + gl_color_node_free (&fill_color_node); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Draw shadow method. */ +/*****************************************************************************/ +static void +draw_shadow (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + guint line_color; + guint fill_color; + glColorNode *shadow_color_node; + guint shadow_color; + gdouble shadow_opacity; + guint shadow_line_color; + guint shadow_fill_color; + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_get_size (object, &w, &h); + + line_width = gl_label_object_get_line_width (object); + + line_color_node = gl_label_object_get_line_color (object); + fill_color_node = gl_label_object_get_fill_color (object); + line_color = gl_color_node_expand (line_color_node, record); + fill_color = gl_color_node_expand (fill_color_node, record); + if (line_color_node->field_flag && screen_flag) + { + line_color = GL_COLOR_MERGE_DEFAULT; + } + if (fill_color_node->field_flag && screen_flag) + { + fill_color = GL_COLOR_FILL_MERGE_DEFAULT; + } + + shadow_color_node = gl_label_object_get_shadow_color (object); + shadow_color = gl_color_node_expand (shadow_color_node, record); + if (shadow_color_node->field_flag && screen_flag) + { + shadow_color = GL_COLOR_SHADOW_MERGE_DEFAULT; + } + shadow_opacity = gl_label_object_get_shadow_opacity (object); + shadow_line_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, line_color_node->color); + shadow_fill_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, fill_color_node->color); + + + gl_cairo_ellipse_path (cr, w/2, h/2); + + + /* Draw fill shadow */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_fill_color)); + cairo_fill_preserve (cr); + + /* Draw outline shadow */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_line_color)); + cairo_set_line_width (cr, line_width); + cairo_stroke (cr); + + + gl_color_node_free (&line_color_node); + gl_color_node_free (&fill_color_node); + gl_color_node_free (&shadow_color_node); + + gl_debug (DEBUG_LABEL, "END"); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-ellipse.h b/src/label-ellipse.h new file mode 100644 index 00000000..d1a01221 --- /dev/null +++ b/src/label-ellipse.h @@ -0,0 +1,69 @@ +/* + * label-ellipse.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __LABEL_ELLIPSE_H__ +#define __LABEL_ELLIPSE_H__ + +#include "label-object.h" + + +G_BEGIN_DECLS + + +#define GL_TYPE_LABEL_ELLIPSE (gl_label_ellipse_get_type ()) +#define GL_LABEL_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_ELLIPSE, glLabelEllipse)) +#define GL_LABEL_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_ELLIPSE, glLabelEllipseClass)) +#define GL_IS_LABEL_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_ELLIPSE)) +#define GL_IS_LABEL_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_ELLIPSE)) + +typedef struct _glLabelEllipse glLabelEllipse; +typedef struct _glLabelEllipseClass glLabelEllipseClass; + +typedef struct _glLabelEllipsePrivate glLabelEllipsePrivate; + +struct _glLabelEllipse { + glLabelObject object; + + glLabelEllipsePrivate *priv; +}; + +struct _glLabelEllipseClass { + glLabelObjectClass parent_class; +}; + +GType gl_label_ellipse_get_type (void) G_GNUC_CONST; + +GObject *gl_label_ellipse_new (glLabel *label); + +G_END_DECLS + +#endif /* __LABEL_ELLIPSE_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-image.c b/src/label-image.c new file mode 100644 index 00000000..d325dc69 --- /dev/null +++ b/src/label-image.c @@ -0,0 +1,372 @@ +/* + * label-image.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "label-image.h" + +#include +#include + +#include "pixmaps/checkerboard.xpm" + +#include "debug.h" + + +#define MIN_IMAGE_SIZE 1.0 + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glLabelImagePrivate { + glTextNode *filename; + GdkPixbuf *pixbuf; +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static GdkPixbuf *default_pixbuf = NULL; + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_label_image_finalize (GObject *object); + +static void copy (glLabelObject *dst_object, + glLabelObject *src_object); + +static void set_size (glLabelObject *object, + gdouble w, + gdouble h); + +static void draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glLabelImage, gl_label_image, GL_TYPE_LABEL_OBJECT); + + +static void +gl_label_image_class_init (glLabelImageClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); + + gl_label_image_parent_class = g_type_class_peek_parent (class); + + label_object_class->copy = copy; + label_object_class->set_size = set_size; + label_object_class->draw_object = draw_object; + label_object_class->draw_shadow = NULL; + + object_class->finalize = gl_label_image_finalize; +} + + +static void +gl_label_image_init (glLabelImage *limage) +{ + GdkPixbuf *pixbuf; + + if ( default_pixbuf == NULL ) { + pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)checkerboard_xpm); + default_pixbuf = + gdk_pixbuf_scale_simple (pixbuf, 128, 128, GDK_INTERP_NEAREST); + g_object_unref (pixbuf); + } + + limage->priv = g_new0 (glLabelImagePrivate, 1); + + limage->priv->filename = g_new0 (glTextNode, 1); + + limage->priv->pixbuf = default_pixbuf; +} + + +static void +gl_label_image_finalize (GObject *object) +{ + glLabelObject *lobject = GL_LABEL_OBJECT (object); + glLabelImage *limage = GL_LABEL_IMAGE (object);; + GHashTable *pixbuf_cache; + + g_return_if_fail (object && GL_IS_LABEL_IMAGE (object)); + + if (!limage->priv->filename->field_flag) { + pixbuf_cache = gl_label_get_pixbuf_cache (lobject->parent); + gl_pixbuf_cache_remove_pixbuf (pixbuf_cache, + limage->priv->filename->data); + } + gl_text_node_free (&limage->priv->filename); + g_free (limage->priv); + + G_OBJECT_CLASS (gl_label_image_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/* NEW label "image" object. */ +/*****************************************************************************/ +GObject * +gl_label_image_new (glLabel *label) +{ + glLabelImage *limage; + + limage = g_object_new (gl_label_image_get_type(), NULL); + + gl_label_object_set_parent (GL_LABEL_OBJECT(limage), label); + + return G_OBJECT (limage); +} + + +/*****************************************************************************/ +/* Copy object contents. */ +/*****************************************************************************/ +static void +copy (glLabelObject *dst_object, + glLabelObject *src_object) +{ + glLabelImage *limage = (glLabelImage *)src_object; + glLabelImage *new_limage = (glLabelImage *)dst_object; + glTextNode *filename; + GdkPixbuf *pixbuf; + GHashTable *pixbuf_cache; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (limage && GL_IS_LABEL_IMAGE (limage)); + g_return_if_fail (new_limage && GL_IS_LABEL_IMAGE (new_limage)); + + filename = gl_label_image_get_filename (limage); + + /* Make sure destination label has data suitably cached. */ + if ( !filename->field_flag && (filename->data != NULL) ) { + pixbuf = limage->priv->pixbuf; + if ( pixbuf != default_pixbuf ) { + pixbuf_cache = gl_label_get_pixbuf_cache (dst_object->parent); + gl_pixbuf_cache_add_pixbuf (pixbuf_cache, filename->data, pixbuf); + } + } + + gl_label_image_set_filename (new_limage, filename); + gl_text_node_free (&filename); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set size method. */ +/*---------------------------------------------------------------------------*/ +static void +set_size (glLabelObject *object, + gdouble w, + gdouble h) +{ + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if (w < MIN_IMAGE_SIZE) + { + w = MIN_IMAGE_SIZE; + } + + if (h < MIN_IMAGE_SIZE) + { + h = MIN_IMAGE_SIZE; + } + + GL_LABEL_OBJECT_CLASS (gl_label_image_parent_class)->set_size (object, w, h); +} + + +/*****************************************************************************/ +/* Set object params. */ +/*****************************************************************************/ +void +gl_label_image_set_filename (glLabelImage *limage, + glTextNode *filename) +{ + glTextNode *old_filename; + GHashTable *pixbuf_cache; + GdkPixbuf *pixbuf; + gdouble image_w, image_h, aspect_ratio, w, h; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (limage && GL_IS_LABEL_IMAGE (limage)); + g_return_if_fail (filename != NULL); + + old_filename = limage->priv->filename; + + /* If Unchanged don't do anything */ + if ( gl_text_node_equal (filename, old_filename ) ) { + return; + } + + pixbuf_cache = gl_label_get_pixbuf_cache (GL_LABEL_OBJECT(limage)->parent); + + /* Remove reference to previous pixbuf from cache, if needed. */ + if ( !old_filename->field_flag && (old_filename->data != NULL) ) { + gl_pixbuf_cache_remove_pixbuf (pixbuf_cache, old_filename->data); + } + + /* Set new filename. */ + limage->priv->filename = gl_text_node_dup(filename); + gl_text_node_free (&old_filename); + + /* Now set the pixbuf. */ + if ( filename->field_flag || (filename->data == NULL) ) { + + limage->priv->pixbuf = default_pixbuf; + + } else { + + pixbuf = gl_pixbuf_cache_get_pixbuf (pixbuf_cache, filename->data); + + if (pixbuf != NULL) { + limage->priv->pixbuf = pixbuf; + } else { + limage->priv->pixbuf = default_pixbuf; + } + } + + /* Treat current size as a bounding box, scale image to maintain aspect + * ratio while fitting it in this bounding box. */ + image_w = gdk_pixbuf_get_width (limage->priv->pixbuf); + image_h = gdk_pixbuf_get_height (limage->priv->pixbuf); + aspect_ratio = image_h / image_w; + gl_label_object_get_size (GL_LABEL_OBJECT(limage), &w, &h); + if ( h > w*aspect_ratio ) { + h = w * aspect_ratio; + } else { + w = h / aspect_ratio; + } + gl_label_object_set_size (GL_LABEL_OBJECT(limage), w, h); + + gl_label_object_emit_changed (GL_LABEL_OBJECT(limage)); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Get object params. */ +/*****************************************************************************/ +glTextNode * +gl_label_image_get_filename (glLabelImage *limage) +{ + g_return_val_if_fail (limage && GL_IS_LABEL_IMAGE (limage), NULL); + + return gl_text_node_dup (limage->priv->filename); +} + + +const GdkPixbuf * +gl_label_image_get_pixbuf (glLabelImage *limage, + glMergeRecord *record) +{ + g_return_val_if_fail (limage && GL_IS_LABEL_IMAGE (limage), NULL); + + if ((record != NULL) && limage->priv->filename->field_flag) { + + GdkPixbuf *pixbuf = NULL; + gchar *real_filename; + + /* Indirect filename, re-evaluate for given record. */ + + real_filename = gl_merge_eval_key (record, + limage->priv->filename->data); + + if (real_filename != NULL) { + pixbuf = gdk_pixbuf_new_from_file (real_filename, NULL); + } + if ( pixbuf != NULL ) { + return pixbuf; + } else { + return default_pixbuf; + } + + } + + return limage->priv->pixbuf; + +} + + +/*****************************************************************************/ +/* Draw object method. */ +/*****************************************************************************/ +static void +draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + gdouble x0, y0; + gdouble w, h; + const GdkPixbuf *pixbuf; + gint image_w, image_h; + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_get_size (object, &w, &h); + gl_label_object_get_position (object, &x0, &y0); + + pixbuf = gl_label_image_get_pixbuf (GL_LABEL_IMAGE (object), record); + image_w = gdk_pixbuf_get_width (pixbuf); + image_h = gdk_pixbuf_get_height (pixbuf); + + cairo_save (cr); + + cairo_rectangle (cr, 0.0, 0.0, w, h); + + cairo_scale (cr, w/image_w, h/image_h); + gdk_cairo_set_source_pixbuf (cr, (GdkPixbuf *)pixbuf, 0, 0); + cairo_fill (cr); + + cairo_restore (cr); + + gl_debug (DEBUG_LABEL, "END"); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-image.h b/src/label-image.h new file mode 100644 index 00000000..15216c37 --- /dev/null +++ b/src/label-image.h @@ -0,0 +1,79 @@ +/* + * label-image.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __LABEL_IMAGE_H__ +#define __LABEL_IMAGE_H__ + +#include +#include "label-object.h" +#include "text-node.h" +#include "merge.h" + +G_BEGIN_DECLS + + +#define GL_TYPE_LABEL_IMAGE (gl_label_image_get_type ()) +#define GL_LABEL_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_IMAGE, glLabelImage)) +#define GL_LABEL_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_IMAGE, glLabelImageClass)) +#define GL_IS_LABEL_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_IMAGE)) +#define GL_IS_LABEL_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_IMAGE)) + +typedef struct _glLabelImage glLabelImage; +typedef struct _glLabelImageClass glLabelImageClass; + +typedef struct _glLabelImagePrivate glLabelImagePrivate; + +struct _glLabelImage { + glLabelObject object; + + glLabelImagePrivate *priv; +}; + +struct _glLabelImageClass { + glLabelObjectClass parent_class; +}; + +GType gl_label_image_get_type (void) G_GNUC_CONST; + +GObject *gl_label_image_new (glLabel *label); + +void gl_label_image_set_filename (glLabelImage *limage, + glTextNode *filename); + +glTextNode *gl_label_image_get_filename (glLabelImage *limage); + +const GdkPixbuf *gl_label_image_get_pixbuf (glLabelImage *limage, + glMergeRecord *record); + +G_END_DECLS + +#endif /* __LABEL_IMAGE_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-line.c b/src/label-line.c new file mode 100644 index 00000000..70b26cc4 --- /dev/null +++ b/src/label-line.c @@ -0,0 +1,339 @@ +/* + * label-line.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include "label-line.h" + +#include + +#include "debug.h" + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glLabelLinePrivate { + gdouble line_width; + glColorNode *line_color_node; +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_label_line_finalize (GObject *object); + +static void copy (glLabelObject *dst_object, + glLabelObject *src_object); + +static void set_line_color (glLabelObject *object, + glColorNode *line_color_node); + +static void set_line_width (glLabelObject *object, + gdouble line_width); + +static glColorNode *get_line_color (glLabelObject *object); + +static gdouble get_line_width (glLabelObject *object); + +static void draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + +static void draw_shadow (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glLabelLine, gl_label_line, GL_TYPE_LABEL_OBJECT); + + +static void +gl_label_line_class_init (glLabelLineClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); + + gl_label_line_parent_class = g_type_class_peek_parent (class); + + label_object_class->copy = copy; + label_object_class->set_line_color = set_line_color; + label_object_class->set_line_width = set_line_width; + label_object_class->get_line_color = get_line_color; + label_object_class->get_line_width = get_line_width; + label_object_class->draw_object = draw_object; + label_object_class->draw_shadow = draw_shadow; + + object_class->finalize = gl_label_line_finalize; +} + + +static void +gl_label_line_init (glLabelLine *lline) +{ + lline->priv = g_new0 (glLabelLinePrivate, 1); + lline->priv->line_color_node = gl_color_node_new_default (); +} + + +static void +gl_label_line_finalize (GObject *object) +{ + glLabelLine *lline = GL_LABEL_LINE (object); + + g_return_if_fail (object && GL_IS_LABEL_LINE (object)); + + gl_color_node_free (&(lline->priv->line_color_node)); + g_free (lline->priv); + + G_OBJECT_CLASS (gl_label_line_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/* NEW label "line" object. */ +/*****************************************************************************/ +GObject * +gl_label_line_new (glLabel *label) +{ + glLabelLine *lline; + + lline = g_object_new (gl_label_line_get_type(), NULL); + + gl_label_object_set_parent (GL_LABEL_OBJECT(lline), label); + + return G_OBJECT (lline); +} + + +/*****************************************************************************/ +/* Copy object contents. */ +/*****************************************************************************/ +static void +copy (glLabelObject *dst_object, + glLabelObject *src_object) +{ + glLabelLine *lline = (glLabelLine *)src_object; + glLabelLine *new_lline = (glLabelLine *)dst_object; + gdouble line_width; + glColorNode *line_color_node; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (lline && GL_IS_LABEL_LINE (lline)); + g_return_if_fail (new_lline && GL_IS_LABEL_LINE (new_lline)); + + line_width = get_line_width (src_object); + line_color_node = get_line_color (src_object); + + set_line_width (dst_object, line_width); + set_line_color (dst_object, line_color_node); + + gl_color_node_free (&line_color_node); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set line color method. */ +/*---------------------------------------------------------------------------*/ +static void +set_line_color (glLabelObject *object, + glColorNode *line_color_node) +{ + glLabelLine *lline = (glLabelLine *)object; + + g_return_if_fail (lline && GL_IS_LABEL_LINE (lline)); + + if ( !gl_color_node_equal (lline->priv->line_color_node, line_color_node)) { + + gl_color_node_free (&(lline->priv->line_color_node )); + lline->priv->line_color_node = gl_color_node_dup (line_color_node); + + gl_label_object_emit_changed (GL_LABEL_OBJECT(lline)); + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set line width method. */ +/*---------------------------------------------------------------------------*/ +static void +set_line_width (glLabelObject *object, + gdouble line_width) +{ + glLabelLine *lline = (glLabelLine *)object; + + g_return_if_fail (lline && GL_IS_LABEL_LINE (lline)); + + if ( lline->priv->line_width != line_width ) { + lline->priv->line_width = line_width; + gl_label_object_emit_changed (GL_LABEL_OBJECT(lline)); + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get line color method. */ +/*---------------------------------------------------------------------------*/ +static gdouble +get_line_width (glLabelObject *object) +{ + glLabelLine *lline = (glLabelLine *)object; + + g_return_val_if_fail (lline && GL_IS_LABEL_LINE (lline), 0.0); + + return lline->priv->line_width; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Get line width method. */ +/*---------------------------------------------------------------------------*/ +static glColorNode* +get_line_color (glLabelObject *object) +{ + glLabelLine *lline = (glLabelLine *)object; + + g_return_val_if_fail (lline && GL_IS_LABEL_LINE (lline), 0); + + return gl_color_node_dup (lline->priv->line_color_node); +} + + +/*****************************************************************************/ +/* Draw object method. */ +/*****************************************************************************/ +static void +draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + guint line_color; + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); + + line_width = gl_label_object_get_line_width (object); + + line_color_node = gl_label_object_get_line_color (object); + line_color = gl_color_node_expand (line_color_node, record); + if (line_color_node->field_flag && screen_flag) + { + line_color = GL_COLOR_MERGE_DEFAULT; + } + + + cairo_move_to (cr, 0.0, 0.0); + cairo_line_to (cr, w, h); + + + /* Draw line */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); + cairo_set_line_width (cr, line_width); + cairo_stroke (cr); + + gl_color_node_free (&line_color_node); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Draw shadow method. */ +/*****************************************************************************/ +static void +draw_shadow (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + guint shadow_line_color; + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); + + line_width = gl_label_object_get_line_width (object); + + line_color_node = gl_label_object_get_line_color (object); + if (line_color_node->field_flag) + { + line_color_node->color = GL_COLOR_MERGE_DEFAULT; + } + + shadow_color_node = gl_label_object_get_shadow_color (object); + if (shadow_color_node->field_flag) + { + shadow_color_node->color = GL_COLOR_SHADOW_MERGE_DEFAULT; + } + shadow_opacity = gl_label_object_get_shadow_opacity (object); + shadow_line_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, line_color_node->color); + + + cairo_move_to (cr, 0.0, 0.0); + cairo_line_to (cr, w, h); + + + /* Draw outline shadow */ + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_line_color)); + cairo_set_line_width (cr, line_width); + cairo_stroke (cr); + + + gl_color_node_free (&line_color_node); + gl_color_node_free (&shadow_color_node); + + gl_debug (DEBUG_LABEL, "END"); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-line.h b/src/label-line.h new file mode 100644 index 00000000..da11a574 --- /dev/null +++ b/src/label-line.h @@ -0,0 +1,70 @@ +/* + * label-line.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __LABEL_LINE_H__ +#define __LABEL_LINE_H__ + +#include "label-object.h" + + +G_BEGIN_DECLS + + +#define GL_TYPE_LABEL_LINE (gl_label_line_get_type ()) +#define GL_LABEL_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_LINE, glLabelLine)) +#define GL_LABEL_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_LINE, glLabelLineClass)) +#define GL_IS_LABEL_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_LINE)) +#define GL_IS_LABEL_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_LINE)) + +typedef struct _glLabelLine glLabelLine; +typedef struct _glLabelLineClass glLabelLineClass; + +typedef struct _glLabelLinePrivate glLabelLinePrivate; + +struct _glLabelLine { + glLabelObject object; + + glLabelLinePrivate *priv; +}; + +struct _glLabelLineClass { + glLabelObjectClass parent_class; +}; + +GType gl_label_line_get_type (void) G_GNUC_CONST; + +GObject *gl_label_line_new (glLabel *label); + + +G_END_DECLS + +#endif /* __LABEL_LINE_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-object.c b/src/label-object.c new file mode 100644 index 00000000..89cefc98 --- /dev/null +++ b/src/label-object.c @@ -0,0 +1,1594 @@ +/* + * label-object.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "label-object.h" + +#include +#include + +#include "marshal.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private defines. */ +/*========================================================*/ + +#define DEFAULT_SHADOW_X_OFFSET (3.6) +#define DEFAULT_SHADOW_Y_OFFSET (3.6) +#define DEFAULT_SHADOW_OPACITY (0.5) + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glLabelObjectPrivate { + gchar *name; + gdouble x, y; + gdouble w, h; + cairo_matrix_t matrix; + + gdouble aspect_ratio; + + gboolean shadow_state; + gdouble shadow_x; + gdouble shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; +}; + +enum { + CHANGED, + MOVED, + FLIP_ROTATE, + TOP, + BOTTOM, + REMOVED, + LAST_SIGNAL +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static guint signals[LAST_SIGNAL] = {0}; + +static guint instance = 0; + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_label_object_finalize (GObject *object); + +static void merge_changed_cb (glLabel *label, + glLabelObject *object); + +static void set_size (glLabelObject *object, + gdouble w, + gdouble h); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glLabelObject, gl_label_object, G_TYPE_OBJECT); + + +static void +gl_label_object_class_init (glLabelObjectClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_label_object_finalize; + + class->set_size = set_size; + + signals[CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelObjectClass, changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + signals[MOVED] = + g_signal_new ("moved", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelObjectClass, moved), + NULL, NULL, + gl_marshal_VOID__DOUBLE_DOUBLE, + G_TYPE_NONE, + 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); + signals[FLIP_ROTATE] = + g_signal_new ("flip_rotate", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelObjectClass, flip_rotate), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + signals[TOP] = + g_signal_new ("top", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelObjectClass, top), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + signals[BOTTOM] = + g_signal_new ("bottom", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelObjectClass, bottom), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + signals[REMOVED] = + g_signal_new ("removed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelObjectClass, removed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +static void +gl_label_object_init (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, "START"); + + object->priv = g_new0 (glLabelObjectPrivate, 1); + + object->priv->name = g_strdup_printf ("object%d", instance++); + + cairo_matrix_init_identity (&object->priv->matrix); + + object->priv->shadow_state = FALSE; + object->priv->shadow_x = DEFAULT_SHADOW_X_OFFSET; + object->priv->shadow_y = DEFAULT_SHADOW_Y_OFFSET; + object->priv->shadow_color_node = gl_color_node_new_default (); + object->priv->shadow_opacity = DEFAULT_SHADOW_OPACITY; + + gl_debug (DEBUG_LABEL, "END"); +} + + +static void +gl_label_object_finalize (GObject *object) +{ + glLabelObject *label_object = GL_LABEL_OBJECT (object); + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + g_free (label_object->priv->name); + g_free (label_object->priv); + + G_OBJECT_CLASS (gl_label_object_parent_class)->finalize (object); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* New label object. */ +/*****************************************************************************/ +GObject * +gl_label_object_new (glLabel *label) +{ + glLabelObject *object; + + gl_debug (DEBUG_LABEL, "START"); + + object = g_object_new (gl_label_object_get_type(), NULL); + + gl_label_object_set_parent (object, label); + + gl_debug (DEBUG_LABEL, "END"); + + return G_OBJECT (object); +} + + +/*****************************************************************************/ +/* Duplicate object. */ +/*****************************************************************************/ +glLabelObject * +gl_label_object_dup (glLabelObject *src_object, + glLabel *label) +{ + glLabelObject *dst_object; + gdouble x, y, w, h; + cairo_matrix_t matrix; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (src_object && GL_IS_LABEL_OBJECT (src_object), NULL); + + dst_object = g_object_new (G_OBJECT_TYPE(src_object), NULL); + + gl_label_object_set_parent (dst_object, label); + + gl_label_object_get_position (src_object, &x, &y); + gl_label_object_get_size (src_object, &w, &h); + gl_label_object_get_matrix (src_object, &matrix); + gl_label_object_get_shadow_offset (src_object, &shadow_x, &shadow_y); + shadow_color_node = gl_label_object_get_shadow_color (src_object); + shadow_opacity = gl_label_object_get_shadow_opacity (src_object); + shadow_state = gl_label_object_get_shadow_state (src_object); + + gl_label_object_set_position (dst_object, x, y); + gl_label_object_set_size (dst_object, w, h); + gl_label_object_set_matrix (dst_object, &matrix); + gl_label_object_set_shadow_offset (dst_object, shadow_x, shadow_y); + gl_label_object_set_shadow_color (dst_object, shadow_color_node); + gl_label_object_set_shadow_opacity (dst_object, shadow_opacity); + gl_label_object_set_shadow_state (dst_object, shadow_state); + + gl_color_node_free (&shadow_color_node); + + if ( GL_LABEL_OBJECT_GET_CLASS(src_object)->copy != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(src_object)->copy (dst_object, src_object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return dst_object; +} + + +/*****************************************************************************/ +/* Emit "changed" signal (for derived objects). */ +/*****************************************************************************/ +void +gl_label_object_emit_changed (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + g_signal_emit (G_OBJECT(object), signals[CHANGED], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set parent label of object. */ +/*****************************************************************************/ +void +gl_label_object_set_parent (glLabelObject *object, + glLabel *label) +{ + glLabel *old_parent; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + g_return_if_fail (label && GL_IS_LABEL (label)); + + old_parent = object->parent; + if ( old_parent != NULL ) { + g_signal_handlers_disconnect_by_func (old_parent, + G_CALLBACK(merge_changed_cb), + object); + gl_label_remove_object( old_parent, object ); + } + gl_label_add_object( label, object ); + + g_signal_connect (G_OBJECT(label), "merge_changed", + G_CALLBACK(merge_changed_cb), object); + + g_signal_emit (G_OBJECT(object), signals[CHANGED], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Get parent label of object. */ +/*****************************************************************************/ +glLabel * +gl_label_object_get_parent (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), NULL); + + gl_debug (DEBUG_LABEL, "END"); + + return object->parent; +} + + +/*****************************************************************************/ +/* Set remove object from parent. */ +/*****************************************************************************/ +void +gl_label_object_remove (glLabelObject *object) +{ + glLabel *parent; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + parent = object->parent; + if ( parent != NULL ) { + g_signal_handlers_disconnect_by_func (parent, + G_CALLBACK(merge_changed_cb), + object); + gl_label_remove_object (parent, object); + + g_signal_emit (G_OBJECT(object), signals[REMOVED], 0); + + g_object_unref (G_OBJECT(object)); + } + + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set name of object. */ +/*****************************************************************************/ +void +gl_label_object_set_name (glLabelObject *object, + gchar *name) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + g_free(object->priv->name); + object->priv->name = name; + + g_signal_emit (G_OBJECT(object), signals[CHANGED], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Get name of object. */ +/*****************************************************************************/ +gchar * +gl_label_object_get_name (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), NULL); + + gl_debug (DEBUG_LABEL, "END"); + + return g_strdup(object->priv->name); +} + + +/*****************************************************************************/ +/* Set position of object. */ +/*****************************************************************************/ +void +gl_label_object_set_position (glLabelObject *object, + gdouble x, + gdouble y) +{ + gdouble dx, dy; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( (x != object->priv->x) || (y != object->priv->y) ) { + + dx = x - object->priv->x; + dy = y - object->priv->y; + + object->priv->x = x; + object->priv->y = y; + + g_signal_emit (G_OBJECT(object), signals[MOVED], 0, dx, dy); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set position of object relative to old position. */ +/*****************************************************************************/ +void +gl_label_object_set_position_relative (glLabelObject *object, + gdouble dx, + gdouble dy) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( (dx != 0.0) || (dy != 0.0) ) { + + object->priv->x += dx; + object->priv->y += dy; + + gl_debug (DEBUG_LABEL, " x = %f, y= %f", + object->priv->x, + object->priv->y); + + g_signal_emit (G_OBJECT(object), signals[MOVED], 0, dx, dy); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Get position of object. */ +/*****************************************************************************/ +void +gl_label_object_get_position (glLabelObject *object, + gdouble *x, + gdouble *y) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + *x = object->priv->x; + *y = object->priv->y; + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Default set size method. */ +/*---------------------------------------------------------------------------*/ +static void +set_size (glLabelObject *object, + gdouble w, + gdouble h) +{ + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( (object->priv->w != w) || (object->priv->h != h) ) { + + object->priv->w = w; + object->priv->h = h; + + g_signal_emit (G_OBJECT(object), signals[CHANGED], 0); + } +} + + +/*****************************************************************************/ +/* Set size of object. */ +/*****************************************************************************/ +void +gl_label_object_set_size (glLabelObject *object, + gdouble w, + gdouble h) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_size != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_size (object, w, h); + + object->priv->aspect_ratio = h / w; + + } + + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set size of object honoring current aspect ratio. */ +/*****************************************************************************/ +void +gl_label_object_set_size_honor_aspect (glLabelObject *object, + gdouble w, + gdouble h) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( h > w*object->priv->aspect_ratio ) { + + h = w * object->priv->aspect_ratio; + + } else { + + w = h / object->priv->aspect_ratio; + + } + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_size != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_size (object, w, h); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Get raw size method (don't let object content adjust size). */ +/*****************************************************************************/ +void +gl_label_object_get_raw_size (glLabelObject *object, + gdouble *w, + gdouble *h) +{ + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + *w = object->priv->w; + *h = object->priv->h; +} + + +/*****************************************************************************/ +/* Get size of object. */ +/*****************************************************************************/ +void +gl_label_object_get_size (glLabelObject *object, + gdouble *w, + gdouble *h) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_size != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->get_size (object, w, h); + + } else { + + gl_label_object_get_raw_size (object, w, h); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Get extent of object. */ +/*****************************************************************************/ +void +gl_label_object_get_extent (glLabelObject *object, + glLabelRegion *region) +{ + gdouble w, h; + gdouble line_w; + gdouble xa1, ya1, xa2, ya2, xa3, ya3, xa4, ya4; + cairo_matrix_t matrix; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + gl_label_object_get_size (object, &w, &h); + line_w = gl_label_object_get_line_width (object); + + /* setup untransformed corners of bounding box, account for line width */ + xa1 = - line_w/2; + ya1 = - line_w/2; + xa2 = w + line_w/2; + ya2 = - line_w/2; + xa3 = w + line_w/2; + ya3 = h + line_w/2; + xa4 = - line_w/2; + ya4 = h + line_w/2; + + /* transform these points */ + gl_label_object_get_matrix (object, &matrix); + cairo_matrix_transform_point (&matrix, &xa1, &ya1); + cairo_matrix_transform_point (&matrix, &xa2, &ya2); + cairo_matrix_transform_point (&matrix, &xa3, &ya3); + cairo_matrix_transform_point (&matrix, &xa4, &ya4); + + /* now find the maximum extent of these points in x and y */ + region->x1 = MIN (xa1, MIN (xa2, MIN (xa3, xa4))) + object->priv->x; + region->y1 = MIN (ya1, MIN (ya2, MIN (ya3, ya4))) + object->priv->y; + region->x2 = MAX (xa1, MAX (xa2, MAX (xa3, xa4))) + object->priv->x; + region->y2 = MAX (ya1, MAX (ya2, MAX (ya3, ya4))) + object->priv->y; + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Can text properties be set for this object? */ +/*****************************************************************************/ +gboolean +gl_label_object_can_text (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_family != NULL ) { + + return TRUE; + + } else { + + return FALSE; + + } + +} + + +/*****************************************************************************/ +/* Set font family for all text contained in object. */ +/*****************************************************************************/ +void +gl_label_object_set_font_family (glLabelObject *object, + const gchar *font_family) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_family != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_font_family (object, font_family); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Set font size for all text contained in object. */ +/****************************************************************************/ +void +gl_label_object_set_font_size (glLabelObject *object, + gdouble font_size) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_size != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_font_size (object, font_size); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Set font weight for all text contained in object. */ +/****************************************************************************/ +void +gl_label_object_set_font_weight (glLabelObject *object, + PangoWeight font_weight) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_weight != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_font_weight (object, font_weight); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Set font italic flag for all text contained in object. */ +/****************************************************************************/ +void +gl_label_object_set_font_italic_flag (glLabelObject *object, + gboolean font_italic_flag) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_font_italic_flag != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_font_italic_flag (object, + font_italic_flag); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Set text alignment for all text contained in object. */ +/****************************************************************************/ +void +gl_label_object_set_text_alignment (glLabelObject *object, + PangoAlignment text_alignment) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_text_alignment != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_text_alignment (object, + text_alignment); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Set text line spacing for all text contained in object. */ +/****************************************************************************/ +void +gl_label_object_set_text_line_spacing (glLabelObject *object, + gdouble text_line_spacing) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_text_line_spacing != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_text_line_spacing (object, text_line_spacing); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Set text color for all text contained in object. */ +/****************************************************************************/ +void +gl_label_object_set_text_color (glLabelObject *object, + glColorNode *text_color_node) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_text_color != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_text_color (object, text_color_node); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Get font family for all text contained in object. */ +/*****************************************************************************/ +gchar * +gl_label_object_get_font_family (glLabelObject *object) +{ + gchar *ret = NULL; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), NULL); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_family != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_family (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/****************************************************************************/ +/* Get font size for all text contained in object. */ +/****************************************************************************/ +gdouble +gl_label_object_get_font_size (glLabelObject *object) +{ + gdouble ret = 0.0; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0.0); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_size != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_size (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/****************************************************************************/ +/* Get font weight for all text contained in object. */ +/****************************************************************************/ +PangoWeight +gl_label_object_get_font_weight (glLabelObject *object) +{ + PangoWeight ret = PANGO_WEIGHT_NORMAL; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), PANGO_WEIGHT_NORMAL); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_weight != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_weight (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/****************************************************************************/ +/* Get font italic flag for all text contained in object. */ +/****************************************************************************/ +gboolean +gl_label_object_get_font_italic_flag (glLabelObject *object) +{ + gboolean ret = FALSE; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_font_italic_flag != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_font_italic_flag (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/****************************************************************************/ +/* Get text alignment for all text contained in object. */ +/****************************************************************************/ +PangoAlignment +gl_label_object_get_text_alignment (glLabelObject *object) +{ + PangoAlignment ret = PANGO_ALIGN_LEFT; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), PANGO_ALIGN_LEFT); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_text_alignment != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_text_alignment (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/****************************************************************************/ +/* Get text line spacing for all text contained in object. */ +/****************************************************************************/ +gdouble +gl_label_object_get_text_line_spacing (glLabelObject *object) +{ + gdouble ret = 0.0; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0.0); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_text_line_spacing != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_text_line_spacing (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/****************************************************************************/ +/* Get text color for all text contained in object. */ +/****************************************************************************/ +glColorNode* +gl_label_object_get_text_color (glLabelObject *object) +{ + glColorNode *ret = NULL; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_text_color != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_text_color (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/*****************************************************************************/ +/* Can fill properties be set for this object? */ +/*****************************************************************************/ +gboolean +gl_label_object_can_fill (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_fill_color != NULL ) { + + return TRUE; + + } else { + + return FALSE; + + } + +} + + +/****************************************************************************/ +/* Set fill color for object. */ +/****************************************************************************/ +void +gl_label_object_set_fill_color (glLabelObject *object, + glColorNode *fill_color_node) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_fill_color != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_fill_color (object, fill_color_node); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Get fill color for object. */ +/****************************************************************************/ +glColorNode* +gl_label_object_get_fill_color (glLabelObject *object) +{ + glColorNode *ret = NULL; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_fill_color != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_fill_color (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/*****************************************************************************/ +/* Can line color property be set for this object? */ +/*****************************************************************************/ +gboolean +gl_label_object_can_line_color (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_line_color != NULL ) { + + return TRUE; + + } else { + + return FALSE; + + } + +} + + +/****************************************************************************/ +/* Set line color for object. */ +/****************************************************************************/ +void +gl_label_object_set_line_color (glLabelObject *object, + glColorNode *line_color_node) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_line_color != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_line_color (object, line_color_node); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Get line color for object. */ +/****************************************************************************/ +glColorNode* +gl_label_object_get_line_color (glLabelObject *object) +{ + glColorNode *ret = NULL; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_line_color != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_line_color (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/*****************************************************************************/ +/* Can line width property be set for this object? */ +/*****************************************************************************/ +gboolean +gl_label_object_can_line_width (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_line_width != NULL ) { + + return TRUE; + + } else { + + return FALSE; + + } + +} + + +/****************************************************************************/ +/* Set line width for object. */ +/****************************************************************************/ +void +gl_label_object_set_line_width (glLabelObject *object, + gdouble line_width) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_line_width != NULL ) { + + /* We have an object specific method, use it */ + GL_LABEL_OBJECT_GET_CLASS(object)->set_line_width (object, line_width); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Get line width for object. */ +/****************************************************************************/ +gdouble +gl_label_object_get_line_width (glLabelObject *object) +{ + gdouble ret = 0.0; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), 0.0); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_line_width != NULL ) { + + /* We have an object specific method, use it */ + ret = GL_LABEL_OBJECT_GET_CLASS(object)->get_line_width (object); + + } + + gl_debug (DEBUG_LABEL, "END"); + + return ret; +} + + +/****************************************************************************/ +/* Set shadow state of object. */ +/****************************************************************************/ +void +gl_label_object_set_shadow_state (glLabelObject *object, + gboolean state) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if (object->priv->shadow_state != state) + { + object->priv->shadow_state = state; + gl_label_object_emit_changed (object); + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Get shadow state of object. */ +/****************************************************************************/ +gboolean +gl_label_object_get_shadow_state (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); + + return object->priv->shadow_state; +} + + +/****************************************************************************/ +/* Set offset of object's shadow. */ +/****************************************************************************/ +void +gl_label_object_set_shadow_offset (glLabelObject *object, + gdouble x, + gdouble y) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( (x != object->priv->shadow_x) || (y != object->priv->shadow_y) ) + { + object->priv->shadow_x = x; + object->priv->shadow_y = y; + + gl_label_object_emit_changed (object); + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Get offset of object's shadow. */ +/****************************************************************************/ +void +gl_label_object_get_shadow_offset (glLabelObject *object, + gdouble *x, + gdouble *y) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + *x = object->priv->shadow_x; + *y = object->priv->shadow_y; + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Set color of object's shadow. */ +/****************************************************************************/ +void +gl_label_object_set_shadow_color (glLabelObject *object, + glColorNode *color_node) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if ( !gl_color_node_equal (object->priv->shadow_color_node, color_node )) + { + gl_color_node_free (&(object->priv->shadow_color_node)); + object->priv->shadow_color_node = gl_color_node_dup (color_node); + gl_label_object_emit_changed (GL_LABEL_OBJECT(object)); + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Get color of object's shadow. */ +/****************************************************************************/ +glColorNode* +gl_label_object_get_shadow_color (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), NULL); + + return gl_color_node_dup (object->priv->shadow_color_node); +} + + +/****************************************************************************/ +/* Set opacity of object's shadow. */ +/****************************************************************************/ +void +gl_label_object_set_shadow_opacity (glLabelObject *object, + gdouble alpha) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if (object->priv->shadow_opacity != alpha) + { + object->priv->shadow_opacity = alpha; + gl_label_object_emit_changed (object); + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Get opacity of object's shadow. */ +/****************************************************************************/ +gdouble +gl_label_object_get_shadow_opacity (glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); + + return object->priv->shadow_opacity; +} + + +/****************************************************************************/ +/* Flip object horizontally. */ +/****************************************************************************/ +void +gl_label_object_flip_horiz (glLabelObject *object) +{ + cairo_matrix_t flip_matrix; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + cairo_matrix_init_scale (&flip_matrix, -1.0, 1.0); + cairo_matrix_multiply (&object->priv->matrix, &object->priv->matrix, &flip_matrix); + + g_signal_emit (G_OBJECT(object), signals[FLIP_ROTATE], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Flip object vertically. */ +/****************************************************************************/ +void +gl_label_object_flip_vert (glLabelObject *object) +{ + cairo_matrix_t flip_matrix; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + cairo_matrix_init_scale (&flip_matrix, 1.0, -1.0); + cairo_matrix_multiply (&object->priv->matrix, &object->priv->matrix, &flip_matrix); + + g_signal_emit (G_OBJECT(object), signals[FLIP_ROTATE], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Rotate object. */ +/****************************************************************************/ +void +gl_label_object_rotate (glLabelObject *object, + gdouble theta_degs) +{ + cairo_matrix_t rotate_matrix; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + cairo_matrix_init_rotate (&rotate_matrix, theta_degs*(G_PI/180.)); + cairo_matrix_multiply (&object->priv->matrix, &object->priv->matrix, &rotate_matrix); + + g_signal_emit (G_OBJECT(object), signals[FLIP_ROTATE], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Set raw affine */ +/****************************************************************************/ +void +gl_label_object_set_matrix (glLabelObject *object, + cairo_matrix_t *matrix) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + object->priv->matrix = *matrix; +} + + +/****************************************************************************/ +/* Get raw affine */ +/****************************************************************************/ +void +gl_label_object_get_matrix (glLabelObject *object, + cairo_matrix_t *matrix) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + *matrix = object->priv->matrix; +} + + +/****************************************************************************/ +/* Bring label object to front/top. */ +/****************************************************************************/ +void +gl_label_object_raise_to_top (glLabelObject *object) +{ + glLabel *label; + + gl_debug (DEBUG_LABEL, "START"); + + label = object->parent; + + gl_label_raise_object_to_top (label, object); + + g_signal_emit (G_OBJECT(object), signals[TOP], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Send label object to rear/bottom. */ +/****************************************************************************/ +void +gl_label_object_lower_to_bottom (glLabelObject *object) +{ + glLabel *label; + + gl_debug (DEBUG_LABEL, "START"); + + label = object->parent; + + gl_label_lower_object_to_bottom (label, object); + + g_signal_emit (G_OBJECT(object), signals[BOTTOM], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Label's merge data changed callback. */ +/*--------------------------------------------------------------------------*/ +static void +merge_changed_cb (glLabel *label, + glLabelObject *object) +{ + gl_label_object_emit_changed (object); +} + + +/*****************************************************************************/ +/* Draw object */ +/*****************************************************************************/ +void +gl_label_object_draw (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) + +{ + gdouble x0, y0; + cairo_matrix_t matrix; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + gl_label_object_get_position (object, &x0, &y0); + gl_label_object_get_matrix (object, &matrix); + + cairo_save (cr); + cairo_translate (cr, x0, y0); + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->draw_shadow != NULL ) { + + shadow_state = gl_label_object_get_shadow_state (object); + + if ( shadow_state ) + { + gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); + + cairo_save (cr); + cairo_translate (cr, shadow_x, shadow_y); + cairo_transform (cr, &matrix); + + GL_LABEL_OBJECT_GET_CLASS(object)->draw_shadow (object, + cr, + screen_flag, + record); + + cairo_restore (cr); + } + } + + if ( GL_LABEL_OBJECT_GET_CLASS(object)->draw_object != NULL ) { + + cairo_save (cr); + cairo_transform (cr, &matrix); + + GL_LABEL_OBJECT_GET_CLASS(object)->draw_object (object, + cr, + screen_flag, + record); + + cairo_restore (cr); + } + + cairo_restore (cr); + + gl_debug (DEBUG_LABEL, "END"); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-object.h b/src/label-object.h new file mode 100644 index 00000000..15cc5e9c --- /dev/null +++ b/src/label-object.h @@ -0,0 +1,353 @@ +/* + * label-object.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __LABEL_OBJECT_H__ +#define __LABEL_OBJECT_H__ + +#include +#include +#include + +G_BEGIN_DECLS + +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; + + +#define GL_TYPE_LABEL_OBJECT (gl_label_object_get_type ()) +#define GL_LABEL_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_OBJECT, glLabelObject)) +#define GL_LABEL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_OBJECT, glLabelObjectClass)) +#define GL_IS_LABEL_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_OBJECT)) +#define GL_IS_LABEL_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_OBJECT)) +#define GL_LABEL_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_LABEL_OBJECT, glLabelObjectClass)) + + +typedef struct _glLabelObject glLabelObject; +typedef struct _glLabelObjectClass glLabelObjectClass; + +typedef struct _glLabelObjectPrivate glLabelObjectPrivate; + +#include "label.h" +#include "color.h" + +struct _glLabelObject { + GObject object; + + glLabel *parent; + + glLabelObjectPrivate *priv; +}; + +struct _glLabelObjectClass { + GObjectClass parent_class; + + /* + * Methods + */ + + void (*set_size) (glLabelObject *object, + gdouble w, + gdouble h); + + void (*get_size) (glLabelObject *object, + gdouble *w, + gdouble *h); + + void (*set_font_family) (glLabelObject *object, + const gchar *font_family); + + void (*set_font_size) (glLabelObject *object, + gdouble font_size); + + void (*set_font_weight) (glLabelObject *object, + PangoWeight font_weight); + + void (*set_font_italic_flag) (glLabelObject *object, + gboolean font_italic_flag); + + void (*set_text_alignment) (glLabelObject *object, + PangoAlignment text_alignment); + + void (*set_text_line_spacing) (glLabelObject *object, + gdouble text_line_spacing); + + void (*set_text_color) (glLabelObject *object, + glColorNode *text_color_node); + + void (*set_fill_color) (glLabelObject *object, + glColorNode *fill_color_node); + + void (*set_line_color) (glLabelObject *object, + glColorNode *line_color_node); + + void (*set_line_width) (glLabelObject *object, + gdouble line_width); + + gchar *(*get_font_family) (glLabelObject *object); + + gdouble (*get_font_size) (glLabelObject *object); + + PangoWeight (*get_font_weight) (glLabelObject *object); + + gboolean (*get_font_italic_flag) (glLabelObject *object); + + PangoAlignment (*get_text_alignment) (glLabelObject *object); + + gdouble (*get_text_line_spacing) (glLabelObject *object); + + glColorNode* (*get_text_color) (glLabelObject *object); + + glColorNode* (*get_fill_color) (glLabelObject *object); + + glColorNode* (*get_line_color) (glLabelObject *object); + + gdouble (*get_line_width) (glLabelObject *object); + + void (*copy) (glLabelObject *dst_object, + glLabelObject *src_object); + + /* + * Draw methods + */ + void (*draw_shadow) (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + + void (*draw_object) (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + + + /* + * Signals + */ + void (*changed) (glLabelObject *object, + gpointer user_data); + + void (*moved) (glLabelObject *object, + gdouble dx, + gdouble dy, + gpointer user_data); + + void (*flip_rotate) (glLabelObject *object, + gpointer user_data); + + void (*top) (glLabelObject *object, + gpointer user_data); + + void (*bottom) (glLabelObject *object, + gpointer user_data); + + void (*removed) (glLabelObject *object, + gpointer user_data); + +}; + +GType gl_label_object_get_type (void) G_GNUC_CONST; + +GObject *gl_label_object_new (glLabel *label); + + +glLabelObject *gl_label_object_dup (glLabelObject *src_object, + glLabel *label); + +void gl_label_object_emit_changed (glLabelObject *object); + + +void gl_label_object_set_parent (glLabelObject *object, + glLabel *label); + +glLabel *gl_label_object_get_parent (glLabelObject *object); + + +void gl_label_object_remove (glLabelObject *object); + +void gl_label_object_set_name (glLabelObject *object, + gchar *name); + +gchar *gl_label_object_get_name (glLabelObject *object); + + +void gl_label_object_set_position (glLabelObject *object, + gdouble x, + gdouble y); + +void gl_label_object_set_position_relative (glLabelObject *object, + gdouble dx, + gdouble dy); + +void gl_label_object_get_position (glLabelObject *object, + gdouble *x, + gdouble *y); + +void gl_label_object_set_size (glLabelObject *object, + gdouble w, + gdouble h); + +void gl_label_object_set_size_honor_aspect (glLabelObject *object, + gdouble w, + gdouble h); + +void gl_label_object_get_size (glLabelObject *object, + gdouble *w, + gdouble *h); + +void gl_label_object_get_raw_size (glLabelObject *object, + gdouble *w, + gdouble *h); + +void gl_label_object_get_extent (glLabelObject *object, + glLabelRegion *region); + +gboolean gl_label_object_can_text (glLabelObject *object); + +void gl_label_object_set_font_family (glLabelObject *object, + const gchar *font_family); + +void gl_label_object_set_font_size (glLabelObject *object, + gdouble font_size); + +void gl_label_object_set_font_weight (glLabelObject *object, + PangoWeight font_weight); + +void gl_label_object_set_font_italic_flag (glLabelObject *object, + gboolean font_italic_flag); + +void gl_label_object_set_text_alignment (glLabelObject *object, + PangoAlignment text_alignment); + +void gl_label_object_set_text_color (glLabelObject *object, + glColorNode *text_color_node); + +void gl_label_object_set_text_line_spacing (glLabelObject *object, + gdouble text_line_spacing); + + +gchar *gl_label_object_get_font_family (glLabelObject *object); + +gdouble gl_label_object_get_font_size (glLabelObject *object); + +PangoWeight gl_label_object_get_font_weight (glLabelObject *object); + +gboolean gl_label_object_get_font_italic_flag (glLabelObject *object); + +PangoAlignment gl_label_object_get_text_alignment (glLabelObject *object); + +gdouble gl_label_object_get_text_line_spacing (glLabelObject *object); + +glColorNode *gl_label_object_get_text_color (glLabelObject *object); + + +gboolean gl_label_object_can_fill (glLabelObject *object); + +void gl_label_object_set_fill_color (glLabelObject *object, + glColorNode *fill_color_node); + +glColorNode* gl_label_object_get_fill_color (glLabelObject *object); + + +gboolean gl_label_object_can_line_color (glLabelObject *object); + +void gl_label_object_set_line_color (glLabelObject *object, + glColorNode *line_color_node); + +glColorNode *gl_label_object_get_line_color (glLabelObject *object); + +gboolean gl_label_object_can_line_width (glLabelObject *object); + +void gl_label_object_set_line_width (glLabelObject *object, + gdouble line_width); + +gdouble gl_label_object_get_line_width (glLabelObject *object); + + +void gl_label_object_raise_to_top (glLabelObject *object); + +void gl_label_object_lower_to_bottom (glLabelObject *object); + + +void gl_label_object_flip_horiz (glLabelObject *object); + +void gl_label_object_flip_vert (glLabelObject *object); + +void gl_label_object_rotate (glLabelObject *object, + gdouble theta_degs); + +void gl_label_object_set_matrix (glLabelObject *object, + cairo_matrix_t *matrix); + +void gl_label_object_get_matrix (glLabelObject *object, + cairo_matrix_t *matrix); + +void gl_label_object_set_shadow_state (glLabelObject *object, + gboolean state); + +void gl_label_object_set_shadow_offset (glLabelObject *object, + gdouble x, + gdouble y); + +void gl_label_object_set_shadow_color (glLabelObject *object, + glColorNode *color_node); + +void gl_label_object_set_shadow_opacity (glLabelObject *object, + gdouble alpha); + +gboolean gl_label_object_get_shadow_state (glLabelObject *object); + +void gl_label_object_get_shadow_offset (glLabelObject *object, + gdouble *x, + gdouble *y); + +glColorNode* gl_label_object_get_shadow_color (glLabelObject *object); + +gdouble gl_label_object_get_shadow_opacity (glLabelObject *object); + +void gl_label_object_draw (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + + + + +G_END_DECLS + +#endif /* __LABEL_OBJECT_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-text.c b/src/label-text.c new file mode 100644 index 00000000..d7497624 --- /dev/null +++ b/src/label-text.c @@ -0,0 +1,1055 @@ +/* + * label-text.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "label-text.h" + +#include +#include +#include +#include + +#include "font-util.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + +#define DEFAULT_FONT_FAMILY "Sans" +#define DEFAULT_FONT_SIZE 14.0 +#define DEFAULT_FONT_WEIGHT PANGO_WEIGHT_NORMAL +#define DEFAULT_FONT_ITALIC_FLAG FALSE +#define DEFAULT_ALIGN PANGO_ALIGN_LEFT +#define DEFAULT_COLOR GL_COLOR (0,0,0) +#define DEFAULT_TEXT_LINE_SPACING 1.0 +#define DEFAULT_AUTO_SHRINK FALSE + +#define FONT_SCALE (72.0/96.0) + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glLabelTextPrivate { + GtkTextTagTable *tag_table; + GtkTextBuffer *buffer; + + gchar *font_family; + gdouble font_size; + PangoWeight font_weight; + gboolean font_italic_flag; + PangoAlignment align; + glColorNode *color_node; + gdouble line_spacing; + gboolean auto_shrink; + + gboolean size_changed; + gdouble w; + gdouble h; +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_label_text_finalize (GObject *object); + +static void copy (glLabelObject *dst_object, + glLabelObject *src_object); + +static void buffer_changed_cb (GtkTextBuffer *textbuffer, + glLabelText *ltext); + +static void get_size (glLabelObject *object, + gdouble *w, + gdouble *h); + +static void set_font_family (glLabelObject *object, + const gchar *font_family); + +static void set_font_size (glLabelObject *object, + gdouble font_size); + +static void set_font_weight (glLabelObject *object, + PangoWeight font_weight); + +static void set_font_italic_flag (glLabelObject *object, + gboolean font_italic_flag); + +static void set_text_alignment (glLabelObject *object, + PangoAlignment text_alignment); + +static void set_text_line_spacing (glLabelObject *object, + gdouble text_line_spacing); + +static void set_text_color (glLabelObject *object, + glColorNode *text_color_node); + +static gchar *get_font_family (glLabelObject *object); + +static gdouble get_font_size (glLabelObject *object); + +static PangoWeight get_font_weight (glLabelObject *object); + +static gboolean get_font_italic_flag (glLabelObject *object); + +static PangoAlignment get_text_alignment (glLabelObject *object); + +static gdouble get_text_line_spacing (glLabelObject *object); + +static glColorNode* get_text_color (glLabelObject *object); + +static void draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + +static void draw_shadow (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + +static void draw_text_real (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record, + guint color); + +static gdouble auto_shrink_font_size (cairo_t *cr, + gchar *family, + gdouble size, + PangoWeight weight, + PangoStyle style, + gchar *text, + gdouble width); + + +/*****************************************************************************/ +/* Object infrastructure. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glLabelText, gl_label_text, GL_TYPE_LABEL_OBJECT); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_label_text_class_init (glLabelTextClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glLabelObjectClass *label_object_class = GL_LABEL_OBJECT_CLASS (class); + + gl_label_text_parent_class = g_type_class_peek_parent (class); + + label_object_class->copy = copy; + + label_object_class->get_size = get_size; + + label_object_class->set_font_family = set_font_family; + label_object_class->set_font_size = set_font_size; + label_object_class->set_font_weight = set_font_weight; + label_object_class->set_font_italic_flag = set_font_italic_flag; + label_object_class->set_text_alignment = set_text_alignment; + label_object_class->set_text_line_spacing = set_text_line_spacing; + label_object_class->set_text_color = set_text_color; + label_object_class->get_font_family = get_font_family; + label_object_class->get_font_size = get_font_size; + label_object_class->get_font_weight = get_font_weight; + label_object_class->get_font_italic_flag = get_font_italic_flag; + label_object_class->get_text_alignment = get_text_alignment; + label_object_class->get_text_line_spacing = get_text_line_spacing; + label_object_class->get_text_color = get_text_color; + label_object_class->draw_object = draw_object; + label_object_class->draw_shadow = draw_shadow; + + object_class->finalize = gl_label_text_finalize; +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_label_text_init (glLabelText *ltext) +{ + ltext->priv = g_new0 (glLabelTextPrivate, 1); + + ltext->priv->tag_table = gtk_text_tag_table_new (); + ltext->priv->buffer = gtk_text_buffer_new (ltext->priv->tag_table); + + ltext->priv->font_family = g_strdup(DEFAULT_FONT_FAMILY); + ltext->priv->font_size = DEFAULT_FONT_SIZE; + ltext->priv->font_weight = DEFAULT_FONT_WEIGHT; + ltext->priv->font_italic_flag = DEFAULT_FONT_ITALIC_FLAG; + ltext->priv->align = DEFAULT_ALIGN; + ltext->priv->color_node = gl_color_node_new_default (); + ltext->priv->color_node->color = DEFAULT_COLOR; + ltext->priv->line_spacing = DEFAULT_TEXT_LINE_SPACING; + ltext->priv->auto_shrink = DEFAULT_AUTO_SHRINK; + + ltext->priv->size_changed = TRUE; + + g_signal_connect (G_OBJECT(ltext->priv->buffer), "changed", + G_CALLBACK(buffer_changed_cb), ltext); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_label_text_finalize (GObject *object) +{ + glLabelText *ltext = GL_LABEL_TEXT (object); + + g_return_if_fail (object && GL_IS_LABEL_TEXT (object)); + + g_object_unref (ltext->priv->tag_table); + g_object_unref (ltext->priv->buffer); + g_free (ltext->priv->font_family); + gl_color_node_free (&(ltext->priv->color_node)); + g_free (ltext->priv); + + G_OBJECT_CLASS (gl_label_text_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GObject * +gl_label_text_new (glLabel *label) +{ + glLabelText *ltext; + + ltext = g_object_new (gl_label_text_get_type(), NULL); + + gl_label_object_set_parent (GL_LABEL_OBJECT(ltext), label); + + return G_OBJECT (ltext); +} + + +/*****************************************************************************/ +/* Copy object contents. */ +/*****************************************************************************/ +static void +copy (glLabelObject *dst_object, + glLabelObject *src_object) +{ + glLabelText *ltext = (glLabelText *)src_object; + glLabelText *new_ltext = (glLabelText *)dst_object; + GList *lines; + glColorNode *text_color_node; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + g_return_if_fail (new_ltext && GL_IS_LABEL_TEXT (new_ltext)); + + lines = gl_label_text_get_lines (ltext); + text_color_node = get_text_color (src_object); + gl_label_text_set_lines (new_ltext, lines); + + new_ltext->priv->font_family = g_strdup (ltext->priv->font_family); + new_ltext->priv->font_size = ltext->priv->font_size; + new_ltext->priv->font_weight = ltext->priv->font_weight; + new_ltext->priv->font_italic_flag = ltext->priv->font_italic_flag; + set_text_color (dst_object, text_color_node); + new_ltext->priv->align = ltext->priv->align; + new_ltext->priv->line_spacing = ltext->priv->line_spacing; + new_ltext->priv->auto_shrink = ltext->priv->auto_shrink; + + new_ltext->priv->size_changed = ltext->priv->size_changed; + new_ltext->priv->w = ltext->priv->w; + new_ltext->priv->h = ltext->priv->h; + + gl_color_node_free (&text_color_node); + gl_text_node_lines_free (&lines); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set object params. */ +/*****************************************************************************/ +void +gl_label_text_set_lines (glLabelText *ltext, + GList *lines) +{ + gchar *text; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + + text = gl_text_node_lines_expand (lines, NULL); + gtk_text_buffer_set_text (ltext->priv->buffer, text, -1); + g_free (text); + + ltext->priv->size_changed = TRUE; + + gl_debug (DEBUG_LABEL, "END"); +} + +/*****************************************************************************/ +/* Get object params. */ +/*****************************************************************************/ +GtkTextBuffer * +gl_label_text_get_buffer (glLabelText *ltext) +{ + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), NULL); + + return ltext->priv->buffer; +} + + +GList * +gl_label_text_get_lines (glLabelText *ltext) +{ + GtkTextIter start, end; + gchar *text; + GList *lines; + + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), NULL); + + gtk_text_buffer_get_bounds (ltext->priv->buffer, &start, &end); + text = gtk_text_buffer_get_text (ltext->priv->buffer, + &start, &end, FALSE); + lines = gl_text_node_lines_new_from_text (text); + g_free (text); + + return lines; +} + + +/*****************************************************************************/ +/* Text buffer "changed" callback. */ +/*****************************************************************************/ +static void +buffer_changed_cb (GtkTextBuffer *textbuffer, + glLabelText *ltext) +{ + ltext->priv->size_changed = TRUE; + + gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); +} + + +/*****************************************************************************/ +/* Get object size method. */ +/*****************************************************************************/ +static void +get_size (glLabelObject *object, + gdouble *w, + gdouble *h) +{ + glLabelText *ltext = (glLabelText *)object; + PangoFontMap *fontmap; + PangoContext *context; + cairo_font_options_t *options; + PangoStyle style; + PangoLayout *layout; + PangoFontDescription *desc; + gdouble font_size; + gdouble line_spacing; + GtkTextIter start, end; + gchar *text; + gdouble w_parent, h_parent; + gint iw, ih; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + + gl_label_object_get_raw_size (object, &w_parent, &h_parent); + + if ( (w_parent != 0.0) || (h_parent != 0.0) ) { + *w = w_parent; + *h = h_parent; + return; + } + + if (!ltext->priv->size_changed) + { + *w = ltext->priv->w; + *h = ltext->priv->h; + return; + } + + font_size = GL_LABEL_TEXT (object)->priv->font_size * FONT_SCALE; + line_spacing = GL_LABEL_TEXT (object)->priv->line_spacing; + + gtk_text_buffer_get_bounds (ltext->priv->buffer, &start, &end); + text = gtk_text_buffer_get_text (ltext->priv->buffer, + &start, &end, FALSE); + + + fontmap = pango_cairo_font_map_new (); + context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fontmap)); + options = cairo_font_options_create (); + cairo_font_options_set_hint_style (options, CAIRO_HINT_STYLE_NONE); + pango_cairo_context_set_font_options (context, options); + cairo_font_options_destroy (options); + + layout = pango_layout_new (context); + + style = GL_LABEL_TEXT (object)->priv->font_italic_flag ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL; + + desc = pango_font_description_new (); + pango_font_description_set_family (desc, GL_LABEL_TEXT (object)->priv->font_family); + pango_font_description_set_weight (desc, GL_LABEL_TEXT (object)->priv->font_weight); + pango_font_description_set_style (desc, style); + pango_font_description_set_size (desc, font_size * PANGO_SCALE); + pango_layout_set_font_description (layout, desc); + pango_font_description_free (desc); + + pango_layout_set_spacing (layout, font_size * (line_spacing-1) * PANGO_SCALE); + pango_layout_set_text (layout, text, -1); + pango_layout_get_size (layout, &iw, &ih); + *w = ltext->priv->w = iw / PANGO_SCALE + 2*GL_LABEL_TEXT_MARGIN; + *h = ltext->priv->h = ih / PANGO_SCALE; + ltext->priv->size_changed = FALSE; + + g_object_unref (layout); + g_object_unref (context); + g_object_unref (fontmap); + g_free (text); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set font family method. */ +/*****************************************************************************/ +static void +set_font_family (glLabelObject *object, + const gchar *font_family) +{ + glLabelText *ltext = (glLabelText *)object; + gchar *good_font_family; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + g_return_if_fail (font_family); + + good_font_family = gl_font_util_validate_family (font_family); + + if (ltext->priv->font_family) { + if (strcmp (ltext->priv->font_family, good_font_family) == 0) { + g_free (good_font_family); + gl_debug (DEBUG_LABEL, "END (no change)"); + return; + } + g_free (ltext->priv->font_family); + } + ltext->priv->font_family = g_strdup (good_font_family); + g_free (good_font_family); + + gl_debug (DEBUG_LABEL, "new font family = %s", ltext->priv->font_family); + + ltext->priv->size_changed = TRUE; + + gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set font size method. */ +/*****************************************************************************/ +static void +set_font_size (glLabelObject *object, + gdouble font_size) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + + if (ltext->priv->font_size != font_size) { + + ltext->priv->size_changed = TRUE; + + ltext->priv->font_size = font_size; + gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set font weight method. */ +/*****************************************************************************/ +static void +set_font_weight (glLabelObject *object, + PangoWeight font_weight) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + + if (ltext->priv->font_weight != font_weight) { + + ltext->priv->size_changed = TRUE; + + ltext->priv->font_weight = font_weight; + gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set font italic flag method. */ +/*****************************************************************************/ +static void +set_font_italic_flag (glLabelObject *object, + gboolean font_italic_flag) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + + if (ltext->priv->font_italic_flag != font_italic_flag) { + + ltext->priv->size_changed = TRUE; + + ltext->priv->font_italic_flag = font_italic_flag; + gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set text alignment method. */ +/*****************************************************************************/ +static void +set_text_alignment (glLabelObject *object, + PangoAlignment text_alignment) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + + if (ltext->priv->align != text_alignment) { + + ltext->priv->size_changed = TRUE; + + ltext->priv->align = text_alignment; + gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set text line spacing method. */ +/*****************************************************************************/ +static void +set_text_line_spacing (glLabelObject *object, + gdouble line_spacing) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + + if (ltext->priv->line_spacing != line_spacing) { + + ltext->priv->size_changed = TRUE; + + ltext->priv->line_spacing = line_spacing; + gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Set text color method. */ +/*****************************************************************************/ +static void +set_text_color (glLabelObject *object, + glColorNode *text_color_node) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + + if (!gl_color_node_equal (ltext->priv->color_node, text_color_node)) { + + gl_color_node_free (&(ltext->priv->color_node)); + ltext->priv->color_node = gl_color_node_dup (text_color_node); + + gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Get font family method. */ +/*****************************************************************************/ +static gchar * +get_font_family (glLabelObject *object) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), NULL); + + return g_strdup (ltext->priv->font_family); +} + + +/*****************************************************************************/ +/* Get font size method. */ +/*****************************************************************************/ +static gdouble +get_font_size (glLabelObject *object) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0.0); + + return ltext->priv->font_size; +} + + +/*****************************************************************************/ +/* Get font weight method. */ +/*****************************************************************************/ +static PangoWeight +get_font_weight (glLabelObject *object) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), PANGO_WEIGHT_NORMAL); + + return ltext->priv->font_weight; +} + + +/*****************************************************************************/ +/* Get font italic flag method. */ +/*****************************************************************************/ +static gboolean +get_font_italic_flag (glLabelObject *object) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), FALSE); + + return ltext->priv->font_italic_flag; +} + + +/*****************************************************************************/ +/* Get text alignment method. */ +/*****************************************************************************/ +static PangoAlignment +get_text_alignment (glLabelObject *object) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), GTK_JUSTIFY_LEFT); + + return ltext->priv->align; +} + + +/*****************************************************************************/ +/* Get text line spacing method. */ +/*****************************************************************************/ +static gdouble +get_text_line_spacing (glLabelObject *object) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0.0); + + return ltext->priv->line_spacing; +} + + +/*****************************************************************************/ +/* Get text color method. */ +/*****************************************************************************/ +static glColorNode* +get_text_color (glLabelObject *object) +{ + glLabelText *ltext = (glLabelText *)object; + + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0); + + return gl_color_node_dup (ltext->priv->color_node); +} + + +/*****************************************************************************/ +/* Set auto shrink flag. */ +/*****************************************************************************/ +void +gl_label_text_set_auto_shrink (glLabelText *ltext, + gboolean auto_shrink) +{ + gl_debug (DEBUG_LABEL, "BEGIN"); + + g_return_if_fail (ltext && GL_IS_LABEL_TEXT (ltext)); + + if (ltext->priv->auto_shrink != auto_shrink) { + + ltext->priv->auto_shrink = auto_shrink; + gl_label_object_emit_changed (GL_LABEL_OBJECT(ltext)); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Query auto shrink flag. */ +/*****************************************************************************/ +gboolean +gl_label_text_get_auto_shrink (glLabelText *ltext) +{ + gl_debug (DEBUG_LABEL, ""); + + g_return_val_if_fail (ltext && GL_IS_LABEL_TEXT (ltext), 0); + + return ltext->priv->auto_shrink; +} + + +/*****************************************************************************/ +/* Draw object method. */ +/*****************************************************************************/ +static void +draw_object (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + glColorNode *color_node; + guint color; + + gl_debug (DEBUG_LABEL, "START"); + + color_node = gl_label_object_get_text_color (object); + color = gl_color_node_expand (color_node, record); + if (color_node->field_flag && screen_flag) + { + color = GL_COLOR_MERGE_DEFAULT; + } + gl_color_node_free (&color_node); + + draw_text_real (object, cr, screen_flag, record, color); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Draw shadow method. */ +/*****************************************************************************/ +static void +draw_shadow (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + glColorNode *color_node; + guint color; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + guint shadow_color; + + gl_debug (DEBUG_LABEL, "START"); + + color_node = gl_label_object_get_text_color (object); + color = gl_color_node_expand (color_node, record); + if (color_node->field_flag && screen_flag) + { + color = GL_COLOR_MERGE_DEFAULT; + } + gl_color_node_free (&color_node); + + shadow_color_node = gl_label_object_get_shadow_color (object); + if (shadow_color_node->field_flag) + { + shadow_color_node->color = GL_COLOR_SHADOW_MERGE_DEFAULT; + } + shadow_opacity = gl_label_object_get_shadow_opacity (object); + shadow_color = gl_color_shadow (shadow_color_node->color, shadow_opacity, color); + gl_color_node_free (&shadow_color_node); + + draw_text_real (object, cr, screen_flag, record, shadow_color); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Draw text. */ +/*****************************************************************************/ +static void +draw_text_real (glLabelObject *object, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record, + guint color) +{ + gdouble x0, y0; + cairo_matrix_t matrix; + gdouble object_w, object_h; + gdouble raw_w, raw_h; + gchar *text; + GList *lines; + gchar *font_family; + gdouble font_size; + PangoWeight font_weight; + gboolean font_italic_flag; + gboolean auto_shrink; + gdouble text_line_spacing; + PangoAlignment alignment; + PangoStyle style; + PangoLayout *layout; + PangoFontDescription *desc; + gdouble scale_x, scale_y; + cairo_font_options_t *font_options; + PangoContext *context; + + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_object_get_position (object, &x0, &y0); + gl_label_object_get_matrix (object, &matrix); + + gl_label_object_get_size (object, &object_w, &object_h); + gl_label_object_get_raw_size (object, &raw_w, &raw_h); + lines = gl_label_text_get_lines (GL_LABEL_TEXT (object)); + font_family = gl_label_object_get_font_family (object); + font_size = gl_label_object_get_font_size (object) * FONT_SCALE; + font_weight = gl_label_object_get_font_weight (object); + font_italic_flag = gl_label_object_get_font_italic_flag (object); + + alignment = gl_label_object_get_text_alignment (object); + text_line_spacing = + gl_label_object_get_text_line_spacing (object); + auto_shrink = gl_label_text_get_auto_shrink (GL_LABEL_TEXT (object)); + + text = gl_text_node_lines_expand (lines, record); + + style = font_italic_flag ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL; + + + if (!screen_flag && record && auto_shrink && (raw_w != 0.0)) + { + font_size = auto_shrink_font_size (cr, + font_family, + font_size, + font_weight, + style, + text, + object_w); + } + + + /* + * Workaround for pango Bug#341481. + * Render font at device scale and scale font size accordingly. + */ + scale_x = 1.0; + scale_y = 1.0; + cairo_device_to_user_distance (cr, &scale_x, &scale_y); + scale_x = fabs (scale_x); + scale_y = fabs (scale_y); + cairo_save (cr); + cairo_scale (cr, scale_x, scale_y); + + layout = pango_cairo_create_layout (cr); + + font_options = cairo_font_options_create (); + cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE); + context = pango_layout_get_context (layout); + pango_cairo_context_set_font_options (context, font_options); + cairo_font_options_destroy (font_options); + + desc = pango_font_description_new (); + pango_font_description_set_family (desc, font_family); + pango_font_description_set_weight (desc, font_weight); + pango_font_description_set_style (desc, style); + pango_font_description_set_size (desc, font_size * PANGO_SCALE / scale_x); + pango_layout_set_font_description (layout, desc); + pango_font_description_free (desc); + + pango_layout_set_text (layout, text, -1); + pango_layout_set_spacing (layout, font_size * (text_line_spacing-1) * PANGO_SCALE / scale_x); + if (raw_w == 0.0) + { + pango_layout_set_width (layout, -1); + } + else + { + pango_layout_set_width (layout, object_w * PANGO_SCALE / scale_x); + } + pango_layout_set_wrap (layout, PANGO_WRAP_CHAR); + pango_layout_set_alignment (layout, alignment); + + + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (color)); + cairo_move_to (cr, GL_LABEL_TEXT_MARGIN/scale_x, 0); + pango_cairo_show_layout (cr, layout); + + cairo_restore (cr); + + g_object_unref (layout); + + + gl_text_node_lines_free (&lines); + g_free (font_family); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Automatically shrink text size to fit within horizontal width. */ +/*****************************************************************************/ +static gdouble +auto_shrink_font_size (cairo_t *cr, + gchar *family, + gdouble size, + PangoWeight weight, + PangoStyle style, + gchar *text, + gdouble width) +{ + PangoLayout *layout; + PangoFontDescription *desc; + gint iw, ih; + gdouble layout_width; + gdouble new_size; + + layout = pango_cairo_create_layout (cr); + + desc = pango_font_description_new (); + pango_font_description_set_family (desc, family); + pango_font_description_set_weight (desc, weight); + pango_font_description_set_style (desc, style); + pango_font_description_set_size (desc, size * PANGO_SCALE); + + pango_layout_set_font_description (layout, desc); + pango_font_description_free (desc); + + pango_layout_set_text (layout, text, -1); + pango_layout_set_width (layout, -1); + pango_layout_get_size (layout, &iw, &ih); + layout_width = (gdouble)iw / (gdouble)PANGO_SCALE; + + g_object_unref (layout); + + g_print ("Object w = %g, layout w = %g\n", width, layout_width); + + if ( layout_width > width ) + { + /* Scale down. */ + new_size = size * (width-2*GL_LABEL_TEXT_MARGIN)/layout_width; + + /* Round down to nearest 1/2 point */ + new_size = (int)(new_size*2.0) / 2.0; + + /* don't get ridiculously small. */ + if (new_size < 1.0) + { + new_size = 1.0; + } + } + else + { + new_size = size; + } + + return new_size; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label-text.h b/src/label-text.h new file mode 100644 index 00000000..9c7ce435 --- /dev/null +++ b/src/label-text.h @@ -0,0 +1,87 @@ +/* + * label-text.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __LABEL_TEXT_H__ +#define __LABEL_TEXT_H__ + +#include +#include "text-node.h" +#include "label-object.h" + +G_BEGIN_DECLS + +#define GL_LABEL_TEXT_MARGIN 3.0 + + +#define GL_TYPE_LABEL_TEXT (gl_label_text_get_type ()) +#define GL_LABEL_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL_TEXT, glLabelText)) +#define GL_LABEL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL_TEXT, glLabelTextClass)) +#define GL_IS_LABEL_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL_TEXT)) +#define GL_IS_LABEL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL_TEXT)) +#define GL_COLOR_COMBO_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_LABEL_TEXT, glLabelTextClass)) + + +typedef struct _glLabelText glLabelText; +typedef struct _glLabelTextPrivate glLabelTextPrivate; +typedef struct _glLabelTextClass glLabelTextClass; + + +struct _glLabelText { + glLabelObject object; + + glLabelTextPrivate *priv; +}; + +struct _glLabelTextClass { + glLabelObjectClass parent_class; +}; + + +GType gl_label_text_get_type (void) G_GNUC_CONST; + +GObject *gl_label_text_new (glLabel *label); + +void gl_label_text_set_lines (glLabelText *ltext, + GList *lines); + +GtkTextBuffer *gl_label_text_get_buffer (glLabelText *ltext); + +GList *gl_label_text_get_lines (glLabelText *ltext); + +void gl_label_text_set_auto_shrink (glLabelText *ltext, + gboolean auto_shrink); + +gboolean gl_label_text_get_auto_shrink (glLabelText *ltext); + + +G_END_DECLS + +#endif /* __LABEL_TEXT_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label.c b/src/label.c new file mode 100644 index 00000000..659c1107 --- /dev/null +++ b/src/label.c @@ -0,0 +1,707 @@ +/* + * label.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "label.h" + +#include + +#include "prefs.h" +#include "file-util.h" +#include "marshal.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glLabelPrivate { + + gchar *filename; + gint compression; + gboolean modified_flag; + gint untitled_instance; + + glMerge *merge; + + GHashTable *pixbuf_cache; +}; + +enum { + CHANGED, + NAME_CHANGED, + MODIFIED_CHANGED, + MERGE_CHANGED, + SIZE_CHANGED, + OBJECT_ADDED, + LAST_SIGNAL +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static guint signals[LAST_SIGNAL] = {0}; + +static guint untitled = 0; + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_label_finalize (GObject *object); + +static void object_changed_cb (glLabelObject *object, + glLabel *label); + +static void object_moved_cb (glLabelObject *object, + gdouble x, + gdouble y, + glLabel *label); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glLabel, gl_label, G_TYPE_OBJECT); + + +static void +gl_label_class_init (glLabelClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_LABEL, "START"); + + gl_label_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_label_finalize; + + signals[CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelClass, changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + signals[NAME_CHANGED] = + g_signal_new ("name_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelClass, name_changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + signals[MODIFIED_CHANGED] = + g_signal_new ("modified_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelClass, modified_changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + signals[MERGE_CHANGED] = + g_signal_new ("merge_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelClass, merge_changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + signals[SIZE_CHANGED] = + g_signal_new ("size_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelClass, size_changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + signals[OBJECT_ADDED] = + g_signal_new ("object_added", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glLabelClass, object_added), + NULL, NULL, + gl_marshal_VOID__OBJECT, + G_TYPE_NONE, + 1, G_TYPE_OBJECT); + + gl_debug (DEBUG_LABEL, "END"); +} + + +static void +gl_label_init (glLabel *label) +{ + gl_debug (DEBUG_LABEL, "START"); + + label->template = NULL; + label->rotate_flag = FALSE; + label->objects = NULL; + + label->priv = g_new0 (glLabelPrivate, 1); + + label->priv->filename = NULL; + label->priv->merge = NULL; + label->priv->pixbuf_cache = gl_pixbuf_cache_new (); + + gl_debug (DEBUG_LABEL, "END"); +} + + +static void +gl_label_finalize (GObject *object) +{ + glLabel *label = GL_LABEL (object); + GList *p, *p_next; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (object && GL_IS_LABEL (object)); + + for (p = label->objects; p != NULL; p = p_next) { + p_next = p->next; /* NOTE: p will be left dangling */ + g_object_unref (G_OBJECT(p->data)); + } + + lgl_template_free (label->template); + g_free (label->priv->filename); + if (label->priv->merge != NULL) { + g_object_unref (G_OBJECT(label->priv->merge)); + } + gl_pixbuf_cache_free (label->priv->pixbuf_cache); + + g_free (label->priv); + + G_OBJECT_CLASS (gl_label_parent_class)->finalize (object); + + gl_debug (DEBUG_LABEL, "END"); +} + + +GObject * +gl_label_new (void) +{ + glLabel *label; + + gl_debug (DEBUG_LABEL, "START"); + + label = g_object_new (gl_label_get_type(), NULL); + + label->priv->compression = 9; + + label->priv->modified_flag = FALSE; + + gl_debug (DEBUG_LABEL, "END"); + + return G_OBJECT (label); +} + + +/*****************************************************************************/ +/* Add object to label. */ +/*****************************************************************************/ +void +gl_label_add_object (glLabel *label, + glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (label && GL_IS_LABEL (label)); + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + object->parent = label; + label->objects = g_list_append (label->objects, g_object_ref (object)); + + label->priv->modified_flag = TRUE; + + g_signal_emit (G_OBJECT(label), signals[OBJECT_ADDED], 0, object); + g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + + g_signal_connect (G_OBJECT(object), "changed", + G_CALLBACK(object_changed_cb), label); + + g_signal_connect (G_OBJECT(object), "moved", + G_CALLBACK(object_moved_cb), label); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*****************************************************************************/ +/* Remove object from label. */ +/*****************************************************************************/ +void +gl_label_remove_object (glLabel *label, + glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (label && GL_IS_LABEL (label)); + g_return_if_fail (GL_IS_LABEL_OBJECT (object)); + + object->parent = NULL; + label->objects = g_list_remove (label->objects, object); + + if ( G_OBJECT(label)->ref_count /* not finalized */ ) { + + g_signal_handlers_disconnect_by_func (object, + G_CALLBACK(object_changed_cb), + label); + g_signal_handlers_disconnect_by_func (object, + G_CALLBACK(object_moved_cb), + label); + + label->priv->modified_flag = TRUE; + + g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Object changed callback. */ +/*---------------------------------------------------------------------------*/ +static void +object_changed_cb (glLabelObject *object, + glLabel *label) +{ + + if ( !label->priv->modified_flag ) { + + label->priv->modified_flag = TRUE; + + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + } + + g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Object moved callback. */ +/*---------------------------------------------------------------------------*/ +static void +object_moved_cb (glLabelObject *object, + gdouble x, + gdouble y, + glLabel *label) +{ + + if ( !label->priv->modified_flag ) { + + label->priv->modified_flag = TRUE; + + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + } + + g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); +} + + +/****************************************************************************/ +/* Bring label object to front/top. */ +/****************************************************************************/ +void +gl_label_raise_object_to_top (glLabel *label, + glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, "START"); + + /* 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); + + label->priv->modified_flag = TRUE; + + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Send label object to rear/bottom. */ +/****************************************************************************/ +void +gl_label_lower_object_to_bottom (glLabel *label, + glLabelObject *object) +{ + gl_debug (DEBUG_LABEL, "START"); + + /* 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); + + label->priv->modified_flag = TRUE; + + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* set template. */ +/****************************************************************************/ +extern void +gl_label_set_template (glLabel *label, + lglTemplate *template) +{ + gchar *name; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (label && GL_IS_LABEL (label)); + g_return_if_fail (template); + + if ((label->template == NULL) || + !lgl_template_do_templates_match (template, label->template)) { + + lgl_template_free (label->template); + label->template = lgl_template_dup (template); + + label->priv->modified_flag = TRUE; + + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[SIZE_CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); + + name = lgl_template_get_name (template); + gl_prefs_add_recent_template (name); + g_free (name); + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* set rotate flag. */ +/****************************************************************************/ +extern void +gl_label_set_rotate_flag (glLabel *label, + gboolean rotate_flag) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (label && GL_IS_LABEL (label)); + + if (rotate_flag != label->rotate_flag) { + + label->rotate_flag = rotate_flag; + + label->priv->modified_flag = TRUE; + + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[SIZE_CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); + + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Get label size. */ +/****************************************************************************/ +void +gl_label_get_size (glLabel *label, + gdouble *w, + gdouble *h) +{ + lglTemplate *template; + const lglTemplateFrame *frame; + + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (label && GL_IS_LABEL (label)); + + template = label->template; + if ( !template ) { + gl_debug (DEBUG_LABEL, "END -- template NULL"); + *w = *h = 0; + return; + } + frame = (lglTemplateFrame *)template->frames->data; + + if (!label->rotate_flag) { + lgl_template_frame_get_size (frame, w, h); + } else { + lgl_template_frame_get_size (frame, h, w); + } + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* set merge information structure. */ +/****************************************************************************/ +extern void +gl_label_set_merge (glLabel *label, + glMerge *merge) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_if_fail (label && GL_IS_LABEL (label)); + + if ( label->priv->merge != NULL ) { + g_object_unref (G_OBJECT(label->priv->merge)); + } + label->priv->merge = gl_merge_dup (merge); + + label->priv->modified_flag = TRUE; + + g_signal_emit (G_OBJECT(label), signals[MERGE_CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + g_signal_emit (G_OBJECT(label), signals[CHANGED], 0); + + gl_debug (DEBUG_LABEL, "END"); +} + + +/****************************************************************************/ +/* Get merge information structure. */ +/****************************************************************************/ +glMerge * +gl_label_get_merge (glLabel *label) +{ + gl_debug (DEBUG_LABEL, "START"); + + g_return_val_if_fail (label && GL_IS_LABEL (label), NULL); + + gl_debug (DEBUG_LABEL, "END"); + + return gl_merge_dup (label->priv->merge); +} + + +/****************************************************************************/ +/* return filename. */ +/****************************************************************************/ +gchar * +gl_label_get_filename (glLabel *label) +{ + gl_debug (DEBUG_LABEL, ""); + + return g_strdup ( label->priv->filename ); +} + + +/****************************************************************************/ +/* return short filename. */ +/****************************************************************************/ +gchar * +gl_label_get_short_name (glLabel *label) +{ + gl_debug (DEBUG_LABEL, ""); + + if ( label->priv->filename == NULL ) { + + if ( label->priv->untitled_instance == 0 ) { + label->priv->untitled_instance = ++untitled; + } + + return g_strdup_printf ( "%s %d", _("Untitled"), + label->priv->untitled_instance ); + + } else { + gchar *temp_name, *short_name; + + temp_name = g_path_get_basename ( label->priv->filename ); + short_name = gl_file_util_remove_extension (temp_name); + g_free (temp_name); + + return short_name; + } +} + + +/****************************************************************************/ +/* Get pixbuf cache. */ +/****************************************************************************/ +GHashTable * +gl_label_get_pixbuf_cache (glLabel *label) +{ + return label->priv->pixbuf_cache; +} + + +/****************************************************************************/ +/* Is label modified? */ +/****************************************************************************/ +gboolean +gl_label_is_modified (glLabel *label) +{ + gl_debug (DEBUG_LABEL, "return %d", label->priv->modified_flag); + return label->priv->modified_flag; +} + + +/****************************************************************************/ +/* Is label untitled? */ +/****************************************************************************/ +gboolean +gl_label_is_untitled (glLabel *label) +{ + gl_debug (DEBUG_LABEL, "return %d",(label->priv->filename == NULL)); + return (label->priv->filename == NULL); +} + + +/****************************************************************************/ +/* Can undo? */ +/****************************************************************************/ +gboolean +gl_label_can_undo (glLabel *label) +{ + return FALSE; +} + + +/****************************************************************************/ +/* Can redo? */ +/****************************************************************************/ +gboolean +gl_label_can_redo (glLabel *label) +{ + return FALSE; +} + + +/****************************************************************************/ +/* Set filename. */ +/****************************************************************************/ +void +gl_label_set_filename (glLabel *label, + const gchar *filename) +{ + label->priv->filename = g_strdup (filename); + + g_signal_emit (G_OBJECT(label), signals[NAME_CHANGED], 0); +} + + +/****************************************************************************/ +/* Clear modified flag. */ +/****************************************************************************/ +void +gl_label_clear_modified (glLabel *label) +{ + + if ( label->priv->modified_flag ) { + + label->priv->modified_flag = FALSE; + + g_signal_emit (G_OBJECT(label), signals[MODIFIED_CHANGED], 0); + } + +} + + +/****************************************************************************/ +/* Set compression level. */ +/****************************************************************************/ +void +gl_label_set_compression (glLabel *label, + gint compression) +{ + gl_debug (DEBUG_LABEL, "set %d", compression); + + /* Older versions of libxml2 always return a -1 for documents "read in," so + * default to 9. Also, default to 9 for anything else out of range. */ + if ((compression < 0) || (compression >9)) { + compression = 9; + } + + gl_debug (DEBUG_LABEL, "actual set %d", compression); + label->priv->compression = compression; +} + + +/****************************************************************************/ +/* Get compression level. */ +/****************************************************************************/ +gint +gl_label_get_compression (glLabel *label) +{ + gl_debug (DEBUG_LABEL, "return %d", label->priv->compression); + return label->priv->compression; +} + + +/****************************************************************************/ +/* Draw label. */ +/****************************************************************************/ +void +gl_label_draw (glLabel *label, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record) +{ + GList *p_obj; + glLabelObject *object; + + g_return_if_fail (label && GL_IS_LABEL (label)); + + for (p_obj = label->objects; p_obj != NULL; p_obj = p_obj->next) + { + object = GL_LABEL_OBJECT (p_obj->data); + + gl_label_object_draw (object, cr, screen_flag, record); + } +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/label.h b/src/label.h new file mode 100644 index 00000000..73f0d89e --- /dev/null +++ b/src/label.h @@ -0,0 +1,163 @@ +/* + * label.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __LABEL_H__ +#define __LABEL_H__ + +#include +#include + +#include +#include "merge.h" +#include "pixbuf-cache.h" + +G_BEGIN_DECLS + +typedef struct { + gdouble x1; + gdouble y1; + gdouble x2; + gdouble y2; +} glLabelRegion; + +#define GL_TYPE_LABEL (gl_label_get_type ()) +#define GL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_LABEL, glLabel)) +#define GL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_LABEL, glLabelClass)) +#define GL_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_LABEL)) +#define GL_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_LABEL)) + +typedef struct _glLabel glLabel; +typedef struct _glLabelClass glLabelClass; + +typedef struct _glLabelPrivate glLabelPrivate; + +#include "label-object.h" +struct _glLabel { + GObject object; + + lglTemplate *template; + gboolean rotate_flag; + + GList *objects; + + glLabelPrivate *priv; +}; + +struct _glLabelClass { + GObjectClass parent_class; + + void (*changed) (glLabel *label, gpointer user_data); + + void (*name_changed) (glLabel *label, gpointer user_data); + + void (*modified_changed) (glLabel *label, gpointer user_data); + + void (*merge_changed) (glLabel *label, gpointer user_data); + + void (*size_changed) (glLabel *label, gpointer user_data); + + void (*object_added) (glLabel *label, + glLabelObject *object, + gpointer user_data); + +}; + + +GType gl_label_get_type (void) G_GNUC_CONST; + +GObject *gl_label_new (void); + + +void gl_label_add_object (glLabel *label, + glLabelObject *object); + +void gl_label_remove_object (glLabel *label, + glLabelObject *object); + +void gl_label_raise_object_to_top (glLabel *label, + glLabelObject *object); + +void gl_label_lower_object_to_bottom (glLabel *label, + glLabelObject *object); + + +void gl_label_set_template (glLabel *label, + lglTemplate *template); + +void gl_label_set_rotate_flag (glLabel *label, + gboolean rotate_flag); + +void gl_label_get_size (glLabel *label, + gdouble *w, + gdouble *h); + + +void gl_label_set_merge (glLabel *label, + glMerge *merge); + +glMerge *gl_label_get_merge (glLabel *label); + + +gchar *gl_label_get_filename (glLabel *label); + +gchar *gl_label_get_short_name (glLabel *label); + +GHashTable *gl_label_get_pixbuf_cache (glLabel *label); + +gboolean gl_label_is_modified (glLabel *label); + +gboolean gl_label_is_untitled (glLabel *label); + +gboolean gl_label_can_undo (glLabel *label); + +gboolean gl_label_can_redo (glLabel *label); + + +void gl_label_set_filename (glLabel *label, + const gchar *filename); + +void gl_label_clear_modified (glLabel *label); + +void gl_label_set_compression (glLabel *label, + gint compression); + +gint gl_label_get_compression (glLabel *label); + +void gl_label_draw (glLabel *label, + cairo_t *cr, + gboolean screen_flag, + glMergeRecord *record); + +G_END_DECLS + + +#endif /* __LABEL_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/marshal.list b/src/marshal.list new file mode 100644 index 00000000..edc75344 --- /dev/null +++ b/src/marshal.list @@ -0,0 +1,9 @@ +VOID:VOID +VOID:INT +VOID:INT,INT +VOID:INT,UINT +VOID:DOUBLE +VOID:DOUBLE,DOUBLE +VOID:OBJECT +VOID:STRING +VOID:UINT,BOOLEAN diff --git a/src/merge-evolution.c b/src/merge-evolution.c new file mode 100644 index 00000000..36f7bf22 --- /dev/null +++ b/src/merge-evolution.c @@ -0,0 +1,568 @@ +/* + * merge-evolution.h + * Copyright (C) 2001-2009 Jim Evins . + * and + * Copyright (C) 2005 Austin Henry + * and + * Copyright (C) 2007 Peter Cherriman + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#ifdef HAVE_LIBEBOOK + + +#include "merge-evolution.h" + +#include +#include +#include +#include + +#include + +#include "debug.h" + +#define DEFAULT_QUERY "(exists \"full_name\")" + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glMergeEvolutionPrivate { + gchar *query; + EBook *book; + GList *contacts; + GList *fields; /* the fields supported by the addressbook */ +}; + +enum { + LAST_SIGNAL +}; + +enum { + ARG_0, + ARG_QUERY, +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_merge_evolution_finalize (GObject *object); + +static void gl_merge_evolution_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); + +static void gl_merge_evolution_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); + +static GList *gl_merge_evolution_get_key_list (glMerge *merge); +static gchar *gl_merge_evolution_get_primary_key (glMerge *merge); +static void gl_merge_evolution_open (glMerge *merge); +static void gl_merge_evolution_close (glMerge *merge); +static glMergeRecord *gl_merge_evolution_get_record (glMerge *merge); +static void gl_merge_evolution_copy (glMerge *dst_merge, + glMerge *src_merge); + +/* utility function prototypes go here */ +static void free_field_list (GList *fields); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glMergeEvolution, gl_merge_evolution, GL_TYPE_MERGE); + +static void +gl_merge_evolution_class_init (glMergeEvolutionClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glMergeClass *merge_class = GL_MERGE_CLASS (class); + + gl_debug (DEBUG_MERGE, "START"); + + gl_merge_evolution_parent_class = g_type_class_peek_parent (class); + + object_class->set_property = gl_merge_evolution_set_property; + object_class->get_property = gl_merge_evolution_get_property; + + g_object_class_install_property + (object_class, + ARG_QUERY, + g_param_spec_string ("query", NULL, + "Query used to select records from the addressbook", + "(exists \"full_name\")", + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + + object_class->finalize = gl_merge_evolution_finalize; + + merge_class->get_key_list = gl_merge_evolution_get_key_list; + merge_class->get_primary_key = gl_merge_evolution_get_primary_key; + merge_class->open = gl_merge_evolution_open; + merge_class->close = gl_merge_evolution_close; + merge_class->get_record = gl_merge_evolution_get_record; + merge_class->copy = gl_merge_evolution_copy; + + gl_debug (DEBUG_MERGE, "END"); +} + + +static void +gl_merge_evolution_init (glMergeEvolution *merge_evolution) +{ + gl_debug (DEBUG_MERGE, "START"); + + merge_evolution->priv = g_new0 (glMergeEvolutionPrivate, 1); + merge_evolution->priv->query = g_strdup(DEFAULT_QUERY); + + gl_debug (DEBUG_MERGE, "END"); +} + + +static void +gl_merge_evolution_finalize (GObject *object) +{ + glMergeEvolution *merge_evolution = GL_MERGE_EVOLUTION (object); + + gl_debug (DEBUG_MERGE, "START"); + + g_return_if_fail (object && GL_IS_MERGE_EVOLUTION (object)); + + free_field_list(merge_evolution->priv->fields); + g_free (merge_evolution->priv->query); + g_free (merge_evolution->priv); + + G_OBJECT_CLASS (gl_merge_evolution_parent_class)->finalize (object); + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Set argument. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_evolution_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + glMergeEvolution *merge_evolution; + + merge_evolution = GL_MERGE_EVOLUTION (object); + + switch (param_id) { + + case ARG_QUERY: + g_free (merge_evolution->priv->query); + merge_evolution->priv->query = g_value_dup_string (value); + gl_debug (DEBUG_MERGE, "ARG \"query\" = \"%s\"", + merge_evolution->priv->query); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + + } + +} + + +/*--------------------------------------------------------------------------*/ +/* Get argument. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_evolution_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + glMergeEvolution *merge_evolution; + + merge_evolution = GL_MERGE_EVOLUTION (object); + + switch (param_id) { + + case ARG_QUERY: + g_value_set_string (value, merge_evolution->priv->query); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + + } + +} + + +/*--------------------------------------------------------------------------*/ +/* Get key list. */ +/*--------------------------------------------------------------------------*/ +static GList * +gl_merge_evolution_get_key_list (glMerge *merge) +{ + glMergeEvolution *merge_evolution; + GList *key_list = NULL; + GList *iter; + + gl_debug (DEBUG_MERGE, "BEGIN"); + + merge_evolution = GL_MERGE_EVOLUTION (merge); + + /* for the previously retrieved supported fileds, go through them and find + * their pretty names */ + for (iter = merge_evolution->priv->fields; + iter != NULL; + iter = g_list_next(iter)) + { + key_list = g_list_prepend (key_list, + g_strdup (e_contact_pretty_name (*(EContactField *)iter->data))); + } + + key_list = g_list_reverse (key_list); + + gl_debug (DEBUG_MERGE, "END"); + + return key_list; +} + + +/*--------------------------------------------------------------------------*/ +/* Get "primary" key. */ +/*--------------------------------------------------------------------------*/ +static gchar * +gl_merge_evolution_get_primary_key (glMerge *merge) +{ + return g_strdup (e_contact_pretty_name(E_CONTACT_FILE_AS)); +} + + +/* Sort compare function for sorting contacts by file-as element + * by Peter Cherriman (PJC) + * called by GList* g_list_sort(GList *list, sort_contact_by_file_as); + */ +static gint sort_contact_by_file_as(gconstpointer *a, gconstpointer *b) +{ + /* + * Returns : negative value if a < b; zero if a = b; positive value if a > b + */ + + // Check and cast a and b to EContact + EContact *contact_a = E_CONTACT(a); + EContact *contact_b = E_CONTACT(b); + + // Extract file_as for each contact and compare... + gchar *a_file_as = e_contact_get (contact_a, E_CONTACT_FILE_AS); + gchar *b_file_as = e_contact_get (contact_b, E_CONTACT_FILE_AS); + gint res = lgl_str_utf8_casecmp(a_file_as, b_file_as); + + gl_debug(DEBUG_MERGE, "Sort comparing contacts '%s' and '%s' = %d", a_file_as, b_file_as, res); + + // free file_as strings created earlier.... + g_free (a_file_as); + g_free (b_file_as); + + return res; +} + + +/*--------------------------------------------------------------------------*/ +/* Open merge source. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_evolution_open (glMerge *merge) +{ + glMergeEvolution *merge_evolution; + EBookQuery *query; + gboolean status; + GList *fields, *iter; + EContactField *field_id; + GError *error = NULL; + + gl_debug (DEBUG_MERGE, "BEGIN"); + + merge_evolution = GL_MERGE_EVOLUTION (merge); + + query = e_book_query_from_string(merge_evolution->priv->query); + if (!query) { + g_warning (_("Couldn't construct query")); + return; + } + + merge_evolution->priv->book = e_book_new_system_addressbook(&error); + if (!merge_evolution->priv->book) { + g_warning (_("Couldn't open addressbook.")); + if (error) + { + g_warning ("e_book_new_system_addressbook: %s", error->message); + g_error_free (error); + } + e_book_query_unref(query); + return; + } + + if (!e_book_open(merge_evolution->priv->book, FALSE, &error)) { + g_warning (_("Couldn't open addressbook.")); + if (error) + { + g_warning ("e_book_open: %s", error->message); + g_error_free (error); + } + e_book_query_unref(query); + g_object_unref(merge_evolution->priv->book); + merge_evolution->priv->book = NULL; + return; + } + + /* fetch the list of fields supported by this address book */ + status = e_book_get_supported_fields(merge_evolution->priv->book, &fields, &error); + if (status == FALSE) { + g_warning (_("Couldn't list available fields.")); + if (error) + { + g_warning ("e_book_get_supported_fields: %s", error->message); + g_error_free (error); + } + e_book_query_unref(query); + g_object_unref(merge_evolution->priv->book); + merge_evolution->priv->book = NULL; + return; + } + + /* generate a list of field_ids, and put that into private->fields */ + for (iter = fields; iter != NULL; iter = g_list_next(iter)) { + field_id = g_new(EContactField, 1); + *field_id = e_contact_field_id(iter->data); + + /* above this value, the data aren't strings anymore */ + if (*field_id >= E_CONTACT_LAST_SIMPLE_STRING) { + g_free (field_id); + continue; + } + + merge_evolution->priv->fields = + g_list_prepend(merge_evolution->priv->fields, field_id); + } + free_field_list(fields); /* don't need the list of names anymore */ + + gl_debug(DEBUG_MERGE, "Field list length: %d", g_list_length(merge_evolution->priv->fields)); + + /* finally retrieve the contacts */ + status = e_book_get_contacts (merge_evolution->priv->book, + query, + &merge_evolution->priv->contacts, + &error); + if (status == FALSE) { + g_warning (_("Couldn't get contacts.")); + if (error) + { + g_warning ("e_book_get_contacts: %s", error->message); + g_error_free (error); + } + e_book_query_unref(query); + free_field_list(merge_evolution->priv->fields); + g_object_unref(merge_evolution->priv->book); + merge_evolution->priv->book = NULL; + + return; + } + + e_book_query_unref(query); + + /* Sort contacts using file-as element.... + * by Peter Cherriman (PJC) + */ + gl_debug (DEBUG_MERGE, "Starting sort"); + merge_evolution->priv->contacts = g_list_sort(merge_evolution->priv->contacts, (GCompareFunc)sort_contact_by_file_as); + gl_debug (DEBUG_MERGE, "Ended sort"); + + gl_debug (DEBUG_MERGE, "END"); + + return; +} + + +/*--------------------------------------------------------------------------*/ +/* Close merge source. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_evolution_close (glMerge *merge) +{ + glMergeEvolution *merge_evolution; + GList *iter; + + merge_evolution = GL_MERGE_EVOLUTION (merge); + + /* unref all of the objects created in _open */ + g_object_unref(merge_evolution->priv->book); + merge_evolution->priv->book = NULL; + + for (iter = merge_evolution->priv->contacts; + iter != NULL; + iter = g_list_next(iter)) + { + EContact *contact = E_CONTACT (iter->data); + + g_object_unref(contact); + } + g_list_free(merge_evolution->priv->contacts); + merge_evolution->priv->contacts = NULL; +} + + +/*--------------------------------------------------------------------------*/ +/* Get next record from merge source, NULL if no records left (i.e EOF) */ +/*--------------------------------------------------------------------------*/ +static glMergeRecord * +gl_merge_evolution_get_record (glMerge *merge) +{ + glMergeEvolution *merge_evolution; + glMergeRecord *record; + glMergeField *field; + EContactField field_id; + + GList *head, *iter; + EContact *contact; + + merge_evolution = GL_MERGE_EVOLUTION (merge); + + head = merge_evolution->priv->contacts; + if (head == NULL) { + return NULL; /* past the last record */ + } + contact = E_CONTACT(head->data); + + record = g_new0 (glMergeRecord, 1); + record->select_flag = TRUE; + + /* Take the interesting fields one by one from the contact, and put them + * into the glMergeRecord structure. When done, free up the resources for + * that contact */ + + /* iterate through the supported fields, and add them to the list */ + for (iter = merge_evolution->priv->fields; + iter != NULL; + iter = g_list_next(iter)) + { + gchar *value; + field_id = *(EContactField *)iter->data; + value = g_strdup (e_contact_get_const (contact, field_id)); + + if (value) { + field = g_new0 (glMergeField, 1); + field->key = g_strdup (e_contact_pretty_name (field_id)); + field->value = value; + record->field_list = g_list_prepend (record->field_list, field); + } + } + + record->field_list = g_list_reverse (record->field_list); + + /* do a destructive read */ + g_object_unref (contact); + merge_evolution->priv->contacts = + g_list_remove_link (merge_evolution->priv->contacts, head); + g_list_free_1 (head); + + return record; +} + + +/*---------------------------------------------------------------------------*/ +/* Copy merge_evolution specific fields. */ +/*---------------------------------------------------------------------------*/ +static void +gl_merge_evolution_copy (glMerge *dst_merge, + glMerge *src_merge) +{ + GList *src_iter, *dst_iter; + + gl_debug (DEBUG_MERGE, "BEGIN"); + + glMergeEvolution *dst_merge_evolution; + glMergeEvolution *src_merge_evolution; + + dst_merge_evolution = GL_MERGE_EVOLUTION (dst_merge); + src_merge_evolution = GL_MERGE_EVOLUTION (src_merge); + + dst_merge_evolution->priv->query = g_strdup(src_merge_evolution->priv->query); + + dst_merge_evolution->priv->fields = g_list_copy(src_merge_evolution->priv->fields); + for (src_iter = src_merge_evolution->priv->fields, + dst_iter = dst_merge_evolution->priv->fields; + src_iter != NULL && dst_iter != NULL; + src_iter = g_list_next(src_iter), dst_iter = g_list_next(dst_iter)) + { + dst_iter->data = g_new(EContactField, 1); + if (src_iter->data) { /* this better not be null, but... */ + memcpy(dst_iter->data, src_iter->data, sizeof(EContactField)); + } + } + + /* I don't know that there's a good way to do a deep copy of the various + * libebook structures/objects, so I'm just going to leave them out. They + * are all regenerated on gl_merge_evolution_open, anyway */ + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* Free the list of supported fields */ +/*---------------------------------------------------------------------------*/ +static void +free_field_list (GList *fields) +{ + GList *iter; + + for (iter = fields; iter != NULL; iter = g_list_next(iter)) + { + if (iter->data) { + g_free(iter->data); + } + } + g_list_free(fields); + fields = NULL; +} + + +#endif /* HAVE_LIBEBOOK */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge-evolution.h b/src/merge-evolution.h new file mode 100644 index 00000000..f49d1b46 --- /dev/null +++ b/src/merge-evolution.h @@ -0,0 +1,78 @@ +/* + * merge-evolution.h + * Copyright (C) 2001-2009 Jim Evins . + * and + * Copyright (C) 2005 Austin Henry + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MERGE_EVOLUTION_H__ +#define __MERGE_EVOLUTION_H__ + +#include "merge.h" + +G_BEGIN_DECLS + +/* The following object arguments are available: + * + * name type description + * --------------------------------------------------------------------------- + * query gchar* The query used to select records + * + */ + +#define GL_TYPE_MERGE_EVOLUTION (gl_merge_evolution_get_type ()) +#define GL_MERGE_EVOLUTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE_EVOLUTION, glMergeEvolution)) +#define GL_MERGE_EVOLUTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_EVOLUTION, glMergeEvolutionClass)) +#define GL_IS_MERGE_EVOLUTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE_EVOLUTION)) +#define GL_IS_MERGE_EVOLUTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_EVOLUTION)) +#define GL_MERGE_EVOLUTION_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_MERGE_EVOLUTION, glMergeEvolutionClass)) + + +typedef struct _glMergeEvolution glMergeEvolution; +typedef struct _glMergeEvolutionClass glMergeEvolutionClass; + +typedef struct _glMergeEvolutionPrivate glMergeEvolutionPrivate; + + +struct _glMergeEvolution { + glMerge object; + + glMergeEvolutionPrivate *priv; +}; + +struct _glMergeEvolutionClass { + glMergeClass parent_class; +}; + + +GType gl_merge_evolution_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __MERGE_EVOLUTION_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge-init.c b/src/merge-init.c new file mode 100644 index 00000000..9d575644 --- /dev/null +++ b/src/merge-init.c @@ -0,0 +1,103 @@ +/* + * merge-init.c + * Copyright (C) 2002-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include + +#include "merge-init.h" +#include "merge-text.h" + +#ifdef HAVE_LIBEBOOK +#include "merge-evolution.h" +#include "merge-vcard.h" +#endif /* HAVE_LIBEBOOK */ + +#include "debug.h" + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + + +/*****************************************************************************/ +/* Initailize document merge module, by registering all available backends. */ +/*****************************************************************************/ +void +gl_merge_init (void) +{ + + gl_merge_register_backend (GL_TYPE_MERGE_TEXT, + "Text/Comma", + _("Text file with comma delimeters (CSV)"), + GL_MERGE_SRC_IS_FILE, + "delim", ',', + NULL); + + gl_merge_register_backend (GL_TYPE_MERGE_TEXT, + "Text/Colon", + _("Text file with colon delimeters"), + GL_MERGE_SRC_IS_FILE, + "delim", ':', + NULL); + + gl_merge_register_backend (GL_TYPE_MERGE_TEXT, + "Text/Tab", + _("Text file with tab delimeters"), + GL_MERGE_SRC_IS_FILE, + "delim", '\t', + NULL); + +#ifdef HAVE_LIBEBOOK + + gl_merge_register_backend (GL_TYPE_MERGE_EVOLUTION, + "ebook/eds", + _("Data from default Evolution Addressbook"), + GL_MERGE_SRC_IS_FIXED, + NULL); + + gl_merge_register_backend (GL_TYPE_MERGE_VCARD, + "ebook/vcard", + _("Data from a file containing VCards"), + GL_MERGE_SRC_IS_FILE, + NULL); + +#endif /* HAVE_LIBEBOOK */ + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge-init.h b/src/merge-init.h new file mode 100644 index 00000000..3e281bf7 --- /dev/null +++ b/src/merge-init.h @@ -0,0 +1,43 @@ +/* + * merge-init.h + * Copyright (C) 2002-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MERGE_INIT_H__ +#define __MERGE_INIT_H__ + +#include "merge.h" + +G_BEGIN_DECLS + +void gl_merge_init (void); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge-properties-dialog.c b/src/merge-properties-dialog.c new file mode 100644 index 00000000..c1c9c354 --- /dev/null +++ b/src/merge-properties-dialog.c @@ -0,0 +1,702 @@ +/* + * merge-properties-dialog.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "merge-properties-dialog.h" + +#include +#include +#include + +#include "label.h" +#include "merge.h" +#include "combo-util.h" +#include "builder-util.h" +#include "hig.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + +struct _glMergePropertiesDialogPrivate { + + glLabel *label; + glMerge *merge; + + GtkBuilder *builder; + + GtkWidget *type_combo; + GtkWidget *location_vbox; + GtkWidget *src_entry; + + GtkTreeStore *store; + GtkWidget *treeview; + + GtkWidget *select_all_button; + GtkWidget *unselect_all_button; + + GtkWidget *ok_button; + + gchar *saved_src; + +}; + +enum { + /* Real columns */ + SELECT_COLUMN, + RECORD_FIELD_COLUMN, + VALUE_COLUMN, + + /* Invisible columns */ + IS_RECORD_COLUMN, + DATA_COLUMN, /* points to glMergeRecord */ + + N_COLUMNS +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_merge_properties_dialog_finalize (GObject *object); +static void gl_merge_properties_dialog_construct (glMergePropertiesDialog *dialog, + glLabel *label, + GtkWindow *window); + +static void type_changed_cb (GtkWidget *widget, + glMergePropertiesDialog *dialog); + +static void src_changed_cb (GtkWidget *widget, + glMergePropertiesDialog *dialog); + +static void response_cb (glMergePropertiesDialog *dialog, + gint response, + gpointer user_data); + +static void load_tree (GtkTreeStore *store, + glMerge *merge); + +static void record_select_toggled_cb (GtkCellRendererToggle *cell, + gchar *path_str, + GtkTreeStore *store); + +static void select_all_button_clicked_cb (GtkWidget *widget, + glMergePropertiesDialog *dialog); + +static void unselect_all_button_clicked_cb (GtkWidget *widget, + glMergePropertiesDialog *dialog); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glMergePropertiesDialog, gl_merge_properties_dialog, GTK_TYPE_DIALOG); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_merge_properties_dialog_class_init (glMergePropertiesDialogClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_MERGE, ""); + + gl_merge_properties_dialog_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_merge_properties_dialog_finalize; +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_merge_properties_dialog_init (glMergePropertiesDialog *dialog) +{ + GtkBuilder *builder; + static gchar *object_ids[] = { "merge_properties_vbox", NULL }; + GError *error = NULL; + GtkWidget *vbox; + + gl_debug (DEBUG_MERGE, "START"); + + dialog->priv = g_new0 (glMergePropertiesDialogPrivate, 1); + + gtk_container_set_border_width (GTK_CONTAINER(dialog), GL_HIG_PAD1); + + gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE); + gtk_dialog_add_button (GTK_DIALOG (dialog), + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + dialog->priv->ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog), + GTK_STOCK_OK, GTK_RESPONSE_OK); + + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + + builder = gtk_builder_new (); + gtk_builder_add_objects_from_file (builder, + GLABELS_BUILDER_DIR "merge-properties-dialog.builder", + object_ids, + &error); + if (error) { + g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); + g_error_free (error); + return; + } + + gl_builder_util_get_widgets (builder, + "merge_properties_vbox", &vbox, + "type_combo", &dialog->priv->type_combo, + "location_vbox", &dialog->priv->location_vbox, + "treeview", &dialog->priv->treeview, + "select_all_button", &dialog->priv->select_all_button, + "unselect_all_button", &dialog->priv->unselect_all_button, + NULL); + + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox); + dialog->priv->builder = builder; + + gl_combo_util_add_text_model (GTK_COMBO_BOX (dialog->priv->type_combo)); + + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*****************************************************************************/ +/* Finalize Function. */ +/*****************************************************************************/ +static void +gl_merge_properties_dialog_finalize (GObject *object) +{ + glMergePropertiesDialog* dialog = GL_MERGE_PROPERTIES_DIALOG (object); + + gl_debug (DEBUG_MERGE, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_MERGE_PROPERTIES_DIALOG (dialog)); + g_return_if_fail (dialog->priv != NULL); + + if (dialog->priv->merge != NULL) { + g_object_unref (G_OBJECT (dialog->priv->merge)); + } + if (dialog->priv->builder != NULL) { + g_object_unref (G_OBJECT (dialog->priv->builder)); + } + g_free (dialog->priv); + + G_OBJECT_CLASS (gl_merge_properties_dialog_parent_class)->finalize (object); + gl_debug (DEBUG_MERGE, "END"); +} + + +/*****************************************************************************/ +/* NEW merge properties dialog. */ +/*****************************************************************************/ +GtkWidget* +gl_merge_properties_dialog_new (glLabel *label, + GtkWindow *window) +{ + GtkWidget *dialog; + + gl_debug (DEBUG_MERGE, "START"); + + dialog = GTK_WIDGET (g_object_new (GL_TYPE_MERGE_PROPERTIES_DIALOG, NULL)); + + gl_merge_properties_dialog_construct (GL_MERGE_PROPERTIES_DIALOG (dialog), + label, window); + + gl_debug (DEBUG_MERGE, "END"); + + return dialog; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Create merge widgets. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_properties_dialog_construct (glMergePropertiesDialog *dialog, + glLabel *label, + GtkWindow *window) +{ + gchar *description; + glMergeSrcType src_type; + gchar *src; + gchar *name, *title; + GList *texts; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + GtkTreeSelection *selection; + + gl_debug (DEBUG_MERGE, "START"); + + g_return_if_fail (GL_IS_MERGE_PROPERTIES_DIALOG (dialog)); + g_return_if_fail (dialog->priv != NULL); + + if (window) { + gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(window)); + gtk_window_set_destroy_with_parent (GTK_WINDOW(dialog), TRUE); + } + + dialog->priv->label = label; + + dialog->priv->merge = gl_label_get_merge (dialog->priv->label); + description = gl_merge_get_description (dialog->priv->merge); + src_type = gl_merge_get_src_type (dialog->priv->merge); + src = gl_merge_get_src (dialog->priv->merge); + + /* --- Window title --- */ + name = gl_label_get_short_name (label); + title = g_strdup_printf ("%s %s", name, _("Merge Properties")); + gtk_window_set_title (GTK_WINDOW (dialog), title); + g_free (name); + g_free (title); + + texts = gl_merge_get_descriptions (); + gl_debug (DEBUG_MERGE, "DESCRIPTIONS:"); + { + GList *p; + + for (p=texts; p!=NULL; p=p->next) { + gl_debug (DEBUG_MERGE, " \"%s\"", p->data); + } + } + gl_combo_util_set_strings (GTK_COMBO_BOX (dialog->priv->type_combo), + texts); + gl_merge_free_descriptions (&texts); + gl_combo_util_set_active_text (GTK_COMBO_BOX (dialog->priv->type_combo), + description); + g_signal_connect (G_OBJECT (dialog->priv->type_combo), "changed", + G_CALLBACK (type_changed_cb), dialog); + + gl_debug (DEBUG_MERGE, "Src_type = %d", src_type); + switch (src_type) { + case GL_MERGE_SRC_IS_FILE: + dialog->priv->src_entry = + gtk_file_chooser_button_new (_("Select merge-database source"), + GTK_FILE_CHOOSER_ACTION_OPEN); + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog->priv->src_entry), + src); + gtk_file_chooser_button_set_focus_on_click (GTK_FILE_CHOOSER_BUTTON (dialog->priv->src_entry), + FALSE); + g_signal_connect (G_OBJECT (dialog->priv->src_entry), + "selection-changed", + G_CALLBACK (src_changed_cb), dialog); + break; + default: + dialog->priv->src_entry = gtk_label_new (_("N/A")); + gtk_misc_set_alignment (GTK_MISC (dialog->priv->src_entry), 0.0, 0.5); + break; + } + gtk_box_pack_start (GTK_BOX (dialog->priv->location_vbox), + dialog->priv->src_entry, FALSE, FALSE, 0); + gtk_widget_show_all (GTK_WIDGET (dialog->priv->location_vbox)); + + dialog->priv->store = gtk_tree_store_new (N_COLUMNS, + G_TYPE_BOOLEAN, /* Record selector */ + G_TYPE_STRING, /* Record/Field name */ + G_TYPE_STRING, /* Field value */ + G_TYPE_BOOLEAN, /* Is Record? */ + G_TYPE_POINTER /* Pointer to record */); + load_tree (dialog->priv->store, dialog->priv->merge); + + gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->priv->treeview), + GTK_TREE_MODEL (dialog->priv->store)); + + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (dialog->priv->treeview), + TRUE); + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->priv->treeview)); + gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); + renderer = gtk_cell_renderer_toggle_new (); + g_signal_connect (G_OBJECT (renderer), "toggled", + G_CALLBACK (record_select_toggled_cb), dialog->priv->store); + column = gtk_tree_view_column_new_with_attributes (_("Select"), renderer, + "active", SELECT_COLUMN, + "visible", IS_RECORD_COLUMN, + NULL); + gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->priv->treeview), column); + renderer = gtk_cell_renderer_text_new (); + g_object_set (G_OBJECT (renderer), "yalign", 0.0, NULL); + column = gtk_tree_view_column_new_with_attributes (_("Record/Field"), renderer, + "text", RECORD_FIELD_COLUMN, + NULL); + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->priv->treeview), column); + gtk_tree_view_set_expander_column (GTK_TREE_VIEW (dialog->priv->treeview), column); + renderer = gtk_cell_renderer_text_new (); + g_object_set (G_OBJECT (renderer), "yalign", 0.0, NULL); + column = gtk_tree_view_column_new_with_attributes (_("Data"), renderer, + "text", VALUE_COLUMN, + NULL); + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->priv->treeview), column); + + g_signal_connect (G_OBJECT (dialog->priv->select_all_button), + "clicked", + G_CALLBACK (select_all_button_clicked_cb), dialog); + + g_signal_connect (G_OBJECT (dialog->priv->unselect_all_button), + "clicked", + G_CALLBACK (unselect_all_button_clicked_cb), dialog); + + + g_free (src); + g_free (description); + + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); + + gtk_widget_grab_focus (dialog->priv->ok_button); + gtk_widget_grab_default (dialog->priv->ok_button); + + g_signal_connect(G_OBJECT (dialog), "response", + G_CALLBACK (response_cb), NULL); + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. type "changed" callback. */ +/*--------------------------------------------------------------------------*/ +static void +type_changed_cb (GtkWidget *widget, + glMergePropertiesDialog *dialog) +{ + gchar *description; + gchar *name; + gchar *src; + glMergeSrcType src_type; + + gl_debug (DEBUG_MERGE, "START"); + + description = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->priv->type_combo)); + name = gl_merge_description_to_name (description); + + src = gl_merge_get_src (dialog->priv->merge); /* keep current src if possible */ + if ( src != NULL ) { + gl_debug (DEBUG_MERGE, "Saving src = \"%s\"", src); + g_free (dialog->priv->saved_src); + dialog->priv->saved_src = src; + } + + if (dialog->priv->merge != NULL) { + g_object_unref (G_OBJECT(dialog->priv->merge)); + } + dialog->priv->merge = gl_merge_new (name); + + gtk_widget_destroy (dialog->priv->src_entry); + src_type = gl_merge_get_src_type (dialog->priv->merge); + switch (src_type) { + case GL_MERGE_SRC_IS_FILE: + dialog->priv->src_entry = + gtk_file_chooser_button_new (_("Select merge-database source"), + GTK_FILE_CHOOSER_ACTION_OPEN); + gtk_file_chooser_button_set_focus_on_click (GTK_FILE_CHOOSER_BUTTON (dialog->priv->src_entry), + FALSE); + if (dialog->priv->saved_src != NULL) { + gl_debug (DEBUG_MERGE, "Setting src = \"%s\"", dialog->priv->saved_src); + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog->priv->src_entry), + dialog->priv->saved_src); + gl_merge_set_src (dialog->priv->merge, dialog->priv->saved_src); + } + g_signal_connect (G_OBJECT (dialog->priv->src_entry), + "selection-changed", + G_CALLBACK (src_changed_cb), dialog); + break; + case GL_MERGE_SRC_IS_FIXED: + dialog->priv->src_entry = gtk_label_new (_("Fixed")); + gtk_misc_set_alignment (GTK_MISC (dialog->priv->src_entry), 0.0, 0.5); + + gl_debug (DEBUG_MERGE, "Setting src = \"%s\"", dialog->priv->saved_src); + gl_merge_set_src (dialog->priv->merge, "Fixed"); + break; + default: + dialog->priv->src_entry = gtk_label_new (_("N/A")); + gtk_misc_set_alignment (GTK_MISC (dialog->priv->src_entry), 0.0, 0.5); + break; + } + gtk_box_pack_start( GTK_BOX (dialog->priv->location_vbox), + dialog->priv->src_entry, FALSE, FALSE, 0); + gtk_widget_show_all (dialog->priv->location_vbox); + + load_tree (dialog->priv->store, dialog->priv->merge); + + g_free (description); + g_free (name); + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. source "changed" callback. */ +/*--------------------------------------------------------------------------*/ +static void +src_changed_cb (GtkWidget *widget, + glMergePropertiesDialog *dialog) +{ + gchar *src, *orig_src; + + gl_debug (DEBUG_MERGE, "START"); + + orig_src = gl_merge_get_src (dialog->priv->merge); + src = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog->priv->src_entry)); + + gl_debug (DEBUG_MERGE, "orig=\"%s\", new=\"%s\"\n", orig_src, src); + + if (((orig_src == NULL) && (src != NULL)) || + ((orig_src != NULL) && (src == NULL)) || + ((orig_src != NULL) && (src != NULL) && strcmp (src, orig_src))) + { + gl_merge_set_src (dialog->priv->merge, src); + load_tree (dialog->priv->store, dialog->priv->merge); + } + + g_free (orig_src); + g_free (src); + + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. response callback. */ +/*--------------------------------------------------------------------------*/ +static void +response_cb (glMergePropertiesDialog *dialog, + gint response, + gpointer user_data) +{ + gl_debug (DEBUG_MERGE, "START"); + + switch (response) { + + case GTK_RESPONSE_OK: + gl_label_set_merge (dialog->priv->label, dialog->priv->merge); + gtk_widget_hide (GTK_WIDGET (dialog)); + break; + case GTK_RESPONSE_CANCEL: + /* Let the dialog get rebuilt next time to recover state. */ + gtk_widget_destroy (GTK_WIDGET (dialog)); + break; + case GTK_RESPONSE_DELETE_EVENT: + break; + default: + g_print ("response = %d", response); + g_assert_not_reached (); + } + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Load tree store from merge data. */ +/*--------------------------------------------------------------------------*/ +static void +load_tree (GtkTreeStore *store, + glMerge *merge) +{ + const GList *record_list; + GList *p_rec, *p_field; + glMergeRecord *record; + glMergeField *field; + GtkTreeIter iter1, iter2; + gchar *primary_key; + gchar *primary_value; + + gl_debug (DEBUG_MERGE, "START"); + + gtk_tree_store_clear (store); + + primary_key = gl_merge_get_primary_key (merge); + record_list = gl_merge_get_record_list (merge); + + for ( p_rec=(GList *)record_list; p_rec!=NULL; p_rec=p_rec->next ) { + record = (glMergeRecord *)p_rec->data; + + primary_value = gl_merge_eval_key (record, primary_key); + + gtk_tree_store_append (store, &iter1, NULL); + gtk_tree_store_set (store, &iter1, + SELECT_COLUMN, record->select_flag, + RECORD_FIELD_COLUMN, primary_value, + IS_RECORD_COLUMN, TRUE, + DATA_COLUMN, record, + -1); + + g_free (primary_value); + + for ( p_field=record->field_list; p_field!=NULL; p_field=p_field->next ) { + field = (glMergeField *)p_field->data; + + gtk_tree_store_append (store, &iter2, &iter1); + gtk_tree_store_set (store, &iter2, + RECORD_FIELD_COLUMN, field->key, + VALUE_COLUMN, field->value, + IS_RECORD_COLUMN, FALSE, + -1); + } + } + + g_free (primary_key); + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Record select toggled. */ +/*--------------------------------------------------------------------------*/ +static void +record_select_toggled_cb (GtkCellRendererToggle *cell, + gchar *path_str, + GtkTreeStore *store) +{ + GtkTreePath *path; + GtkTreeIter iter; + glMergeRecord *record; + + gl_debug (DEBUG_MERGE, "START"); + + /* get toggled iter */ + path = gtk_tree_path_new_from_string (path_str); + gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path); + + /* get current data */ + gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, + DATA_COLUMN, &record, + -1); + + /* toggle the select flag within the record */ + record->select_flag ^= 1; + + /* set new value in store */ + gtk_tree_store_set (store, &iter, + SELECT_COLUMN, record->select_flag, + -1); + + /* clean up */ + gtk_tree_path_free (path); + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. "Select All" button callback. */ +/*--------------------------------------------------------------------------*/ +static void +select_all_button_clicked_cb (GtkWidget *widget, + glMergePropertiesDialog *dialog) +{ + GtkTreeModel *store = GTK_TREE_MODEL (dialog->priv->store); + GtkTreeIter iter; + glMergeRecord *record; + gboolean good; + + gl_debug (DEBUG_MERGE, "START"); + + for ( good = gtk_tree_model_get_iter_first (store, &iter); + good; + good = gtk_tree_model_iter_next (store, &iter) ) + { + + /* get current data */ + gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, + DATA_COLUMN, &record, + -1); + + + /* Set select flag within the record */ + record->select_flag = TRUE; + + /* set new value in store */ + gtk_tree_store_set (GTK_TREE_STORE (store), &iter, + SELECT_COLUMN, record->select_flag, + -1); + + } + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. "Unselect All" button callback. */ +/*--------------------------------------------------------------------------*/ +static void +unselect_all_button_clicked_cb (GtkWidget *widget, + glMergePropertiesDialog *dialog) +{ + GtkTreeModel *store = GTK_TREE_MODEL (dialog->priv->store); + GtkTreeIter iter; + glMergeRecord *record; + gboolean good; + + gl_debug (DEBUG_MERGE, "START"); + + for ( good = gtk_tree_model_get_iter_first (store, &iter); + good; + good = gtk_tree_model_iter_next (store, &iter) ) + { + + /* get current data */ + gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, + DATA_COLUMN, &record, + -1); + + + /* Set select flag within the record */ + record->select_flag = FALSE; + + /* set new value in store */ + gtk_tree_store_set (GTK_TREE_STORE (store), &iter, + SELECT_COLUMN, record->select_flag, + -1); + + } + + gl_debug (DEBUG_MERGE, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge-properties-dialog.h b/src/merge-properties-dialog.h new file mode 100644 index 00000000..33be5d17 --- /dev/null +++ b/src/merge-properties-dialog.h @@ -0,0 +1,78 @@ +/* + * merge-properties-dialog.h + * Copyright (C) 2002-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MERGE_PROPERTIES_DIALOG_H__ +#define __MERGE_PROPERTIES_DIALOG_H__ + +#include +#include "label.h" + +G_BEGIN_DECLS + +#define GL_TYPE_MERGE_PROPERTIES_DIALOG (gl_merge_properties_dialog_get_type ()) +#define GL_MERGE_PROPERTIES_DIALOG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE_PROPERTIES_DIALOG, glMergePropertiesDialog)) +#define GL_MERGE_PROPERTIES_DIALOG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_PROPERTIES_DIALOG, glMergePropertiesDialogClass)) +#define GL_IS_MERGE_PROPERTIES_DIALOG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE_PROPERTIES_DIALOG)) +#define GL_IS_MERGE_PROPERTIES_DIALOG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_PROPERTIES_DIALOG)) +#define GL_MERGE_PROPERTIES_DIALOG_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_MERGE_PROPERTIES_DIALOG, glMergePropertiesDialogClass)) + + +typedef struct _glMergePropertiesDialog glMergePropertiesDialog; +typedef struct _glMergePropertiesDialogClass glMergePropertiesDialogClass; + +typedef struct _glMergePropertiesDialogPrivate glMergePropertiesDialogPrivate; + +struct _glMergePropertiesDialog +{ + GtkDialog parent_instance; + + glMergePropertiesDialogPrivate *priv; + +}; + +struct _glMergePropertiesDialogClass +{ + GtkDialogClass parent_class; +}; + +GType gl_merge_properties_dialog_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_merge_properties_dialog_new (glLabel *label, + GtkWindow *window); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge-text.c b/src/merge-text.c new file mode 100644 index 00000000..079eb5b9 --- /dev/null +++ b/src/merge-text.c @@ -0,0 +1,716 @@ +/* + * merge-text.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "merge-text.h" + +#include + +#include "debug.h" + +#define LINE_BUF_LEN 1024 + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glMergeTextPrivate { + gchar delim; + FILE *fp; +}; + +enum { + LAST_SIGNAL +}; + +enum { + ARG_0, + ARG_DELIM, +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_merge_text_finalize (GObject *object); + +static void gl_merge_text_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); + +static void gl_merge_text_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); + +static GList *gl_merge_text_get_key_list (glMerge *merge); +static gchar *gl_merge_text_get_primary_key (glMerge *merge); +static void gl_merge_text_open (glMerge *merge); +static void gl_merge_text_close (glMerge *merge); +static glMergeRecord *gl_merge_text_get_record (glMerge *merge); +static void gl_merge_text_copy (glMerge *dst_merge, + glMerge *src_merge); + +static GList *parse_line (FILE *fp, + gchar delim); +static gchar *parse_field (gchar *raw_field); +static void free_fields (GList **fields); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glMergeText, gl_merge_text, GL_TYPE_MERGE); + + +static void +gl_merge_text_class_init (glMergeTextClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glMergeClass *merge_class = GL_MERGE_CLASS (class); + + gl_debug (DEBUG_MERGE, "START"); + + gl_merge_text_parent_class = g_type_class_peek_parent (class); + + object_class->set_property = gl_merge_text_set_property; + object_class->get_property = gl_merge_text_get_property; + + g_object_class_install_property + (object_class, + ARG_DELIM, + g_param_spec_char ("delim", NULL, NULL, + 0, 0x7F, ',', + (G_PARAM_READABLE | G_PARAM_WRITABLE))); + + object_class->finalize = gl_merge_text_finalize; + + merge_class->get_key_list = gl_merge_text_get_key_list; + merge_class->get_primary_key = gl_merge_text_get_primary_key; + merge_class->open = gl_merge_text_open; + merge_class->close = gl_merge_text_close; + merge_class->get_record = gl_merge_text_get_record; + merge_class->copy = gl_merge_text_copy; + + gl_debug (DEBUG_MERGE, "END"); +} + + +static void +gl_merge_text_init (glMergeText *merge_text) +{ + gl_debug (DEBUG_MERGE, "START"); + + merge_text->priv = g_new0 (glMergeTextPrivate, 1); + + gl_debug (DEBUG_MERGE, "END"); +} + + +static void +gl_merge_text_finalize (GObject *object) +{ + glMergeText *merge_text = GL_MERGE_TEXT (object); + + gl_debug (DEBUG_MERGE, "START"); + + g_return_if_fail (object && GL_IS_MERGE_TEXT (object)); + + g_free (merge_text->priv); + + G_OBJECT_CLASS (gl_merge_text_parent_class)->finalize (object); + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Set argument. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_text_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + glMergeText *merge_text; + + merge_text = GL_MERGE_TEXT (object); + + switch (param_id) { + + case ARG_DELIM: + merge_text->priv->delim = g_value_get_char (value); + gl_debug (DEBUG_MERGE, "ARG \"delim\" = \"%c\"", + merge_text->priv->delim); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + + } + +} + + +/*--------------------------------------------------------------------------*/ +/* Get argument. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_text_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + glMergeText *merge_text; + + merge_text = GL_MERGE_TEXT (object); + + switch (param_id) { + + case ARG_DELIM: + g_value_set_char (value, merge_text->priv->delim); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + + } + +} + + +/*--------------------------------------------------------------------------*/ +/* Get key list. */ +/*--------------------------------------------------------------------------*/ +static GList * +gl_merge_text_get_key_list (glMerge *merge) +{ + glMergeText *merge_text; + GList *record_list, *p_rec; + glMergeRecord *record; + GList *p_field; + gint i_field, n_fields, n_fields_max = 0; + GList *key_list; + + /* Field keys are simply column numbers. */ + + gl_debug (DEBUG_MERGE, "BEGIN"); + + merge_text = GL_MERGE_TEXT (merge); + + record_list = (GList *)gl_merge_get_record_list (merge); + + for ( p_rec=record_list; p_rec!=NULL; p_rec=p_rec->next ) { + record = (glMergeRecord *)p_rec->data; + + n_fields = 0; + for ( p_field=record->field_list; p_field!=NULL; p_field=p_field->next ) { + n_fields++; + } + if ( n_fields > n_fields_max ) n_fields_max = n_fields; + } + + key_list = NULL; + for (i_field=1; i_field <= n_fields_max; i_field++) { + key_list = g_list_append (key_list, g_strdup_printf ("%d", i_field)); + } + + + gl_debug (DEBUG_MERGE, "END"); + + return key_list; +} + + +/*--------------------------------------------------------------------------*/ +/* Get "primary" key. */ +/*--------------------------------------------------------------------------*/ +static gchar * +gl_merge_text_get_primary_key (glMerge *merge) +{ + /* For now, let's always assume the first column is the primary key. */ + return g_strdup ("1"); +} + + +/*--------------------------------------------------------------------------*/ +/* Open merge source. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_text_open (glMerge *merge) +{ + glMergeText *merge_text; + gchar *src; + + merge_text = GL_MERGE_TEXT (merge); + + src = gl_merge_get_src (merge); + + if (src != NULL) { + merge_text->priv->fp = fopen (src, "r"); + } + + g_free (src); +} + + +/*--------------------------------------------------------------------------*/ +/* Close merge source. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_text_close (glMerge *merge) +{ + glMergeText *merge_text; + + merge_text = GL_MERGE_TEXT (merge); + + if (merge_text->priv->fp != NULL) { + + fclose (merge_text->priv->fp); + merge_text->priv->fp = NULL; + + } +} + + +/*--------------------------------------------------------------------------*/ +/* Get next record from merge source, NULL if no records left (i.e EOF) */ +/*--------------------------------------------------------------------------*/ +static glMergeRecord * +gl_merge_text_get_record (glMerge *merge) +{ + glMergeText *merge_text; + gchar delim; + FILE *fp; + glMergeRecord *record; + GList *fields, *p; + gint i_field; + glMergeField *field; + + merge_text = GL_MERGE_TEXT (merge); + + delim = merge_text->priv->delim; + fp = merge_text->priv->fp; + + if (fp == NULL) { + return NULL; + } + + fields = parse_line (fp, delim); + if ( fields == NULL ) { + return NULL; + } + + record = g_new0 (glMergeRecord, 1); + record->select_flag = TRUE; + i_field = 1; + for (p=fields; p != NULL; p=p->next) { + + field = g_new0 (glMergeField, 1); + field->key = g_strdup_printf ("%d", i_field++); +#ifndef CSV_ALWAYS_UTF8 + field->value = g_locale_to_utf8 (p->data, -1, NULL, NULL, NULL); +#else + field->value = g_strdup (p->data); +#endif + + record->field_list = g_list_append (record->field_list, field); + } + free_fields (&fields); + + return record; +} + + +/*---------------------------------------------------------------------------*/ +/* Copy merge_text specific fields. */ +/*---------------------------------------------------------------------------*/ +static void +gl_merge_text_copy (glMerge *dst_merge, + glMerge *src_merge) +{ + glMergeText *dst_merge_text; + glMergeText *src_merge_text; + + dst_merge_text = GL_MERGE_TEXT (dst_merge); + src_merge_text = GL_MERGE_TEXT (src_merge); + + dst_merge_text->priv->delim = src_merge_text->priv->delim; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Parse line. */ +/* */ +/* Attempt to be a robust parser of various CSV (and similar) formats. */ +/* */ +/* Split into fields, accounting for: */ +/* - delimeters may be embedded in quoted text (") */ +/* - delimeters may be "escaped" by a leading backslash (\) */ +/* - quotes may be embedded in quoted text as two adjacent quotes ("") */ +/* - quotes may be "escaped" either within or outside of quoted text. */ +/* - newlines may be embedded in quoted text, allowing a field to span */ +/* more than one line. */ +/* */ +/* This function does not do any parsing of the individual fields, other */ +/* than to correctly interpet delimeters. Actual parsing of the individual */ +/* fields is done in parse_field(). */ +/* */ +/* Returns a list of fields. A blank line is considered a line with one */ +/* empty field. Returns empty (NULL) when done. */ +/*---------------------------------------------------------------------------*/ +static GList * +parse_line (FILE *fp, + gchar delim ) +{ + GList *list = NULL; + GString *string; + gint c; + enum { BEGIN, NORMAL, QUOTED, QUOTED_QUOTE1, + NORMAL_ESCAPED, QUOTED_ESCAPED, DONE } state; + + state = BEGIN; + string = g_string_new( "" ); + while ( state != DONE ) { + c=getc (fp); + + switch (state) { + + case BEGIN: + if ( c == delim ) + { + /* first field is empty. */ + list = g_list_append (list, g_strdup ("")); + state = NORMAL; + break; + } + switch (c) { + case '"': + string = g_string_append_c (string, c); + state = QUOTED; + break; + case '\\': + string = g_string_append_c (string, c); + state = NORMAL_ESCAPED; + break; + case '\n': + /* treat as one empty field. */ + list = g_list_append (list, g_strdup ("")); + state = DONE; + break; + case EOF: + /* end of file, no more lines. */ + state = DONE; + break; + default: + string = g_string_append_c (string, c); + state = NORMAL; + break; + } + break; + + case NORMAL: + if ( c == delim ) + { + list = g_list_append (list, parse_field (string->str)); + string = g_string_assign( string, "" ); + state = NORMAL; + break; + } + switch (c) { + case '"': + string = g_string_append_c (string, c); + state = QUOTED; + break; + case '\\': + string = g_string_append_c (string, c); + state = NORMAL_ESCAPED; + break; + case '\n': + case EOF: + list = g_list_append (list, parse_field (string->str)); + state = DONE; + break; + default: + string = g_string_append_c (string, c); + state = NORMAL; + break; + } + break; + + case QUOTED: + switch (c) { + case '"': + string = g_string_append_c (string, c); + state = QUOTED_QUOTE1; + break; + case '\\': + string = g_string_append_c (string, c); + state = QUOTED_ESCAPED; + break; + case EOF: + /* File ended mid way through quoted item */ + list = g_list_append (list, parse_field (string->str)); + state = DONE; + break; + default: + string = g_string_append_c (string, c); + break; + } + break; + + case QUOTED_QUOTE1: + if ( c == delim ) + { + list = g_list_append (list, parse_field (string->str)); + string = g_string_assign( string, "" ); + state = NORMAL; + break; + } + switch (c) { + case '"': + /* insert quotes in string, stay quoted. */ + string = g_string_append_c (string, c); + state = QUOTED; + break; + case '\n': + case EOF: + /* line or file ended after quoted item */ + list = g_list_append (list, parse_field (string->str)); + state = DONE; + break; + default: + string = g_string_append_c (string, c); + state = NORMAL; + break; + } + break; + + case NORMAL_ESCAPED: + switch (c) { + case EOF: + /* File ended mid way through quoted item */ + list = g_list_append (list, parse_field (string->str)); + state = DONE; + break; + default: + string = g_string_append_c (string, c); + state = NORMAL; + break; + } + break; + + case QUOTED_ESCAPED: + switch (c) { + case EOF: + /* File ended mid way through quoted item */ + list = g_list_append (list, parse_field (string->str)); + state = DONE; + break; + default: + string = g_string_append_c (string, c); + state = QUOTED; + break; + } + break; + + default: + g_assert_not_reached(); + break; + } + + } + g_string_free( string, TRUE ); + + return list; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Parse field. */ +/* */ +/* - Strip leading and trailing white space, unless quoted. */ +/* - Strip CR, unless escaped. */ +/* - Expand '\n' and '\t' into newline and tab characters. */ +/* - Remove quotes, unless escaped (\" anywhere or "" within quotes) */ +/*---------------------------------------------------------------------------*/ +static gchar * +parse_field (gchar *raw_field) +{ + GString *string; + gchar *pass1_field, *c, *field; + enum { NORMAL, NORMAL_ESCAPED, QUOTED, QUOTED_ESCAPED, QUOTED_QUOTE1} state; + + + /* + * Pass 1: remove leading and trailing spaces. + */ + pass1_field = g_strdup (raw_field); + g_strstrip (pass1_field); + + /* + * Pass 2: resolve quoting and escaping. + */ + state = NORMAL; + string = g_string_new( "" ); + for ( c=pass1_field; *c != 0; c++ ) + { + switch (state) { + + case NORMAL: + switch (*c) { + case '\\': + state = NORMAL_ESCAPED; + break; + case '"': + state = QUOTED; + break; + case '\r': + /* Strip CR. */ + break; + default: + string = g_string_append_c (string, *c); + 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; + 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; + 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; + 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 QUOTED. */ + state = QUOTED; + break; + default: + string = g_string_append_c (string, *c); + state = NORMAL; + break; + } + break; + + default: + g_assert_not_reached(); + break; + } + + } + + field = g_strdup (string->str); + g_string_free( string, TRUE ); + g_free (pass1_field); + + return field; +} + + +/*---------------------------------------------------------------------------*/ +/* 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; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge-text.h b/src/merge-text.h new file mode 100644 index 00000000..9a1abbb7 --- /dev/null +++ b/src/merge-text.h @@ -0,0 +1,76 @@ +/* + * merge-text.h + * Copyright (C) 2002-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MERGE_TEXT_H__ +#define __MERGE_TEXT_H__ + +#include "merge.h" + +G_BEGIN_DECLS + +/* The following object arguments are available: + * + * name type description + * --------------------------------------------------------------------------- + * delim gchar Field delimiter. + * + */ + +#define GL_TYPE_MERGE_TEXT (gl_merge_text_get_type ()) +#define GL_MERGE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE_TEXT, glMergeText)) +#define GL_MERGE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_TEXT, glMergeTextClass)) +#define GL_IS_MERGE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE_TEXT)) +#define GL_IS_MERGE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_TEXT)) +#define GL_MERGE_TEXT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_MERGE_TEXT, glMergeTextClass)) + + +typedef struct _glMergeText glMergeText; +typedef struct _glMergeTextClass glMergeTextClass; + +typedef struct _glMergeTextPrivate glMergeTextPrivate; + + +struct _glMergeText { + glMerge object; + + glMergeTextPrivate *priv; +}; + +struct _glMergeTextClass { + glMergeClass parent_class; +}; + + +GType gl_merge_text_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge-vcard.c b/src/merge-vcard.c new file mode 100644 index 00000000..69d205dd --- /dev/null +++ b/src/merge-vcard.c @@ -0,0 +1,401 @@ +/* + * merge-vcard.c + * Copyright (C) 2001-2009 Jim Evins . + * and + * Copyright (C) 2005 Austin Henry + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#ifdef HAVE_LIBEBOOK + + +#include "merge-vcard.h" + +#include +#include +#include +#include + +#include "debug.h" + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glMergeVCardPrivate { + FILE *fp; +}; + +enum { + LAST_SIGNAL +}; + +enum { + ARG_0, +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_merge_vcard_finalize (GObject *object); + +static void gl_merge_vcard_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); + +static void gl_merge_vcard_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); + +static GList *gl_merge_vcard_get_key_list (glMerge *merge); +static gchar *gl_merge_vcard_get_primary_key (glMerge *merge); +static void gl_merge_vcard_open (glMerge *merge); +static void gl_merge_vcard_close (glMerge *merge); +static glMergeRecord *gl_merge_vcard_get_record (glMerge *merge); +static void gl_merge_vcard_copy (glMerge *dst_merge, + glMerge *src_merge); +static char * parse_next_vcard (FILE *fp); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glMergeVCard, gl_merge_vcard, GL_TYPE_MERGE); + + +static void +gl_merge_vcard_class_init (glMergeVCardClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glMergeClass *merge_class = GL_MERGE_CLASS (class); + + gl_debug (DEBUG_MERGE, "START"); + + gl_merge_vcard_parent_class = g_type_class_peek_parent (class); + + object_class->set_property = gl_merge_vcard_set_property; + object_class->get_property = gl_merge_vcard_get_property; + + object_class->finalize = gl_merge_vcard_finalize; + + merge_class->get_key_list = gl_merge_vcard_get_key_list; + merge_class->get_primary_key = gl_merge_vcard_get_primary_key; + merge_class->open = gl_merge_vcard_open; + merge_class->close = gl_merge_vcard_close; + merge_class->get_record = gl_merge_vcard_get_record; + merge_class->copy = gl_merge_vcard_copy; + + gl_debug (DEBUG_MERGE, "END"); +} + + +static void +gl_merge_vcard_init (glMergeVCard *merge_vcard) +{ + gl_debug (DEBUG_MERGE, "START"); + + merge_vcard->priv = g_new0 (glMergeVCardPrivate, 1); + + gl_debug (DEBUG_MERGE, "END"); +} + + +static void +gl_merge_vcard_finalize (GObject *object) +{ + glMergeVCard *merge_vcard = GL_MERGE_VCARD (object); + + gl_debug (DEBUG_MERGE, "START"); + + g_return_if_fail (object && GL_IS_MERGE_VCARD (object)); + + g_free (merge_vcard->priv); + + G_OBJECT_CLASS (gl_merge_vcard_parent_class)->finalize (object); + + gl_debug (DEBUG_MERGE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Set argument. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_vcard_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec) +{ + glMergeVCard *merge_vcard; + + merge_vcard = GL_MERGE_VCARD (object); + + switch (param_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } +} + + +/*--------------------------------------------------------------------------*/ +/* Get argument. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_vcard_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + glMergeVCard *merge_vcard; + + merge_vcard = GL_MERGE_VCARD (object); + + switch (param_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); + break; + } + +} + + +/*--------------------------------------------------------------------------*/ +/* Get key list. */ +/*--------------------------------------------------------------------------*/ +static GList * +gl_merge_vcard_get_key_list (glMerge *merge) +{ + glMergeVCard *merge_vcard; + GList *key_list; + + gl_debug (DEBUG_MERGE, "BEGIN"); + + merge_vcard = GL_MERGE_VCARD (merge); + + /* extremely simple approach until I can list the available keys from the + * server, and return them. */ + key_list = NULL; + key_list = g_list_append (key_list, g_strdup ("full_name")); + key_list = g_list_append (key_list, g_strdup ("home_address")); + key_list = g_list_append (key_list, g_strdup ("work_address")); + + gl_debug (DEBUG_MERGE, "END"); + + return key_list; +} + + +/*--------------------------------------------------------------------------*/ +/* Get "primary" key. */ +/*--------------------------------------------------------------------------*/ +static gchar * +gl_merge_vcard_get_primary_key (glMerge *merge) +{ + /* For now, let's always assume the full name is the primary key. */ + return g_strdup ("full_name"); +} + + +/*--------------------------------------------------------------------------*/ +/* Open merge source. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_vcard_open (glMerge *merge) +{ + glMergeVCard *merge_vcard; + gchar *src; + + merge_vcard = GL_MERGE_VCARD (merge); + + src = gl_merge_get_src (merge); + + if (src != NULL) { + merge_vcard->priv->fp = fopen (src, "r"); + } + + g_free (src); + + return; +} + + +/*--------------------------------------------------------------------------*/ +/* Close merge source. */ +/*--------------------------------------------------------------------------*/ +static void +gl_merge_vcard_close (glMerge *merge) +{ + glMergeVCard *merge_vcard; + + merge_vcard = GL_MERGE_VCARD (merge); + + if (merge_vcard->priv->fp != NULL) { + fclose (merge_vcard->priv->fp); + merge_vcard->priv->fp = NULL; + } +} + + +/*--------------------------------------------------------------------------*/ +/* Get next record from merge source, NULL if no records left (i.e EOF) */ +/*--------------------------------------------------------------------------*/ +static glMergeRecord * +gl_merge_vcard_get_record (glMerge *merge) +{ + glMergeVCard *merge_vcard; + glMergeRecord *record; + glMergeField *field; + + char *vcard; + EContact *contact; + + merge_vcard = GL_MERGE_VCARD (merge); + + vcard = parse_next_vcard(merge_vcard->priv->fp); + if (vcard == NULL || vcard[0] == '\0') { + return NULL; /* EOF */ + } + contact = e_contact_new_from_vcard(vcard); + if (contact == NULL) { + return NULL; /* invalid vcard */ + } + + record = g_new0 (glMergeRecord, 1); + record->select_flag = TRUE; + + /* Take the interesting fields one by one from the contact, and put them + * into the glMergeRecord structure. When done, free up the resources for + * that contact */ + + /* get the full name */ + field = g_new0 (glMergeField, 1); + field->key = g_strdup ("full_name"); + field->value = g_strdup (e_contact_get_const(contact, E_CONTACT_FULL_NAME)); + + record->field_list = g_list_append (record->field_list, field); + + /* get the home address */ + field = g_new0 (glMergeField, 1); + field->key = g_strdup ("home_address"); + field->value = g_strdup (e_contact_get_const(contact, E_CONTACT_ADDRESS_LABEL_HOME)); + + record->field_list = g_list_append (record->field_list, field); + + /* get the work address */ + field = g_new0 (glMergeField, 1); + field->key = g_strdup ("work_address"); + field->value = g_strdup (e_contact_get_const(contact, E_CONTACT_ADDRESS_LABEL_WORK)); + + record->field_list = g_list_append (record->field_list, field); + + /* free the contact */ + g_object_unref (contact); + g_free(vcard); + + return record; +} + + +/*---------------------------------------------------------------------------*/ +/* Copy merge_vcard specific fields. */ +/*---------------------------------------------------------------------------*/ +static void +gl_merge_vcard_copy (glMerge *dst_merge, + glMerge *src_merge) +{ + glMergeVCard *dst_merge_vcard; + glMergeVCard *src_merge_vcard; + + dst_merge_vcard = GL_MERGE_VCARD (dst_merge); + src_merge_vcard = GL_MERGE_VCARD (src_merge); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE: pull out a full VCard from the open file */ +/* Arguments: */ +/* fp - an open stream to parse in put from */ +/* Returns: */ +/* a pointer to the buffer containing the vcard, the empty string on */ +/* end-of-file or error, this buffer needs to be free by the caller */ +/*---------------------------------------------------------------------------*/ +static char * +parse_next_vcard (FILE *fp) +{ + gboolean found_begin = FALSE; + gboolean found_end = FALSE; + char *vcard; + char line[512]; + int size = 2048; + int cursize = 0; + + /* if no source has been set up, don't try to read from the file */ + if (!fp) { + return NULL; + } + + vcard = g_malloc0(size); + + while (fgets(line, sizeof(line), fp) && found_end == FALSE) { + if (found_begin == TRUE) { + if (g_str_has_prefix(line, "END:VCARD")) { found_end = TRUE; } + } else { + if (g_str_has_prefix(line, "BEGIN:VCARD")) { found_begin = TRUE; } + else { continue; }/* skip lines not in a vcard */ + } + + /* if the buffer passed us isn't big enough, reallocate it */ + cursize += strlen(line); + if (cursize >= size) { + size *= 2; + vcard = (char *)g_realloc(vcard, size); /* aborts program on error */ + } + + /* add the line (or portion thereof) to the vcard */ + strncat(vcard, line, size); + } + + return vcard; +} + + + +#endif /* HAVE_LIBEBOOK */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge-vcard.h b/src/merge-vcard.h new file mode 100644 index 00000000..41a64ea5 --- /dev/null +++ b/src/merge-vcard.h @@ -0,0 +1,78 @@ +/* + * merge-vcard.h + * Copyright (C) 2001-2009 Jim Evins . + * and + * Copyright (C) 2005 Austin Henry + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MERGE_VCARD_H__ +#define __MERGE_VCARD_H__ + +#include "merge.h" + +G_BEGIN_DECLS + +/* The following object arguments are available: + * + * name type description + * --------------------------------------------------------------------------- + * + */ + +#define GL_TYPE_MERGE_VCARD (gl_merge_vcard_get_type ()) +#define GL_MERGE_VCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE_VCARD, glMergeVCard)) +#define GL_MERGE_VCARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE_VCARD, glMergeVCardClass)) +#define GL_IS_MERGE_VCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE_VCARD)) +#define GL_IS_MERGE_VCARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE_VCARD)) +#define GL_MERGE_VCARD_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_MERGE_VCARD, glMergeVCardClass)) + + +typedef struct _glMergeVCard glMergeVCard; +typedef struct _glMergeVCardClass glMergeVCardClass; + +typedef struct _glMergeVCardPrivate glMergeVCardPrivate; + + +struct _glMergeVCard { + glMerge object; + + glMergeVCardPrivate *priv; +}; + +struct _glMergeVCardClass { + glMergeClass parent_class; +}; + + +GType gl_merge_vcard_get_type (void) G_GNUC_CONST; + +G_END_DECLS + + +#endif /* __MERGE_VCARD_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge.c b/src/merge.c new file mode 100644 index 00000000..56e14813 --- /dev/null +++ b/src/merge.c @@ -0,0 +1,799 @@ +/* + * merge.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "merge.h" + +#include +#include +#include + +#include + +#include "debug.h" + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glMergePrivate { + gchar *name; + gchar *description; + gchar *src; + glMergeSrcType src_type; + + GList *record_list; +}; + +enum { + LAST_SIGNAL +}; + +typedef struct { + + GType type; + gchar *name; + gchar *description; + glMergeSrcType src_type; + + guint n_params; + GParameter *params; + +} Backend; + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static GList *backends = NULL; + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_merge_finalize (GObject *object); + +static void merge_open (glMerge *merge); + +static void merge_close (glMerge *merge); + +static glMergeRecord *merge_get_record (glMerge *merge); + +static void merge_free_record (glMergeRecord **record); + +static glMergeRecord *merge_dup_record (glMergeRecord *record); + +static void merge_free_record_list (GList **record_list); + +static GList *merge_dup_record_list (GList *record_list); + + + + +/*****************************************************************************/ +/* Register a new merge backend. */ +/*****************************************************************************/ +void +gl_merge_register_backend (GType type, + gchar *name, + gchar *description, + glMergeSrcType src_type, + const gchar *first_arg_name, + ...) +{ + Backend *backend; + va_list args; + const gchar *pname; + GObjectClass *class; + GParamSpec *pspec; + GParameter *params; + guint n_params = 0, n_alloced_params = 16; + + backend = g_new0 (Backend, 1); + + backend->type = type; + backend->name = g_strdup (name); + backend->description = g_strdup (description); + backend->src_type = src_type; + + params = g_new (GParameter, n_alloced_params); + va_start (args, first_arg_name); + for ( pname=first_arg_name; pname != NULL; pname=va_arg (args,gchar *) ) { + gchar *error = NULL; + + class = g_type_class_ref (type); + if (class == NULL) { + g_message ("%s: unknown object type %d", + G_STRLOC, (int)type); + break; + } + pspec = g_object_class_find_property (class, pname); + if (pspec == NULL) { + g_message ("%s: object class `%s' has no property named `%s'", + G_STRLOC, g_type_name (type), pname); + break; + } + if (n_params >= n_alloced_params) { + n_alloced_params += 16; + params = g_renew (GParameter, params, n_alloced_params); + } + params[n_params].name = pname; + params[n_params].value.g_type = 0; + g_value_init (¶ms[n_params].value, pspec->value_type); + G_VALUE_COLLECT (¶ms[n_params].value, args, 0, &error); + if (error) { + g_message ("%s: %s", G_STRLOC, error); + g_free (error); + break; + } + + n_params++; + } + va_end (args); + + backend->n_params = n_params; + backend->params = params; + + backends = g_list_append (backends, backend); + +} + +/*****************************************************************************/ +/* Get list of registered backend descriptions. */ +/*****************************************************************************/ +GList * +gl_merge_get_descriptions (void) +{ + GList *descriptions = NULL; + GList *p; + Backend *backend; + + descriptions = g_list_append (descriptions, g_strdup(_("None"))); + + for ( p=backends; p!=NULL; p=p->next) { + backend = (Backend *)p->data; + descriptions = g_list_append (descriptions, + g_strdup(backend->description)); + } + + return descriptions; +} + +/*****************************************************************************/ +/* Free list of descriptions. */ +/*****************************************************************************/ +void +gl_merge_free_descriptions (GList **descriptions) +{ + GList *p; + + gl_debug (DEBUG_MERGE, "START"); + + for (p = *descriptions; p != NULL; p = p->next) { + g_free (p->data); + p->data = NULL; + } + + g_list_free (*descriptions); + *descriptions = NULL; + + gl_debug (DEBUG_MERGE, "END"); +} + +/*****************************************************************************/ +/* Lookup name of backend from description. */ +/*****************************************************************************/ +gchar * +gl_merge_description_to_name (gchar *description) +{ + GList *p; + Backend *backend; + + if (lgl_str_utf8_casecmp(description, _("None")) == 0) { + return g_strdup("None"); + } + + for ( p=backends; p!=NULL; p=p->next) { + backend = (Backend *)p->data; + if (lgl_str_utf8_casecmp(description, backend->description) == 0) { + return g_strdup(backend->name); + } + } + + return g_strdup("None"); +} + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glMerge, gl_merge, G_TYPE_OBJECT); + +static void +gl_merge_class_init (glMergeClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_MERGE, "START"); + + gl_merge_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_merge_finalize; + + gl_debug (DEBUG_MERGE, "END"); +} + +static void +gl_merge_init (glMerge *merge) +{ + gl_debug (DEBUG_MERGE, "START"); + + merge->priv = g_new0 (glMergePrivate, 1); + + gl_debug (DEBUG_MERGE, "END"); +} + +static void +gl_merge_finalize (GObject *object) +{ + glMerge *merge = GL_MERGE (object); + + gl_debug (DEBUG_MERGE, "START"); + + g_return_if_fail (object && GL_IS_MERGE (object)); + + merge_free_record_list (&merge->priv->record_list); + g_free (merge->priv->name); + g_free (merge->priv->description); + g_free (merge->priv->src); + g_free (merge->priv); + + G_OBJECT_CLASS (gl_merge_parent_class)->finalize (object); + + gl_debug (DEBUG_MERGE, "END"); +} + +/*****************************************************************************/ +/* New merge object. */ +/*****************************************************************************/ +glMerge * +gl_merge_new (gchar *name) +{ + glMerge *merge = NULL; + GList *p; + Backend *backend; + + gl_debug (DEBUG_MERGE, "START"); + + for (p=backends; p!=NULL; p=p->next) { + backend = (Backend *)p->data; + + if (g_strcasecmp(name, backend->name) == 0) { + + merge = GL_MERGE (g_object_newv (backend->type, + backend->n_params, + backend->params)); + + merge->priv->name = g_strdup (name); + merge->priv->description = g_strdup (backend->description); + merge->priv->src_type = backend->src_type; + + break; + } + } + + if ( (merge == NULL) && (g_strcasecmp (name, "None") != 0)) { + g_message ("Unknown merge backend \"%s\"", name); + } + + gl_debug (DEBUG_MERGE, "END"); + + return merge; +} + +/*****************************************************************************/ +/* Duplicate merge. */ +/*****************************************************************************/ +glMerge * +gl_merge_dup (glMerge *src_merge) +{ + glMerge *dst_merge; + + gl_debug (DEBUG_MERGE, "START"); + + if (src_merge == NULL) { + gl_debug (DEBUG_MERGE, "END (NULL)"); + return NULL; + } + + g_return_val_if_fail (GL_IS_MERGE (src_merge), NULL); + + dst_merge = g_object_new (G_OBJECT_TYPE(src_merge), NULL); + dst_merge->priv->name = g_strdup (src_merge->priv->name); + dst_merge->priv->description = g_strdup (src_merge->priv->description); + dst_merge->priv->src = g_strdup (src_merge->priv->src); + dst_merge->priv->src_type = src_merge->priv->src_type; + dst_merge->priv->record_list + = merge_dup_record_list (src_merge->priv->record_list); + + if ( GL_MERGE_GET_CLASS(src_merge)->copy != NULL ) { + + /* We have an object specific method, use it */ + GL_MERGE_GET_CLASS(src_merge)->copy (dst_merge, src_merge); + + } + + gl_debug (DEBUG_MERGE, "END"); + + return dst_merge; +} + +/*****************************************************************************/ +/* Get name of merge. */ +/*****************************************************************************/ +gchar * +gl_merge_get_name (glMerge *merge) +{ + gl_debug (DEBUG_MERGE, ""); + + if (merge == NULL) { + return g_strdup("None"); + } + + g_return_val_if_fail (GL_IS_MERGE (merge), g_strdup("None")); + + return g_strdup(merge->priv->name); +} + +/*****************************************************************************/ +/* Get description of merge. */ +/*****************************************************************************/ +gchar * +gl_merge_get_description (glMerge *merge) +{ + gl_debug (DEBUG_MERGE, ""); + + if (merge == NULL) { + return g_strdup(_("None")); + } + + g_return_val_if_fail (GL_IS_MERGE (merge), g_strdup(_("None"))); + + return g_strdup(merge->priv->description); +} + +/*****************************************************************************/ +/* Get source type of merge. */ +/*****************************************************************************/ +glMergeSrcType +gl_merge_get_src_type (glMerge *merge) +{ + gl_debug (DEBUG_MERGE, ""); + + if (merge == NULL) { + return GL_MERGE_SRC_IS_FIXED; + } + + g_return_val_if_fail (GL_IS_MERGE (merge), GL_MERGE_SRC_IS_FIXED); + + return merge->priv->src_type; +} + +/*****************************************************************************/ +/* Set src of merge. */ +/*****************************************************************************/ +void +gl_merge_set_src (glMerge *merge, + gchar *src) +{ + GList *record_list = NULL; + glMergeRecord *record; + + gl_debug (DEBUG_MERGE, "START"); + + if (merge == NULL) + { + gl_debug (DEBUG_MERGE, "END (NULL)"); + return; + } + + g_return_if_fail (GL_IS_MERGE (merge)); + + if ( src == NULL) + { + + if ( merge->priv->src != NULL ) + { + g_free (merge->priv->src); + } + merge->priv->src = NULL; + merge_free_record_list (&merge->priv->record_list); + + } + else + { + + if ( merge->priv->src != NULL ) + { + g_free(merge->priv->src); + } + merge->priv->src = g_strdup (src); + + merge_free_record_list (&merge->priv->record_list); + + merge_open (merge); + while ( (record = merge_get_record (merge)) != NULL ) + { + record_list = g_list_append( record_list, record ); + } + merge_close (merge); + merge->priv->record_list = record_list; + + } + + + gl_debug (DEBUG_MERGE, "END"); +} + +/*****************************************************************************/ +/* Get src of merge. */ +/*****************************************************************************/ +gchar * +gl_merge_get_src (glMerge *merge) +{ + gl_debug (DEBUG_MERGE, ""); + + if (merge == NULL) { + return NULL; + } + + g_return_val_if_fail (GL_IS_MERGE (merge), NULL); + + return g_strdup(merge->priv->src); +} + +/*****************************************************************************/ +/* Get Key List. */ +/*****************************************************************************/ +GList * +gl_merge_get_key_list (glMerge *merge) +{ + GList *key_list = NULL; + + gl_debug (DEBUG_MERGE, "START"); + + if (merge == NULL) { + return NULL; + } + + g_return_val_if_fail (GL_IS_MERGE (merge), NULL); + + if ( GL_MERGE_GET_CLASS(merge)->get_key_list != NULL ) { + + key_list = GL_MERGE_GET_CLASS(merge)->get_key_list (merge); + + } + + gl_debug (DEBUG_MERGE, "END"); + + return key_list; +} + +/*****************************************************************************/ +/* Free a list of keys. */ +/*****************************************************************************/ +void +gl_merge_free_key_list (GList **key_list) +{ + GList *p; + + gl_debug (DEBUG_MERGE, "START"); + + for (p = *key_list; p != NULL; p = p->next) { + g_free (p->data); + p->data = NULL; + } + + g_list_free (*key_list); + *key_list = NULL; + + gl_debug (DEBUG_MERGE, "END"); +} + +/*****************************************************************************/ +/* Get Key List. */ +/*****************************************************************************/ +gchar * +gl_merge_get_primary_key (glMerge *merge) +{ + gchar *key = NULL; + + gl_debug (DEBUG_MERGE, "START"); + + if (merge == NULL) { + return NULL; + } + + g_return_val_if_fail (GL_IS_MERGE (merge), NULL); + + if ( GL_MERGE_GET_CLASS(merge)->get_primary_key != NULL ) { + + key = GL_MERGE_GET_CLASS(merge)->get_primary_key (merge); + + } + + gl_debug (DEBUG_MERGE, "END"); + + return key; +} + +/*---------------------------------------------------------------------------*/ +/* Open merge source. */ +/*---------------------------------------------------------------------------*/ +static void +merge_open (glMerge *merge) +{ + gl_debug (DEBUG_MERGE, "START"); + + g_return_if_fail (merge && GL_IS_MERGE (merge)); + + if ( GL_MERGE_GET_CLASS(merge)->open != NULL ) { + + GL_MERGE_GET_CLASS(merge)->open (merge); + + } + + gl_debug (DEBUG_MERGE, "END"); +} + +/*---------------------------------------------------------------------------*/ +/* Close merge source. */ +/*---------------------------------------------------------------------------*/ +static void +merge_close (glMerge *merge) +{ + gl_debug (DEBUG_MERGE, "START"); + + g_return_if_fail (merge && GL_IS_MERGE (merge)); + + if ( GL_MERGE_GET_CLASS(merge)->close != NULL ) { + + GL_MERGE_GET_CLASS(merge)->close (merge); + + } + + gl_debug (DEBUG_MERGE, "END"); +} + +/*---------------------------------------------------------------------------*/ +/* Get next record (list of fields) from opened merge source. */ +/*---------------------------------------------------------------------------*/ +static glMergeRecord * +merge_get_record (glMerge *merge) +{ + glMergeRecord *record = NULL; + + gl_debug (DEBUG_MERGE, "START"); + + g_return_val_if_fail (merge && GL_IS_MERGE (merge), NULL); + + if ( GL_MERGE_GET_CLASS(merge)->get_record != NULL ) { + + record = GL_MERGE_GET_CLASS(merge)->get_record (merge); + + } + + gl_debug (DEBUG_MERGE, "END"); + + return record; +} + +/*---------------------------------------------------------------------------*/ +/* Free a merge record (list of fields) */ +/*---------------------------------------------------------------------------*/ +static void +merge_free_record (glMergeRecord **record) +{ + GList *p; + glMergeField *field; + + gl_debug (DEBUG_MERGE, "START"); + + 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; + + gl_debug (DEBUG_MERGE, "END"); +} + +/*---------------------------------------------------------------------------*/ +/* Duplicate a merge record (list of fields) */ +/*---------------------------------------------------------------------------*/ +static glMergeRecord * +merge_dup_record (glMergeRecord *record) +{ + glMergeRecord *dest_record; + GList *p; + glMergeField *dest_field, *field; + + gl_debug (DEBUG_MERGE, "START"); + + dest_record = g_new0 (glMergeRecord, 1); + dest_record->select_flag = record->select_flag; + + for (p = record->field_list; p != NULL; p = p->next) { + field = (glMergeField *) p->data; + + dest_field = g_new0 (glMergeField, 1); + + dest_field->key = g_strdup (field->key); + dest_field->value = g_strdup (field->value); + + dest_record->field_list = + g_list_append (dest_record->field_list, dest_field); + + } + + gl_debug (DEBUG_MERGE, "END"); + + return dest_record; +} + +/*****************************************************************************/ +/* Find key in given record and evaluate. */ +/*****************************************************************************/ +gchar * +gl_merge_eval_key (glMergeRecord *record, + gchar *key) + +{ + GList *p; + glMergeField *field; + gchar *val = NULL; + + gl_debug (DEBUG_MERGE, "START"); + + if ( (record != NULL) ) { + for (p = record->field_list; p != NULL; p = p->next) { + field = (glMergeField *) p->data; + + if (strcmp (key, field->key) == 0) { + val = g_strdup (field->value); + } + + } + } + + gl_debug (DEBUG_MERGE, "END"); + + return val; +} + +/*****************************************************************************/ +/* Read all records from merge source. */ +/*****************************************************************************/ +const GList * +gl_merge_get_record_list (glMerge *merge) +{ + gl_debug (DEBUG_MERGE, ""); + + if ( merge != NULL ) { + return merge->priv->record_list; + } else { + return NULL; + } +} + +/*---------------------------------------------------------------------------*/ +/* Free a list of records. */ +/*---------------------------------------------------------------------------*/ +static void +merge_free_record_list (GList **record_list) +{ + GList *p; + glMergeRecord *record; + + gl_debug (DEBUG_MERGE, "START"); + + for (p = *record_list; p != NULL; p = p->next) { + record = (glMergeRecord *) p->data; + + merge_free_record( &record ); + + } + + g_list_free (*record_list); + *record_list = NULL; + + gl_debug (DEBUG_MERGE, "END"); +} + +/*---------------------------------------------------------------------------*/ +/* Duplicate a list of records. */ +/*---------------------------------------------------------------------------*/ +static GList * +merge_dup_record_list (GList *record_list) +{ + GList *dest_list = NULL, *p; + glMergeRecord *dest_record, *record; + + gl_debug (DEBUG_MERGE, "START"); + + for (p = record_list; p != NULL; p = p->next) { + record = (glMergeRecord *) p->data; + + dest_record = merge_dup_record( record ); + dest_list = g_list_append (dest_list, dest_record); + } + + + gl_debug (DEBUG_MERGE, "END"); + + return dest_list; +} + +/*****************************************************************************/ +/* Count selected records. */ +/*****************************************************************************/ +gint +gl_merge_get_record_count (glMerge *merge) +{ + GList *p; + glMergeRecord *record; + gint count; + + gl_debug (DEBUG_MERGE, "START"); + + count = 0; + for ( p=merge->priv->record_list; p!=NULL; p=p->next ) { + record = (glMergeRecord *)p->data; + + if ( record->select_flag ) count ++; + } + + gl_debug (DEBUG_MERGE, "END"); + + return count; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/merge.h b/src/merge.h new file mode 100644 index 00000000..9456ca92 --- /dev/null +++ b/src/merge.h @@ -0,0 +1,138 @@ +/* + * merge.h + * Copyright (C) 2002-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MERGE_H__ +#define __MERGE_H__ + +#include + +G_BEGIN_DECLS + +typedef enum { + GL_MERGE_SRC_IS_FIXED, + GL_MERGE_SRC_IS_FILE, +} glMergeSrcType; + +typedef struct { + gchar *key; + gchar *value; +} glMergeField; + +typedef struct { + gboolean select_flag; + GList *field_list; /* List of glMergeFields */ +} glMergeRecord; + + +#define GL_TYPE_MERGE (gl_merge_get_type ()) +#define GL_MERGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE, glMerge)) +#define GL_MERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE, glMergeClass)) +#define GL_IS_MERGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE)) +#define GL_IS_MERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE)) +#define GL_MERGE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_MERGE, glMergeClass)) + + +typedef struct _glMerge glMerge; +typedef struct _glMergeClass glMergeClass; + +typedef struct _glMergePrivate glMergePrivate; + + +struct _glMerge { + GObject object; + + glMergePrivate *priv; +}; + +struct _glMergeClass { + GObjectClass parent_class; + + GList *(*get_key_list) (glMerge *merge); + + gchar *(*get_primary_key) (glMerge *merge); + + void (*open) (glMerge *merge); + + void (*close) (glMerge *merge); + + glMergeRecord *(*get_record) (glMerge *merge); + + void (*copy) (glMerge *dst_merge, + glMerge *src_merge); +}; + + +void gl_merge_register_backend (GType type, + gchar *name, + gchar *description, + glMergeSrcType src_type, + const gchar *first_arg_name, + ...); + +GList *gl_merge_get_descriptions (void); + +void gl_merge_free_descriptions (GList **descriptions); + +gchar *gl_merge_description_to_name (gchar *description); + +GType gl_merge_get_type (void) G_GNUC_CONST; + +glMerge *gl_merge_new (gchar *name); + +glMerge *gl_merge_dup (glMerge *orig); + +gchar *gl_merge_get_name (glMerge *merge); + +gchar *gl_merge_get_description (glMerge *merge); + +glMergeSrcType gl_merge_get_src_type (glMerge *merge); + +void gl_merge_set_src (glMerge *merge, + gchar *src); + +gchar *gl_merge_get_src (glMerge *merge); + +GList *gl_merge_get_key_list (glMerge *merge); + +void gl_merge_free_key_list (GList **keys); + +gchar *gl_merge_get_primary_key (glMerge *merge); + +gchar *gl_merge_eval_key (glMergeRecord *record, + gchar *key); + +const GList *gl_merge_get_record_list (glMerge *merge); + +gint gl_merge_get_record_count (glMerge *merge); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/mini-label-preview.c b/src/mini-label-preview.c new file mode 100644 index 00000000..e58986fd --- /dev/null +++ b/src/mini-label-preview.c @@ -0,0 +1,315 @@ +/* + * mini-label-preview.c + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "mini-label-preview.h" + +#include +#include "cairo-label-path.h" +#include "color.h" +#include "marshal.h" + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + +#define MARGIN 2 +#define SHADOW_OFFSET 3 + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glMiniLabelPreviewPrivate { + + lglTemplate *template; + gboolean rotate_flag; +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_mini_label_preview_finalize (GObject *object); + +static void style_set_cb (GtkWidget *widget, + GtkStyle *previous_style); + +static void redraw (glMiniLabelPreview *this); + +static gboolean expose_event_cb (GtkWidget *widget, + GdkEventExpose *event); + +static void draw_preview (glMiniLabelPreview *this, + cairo_t *cr); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glMiniLabelPreview, gl_mini_label_preview, GTK_TYPE_DRAWING_AREA); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_mini_label_preview_class_init (glMiniLabelPreviewClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); + + gl_mini_label_preview_parent_class = g_type_class_peek_parent (class); + + gobject_class->finalize = gl_mini_label_preview_finalize; + + widget_class->expose_event = expose_event_cb; + widget_class->style_set = style_set_cb; +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_mini_label_preview_init (glMiniLabelPreview *this) +{ + GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW); + + this->priv = g_new0 (glMiniLabelPreviewPrivate, 1); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_mini_label_preview_finalize (GObject *object) +{ + glMiniLabelPreview *this = GL_MINI_LABEL_PREVIEW (object); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_MINI_LABEL_PREVIEW (object)); + + lgl_template_free (this->priv->template); + g_free (this->priv); + + G_OBJECT_CLASS (gl_mini_label_preview_parent_class)->finalize (object); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_mini_label_preview_new (gint w, + gint h) +{ + glMiniLabelPreview *this; + + this = g_object_new (GL_TYPE_MINI_LABEL_PREVIEW, NULL); + + gtk_widget_set_size_request (GTK_WIDGET (this), w, h); + + return GTK_WIDGET (this); +} + + +/*****************************************************************************/ +/* Set label by name. */ +/*****************************************************************************/ +void +gl_mini_label_preview_set_by_name (glMiniLabelPreview *this, + gchar *name, + gboolean rotate_flag) +{ + if (!name) + { + lgl_template_free (this->priv->template); + this->priv->template = NULL; + } + else + { + this->priv->template = lgl_db_lookup_template_from_name (name); + this->priv->rotate_flag = rotate_flag; + } + + redraw (this); +} + + +/*--------------------------------------------------------------------------*/ +/* Style set handler (updates colors when style/theme changes). */ +/*--------------------------------------------------------------------------*/ +static void +style_set_cb (GtkWidget *widget, + GtkStyle *previous_style) +{ + redraw (GL_MINI_LABEL_PREVIEW (widget)); +} + + +/*****************************************************************************/ +/* Request redraw. */ +/*****************************************************************************/ +static void +redraw (glMiniLabelPreview *this) +{ + GdkRegion *region; + + if (GTK_WIDGET_REALIZED (GTK_WIDGET (this))) + { + /* redraw the cairo canvas forcing an expose event */ + region = gdk_drawable_get_clip_region (GTK_WIDGET (this)->window); + gdk_window_invalidate_region (GTK_WIDGET (this)->window, region, TRUE); + gdk_region_destroy (region); + } +} + + +/*****************************************************************************/ +/* "Expose event" callback. */ +/*****************************************************************************/ +static gboolean +expose_event_cb (GtkWidget *widget, + GdkEventExpose *event) +{ + cairo_t *cr; + + cr = gdk_cairo_create (widget->window); + + cairo_rectangle (cr, + event->area.x, event->area.y, + event->area.width, event->area.height); + cairo_clip (cr); + + cairo_translate (cr, widget->allocation.x, widget->allocation.y); + + draw_preview (GL_MINI_LABEL_PREVIEW (widget), cr); + + cairo_destroy (cr); + + return FALSE; +} + + +/*****************************************************************************/ +/* Draw sample. */ +/*****************************************************************************/ +static void +draw_preview (glMiniLabelPreview *this, + cairo_t *cr) +{ + GtkStyle *style; + gdouble w, h; + guint fill_color, line_color, shadow_color; + const lglTemplateFrame *frame; + gdouble w_label, h_label; + gdouble scale; + + + w = GTK_WIDGET (this)->allocation.width; + h = GTK_WIDGET (this)->allocation.height; + + + style = gtk_widget_get_style (GTK_WIDGET (this)); + if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) ) + { + fill_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); + line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); + shadow_color = gl_color_from_gdk_color (&style->dark[GTK_STATE_NORMAL]); + } + else + { + fill_color = GL_COLOR_NONE; + line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_INSENSITIVE]); + shadow_color = GL_COLOR_NONE; + } + + + if (this->priv->template == NULL) + { + return; + } + + frame = (lglTemplateFrame *)this->priv->template->frames->data; + + if (this->priv->rotate_flag) + { + lgl_template_frame_get_size (frame, &h_label, &w_label); + } + else + { + lgl_template_frame_get_size (frame, &w_label, &h_label); + } + + scale = MIN( (w - 2*MARGIN - 2*SHADOW_OFFSET)/w_label, + (h - 2*MARGIN - 2*SHADOW_OFFSET)/h_label ); + + + cairo_translate (cr, w/2.0, h/2.0); + cairo_scale (cr, scale, scale); + cairo_translate (cr, -w_label/2.0, -h_label/2.0); + + + /* + * Shadow + */ + cairo_save (cr); + cairo_translate (cr, SHADOW_OFFSET/scale, SHADOW_OFFSET/scale); + gl_cairo_label_path (cr, this->priv->template, this->priv->rotate_flag, FALSE); + + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (shadow_color)); + cairo_fill (cr); + cairo_restore (cr); + + /* + * Label + outline + */ + gl_cairo_label_path (cr, this->priv->template, this->priv->rotate_flag, FALSE); + + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (fill_color)); + cairo_fill_preserve (cr); + + cairo_set_line_width (cr, 1.0/scale); + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (line_color)); + cairo_stroke (cr); + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/mini-label-preview.h b/src/mini-label-preview.h new file mode 100644 index 00000000..9cc8ece7 --- /dev/null +++ b/src/mini-label-preview.h @@ -0,0 +1,79 @@ +/* + * mini-label-preview.h + * Copyright (C) 2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MINI_LABEL_PREVIEW_H__ +#define __MINI_LABEL_PREVIEW_H__ + + +#include + + +G_BEGIN_DECLS + +#define GL_TYPE_MINI_LABEL_PREVIEW (gl_mini_label_preview_get_type ()) +#define GL_MINI_LABEL_PREVIEW(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_MINI_LABEL_PREVIEW, glMiniLabelPreview )) +#define GL_MINI_LABEL_PREVIEW_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MINI_LABEL_PREVIEW, glMiniLabelPreviewClass)) +#define GL_IS_MINI_LABEL_PREVIEW(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MINI_LABEL_PREVIEW)) +#define GL_IS_MINI_LABEL_PREVIEW_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MINI_LABEL_PREVIEW)) + +typedef struct _glMiniLabelPreview glMiniLabelPreview; +typedef struct _glMiniLabelPreviewPrivate glMiniLabelPreviewPrivate; +typedef struct _glMiniLabelPreviewClass glMiniLabelPreviewClass; + +struct _glMiniLabelPreview { + GtkDrawingArea parent_widget; + + glMiniLabelPreviewPrivate *priv; +}; + +struct _glMiniLabelPreviewClass { + GtkDrawingAreaClass parent_class; +}; + + +GType gl_mini_label_preview_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_mini_label_preview_new (gint w, + gint h); + +void gl_mini_label_preview_set_by_name (glMiniLabelPreview *this, + gchar *name, + gboolean rotate_flag); + + + +G_END_DECLS + +#endif /* __MINI_LABEL_PREVIEW_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/mini-preview-pixbuf-cache.c b/src/mini-preview-pixbuf-cache.c new file mode 100644 index 00000000..82077ad5 --- /dev/null +++ b/src/mini-preview-pixbuf-cache.c @@ -0,0 +1,155 @@ +/* + * mini-preview-pixbuf-cache.c + * Copyright (C) 2007-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "mini-preview-pixbuf-cache.h" + +#include + +#include "libglabels/libglabels.h" +#include "mini-preview-pixbuf.h" + +#include "debug.h" + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static GHashTable *mini_preview_pixbuf_cache = NULL; + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + + +/*****************************************************************************/ +/* Create a new hash table to keep track of cached mini preview pixbufs. */ +/*****************************************************************************/ +void +gl_mini_preview_pixbuf_cache_init (void) +{ + GList *names = NULL; + GList *p; + lglTemplate *template; + + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + mini_preview_pixbuf_cache = g_hash_table_new (g_str_hash, g_str_equal); + + names = lgl_db_get_template_name_list_unique (NULL, NULL, NULL); + for ( p=names; p != NULL; p=p->next ) + { + gl_debug (DEBUG_PIXBUF_CACHE, "name = \"%s\"", p->data); + + template = lgl_db_lookup_template_from_name (p->data); + gl_mini_preview_pixbuf_cache_add_by_template (template); + lgl_template_free (template); + } + lgl_db_free_template_name_list (names); + + gl_debug (DEBUG_PIXBUF_CACHE, "END pixbuf_cache=%p", mini_preview_pixbuf_cache); +} + +/*****************************************************************************/ +/* Add pixbuf to cache by template. */ +/*****************************************************************************/ +void +gl_mini_preview_pixbuf_cache_add_by_template (lglTemplate *template) +{ + GdkPixbuf *pixbuf; + GList *p; + lglTemplateAlias *alias; + gchar *name; + + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + pixbuf = gl_mini_preview_pixbuf_new (template, 72, 72); + + for ( p=template->aliases; p != NULL; p=p->next ) + { + alias = (lglTemplateAlias *)p->data; + + name = g_strdup_printf ("%s %s", alias->brand, alias->part); + g_hash_table_insert (mini_preview_pixbuf_cache, name, g_object_ref (pixbuf)); + } + + g_object_unref (pixbuf); + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); +} + +/*****************************************************************************/ +/* Add pixbuf to cache by name. */ +/*****************************************************************************/ +void +gl_mini_preview_pixbuf_cache_add_by_name (gchar *name) +{ + lglTemplate *template; + GdkPixbuf *pixbuf; + + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + template = lgl_db_lookup_template_from_name (name); + pixbuf = gl_mini_preview_pixbuf_new (template, 72, 72); + lgl_template_free (template); + + g_hash_table_insert (mini_preview_pixbuf_cache, g_strdup (name), pixbuf); + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); +} + +/*****************************************************************************/ +/* Get pixbuf. */ +/*****************************************************************************/ +GdkPixbuf * +gl_mini_preview_pixbuf_cache_get_pixbuf (gchar *name) +{ + GdkPixbuf *pixbuf; + + gl_debug (DEBUG_PIXBUF_CACHE, "START pixbuf_cache=%p", mini_preview_pixbuf_cache); + + pixbuf = g_hash_table_lookup (mini_preview_pixbuf_cache, name); + + if (!pixbuf) + { + gl_mini_preview_pixbuf_cache_add_by_name (name); + pixbuf = g_hash_table_lookup (mini_preview_pixbuf_cache, name); + } + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); + + return g_object_ref (pixbuf); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/mini-preview-pixbuf-cache.h b/src/mini-preview-pixbuf-cache.h new file mode 100644 index 00000000..218eaddc --- /dev/null +++ b/src/mini-preview-pixbuf-cache.h @@ -0,0 +1,50 @@ +/* + * mini-preview-pixbuf-cache.h + * Copyright (C) 2007-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MINI_PREVIEW_PIXBUF_CACHE_H__ +#define __MINI_PREVIEW_PIXBUF_CACHE_H__ + +#include +#include + +G_BEGIN_DECLS + +void gl_mini_preview_pixbuf_cache_init (void); + +void gl_mini_preview_pixbuf_cache_add_by_name (gchar *name); +void gl_mini_preview_pixbuf_cache_add_by_template (lglTemplate *template); + +GdkPixbuf *gl_mini_preview_pixbuf_cache_get_pixbuf (gchar *name); + + +G_END_DECLS + +#endif /*__MINI_PREVIEW_PIXBUF_CACHE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/mini-preview-pixbuf.c b/src/mini-preview-pixbuf.c new file mode 100644 index 00000000..0651263f --- /dev/null +++ b/src/mini-preview-pixbuf.c @@ -0,0 +1,232 @@ +/* + * mini-preview-pixbuf.c + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "mini-preview-pixbuf.h" + +#include +#include + +#include "cairo-label-path.h" + +#include "debug.h" + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + +#define PAPER_RGB_ARGS 0.95, 0.95, 0.95 +#define PAPER_OUTLINE_RGB_ARGS 0.0, 0.0, 0.0 +#define LABEL_RGB_ARGS 1.0, 1.0, 1.0 +#define LABEL_OUTLINE_RGB_ARGS 0.25, 0.25, 0.25 + +#define PAPER_OUTLINE_WIDTH_PIXELS 1.0 +#define LABEL_OUTLINE_WIDTH_PIXELS 1.0 + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void draw_paper (cairo_t *cr, + lglTemplate *template, + gdouble scale); + +static void draw_label_outlines (cairo_t *cr, + lglTemplate *template, + gdouble scale); + +static void draw_label_outline (cairo_t *cr, + lglTemplate *template, + gdouble x0, + gdouble y0); + + + + +/****************************************************************************/ +/* Create new pixbuf with mini preview of template */ +/****************************************************************************/ +GdkPixbuf * +gl_mini_preview_pixbuf_new (lglTemplate *template, + gint width, + gint height) +{ + cairo_surface_t *surface; + cairo_t *cr; + GdkPixbuf *pixbuf; + gdouble scale; + gdouble w, h; + gdouble offset_x, offset_y; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + /* Create pixbuf and cairo context. */ + pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height); + surface = cairo_image_surface_create_for_data (gdk_pixbuf_get_pixels (pixbuf), + CAIRO_FORMAT_RGB24, + gdk_pixbuf_get_width (pixbuf), + gdk_pixbuf_get_height (pixbuf), + gdk_pixbuf_get_rowstride (pixbuf)); + + cr = cairo_create (surface); + cairo_surface_destroy (surface); + + /* Clear pixbuf */ + cairo_save (cr); + cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); + cairo_paint (cr); + cairo_restore (cr); + + cairo_set_antialias (cr, CAIRO_ANTIALIAS_GRAY); + + /* Set scale and offset */ + w = width - 1; + h = height - 1; + if ( (w/template->page_width) > (h/template->page_height) ) { + scale = h / template->page_height; + } else { + scale = w / template->page_width; + } + offset_x = (width/scale - template->page_width) / 2.0; + offset_y = (height/scale - template->page_height) / 2.0; + cairo_identity_matrix (cr); + cairo_scale (cr, scale, scale); + cairo_translate (cr, offset_x, offset_y); + + /* Draw paper and label outlines */ + draw_paper (cr, template, scale); + draw_label_outlines (cr, template, scale); + + /* Cleanup */ + cairo_destroy (cr); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); + + return pixbuf; +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Draw paper and paper outline. */ +/*--------------------------------------------------------------------------*/ +static void +draw_paper (cairo_t *cr, + lglTemplate *template, + gdouble scale) +{ + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + cairo_save (cr); + cairo_rectangle (cr, 0.0, 0.0, template->page_width, template->page_height); + cairo_set_source_rgb (cr, PAPER_RGB_ARGS); + cairo_fill_preserve (cr); + cairo_set_line_width (cr, PAPER_OUTLINE_WIDTH_PIXELS/scale); + cairo_set_source_rgb (cr, PAPER_OUTLINE_RGB_ARGS); + cairo_stroke (cr); + cairo_restore (cr); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Draw label outlines. */ +/*--------------------------------------------------------------------------*/ +static void +draw_label_outlines (cairo_t *cr, + lglTemplate *template, + gdouble scale) +{ + const lglTemplateFrame *frame; + gint i, n_labels; + lglTemplateOrigin *origins; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + cairo_save (cr); + + cairo_set_line_width (cr, LABEL_OUTLINE_WIDTH_PIXELS/scale); + + frame = (lglTemplateFrame *)template->frames->data; + + n_labels = lgl_template_frame_get_n_labels (frame); + origins = lgl_template_frame_get_origins (frame); + + for ( i=0; i < n_labels; i++ ) { + + draw_label_outline(cr, template, origins[i].x, origins[i].y); + + } + + g_free (origins); + + cairo_restore (cr); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Draw label outline. */ +/*--------------------------------------------------------------------------*/ +static void +draw_label_outline (cairo_t *cr, + lglTemplate *template, + gdouble x0, + gdouble y0) +{ + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + cairo_save (cr); + + cairo_translate (cr, x0, y0); + + gl_cairo_label_path (cr, template, FALSE, FALSE); + + cairo_set_source_rgb (cr, LABEL_RGB_ARGS); + cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); + cairo_fill_preserve (cr); + + cairo_set_source_rgb (cr, LABEL_OUTLINE_RGB_ARGS); + cairo_stroke (cr); + + cairo_restore (cr); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/mini-preview-pixbuf.h b/src/mini-preview-pixbuf.h new file mode 100644 index 00000000..825938e5 --- /dev/null +++ b/src/mini-preview-pixbuf.h @@ -0,0 +1,47 @@ +/* + * mini-preview-pixbuf.h + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MINI_PREVIEW_PIXBUF_H__ +#define __MINI_PREVIEW_PIXBUF_H__ + + +#include +#include + +G_BEGIN_DECLS + +GdkPixbuf *gl_mini_preview_pixbuf_new (lglTemplate *template, + gint width, + gint height); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/mini-preview.c b/src/mini-preview.c new file mode 100644 index 00000000..9bcedbff --- /dev/null +++ b/src/mini-preview.c @@ -0,0 +1,1062 @@ +/* + * mini-preview.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "mini-preview.h" + +#include + +#include "libglabels/db.h" +#include "cairo-label-path.h" +#include "marshal.h" +#include "color.h" +#include "print.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + +#define MARGIN 2 +#define SHADOW_OFFSET 3 + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +enum { + CLICKED, + PRESSED, + RELEASED, + LAST_SIGNAL +}; + +typedef struct { + gdouble x; + gdouble y; +} LabelCenter; + +struct _glMiniPreviewPrivate { + + GtkWidget *canvas; + + lglTemplate *template; + gint labels_per_sheet; + LabelCenter *centers; + + gint highlight_first; + gint highlight_last; + + gboolean dragging; + gint first_i; + gint last_i; + gint prev_i; + + gboolean update_scheduled_flag; + + glLabel *label; + gint page; + gint n_sheets; + gint n_copies; + gint first; + gint last; + gboolean collate_flag; + gboolean outline_flag; + gboolean reverse_flag; + gboolean crop_marks_flag; +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +static gint mini_preview_signals[LAST_SIGNAL] = { 0 }; + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_mini_preview_finalize (GObject *object); + +static void gl_mini_preview_construct (glMiniPreview *this, + gint height, + gint width); + +static gboolean button_press_event_cb (GtkWidget *widget, + GdkEventButton *event); +static gboolean motion_notify_event_cb (GtkWidget *widget, + GdkEventMotion *event); +static gboolean button_release_event_cb (GtkWidget *widget, + GdkEventButton *event); + + +static gboolean expose_event_cb (GtkWidget *widget, + GdkEventExpose *event, + glMiniPreview *this); +static void style_set_cb (GtkWidget *widget, + GtkStyle *previous_style, + glMiniPreview *this); + +static void redraw (glMiniPreview *this); +static void draw (glMiniPreview *this, + cairo_t *cr); + +static void draw_shadow (glMiniPreview *this, + cairo_t *cr, + gdouble x, + gdouble y, + gdouble width, + gdouble height); +static void draw_paper (glMiniPreview *this, + cairo_t *cr, + gdouble width, + gdouble height, + gdouble line_width); +static void draw_labels (glMiniPreview *this, + cairo_t *cr, + lglTemplate *template, + gdouble line_width); +static void draw_rich_preview (glMiniPreview *this, + cairo_t *cr); + + +static gint find_closest_label (glMiniPreview *this, + gdouble x, + gdouble y); + +static gdouble set_transform_and_get_scale (glMiniPreview *this, + cairo_t *cr); + + +/****************************************************************************/ +/* Object infrastructure. */ +/****************************************************************************/ +G_DEFINE_TYPE (glMiniPreview, gl_mini_preview, GTK_TYPE_EVENT_BOX); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_mini_preview_class_init (glMiniPreviewClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + gl_mini_preview_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_mini_preview_finalize; + + widget_class->button_press_event = button_press_event_cb; + widget_class->motion_notify_event = motion_notify_event_cb; + widget_class->button_release_event = button_release_event_cb; + + mini_preview_signals[CLICKED] = + g_signal_new ("clicked", + G_OBJECT_CLASS_TYPE(object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glMiniPreviewClass, clicked), + NULL, NULL, + gl_marshal_VOID__INT, + G_TYPE_NONE, 1, G_TYPE_INT); + + mini_preview_signals[PRESSED] = + g_signal_new ("pressed", + G_OBJECT_CLASS_TYPE(object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glMiniPreviewClass, pressed), + NULL, NULL, + gl_marshal_VOID__INT_INT, + G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); + + mini_preview_signals[RELEASED] = + g_signal_new ("released", + G_OBJECT_CLASS_TYPE(object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glMiniPreviewClass, released), + NULL, NULL, + gl_marshal_VOID__INT_INT, + G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_mini_preview_init (glMiniPreview *this) +{ + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + this->priv = g_new0 (glMiniPreviewPrivate, 1); + + gtk_widget_add_events (GTK_WIDGET (this), + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | + GDK_POINTER_MOTION_MASK); + + gtk_event_box_set_visible_window (GTK_EVENT_BOX (this), FALSE); + + this->priv->canvas = gtk_drawing_area_new (); + GTK_WIDGET_SET_FLAGS (this->priv->canvas, GTK_NO_WINDOW); + gtk_container_add (GTK_CONTAINER (this), this->priv->canvas); + + g_signal_connect (G_OBJECT (this->priv->canvas), "expose-event", + G_CALLBACK (expose_event_cb), this); + g_signal_connect (G_OBJECT (this->priv->canvas), "style-set", + G_CALLBACK (style_set_cb), this); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/*****************************************************************************/ +/* Finalize Method. */ +/*****************************************************************************/ +static void +gl_mini_preview_finalize (GObject *object) +{ + glMiniPreview *this = GL_MINI_PREVIEW (object); + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_MINI_PREVIEW (object)); + + if (this->priv->label) + { + g_object_unref (this->priv->label); + } + lgl_template_free (this->priv->template); + g_free (this->priv->centers); + g_free (this->priv); + + G_OBJECT_CLASS (gl_mini_preview_parent_class)->finalize (object); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/*****************************************************************************/ +/** New Object Generator. */ +/*****************************************************************************/ +GtkWidget * +gl_mini_preview_new (gint height, + gint width) +{ + glMiniPreview *this; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + this = g_object_new (gl_mini_preview_get_type (), NULL); + + gl_mini_preview_construct (this, height, width); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); + + return GTK_WIDGET (this); +} + + +/*--------------------------------------------------------------------------*/ +/* Construct composite widget. */ +/*--------------------------------------------------------------------------*/ +static void +gl_mini_preview_construct (glMiniPreview *this, + gint height, + gint width) +{ + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + gtk_widget_set_size_request (GTK_WIDGET (this->priv->canvas), width, height); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/****************************************************************************/ +/* Set template for mini-preview to determine geometry. */ +/****************************************************************************/ +void +gl_mini_preview_set_by_name (glMiniPreview *this, + const gchar *name) +{ + lglTemplate *template; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + /* Fetch template */ + template = lgl_db_lookup_template_from_name (name); + + gl_mini_preview_set_template (this, template); + + lgl_template_free (template); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/****************************************************************************/ +/* Set template for mini-preview to determine geometry. */ +/****************************************************************************/ +void +gl_mini_preview_set_template (glMiniPreview *this, + const lglTemplate *template) +{ + const lglTemplateFrame *frame; + lglTemplateOrigin *origins; + gdouble w, h; + gint i; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + frame = (lglTemplateFrame *)template->frames->data; + + /* + * Set template + */ + lgl_template_free (this->priv->template); + this->priv->template = lgl_template_dup (template); + + /* + * Set labels per sheet + */ + this->priv->labels_per_sheet = lgl_template_frame_get_n_labels (frame); + + /* + * Initialize centers + */ + g_free (this->priv->centers); + this->priv->centers = g_new0 (LabelCenter, this->priv->labels_per_sheet); + origins = lgl_template_frame_get_origins (frame); + lgl_template_frame_get_size (frame, &w, &h); + for ( i=0; ipriv->labels_per_sheet; i++ ) + { + this->priv->centers[i].x = origins[i].x + w/2.0; + this->priv->centers[i].y = origins[i].y + h/2.0; + } + g_free (origins); + + /* + * Redraw modified preview + */ + redraw (this); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/****************************************************************************/ +/* Highlight given label outlines. */ +/****************************************************************************/ +void +gl_mini_preview_highlight_range (glMiniPreview *this, + gint first_label, + gint last_label) +{ + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + if ( (first_label != this->priv->highlight_first) || + (last_label != this->priv->highlight_last) ) + { + + this->priv->highlight_first = first_label; + this->priv->highlight_last = last_label; + + redraw (this); + + } + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/****************************************************************************/ +/* Set label. */ +/****************************************************************************/ +void +gl_mini_preview_set_label (glMiniPreview *this, + glLabel *label) +{ + if ( this->priv->label ) + { + g_object_unref (this->priv->label); + } + this->priv->label = g_object_ref (label); + redraw (this); +} + + +/****************************************************************************/ +/* Set page number. */ +/****************************************************************************/ +void +gl_mini_preview_set_page (glMiniPreview *this, + gint page) +{ + if ( page != this->priv->page ) + { + this->priv->page = page; + redraw (this); + } +} + + +/****************************************************************************/ +/* Set number of sheets. */ +/****************************************************************************/ +void +gl_mini_preview_set_n_sheets (glMiniPreview *this, + gint n_sheets) +{ + if ( n_sheets != this->priv->n_sheets ) + { + this->priv->n_sheets = n_sheets; + redraw (this); + } +} + + +/****************************************************************************/ +/* Set number of copies (merge only). */ +/****************************************************************************/ +void +gl_mini_preview_set_n_copies (glMiniPreview *this, + gint n_copies) +{ + if ( n_copies != this->priv->n_copies ) + { + this->priv->n_copies = n_copies; + redraw (this); + } +} + + +/****************************************************************************/ +/* Set first label number on first sheet. */ +/****************************************************************************/ +void +gl_mini_preview_set_first (glMiniPreview *this, + gint first) +{ + if ( first != this->priv->first ) + { + this->priv->first = first; + redraw (this); + } +} + + +/****************************************************************************/ +/* Set last label number on first sheet (non-merge only). */ +/****************************************************************************/ +void +gl_mini_preview_set_last (glMiniPreview *this, + gint last) +{ + if ( last != this->priv->last ) + { + this->priv->last = last; + redraw (this); + } +} + + +/****************************************************************************/ +/* Set collate flag (merge only). */ +/****************************************************************************/ +void +gl_mini_preview_set_collate_flag (glMiniPreview *this, + gboolean collate_flag) +{ + if ( collate_flag != this->priv->collate_flag ) + { + this->priv->collate_flag = collate_flag; + redraw (this); + } +} + + +/****************************************************************************/ +/* Set outline flag. */ +/****************************************************************************/ +void +gl_mini_preview_set_outline_flag (glMiniPreview *this, + gboolean outline_flag) +{ + if ( outline_flag != this->priv->outline_flag ) + { + this->priv->outline_flag = outline_flag; + redraw (this); + } +} + + +/****************************************************************************/ +/* Set reverse flag. */ +/****************************************************************************/ +void +gl_mini_preview_set_reverse_flag (glMiniPreview *this, + gboolean reverse_flag) +{ + if ( reverse_flag != this->priv->reverse_flag ) + { + this->priv->reverse_flag = reverse_flag; + redraw (this); + } +} + + +/****************************************************************************/ +/* Set crop marks flag. */ +/****************************************************************************/ +void +gl_mini_preview_set_crop_marks_flag (glMiniPreview *this, + gboolean crop_marks_flag) +{ + if ( crop_marks_flag != this->priv->crop_marks_flag ) + { + this->priv->crop_marks_flag = crop_marks_flag; + redraw (this); + } +} + + +/*--------------------------------------------------------------------------*/ +/* Set transformation and return scale. */ +/*--------------------------------------------------------------------------*/ +static gdouble +set_transform_and_get_scale (glMiniPreview *this, + cairo_t *cr) +{ + lglTemplate *template = this->priv->template; + gdouble w, h; + gdouble scale; + gdouble offset_x, offset_y; + + /* Establish scale and origin. */ + w = GTK_WIDGET (this)->allocation.width; + h = GTK_WIDGET (this)->allocation.height; + + /* establish scale. */ + scale = MIN( (w - 2*MARGIN - 2*SHADOW_OFFSET)/template->page_width, + (h - 2*MARGIN - 2*SHADOW_OFFSET)/template->page_height ); + + /* Find offset to center preview. */ + offset_x = (w/scale - template->page_width) / 2.0; + offset_y = (h/scale - template->page_height) / 2.0; + + /* Set transformation. */ + cairo_scale (cr, scale, scale); + cairo_translate (cr, offset_x, offset_y); + + return scale; +} + + +/*--------------------------------------------------------------------------*/ +/* Button press event handler */ +/*--------------------------------------------------------------------------*/ +static gboolean +button_press_event_cb (GtkWidget *widget, + GdkEventButton *event) +{ + glMiniPreview *this = GL_MINI_PREVIEW (widget); + cairo_t *cr; + gdouble scale; + gdouble x, y; + gint i; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + if ( event->button == 1 ) + { + cr = gdk_cairo_create (GTK_WIDGET (this->priv->canvas)->window); + + scale = set_transform_and_get_scale (this, cr); + + x = event->x; + y = event->y; + cairo_device_to_user (cr, &x, &y); + + i = find_closest_label (this, x, y); + + g_signal_emit (G_OBJECT(this), + mini_preview_signals[CLICKED], + 0, i); + + this->priv->first_i = i; + this->priv->last_i = i; + g_signal_emit (G_OBJECT(this), + mini_preview_signals[PRESSED], + 0, this->priv->first_i, this->priv->last_i); + + this->priv->dragging = TRUE; + this->priv->prev_i = i; + + cairo_destroy (cr); + } + + gl_debug (DEBUG_MINI_PREVIEW, "END"); + return FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* Motion notify event handler */ +/*--------------------------------------------------------------------------*/ +static gboolean +motion_notify_event_cb (GtkWidget *widget, + GdkEventMotion *event) +{ + glMiniPreview *this = GL_MINI_PREVIEW (widget); + cairo_t *cr; + gdouble scale; + gdouble x, y; + gint i; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + if (this->priv->dragging) + { + cr = gdk_cairo_create (GTK_WIDGET (this->priv->canvas)->window); + + scale = set_transform_and_get_scale (this, cr); + + x = event->x; + y = event->y; + cairo_device_to_user (cr, &x, &y); + + i = find_closest_label (this, x, y); + + if ( i != this->priv->prev_i ) + { + this->priv->last_i = i; + + g_signal_emit (G_OBJECT(this), + mini_preview_signals[PRESSED], + 0, + MIN (this->priv->first_i, this->priv->last_i), + MAX (this->priv->first_i, this->priv->last_i)); + + this->priv->prev_i = i; + } + cairo_destroy (cr); + } + + gl_debug (DEBUG_MINI_PREVIEW, "END"); + return FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* Button release event handler */ +/*--------------------------------------------------------------------------*/ +static gboolean +button_release_event_cb (GtkWidget *widget, + GdkEventButton *event) +{ + glMiniPreview *this = GL_MINI_PREVIEW (widget); + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + if ( event->button == 1 ) + { + this->priv->dragging = FALSE; + + } + + g_signal_emit (G_OBJECT(this), + mini_preview_signals[RELEASED], + 0, this->priv->first_i, this->priv->last_i); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); + return FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* Find index+1 of label closest to given coordinates. */ +/*--------------------------------------------------------------------------*/ +static gint +find_closest_label (glMiniPreview *this, + gdouble x, + gdouble y) +{ + gint i; + gint min_i; + gdouble dx, dy, d2, min_d2; + + dx = x - this->priv->centers[0].x; + dy = y - this->priv->centers[0].y; + min_d2 = dx*dx + dy*dy; + min_i = 0; + + for ( i=1; ipriv->labels_per_sheet; i++ ) + { + dx = x - this->priv->centers[i].x; + dy = y - this->priv->centers[i].y; + d2 = dx*dx + dy*dy; + + if ( d2 < min_d2 ) + { + min_d2 = d2; + min_i = i; + } + } + + return min_i + 1; +} + + +/*--------------------------------------------------------------------------*/ +/* Expose event handler. */ +/*--------------------------------------------------------------------------*/ +static gboolean +expose_event_cb (GtkWidget *widget, + GdkEventExpose *event, + glMiniPreview *this) +{ + cairo_t *cr; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + this->priv->update_scheduled_flag = FALSE; + + cr = gdk_cairo_create (widget->window); + + cairo_rectangle (cr, + event->area.x, event->area.y, + event->area.width, event->area.height); + cairo_clip (cr); + cairo_translate (cr, widget->allocation.x, widget->allocation.y); + + draw (this, cr); + + cairo_destroy (cr); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); + return FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* Style set handler (updates colors when style/theme changes). */ +/*--------------------------------------------------------------------------*/ +static void +style_set_cb (GtkWidget *widget, + GtkStyle *previous_style, + glMiniPreview *this) +{ + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + redraw (this); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Redraw. */ +/*--------------------------------------------------------------------------*/ +static void +redraw (glMiniPreview *this) +{ + GdkRegion *region; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + if (GTK_WIDGET (this->priv->canvas)->window) + { + + if ( !this->priv->update_scheduled_flag ) + { + this->priv->update_scheduled_flag = TRUE; + + region = gdk_drawable_get_clip_region (GTK_WIDGET (this->priv->canvas)->window); + gdk_window_invalidate_region (GTK_WIDGET (this->priv->canvas)->window, region, TRUE); + gdk_region_destroy (region); + } + } + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Draw mini preview. */ +/*--------------------------------------------------------------------------*/ +static void +draw (glMiniPreview *this, + cairo_t *cr) +{ + lglTemplate *template = this->priv->template; + gdouble scale; + gdouble shadow_x, shadow_y; + + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + if (template) + { + + scale = set_transform_and_get_scale (this, cr); + + /* update shadow */ + shadow_x = SHADOW_OFFSET/scale; + shadow_y = SHADOW_OFFSET/scale; + + draw_shadow (this, cr, + shadow_x, shadow_y, + template->page_width, template->page_height); + + draw_paper (this, cr, + template->page_width, template->page_height, + 1.0/scale); + + draw_labels (this, cr, template, 1.0/scale); + + if (this->priv->label) + { + draw_rich_preview (this, cr); + } + + } + + gl_debug (DEBUG_MINI_PREVIEW, "END"); + +} + + +/*--------------------------------------------------------------------------*/ +/* Draw page shadow */ +/*--------------------------------------------------------------------------*/ +static void +draw_shadow (glMiniPreview *this, + cairo_t *cr, + gdouble x, + gdouble y, + gdouble width, + gdouble height) +{ + GtkStyle *style; + guint shadow_color; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + cairo_save (cr); + + cairo_rectangle (cr, x, y, width, height); + + style = gtk_widget_get_style (GTK_WIDGET(this)); + shadow_color = gl_color_from_gdk_color (&style->dark[GTK_STATE_NORMAL]); + cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (shadow_color)); + + cairo_fill (cr); + + cairo_restore (cr); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Draw page */ +/*--------------------------------------------------------------------------*/ +static void +draw_paper (glMiniPreview *this, + cairo_t *cr, + gdouble width, + gdouble height, + gdouble line_width) +{ + GtkStyle *style; + guint paper_color, outline_color; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + cairo_save (cr); + + style = gtk_widget_get_style (GTK_WIDGET(this)); + paper_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); + outline_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); + + cairo_rectangle (cr, 0.0, 0.0, width, height); + + cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (paper_color)); + cairo_fill_preserve (cr); + + cairo_set_source_rgb (cr, GL_COLOR_RGB_ARGS (outline_color)); + cairo_set_line_width (cr, line_width); + cairo_stroke (cr); + + cairo_restore (cr); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Draw labels */ +/*--------------------------------------------------------------------------*/ +static void +draw_labels (glMiniPreview *this, + cairo_t *cr, + lglTemplate *template, + gdouble line_width) +{ + const lglTemplateFrame *frame; + gint i, n_labels; + lglTemplateOrigin *origins; + GtkStyle *style; + guint base_color; + guint highlight_color, paper_color, outline_color; + + gl_debug (DEBUG_MINI_PREVIEW, "START"); + + frame = (lglTemplateFrame *)template->frames->data; + + n_labels = lgl_template_frame_get_n_labels (frame); + origins = lgl_template_frame_get_origins (frame); + + style = gtk_widget_get_style (GTK_WIDGET(this)); + base_color = gl_color_from_gdk_color (&style->base[GTK_STATE_SELECTED]); + + paper_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); + highlight_color = gl_color_set_opacity (base_color, 0.10); + if (this->priv->label) + { + /* Outlines are more subtle when doing a rich preview. */ + outline_color = gl_color_set_opacity (base_color, 0.05); + } + else + { + outline_color = gl_color_set_opacity (base_color, 1.00); + } + + for ( i=0; i < n_labels; i++ ) { + + cairo_save (cr); + + cairo_translate (cr, origins[i].x, origins[i].y); + gl_cairo_label_path (cr, template, FALSE, FALSE); + + if ( ((i+1) >= this->priv->highlight_first) && + ((i+1) <= this->priv->highlight_last) ) + { + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (highlight_color)); + cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); + cairo_fill_preserve (cr); + } + + cairo_set_line_width (cr, line_width); + cairo_set_source_rgba (cr, GL_COLOR_RGBA_ARGS (outline_color)); + cairo_stroke (cr); + + cairo_restore (cr); + + } + + g_free (origins); + + gl_debug (DEBUG_MINI_PREVIEW, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Draw rich preview using print renderers. */ +/*--------------------------------------------------------------------------*/ +static void +draw_rich_preview (glMiniPreview *this, + cairo_t *cr) +{ + glMerge *merge; + glPrintState state; + + merge = gl_label_get_merge (this->priv->label); + + if (!merge) + { + gl_print_simple_sheet (this->priv->label, + cr, + this->priv->page, + this->priv->n_sheets, + this->priv->first, + this->priv->last, + this->priv->outline_flag, + this->priv->reverse_flag, + this->priv->crop_marks_flag); + } + else + { + /* FIXME: maybe the renderers should be more self contained. + * This will only work for the first page, since + * previous pages must be rendered to establish + * state. + */ + state.i_copy = 0; + state.p_record = (GList *)gl_merge_get_record_list (merge); + + if (this->priv->collate_flag) + { + gl_print_collated_merge_sheet (this->priv->label, + cr, + this->priv->page, + this->priv->n_copies, + this->priv->first, + this->priv->outline_flag, + this->priv->reverse_flag, + this->priv->crop_marks_flag, + &state); + } + else + { + gl_print_uncollated_merge_sheet (this->priv->label, + cr, + this->priv->page, + this->priv->n_copies, + this->priv->first, + this->priv->outline_flag, + this->priv->reverse_flag, + this->priv->crop_marks_flag, + &state); + } + } +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/mini-preview.h b/src/mini-preview.h new file mode 100644 index 00000000..caf77ebb --- /dev/null +++ b/src/mini-preview.h @@ -0,0 +1,126 @@ +/* + * mini-preview.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __MINI_PREVIEW_H__ +#define __MINI_PREVIEW_H__ + +#include +#include "label.h" + + +G_BEGIN_DECLS + +#define GL_TYPE_MINI_PREVIEW (gl_mini_preview_get_type ()) +#define GL_MINI_PREVIEW(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_MINI_PREVIEW, glMiniPreview )) +#define GL_MINI_PREVIEW_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MINI_PREVIEW, glMiniPreviewClass)) +#define GL_IS_MINI_PREVIEW(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MINI_PREVIEW)) +#define GL_IS_MINI_PREVIEW_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MINI_PREVIEW)) + + +typedef struct _glMiniPreview glMiniPreview; +typedef struct _glMiniPreviewPrivate glMiniPreviewPrivate; +typedef struct _glMiniPreviewClass glMiniPreviewClass; + +struct _glMiniPreview { + GtkEventBox parent; + + glMiniPreviewPrivate *priv; +}; + +struct _glMiniPreviewClass { + GtkEventBoxClass parent_class; + + void (*clicked) (glMiniPreview *this, + gint index, + gpointer user_data); + + void (*pressed) (glMiniPreview *this, + gint index1, + gint index2, + gpointer user_data); + + void (*released) (glMiniPreview *this, + gint index1, + gint index2, + gpointer user_data); + +}; + + +GType gl_mini_preview_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_mini_preview_new (gint height, + gint width); + +void gl_mini_preview_set_by_name (glMiniPreview *this, + const gchar *name); + +void gl_mini_preview_set_template (glMiniPreview *this, + const lglTemplate *template); + +void gl_mini_preview_highlight_range (glMiniPreview *this, + gint first_label, + gint last_label); + + +/* + * If label is set, the preview will be rich. + */ +void gl_mini_preview_set_label (glMiniPreview *this, + glLabel *label); + +void gl_mini_preview_set_page (glMiniPreview *this, + gint n_sheets); +void gl_mini_preview_set_n_sheets (glMiniPreview *this, + gint n_sheets); +void gl_mini_preview_set_n_copies (glMiniPreview *this, + gint n_copies); +void gl_mini_preview_set_first (glMiniPreview *this, + gint first); +void gl_mini_preview_set_last (glMiniPreview *this, + gint last); +void gl_mini_preview_set_collate_flag (glMiniPreview *this, + gboolean collate_flag); +void gl_mini_preview_set_outline_flag (glMiniPreview *this, + gboolean outline_flag); +void gl_mini_preview_set_reverse_flag (glMiniPreview *this, + gboolean reverse_flag); +void gl_mini_preview_set_crop_marks_flag (glMiniPreview *this, + gboolean crop_marks_flag); + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/new-label-dialog.c b/src/new-label-dialog.c new file mode 100644 index 00000000..015f0991 --- /dev/null +++ b/src/new-label-dialog.c @@ -0,0 +1,296 @@ +/* + * new-label-dialog.c + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "new-label-dialog.h" + +#include +#include + +#include "hig.h" +#include "wdgt-media-select.h" +#include "rotate-label-button.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + +struct _glNewLabelDialogPrivate { + + GtkWidget *media_select; + GtkWidget *rotate_label; + +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_new_label_dialog_finalize (GObject *object); + +static void template_changed_cb (glWdgtMediaSelect *select, + gpointer data); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glNewLabelDialog, gl_new_label_dialog, GTK_TYPE_DIALOG); + + +/*****************************************************************************/ +/* Class Init Function. */ +/*****************************************************************************/ +static void +gl_new_label_dialog_class_init (glNewLabelDialogClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_FILE, ""); + + gl_new_label_dialog_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_new_label_dialog_finalize; +} + + +/*****************************************************************************/ +/* Object Instance Init Function. */ +/*****************************************************************************/ +static void +gl_new_label_dialog_init (glNewLabelDialog *dialog) +{ + GtkWidget *label; + GtkWidget *frame; + gchar *name; + + gl_debug (DEBUG_FILE, "START"); + + g_return_if_fail (GL_IS_NEW_LABEL_DIALOG (dialog)); + + dialog->priv = g_new0 (glNewLabelDialogPrivate, 1); + + gtk_container_set_border_width (GTK_CONTAINER (dialog), GL_HIG_PAD1); + + gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); + gtk_dialog_add_buttons (GTK_DIALOG (dialog), + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, + NULL); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); + gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); + + + label = gtk_label_new (_("Media type")); + gtk_label_set_use_markup (GTK_LABEL (label), TRUE); + frame = gtk_frame_new (""); + gtk_frame_set_label_widget (GTK_FRAME (frame), label); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); + gtk_box_pack_start (GTK_BOX( GTK_DIALOG (dialog)->vbox), frame, FALSE, FALSE, GL_HIG_PAD1); + + dialog->priv->media_select = gl_wdgt_media_select_new (); + gtk_container_add (GTK_CONTAINER (frame), dialog->priv->media_select); + + label = gtk_label_new (_("Label orientation")); + gtk_label_set_use_markup (GTK_LABEL (label), TRUE); + frame = gtk_frame_new (""); + gtk_frame_set_label_widget (GTK_FRAME (frame), label); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); + gtk_box_pack_start (GTK_BOX( GTK_DIALOG (dialog)->vbox), frame, FALSE, FALSE, 0); + + dialog->priv->rotate_label = gl_rotate_label_button_new (); + gtk_container_add (GTK_CONTAINER (frame), dialog->priv->rotate_label); + + /* Sync template name from media select with rotate widget. */ + name = gl_wdgt_media_select_get_name (GL_WDGT_MEDIA_SELECT (dialog->priv->media_select)); + gl_rotate_label_button_set_template_name (GL_ROTATE_LABEL_BUTTON (dialog->priv->rotate_label), + name); + + g_signal_connect (G_OBJECT (dialog->priv->media_select), "changed", + G_CALLBACK (template_changed_cb), dialog); + + gl_debug (DEBUG_FILE, "END"); +} + + +/*****************************************************************************/ +/* Finalize Function. */ +/*****************************************************************************/ +static void +gl_new_label_dialog_finalize (GObject *object) +{ + glNewLabelDialog* dialog = GL_NEW_LABEL_DIALOG (object);; + + gl_debug (DEBUG_FILE, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_NEW_LABEL_DIALOG (dialog)); + g_return_if_fail (dialog->priv != NULL); + + g_free (dialog->priv); + + G_OBJECT_CLASS (gl_new_label_dialog_parent_class)->finalize (object); + + gl_debug (DEBUG_FILE, "END"); + +} + + +/*****************************************************************************/ +/* NEW object properties dialog. */ +/*****************************************************************************/ +GtkWidget * +gl_new_label_dialog_new (GtkWindow *win) +{ + GtkWidget *dialog; + + gl_debug (DEBUG_FILE, ""); + + dialog = GTK_WIDGET (g_object_new (GL_TYPE_NEW_LABEL_DIALOG, NULL)); + + gtk_window_set_transient_for (GTK_WINDOW (dialog), win); + + return dialog; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. New template changed callback. */ +/*---------------------------------------------------------------------------*/ +static void +template_changed_cb (glWdgtMediaSelect *select, + gpointer data) +{ + glNewLabelDialog *dialog = GL_NEW_LABEL_DIALOG (data); + gchar *name; + + gl_debug (DEBUG_FILE, "START"); + + name = gl_wdgt_media_select_get_name (GL_WDGT_MEDIA_SELECT (select)); + + gl_rotate_label_button_set_template_name (GL_ROTATE_LABEL_BUTTON (dialog->priv->rotate_label), + name); + + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + (name != NULL)); + + g_free (name); + + gl_debug (DEBUG_FILE, "END"); +} + + +/*****************************************************************************/ +/* Get template name. */ +/*****************************************************************************/ +gchar * +gl_new_label_dialog_get_template_name (glNewLabelDialog *dialog) +{ + gchar *name; + + name = gl_wdgt_media_select_get_name (GL_WDGT_MEDIA_SELECT (dialog->priv->media_select)); + + return name; +} + + +/*****************************************************************************/ +/* Set template name. */ +/*****************************************************************************/ +void +gl_new_label_dialog_set_template_name (glNewLabelDialog *dialog, + gchar *name) +{ + gl_wdgt_media_select_set_name (GL_WDGT_MEDIA_SELECT (dialog->priv->media_select), name); +} + + +/*****************************************************************************/ +/* Get current filter parameters. */ +/*****************************************************************************/ +void +gl_new_label_dialog_get_filter_parameters (glNewLabelDialog *dialog, + gchar **page_size_id, + gchar **category_id) +{ + gl_wdgt_media_select_get_filter_parameters ( + GL_WDGT_MEDIA_SELECT (dialog->priv->media_select), + page_size_id, category_id); +} + + +/*****************************************************************************/ +/* Set current filter parameters. */ +/*****************************************************************************/ +void +gl_new_label_dialog_set_filter_parameters (glNewLabelDialog *dialog, + const gchar *page_size_id, + const gchar *category_id) +{ + gl_wdgt_media_select_set_filter_parameters ( + GL_WDGT_MEDIA_SELECT (dialog->priv->media_select), + page_size_id, category_id); +} + + +/*****************************************************************************/ +/* Get rotate state. */ +/*****************************************************************************/ +gboolean +gl_new_label_dialog_get_rotate_state (glNewLabelDialog *dialog) +{ + return gl_rotate_label_button_get_state ( + GL_ROTATE_LABEL_BUTTON (dialog->priv->rotate_label)); +} + + +/*****************************************************************************/ +/* Set rotate state. */ +/*****************************************************************************/ +void +gl_new_label_dialog_set_rotate_state (glNewLabelDialog *dialog, + gboolean state) +{ + gl_rotate_label_button_set_state ( + GL_ROTATE_LABEL_BUTTON (dialog->priv->rotate_label), state); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/new-label-dialog.h b/src/new-label-dialog.h new file mode 100644 index 00000000..2029a9fc --- /dev/null +++ b/src/new-label-dialog.h @@ -0,0 +1,96 @@ +/* + * new-label-dialog.h + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __NEW_LABEL_DIALOG_H__ +#define __NEW_LABEL_DIALOG_H__ + +#include + +G_BEGIN_DECLS + +#define GL_TYPE_NEW_LABEL_DIALOG (gl_new_label_dialog_get_type ()) +#define GL_NEW_LABEL_DIALOG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_NEW_LABEL_DIALOG, glNewLabelDialog)) +#define GL_NEW_LABEL_DIALOG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_NEW_LABEL_DIALOG, glNewLabelDialogClass)) +#define GL_IS_NEW_LABEL_DIALOG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_NEW_LABEL_DIALOG)) +#define GL_IS_NEW_LABEL_DIALOG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_NEW_LABEL_DIALOG)) +#define GL_NEW_LABEL_DIALOG_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_NEW_LABEL_DIALOG, glNewLabelDialogClass)) + + +typedef struct _glNewLabelDialog glNewLabelDialog; +typedef struct _glNewLabelDialogClass glNewLabelDialogClass; + +typedef struct _glNewLabelDialogPrivate glNewLabelDialogPrivate; + +struct _glNewLabelDialog +{ + GtkDialog parent_instance; + + glNewLabelDialogPrivate *priv; + +}; + +struct _glNewLabelDialogClass +{ + GtkDialogClass parent_class; +}; + + +GType gl_new_label_dialog_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_new_label_dialog_new (GtkWindow *win); + +gchar *gl_new_label_dialog_get_template_name (glNewLabelDialog *dialog); + +void gl_new_label_dialog_set_template_name (glNewLabelDialog *dialog, + gchar *name); + +void gl_new_label_dialog_get_filter_parameters (glNewLabelDialog *dialog, + gchar **page_size_id, + gchar **category_id); + +void gl_new_label_dialog_set_filter_parameters (glNewLabelDialog *dialog, + const gchar *page_size_id, + const gchar *category_id); + +gboolean gl_new_label_dialog_get_rotate_state (glNewLabelDialog *dialog); + +void gl_new_label_dialog_set_rotate_state (glNewLabelDialog *dialog, + gboolean state); + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-bc-page.c b/src/object-editor-bc-page.c new file mode 100644 index 00000000..3d6f155b --- /dev/null +++ b/src/object-editor-bc-page.c @@ -0,0 +1,435 @@ +/* + * object-editor-bc-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "color-combo.h" +#include "color.h" +#include "combo-util.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void style_changed_cb (glObjectEditor *editor); +static void bc_radio_toggled_cb (glObjectEditor *editor); + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare size page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_bc_page (glObjectEditor *editor) +{ + GList *styles = NULL; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "bc_page_vbox", &editor->priv->bc_page_vbox, + "bc_style_combo", &editor->priv->bc_style_combo, + "bc_text_check", &editor->priv->bc_text_check, + "bc_cs_check", &editor->priv->bc_cs_check, + "bc_color_hbox", &editor->priv->bc_color_hbox, + "bc_key_combo", &editor->priv->bc_key_combo, + "bc_key_radio", &editor->priv->bc_key_radio, + "bc_color_radio", &editor->priv->bc_color_radio, + "data_format_label", &editor->priv->data_format_label, + "data_ex_label", &editor->priv->data_ex_label, + "data_digits_label", &editor->priv->data_digits_label, + "data_digits_spin", &editor->priv->data_digits_spin, + NULL); + + editor->priv->data_format_fixed_flag = FALSE; + + editor->priv->bc_color_combo = gl_color_combo_new (_("Default"), + GL_COLOR_BC_DEFAULT, + gl_prefs->default_line_color); + gtk_box_pack_start (GTK_BOX (editor->priv->bc_color_hbox), + editor->priv->bc_color_combo, + FALSE, FALSE, 0); + + gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->bc_style_combo)); + gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->bc_key_combo)); + + /* Load barcode styles */ + styles = gl_barcode_get_styles_list (); + gl_combo_util_set_strings (GTK_COMBO_BOX(editor->priv->bc_style_combo), + styles); + gl_barcode_free_styles_list (styles); + + /* Modify widgets */ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->bc_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->bc_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->bc_key_combo, FALSE); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->bc_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->bc_style_combo), + "changed", + G_CALLBACK (style_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->bc_text_check), + "toggled", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->bc_cs_check), + "toggled", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->bc_color_combo), + "color_changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->bc_key_combo), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->bc_color_radio), + "toggled", + G_CALLBACK (bc_radio_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->bc_key_radio), + "toggled", + G_CALLBACK (bc_radio_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->data_digits_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Callback for when style has changed. */ +/*--------------------------------------------------------------------------*/ +static void +style_changed_cb (glObjectEditor *editor) +{ + gchar *style_string = NULL; + const gchar *id; + gchar *ex_string = NULL; + guint digits; + + if (editor->priv->stop_signals) return; + + style_string = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_style_combo)); + + /* Don't emit if entry is empty. */ + if ( *style_string != 0 ) { + id = gl_barcode_name_to_id (style_string); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(editor->priv->bc_text_check), + gl_barcode_can_text (id)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(editor->priv->bc_cs_check), + gl_barcode_can_csum (id)); + + gtk_widget_set_sensitive (editor->priv->bc_text_check, + gl_barcode_text_optional (id)); + gtk_widget_set_sensitive (editor->priv->bc_cs_check, + gl_barcode_csum_optional (id)); + + editor->priv->data_format_fixed_flag = !gl_barcode_can_freeform (id); + digits = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->data_digits_spin)); + if (editor->priv->data_format_fixed_flag) { + digits = gl_barcode_get_prefered_n(id); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->data_digits_spin), + digits); + } + + ex_string = gl_barcode_default_digits (id, digits); + gtk_label_set_text (GTK_LABEL(editor->priv->data_ex_label), ex_string); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->data_literal_radio))) { + gtk_widget_set_sensitive (editor->priv->data_format_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_ex_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_digits_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_digits_spin, FALSE); + } else { + gtk_widget_set_sensitive (editor->priv->data_format_label, TRUE); + gtk_widget_set_sensitive (editor->priv->data_ex_label, TRUE); + gtk_widget_set_sensitive (editor->priv->data_digits_label, + !editor->priv->data_format_fixed_flag); + gtk_widget_set_sensitive (editor->priv->data_digits_spin, + !editor->priv->data_format_fixed_flag); + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + } + + g_free (style_string); + g_free (ex_string); +} + + +/*****************************************************************************/ +/* Set barcode style. */ +/*****************************************************************************/ +void +gl_object_editor_set_bc_style (glObjectEditor *editor, + gchar *id, + gboolean text_flag, + gboolean checksum_flag, + guint format_digits) +{ + const gchar *style_string; + gchar *ex_string; + + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + style_string = gl_barcode_id_to_name (id); + + gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->bc_style_combo), + style_string); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->bc_text_check), + text_flag); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->bc_cs_check), + checksum_flag); + + gtk_widget_set_sensitive (editor->priv->bc_text_check, + gl_barcode_text_optional (id)); + gtk_widget_set_sensitive (editor->priv->bc_cs_check, + gl_barcode_csum_optional (id)); + + editor->priv->data_format_fixed_flag = !gl_barcode_can_freeform (id); + + if (editor->priv->data_format_fixed_flag) { + format_digits = gl_barcode_get_prefered_n (id); + } + + ex_string = gl_barcode_default_digits (id, format_digits); + gtk_label_set_text (GTK_LABEL(editor->priv->data_ex_label), ex_string); + g_free (ex_string); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->data_digits_spin), + format_digits); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->data_literal_radio))) { + gtk_widget_set_sensitive (editor->priv->data_format_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_ex_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_digits_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_digits_spin, FALSE); + } else { + gtk_widget_set_sensitive (editor->priv->data_format_label, TRUE); + gtk_widget_set_sensitive (editor->priv->data_ex_label, TRUE); + gtk_widget_set_sensitive (editor->priv->data_digits_label, + !editor->priv->data_format_fixed_flag); + gtk_widget_set_sensitive (editor->priv->data_digits_spin, + !editor->priv->data_format_fixed_flag); + } + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query barcode style. */ +/*****************************************************************************/ +void +gl_object_editor_get_bc_style (glObjectEditor *editor, + gchar **id, + gboolean *text_flag, + gboolean *checksum_flag, + guint *format_digits) +{ + gchar *style_string; + + gl_debug (DEBUG_EDITOR, "START"); + + style_string = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_style_combo)); + *id = g_strdup (gl_barcode_name_to_id (style_string)); + + *text_flag = + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->bc_text_check)); + + *checksum_flag = + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->bc_cs_check)); + + + *format_digits = + gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->data_digits_spin)); + + g_free (style_string); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set bc color. */ +/*****************************************************************************/ +void +gl_object_editor_set_bc_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *color_node) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_widget_set_sensitive (editor->priv->bc_key_radio, merge_flag); + + if ( color_node->color == GL_COLOR_NONE ) { + + gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->bc_color_combo)); + + } else { + + gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->bc_color_combo), + color_node->color); + } + + if (!color_node->field_flag) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->bc_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->bc_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->bc_key_combo, FALSE); + + } else { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->bc_key_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->bc_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->bc_key_combo, TRUE); + + gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->bc_key_combo), + color_node->key); + } + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query bc color. */ +/*****************************************************************************/ +glColorNode* +gl_object_editor_get_bc_color (glObjectEditor *editor) +{ + guint color; + glColorNode *color_node; + gboolean is_default; + + gl_debug (DEBUG_EDITOR, "START"); + + color_node = gl_color_node_new_default (); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->bc_key_radio))) { + color_node->field_flag = TRUE; + color_node->color = gl_prefs->default_line_color; + color_node->key = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->bc_key_combo)); + } else { + color_node->field_flag = FALSE; + color_node->key = NULL; + color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->bc_color_combo), + &is_default); + + if (is_default) { + color_node->color = gl_prefs->default_line_color; + } else { + color_node->color = color; + } + } + + gl_debug (DEBUG_EDITOR, "END"); + + return color_node; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. barcode color radio callback. */ +/*--------------------------------------------------------------------------*/ +static void +bc_radio_toggled_cb (glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->bc_color_radio))) { + gtk_widget_set_sensitive (editor->priv->bc_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->bc_key_combo, FALSE); + } else { + gtk_widget_set_sensitive (editor->priv->bc_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->bc_key_combo, TRUE); + + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-data-page.c b/src/object-editor-data-page.c new file mode 100644 index 00000000..728a36d7 --- /dev/null +++ b/src/object-editor-data-page.c @@ -0,0 +1,242 @@ +/* + * object-editor-data-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include +#include + +#include "prefs.h" +#include "combo-util.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void data_radio_toggled_cb (glObjectEditor *editor); + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare data page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_data_page (glObjectEditor *editor) +{ + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "data_page_vbox", &editor->priv->data_page_vbox, + "data_literal_radio", &editor->priv->data_literal_radio, + "data_key_radio", &editor->priv->data_key_radio, + "data_text_entry", &editor->priv->data_text_entry, + "data_key_combo", &editor->priv->data_key_combo, + NULL); + + gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->data_key_combo)); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->data_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->data_text_entry), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->data_key_combo), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->data_literal_radio), + "toggled", + G_CALLBACK (data_radio_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->data_key_radio), + "toggled", + G_CALLBACK (data_radio_toggled_cb), + G_OBJECT (editor)); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. data radio callback. */ +/*--------------------------------------------------------------------------*/ +static void +data_radio_toggled_cb (glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_WDGT, "START"); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->data_literal_radio))) { + gtk_widget_set_sensitive (editor->priv->data_text_entry, TRUE); + gtk_widget_set_sensitive (editor->priv->data_key_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->data_format_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_ex_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_digits_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_digits_spin, FALSE); + } else { + gtk_widget_set_sensitive (editor->priv->data_text_entry, FALSE); + gtk_widget_set_sensitive (editor->priv->data_key_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->data_format_label, TRUE); + gtk_widget_set_sensitive (editor->priv->data_ex_label, TRUE); + gtk_widget_set_sensitive (editor->priv->data_digits_label, + !editor->priv->data_format_fixed_flag); + gtk_widget_set_sensitive (editor->priv->data_digits_spin, + !editor->priv->data_format_fixed_flag); + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + + gl_debug (DEBUG_WDGT, "END"); +} + + +/*****************************************************************************/ +/* Set data. */ +/*****************************************************************************/ +void +gl_object_editor_set_data (glObjectEditor *editor, + gboolean merge_flag, + glTextNode *text_node) +{ + gint pos; + + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_widget_set_sensitive (editor->priv->data_key_radio, merge_flag); + + if (!text_node->field_flag) { + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->data_literal_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->data_text_entry, TRUE); + gtk_widget_set_sensitive (editor->priv->data_key_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->data_format_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_ex_label, FALSE); + gtk_widget_set_sensitive (editor->priv->data_digits_spin, FALSE); + gtk_widget_set_sensitive (editor->priv->data_digits_label, FALSE); + + gtk_editable_delete_text (GTK_EDITABLE (editor->priv->data_text_entry), 0, -1); + pos = 0; + if (text_node->data != NULL ) { + gtk_editable_insert_text (GTK_EDITABLE (editor->priv->data_text_entry), + text_node->data, + strlen (text_node->data), + &pos); + } + + } else { + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->data_key_radio), TRUE); + + gtk_widget_set_sensitive (editor->priv->data_text_entry, FALSE); + gtk_widget_set_sensitive (editor->priv->data_key_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->data_format_label, TRUE); + gtk_widget_set_sensitive (editor->priv->data_ex_label, TRUE); + gtk_widget_set_sensitive (editor->priv->data_digits_label, + !editor->priv->data_format_fixed_flag); + gtk_widget_set_sensitive (editor->priv->data_digits_spin, + !editor->priv->data_format_fixed_flag); + + + gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo), + text_node->data); + } + + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query data. */ +/*****************************************************************************/ +glTextNode * +gl_object_editor_get_data (glObjectEditor *editor) +{ + glTextNode *text_node; + + gl_debug (DEBUG_EDITOR, "START"); + + text_node = g_new0(glTextNode,1); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->data_literal_radio))) { + text_node->field_flag = FALSE; + text_node->data = + gtk_editable_get_chars (GTK_EDITABLE (editor->priv->data_text_entry), + 0, -1); + } else { + text_node->field_flag = TRUE; + text_node->data = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->data_key_combo)); + } + + gl_debug (DEBUG_EDITOR, "text_node: field_flag=%d, data=%s", + text_node->field_flag, text_node->data); + + gl_debug (DEBUG_EDITOR, "END"); + + return text_node; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-edit-page.c b/src/object-editor-edit-page.c new file mode 100644 index 00000000..0e52015a --- /dev/null +++ b/src/object-editor-edit-page.c @@ -0,0 +1,159 @@ +/* + * object-editor-edit-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "color.h" +#include "wdgt-merge-menu.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void insert_button_cb (glObjectEditor *editor); + +static void field_selected_cb (glObjectEditor *editor, gchar *field); + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare size page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_edit_page (glObjectEditor *editor) +{ + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "edit_page_vbox", &editor->priv->edit_page_vbox, + "edit_text_view", &editor->priv->edit_text_view, + "edit_insert_field_button", &editor->priv->edit_insert_field_button, + NULL); + + editor->priv->edit_insert_field_menu = gl_wdgt_merge_menu_new (); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->edit_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->edit_insert_field_button), + "clicked", + G_CALLBACK (insert_button_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->edit_insert_field_menu), + "field_selected", + G_CALLBACK (field_selected_cb), + G_OBJECT (editor)); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Menu item activated callback. */ +/*--------------------------------------------------------------------------*/ +static void +field_selected_cb (glObjectEditor *editor, gchar *field) +{ + GtkTextBuffer *buffer; + gchar *field_string; + + gl_debug (DEBUG_EDITOR, "START"); + + field_string = g_strdup_printf ("${%s}", field); + gl_debug (DEBUG_WDGT, "Inserting %s", field_string); + + buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->priv->edit_text_view)); + gtk_text_buffer_insert_at_cursor (buffer, field_string, -1); + + g_free (field_string); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Insert button callback. */ +/*--------------------------------------------------------------------------*/ +static void +insert_button_cb (glObjectEditor *editor) +{ + gl_debug (DEBUG_EDITOR, "START"); + + gtk_widget_show_all (editor->priv->edit_insert_field_menu); + gtk_menu_popup (GTK_MENU (editor->priv->edit_insert_field_menu), + NULL, NULL, NULL, NULL, 1, gtk_get_current_event_time ()); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set text buffer as model for text view/editor. */ +/*****************************************************************************/ +void +gl_object_editor_set_text_buffer (glObjectEditor *editor, + GtkTextBuffer *buffer) +{ + gl_debug (DEBUG_EDITOR, "START"); + + gtk_text_view_set_buffer (GTK_TEXT_VIEW(editor->priv->edit_text_view), buffer); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-fill-page.c b/src/object-editor-fill-page.c new file mode 100644 index 00000000..b1143d2c --- /dev/null +++ b/src/object-editor-fill-page.c @@ -0,0 +1,235 @@ +/* + * object-editor-fill-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "color-combo.h" +#include "color.h" +#include "combo-util.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void fill_radio_toggled_cb (glObjectEditor *editor); + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare fill page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_fill_page (glObjectEditor *editor) +{ + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "fill_page_vbox", &editor->priv->fill_page_vbox, + "fill_color_hbox", &editor->priv->fill_color_hbox, + "fill_key_combo", &editor->priv->fill_key_combo, + "fill_key_radio", &editor->priv->fill_key_radio, + "fill_color_radio", &editor->priv->fill_color_radio, + NULL); + + editor->priv->fill_color_combo = gl_color_combo_new (_("No Fill"), + GL_COLOR_NO_FILL, + gl_prefs->default_fill_color); + gtk_box_pack_start (GTK_BOX (editor->priv->fill_color_hbox), + editor->priv->fill_color_combo, + FALSE, FALSE, 0); + + gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->fill_key_combo)); + + /* Modify widgets based on configuration */ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->fill_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->fill_key_combo, FALSE); + gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->fill_color_combo), + gl_prefs->default_fill_color); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->fill_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->fill_color_combo), + "color_changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->fill_key_combo), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->fill_color_radio), + "toggled", + G_CALLBACK (fill_radio_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->fill_key_radio), + "toggled", + G_CALLBACK (fill_radio_toggled_cb), + G_OBJECT (editor)); + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set fill color. */ +/*****************************************************************************/ +void +gl_object_editor_set_fill_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *color_node) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_widget_set_sensitive (editor->priv->fill_key_radio, merge_flag); + + if ( color_node->color == GL_COLOR_NONE ) { + + gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->fill_color_combo)); + + } else { + + gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->fill_color_combo), + color_node->color); + + } + + if (!color_node->field_flag) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->fill_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->fill_key_combo, FALSE); + + } else { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->fill_key_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->fill_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->fill_key_combo, TRUE); + + gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->fill_key_combo), + color_node->key); + } + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query fill color. */ +/*****************************************************************************/ +glColorNode* +gl_object_editor_get_fill_color (glObjectEditor *editor) +{ + guint color; + gboolean is_default; + glColorNode *color_node; + + gl_debug (DEBUG_EDITOR, "START"); + + color_node = gl_color_node_new_default (); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->fill_key_radio))) { + color_node->field_flag = TRUE; + color_node->key = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->fill_key_combo)); + } else { + color_node->field_flag = FALSE; + color_node->key = NULL; + color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->fill_color_combo), + &is_default); + + if (!is_default) { + color_node->color = color; + } + } + + gl_debug (DEBUG_EDITOR, "END"); + + return color_node; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. fill radio callback. */ +/*--------------------------------------------------------------------------*/ +static void +fill_radio_toggled_cb (glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->fill_color_radio))) { + gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->fill_key_combo, FALSE); + } else { + gtk_widget_set_sensitive (editor->priv->fill_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->fill_key_combo, TRUE); + + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-image-page.c b/src/object-editor-image-page.c new file mode 100644 index 00000000..de649ab4 --- /dev/null +++ b/src/object-editor-image-page.c @@ -0,0 +1,361 @@ +/* + * object-editor-image-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "combo-util.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void img_radio_toggled_cb (glObjectEditor *editor); + +static void update_preview_cb (GtkFileChooser *file_chooser, + gpointer data); +static void add_image_filters_to_chooser (GtkFileChooser *file_chooser); + +static void img_selection_changed_cb (glObjectEditor *editor); + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare image page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_image_page (glObjectEditor *editor) +{ + GtkWidget *preview; + + + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "img_page_vbox", &editor->priv->img_page_vbox, + "img_file_radio", &editor->priv->img_file_radio, + "img_key_radio", &editor->priv->img_key_radio, + "img_file_button", &editor->priv->img_file_button, + "img_key_combo", &editor->priv->img_key_combo, + NULL); + + gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->img_key_combo)); + + /* Modify file button properties. */ + add_image_filters_to_chooser (GTK_FILE_CHOOSER (editor->priv->img_file_button)); + preview = gtk_image_new (); + gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (editor->priv->img_file_button), preview); + g_signal_connect (G_OBJECT (editor->priv->img_file_button), + "update-preview", + G_CALLBACK (update_preview_cb), preview); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->img_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->img_file_button), + "selection-changed", + G_CALLBACK (img_selection_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->img_key_combo), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->img_file_radio), + "toggled", + G_CALLBACK (img_radio_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->img_key_radio), + "toggled", + G_CALLBACK (img_radio_toggled_cb), + G_OBJECT (editor)); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. image radio callback. */ +/*--------------------------------------------------------------------------*/ +static void +img_radio_toggled_cb (glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_WDGT, "START"); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->img_file_radio))) { + gtk_widget_set_sensitive (editor->priv->img_file_button, TRUE); + gtk_widget_set_sensitive (editor->priv->img_key_combo, FALSE); + } else { + gtk_widget_set_sensitive (editor->priv->img_file_button, FALSE); + gtk_widget_set_sensitive (editor->priv->img_key_combo, TRUE); + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + + gl_debug (DEBUG_WDGT, "END"); +} + + +/*****************************************************************************/ +/* Set image. */ +/*****************************************************************************/ +void +gl_object_editor_set_image (glObjectEditor *editor, + gboolean merge_flag, + glTextNode *text_node) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_widget_set_sensitive (editor->priv->img_key_radio, merge_flag); + + if (!text_node->field_flag) { + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->img_file_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->img_file_button, TRUE); + gtk_widget_set_sensitive (editor->priv->img_key_combo, FALSE); + + if (text_node->data != NULL ) { + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER(editor->priv->img_file_button), + text_node->data); + } else { + gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER(editor->priv->img_file_button)); + } + } else { + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->img_key_radio), TRUE); + + gtk_widget_set_sensitive (editor->priv->img_file_button, FALSE); + gtk_widget_set_sensitive (editor->priv->img_key_combo, TRUE); + + gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->img_key_combo), + text_node->data); + } + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query image. */ +/*****************************************************************************/ +glTextNode * +gl_object_editor_get_image (glObjectEditor *editor) +{ + glTextNode *text_node; + + gl_debug (DEBUG_EDITOR, "START"); + + text_node = g_new0(glTextNode,1); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->img_file_radio))) { + text_node->field_flag = FALSE; + text_node->data = + gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(editor->priv->img_file_button)); + } else { + text_node->field_flag = TRUE; + text_node->data = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->img_key_combo)); + } + + gl_debug (DEBUG_EDITOR, "text_node: field_flag=%d, data=%s", + text_node->field_flag, text_node->data); + + gl_debug (DEBUG_EDITOR, "END"); + + return text_node; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Update preview image. */ +/*--------------------------------------------------------------------------*/ +static void +update_preview_cb (GtkFileChooser *file_chooser, gpointer data) +{ + GtkWidget *preview; + char *filename; + GdkPixbuf *pixbuf; + gboolean have_preview; + + preview = GTK_WIDGET (data); + filename = gtk_file_chooser_get_preview_filename (file_chooser); + + if (filename) { + pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL); + have_preview = (pixbuf != NULL); + g_free (filename); + + gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf); + g_object_unref (G_OBJECT (pixbuf)); + + gtk_file_chooser_set_preview_widget_active (file_chooser, + have_preview); + } else { + gtk_file_chooser_set_preview_widget_active (file_chooser, FALSE); + } +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add filters to file chooser. */ +/* Based on eog's eog_file_selection_add_filter(). */ +/*--------------------------------------------------------------------------*/ +static void +add_image_filters_to_chooser (GtkFileChooser *chooser) +{ + GtkFileFilter *all_file_filter; + GtkFileFilter *all_img_filter; + GSList *formats; + GSList *it; + GtkFileFilter *filter; + GSList *filters = NULL; + gchar **mime_types, **pattern, *tmp; + int i; + + /* All Files Filter */ + all_file_filter = gtk_file_filter_new (); + gtk_file_filter_set_name (all_file_filter, _("All Files")); + gtk_file_filter_add_pattern (all_file_filter, "*"); + + /* All Image Filter */ + all_img_filter = gtk_file_filter_new (); + gtk_file_filter_set_name (all_img_filter, _("All Images")); + + /* Individual image filters */ + formats = gdk_pixbuf_get_formats (); + for (it = formats; it != NULL; it = it->next) { + gchar *filter_name; + GdkPixbufFormat *format; + filter = gtk_file_filter_new (); + gchar *description, *name; + + format = (GdkPixbufFormat*) it->data; + + /* Filter name: First description then file extension, eg. "The PNG-Format (*.png)".*/ + description = gdk_pixbuf_format_get_description (format); + name = gdk_pixbuf_format_get_name (format); + filter_name = g_strdup_printf (_("%s (*.%s)"), description, name); + g_free (description); + g_free (name); + gtk_file_filter_set_name (filter, filter_name); + g_free (filter_name); + + mime_types = gdk_pixbuf_format_get_mime_types ((GdkPixbufFormat *) it->data); + for (i = 0; mime_types[i] != NULL; i++) { + gtk_file_filter_add_mime_type (filter, mime_types[i]); + gtk_file_filter_add_mime_type (all_img_filter, mime_types[i]); + } + g_strfreev (mime_types); + + pattern = gdk_pixbuf_format_get_extensions ((GdkPixbufFormat *) it->data); + for (i = 0; pattern[i] != NULL; i++) { + tmp = g_strconcat ("*.", pattern[i], NULL); + gtk_file_filter_add_pattern (filter, tmp); + gtk_file_filter_add_pattern (all_img_filter, tmp); + g_free (tmp); + } + g_strfreev (pattern); + + filters = g_slist_prepend (filters, filter); + } + g_slist_free (formats); + + /* Add filter to filechooser */ + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), all_file_filter); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), all_img_filter); + gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), all_img_filter); + + for (it = filters; it != NULL; it = it->next) { + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), + GTK_FILE_FILTER (it->data)); + } + g_slist_free (filters); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Selection changed callback. */ +/*--------------------------------------------------------------------------*/ +static void +img_selection_changed_cb (glObjectEditor *editor) +{ + gchar *filename; + + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(editor->priv->img_file_button)); + if (filename != NULL) + { + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + } + g_free (filename); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-line-page.c b/src/object-editor-line-page.c new file mode 100644 index 00000000..a7c2f582 --- /dev/null +++ b/src/object-editor-line-page.c @@ -0,0 +1,282 @@ +/* + * object-editor-line-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "color-combo.h" +#include "color.h" +#include "combo-util.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ +static void line_radio_toggled_cb (glObjectEditor *editor); + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare line page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_line_page (glObjectEditor *editor) +{ + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "line_page_vbox", &editor->priv->line_page_vbox, + "line_width_spin", &editor->priv->line_width_spin, + "line_color_hbox", &editor->priv->line_color_hbox, + "line_key_combo", &editor->priv->line_key_combo, + "line_key_radio", &editor->priv->line_key_radio, + "line_color_radio", &editor->priv->line_color_radio, + NULL); + + editor->priv->line_color_combo = gl_color_combo_new (_("No Line"), + GL_COLOR_NO_LINE, + gl_prefs->default_line_color); + gtk_box_pack_start (GTK_BOX (editor->priv->line_color_hbox), + editor->priv->line_color_combo, + FALSE, FALSE, 0); + + gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->line_key_combo)); + + /* Modify widgets based on configuration */ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->line_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->line_key_combo, FALSE); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->line_width_spin), + gl_prefs->default_line_width); + gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->line_color_combo), + gl_prefs->default_line_color); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->line_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->line_width_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->line_color_combo), + "color_changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->line_key_combo), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->line_color_radio), + "toggled", + G_CALLBACK (line_radio_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->line_key_radio), + "toggled", + G_CALLBACK (line_radio_toggled_cb), + G_OBJECT (editor)); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set line width. */ +/*****************************************************************************/ +void +gl_object_editor_set_line_width (glObjectEditor *editor, + gdouble width) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + /* Set widget values */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->line_width_spin), + width); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query line width. */ +/*****************************************************************************/ +gdouble +gl_object_editor_get_line_width (glObjectEditor *editor) +{ + gdouble w; + + gl_debug (DEBUG_EDITOR, "START"); + + w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->line_width_spin)); + + gl_debug (DEBUG_EDITOR, "END"); + + return w; +} + + +/*****************************************************************************/ +/* Set line color. */ +/*****************************************************************************/ +void +gl_object_editor_set_line_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *color_node) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gl_debug (DEBUG_EDITOR, "color field %s(%d) / %X", color_node->key, color_node->field_flag, color_node->color); + gtk_widget_set_sensitive (editor->priv->line_key_radio, merge_flag); + + if ( color_node->color == GL_COLOR_NONE ) { + + gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->line_color_combo)); + + } else { + + gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->line_color_combo), + color_node->color); + + } + + if (!color_node->field_flag) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->line_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->line_key_combo, FALSE); + + } else { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->line_key_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->line_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->line_key_combo, TRUE); + + gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->line_key_combo), + color_node->key); + } + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query line color. */ +/*****************************************************************************/ +glColorNode* +gl_object_editor_get_line_color (glObjectEditor *editor) +{ + guint color; + gboolean is_default; + glColorNode *color_node; + + gl_debug (DEBUG_EDITOR, "START"); + + color_node = gl_color_node_new_default (); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->line_key_radio))) { + color_node->field_flag = TRUE; + color_node->key = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->line_key_combo)); + } else { + color_node->field_flag = FALSE; + color_node->key = NULL; + color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->line_color_combo), + &is_default); + + if (!is_default) { + color_node->color = color; + } + } + + gl_debug (DEBUG_EDITOR, "END"); + + return color_node; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. line color radio callback. */ +/*--------------------------------------------------------------------------*/ +static void +line_radio_toggled_cb (glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->line_color_radio))) { + gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->line_key_combo, FALSE); + } else { + gtk_widget_set_sensitive (editor->priv->line_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->line_key_combo, TRUE); + + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-lsize-page.c b/src/object-editor-lsize-page.c new file mode 100644 index 00000000..a832f094 --- /dev/null +++ b/src/object-editor-lsize-page.c @@ -0,0 +1,270 @@ +/* + * object-editor-lsize-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + +#define LENGTH(x,y) sqrt( (x)*(x) + (y)*(y) ) +#define ANGLE(x,y) ( (180.0/G_PI)*atan2( -(y), (x) ) ) +#define COMP_X(l,a) ( (l) * cos( (G_PI/180.0)*(a) ) ) +#define COMP_Y(l,a) ( -(l) * sin( (G_PI/180.0)*(a) ) ) + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare line size page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_lsize_page (glObjectEditor *editor) +{ + const gchar *units_string; + gdouble climb_rate; + gint digits; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "lsize_page_vbox", &editor->priv->lsize_page_vbox, + "lsize_r_spin", &editor->priv->lsize_r_spin, + "lsize_theta_spin", &editor->priv->lsize_theta_spin, + "lsize_r_units_label", &editor->priv->lsize_r_units_label, + NULL); + + /* Get configuration information */ + units_string = gl_prefs_get_units_string (); + editor->priv->units_per_point = gl_prefs_get_units_per_point (); + climb_rate = gl_prefs_get_units_step_size (); + digits = gl_prefs_get_units_precision (); + + /* Modify widgets based on configuration */ + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->lsize_r_spin), digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->lsize_r_spin), + climb_rate, 0); + gtk_label_set_text (GTK_LABEL(editor->priv->lsize_r_units_label), units_string); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->lsize_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->lsize_r_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->lsize_theta_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set line size. */ +/*****************************************************************************/ +void +gl_object_editor_set_lsize (glObjectEditor *editor, + gdouble dx, + gdouble dy) +{ + gdouble r, theta; + + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + /* save a copy in internal units */ + editor->priv->dx = dx; + editor->priv->dy = dy; + + /* convert internal units to displayed units */ + gl_debug (DEBUG_EDITOR, "internal dx,dy = %g, %g", dx, dy); + dx *= editor->priv->units_per_point; + dy *= editor->priv->units_per_point; + gl_debug (DEBUG_EDITOR, "display dx,dy = %g, %g", dx, dy); + + r = LENGTH (dx, dy); + theta = ANGLE (dx, dy); + + /* Set widget values */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin), r); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->lsize_theta_spin), + theta); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set maximum line size. */ +/*****************************************************************************/ +void +gl_object_editor_set_max_lsize (glObjectEditor *editor, + gdouble dx_max, + gdouble dy_max) +{ + gdouble tmp; + + gl_debug (DEBUG_EDITOR, "START"); + + if (editor->priv->lsize_page_vbox) + { + + editor->priv->stop_signals = TRUE; + + /* save a copy in internal units */ + editor->priv->dx_max = dx_max; + editor->priv->dy_max = dy_max; + + /* convert internal units to displayed units */ + gl_debug (DEBUG_EDITOR, "internal dx_max,dy_max = %g, %g", dx_max, dy_max); + dx_max *= editor->priv->units_per_point; + dy_max *= editor->priv->units_per_point; + gl_debug (DEBUG_EDITOR, "display dx_max,dy_max = %g, %g", dx_max, dy_max); + + /* Set widget values */ + tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin)); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin), + 0.0, 2.0*LENGTH (dx_max, dy_max)); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin), tmp); + + editor->priv->stop_signals = FALSE; + + } + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query line size. */ +/*****************************************************************************/ +void +gl_object_editor_get_lsize (glObjectEditor *editor, + gdouble *dx, + gdouble *dy) +{ + gdouble r, theta; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Get values from widgets */ + r = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->lsize_r_spin)); + theta = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->lsize_theta_spin)); + + /* convert everything back to our internal units (points) */ + r /= editor->priv->units_per_point; + + *dx = COMP_X (r, theta); + *dy = COMP_Y (r, theta); + + /* save a copy in internal units */ + editor->priv->dx = *dx; + editor->priv->dy = *dy; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* PRIVATE. Prefs changed callback. Update units related items. */ +/*****************************************************************************/ +void +lsize_prefs_changed_cb (glObjectEditor *editor) +{ + const gchar *units_string; + gdouble climb_rate; + gint digits; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Get new configuration information */ + units_string = gl_prefs_get_units_string (); + editor->priv->units_per_point = gl_prefs_get_units_per_point (); + climb_rate = gl_prefs_get_units_step_size (); + digits = gl_prefs_get_units_precision (); + + /* Update characteristics of r_spin */ + editor->priv->stop_signals = TRUE; + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->lsize_r_spin), + digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->lsize_r_spin), + climb_rate, 0); + editor->priv->stop_signals = FALSE; + + /* Update r_units_label */ + gtk_label_set_text (GTK_LABEL(editor->priv->lsize_r_units_label), + units_string); + + /* Update values of r_spin/theta_spin */ + gl_object_editor_set_lsize (editor, + editor->priv->dx, + editor->priv->dy); + gl_object_editor_set_max_lsize (editor, + editor->priv->dx_max, + editor->priv->dy_max); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-position-page.c b/src/object-editor-position-page.c new file mode 100644 index 00000000..6ea9a869 --- /dev/null +++ b/src/object-editor-position-page.c @@ -0,0 +1,265 @@ +/* + * object-editor-position-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare position page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_position_page (glObjectEditor *editor) +{ + const gchar *units_string; + gdouble climb_rate; + gint digits; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "pos_page_vbox", &editor->priv->pos_page_vbox, + "pos_x_spin", &editor->priv->pos_x_spin, + "pos_y_spin", &editor->priv->pos_y_spin, + "pos_x_units_label", &editor->priv->pos_x_units_label, + "pos_y_units_label", &editor->priv->pos_y_units_label, + NULL); + + /* Get configuration information */ + units_string = gl_prefs_get_units_string (); + editor->priv->units_per_point = gl_prefs_get_units_per_point (); + climb_rate = gl_prefs_get_units_step_size (); + digits = gl_prefs_get_units_precision (); + + /* Modify widgets based on configuration */ + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->pos_x_spin), digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->pos_x_spin), + climb_rate, 10.0*climb_rate); + gtk_label_set_text (GTK_LABEL(editor->priv->pos_x_units_label), units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->pos_y_spin), digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->pos_y_spin), + climb_rate, 10.0*climb_rate); + gtk_label_set_text (GTK_LABEL(editor->priv->pos_y_units_label), units_string); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->pos_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->pos_x_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->pos_y_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set position. */ +/*****************************************************************************/ +void +gl_object_editor_set_position (glObjectEditor *editor, + gdouble x, + gdouble y) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + /* save a copy in internal units */ + editor->priv->x = x; + editor->priv->y = y; + + /* convert internal units to displayed units */ + gl_debug (DEBUG_EDITOR, "internal x,y = %g, %g", x, y); + x *= editor->priv->units_per_point; + y *= editor->priv->units_per_point; + gl_debug (DEBUG_EDITOR, "display x,y = %g, %g", x, y); + + /* Set widget values */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin), x); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin), y); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set maximum position. */ +/*****************************************************************************/ +void +gl_object_editor_set_max_position (glObjectEditor *editor, + gdouble x_max, + gdouble y_max) +{ + gdouble tmp; + + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + /* save a copy in internal units */ + editor->priv->x_max = x_max; + editor->priv->y_max = y_max; + + /* convert internal units to displayed units */ + gl_debug (DEBUG_EDITOR, "internal x_max,y_max = %g, %g", x_max, y_max); + x_max *= editor->priv->units_per_point; + y_max *= editor->priv->units_per_point; + gl_debug (DEBUG_EDITOR, "display x_max,y_max = %g, %g", x_max, y_max); + + /* Set widget values */ + tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin)); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->pos_x_spin), + -x_max, 2.0*x_max); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin), tmp); + tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin)); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->pos_y_spin), + -y_max, 2.0*y_max); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin), tmp); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query position. */ +/*****************************************************************************/ +void +gl_object_editor_get_position (glObjectEditor *editor, + gdouble *x, + gdouble *y) +{ + gl_debug (DEBUG_EDITOR, "START"); + + /* Get values from widgets */ + *x = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_x_spin)); + *y = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->pos_y_spin)); + + /* convert everything back to our internal units (points) */ + *x /= editor->priv->units_per_point; + *y /= editor->priv->units_per_point; + + /* save a copy in internal units */ + editor->priv->x = *x; + editor->priv->y = *y; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* PRIVATE. Prefs changed callback. Update units related items. */ +/*****************************************************************************/ +void +position_prefs_changed_cb (glObjectEditor *editor) +{ + const gchar *units_string; + gdouble climb_rate; + gint digits; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Get new configuration information */ + units_string = gl_prefs_get_units_string (); + editor->priv->units_per_point = gl_prefs_get_units_per_point (); + climb_rate = gl_prefs_get_units_step_size (); + digits = gl_prefs_get_units_precision (); + + /* Update characteristics of x_spin/y_spin */ + editor->priv->stop_signals = TRUE; + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->pos_x_spin), + digits); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->pos_y_spin), + digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->pos_x_spin), + climb_rate, 10.0*climb_rate); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->pos_y_spin), + climb_rate, 10.0*climb_rate); + editor->priv->stop_signals = FALSE; + + /* Update units_labels */ + gtk_label_set_text (GTK_LABEL(editor->priv->pos_x_units_label), + units_string); + gtk_label_set_text (GTK_LABEL(editor->priv->pos_y_units_label), + units_string); + + /* Update values of x_spin/y_spin */ + gl_object_editor_set_position (editor, + editor->priv->x, + editor->priv->y); + gl_object_editor_set_max_position (editor, + editor->priv->x_max, + editor->priv->y_max); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-private.h b/src/object-editor-private.h new file mode 100644 index 00000000..68580759 --- /dev/null +++ b/src/object-editor-private.h @@ -0,0 +1,217 @@ +/* + * object-editor-private.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __OBJECT_EDITOR_PRIVATE_H__ +#define __OBJECT_EDITOR_PRIVATE_H__ + +#include + +G_BEGIN_DECLS + +struct _glObjectEditorPrivate { + + GtkBuilder *builder; + GtkWidget *editor_vbox; + + glLabel *label; + + gdouble units_per_point; + + GtkWidget *title_image; + GtkWidget *title_label; + GtkWidget *notebook; + + GtkWidget *pos_page_vbox; + GtkWidget *pos_x_spin; + GtkWidget *pos_y_spin; + GtkWidget *pos_x_units_label; + GtkWidget *pos_y_units_label; + gdouble x; + gdouble y; + gdouble x_max; + gdouble y_max; + + GtkWidget *size_page_vbox; + GtkWidget *size_w_spin; + GtkWidget *size_h_spin; + GtkWidget *size_w_units_label; + GtkWidget *size_h_units_label; + GtkWidget *size_aspect_vbox; + GtkWidget *size_aspect_checkbutton; + GtkWidget *size_reset_image_button; + gdouble size_aspect_ratio; + gdouble w; + gdouble h; + gdouble w_max; + gdouble h_max; + gdouble w_base; + gdouble h_base; + + GtkWidget *lsize_page_vbox; + GtkWidget *lsize_r_spin; + GtkWidget *lsize_theta_spin; + GtkWidget *lsize_r_units_label; + gdouble dx; + gdouble dy; + gdouble dx_max; + gdouble dy_max; + + GtkWidget *fill_page_vbox; + GtkWidget *fill_color_hbox; + GtkWidget *fill_color_combo; + GtkWidget *fill_key_combo; + GtkWidget *fill_key_radio; + GtkWidget *fill_color_radio; + + GtkWidget *line_page_vbox; + GtkWidget *line_width_spin; + GtkWidget *line_color_radio; + GtkWidget *line_color_hbox; + GtkWidget *line_color_combo; + GtkWidget *line_key_radio; + GtkWidget *line_key_combo; + + GtkWidget *img_page_vbox; + GtkWidget *img_file_radio; + GtkWidget *img_key_radio; + GtkWidget *img_file_button; + GtkWidget *img_key_combo; + + GtkWidget *text_page_vbox; + GtkWidget *text_family_hbox; + GtkWidget *text_family_combo; + GtkWidget *text_size_spin; + GtkWidget *text_bold_toggle; + GtkWidget *text_italic_toggle; + GtkWidget *text_color_radio; + GtkWidget *text_color_hbox; + GtkWidget *text_color_combo; + GtkWidget *text_color_key_radio; + GtkWidget *text_color_key_combo; + GtkWidget *text_left_toggle; + GtkWidget *text_center_toggle; + GtkWidget *text_right_toggle; + GtkWidget *text_line_spacing_spin; + GtkWidget *text_auto_shrink_check; + + GtkWidget *edit_page_vbox; + GtkWidget *edit_text_view; + GtkWidget *edit_insert_field_button; + GtkWidget *edit_insert_field_menu; + + GtkWidget *bc_page_vbox; + GtkWidget *bc_style_combo; + GtkWidget *bc_text_check; + GtkWidget *bc_cs_check; + GtkWidget *bc_color_radio; + GtkWidget *bc_color_hbox; + GtkWidget *bc_color_combo; + GtkWidget *bc_key_radio; + GtkWidget *bc_key_combo; + + GtkWidget *data_page_vbox; + GtkWidget *data_literal_radio; + GtkWidget *data_key_radio; + GtkWidget *data_text_entry; + GtkWidget *data_key_combo; + GtkWidget *data_format_label; + GtkWidget *data_ex_label; + GtkWidget *data_digits_label; + GtkWidget *data_digits_spin; + gboolean data_format_fixed_flag; + + GtkWidget *shadow_page_vbox; + GtkWidget *shadow_enable_check; + GtkWidget *shadow_controls_table; + GtkWidget *shadow_x_spin; + GtkWidget *shadow_y_spin; + GtkWidget *shadow_x_units_label; + GtkWidget *shadow_y_units_label; + GtkWidget *shadow_color_radio; + GtkWidget *shadow_key_radio; + GtkWidget *shadow_color_hbox; + GtkWidget *shadow_color_combo; + GtkWidget *shadow_key_combo; + GtkWidget *shadow_opacity_spin; + gdouble shadow_x; + gdouble shadow_y; + gdouble shadow_x_max; + gdouble shadow_y_max; + + /* Prevent recursion */ + gboolean stop_signals; +}; + +enum { + CHANGED, + SIZE_CHANGED, + LAST_SIGNAL +}; + +extern gint gl_object_editor_signals[LAST_SIGNAL]; + + + +void gl_object_editor_prepare_position_page (glObjectEditor *editor); + +void gl_object_editor_prepare_size_page (glObjectEditor *editor, + glObjectEditorOption option); + +void gl_object_editor_prepare_lsize_page (glObjectEditor *editor); + +void gl_object_editor_prepare_fill_page (glObjectEditor *editor); + +void gl_object_editor_prepare_line_page (glObjectEditor *editor); + +void gl_object_editor_prepare_image_page (glObjectEditor *editor); + +void gl_object_editor_prepare_text_page (glObjectEditor *editor); + +void gl_object_editor_prepare_edit_page (glObjectEditor *editor); + +void gl_object_editor_prepare_bc_page (glObjectEditor *editor); + +void gl_object_editor_prepare_data_page (glObjectEditor *editor); + +void gl_object_editor_prepare_shadow_page (glObjectEditor *editor); + + +void gl_object_editor_changed_cb (glObjectEditor *editor); +void gl_object_editor_size_changed_cb (glObjectEditor *editor); + +void lsize_prefs_changed_cb (glObjectEditor *editor); +void size_prefs_changed_cb (glObjectEditor *editor); +void position_prefs_changed_cb (glObjectEditor *editor); +void shadow_prefs_changed_cb (glObjectEditor *editor); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-shadow-page.c b/src/object-editor-shadow-page.c new file mode 100644 index 00000000..4a3cc2e2 --- /dev/null +++ b/src/object-editor-shadow-page.c @@ -0,0 +1,505 @@ +/* + * object-editor-shadow-page.c + * Copyright (C) 2006-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "color-combo.h" +#include "color.h" +#include "combo-util.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void shadow_enable_check_toggled_cb (glObjectEditor *editor); +static void shadow_color_radio_toggled_cb (glObjectEditor *editor); + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare shadow page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_shadow_page (glObjectEditor *editor) +{ + const gchar *units_string; + gdouble climb_rate; + gint digits; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "shadow_page_vbox", &editor->priv->shadow_page_vbox, + "shadow_enable_check", &editor->priv->shadow_enable_check, + "shadow_controls_table", &editor->priv->shadow_controls_table, + "shadow_x_spin", &editor->priv->shadow_x_spin, + "shadow_y_spin", &editor->priv->shadow_y_spin, + "shadow_x_units_label", &editor->priv->shadow_x_units_label, + "shadow_y_units_label", &editor->priv->shadow_y_units_label, + "shadow_color_radio", &editor->priv->shadow_color_radio, + "shadow_key_radio", &editor->priv->shadow_key_radio, + "shadow_color_hbox", &editor->priv->shadow_color_hbox, + "shadow_key_combo", &editor->priv->shadow_key_combo, + "shadow_opacity_spin", &editor->priv->shadow_opacity_spin, + NULL); + + editor->priv->shadow_color_combo = gl_color_combo_new (_("Default"), + GL_COLOR_SHADOW_DEFAULT, + GL_COLOR_SHADOW_DEFAULT); + gtk_container_add (GTK_CONTAINER (editor->priv->shadow_color_hbox), + editor->priv->shadow_color_combo); + + gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->shadow_key_combo)); + + /* Get configuration information */ + units_string = gl_prefs_get_units_string (); + editor->priv->units_per_point = gl_prefs_get_units_per_point (); + climb_rate = gl_prefs_get_units_step_size (); + digits = gl_prefs_get_units_precision (); + + /* Modify widgets based on configuration */ + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->shadow_x_spin), digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->shadow_x_spin), + climb_rate, 10.0*climb_rate); + gtk_label_set_text (GTK_LABEL(editor->priv->shadow_x_units_label), units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->shadow_y_spin), digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->shadow_y_spin), + climb_rate, 10.0*climb_rate); + gtk_label_set_text (GTK_LABEL(editor->priv->shadow_y_units_label), units_string); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->shadow_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_enable_check), + "toggled", + G_CALLBACK (shadow_enable_check_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_x_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_y_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_color_combo), + "color_changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_key_combo), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_color_radio), + "toggled", + G_CALLBACK (shadow_color_radio_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_key_radio), + "toggled", + G_CALLBACK (shadow_color_radio_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->shadow_opacity_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set shadow parameters. */ +/*****************************************************************************/ +void +gl_object_editor_set_shadow_state (glObjectEditor *editor, + gboolean state) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_enable_check), + state); + gtk_widget_set_sensitive (editor->priv->shadow_controls_table, state); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +void +gl_object_editor_set_shadow_offset (glObjectEditor *editor, + gdouble x, + gdouble y) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + /* save a copy in internal units */ + editor->priv->shadow_x = x; + editor->priv->shadow_y = y; + + /* convert internal units to displayed units */ + gl_debug (DEBUG_EDITOR, "internal x,y = %g, %g", x, y); + x *= editor->priv->units_per_point; + y *= editor->priv->units_per_point; + gl_debug (DEBUG_EDITOR, "display x,y = %g, %g", x, y); + + /* Set widget values */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin), x); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin), y); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +void +gl_object_editor_set_shadow_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *color_node) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_widget_set_sensitive (editor->priv->shadow_key_radio, merge_flag); + + if ( color_node->color == GL_COLOR_NONE ) { + + gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->shadow_color_combo)); + + } else { + + gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->shadow_color_combo), + color_node->color); + + } + + if (!color_node->field_flag) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->shadow_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->shadow_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->shadow_key_combo, FALSE); + + } else { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->shadow_key_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->shadow_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->shadow_key_combo, TRUE); + + gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->shadow_key_combo), + color_node->key); + } + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +void +gl_object_editor_set_shadow_opacity (glObjectEditor *editor, + gdouble alpha) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_opacity_spin), + alpha * 100.0); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set maximum shadow offset. */ +/*****************************************************************************/ +void +gl_object_editor_set_max_shadow_offset (glObjectEditor *editor, + gdouble x_max, + gdouble y_max) +{ + gdouble tmp; + + gl_debug (DEBUG_EDITOR, "START"); + + if (editor->priv->shadow_page_vbox) + { + + editor->priv->stop_signals = TRUE; + + /* save a copy in internal units */ + editor->priv->shadow_x_max = x_max; + editor->priv->shadow_y_max = y_max; + + /* convert internal units to displayed units */ + gl_debug (DEBUG_EDITOR, "internal x_max,y_max = %g, %g", x_max, y_max); + x_max *= editor->priv->units_per_point; + y_max *= editor->priv->units_per_point; + gl_debug (DEBUG_EDITOR, "display x_max,y_max = %g, %g", x_max, y_max); + + /* Set widget values */ + tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin)); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin), + -x_max, x_max); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin), tmp); + tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin)); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin), + -y_max, y_max); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin), tmp); + + editor->priv->stop_signals = FALSE; + + } + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query shadow parameters. */ +/*****************************************************************************/ +gboolean +gl_object_editor_get_shadow_state (glObjectEditor *editor) +{ + gboolean state; + + gl_debug (DEBUG_EDITOR, "START"); + + state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_enable_check)); + + gl_debug (DEBUG_EDITOR, "END"); + + return state; +} + + +void +gl_object_editor_get_shadow_offset (glObjectEditor *editor, + gdouble *x, + gdouble *y) +{ + gl_debug (DEBUG_EDITOR, "START"); + + /* Get values from widgets */ + *x = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_x_spin)); + *y = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_y_spin)); + + /* convert everything back to our internal units (points) */ + *x /= editor->priv->units_per_point; + *y /= editor->priv->units_per_point; + + /* save a copy in internal units */ + editor->priv->shadow_x = *x; + editor->priv->shadow_y = *y; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +glColorNode* +gl_object_editor_get_shadow_color (glObjectEditor *editor) +{ + guint color; + gboolean is_default; + glColorNode *color_node; + + gl_debug (DEBUG_EDITOR, "START"); + + color_node = gl_color_node_new_default (); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_key_radio))) { + color_node->field_flag = TRUE; + color_node->key = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->shadow_key_combo)); + } else { + color_node->field_flag = FALSE; + color_node->key = NULL; + color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->shadow_color_combo), + &is_default); + + if (!is_default) { + color_node->color = color; + } + } + + gl_debug (DEBUG_EDITOR, "END"); + + return color_node; +} + + +gdouble +gl_object_editor_get_shadow_opacity (glObjectEditor *editor) +{ + gdouble alpha; + + gl_debug (DEBUG_EDITOR, "START"); + + alpha = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->shadow_opacity_spin)); + + gl_debug (DEBUG_EDITOR, "END"); + + return alpha / 100.0; +} + + +/*****************************************************************************/ +/* PRIVATE. Prefs changed callback. Update units related items. */ +/*****************************************************************************/ +void +shadow_prefs_changed_cb (glObjectEditor *editor) +{ + const gchar *units_string; + gdouble climb_rate; + gint digits; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Get new configuration information */ + units_string = gl_prefs_get_units_string (); + editor->priv->units_per_point = gl_prefs_get_units_per_point (); + climb_rate = gl_prefs_get_units_step_size (); + digits = gl_prefs_get_units_precision (); + + /* Update characteristics of x_spin/y_spin */ + editor->priv->stop_signals = TRUE; + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->shadow_x_spin), + digits); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->shadow_y_spin), + digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->shadow_x_spin), + climb_rate, 10.0*climb_rate); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->shadow_y_spin), + climb_rate, 10.0*climb_rate); + editor->priv->stop_signals = FALSE; + + /* Update units_labels */ + gtk_label_set_text (GTK_LABEL(editor->priv->shadow_x_units_label), + units_string); + gtk_label_set_text (GTK_LABEL(editor->priv->shadow_y_units_label), + units_string); + + /* Update values of x_spin/y_spin */ + gl_object_editor_set_shadow_offset (editor, + editor->priv->shadow_x, + editor->priv->shadow_y); + gl_object_editor_set_max_shadow_offset (editor, + editor->priv->shadow_x_max, + editor->priv->shadow_y_max); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. shadow enable check callback. */ +/*--------------------------------------------------------------------------*/ +static void +shadow_enable_check_toggled_cb (glObjectEditor *editor) +{ + gboolean state; + + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_enable_check)); + + gtk_widget_set_sensitive (editor->priv->shadow_controls_table, state); + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. shadow color radio callback. */ +/*--------------------------------------------------------------------------*/ +static void +shadow_color_radio_toggled_cb (glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->shadow_color_radio))) { + gtk_widget_set_sensitive (editor->priv->shadow_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->shadow_key_combo, FALSE); + } else { + gtk_widget_set_sensitive (editor->priv->shadow_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->shadow_key_combo, TRUE); + + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-size-page.c b/src/object-editor-size-page.c new file mode 100644 index 00000000..c6821ea1 --- /dev/null +++ b/src/object-editor-size-page.c @@ -0,0 +1,476 @@ +/* + * object-editor-size-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "wdgt-chain-button.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void aspect_toggle_cb (glObjectEditor *editor); +static void size_reset_cb (glObjectEditor *editor); +static void w_spin_cb (glObjectEditor *editor); +static void h_spin_cb (glObjectEditor *editor); + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare size page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_size_page (glObjectEditor *editor, + glObjectEditorOption option) +{ + const gchar *units_string; + gdouble climb_rate; + gint digits; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "size_page_vbox", &editor->priv->size_page_vbox, + "size_w_spin", &editor->priv->size_w_spin, + "size_h_spin", &editor->priv->size_h_spin, + "size_w_units_label", &editor->priv->size_w_units_label, + "size_h_units_label", &editor->priv->size_h_units_label, + "size_aspect_vbox", &editor->priv->size_aspect_vbox, + "size_reset_image_button", &editor->priv->size_reset_image_button, + NULL); + + editor->priv->size_aspect_checkbutton = gl_wdgt_chain_button_new (GL_WDGT_CHAIN_RIGHT); + gl_wdgt_chain_button_set_active (GL_WDGT_CHAIN_BUTTON(editor->priv->size_aspect_checkbutton), + TRUE); + gtk_box_pack_start (GTK_BOX (editor->priv->size_aspect_vbox), + editor->priv->size_aspect_checkbutton, + FALSE, FALSE, 0); + + + /* Get configuration information */ + units_string = gl_prefs_get_units_string (); + editor->priv->units_per_point = gl_prefs_get_units_per_point (); + climb_rate = gl_prefs_get_units_step_size (); + digits = gl_prefs_get_units_precision (); + + /* Modify widgets based on configuration */ + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->size_w_spin), digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->size_w_spin), + climb_rate, 10.0*climb_rate); + gtk_label_set_text (GTK_LABEL(editor->priv->size_w_units_label), units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->size_h_spin), digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->size_h_spin), + climb_rate, 10.0*climb_rate); + gtk_label_set_text (GTK_LABEL(editor->priv->size_h_units_label), units_string); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->size_page_vbox); + if (option != GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE) { + gtk_widget_hide (editor->priv->size_reset_image_button); + } + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->size_aspect_checkbutton), + "toggled", + G_CALLBACK (aspect_toggle_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->size_w_spin), + "changed", + G_CALLBACK (w_spin_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->size_h_spin), + "changed", + G_CALLBACK (h_spin_cb), + G_OBJECT (editor)); + + if (option == GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE) { + g_signal_connect_swapped (G_OBJECT (editor->priv->size_reset_image_button), + "clicked", + G_CALLBACK (size_reset_cb), + G_OBJECT (editor)); + } + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Maintain aspect ratio checkbox callback. */ +/*--------------------------------------------------------------------------*/ +static void +aspect_toggle_cb (glObjectEditor *editor) +{ + glWdgtChainButton *toggle; + gdouble w, h; + + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + toggle = GL_WDGT_CHAIN_BUTTON (editor->priv->size_aspect_checkbutton); + + if (gl_wdgt_chain_button_get_active (toggle)) { + + w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->size_w_spin)); + h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->size_h_spin)); + + editor->priv->size_aspect_ratio = h / w; + + } + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. W spin button changed callback. */ +/*--------------------------------------------------------------------------*/ +static void +w_spin_cb (glObjectEditor *editor) +{ + gdouble w, h; + glWdgtChainButton *toggle; + + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + toggle = GL_WDGT_CHAIN_BUTTON (editor->priv->size_aspect_checkbutton); + + if (gl_wdgt_chain_button_get_active (toggle)) { + + w = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin)); + + h = w * editor->priv->size_aspect_ratio; + + /* Update our sibling control, blocking recursion. */ + editor->priv->stop_signals = TRUE; + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin), h); + editor->priv->stop_signals = FALSE; + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[SIZE_CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. H spin button changed callback. */ +/*--------------------------------------------------------------------------*/ +static void +h_spin_cb (glObjectEditor *editor) +{ + gdouble w, h; + glWdgtChainButton *toggle; + + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + toggle = GL_WDGT_CHAIN_BUTTON (editor->priv->size_aspect_checkbutton); + + if (gl_wdgt_chain_button_get_active (toggle)) { + + h = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin)); + + w = h / editor->priv->size_aspect_ratio; + + /* Update our sibling control, blocking recursion. */ + editor->priv->stop_signals = TRUE; + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin), w); + editor->priv->stop_signals = FALSE; + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[SIZE_CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Reset image size callback. */ +/*--------------------------------------------------------------------------*/ +static void +size_reset_cb (glObjectEditor *editor) +{ + gdouble w_base, h_base; + gdouble w_max, h_max, wh_max; + gdouble aspect_ratio; + + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + w_base = editor->priv->w_base; + h_base = editor->priv->h_base; + + w_max = editor->priv->w_max; + h_max = editor->priv->h_max; + wh_max = MAX( w_max, h_max ); + + if ( (w_base > wh_max) || (h_base > wh_max) ) { + + aspect_ratio = h_base / w_base; + + if ( aspect_ratio < 1.0 ) { + w_base = wh_max; + h_base = wh_max * aspect_ratio; + + } else { + w_base = wh_max / aspect_ratio; + h_base = wh_max; + } + } + + w_base *= editor->priv->units_per_point; + h_base *= editor->priv->units_per_point; + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin), + w_base); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin), + h_base); + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[SIZE_CHANGED], 0); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set size. */ +/*****************************************************************************/ +void +gl_object_editor_set_size (glObjectEditor *editor, + gdouble w, + gdouble h) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + /* save a copy in internal units */ + editor->priv->w = w; + editor->priv->h = h; + + /* convert internal units to displayed units */ + gl_debug (DEBUG_EDITOR, "internal w,h = %g, %g", w, h); + w *= editor->priv->units_per_point; + h *= editor->priv->units_per_point; + gl_debug (DEBUG_EDITOR, "display w,h = %g, %g", w, h); + + /* Set widget values */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin), w); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin), h); + + /* Update aspect ratio */ + editor->priv->size_aspect_ratio = h / w; + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set maximum size. */ +/*****************************************************************************/ +void +gl_object_editor_set_max_size (glObjectEditor *editor, + gdouble w_max, + gdouble h_max) +{ + gdouble tmp; + gdouble wh_max; + + gl_debug (DEBUG_EDITOR, "START"); + + if (editor->priv->size_page_vbox) + { + + editor->priv->stop_signals = TRUE; + + /* save a copy in internal units */ + editor->priv->w_max = w_max; + editor->priv->h_max = h_max; + + /* convert internal units to displayed units */ + gl_debug (DEBUG_EDITOR, "internal w_max,h_max = %g, %g", w_max, h_max); + w_max *= editor->priv->units_per_point; + h_max *= editor->priv->units_per_point; + wh_max = MAX( w_max, h_max ); + gl_debug (DEBUG_EDITOR, "display w_max,h_max = %g, %g", w_max, h_max); + + /* Set widget values */ + tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin)); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->size_w_spin), + 0.0, 2.0*wh_max); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin), tmp); + tmp = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin)); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (editor->priv->size_h_spin), + 0.0, 2.0*wh_max); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin), tmp); + + editor->priv->stop_signals = FALSE; + + } + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set base or natural size of image. */ +/*****************************************************************************/ +void +gl_object_editor_set_base_size (glObjectEditor *editor, + gdouble w_base, + gdouble h_base) +{ + gl_debug (DEBUG_EDITOR, "Setting w_base = %g", w_base); + gl_debug (DEBUG_EDITOR, "Setting h_base = %g", h_base); + + editor->priv->w_base = w_base; + editor->priv->h_base = h_base; +} + + +/*****************************************************************************/ +/* Query size. */ +/*****************************************************************************/ +void +gl_object_editor_get_size (glObjectEditor *editor, + gdouble *w, + gdouble *h) +{ + gl_debug (DEBUG_EDITOR, "START"); + + + /* Get values from widgets */ + *w = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_w_spin)); + *h = gtk_spin_button_get_value (GTK_SPIN_BUTTON (editor->priv->size_h_spin)); + + /* convert everything back to our internal units (points) */ + *w /= editor->priv->units_per_point; + *h /= editor->priv->units_per_point; + + /* save a copy in internal units */ + editor->priv->w = *w; + editor->priv->h = *h; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* PRIVATE. Prefs changed callback. Update units related items. */ +/*****************************************************************************/ +void +size_prefs_changed_cb (glObjectEditor *editor) +{ + const gchar *units_string; + gdouble climb_rate; + gint digits; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Get new configuration information */ + units_string = gl_prefs_get_units_string (); + editor->priv->units_per_point = gl_prefs_get_units_per_point (); + climb_rate = gl_prefs_get_units_step_size (); + digits = gl_prefs_get_units_precision (); + + /* Update characteristics of w_spin/h_spin */ + editor->priv->stop_signals = TRUE; + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->size_w_spin), + digits); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(editor->priv->size_h_spin), + digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->size_w_spin), + climb_rate, 10.0*climb_rate); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(editor->priv->size_h_spin), + climb_rate, 10.0*climb_rate); + editor->priv->stop_signals = FALSE; + + /* Update units_labels */ + gtk_label_set_text (GTK_LABEL(editor->priv->size_w_units_label), + units_string); + gtk_label_set_text (GTK_LABEL(editor->priv->size_h_units_label), + units_string); + + /* Update values of w_spin/h_spin */ + gl_object_editor_set_size (editor, + editor->priv->w, + editor->priv->h); + gl_object_editor_set_max_size (editor, + editor->priv->w_max, + editor->priv->h_max); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor-text-page.c b/src/object-editor-text-page.c new file mode 100644 index 00000000..615668ea --- /dev/null +++ b/src/object-editor-text-page.c @@ -0,0 +1,640 @@ +/* + * object-editor-text-page.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "color-combo.h" +#include "color.h" +#include "font-combo.h" +#include "font-util.h" +#include "combo-util.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void align_toggle_cb (GtkToggleButton *toggle, + glObjectEditor *editor); +static void text_radio_toggled_cb (glObjectEditor *editor); + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare size page. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_prepare_text_page (glObjectEditor *editor) +{ + gl_debug (DEBUG_EDITOR, "START"); + + /* Extract widgets from XML tree. */ + gl_builder_util_get_widgets (editor->priv->builder, + "text_page_vbox", &editor->priv->text_page_vbox, + "text_family_hbox", &editor->priv->text_family_hbox, + "text_size_spin", &editor->priv->text_size_spin, + "text_bold_toggle", &editor->priv->text_bold_toggle, + "text_italic_toggle", &editor->priv->text_italic_toggle, + "text_color_hbox", &editor->priv->text_color_hbox, + "text_color_radio", &editor->priv->text_color_radio, + "text_color_key_radio", &editor->priv->text_color_key_radio, + "text_color_key_combo", &editor->priv->text_color_key_combo, + "text_left_toggle", &editor->priv->text_left_toggle, + "text_center_toggle", &editor->priv->text_center_toggle, + "text_right_toggle", &editor->priv->text_right_toggle, + "text_line_spacing_spin", &editor->priv->text_line_spacing_spin, + "text_auto_shrink_check", &editor->priv->text_auto_shrink_check, + NULL); + + editor->priv->text_family_combo = gl_font_combo_new ("Sans"); + gtk_box_pack_start (GTK_BOX (editor->priv->text_family_hbox), + editor->priv->text_family_combo, + TRUE, TRUE, 0); + + editor->priv->text_color_combo = gl_color_combo_new (_("Default"), + GL_COLOR_TEXT_DEFAULT, + gl_prefs->default_text_color); + gtk_box_pack_start (GTK_BOX (editor->priv->text_color_hbox), + editor->priv->text_color_combo, + FALSE, FALSE, 0); + + gl_combo_util_add_text_model ( GTK_COMBO_BOX(editor->priv->text_color_key_combo)); + + /* Modify widgets */ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE); + + /* Un-hide */ + gtk_widget_show_all (editor->priv->text_page_vbox); + + /* Connect signals */ + g_signal_connect_swapped (G_OBJECT (editor->priv->text_family_combo), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->text_size_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->text_bold_toggle), + "toggled", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->text_italic_toggle), + "toggled", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_combo), + "color_changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_key_combo), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_radio), + "toggled", + G_CALLBACK (text_radio_toggled_cb), + G_OBJECT (editor)); + g_signal_connect_swapped (G_OBJECT (editor->priv->text_color_key_radio), + "toggled", + G_CALLBACK (text_radio_toggled_cb), + G_OBJECT (editor)); + + g_signal_connect (G_OBJECT (editor->priv->text_left_toggle), + "toggled", + G_CALLBACK (align_toggle_cb), + G_OBJECT (editor)); + g_signal_connect (G_OBJECT (editor->priv->text_center_toggle), + "toggled", + G_CALLBACK (align_toggle_cb), + G_OBJECT (editor)); + g_signal_connect (G_OBJECT (editor->priv->text_right_toggle), + "toggled", + G_CALLBACK (align_toggle_cb), + G_OBJECT (editor)); + + g_signal_connect_swapped (G_OBJECT (editor->priv->text_line_spacing_spin), + "changed", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + + g_signal_connect_swapped (G_OBJECT (editor->priv->text_auto_shrink_check), + "toggled", + G_CALLBACK (gl_object_editor_changed_cb), + G_OBJECT (editor)); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Alignment togglebutton callback. */ +/*--------------------------------------------------------------------------*/ +static void +align_toggle_cb (GtkToggleButton *toggle, + glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + if (gtk_toggle_button_get_active (toggle)) { + + if (GTK_WIDGET (toggle) == GTK_WIDGET (editor->priv->text_left_toggle)) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->text_center_toggle), + FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->text_right_toggle), + FALSE); + } else if (GTK_WIDGET (toggle) == + GTK_WIDGET (editor->priv->text_center_toggle)) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->text_left_toggle), + FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->text_right_toggle), + FALSE); + } else if (GTK_WIDGET (toggle) == + GTK_WIDGET (editor->priv->text_right_toggle)) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->text_left_toggle), + FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->text_center_toggle), + FALSE); + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + } + +} + + +/*****************************************************************************/ +/* Set font family. */ +/*****************************************************************************/ +void +gl_object_editor_set_font_family (glObjectEditor *editor, + const gchar *font_family) +{ + gchar *old_font_family; + + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + old_font_family = gl_font_combo_get_family (GL_FONT_COMBO (editor->priv->text_family_combo)); + + if ( !old_font_family || g_utf8_collate( old_font_family, font_family ) ) + { + gl_font_combo_set_family (GL_FONT_COMBO (editor->priv->text_family_combo), + font_family); + } + + g_free (old_font_family); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query font family. */ +/*****************************************************************************/ +gchar * +gl_object_editor_get_font_family (glObjectEditor *editor) +{ + gchar *font_family; + + gl_debug (DEBUG_EDITOR, "START"); + + font_family = gl_font_combo_get_family (GL_FONT_COMBO (editor->priv->text_family_combo)); + + gl_debug (DEBUG_EDITOR, "END"); + + return font_family; +} + + +/*****************************************************************************/ +/* Set font size. */ +/*****************************************************************************/ +void +gl_object_editor_set_font_size (glObjectEditor *editor, + gdouble font_size) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->text_size_spin), + font_size); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query font size. */ +/*****************************************************************************/ +gdouble +gl_object_editor_get_font_size (glObjectEditor *editor) +{ + gdouble font_size; + + gl_debug (DEBUG_EDITOR, "START"); + + font_size = + gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->text_size_spin)); + + gl_debug (DEBUG_EDITOR, "END"); + + return font_size; +} + + +/*****************************************************************************/ +/* Set font weight. */ +/*****************************************************************************/ +void +gl_object_editor_set_font_weight (glObjectEditor *editor, + PangoWeight font_weight) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_bold_toggle), + (font_weight == PANGO_WEIGHT_BOLD)); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query font weight. */ +/*****************************************************************************/ +PangoWeight +gl_object_editor_get_font_weight (glObjectEditor *editor) +{ + PangoWeight font_weight; + + gl_debug (DEBUG_EDITOR, "START"); + + if (gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (editor->priv->text_bold_toggle))) { + font_weight = PANGO_WEIGHT_BOLD; + } else { + font_weight = PANGO_WEIGHT_NORMAL; + } + + gl_debug (DEBUG_EDITOR, "END"); + + return font_weight; +} + + +/*****************************************************************************/ +/* Set font italic flag. */ +/*****************************************************************************/ +void +gl_object_editor_set_font_italic_flag (glObjectEditor *editor, + gboolean font_italic_flag) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_italic_toggle), + font_italic_flag); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query font italic flag. */ +/*****************************************************************************/ +gboolean +gl_object_editor_get_font_italic_flag (glObjectEditor *editor) +{ + gboolean italic_flag; + + gl_debug (DEBUG_EDITOR, "START"); + + italic_flag = + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON + (editor->priv->text_italic_toggle)); + + gl_debug (DEBUG_EDITOR, "END"); + + return italic_flag; +} + + +/*****************************************************************************/ +/* Set text alignment. */ +/*****************************************************************************/ +void +gl_object_editor_set_text_alignment (glObjectEditor *editor, + PangoAlignment align) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_left_toggle), + (align == PANGO_ALIGN_LEFT)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_center_toggle), + (align == PANGO_ALIGN_CENTER)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_right_toggle), + (align == PANGO_ALIGN_RIGHT)); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query text alignment. */ +/*****************************************************************************/ +PangoAlignment +gl_object_editor_get_text_alignment (glObjectEditor *editor) +{ + PangoAlignment align; + + gl_debug (DEBUG_EDITOR, "START"); + + if (gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (editor->priv->text_left_toggle))) { + align = PANGO_ALIGN_LEFT; + } else + if (gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (editor->priv->text_right_toggle))) { + align = PANGO_ALIGN_RIGHT; + } else + if (gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (editor->priv->text_center_toggle))) { + align = PANGO_ALIGN_CENTER; + } else { + align = PANGO_ALIGN_LEFT; /* Should not happen. */ + } + + gl_debug (DEBUG_EDITOR, "END"); + + return align; +} + + +/*****************************************************************************/ +/* Set text color. */ +/*****************************************************************************/ +void +gl_object_editor_set_text_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *text_color_node) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gl_debug (DEBUG_EDITOR, "color field %s(%d) / %X", text_color_node->key, text_color_node->field_flag, text_color_node->color); + + gtk_widget_set_sensitive (editor->priv->text_color_key_radio, merge_flag); + + if ( text_color_node->color == GL_COLOR_NONE ) { + + gl_color_combo_set_to_default (GL_COLOR_COMBO(editor->priv->text_color_combo)); + + } else { + + gl_color_combo_set_color (GL_COLOR_COMBO(editor->priv->text_color_combo), + text_color_node->color); + } + + if (!text_color_node->field_flag) { + gl_debug (DEBUG_EDITOR, "color field false"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->text_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE); + + } else { + gl_debug (DEBUG_EDITOR, "color field true"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (editor->priv->text_color_key_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->text_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->text_color_key_combo, TRUE); + + gl_combo_util_set_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo), ""); + } + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query text color. */ +/*****************************************************************************/ +glColorNode* +gl_object_editor_get_text_color (glObjectEditor *editor) +{ + guint color; + glColorNode *color_node; + gboolean is_default; + + gl_debug (DEBUG_EDITOR, "START"); + + color_node = gl_color_node_new_default (); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_key_radio))) { + color_node->field_flag = TRUE; + color_node->color = gl_prefs->default_text_color; + color_node->key = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (editor->priv->text_color_key_combo)); + } else { + color_node->field_flag = FALSE; + color_node->key = NULL; + color = gl_color_combo_get_color (GL_COLOR_COMBO(editor->priv->text_color_combo), + &is_default); + + if (is_default) { + color_node->color = gl_prefs->default_text_color; + } else { + color_node->color = color; + } + } + + gl_debug (DEBUG_EDITOR, "END"); + + return color_node; +} + + +/*****************************************************************************/ +/* Set text line spacing. */ +/*****************************************************************************/ +void +gl_object_editor_set_text_line_spacing (glObjectEditor *editor, + gdouble text_line_spacing) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->priv->text_line_spacing_spin), + text_line_spacing); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query text line spacing. */ +/*****************************************************************************/ +gdouble +gl_object_editor_get_text_line_spacing (glObjectEditor *editor) +{ + gdouble text_line_spacing; + + gl_debug (DEBUG_EDITOR, "START"); + + text_line_spacing = + gtk_spin_button_get_value (GTK_SPIN_BUTTON(editor->priv->text_line_spacing_spin)); + + gl_debug (DEBUG_EDITOR, "END"); + + return text_line_spacing; +} + + +/*****************************************************************************/ +/* Set auto shrink checkbox. */ +/*****************************************************************************/ +void +gl_object_editor_set_text_auto_shrink (glObjectEditor *editor, + gboolean auto_shrink) +{ + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->stop_signals = TRUE; + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_auto_shrink_check), + auto_shrink); + + editor->priv->stop_signals = FALSE; + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Query auto shrink checkbox. */ +/*****************************************************************************/ +gboolean gl_object_editor_get_text_auto_shrink (glObjectEditor *editor) +{ + gboolean auto_shrink; + + gl_debug (DEBUG_EDITOR, "START"); + + auto_shrink = + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->text_auto_shrink_check)); + + gl_debug (DEBUG_EDITOR, "END"); + + return auto_shrink; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. color radio callback. */ +/*--------------------------------------------------------------------------*/ +static void +text_radio_toggled_cb (glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->priv->text_color_radio))) { + gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE); + } else { + gtk_widget_set_sensitive (editor->priv->text_color_combo, FALSE); + gtk_widget_set_sensitive (editor->priv->text_color_key_combo, TRUE); + + } + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor.c b/src/object-editor.c new file mode 100644 index 00000000..3edf5815 --- /dev/null +++ b/src/object-editor.c @@ -0,0 +1,639 @@ +/* + * object-editor.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "object-editor.h" + +#include +#include +#include + +#include "prefs.h" +#include "color-combo.h" +#include "color.h" +#include "wdgt-chain-button.h" +#include "wdgt-merge-menu.h" +#include "marshal.h" +#include "combo-util.h" +#include "builder-util.h" + +#include "object-editor-private.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros */ +/*===========================================*/ + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + +typedef void (*ChangedSignal) (GObject * object, gpointer data); + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +gint gl_object_editor_signals[LAST_SIGNAL] = { 0 }; + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_object_editor_finalize (GObject *object); + +static void gl_object_notebook_construct_valist (glObjectEditor *editor, + glLabel *label, + glObjectEditorOption first_option, + va_list args); + +static void prefs_changed_cb (glObjectEditor *editor); + +static void label_changed_cb (glLabel *label, + glObjectEditor *editor); + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glObjectEditor, gl_object_editor, GTK_TYPE_VBOX); + + +static void +gl_object_editor_class_init (glObjectEditorClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_EDITOR, "START"); + + gl_object_editor_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_object_editor_finalize; + + gl_object_editor_signals[CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE(object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glObjectEditorClass, changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + gl_object_editor_signals[SIZE_CHANGED] = + g_signal_new ("size_changed", + G_OBJECT_CLASS_TYPE(object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glObjectEditorClass, size_changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +static void +gl_object_editor_init (glObjectEditor *editor) +{ + static gchar *object_ids[] = { "editor_vbox", + "adjustment1", "adjustment2", "adjustment3", + "adjustment4", "adjustment5", "adjustment6", + "adjustment7", "adjustment8", "adjustment9", + "adjustment10", "adjustment11", "adjustment12", + "adjustment13", + NULL }; + GError *error = NULL; + + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv = g_new0 (glObjectEditorPrivate, 1); + + editor->priv->builder = gtk_builder_new (); + + gtk_builder_add_objects_from_file (editor->priv->builder, + GLABELS_BUILDER_DIR "object-editor.builder", + object_ids, + &error); + if (error) { + g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); + g_error_free (error); + return; + } + + gl_builder_util_get_widgets (editor->priv->builder, + "editor_vbox", &editor->priv->editor_vbox, + "title_image", &editor->priv->title_image, + "title_label", &editor->priv->title_label, + "notebook", &editor->priv->notebook, + NULL); + + gtk_box_pack_start (GTK_BOX(editor), + editor->priv->editor_vbox, + FALSE, FALSE, 0); + + gtk_widget_show_all (GTK_WIDGET(editor)); + + /* Hide all notebook pages to start with. */ + gtk_widget_hide_all (editor->priv->notebook); + gtk_widget_set_no_show_all (editor->priv->notebook, TRUE); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +static void +gl_object_editor_finalize (GObject *object) +{ + glObjectEditor* editor = GL_OBJECT_EDITOR (object);; + + gl_debug (DEBUG_EDITOR, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_OBJECT_EDITOR (editor)); + g_return_if_fail (editor->priv != NULL); + + g_signal_handlers_disconnect_by_func (G_OBJECT(gl_prefs), + prefs_changed_cb, editor); + g_signal_handlers_disconnect_by_func (G_OBJECT(editor->priv->label), + label_changed_cb, editor); + + g_object_unref (editor->priv->builder); + g_free (editor->priv); + + G_OBJECT_CLASS (gl_object_editor_parent_class)->finalize (object); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* NEW object editor. */ +/*****************************************************************************/ +GtkWidget* +gl_object_editor_new (gchar *image, + gchar *title, + glLabel *label, + glObjectEditorOption first_option, ...) +{ + glObjectEditor *editor; + va_list args; + + gl_debug (DEBUG_EDITOR, "START"); + + editor = GL_OBJECT_EDITOR (g_object_new (GL_TYPE_OBJECT_EDITOR, NULL)); + + if (image) { + gtk_image_set_from_stock (GTK_IMAGE(editor->priv->title_image), + image, + GTK_ICON_SIZE_LARGE_TOOLBAR); + } + + if (title) { + gchar *s; + + s = g_strdup_printf ("%s", + title); + gtk_label_set_text (GTK_LABEL(editor->priv->title_label), s); + g_free (s); + + gtk_label_set_use_markup (GTK_LABEL(editor->priv->title_label), TRUE); + + } + + va_start (args, first_option); + gl_object_notebook_construct_valist (editor, label, first_option, args); + va_end (args); + + gl_debug (DEBUG_EDITOR, "END"); + + return GTK_WIDGET(editor); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct notebook. */ +/*--------------------------------------------------------------------------*/ +static void +gl_object_notebook_construct_valist (glObjectEditor *editor, + glLabel *label, + glObjectEditorOption first_option, + va_list args) +{ + glObjectEditorOption option; + gint pages = 0; + + gl_debug (DEBUG_EDITOR, "START"); + + editor->priv->label = label; + + option = first_option; + + for ( option=first_option; option; option=va_arg (args, glObjectEditorOption) ) { + + switch (option) { + + case GL_OBJECT_EDITOR_EMPTY: + gtk_widget_set_sensitive (editor->priv->title_image, FALSE); + gtk_widget_set_sensitive (editor->priv->title_label, FALSE); + break; + + case GL_OBJECT_EDITOR_POSITION_PAGE: + gl_object_editor_prepare_position_page (editor); + pages++; + break; + + case GL_OBJECT_EDITOR_SIZE_PAGE: + case GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE: + gl_object_editor_prepare_size_page (editor, option); + pages++; + break; + + case GL_OBJECT_EDITOR_SIZE_LINE_PAGE: + gl_object_editor_prepare_lsize_page (editor); + pages++; + break; + + case GL_OBJECT_EDITOR_FILL_PAGE: + gl_object_editor_prepare_fill_page (editor); + pages++; + break; + + case GL_OBJECT_EDITOR_LINE_PAGE: + gl_object_editor_prepare_line_page (editor); + pages++; + break; + + case GL_OBJECT_EDITOR_IMAGE_PAGE: + gl_object_editor_prepare_image_page (editor); + pages++; + break; + + case GL_OBJECT_EDITOR_TEXT_PAGE: + gl_object_editor_prepare_text_page (editor); + pages++; + break; + + case GL_OBJECT_EDITOR_EDIT_PAGE: + gl_object_editor_prepare_edit_page (editor); + pages++; + break; + + case GL_OBJECT_EDITOR_BC_PAGE: + gl_object_editor_prepare_bc_page (editor); + pages++; + break; + + case GL_OBJECT_EDITOR_DATA_PAGE: + gl_object_editor_prepare_data_page (editor); + pages++; + break; + + case GL_OBJECT_EDITOR_SHADOW_PAGE: + gl_object_editor_prepare_shadow_page (editor); + pages++; + break; + + default: + g_message ("option = %d", option); + g_assert_not_reached (); + } + + } + if (pages) { + gtk_widget_show (editor->priv->notebook); + } + + g_signal_connect_swapped (G_OBJECT (gl_prefs), "changed", + G_CALLBACK (prefs_changed_cb), + editor); + if (label) + { + label_changed_cb (label, editor); + g_signal_connect (G_OBJECT (label), "size_changed", + G_CALLBACK (label_changed_cb), + editor); + g_signal_connect (G_OBJECT (label), "merge_changed", + G_CALLBACK (label_changed_cb), + editor); + } + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Widget changed callback. Emit our "changed" signal. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_changed_cb (glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Widget size changed callback. Emit our "size-changed" signal. */ +/*--------------------------------------------------------------------------*/ +void +gl_object_editor_size_changed_cb (glObjectEditor *editor) +{ + if (editor->priv->stop_signals) return; + + gl_debug (DEBUG_EDITOR, "START"); + + /* Emit our "size_changed" signal */ + g_signal_emit (G_OBJECT (editor), gl_object_editor_signals[SIZE_CHANGED], 0); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*****************************************************************************/ +/* Set possible key names from merge object. */ +/*****************************************************************************/ +void +gl_object_editor_set_key_names (glObjectEditor *editor, + glMerge *merge) +{ + GList *keys; + GtkWidget *combo; + GtkWidget *menu; + gboolean fixed_flag; + gboolean state; + + gl_debug (DEBUG_EDITOR, "START"); + + if (editor->priv->text_auto_shrink_check) { + gtk_widget_set_sensitive (editor->priv->text_auto_shrink_check, + merge != NULL); + } + + if (editor->priv->text_page_vbox) { + gtk_widget_set_sensitive (editor->priv->text_color_key_radio, merge != NULL); + if (merge == NULL) { + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(editor->priv->text_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->text_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->text_color_key_combo, FALSE); + } else { + state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->text_color_key_radio)); + gtk_widget_set_sensitive (editor->priv->text_color_combo, !state); + gtk_widget_set_sensitive (editor->priv->text_color_key_combo, state); + + } + } + + if (editor->priv->edit_insert_field_button) { + gtk_widget_set_sensitive (editor->priv->edit_insert_field_button, + merge != NULL); + } + + if (editor->priv->img_key_combo) { + gtk_widget_set_sensitive (editor->priv->img_key_combo, merge != NULL); + } + + if (editor->priv->img_key_radio) { + gtk_widget_set_sensitive (editor->priv->img_key_radio, merge != NULL); + if (merge == NULL) { + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(editor->priv->img_file_radio), TRUE); + } + } + + if (editor->priv->data_key_combo) { + gtk_widget_set_sensitive (editor->priv->data_key_combo, merge != NULL); + } + + if (editor->priv->data_key_radio) { + gtk_widget_set_sensitive (editor->priv->data_key_radio, merge != NULL); + if (merge == NULL) { + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(editor->priv->data_literal_radio), TRUE); + } + } + + fixed_flag = editor->priv->data_format_fixed_flag; + if (editor->priv->data_format_label) { + gtk_widget_set_sensitive (editor->priv->data_format_label, + (merge != NULL)); + } + if (editor->priv->data_ex_label) { + gtk_widget_set_sensitive (editor->priv->data_ex_label, + (merge != NULL)); + } + if (editor->priv->data_digits_label) { + gtk_widget_set_sensitive (editor->priv->data_digits_label, + (merge != NULL) && !fixed_flag); + } + if (editor->priv->data_digits_spin) { + gtk_widget_set_sensitive (editor->priv->data_digits_spin, + (merge != NULL) && !fixed_flag); + } + + if (editor->priv->fill_page_vbox) { + gtk_widget_set_sensitive (editor->priv->fill_key_radio, merge != NULL); + if (merge == NULL) { + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(editor->priv->fill_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->fill_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->fill_key_combo, FALSE); + } else { + state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->fill_key_radio)); + gtk_widget_set_sensitive (editor->priv->fill_color_combo, !state); + gtk_widget_set_sensitive (editor->priv->fill_key_combo, state); + + } + } + + if (editor->priv->line_page_vbox) { + gtk_widget_set_sensitive (editor->priv->line_key_radio, merge != NULL); + if (merge == NULL) { + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(editor->priv->line_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->line_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->line_key_combo, FALSE); + } else { + state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->line_key_radio)); + gtk_widget_set_sensitive (editor->priv->line_color_combo, !state); + gtk_widget_set_sensitive (editor->priv->line_key_combo, state); + + } + } + + if (editor->priv->bc_page_vbox) { + gtk_widget_set_sensitive (editor->priv->bc_key_radio, merge != NULL); + if (merge == NULL) { + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(editor->priv->bc_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->bc_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->bc_key_combo, FALSE); + } else { + state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->bc_key_radio)); + gtk_widget_set_sensitive (editor->priv->bc_color_combo, !state); + gtk_widget_set_sensitive (editor->priv->bc_key_combo, state); + + } + } + + if (editor->priv->shadow_page_vbox) { + gtk_widget_set_sensitive (editor->priv->shadow_key_radio, merge != NULL); + if (merge == NULL) { + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(editor->priv->shadow_color_radio), TRUE); + gtk_widget_set_sensitive (editor->priv->shadow_color_combo, TRUE); + gtk_widget_set_sensitive (editor->priv->shadow_key_combo, FALSE); + } else { + state = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->priv->shadow_key_radio)); + gtk_widget_set_sensitive (editor->priv->shadow_color_combo, !state); + gtk_widget_set_sensitive (editor->priv->shadow_key_combo, state); + + } + } + + keys = gl_merge_get_key_list (merge); + if ( keys == NULL ) { + keys = g_list_append (keys, g_strdup ("")); + } + + combo = editor->priv->img_key_combo; + if (combo) { + gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); + } + + menu = editor->priv->edit_insert_field_menu; + if (menu) { + gl_wdgt_merge_menu_set_fields (GL_WDGT_MERGE_MENU(menu), keys); + } + + combo = editor->priv->data_key_combo; + if (combo) { + gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); + } + + combo = editor->priv->fill_key_combo; + if (combo) { + gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); + } + + combo = editor->priv->text_color_key_combo; + if (combo) { + gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); + } + + combo = editor->priv->line_key_combo; + if (combo) { + gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); + } + + combo = editor->priv->bc_key_combo; + if (combo) { + gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); + } + + combo = editor->priv->shadow_key_combo; + if (combo) { + gl_combo_util_set_strings (GTK_COMBO_BOX (combo), keys); + } + + gl_merge_free_key_list (&keys); + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prefs changed callback. Update units related items. */ +/*--------------------------------------------------------------------------*/ +static void +prefs_changed_cb (glObjectEditor *editor) +{ + + gl_debug (DEBUG_EDITOR, "START"); + + if (editor->priv->lsize_r_spin) { + lsize_prefs_changed_cb (editor); + } + + if (editor->priv->size_w_spin) { + size_prefs_changed_cb (editor); + } + + if (editor->priv->pos_x_spin) { + position_prefs_changed_cb (editor); + } + + if (editor->priv->shadow_x_spin) { + shadow_prefs_changed_cb (editor); + } + + gl_debug (DEBUG_EDITOR, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +label_changed_cb (glLabel *label, + glObjectEditor *editor) +{ + gdouble label_width, label_height; + glMerge *merge; + + gl_debug (DEBUG_EDITOR, "START"); + + gl_label_get_size (label, &label_width, &label_height); + gl_object_editor_set_max_position (GL_OBJECT_EDITOR (editor), + label_width, label_height); + gl_object_editor_set_max_size (GL_OBJECT_EDITOR (editor), + label_width, label_height); + gl_object_editor_set_max_lsize (GL_OBJECT_EDITOR (editor), + label_width, label_height); + gl_object_editor_set_max_shadow_offset (GL_OBJECT_EDITOR (editor), + label_width, label_height); + + merge = gl_label_get_merge (label); + gl_object_editor_set_key_names (editor, merge); + + gl_debug (DEBUG_EDITOR, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/object-editor.h b/src/object-editor.h new file mode 100644 index 00000000..71d63a31 --- /dev/null +++ b/src/object-editor.h @@ -0,0 +1,314 @@ +/* + * object-editor.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __OBJECT_EDITOR_H__ +#define __OBJECT_EDITOR_H__ + +#include + +#include "text-node.h" +#include "label.h" +#include "merge.h" +#include "bc.h" +#include "color.h" + +G_BEGIN_DECLS + +typedef enum { + GL_OBJECT_EDITOR_EMPTY = 1, + GL_OBJECT_EDITOR_POSITION_PAGE, + GL_OBJECT_EDITOR_SIZE_PAGE, + GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE, + GL_OBJECT_EDITOR_SIZE_LINE_PAGE, + GL_OBJECT_EDITOR_FILL_PAGE, + GL_OBJECT_EDITOR_LINE_PAGE, + GL_OBJECT_EDITOR_IMAGE_PAGE, + GL_OBJECT_EDITOR_TEXT_PAGE, + GL_OBJECT_EDITOR_EDIT_PAGE, + GL_OBJECT_EDITOR_BC_PAGE, + GL_OBJECT_EDITOR_DATA_PAGE, + GL_OBJECT_EDITOR_SHADOW_PAGE, +} glObjectEditorOption; + +#define GL_TYPE_OBJECT_EDITOR (gl_object_editor_get_type ()) +#define GL_OBJECT_EDITOR(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditor)) +#define GL_OBJECT_EDITOR_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass)) +#define GL_IS_OBJECT_EDITOR(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_OBJECT_EDITOR)) +#define GL_IS_OBJECT_EDITOR_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_OBJECT_EDITOR)) +#define GL_OBJECT_EDITOR_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass)) + + +typedef struct _glObjectEditor glObjectEditor; +typedef struct _glObjectEditorClass glObjectEditorClass; + +typedef struct _glObjectEditorPrivate glObjectEditorPrivate; + +struct _glObjectEditor +{ + GtkVBox parent_instance; + + glObjectEditorPrivate *priv; + +}; + +struct _glObjectEditorClass +{ + GtkVBoxClass parent_class; + + void (*changed) (glObjectEditor *editor, gpointer user_data); + void (*size_changed) (glObjectEditor *editor, gpointer user_data); +}; + + + + +GType gl_object_editor_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_object_editor_new (gchar *image, + gchar *title, + glLabel *label, + glObjectEditorOption first_option, ...); + +void gl_object_editor_set_key_names (glObjectEditor *editor, + glMerge *merge); + + +/* + * Position Page + */ +void gl_object_editor_set_position (glObjectEditor *editor, + gdouble x, + gdouble y); + +void gl_object_editor_set_max_position (glObjectEditor *editor, + gdouble x_max, + gdouble y_max); + +void gl_object_editor_get_position (glObjectEditor *editor, + gdouble *x, + gdouble *y); + +/* + * Size Page + */ +void gl_object_editor_set_size (glObjectEditor *editor, + gdouble w, + gdouble h); + +void gl_object_editor_set_max_size (glObjectEditor *editor, + gdouble w_max, + gdouble h_max); + +void gl_object_editor_set_base_size (glObjectEditor *editor, + gdouble w_max, + gdouble h_max); + +void gl_object_editor_get_size (glObjectEditor *editor, + gdouble *w, + gdouble *h); + + +/* + * Line Size Page + */ +void gl_object_editor_set_lsize (glObjectEditor *editor, + gdouble dx, + gdouble dy); + +void gl_object_editor_set_max_lsize (glObjectEditor *editor, + gdouble dx_max, + gdouble dy_max); + +void gl_object_editor_get_lsize (glObjectEditor *editor, + gdouble *dx, + gdouble *dy); + + +/* + * Fill Page + */ +void gl_object_editor_set_fill_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *color_node); + +glColorNode* gl_object_editor_get_fill_color (glObjectEditor *editor); + + +/* + * Line/Outline Page + */ +void gl_object_editor_set_line_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *color_node); + +glColorNode* gl_object_editor_get_line_color (glObjectEditor *editor); + +void gl_object_editor_set_line_width (glObjectEditor *editor, + gdouble width); + +gdouble gl_object_editor_get_line_width (glObjectEditor *editor); + + +/* + * Image Page + */ +void gl_object_editor_set_image (glObjectEditor *editor, + gboolean merge_flag, + glTextNode *text_node); + +glTextNode *gl_object_editor_get_image (glObjectEditor *editor); + + +/* + * Text Page + */ +void gl_object_editor_set_font_family (glObjectEditor *editor, + const gchar *font_family); + +gchar *gl_object_editor_get_font_family (glObjectEditor *editor); + +void gl_object_editor_set_font_size (glObjectEditor *editor, + gdouble font_size); + +gdouble gl_object_editor_get_font_size (glObjectEditor *editor); + +void gl_object_editor_set_font_weight (glObjectEditor *editor, + PangoWeight font_weight); + +PangoWeight gl_object_editor_get_font_weight (glObjectEditor *editor); + +void gl_object_editor_set_font_italic_flag (glObjectEditor *editor, + gboolean font_italic_flag); + +gboolean gl_object_editor_get_font_italic_flag (glObjectEditor *editor); + +void gl_object_editor_set_text_alignment (glObjectEditor *editor, + PangoAlignment text_alignment); + +PangoAlignment gl_object_editor_get_text_alignment (glObjectEditor *editor); + +void gl_object_editor_set_text_line_spacing (glObjectEditor *editor, + gdouble text_line_spacing); + +gdouble gl_object_editor_get_text_line_spacing (glObjectEditor *editor); + +void gl_object_editor_set_text_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *text_color_node); + +glColorNode* gl_object_editor_get_text_color (glObjectEditor *editor); + +void gl_object_editor_set_text_auto_shrink (glObjectEditor *editor, + gboolean auto_shrink); + +gboolean gl_object_editor_get_text_auto_shrink (glObjectEditor *editor); + + +/* + * Edit Text Page + */ +void gl_object_editor_set_text_buffer (glObjectEditor *editor, + GtkTextBuffer *buffer); + +/* + * Barcode Page + */ +void gl_object_editor_set_bc_style (glObjectEditor *editor, + gchar *id, + gboolean text_flag, + gboolean checksum_flag, + guint format_digits); + +void gl_object_editor_get_bc_style (glObjectEditor *editor, + gchar **id, + gboolean *text_flag, + gboolean *checksum_flag, + guint *format_digits); + +void gl_object_editor_set_bc_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *color_node); + +glColorNode* gl_object_editor_get_bc_color (glObjectEditor *editor); + + +/* + * Barcode Data Page + */ +void gl_object_editor_set_data (glObjectEditor *editor, + gboolean merge_flag, + glTextNode *text_node); + +glTextNode *gl_object_editor_get_data (glObjectEditor *editor); + + +/* + * Shadow Page + */ +void gl_object_editor_set_shadow_state (glObjectEditor *editor, + gboolean state); + +void gl_object_editor_set_shadow_offset (glObjectEditor *editor, + gdouble x, + gdouble y); + +void gl_object_editor_set_shadow_color (glObjectEditor *editor, + gboolean merge_flag, + glColorNode *color_node); + +void gl_object_editor_set_shadow_opacity (glObjectEditor *editor, + gdouble alpha); + +void gl_object_editor_set_max_shadow_offset(glObjectEditor *editor, + gdouble x_max, + gdouble y_max); + + +gboolean gl_object_editor_get_shadow_state (glObjectEditor *editor); + +void gl_object_editor_get_shadow_offset (glObjectEditor *editor, + gdouble *x, + gdouble *y); + +glColorNode* gl_object_editor_get_shadow_color (glObjectEditor *editor); + +gdouble gl_object_editor_get_shadow_opacity (glObjectEditor *editor); + + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/pixbuf-cache.c b/src/pixbuf-cache.c new file mode 100644 index 00000000..77b2fc59 --- /dev/null +++ b/src/pixbuf-cache.c @@ -0,0 +1,272 @@ +/* + * pixbuf-cache.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "pixbuf-cache.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +typedef struct { + gchar *key; + guint references; + GdkPixbuf *pixbuf; +} CacheRecord; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void record_destroy (gpointer val); + +static void add_name_to_list (gpointer key, + gpointer val, + gpointer user_data); + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Destroy cache record. */ +/*---------------------------------------------------------------------------*/ +static void +record_destroy (gpointer val) +{ + CacheRecord *record = (CacheRecord *)val; + + g_return_if_fail (record); + + g_free (record->key); + g_object_unref (record->pixbuf); + g_free (record); +} + + +/*****************************************************************************/ +/* Create a new hash table to keep track of cached pixbufs. */ +/*****************************************************************************/ +GHashTable * +gl_pixbuf_cache_new (void) +{ + GHashTable *pixbuf_cache; + + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + pixbuf_cache = g_hash_table_new_full (g_str_hash, + g_str_equal, + NULL, + record_destroy); + + gl_debug (DEBUG_PIXBUF_CACHE, "END pixbuf_cache=%p", pixbuf_cache); + + return pixbuf_cache; +} + + +/*****************************************************************************/ +/* Free up previously allocated hash table and its contents. */ +/*****************************************************************************/ +void +gl_pixbuf_cache_free (GHashTable *pixbuf_cache) +{ + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + g_hash_table_destroy (pixbuf_cache); + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); +} + + +/*****************************************************************************/ +/* Add pixbuf to cache explicitly (not a reference). */ +/*****************************************************************************/ +void +gl_pixbuf_cache_add_pixbuf (GHashTable *pixbuf_cache, + gchar *name, + GdkPixbuf *pixbuf) +{ + CacheRecord *test_record, *record; + + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + test_record = g_hash_table_lookup (pixbuf_cache, name); + if (test_record != NULL) { + /* pixbuf is already in the cache. */ + gl_debug (DEBUG_PIXBUF_CACHE, "END already in cache"); + return; + } + + record = g_new0 (CacheRecord, 1); + record->key = g_strdup (name); + record->references = 0; /* Nobody has referenced it yet. */ + record->pixbuf = g_object_ref (G_OBJECT (pixbuf)); + + g_hash_table_insert (pixbuf_cache, record->key, record); + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); +} + + +/*****************************************************************************/ +/* Get pixbuf. If not in cache, read it and add to cache. */ +/*****************************************************************************/ +GdkPixbuf * +gl_pixbuf_cache_get_pixbuf (GHashTable *pixbuf_cache, + gchar *name) +{ + CacheRecord *record; + GdkPixbuf *pixbuf; + + gl_debug (DEBUG_PIXBUF_CACHE, "START pixbuf_cache=%p", pixbuf_cache); + + record = g_hash_table_lookup (pixbuf_cache, name); + + if (record != NULL) { + record->references++; + gl_debug (DEBUG_PIXBUF_CACHE, "references=%d", record->references); + gl_debug (DEBUG_PIXBUF_CACHE, "END cached"); + return record->pixbuf; + } + + + pixbuf = gdk_pixbuf_new_from_file (name, NULL); + if ( pixbuf != NULL) { + record = g_new0 (CacheRecord, 1); + record->key = g_strdup (name); + record->references = 1; + record->pixbuf = pixbuf; + + g_hash_table_insert (pixbuf_cache, record->key, record); + } + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); + + return pixbuf; +} + + +/*****************************************************************************/ +/* Remove pixbuf, but only if no references left. */ +/*****************************************************************************/ +void +gl_pixbuf_cache_remove_pixbuf (GHashTable *pixbuf_cache, + gchar *name) +{ + CacheRecord *record; + + if (name == NULL) return; + + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + record = g_hash_table_lookup (pixbuf_cache, name); + if (record == NULL) { + gl_debug (DEBUG_PIXBUF_CACHE, "END not in cache"); + return; + } + + record->references--; + + if ( record->references == 0 ) { + g_hash_table_remove (pixbuf_cache, name); + } + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Add a name to a GList while iterating over cache. */ +/*---------------------------------------------------------------------------*/ +static void +add_name_to_list (gpointer key, + gpointer val, + gpointer user_data) +{ + gchar *name = (gchar *)key; + GList **name_list = (GList **)user_data; + + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + gl_debug (DEBUG_PIXBUF_CACHE, "adding name=%s", name); + + *name_list = g_list_append (*name_list, g_strdup(name)); + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); +} + + +/*****************************************************************************/ +/* Return a list of names for all pixbufs in the cache. */ +/*****************************************************************************/ +GList * +gl_pixbuf_cache_get_name_list (GHashTable *pixbuf_cache) +{ + GList *name_list = NULL; + + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + g_hash_table_foreach (pixbuf_cache, add_name_to_list, &name_list); + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); + + return name_list; +} + + +/*****************************************************************************/ +/* Free up a list of pixbuf names. */ +/*****************************************************************************/ +void +gl_pixbuf_cache_free_name_list (GList *name_list) +{ + GList *p_name; + + gl_debug (DEBUG_PIXBUF_CACHE, "START"); + + for (p_name = name_list; p_name != NULL; p_name = p_name->next) { + g_free (p_name->data); + p_name->data = NULL; + } + + g_list_free (name_list); + + gl_debug (DEBUG_PIXBUF_CACHE, "END"); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/pixbuf-cache.h b/src/pixbuf-cache.h new file mode 100644 index 00000000..333e5c82 --- /dev/null +++ b/src/pixbuf-cache.h @@ -0,0 +1,61 @@ +/* + * pixbuf-cache.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __PIXBUF_CACHE_H__ +#define __PIXBUF_CACHE_H__ + +#include +#include + +G_BEGIN_DECLS + +GHashTable *gl_pixbuf_cache_new (void); + +void gl_pixbuf_cache_free (GHashTable *pixbuf_cache); + +void gl_pixbuf_cache_add_pixbuf (GHashTable *pixbuf_cache, + gchar *name, + GdkPixbuf *pixbuf); + +GdkPixbuf *gl_pixbuf_cache_get_pixbuf (GHashTable *pixbuf_cache, + gchar *name); + +void gl_pixbuf_cache_remove_pixbuf (GHashTable *pixbuf_cache, + gchar *name); + +GList *gl_pixbuf_cache_get_name_list (GHashTable *pixbuf_cache); + +void gl_pixbuf_cache_free_name_list (GList *name_list); + +G_END_DECLS + +#endif /*__PIXBUF_CACHE_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/pixmaps/Makefile.am b/src/pixmaps/Makefile.am new file mode 100644 index 00000000..5b192860 --- /dev/null +++ b/src/pixmaps/Makefile.am @@ -0,0 +1,18 @@ + +EXTRA_DIST = \ + 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 + diff --git a/src/pixmaps/checkerboard.xpm b/src/pixmaps/checkerboard.xpm new file mode 100644 index 00000000..33ab7b57 --- /dev/null +++ b/src/pixmaps/checkerboard.xpm @@ -0,0 +1,29 @@ +/* XPM */ +static char * checkerboard_xpm[] = { +"24 24 2 1", +" c #CCCCCC", +". c #000000", +".. .. .. .. .. .. ", +".. .. .. .. .. .. ", +" .. .. .. .. .. ..", +" .. .. .. .. .. ..", +".. .. .. .. .. .. ", +".. .. .. .. .. .. ", +" .. .. .. .. .. ..", +" .. .. .. .. .. ..", +".. .. .. .. .. .. ", +".. .. .. .. .. .. ", +" .. .. .. .. .. ..", +" .. .. .. .. .. ..", +".. .. .. .. .. .. ", +".. .. .. .. .. .. ", +" .. .. .. .. .. ..", +" .. .. .. .. .. ..", +".. .. .. .. .. .. ", +".. .. .. .. .. .. ", +" .. .. .. .. .. ..", +" .. .. .. .. .. ..", +".. .. .. .. .. .. ", +".. .. .. .. .. .. ", +" .. .. .. .. .. ..", +" .. .. .. .. .. .."}; diff --git a/src/pixmaps/collate.xpm b/src/pixmaps/collate.xpm new file mode 100644 index 00000000..a781151a --- /dev/null +++ b/src/pixmaps/collate.xpm @@ -0,0 +1,34 @@ +/* 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/src/pixmaps/cursor_barcode.xbm b/src/pixmaps/cursor_barcode.xbm new file mode 100644 index 00000000..6e8d1d62 --- /dev/null +++ b/src/pixmaps/cursor_barcode.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_barcode_mask.xbm b/src/pixmaps/cursor_barcode_mask.xbm new file mode 100644 index 00000000..52ed3ba2 --- /dev/null +++ b/src/pixmaps/cursor_barcode_mask.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_box.xbm b/src/pixmaps/cursor_box.xbm new file mode 100644 index 00000000..48ae4ea2 --- /dev/null +++ b/src/pixmaps/cursor_box.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_box_mask.xbm b/src/pixmaps/cursor_box_mask.xbm new file mode 100644 index 00000000..b41e0559 --- /dev/null +++ b/src/pixmaps/cursor_box_mask.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_ellipse.xbm b/src/pixmaps/cursor_ellipse.xbm new file mode 100644 index 00000000..946af9ac --- /dev/null +++ b/src/pixmaps/cursor_ellipse.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_ellipse_mask.xbm b/src/pixmaps/cursor_ellipse_mask.xbm new file mode 100644 index 00000000..22fb5442 --- /dev/null +++ b/src/pixmaps/cursor_ellipse_mask.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_image.xbm b/src/pixmaps/cursor_image.xbm new file mode 100644 index 00000000..32308360 --- /dev/null +++ b/src/pixmaps/cursor_image.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_image_mask.xbm b/src/pixmaps/cursor_image_mask.xbm new file mode 100644 index 00000000..9c79e82e --- /dev/null +++ b/src/pixmaps/cursor_image_mask.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_line.xbm b/src/pixmaps/cursor_line.xbm new file mode 100644 index 00000000..f5e2636e --- /dev/null +++ b/src/pixmaps/cursor_line.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_line_mask.xbm b/src/pixmaps/cursor_line_mask.xbm new file mode 100644 index 00000000..a9359d55 --- /dev/null +++ b/src/pixmaps/cursor_line_mask.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_text.xbm b/src/pixmaps/cursor_text.xbm new file mode 100644 index 00000000..4378c1a6 --- /dev/null +++ b/src/pixmaps/cursor_text.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/cursor_text_mask.xbm b/src/pixmaps/cursor_text_mask.xbm new file mode 100644 index 00000000..543c2b7f --- /dev/null +++ b/src/pixmaps/cursor_text_mask.xbm @@ -0,0 +1,16 @@ +#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/src/pixmaps/nocollate.xpm b/src/pixmaps/nocollate.xpm new file mode 100644 index 00000000..a67cc13c --- /dev/null +++ b/src/pixmaps/nocollate.xpm @@ -0,0 +1,34 @@ +/* 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/src/prefs-dialog.c b/src/prefs-dialog.c new file mode 100644 index 00000000..c2d44e1c --- /dev/null +++ b/src/prefs-dialog.c @@ -0,0 +1,690 @@ +/* + * prefs-dialog.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "prefs-dialog.h" + +#include +#include + +#include "prefs.h" +#include "hig.h" +#include "color-combo.h" +#include "color.h" +#include "font-combo.h" +#include "font-util.h" +#include "builder-util.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + +#define US_LETTER_ID "US-Letter" +#define A4_ID "A4" + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glPrefsDialogPrivate +{ + GtkBuilder *builder; + + /* Units properties */ + GtkWidget *units_points_radio; + GtkWidget *units_inches_radio; + GtkWidget *units_mm_radio; + + /* Page size properties */ + GtkWidget *page_size_us_letter_radio; + GtkWidget *page_size_a4_radio; + + /* Default text properties */ + GtkWidget *text_family_hbox; + GtkWidget *text_family_combo; + GtkWidget *text_size_spin; + GtkWidget *text_bold_toggle; + GtkWidget *text_italic_toggle; + GtkWidget *text_color_hbox; + GtkWidget *text_color_combo; + GtkWidget *text_left_toggle; + GtkWidget *text_center_toggle; + GtkWidget *text_right_toggle; + GtkWidget *text_line_spacing_spin; + + /* Default line properties */ + GtkWidget *line_width_spin; + GtkWidget *line_color_hbox; + GtkWidget *line_color_combo; + + /* Default fill properties */ + GtkWidget *fill_color_hbox; + GtkWidget *fill_color_combo; + + /* Prevent recursion */ + gboolean stop_signals; +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_prefs_dialog_finalize (GObject *object); +static void gl_prefs_dialog_construct (glPrefsDialog *dialog); + +static void response_cb (glPrefsDialog *dialog, + gint response, + gpointer user_data); + +static void construct_locale_page (glPrefsDialog *dialog); +static void construct_object_page (glPrefsDialog *dialog); + +static void align_toggle_cb (GtkToggleButton *toggle, + glPrefsDialog *dialog); + +static void update_locale_page_from_prefs (glPrefsDialog *dialog); +static void update_object_page_from_prefs (glPrefsDialog *dialog); + +static void update_prefs_from_locale_page (glPrefsDialog *dialog); +static void update_prefs_from_object_page (glPrefsDialog *dialog); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glPrefsDialog, gl_prefs_dialog, GTK_TYPE_DIALOG); + + +static void +gl_prefs_dialog_class_init (glPrefsDialogClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_PREFS, ""); + + gl_prefs_dialog_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_prefs_dialog_finalize; +} + + +static void +gl_prefs_dialog_init (glPrefsDialog *dialog) +{ + static gchar *object_ids[] = { "prefs_notebook", + "adjustment1", "adjustment2", "adjustment3", + NULL }; + GError *error = NULL; + + gl_debug (DEBUG_PREFS, "START"); + + dialog->priv = g_new0 (glPrefsDialogPrivate, 1); + + dialog->priv->builder = gtk_builder_new (); + gtk_builder_add_objects_from_file (dialog->priv->builder, + GLABELS_BUILDER_DIR "prefs-dialog.builder", + object_ids, + &error); + if (error) { + g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); + g_error_free (error); + return; + } + + gtk_container_set_border_width (GTK_CONTAINER(dialog), GL_HIG_PAD2); + + gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE); + gtk_dialog_add_button (GTK_DIALOG(dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); + + g_signal_connect(G_OBJECT (dialog), "response", + G_CALLBACK (response_cb), NULL); + + gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); + gtk_window_set_title (GTK_WINDOW (dialog), _("gLabels Preferences")); + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); + + gl_debug (DEBUG_PREFS, "END"); +} + + +static void +gl_prefs_dialog_finalize (GObject *object) +{ + glPrefsDialog* dialog = GL_PREFS_DIALOG (object); + + gl_debug (DEBUG_PREFS, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_PREFS_DIALOG (dialog)); + g_return_if_fail (dialog->priv != NULL); + + if (dialog->priv->builder) + { + g_object_unref (G_OBJECT (dialog->priv->builder)); + } + g_free (dialog->priv); + + G_OBJECT_CLASS (gl_prefs_dialog_parent_class)->finalize (object); + + gl_debug (DEBUG_PREFS, "END"); +} + + +/*****************************************************************************/ +/* NEW preferences dialog. */ +/*****************************************************************************/ +GtkWidget* +gl_prefs_dialog_new (GtkWindow *parent) +{ + GtkWidget *dialog; + + gl_debug (DEBUG_PREFS, "START"); + gl_debug (DEBUG_PREFS, "page size = \"%s\"", gl_prefs->default_page_size); + + dialog = GTK_WIDGET (g_object_new (GL_TYPE_PREFS_DIALOG, NULL)); + + if (parent) + gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); + + gl_prefs_dialog_construct (GL_PREFS_DIALOG(dialog)); + + + gl_debug (DEBUG_PREFS, "END"); + + return dialog; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Construct composite widget. */ +/*---------------------------------------------------------------------------*/ +static void +gl_prefs_dialog_construct (glPrefsDialog *dialog) +{ + GtkWidget *notebook; + + g_return_if_fail (GL_IS_PREFS_DIALOG (dialog)); + g_return_if_fail (dialog->priv != NULL); + + gl_builder_util_get_widgets (dialog->priv->builder, + "prefs_notebook", ¬ebook, + NULL); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook, FALSE, FALSE, 0); + + construct_locale_page (dialog); + construct_object_page (dialog); + + update_locale_page_from_prefs (dialog); + update_object_page_from_prefs (dialog); + + gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. "Response" callback. */ +/*---------------------------------------------------------------------------*/ +static void +response_cb (glPrefsDialog *dialog, + gint response, + gpointer user_data) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail(dialog != NULL); + g_return_if_fail(GTK_IS_DIALOG(dialog)); + + switch(response) { + case GTK_RESPONSE_CLOSE: + gtk_widget_hide (GTK_WIDGET(dialog)); + break; + case GTK_RESPONSE_DELETE_EVENT: + break; + default: + g_print ("response = %d", response); + g_assert_not_reached (); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Build Locale Properties Notebook Tab */ +/*--------------------------------------------------------------------------*/ +static void +construct_locale_page (glPrefsDialog *dialog) +{ + + gl_builder_util_get_widgets (dialog->priv->builder, + "units_points_radio", &dialog->priv->units_points_radio, + "units_inches_radio", &dialog->priv->units_inches_radio, + "units_mm_radio", &dialog->priv->units_mm_radio, + "page_size_us_letter_radio", &dialog->priv->page_size_us_letter_radio, + "page_size_a4_radio", &dialog->priv->page_size_a4_radio, + NULL); + + g_signal_connect_swapped ( + G_OBJECT(dialog->priv->units_points_radio), + "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); + g_signal_connect_swapped ( + G_OBJECT(dialog->priv->units_inches_radio), + "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); + g_signal_connect_swapped ( + G_OBJECT(dialog->priv->units_mm_radio), + "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); + g_signal_connect_swapped ( + G_OBJECT(dialog->priv->page_size_us_letter_radio), + "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); + g_signal_connect_swapped ( + G_OBJECT(dialog->priv->page_size_a4_radio), + "toggled", G_CALLBACK(update_prefs_from_locale_page), G_OBJECT(dialog)); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Build Default Object Properties Notebook Tab */ +/*--------------------------------------------------------------------------*/ +static void +construct_object_page (glPrefsDialog *dialog) +{ + gl_builder_util_get_widgets (dialog->priv->builder, + "text_family_hbox", &dialog->priv->text_family_hbox, + "text_size_spin", &dialog->priv->text_size_spin, + "text_bold_toggle", &dialog->priv->text_bold_toggle, + "text_italic_toggle", &dialog->priv->text_italic_toggle, + "text_color_hbox", &dialog->priv->text_color_hbox, + "text_left_toggle", &dialog->priv->text_left_toggle, + "text_center_toggle", &dialog->priv->text_center_toggle, + "text_right_toggle", &dialog->priv->text_right_toggle, + "text_line_spacing_spin", &dialog->priv->text_line_spacing_spin, + "line_width_spin", &dialog->priv->line_width_spin, + "line_color_hbox", &dialog->priv->line_color_hbox, + "fill_color_hbox", &dialog->priv->fill_color_hbox, + NULL); + + dialog->priv->text_family_combo = gl_font_combo_new ("Sans"); + + dialog->priv->text_color_combo = gl_color_combo_new (_("Default"), + GL_COLOR_TEXT_DEFAULT, + gl_prefs->default_text_color); + dialog->priv->line_color_combo = gl_color_combo_new (_("No Line"), + GL_COLOR_NO_LINE, + gl_prefs->default_line_color); + dialog->priv->fill_color_combo = gl_color_combo_new (_("No Fill"), + GL_COLOR_NO_FILL, + gl_prefs->default_fill_color); + + gtk_box_pack_start (GTK_BOX (dialog->priv->text_family_hbox), + dialog->priv->text_family_combo, + FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (dialog->priv->text_color_hbox), + dialog->priv->text_color_combo, + FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (dialog->priv->line_color_hbox), + dialog->priv->line_color_combo, + FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (dialog->priv->fill_color_hbox), + dialog->priv->fill_color_combo, + FALSE, FALSE, 0); + + g_signal_connect_swapped (G_OBJECT(dialog->priv->text_family_combo), + "changed", + G_CALLBACK(update_prefs_from_object_page), + G_OBJECT(dialog)); + g_signal_connect_swapped (G_OBJECT(dialog->priv->text_size_spin), + "changed", + G_CALLBACK(update_prefs_from_object_page), + G_OBJECT(dialog)); + g_signal_connect_swapped (G_OBJECT(dialog->priv->text_bold_toggle), + "toggled", + G_CALLBACK(update_prefs_from_object_page), + G_OBJECT(dialog)); + g_signal_connect_swapped (G_OBJECT(dialog->priv->text_italic_toggle), + "toggled", + G_CALLBACK(update_prefs_from_object_page), + G_OBJECT(dialog)); + g_signal_connect_swapped (G_OBJECT(dialog->priv->text_color_combo), + "color_changed", + G_CALLBACK(update_prefs_from_object_page), + G_OBJECT(dialog)); + + g_signal_connect (G_OBJECT(dialog->priv->text_left_toggle), + "toggled", + G_CALLBACK(align_toggle_cb), + G_OBJECT(dialog)); + g_signal_connect (G_OBJECT(dialog->priv->text_center_toggle), + "toggled", + G_CALLBACK(align_toggle_cb), + G_OBJECT(dialog)); + g_signal_connect (G_OBJECT(dialog->priv->text_right_toggle), + "toggled", + G_CALLBACK(align_toggle_cb), + G_OBJECT(dialog)); + + g_signal_connect_swapped (G_OBJECT(dialog->priv->text_line_spacing_spin), + "changed", + G_CALLBACK(update_prefs_from_object_page), + G_OBJECT(dialog)); + + g_signal_connect_swapped (G_OBJECT(dialog->priv->line_width_spin), + "changed", + G_CALLBACK(update_prefs_from_object_page), + G_OBJECT(dialog)); + g_signal_connect_swapped (G_OBJECT(dialog->priv->line_color_combo), + "color_changed", + G_CALLBACK(update_prefs_from_object_page), + G_OBJECT(dialog)); + + g_signal_connect_swapped (G_OBJECT(dialog->priv->fill_color_combo), + "color_changed", + G_CALLBACK(update_prefs_from_object_page), + G_OBJECT(dialog)); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Alignment togglebutton callback. */ +/*--------------------------------------------------------------------------*/ +static void +align_toggle_cb (GtkToggleButton *toggle, + glPrefsDialog *dialog) +{ + if (gtk_toggle_button_get_active (toggle)) + { + + if (GTK_WIDGET (toggle) == GTK_WIDGET (dialog->priv->text_left_toggle)) + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (dialog->priv->text_center_toggle), + FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (dialog->priv->text_right_toggle), + FALSE); + } + else if (GTK_WIDGET (toggle) == GTK_WIDGET (dialog->priv->text_center_toggle)) + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (dialog->priv->text_left_toggle), + FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (dialog->priv->text_right_toggle), + FALSE); + } + else if (GTK_WIDGET (toggle) == GTK_WIDGET (dialog->priv->text_right_toggle)) + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (dialog->priv->text_left_toggle), + FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (dialog->priv->text_center_toggle), + FALSE); + } + + update_prefs_from_object_page (dialog); + } + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Update locale page widgets from current prefs. */ +/*--------------------------------------------------------------------------*/ +static void +update_locale_page_from_prefs (glPrefsDialog *dialog) +{ + dialog->priv->stop_signals = TRUE; + + switch (gl_prefs->units) { + case LGL_UNITS_POINT: + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(dialog->priv->units_points_radio), + TRUE); + break; + case LGL_UNITS_INCH: + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(dialog->priv->units_inches_radio), + TRUE); + break; + case LGL_UNITS_MM: + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(dialog->priv->units_mm_radio), + TRUE); + break; + default: + g_message ("Illegal units"); /* Should not happen */ + break; + } + + if ( g_ascii_strcasecmp(gl_prefs->default_page_size, US_LETTER_ID) == 0) + { + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(dialog->priv->page_size_us_letter_radio), TRUE); + } + else if ( g_ascii_strcasecmp(gl_prefs->default_page_size, A4_ID) == 0) + { + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON(dialog->priv->page_size_a4_radio), TRUE); + } + else + { + g_message ("Unknown default page size"); /* Shouldn't happen */ + } + + dialog->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Update object page widgets from current prefs. */ +/*--------------------------------------------------------------------------*/ +static void +update_object_page_from_prefs (glPrefsDialog *dialog) +{ + + dialog->priv->stop_signals = TRUE; + + gl_font_combo_set_family (GL_FONT_COMBO (dialog->priv->text_family_combo), + gl_prefs->default_font_family); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->priv->text_size_spin), + gl_prefs->default_font_size); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_bold_toggle), + (gl_prefs->default_font_weight == PANGO_WEIGHT_BOLD)); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_italic_toggle), + gl_prefs->default_font_italic_flag); + + gl_color_combo_set_color (GL_COLOR_COMBO(dialog->priv->text_color_combo), + gl_prefs->default_text_color); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_left_toggle), + (gl_prefs->default_text_alignment == GTK_JUSTIFY_LEFT)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_center_toggle), + (gl_prefs->default_text_alignment == GTK_JUSTIFY_CENTER)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->text_right_toggle), + (gl_prefs->default_text_alignment == GTK_JUSTIFY_RIGHT)); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->priv->text_line_spacing_spin), + gl_prefs->default_text_line_spacing); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->priv->line_width_spin), + gl_prefs->default_line_width); + + gl_color_combo_set_color (GL_COLOR_COMBO(dialog->priv->line_color_combo), + gl_prefs->default_line_color); + + + gl_color_combo_set_color (GL_COLOR_COMBO(dialog->priv->fill_color_combo), + gl_prefs->default_fill_color); + + + dialog->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Update prefs from current state of locale page widgets. */ +/*--------------------------------------------------------------------------*/ +static void +update_prefs_from_locale_page (glPrefsDialog *dialog) +{ + if (dialog->priv->stop_signals) return; + + if (gtk_toggle_button_get_active ( + GTK_TOGGLE_BUTTON(dialog->priv->units_points_radio))) + { + gl_prefs->units = LGL_UNITS_POINT; + } + if (gtk_toggle_button_get_active ( + GTK_TOGGLE_BUTTON(dialog->priv->units_inches_radio))) + { + gl_prefs->units = LGL_UNITS_INCH; + } + if (gtk_toggle_button_get_active ( + GTK_TOGGLE_BUTTON(dialog->priv->units_mm_radio))) + { + gl_prefs->units = LGL_UNITS_MM; + } + + if (gtk_toggle_button_get_active ( + GTK_TOGGLE_BUTTON(dialog->priv->page_size_us_letter_radio))) + { + g_free (gl_prefs->default_page_size); + gl_prefs->default_page_size = g_strdup (US_LETTER_ID); + } + if (gtk_toggle_button_get_active ( + GTK_TOGGLE_BUTTON(dialog->priv->page_size_a4_radio))) + { + g_free (gl_prefs->default_page_size); + gl_prefs->default_page_size = g_strdup (A4_ID); + } + + gl_prefs_model_save_settings (gl_prefs); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Update prefs from current state of object page widgets. */ +/*--------------------------------------------------------------------------*/ +static void +update_prefs_from_object_page (glPrefsDialog *dialog) +{ + guint color; + gboolean is_default; + + if (dialog->priv->stop_signals) return; + + g_free (gl_prefs->default_font_family); + gl_prefs->default_font_family = + gl_font_combo_get_family (GL_FONT_COMBO (dialog->priv->text_family_combo)); + gl_prefs->default_font_size = + gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->text_size_spin)); + + if (gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (dialog->priv->text_bold_toggle))) + { + gl_prefs->default_font_weight = PANGO_WEIGHT_BOLD; + } + else + { + gl_prefs->default_font_weight = PANGO_WEIGHT_NORMAL; + } + + gl_prefs->default_font_italic_flag = + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON + (dialog->priv->text_italic_toggle)); + + color = gl_color_combo_get_color (GL_COLOR_COMBO(dialog->priv->text_color_combo), + &is_default); + if (!is_default) + { + gl_prefs->default_text_color = color; + } + + if (gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (dialog->priv->text_left_toggle))) + { + gl_prefs->default_text_alignment = GTK_JUSTIFY_LEFT; + } + else if (gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (dialog->priv->text_right_toggle))) + { + gl_prefs->default_text_alignment = GTK_JUSTIFY_RIGHT; + } + else if (gtk_toggle_button_get_active + (GTK_TOGGLE_BUTTON (dialog->priv->text_center_toggle))) + { + gl_prefs->default_text_alignment = GTK_JUSTIFY_CENTER; + } + else + { + /* Should not happen. */ + gl_prefs->default_text_alignment = GTK_JUSTIFY_LEFT; + } + + + gl_prefs->default_text_line_spacing = + gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->text_line_spacing_spin)); + + gl_prefs->default_line_width = + gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->line_width_spin)); + + color = gl_color_combo_get_color (GL_COLOR_COMBO(dialog->priv->line_color_combo), + &is_default); + if (!is_default) + { + gl_prefs->default_line_color = color; + } + + + color = gl_color_combo_get_color (GL_COLOR_COMBO(dialog->priv->fill_color_combo), + &is_default); + if (!is_default) + { + gl_prefs->default_fill_color = color; + } + + gl_prefs_model_save_settings (gl_prefs); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/prefs-dialog.h b/src/prefs-dialog.h new file mode 100644 index 00000000..86b11042 --- /dev/null +++ b/src/prefs-dialog.h @@ -0,0 +1,77 @@ +/* + * prefs-dialog.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __PREFS_DIALOG_H__ +#define __PREFS_DIALOG_H__ + +#include + +G_BEGIN_DECLS + +#define GL_TYPE_PREFS_DIALOG (gl_prefs_dialog_get_type ()) +#define GL_PREFS_DIALOG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PREFS_DIALOG, glPrefsDialog)) +#define GL_PREFS_DIALOG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PREFS_DIALOG, glPrefsDialogClass)) +#define GL_IS_PREFS_DIALOG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PREFS_DIALOG)) +#define GL_IS_PREFS_DIALOG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PREFS_DIALOG)) +#define GL_PREFS_DIALOG_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_PREFS_DIALOG, glPrefsDialogClass)) + + +typedef struct _glPrefsDialog glPrefsDialog; +typedef struct _glPrefsDialogClass glPrefsDialogClass; + +typedef struct _glPrefsDialogPrivate glPrefsDialogPrivate; + +struct _glPrefsDialog +{ + GtkDialog parent_instance; + + glPrefsDialogPrivate *priv; + +}; + +struct _glPrefsDialogClass +{ + GtkDialogClass parent_class; +}; + +GType gl_prefs_dialog_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_prefs_dialog_new (GtkWindow *parent); + +G_END_DECLS + +#endif /* __PREFS_DIALOG_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/prefs-model.c b/src/prefs-model.c new file mode 100644 index 00000000..1ec1c0bd --- /dev/null +++ b/src/prefs-model.c @@ -0,0 +1,741 @@ +/* + * prefs-model.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "prefs-model.h" + +#include +#include +#include + +#include +#include "marshal.h" +#include "str-util.h" +#include "color.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + +/* GConf keys */ +#define BASE_KEY "/apps/glabels" + +#define PREF_UNITS "/units" +#define PREF_DEFAULT_PAGE_SIZE "/default-page-size" + +#define PREF_DEFAULT_FONT_FAMILY "/default-font-family" +#define PREF_DEFAULT_FONT_SIZE "/default-font-size" +#define PREF_DEFAULT_FONT_WEIGHT "/default-font-weight" +#define PREF_DEFAULT_FONT_ITALIC_FLAG "/default-font-italic-flag" +#define PREF_DEFAULT_TEXT_COLOR "/default-text-color" +#define PREF_DEFAULT_TEXT_ALIGNMENT "/default-text-alignment" +#define PREF_DEFAULT_TEXT_LINE_SPACING "/default-text-line-spacing" + +#define PREF_DEFAULT_LINE_WIDTH "/default-line-width" +#define PREF_DEFAULT_LINE_COLOR "/default-line-color" + +#define PREF_DEFAULT_FILL_COLOR "/default-fill-color" + +#define PREF_MAIN_TOOLBAR_VISIBLE "/main-toolbar-visible" +#define PREF_MAIN_TOOLBAR_BUTTONS_STYLE "/main-toolbar-buttons-style" + +#define PREF_DRAWING_TOOLBAR_VISIBLE "/drawing-toolbar-visible" + +#define PREF_PROPERTY_TOOLBAR_VISIBLE "/property-toolbar-visible" + +#define PREF_GRID_VISIBLE "/grid-visible" +#define PREF_MARKUP_VISIBLE "/markup-visible" + +#define PREF_MAX_RECENTS "/max-recents" + +#define PREF_RECENT_TEMPLATES "/recent-templates" +#define PREF_MAX_RECENT_TEMPLATES "/max-recent-templates" + +/* Default values */ +#define DEFAULT_UNITS_STRING_US units_to_string (LGL_UNITS_INCH) +#define DEFAULT_PAGE_SIZE_US "US-Letter" + +#define DEFAULT_UNITS_STRING_METRIC units_to_string (LGL_UNITS_MM) +#define DEFAULT_PAGE_SIZE_METRIC "A4" + +#define DEFAULT_FONT_FAMILY "Sans" +#define DEFAULT_FONT_SIZE 14.0 +#define DEFAULT_FONT_WEIGHT_STRING gl_str_util_weight_to_string (PANGO_WEIGHT_NORMAL) +#define DEFAULT_FONT_ITALIC_FLAG FALSE +#define DEFAULT_TEXT_ALIGN_STRING gl_str_util_align_to_string (PANGO_ALIGN_LEFT) +#define DEFAULT_TEXT_COLOR GL_COLOR (0,0,0) +#define DEFAULT_TEXT_LINE_SPACING 1.0 + +#define DEFAULT_LINE_WIDTH 1.0 +#define DEFAULT_LINE_COLOR GL_COLOR_A (0, 0, 0, 255) + +#define DEFAULT_FILL_COLOR GL_COLOR_A (0, 255, 0, 255) + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +enum { + CHANGED, + LAST_SIGNAL +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + +static guint signals[LAST_SIGNAL] = {0}; + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_prefs_model_finalize (GObject *object); + +static void notify_cb (GConfClient *client, + guint cnxn_id, + GConfEntry *entry, + glPrefsModel *prefs_model); + +static gchar *get_string (GConfClient *client, + const gchar *key, + const gchar *def); + +static gboolean get_bool (GConfClient *client, + const gchar *key, + gboolean def); + +static gint get_int (GConfClient *client, + const gchar *key, + gint def); + +static gdouble get_float (GConfClient *client, + const gchar *key, + gdouble def); + +static lglUnitsType string_to_units (const gchar *string); +static const gchar *units_to_string (lglUnitsType units); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glPrefsModel, gl_prefs_model, G_TYPE_OBJECT); + + +static void +gl_prefs_model_class_init (glPrefsModelClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_PREFS, "START"); + + gl_prefs_model_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_prefs_model_finalize; + + signals[CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glPrefsModelClass, changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + gl_debug (DEBUG_PREFS, "END"); +} + + +static void +gl_prefs_model_init (glPrefsModel *prefs_model) +{ + gl_debug (DEBUG_PREFS, "START"); + + prefs_model->gconf_client = gconf_client_get_default (); + + g_return_if_fail (prefs_model->gconf_client != NULL); + + gconf_client_add_dir (prefs_model->gconf_client, + BASE_KEY, + GCONF_CLIENT_PRELOAD_ONELEVEL, + NULL); + + gconf_client_notify_add (prefs_model->gconf_client, + BASE_KEY, + (GConfClientNotifyFunc)notify_cb, prefs_model, + NULL, NULL); + + gl_debug (DEBUG_PREFS, "END"); +} + + +static void +gl_prefs_model_finalize (GObject *object) +{ + glPrefsModel *prefs_model = GL_PREFS_MODEL (object); + + gl_debug (DEBUG_PREFS, "START"); + + g_return_if_fail (object && GL_IS_PREFS_MODEL (object)); + + g_object_unref (G_OBJECT(prefs_model->gconf_client)); + g_free (prefs_model->default_page_size); + g_free (prefs_model->default_font_family); + + G_OBJECT_CLASS (gl_prefs_model_parent_class)->finalize (object); + + gl_debug (DEBUG_PREFS, "END"); +} + + +/*****************************************************************************/ +/* New prefs_model object. */ +/*****************************************************************************/ +glPrefsModel * +gl_prefs_model_new (void) +{ + glPrefsModel *prefs_model; + + gl_debug (DEBUG_PREFS, "START"); + + prefs_model = GL_PREFS_MODEL (g_object_new (gl_prefs_model_get_type(), NULL)); + + gl_debug (DEBUG_PREFS, "END"); + + return prefs_model; +} + + +/*****************************************************************************/ +/* Save all settings. */ +/*****************************************************************************/ +void +gl_prefs_model_save_settings (glPrefsModel *prefs_model) +{ + gl_debug (DEBUG_PREFS, "START"); + + g_return_if_fail (prefs_model && GL_IS_PREFS_MODEL(prefs_model)); + g_return_if_fail (prefs_model->gconf_client != NULL); + + /* We are saving settings because presumably some of them have been changed. */ + g_signal_emit (G_OBJECT(prefs_model), signals[CHANGED], 0); + + /* Units */ + gconf_client_set_string (prefs_model->gconf_client, + BASE_KEY PREF_UNITS, + units_to_string(prefs_model->units), + NULL); + lgl_xml_set_default_units (prefs_model->units); + + /* Default page size */ + gconf_client_set_string (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_PAGE_SIZE, + prefs_model->default_page_size, + NULL); + + + /* Text properties */ + gconf_client_set_string (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_FONT_FAMILY, + prefs_model->default_font_family, + NULL); + + gconf_client_set_float (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_FONT_SIZE, + prefs_model->default_font_size, + NULL); + + gconf_client_set_string (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_FONT_WEIGHT, + gl_str_util_weight_to_string(prefs_model->default_font_weight), + NULL); + + gconf_client_set_int (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_TEXT_COLOR, + prefs_model->default_text_color, + NULL); + + gconf_client_set_string (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_TEXT_ALIGNMENT, + gl_str_util_align_to_string(prefs_model->default_text_alignment), + NULL); + + gconf_client_set_float (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_TEXT_LINE_SPACING, + prefs_model->default_text_line_spacing, + NULL); + + /* Line properties */ + gconf_client_set_float (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_LINE_WIDTH, + prefs_model->default_line_width, + NULL); + + gconf_client_set_int (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_LINE_COLOR, + prefs_model->default_line_color, + NULL); + + + /* Fill properties */ + gconf_client_set_int (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_FILL_COLOR, + prefs_model->default_fill_color, + NULL); + + + /* Main Toolbar */ + gconf_client_set_bool (prefs_model->gconf_client, + BASE_KEY PREF_MAIN_TOOLBAR_VISIBLE, + prefs_model->main_toolbar_visible, + NULL); + + gconf_client_set_int (prefs_model->gconf_client, + BASE_KEY PREF_MAIN_TOOLBAR_BUTTONS_STYLE, + prefs_model->main_toolbar_buttons_style, + NULL); + + /* Drawing Toolbar */ + gconf_client_set_bool (prefs_model->gconf_client, + BASE_KEY PREF_DRAWING_TOOLBAR_VISIBLE, + prefs_model->drawing_toolbar_visible, + NULL); + + /* Property Toolbar */ + gconf_client_set_bool (prefs_model->gconf_client, + BASE_KEY PREF_PROPERTY_TOOLBAR_VISIBLE, + prefs_model->property_toolbar_visible, + NULL); + + /* View properties */ + gconf_client_set_bool (prefs_model->gconf_client, + BASE_KEY PREF_GRID_VISIBLE, + prefs_model->grid_visible, + NULL); + + gconf_client_set_bool (prefs_model->gconf_client, + BASE_KEY PREF_MARKUP_VISIBLE, + prefs_model->markup_visible, + NULL); + + /* Recent files */ + gconf_client_set_int (prefs_model->gconf_client, + BASE_KEY PREF_MAX_RECENTS, + prefs_model->max_recents, + NULL); + + /* Recent templates */ + gconf_client_set_list (prefs_model->gconf_client, + BASE_KEY PREF_RECENT_TEMPLATES, + GCONF_VALUE_STRING, + prefs_model->recent_templates, + NULL); + gconf_client_set_int (prefs_model->gconf_client, + BASE_KEY PREF_MAX_RECENT_TEMPLATES, + prefs_model->max_recent_templates, + NULL); + + + gconf_client_suggest_sync (prefs_model->gconf_client, NULL); + + gl_debug (DEBUG_PREFS, "END"); +} + + +/*****************************************************************************/ +/* Load all settings. */ +/*****************************************************************************/ +void +gl_prefs_model_load_settings (glPrefsModel *prefs_model) +{ + const gchar *pgsize, *default_units_string, *default_page_size; + gchar *string; + lglPaper *paper; + GSList *p, *p_next; + + gl_debug (DEBUG_PREFS, "START"); + + g_return_if_fail (prefs_model && GL_IS_PREFS_MODEL(prefs_model)); + g_return_if_fail (prefs_model->gconf_client != NULL); + + /* Make educated guess about locale defaults. */ + pgsize = gtk_paper_size_get_default (); + if ( strcmp (pgsize,GTK_PAPER_NAME_LETTER) == 0 ) + { + default_units_string = DEFAULT_UNITS_STRING_US; + default_page_size = DEFAULT_PAGE_SIZE_US; + } + else + { + default_units_string = DEFAULT_UNITS_STRING_METRIC; + default_page_size = DEFAULT_PAGE_SIZE_METRIC; + } + + /* Units */ + string = + get_string (prefs_model->gconf_client, + BASE_KEY PREF_UNITS, + default_units_string); + prefs_model->units = string_to_units( string ); + g_free( string ); + lgl_xml_set_default_units (prefs_model->units); + + + /* Page size */ + g_free (prefs_model->default_page_size); + prefs_model->default_page_size = + get_string (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_PAGE_SIZE, + default_page_size); + + /* Text properties */ + g_free (prefs_model->default_font_family); + prefs_model->default_font_family = + get_string (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_FONT_FAMILY, + DEFAULT_FONT_FAMILY); + + prefs_model->default_font_size = + get_float (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_FONT_SIZE, + DEFAULT_FONT_SIZE); + + string = + get_string (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_FONT_WEIGHT, + DEFAULT_FONT_WEIGHT_STRING); + prefs_model->default_font_weight = gl_str_util_string_to_weight( string ); + g_free( string ); + + prefs_model->default_text_color = + get_int (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_TEXT_COLOR, + DEFAULT_TEXT_COLOR); + + string = + get_string (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_TEXT_ALIGNMENT, + DEFAULT_TEXT_ALIGN_STRING); + prefs_model->default_text_alignment = gl_str_util_string_to_align( string ); + g_free( string ); + + prefs_model->default_text_line_spacing = + get_float (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_TEXT_LINE_SPACING, + DEFAULT_TEXT_LINE_SPACING); + + gl_debug (DEBUG_PREFS, "text_line_spacing = %f", prefs_model->default_text_line_spacing); + + /* Line properties */ + prefs_model->default_line_width = + get_float (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_LINE_WIDTH, + DEFAULT_LINE_WIDTH); + prefs_model->default_line_color = + get_int (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_LINE_COLOR, + DEFAULT_LINE_COLOR); + + /* Fill properties */ + prefs_model->default_fill_color = + get_int (prefs_model->gconf_client, + BASE_KEY PREF_DEFAULT_FILL_COLOR, + DEFAULT_FILL_COLOR); + + + /* User Inferface/Main Toolbar */ + prefs_model->main_toolbar_visible = + get_bool (prefs_model->gconf_client, + BASE_KEY PREF_MAIN_TOOLBAR_VISIBLE, + TRUE); + + prefs_model->main_toolbar_buttons_style = + get_int (prefs_model->gconf_client, + BASE_KEY PREF_MAIN_TOOLBAR_BUTTONS_STYLE, + GL_TOOLBAR_SYSTEM); + + /* User Inferface/Drawing Toolbar */ + prefs_model->drawing_toolbar_visible = + get_bool (prefs_model->gconf_client, + BASE_KEY PREF_DRAWING_TOOLBAR_VISIBLE, + TRUE); + + /* User Inferface/Property Toolbar */ + prefs_model->property_toolbar_visible = + get_bool (prefs_model->gconf_client, + BASE_KEY PREF_PROPERTY_TOOLBAR_VISIBLE, + TRUE); + + /* View properties */ + prefs_model->grid_visible = + get_bool (prefs_model->gconf_client, + BASE_KEY PREF_GRID_VISIBLE, + TRUE); + + prefs_model->markup_visible = + get_bool (prefs_model->gconf_client, + BASE_KEY PREF_MARKUP_VISIBLE, + TRUE); + + /* Recent files */ + prefs_model->max_recents = + get_int (prefs_model->gconf_client, + BASE_KEY PREF_MAX_RECENTS, + -1); + + /* Recent templates */ + for (p=prefs_model->recent_templates; p != NULL; p=p->next) + { + g_free (p->data); + } + g_slist_free (prefs_model->recent_templates); + prefs_model->recent_templates = + gconf_client_get_list (prefs_model->gconf_client, + BASE_KEY PREF_RECENT_TEMPLATES, + GCONF_VALUE_STRING, + NULL); + prefs_model->max_recent_templates = + get_int (prefs_model->gconf_client, + BASE_KEY PREF_MAX_RECENT_TEMPLATES, + 5); + + + /* Proof read the default page size -- it must be a valid id. */ + /* (For compatability with older versions.) */ + paper = lgl_db_lookup_paper_from_id (prefs_model->default_page_size); + if ( paper == NULL ) { + prefs_model->default_page_size = g_strdup (DEFAULT_PAGE_SIZE_US); + } else { + lgl_paper_free (paper); + paper = NULL; + } + + /* Proof read the recent templates list. Make sure the template names */ + /* are valid. Remove from list if not. */ + for (p=prefs_model->recent_templates; p != NULL; p=p_next) + { + p_next = p->next; + + if ( !lgl_db_does_template_name_exist (p->data) ) + { + g_free (p->data); + prefs_model->recent_templates = g_slist_delete_link (prefs_model->recent_templates, p); + } + } + + gl_debug (DEBUG_PREFS, "max_recents = %d", prefs_model->max_recents); + + + g_signal_emit (G_OBJECT(prefs_model), signals[CHANGED], 0); + + gl_debug (DEBUG_PREFS, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Key changed callback. */ +/*---------------------------------------------------------------------------*/ +static void +notify_cb (GConfClient *client, + guint cnxn_id, + GConfEntry *entry, + glPrefsModel *prefs_model) +{ + gl_debug (DEBUG_PREFS, "Key was changed: %s", entry->key); + + gl_prefs_model_load_settings (prefs_model); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Utilities to get values with defaults. */ +/*---------------------------------------------------------------------------*/ +static gchar* +get_string (GConfClient *client, + const gchar *key, + const gchar *def) +{ + gchar* val; + + val = gconf_client_get_string (client, key, NULL); + + if (val != NULL) { + + return val; + + } else { + + return def ? g_strdup (def) : NULL; + + } +} + + +static gboolean +get_bool (GConfClient *client, + const gchar *key, + gboolean def) +{ + GConfValue* val; + gboolean retval; + + val = gconf_client_get (client, key, NULL); + + if (val != NULL) { + + if ( val->type == GCONF_VALUE_BOOL ) { + retval = gconf_value_get_bool (val); + } else { + retval = def; + } + + gconf_value_free (val); + + return retval; + + } else { + + return def; + + } +} + + +static gint +get_int (GConfClient *client, + const gchar *key, + gint def) +{ + GConfValue* val; + gint retval; + + val = gconf_client_get (client, key, NULL); + + if (val != NULL) { + + if ( val->type == GCONF_VALUE_INT) { + retval = gconf_value_get_int(val); + } else { + retval = def; + } + + gconf_value_free (val); + + return retval; + + } else { + + return def; + + } +} + + +static gdouble +get_float (GConfClient *client, + const gchar *key, + gdouble def) +{ + GConfValue* val; + gdouble retval; + + val = gconf_client_get (client, key, NULL); + + if (val != NULL) { + + if ( val->type == GCONF_VALUE_FLOAT ) { + retval = gconf_value_get_float(val); + } else { + retval = def; + } + + gconf_value_free (val); + + return retval; + + } else { + return def; + + } +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Utilities to deal with units. */ +/*---------------------------------------------------------------------------*/ +static lglUnitsType +string_to_units (const gchar *string) +{ + lglUnitsType units; + + if (g_ascii_strcasecmp (string, "Points") == 0) { + units = LGL_UNITS_POINT; + } else if (g_ascii_strcasecmp (string, "Inches") == 0) { + units = LGL_UNITS_INCH; + } else if (g_ascii_strcasecmp (string, "Millimeters") == 0) { + units = LGL_UNITS_MM; + } else { + units = LGL_UNITS_INCH; + } + + return units; +} + + +static const +gchar *units_to_string (lglUnitsType units) +{ + switch (units) { + case LGL_UNITS_POINT: + return "Points"; + break; + case LGL_UNITS_INCH: + return "Inches"; + break; + case LGL_UNITS_MM: + return "Millimeters"; + break; + default: + return "Inches"; + break; + } +} + + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/prefs-model.h b/src/prefs-model.h new file mode 100644 index 00000000..bb5ca180 --- /dev/null +++ b/src/prefs-model.h @@ -0,0 +1,128 @@ +/* + * prefs-model.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __PREFS_MODEL_H__ +#define __PREFS_MODEL_H__ + +#include +#include +#include +#include + +G_BEGIN_DECLS + +typedef enum { + GL_TOOLBAR_SYSTEM = 0, + GL_TOOLBAR_ICONS, + GL_TOOLBAR_ICONS_AND_TEXT +} glToolbarSetting; + +#define GL_TYPE_PREFS_MODEL (gl_prefs_model_get_type ()) +#define GL_PREFS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PREFS_MODEL, glPrefsModel)) +#define GL_PREFS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PREFS_MODEL, glPrefsModelClass)) +#define GL_IS_PREFS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PREFS_MODEL)) +#define GL_IS_PREFS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PREFS_MODEL)) +#define GL_PREFS_MODEL_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_PREFS_MODEL, glPrefsModelClass)) + + +typedef struct _glPrefsModel glPrefsModel; +typedef struct _glPrefsModelClass glPrefsModelClass; + +typedef struct _glPrefsModelPrivate glPrefsModelPrivate; + + +struct _glPrefsModel { + GObject *object; + + GConfClient *gconf_client; + + /* Units */ + lglUnitsType units; + + /* Page size */ + gchar *default_page_size; + + /* Text properties */ + gchar *default_font_family; + gdouble default_font_size; + PangoWeight default_font_weight; + gboolean default_font_italic_flag; + guint default_text_color; + PangoAlignment default_text_alignment; + gdouble default_text_line_spacing; + + /* Line properties */ + gdouble default_line_width; + guint default_line_color; + + /* Fill properties */ + guint default_fill_color; + + /* User Interface/Main Toolbar */ + gboolean main_toolbar_visible; + glToolbarSetting main_toolbar_buttons_style; + + /* User Interface/Drawing Toolbar */ + gboolean drawing_toolbar_visible; + + /* User Interface/Property Toolbar */ + gboolean property_toolbar_visible; + + /* View properties */ + gboolean grid_visible; + gboolean markup_visible; + + /* Recent files */ + gint max_recents; + + /* Recent templates */ + GSList *recent_templates; + gint max_recent_templates; +}; + +struct _glPrefsModelClass { + GObjectClass parent_class; + + void (*changed) (glPrefsModel *prefs_model, gpointer user_data); +}; + + +GType gl_prefs_model_get_type (void) G_GNUC_CONST; + +glPrefsModel *gl_prefs_model_new (void); + +void gl_prefs_model_save_settings (glPrefsModel *prefs_model); + +void gl_prefs_model_load_settings (glPrefsModel *prefs_model); + +G_END_DECLS + +#endif /* __PREFS_MODEL_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/prefs.c b/src/prefs.c new file mode 100644 index 00000000..85922bf5 --- /dev/null +++ b/src/prefs.c @@ -0,0 +1,223 @@ +/* + * prefs.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "prefs.h" + +#include +#include + +#include "debug.h" + +glPrefsModel *gl_prefs = NULL; + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + + + +/*****************************************************************************/ +/* Initialize preferences module. */ +/*****************************************************************************/ +void +gl_prefs_init (void) +{ + gl_debug (DEBUG_PREFS, "START"); + + gl_prefs = gl_prefs_model_new (); + + gl_prefs_model_load_settings (gl_prefs); + + gl_debug (DEBUG_PREFS, "END"); +} + + +/****************************************************************************/ +/* Get string representing desired units. */ +/****************************************************************************/ +const gchar * +gl_prefs_get_page_size (void) +{ + return (gl_prefs->default_page_size); +} + +/****************************************************************************/ +/* Get desired units. */ +/****************************************************************************/ +lglUnitsType +gl_prefs_get_units (void) +{ + return gl_prefs->units; +} + +/****************************************************************************/ +/* Get desired units per point. */ +/****************************************************************************/ +gdouble +gl_prefs_get_units_per_point (void) +{ + + switch (gl_prefs->units) { + case LGL_UNITS_POINT: + return 1.0; /* points */ + case LGL_UNITS_INCH: + return 1.0 / 72.0; /* inches */ + case LGL_UNITS_MM: + return 0.35277778; /* mm */ + default: + g_message ("Illegal units"); /* Should not happen */ + return 1.0; + } +} + +/****************************************************************************/ +/* Get precision for desired units. */ +/****************************************************************************/ +gint +gl_prefs_get_units_precision (void) +{ + + switch (gl_prefs->units) { + case LGL_UNITS_POINT: + return 1; /* points */ + case LGL_UNITS_INCH: + return 3; /* inches */ + case LGL_UNITS_MM: + return 1; /* mm */ + default: + g_message ("Illegal units"); /* Should not happen */ + return 1.0; + } +} + +/****************************************************************************/ +/* Get step size for desired units. */ +/****************************************************************************/ +gdouble +gl_prefs_get_units_step_size (void) +{ + + switch (gl_prefs->units) { + case LGL_UNITS_POINT: + return 0.1; /* points */ + case LGL_UNITS_INCH: + return 0.001; /* inches */ + case LGL_UNITS_MM: + return 0.1; /* mm */ + default: + g_message ("Illegal units"); /* Should not happen */ + return 1.0; + } +} + +/****************************************************************************/ +/* Get string representing desired units. */ +/****************************************************************************/ +const gchar * +gl_prefs_get_units_string (void) +{ + + switch (gl_prefs->units) { + case LGL_UNITS_POINT: + return _("points"); + case LGL_UNITS_INCH: + return _("inches"); + case LGL_UNITS_MM: + return _("mm"); + default: + g_message ("Illegal units"); /* Should not happen */ + return _("points"); + } +} + +/****************************************************************************/ +/* Add template to recent template list. */ +/****************************************************************************/ +void +gl_prefs_add_recent_template (const gchar *name) +{ + GSList *p; + + /* + * If already in list, remove that entry. + */ + p = g_slist_find_custom (gl_prefs->recent_templates, + name, + (GCompareFunc)lgl_str_utf8_casecmp); + if (p) + { + gl_prefs->recent_templates = + g_slist_remove_link (gl_prefs->recent_templates, p); + g_free (p->data); + g_slist_free_1 (p); + } + + /* + * Now prepend to list. + */ + gl_prefs->recent_templates = + g_slist_prepend (gl_prefs->recent_templates, g_strdup (name)); + + /* + * Truncate list to maximum size + */ + while (g_slist_length (gl_prefs->recent_templates) > gl_prefs->max_recent_templates) + { + p = g_slist_last (gl_prefs->recent_templates); + gl_prefs->recent_templates = + g_slist_remove_link (gl_prefs->recent_templates, p); + g_free (p->data); + g_slist_free_1 (p); + } + + /* + * Sync to disk. + */ + gl_prefs_model_save_settings (gl_prefs); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/prefs.h b/src/prefs.h new file mode 100644 index 00000000..5787debb --- /dev/null +++ b/src/prefs.h @@ -0,0 +1,64 @@ +/* + * prefs.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __PREFS_H__ +#define __PREFS_H__ + +#include "prefs-model.h" + +G_BEGIN_DECLS + + + +extern glPrefsModel *gl_prefs; + + + +void gl_prefs_init (void); + +const gchar *gl_prefs_get_page_size (void); + +lglUnitsType gl_prefs_get_units (void); + +const gchar *gl_prefs_get_units_string (void); + +gdouble gl_prefs_get_units_per_point (void); + +gdouble gl_prefs_get_units_step_size (void); + +gint gl_prefs_get_units_precision (void); + +void gl_prefs_add_recent_template (const gchar *name); + +G_END_DECLS + +#endif /* __PREFS_H__ */ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/print-op-dialog.c b/src/print-op-dialog.c new file mode 100644 index 00000000..bae96d5c --- /dev/null +++ b/src/print-op-dialog.c @@ -0,0 +1,744 @@ +/* + * print-op-dialog.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "print-op-dialog.h" + +#include +#include +#include +#include +#include + +#include "mini-preview.h" +#include "label.h" +#include "builder-util.h" + +#include "pixmaps/collate.xpm" +#include "pixmaps/nocollate.xpm" + +#include "debug.h" + + +#define MINI_PREVIEW_MIN_HEIGHT 175 +#define MINI_PREVIEW_MIN_WIDTH 150 + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + +struct _glPrintOpDialogPrivate { + + GtkBuilder *builder; + + GtkWidget *simple_frame; + GtkWidget *simple_sheets_radio; + GtkWidget *simple_sheets_spin; + GtkWidget *simple_labels_radio; + GtkWidget *simple_first_spin; + GtkWidget *simple_last_spin; + + GtkWidget *merge_frame; + GtkWidget *merge_first_spin; + GtkWidget *merge_copies_spin; + GtkWidget *merge_collate_check; + GtkWidget *merge_collate_image; + + GtkWidget *outline_check; + GtkWidget *reverse_check; + GtkWidget *crop_marks_check; + + GtkWidget *preview; + + gboolean force_outline_flag; + + gint labels_per_sheet; + gboolean merge_flag; + gint n_records; + +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_print_op_dialog_finalize (GObject *object); + +static void gl_print_op_dialog_construct (glPrintOpDialog *op, + glLabel *label); + +static GObject *create_custom_widget_cb (GtkPrintOperation *operation, + glLabel *label); + +static void custom_widget_apply_cb (GtkPrintOperation *operation, + GtkWidget *widget, + glLabel *label); + +static void simple_sheets_radio_cb (GtkToggleButton *togglebutton, + glPrintOpDialog *op); + +static void simple_first_spin_cb (GtkSpinButton *spinbutton, + glPrintOpDialog *op); + +static void simple_last_spin_cb (GtkSpinButton *spinbutton, + glPrintOpDialog *op); + +static void preview_pressed_cb (glMiniPreview *preview, + gint first, + gint last, + glPrintOpDialog *op); + +static void preview_released_cb (glMiniPreview *preview, + gint first, + gint last, + glPrintOpDialog *op); + +static void merge_spin_cb (GtkSpinButton *spinbutton, + glPrintOpDialog *op); + +static void merge_collate_check_cb (GtkToggleButton *togglebutton, + glPrintOpDialog *op); + +static void preview_clicked_cb (glMiniPreview *preview, + gint first, + glPrintOpDialog *op); + +static void option_toggled_cb (GtkToggleButton *togglebutton, + glPrintOpDialog *op); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glPrintOpDialog, gl_print_op_dialog, GL_TYPE_PRINT_OP); + + +static void +gl_print_op_dialog_class_init (glPrintOpDialogClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_PRINT, ""); + + gl_print_op_dialog_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_print_op_dialog_finalize; +} + + +static void +gl_print_op_dialog_init (glPrintOpDialog *op) +{ + gl_debug (DEBUG_PRINT, ""); + + gtk_print_operation_set_use_full_page (GTK_PRINT_OPERATION (op), TRUE); + + gtk_print_operation_set_unit (GTK_PRINT_OPERATION (op), GTK_UNIT_POINTS); + + op->priv = g_new0 (glPrintOpDialogPrivate, 1); + +} + + +static void +gl_print_op_dialog_finalize (GObject *object) +{ + glPrintOpDialog *op = GL_PRINT_OP_DIALOG (object); + + gl_debug (DEBUG_PRINT, ""); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_PRINT_OP (op)); + g_return_if_fail (op->priv != NULL); + + g_object_unref (G_OBJECT(op->priv->builder)); + g_free (op->priv); + + G_OBJECT_CLASS (gl_print_op_dialog_parent_class)->finalize (object); + + g_free (op->priv); +} + + +/*****************************************************************************/ +/* NEW print op. */ +/*****************************************************************************/ +glPrintOpDialog * +gl_print_op_dialog_new (glLabel *label) +{ + glPrintOpDialog *op; + + gl_debug (DEBUG_PRINT, ""); + + op = GL_PRINT_OP_DIALOG (g_object_new (GL_TYPE_PRINT_OP_DIALOG, NULL)); + + gl_print_op_dialog_construct (GL_PRINT_OP_DIALOG(op), label); + + return op; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct op. */ +/*--------------------------------------------------------------------------*/ +static void +gl_print_op_dialog_construct (glPrintOpDialog *op, + glLabel *label) +{ + + gl_print_op_construct(GL_PRINT_OP (op), label); + + gtk_print_operation_set_custom_tab_label ( GTK_PRINT_OPERATION (op), + _("Labels")); + + g_signal_connect (G_OBJECT (op), "create-custom-widget", + G_CALLBACK (create_custom_widget_cb), label); + + g_signal_connect (G_OBJECT (op), "custom-widget-apply", + G_CALLBACK (custom_widget_apply_cb), label); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. "Create custom widget" callback */ +/*--------------------------------------------------------------------------*/ +static GObject * +create_custom_widget_cb (GtkPrintOperation *operation, + glLabel *label) +{ + GtkBuilder *builder; + static gchar *object_ids[] = { "print_custom_widget_hbox", + "adjustment1", "adjustment2", + "adjustment3", "adjustment4", + "adjustment5", + NULL }; + GError *error = NULL; + glPrintOpDialog *op = GL_PRINT_OP_DIALOG (operation); + const lglTemplateFrame *frame; + GtkWidget *hbox; + glMerge *merge = NULL; + GdkPixbuf *pixbuf; + + + frame = (lglTemplateFrame *)label->template->frames->data; + op->priv->labels_per_sheet = lgl_template_frame_get_n_labels (frame); + + builder = gtk_builder_new (); + gtk_builder_add_objects_from_file (builder, + GLABELS_BUILDER_DIR "print-op-dialog-custom-widget.builder", + object_ids, + &error); + if (error) { + g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); + g_error_free (error); + return NULL; + } + + gl_builder_util_get_widgets (builder, + "print_custom_widget_hbox", &hbox, + "simple_frame", &op->priv->simple_frame, + "simple_sheets_radio", &op->priv->simple_sheets_radio, + "simple_sheets_spin", &op->priv->simple_sheets_spin, + "simple_labels_radio", &op->priv->simple_labels_radio, + "simple_first_spin", &op->priv->simple_first_spin, + "simple_last_spin", &op->priv->simple_last_spin, + "merge_frame", &op->priv->merge_frame, + "merge_first_spin", &op->priv->merge_first_spin, + "merge_copies_spin", &op->priv->merge_copies_spin, + "merge_collate_check", &op->priv->merge_collate_check, + "merge_collate_image", &op->priv->merge_collate_image, + "outline_check", &op->priv->outline_check, + "reverse_check", &op->priv->reverse_check, + "crop_marks_check", &op->priv->crop_marks_check, + NULL); + + op->priv->builder = builder; + + /* ---- Install preview. ---- */ + op->priv->preview = gl_mini_preview_new (MINI_PREVIEW_MIN_HEIGHT, MINI_PREVIEW_MIN_WIDTH); + gl_mini_preview_set_template (GL_MINI_PREVIEW(op->priv->preview), label->template); + gl_mini_preview_set_label (GL_MINI_PREVIEW(op->priv->preview), label); + gtk_box_pack_start (GTK_BOX(hbox), op->priv->preview, TRUE, TRUE, 0); + gtk_widget_show_all (op->priv->preview); + + + /* ---- Activate either simple or merge print control widgets. ---- */ + merge = gl_label_get_merge (label); + op->priv->merge_flag = (merge != NULL); + if (!op->priv->merge_flag) { + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->simple_sheets_radio), + TRUE); + gtk_widget_set_sensitive (op->priv->simple_first_spin, FALSE); + gtk_widget_set_sensitive (op->priv->simple_last_spin, FALSE); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_sheets_spin), + gl_print_op_get_n_sheets (GL_PRINT_OP(op))); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_first_spin), + 1, op->priv->labels_per_sheet); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_first_spin), + 1); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_last_spin), + 1, op->priv->labels_per_sheet); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_last_spin), + op->priv->labels_per_sheet); + + /* Update preview. */ + gl_mini_preview_set_page (GL_MINI_PREVIEW (op->priv->preview), 0); + gl_mini_preview_set_n_sheets (GL_MINI_PREVIEW (op->priv->preview), + gl_print_op_get_n_sheets (GL_PRINT_OP(op))); + gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), 1); + gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), + op->priv->labels_per_sheet); + + gtk_widget_show_all (op->priv->simple_frame); + gtk_widget_hide_all (op->priv->merge_frame); + + g_signal_connect (G_OBJECT (op->priv->simple_sheets_radio), "toggled", + G_CALLBACK (simple_sheets_radio_cb), op); + g_signal_connect (G_OBJECT (op->priv->simple_first_spin), "changed", + G_CALLBACK (simple_first_spin_cb), op); + g_signal_connect (G_OBJECT (op->priv->simple_last_spin), "changed", + G_CALLBACK (simple_last_spin_cb), op); + g_signal_connect (G_OBJECT (op->priv->preview), "pressed", + G_CALLBACK (preview_pressed_cb), op); + g_signal_connect (G_OBJECT (op->priv->preview), "released", + G_CALLBACK (preview_released_cb), op); + + } else { + + op->priv->n_records = gl_merge_get_record_count (merge); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->merge_first_spin), + 1, op->priv->labels_per_sheet); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->merge_first_spin), + gl_print_op_get_first (GL_PRINT_OP(op))); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->merge_copies_spin), + gl_print_op_get_n_copies (GL_PRINT_OP(op))); + + gtk_widget_set_sensitive (op->priv->merge_collate_check, + (gl_print_op_get_n_copies (GL_PRINT_OP(op)) > 1)); + gtk_widget_set_sensitive (op->priv->merge_collate_image, + (gl_print_op_get_n_copies (GL_PRINT_OP(op)) > 1)); + + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->simple_sheets_radio), + gl_print_op_get_collate_flag (GL_PRINT_OP(op))); + + if ( gl_print_op_get_collate_flag (GL_PRINT_OP(op)) ) + { + pixbuf = gdk_pixbuf_new_from_xpm_data ( (const char **)nocollate_xpm); + } + else + { + pixbuf = gdk_pixbuf_new_from_xpm_data ( (const char **)collate_xpm); + } + + gtk_image_set_from_pixbuf (GTK_IMAGE (op->priv->merge_collate_image), pixbuf); + + /* Update preview. */ + gl_mini_preview_set_page (GL_MINI_PREVIEW (op->priv->preview), 0); + gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), + gl_print_op_get_first (GL_PRINT_OP(op))); + gl_mini_preview_set_n_copies (GL_MINI_PREVIEW (op->priv->preview), + gl_print_op_get_n_copies (GL_PRINT_OP(op))); + gl_mini_preview_set_collate_flag (GL_MINI_PREVIEW (op->priv->preview), + gl_print_op_get_collate_flag (GL_PRINT_OP(op))); + + + gtk_widget_hide_all (op->priv->simple_frame); + gtk_widget_show_all (op->priv->merge_frame); + + g_signal_connect (G_OBJECT (op->priv->merge_first_spin), "changed", + G_CALLBACK (merge_spin_cb), op); + g_signal_connect (G_OBJECT (op->priv->merge_copies_spin), "changed", + G_CALLBACK (merge_spin_cb), op); + g_signal_connect (G_OBJECT (op->priv->merge_collate_check), "toggled", + G_CALLBACK (merge_collate_check_cb), op); + g_signal_connect (G_OBJECT (op->priv->preview), "clicked", + G_CALLBACK (preview_clicked_cb), op); + g_signal_connect (G_OBJECT (op->priv->preview), "pressed", + G_CALLBACK (preview_pressed_cb), op); + g_signal_connect (G_OBJECT (op->priv->preview), "released", + G_CALLBACK (preview_released_cb), op); + + g_object_unref (G_OBJECT(merge)); + + } + + /* --- Set options --- */ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->outline_check), + gl_print_op_get_outline_flag (GL_PRINT_OP(op))); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->reverse_check), + gl_print_op_get_reverse_flag (GL_PRINT_OP(op))); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->crop_marks_check), + gl_print_op_get_crop_marks_flag (GL_PRINT_OP(op))); + + /* --- Do we need to force the outline flag --- */ + if (gl_print_op_is_outline_forced (GL_PRINT_OP (op))) + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(op->priv->outline_check), + TRUE); + + gtk_widget_set_sensitive (op->priv->outline_check, FALSE); + gtk_widget_set_sensitive (op->priv->reverse_check, FALSE); + gtk_widget_set_sensitive (op->priv->crop_marks_check, FALSE); + } + + g_signal_connect (G_OBJECT (op->priv->outline_check), "toggled", + G_CALLBACK (option_toggled_cb), op); + g_signal_connect (G_OBJECT (op->priv->reverse_check), "toggled", + G_CALLBACK (option_toggled_cb), op); + g_signal_connect (G_OBJECT (op->priv->crop_marks_check), "toggled", + G_CALLBACK (option_toggled_cb), op); + + return G_OBJECT (hbox); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. "Custom widget apply" callback */ +/*--------------------------------------------------------------------------*/ +static void +custom_widget_apply_cb (GtkPrintOperation *operation, + GtkWidget *widget, + glLabel *label) +{ + glPrintOpDialog *op = GL_PRINT_OP_DIALOG (operation); + glMerge *merge = NULL; + gint n_records; + gint n_sheets, first, last, n_copies; + gboolean collate_flag; + + gl_print_op_set_outline_flag (GL_PRINT_OP (op), + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON + (op->priv->outline_check))); + gl_print_op_set_reverse_flag (GL_PRINT_OP (op), + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON + (op->priv->reverse_check))); + gl_print_op_set_crop_marks_flag (GL_PRINT_OP (op), + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON + (op->priv->crop_marks_check))); + + + if (!op->priv->merge_flag) + { + + n_sheets = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_sheets_spin)); + gl_print_op_set_n_sheets (GL_PRINT_OP (op), n_sheets); + + first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); + gl_print_op_set_first (GL_PRINT_OP (op), first); + + last = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_last_spin)); + gl_print_op_set_last (GL_PRINT_OP (op), last); + + } + else + { + + merge = gl_label_get_merge (label); + + n_copies = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_copies_spin)); + gl_print_op_set_n_copies (GL_PRINT_OP (op), n_copies); + + first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_first_spin)); + gl_print_op_set_first (GL_PRINT_OP (op), first); + + collate_flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->merge_collate_check)); + gl_print_op_set_collate_flag (GL_PRINT_OP (op), collate_flag); + + n_records = gl_merge_get_record_count (merge); + n_sheets = ceil (first - 1 + (n_copies * n_records)/(double)op->priv->labels_per_sheet); + gl_print_op_set_n_sheets (GL_PRINT_OP (op), n_sheets); + + g_object_unref (G_OBJECT(merge)); + + } + + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Simple sheets radio "toggled" callback */ +/*--------------------------------------------------------------------------*/ +static void +simple_sheets_radio_cb (GtkToggleButton *togglebutton, + glPrintOpDialog *op) +{ + gint first, last; + + if (gtk_toggle_button_get_active (togglebutton)) { + + gtk_widget_set_sensitive (op->priv->simple_sheets_spin, TRUE); + gtk_widget_set_sensitive (op->priv->simple_first_spin, FALSE); + gtk_widget_set_sensitive (op->priv->simple_last_spin, FALSE); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_first_spin), + 1, op->priv->labels_per_sheet); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_first_spin), + 1); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_last_spin), + 1, op->priv->labels_per_sheet); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_last_spin), + op->priv->labels_per_sheet); + + gl_mini_preview_set_n_sheets (GL_MINI_PREVIEW (op->priv->preview), + gl_print_op_get_n_sheets (GL_PRINT_OP(op))); + gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), 1); + gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), + op->priv->labels_per_sheet); + + } else { + + gtk_widget_set_sensitive (op->priv->simple_sheets_spin, FALSE); + gtk_widget_set_sensitive (op->priv->simple_first_spin, TRUE); + gtk_widget_set_sensitive (op->priv->simple_last_spin, TRUE); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_sheets_spin), 1); + + first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); + last = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_last_spin)); + + gl_mini_preview_set_n_sheets (GL_MINI_PREVIEW (op->priv->preview), 1); + gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), first); + gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), last); + + } +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Simple first label spinbutton "changed" callback */ +/*--------------------------------------------------------------------------*/ +static void +simple_first_spin_cb (GtkSpinButton *spinbutton, + glPrintOpDialog *op) +{ + gint first, last; + + first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); + last = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_last_spin)); + + /* Adjust range of last spin button. */ + gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_last_spin), + first, op->priv->labels_per_sheet); + + /* Update preview. */ + gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), first); + gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), last); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Simple last label spinbutton "changed" callback */ +/*--------------------------------------------------------------------------*/ +static void +simple_last_spin_cb (GtkSpinButton *spinbutton, + glPrintOpDialog *op) +{ + gint first, last; + + first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); + last = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_last_spin)); + + /* Adjust range of first spin button. */ + gtk_spin_button_set_range (GTK_SPIN_BUTTON (op->priv->simple_first_spin), + 1, last); + + /* Update preview. */ + gl_mini_preview_set_first (GL_MINI_PREVIEW (op->priv->preview), first); + gl_mini_preview_set_last (GL_MINI_PREVIEW (op->priv->preview), last); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Preview "pressed" callback */ +/*--------------------------------------------------------------------------*/ +static void +preview_pressed_cb (glMiniPreview *preview, + gint first, + gint last, + glPrintOpDialog *op) +{ + gint old_first; + + if ( !op->priv->merge_flag ) + { + + /* Update controls. */ + old_first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->simple_first_spin)); + if ( first > old_first ) + { + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_last_spin), last); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_first_spin), first); + } + else + { + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_first_spin), first); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_last_spin), last); + } + if ( (first == 1) && (last == op->priv->labels_per_sheet) ) + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->simple_sheets_radio), TRUE); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->simple_sheets_spin), 1); + } + else + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (op->priv->simple_labels_radio), TRUE); + } + + } + + gl_mini_preview_highlight_range (GL_MINI_PREVIEW (op->priv->preview), first, last); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Preview "pressed" callback */ +/*--------------------------------------------------------------------------*/ +static void +preview_released_cb (glMiniPreview *preview, + gint first, + gint last, + glPrintOpDialog *op) +{ + + gl_mini_preview_highlight_range (GL_MINI_PREVIEW (op->priv->preview), 0, 0); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. "changed" callback for merge first and copies spin buttons. */ +/*--------------------------------------------------------------------------*/ +static void +merge_spin_cb (GtkSpinButton *spinbutton, + glPrintOpDialog *op) +{ + gint first, n_copies; + + first = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_first_spin)); + + n_copies = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_copies_spin)); + + gl_mini_preview_set_first (GL_MINI_PREVIEW(op->priv->preview), first); + gl_mini_preview_set_n_copies (GL_MINI_PREVIEW(op->priv->preview), n_copies); + + gtk_widget_set_sensitive (op->priv->merge_collate_check, (n_copies > 1)); + gtk_widget_set_sensitive (op->priv->merge_collate_image, (n_copies > 1)); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Merge first collate check "toggled" callback */ +/*--------------------------------------------------------------------------*/ +static void +merge_collate_check_cb (GtkToggleButton *togglebutton, + glPrintOpDialog *op) +{ + GdkPixbuf *pixbuf; + + if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->merge_collate_check)) ) + { + pixbuf = gdk_pixbuf_new_from_xpm_data ( (const char **)nocollate_xpm); + gl_mini_preview_set_collate_flag (GL_MINI_PREVIEW (op->priv->preview), TRUE); + } + else + { + pixbuf = gdk_pixbuf_new_from_xpm_data ( (const char **)collate_xpm); + gl_mini_preview_set_collate_flag (GL_MINI_PREVIEW (op->priv->preview), FALSE); + } + + gtk_image_set_from_pixbuf (GTK_IMAGE (op->priv->merge_collate_image), pixbuf); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Preview "clicked" callback */ +/*--------------------------------------------------------------------------*/ +static void +preview_clicked_cb (glMiniPreview *preview, + gint first, + glPrintOpDialog *op) +{ + gint n_copies; + + if ( op->priv->merge_flag ) + { + + /* Update controls. */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON (op->priv->merge_first_spin), first); + + n_copies = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (op->priv->merge_copies_spin)); + gtk_widget_set_sensitive (op->priv->merge_collate_check, (n_copies > 1)); + gtk_widget_set_sensitive (op->priv->merge_collate_image, (n_copies > 1)); + + } +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Option checkbox "toggled" callback */ +/*--------------------------------------------------------------------------*/ +static void +option_toggled_cb (GtkToggleButton *togglebutton, + glPrintOpDialog *op) +{ + gboolean flag; + + flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->outline_check)); + gl_mini_preview_set_outline_flag (GL_MINI_PREVIEW (op->priv->preview), flag); + + flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->reverse_check)); + gl_mini_preview_set_reverse_flag (GL_MINI_PREVIEW (op->priv->preview), flag); + + flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (op->priv->crop_marks_check)); + gl_mini_preview_set_crop_marks_flag (GL_MINI_PREVIEW (op->priv->preview), flag); +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/print-op-dialog.h b/src/print-op-dialog.h new file mode 100644 index 00000000..d6469bf2 --- /dev/null +++ b/src/print-op-dialog.h @@ -0,0 +1,83 @@ +/* + * print-op-dialog.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __PRINT_OP_DIALOG_H__ +#define __PRINT_OP_DIALOG_H__ + +#include "print-op.h" + +G_BEGIN_DECLS + +#define GL_TYPE_PRINT_OP_DIALOG (gl_print_op_dialog_get_type ()) +#define GL_PRINT_OP_DIALOG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PRINT_OP_DIALOG, glPrintOpDialog)) +#define GL_PRINT_OP_DIALOG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PRINT_OP_DIALOG, glPrintOpDialogClass)) +#define GL_IS_PRINT_OP_DIALOG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PRINT_OP_DIALOG)) +#define GL_IS_PRINT_OP_DIALOG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PRINT_OP_DIALOG)) +#define GL_PRINT_OP_DIALOG_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_PRINT_OP_DIALOG, glPrintOpDialogClass)) + + +typedef struct _glPrintOpDialog glPrintOpDialog; +typedef struct _glPrintOpDialogClass glPrintOpDialogClass; + +typedef struct _glPrintOpDialogPrivate glPrintOpDialogPrivate; + +struct _glPrintOpDialog +{ + glPrintOp parent_instance; + + glPrintOpDialogPrivate *priv; + +}; + +struct _glPrintOpDialogClass +{ + glPrintOpClass parent_class; +}; + + +typedef struct _glPrintOpDialogSettings glPrintOpDialogSettings; + + + +GType gl_print_op_dialog_get_type (void) G_GNUC_CONST; + +glPrintOpDialog *gl_print_op_dialog_new (glLabel *label); + + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/print-op.c b/src/print-op.c new file mode 100644 index 00000000..2c78f488 --- /dev/null +++ b/src/print-op.c @@ -0,0 +1,591 @@ +/* + * print-op.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "print-op.h" + +#include +#include +#include +#include +#include + +#include +#include "print.h" +#include "label.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private data types */ +/*===========================================*/ + +struct _glPrintOpPrivate { + + glLabel *label; + + gboolean force_outline_flag; + + gchar *filename; + + gboolean outline_flag; + gboolean reverse_flag; + gboolean crop_marks_flag; + gboolean merge_flag; + gboolean collate_flag; + + gint first; + gint last; + gint n_sheets; + gint n_copies; + + glPrintState state; +}; + +struct _glPrintOpSettings +{ + + GtkPrintSettings *gtk_settings; + + gboolean outline_flag; + gboolean reverse_flag; + gboolean crop_marks_flag; + gboolean collate_flag; + + gint first; + gint last; + gint n_sheets; + gint n_copies; + +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_print_op_finalize (GObject *object); + +static void set_page_size (glPrintOp *op, + glLabel *label); + +static void begin_print_cb (GtkPrintOperation *operation, + GtkPrintContext *context, + gpointer user_data); + +static void draw_page_cb (GtkPrintOperation *operation, + GtkPrintContext *context, + int page_nr, + gpointer user_data); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glPrintOp, gl_print_op, GTK_TYPE_PRINT_OPERATION); + + +static void +gl_print_op_class_init (glPrintOpClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_PRINT, ""); + + gl_print_op_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_print_op_finalize; +} + + +static void +gl_print_op_init (glPrintOp *op) +{ + gl_debug (DEBUG_PRINT, ""); + + gtk_print_operation_set_use_full_page (GTK_PRINT_OPERATION (op), TRUE); + + gtk_print_operation_set_unit (GTK_PRINT_OPERATION (op), GTK_UNIT_POINTS); + + op->priv = g_new0 (glPrintOpPrivate, 1); + +} + + +static void +gl_print_op_finalize (GObject *object) +{ + glPrintOp *op = GL_PRINT_OP (object); + + gl_debug (DEBUG_PRINT, ""); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_PRINT_OP (op)); + g_return_if_fail (op->priv != NULL); + + g_object_unref (G_OBJECT(op->priv->label)); + g_free (op->priv->filename); + g_free (op->priv); + + G_OBJECT_CLASS (gl_print_op_parent_class)->finalize (object); + + g_free (op->priv); +} + + +/*****************************************************************************/ +/* NEW print op. */ +/*****************************************************************************/ +glPrintOp * +gl_print_op_new (glLabel *label) +{ + glPrintOp *op; + + gl_debug (DEBUG_PRINT, ""); + + op = GL_PRINT_OP (g_object_new (GL_TYPE_PRINT_OP, NULL)); + + gl_print_op_construct (GL_PRINT_OP(op), label); + + return op; +} + + +/*****************************************************************************/ +/* Construct print op. */ +/*****************************************************************************/ +void +gl_print_op_construct (glPrintOp *op, + glLabel *label) +{ + glMerge *merge = NULL; + const lglTemplateFrame *frame; + + op->priv->label = label; + op->priv->force_outline_flag = FALSE; + + merge = gl_label_get_merge (label); + frame = (lglTemplateFrame *)label->template->frames->data; + + op->priv->merge_flag = (merge != NULL); + op->priv->n_sheets = 1; + op->priv->first = 1; + op->priv->last = lgl_template_frame_get_n_labels (frame); + op->priv->n_copies = 1; + + set_page_size (op, label); + + gtk_print_operation_set_custom_tab_label ( GTK_PRINT_OPERATION (op), + _("Labels")); + + g_signal_connect (G_OBJECT (op), "begin-print", + G_CALLBACK (begin_print_cb), label); + + g_signal_connect (G_OBJECT (op), "draw-page", + G_CALLBACK (draw_page_cb), label); +} + + +/*****************************************************************************/ +/* Set outline flag/checkbox. */ +/*****************************************************************************/ +void +gl_print_op_force_outline (glPrintOp *op) +{ + op->priv->force_outline_flag = TRUE; +} + + +/*****************************************************************************/ +/* Set outline flag/checkbox. */ +/*****************************************************************************/ +gboolean +gl_print_op_is_outline_forced (glPrintOp *op) +{ + return op->priv->force_outline_flag; +} + + +/*****************************************************************************/ +/* Set job parameters. */ +/*****************************************************************************/ +void +gl_print_op_set_filename (glPrintOp *op, + gchar *filename) +{ + gtk_print_operation_set_export_filename (GTK_PRINT_OPERATION (op), + filename); +} + + +void +gl_print_op_set_n_sheets (glPrintOp *op, + gint n_sheets) +{ + op->priv->n_sheets = n_sheets; +} + + +void +gl_print_op_set_n_copies (glPrintOp *op, + gint n_copies) +{ + op->priv->n_copies = n_copies; +} + + +void +gl_print_op_set_first (glPrintOp *op, + gint first) +{ + op->priv->first = first; +} + + +void +gl_print_op_set_last (glPrintOp *op, + gint last) +{ + op->priv->last = last; +} + + +void +gl_print_op_set_collate_flag (glPrintOp *op, + gboolean collate_flag) +{ + op->priv->collate_flag = collate_flag; +} + + +void +gl_print_op_set_outline_flag (glPrintOp *op, + gboolean outline_flag) +{ + op->priv->outline_flag = outline_flag; +} + + +void +gl_print_op_set_reverse_flag (glPrintOp *op, + gboolean reverse_flag) +{ + op->priv->reverse_flag = reverse_flag; +} + + +void +gl_print_op_set_crop_marks_flag (glPrintOp *op, + gboolean crop_marks_flag) +{ + op->priv->crop_marks_flag = crop_marks_flag; +} + + +/*****************************************************************************/ +/* Get job parameters. */ +/*****************************************************************************/ +gchar * +gl_print_op_get_filename (glPrintOp *op) +{ + gchar *filename = NULL; + + g_object_get (G_OBJECT (op), + "export_filename", filename, + NULL); + + return filename; +} + + +gint +gl_print_op_get_n_sheets (glPrintOp *op) +{ + return op->priv->n_sheets; +} + + +gint +gl_print_op_get_n_copies (glPrintOp *op) +{ + return op->priv->n_copies; +} + + +gint +gl_print_op_get_first (glPrintOp *op) +{ + return op->priv->first; +} + + +gint +gl_print_op_get_last (glPrintOp *op) +{ + return op->priv->last; +} + + +gboolean +gl_print_op_get_collate_flag (glPrintOp *op) +{ + return op->priv->collate_flag; +} + + +gboolean +gl_print_op_get_outline_flag (glPrintOp *op) +{ + return op->priv->outline_flag; +} + + +gboolean +gl_print_op_get_reverse_flag (glPrintOp *op) +{ + return op->priv->reverse_flag; +} + + +gboolean +gl_print_op_get_crop_marks_flag (glPrintOp *op) +{ + return op->priv->crop_marks_flag; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Set page size. */ +/*--------------------------------------------------------------------------*/ +static void +set_page_size (glPrintOp *op, + glLabel *label) +{ + GtkPaperSize *psize; + GtkPageSetup *su; + lglPaper *paper; + + gl_debug (DEBUG_PRINT, "begin"); + + paper = lgl_db_lookup_paper_from_id (label->template->paper_id); + + if (!paper) + { + const gchar *name; + + name = gtk_paper_size_get_default (); + psize = gtk_paper_size_new (name); + + gl_debug (DEBUG_PRINT, "Using default size = \"%s\"", name); + } + else if (lgl_db_is_paper_id_other (paper->id)) + { + psize = gtk_paper_size_new_custom (paper->id, + paper->name, + label->template->page_width, + label->template->page_height, + GTK_UNIT_POINTS); + gl_debug (DEBUG_PRINT, "Using custom size = %g x %g points", + label->template->page_width, + label->template->page_height); + + } + else + { + psize = gtk_paper_size_new (paper->pwg_size); + gl_debug (DEBUG_PRINT, "Using PWG size \"%s\"", paper->pwg_size); + } + lgl_paper_free (paper); + + su = gtk_page_setup_new (); + gtk_page_setup_set_paper_size (su, psize); + gtk_print_operation_set_default_page_setup (GTK_PRINT_OPERATION (op), su); + g_object_unref (su); + + gtk_paper_size_free (psize); + + gl_debug (DEBUG_PRINT, "end"); +} + + +/*****************************************************************************/ +/* Get print operation settings. */ +/*****************************************************************************/ +glPrintOpSettings * +gl_print_op_get_settings (glPrintOp *print_op) +{ + glPrintOpSettings *settings; + + settings = g_new0 (glPrintOpSettings, 1); + + if ( settings ) + { + settings->gtk_settings = + gtk_print_operation_get_print_settings (GTK_PRINT_OPERATION (print_op)); + + settings->outline_flag = print_op->priv->outline_flag; + settings->reverse_flag = print_op->priv->reverse_flag; + settings->crop_marks_flag = print_op->priv->crop_marks_flag; + settings->collate_flag = print_op->priv->collate_flag; + + settings->first = print_op->priv->first; + settings->last = print_op->priv->last; + settings->n_sheets = print_op->priv->n_sheets; + settings->n_copies = print_op->priv->n_copies; + } + + return settings; +} + + +/*****************************************************************************/ +/* Set print operation settings. */ +/*****************************************************************************/ +void +gl_print_op_set_settings (glPrintOp *print_op, + glPrintOpSettings *settings) +{ + + if ( settings ) + { + gtk_print_operation_set_print_settings (GTK_PRINT_OPERATION (print_op), + settings->gtk_settings); + + print_op->priv->outline_flag = settings->outline_flag; + print_op->priv->reverse_flag = settings->reverse_flag; + print_op->priv->crop_marks_flag = settings->crop_marks_flag; + print_op->priv->collate_flag = settings->collate_flag; + + print_op->priv->first = settings->first; + print_op->priv->last = settings->last; + print_op->priv->n_sheets = settings->n_sheets; + print_op->priv->n_copies = settings->n_copies; + } + +} + + +/*****************************************************************************/ +/* Free print operation settings structure. */ +/*****************************************************************************/ +void +gl_print_op_free_settings(glPrintOpSettings *settings) +{ + + if ( settings ) + { + if ( settings->gtk_settings ) + { + g_object_unref (settings->gtk_settings); + } + + g_free (settings); + } +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. "Begin print" callback */ +/*--------------------------------------------------------------------------*/ +static void +begin_print_cb (GtkPrintOperation *operation, + GtkPrintContext *context, + gpointer user_data) +{ + glPrintOp *op = GL_PRINT_OP (operation); + + gtk_print_operation_set_n_pages (operation, op->priv->n_sheets); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. "Draw page" callback. */ +/*--------------------------------------------------------------------------*/ +static void +draw_page_cb (GtkPrintOperation *operation, + GtkPrintContext *context, + int page_nr, + gpointer user_data) +{ + glPrintOp *op = GL_PRINT_OP (operation); + cairo_t *cr; + + cr = gtk_print_context_get_cairo_context (context); + + if (!op->priv->merge_flag) + { + gl_print_simple_sheet (op->priv->label, + cr, + page_nr, + op->priv->n_sheets, + op->priv->first, + op->priv->last, + op->priv->outline_flag, + op->priv->reverse_flag, + op->priv->crop_marks_flag); + } + else + { + if (op->priv->collate_flag) + { + gl_print_collated_merge_sheet (op->priv->label, + cr, + page_nr, + op->priv->n_copies, + op->priv->first, + op->priv->outline_flag, + op->priv->reverse_flag, + op->priv->crop_marks_flag, + &op->priv->state); + } + else + { + gl_print_uncollated_merge_sheet (op->priv->label, + cr, + page_nr, + op->priv->n_copies, + op->priv->first, + op->priv->outline_flag, + op->priv->reverse_flag, + op->priv->crop_marks_flag, + &op->priv->state); + } + } +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/print-op.h b/src/print-op.h new file mode 100644 index 00000000..c01af4ce --- /dev/null +++ b/src/print-op.h @@ -0,0 +1,123 @@ +/* + * print-op.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __PRINT_OP_H__ +#define __PRINT_OP_H__ + +#include +#include "label.h" + +G_BEGIN_DECLS + +#define GL_TYPE_PRINT_OP (gl_print_op_get_type ()) +#define GL_PRINT_OP(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_PRINT_OP, glPrintOp)) +#define GL_PRINT_OP_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_PRINT_OP, glPrintOpClass)) +#define GL_IS_PRINT_OP(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_PRINT_OP)) +#define GL_IS_PRINT_OP_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_PRINT_OP)) +#define GL_PRINT_OP_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_PRINT_OP, glPrintOpClass)) + + +typedef struct _glPrintOp glPrintOp; +typedef struct _glPrintOpClass glPrintOpClass; + +typedef struct _glPrintOpPrivate glPrintOpPrivate; + +struct _glPrintOp +{ + GtkPrintOperation parent_instance; + + glPrintOpPrivate *priv; + +}; + +struct _glPrintOpClass +{ + GtkPrintOperationClass parent_class; +}; + + +typedef struct _glPrintOpSettings glPrintOpSettings; + + + +GType gl_print_op_get_type (void) G_GNUC_CONST; + +glPrintOp *gl_print_op_new (glLabel *label); + +void gl_print_op_construct (glPrintOp *print_op, + glLabel *label); + +void gl_print_op_set_filename (glPrintOp *print_op, + gchar *filename); +void gl_print_op_set_n_sheets (glPrintOp *print_op, + gint n_sheets); +void gl_print_op_set_n_copies (glPrintOp *print_op, + gint n_copies); +void gl_print_op_set_first (glPrintOp *print_op, + gint first); +void gl_print_op_set_last (glPrintOp *print_op, + gint last); +void gl_print_op_set_collate_flag (glPrintOp *print_op, + gboolean collate_flag); +void gl_print_op_set_outline_flag (glPrintOp *print_op, + gboolean outline_flag); +void gl_print_op_set_reverse_flag (glPrintOp *print_op, + gboolean reverse_flag); +void gl_print_op_set_crop_marks_flag (glPrintOp *print_op, + gboolean crop_marks_flag); + +gchar *gl_print_op_get_filename (glPrintOp *print_op); +gint gl_print_op_get_n_sheets (glPrintOp *print_op); +gint gl_print_op_get_n_copies (glPrintOp *print_op); +gint gl_print_op_get_first (glPrintOp *print_op); +gint gl_print_op_get_last (glPrintOp *print_op); +gboolean gl_print_op_get_collate_flag (glPrintOp *print_op); +gboolean gl_print_op_get_outline_flag (glPrintOp *print_op); +gboolean gl_print_op_get_reverse_flag (glPrintOp *print_op); +gboolean gl_print_op_get_crop_marks_flag (glPrintOp *print_op); + +void gl_print_op_force_outline (glPrintOp *print_op); +gboolean gl_print_op_is_outline_forced (glPrintOp *print_op); + +glPrintOpSettings *gl_print_op_get_settings (glPrintOp *print_op); +void gl_print_op_set_settings (glPrintOp *print_op, + glPrintOpSettings *settings); +void gl_print_op_free_settings (glPrintOpSettings *settings); + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/print.c b/src/print.c new file mode 100644 index 00000000..2006e0ee --- /dev/null +++ b/src/print.c @@ -0,0 +1,593 @@ +/* + * print.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "print.h" + +#include +#include +#include +#include + +#include +#include "label.h" +#include "cairo-label-path.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private macros and constants. */ +/*===========================================*/ + +#define OUTLINE_RGB_ARGS 0.0, 0.0, 0.0 + +#define OUTLINE_WIDTH 0.25 + +#define TICK_OFFSET 2.25 +#define TICK_LENGTH 18.0 + + +/*=========================================================================*/ +/* Private types. */ +/*=========================================================================*/ + +typedef struct _PrintInfo { + cairo_t *cr; + + /* gLabels Template */ + lglTemplate *template; + gboolean label_rotate_flag; + + /* page size */ + gdouble page_width; + gdouble page_height; + +} PrintInfo; + + +/*=========================================================================*/ +/* Private function prototypes. */ +/*=========================================================================*/ +static PrintInfo *print_info_new (cairo_t *cr, + glLabel *label); + +static void print_info_free (PrintInfo **pi); + +static void print_crop_marks (PrintInfo *pi); + +static void print_label (PrintInfo *pi, + glLabel *label, + gdouble x, + gdouble y, + glMergeRecord *record, + gboolean outline_flag, + gboolean reverse_flag); + + +static void draw_outline (PrintInfo *pi, + glLabel *label); + +static void clip_to_outline (PrintInfo *pi, + glLabel *label); + + +/*****************************************************************************/ +/* Print simple sheet (no merge data) command. */ +/*****************************************************************************/ +void +gl_print_simple_sheet (glLabel *label, + cairo_t *cr, + gint page, + gint n_sheets, + gint first, + gint last, + gboolean outline_flag, + gboolean reverse_flag, + gboolean crop_marks_flag) +{ + PrintInfo *pi; + const lglTemplateFrame *frame; + gint i_label; + lglTemplateOrigin *origins; + + gl_debug (DEBUG_PRINT, "START"); + + pi = print_info_new (cr, label); + + frame = (lglTemplateFrame *)pi->template->frames->data; + origins = lgl_template_frame_get_origins (frame); + + if (crop_marks_flag) { + print_crop_marks (pi); + } + + for (i_label = first - 1; i_label < last; i_label++) { + + print_label (pi, label, + origins[i_label].x, origins[i_label].y, + NULL, outline_flag, reverse_flag); + + } + + g_free (origins); + + print_info_free (&pi); + + gl_debug (DEBUG_PRINT, "END"); +} + + +/*****************************************************************************/ +/* Print collated merge sheet command */ +/*****************************************************************************/ +void +gl_print_collated_merge_sheet (glLabel *label, + cairo_t *cr, + gint page, + gint n_copies, + gint first, + gboolean outline_flag, + gboolean reverse_flag, + gboolean crop_marks_flag, + glPrintState *state) +{ + glMerge *merge; + const GList *record_list; + PrintInfo *pi; + const lglTemplateFrame *frame; + gint i_label, n_labels_per_page, i_copy; + glMergeRecord *record; + GList *p; + lglTemplateOrigin *origins; + + gl_debug (DEBUG_PRINT, "START"); + + merge = gl_label_get_merge (label); + record_list = gl_merge_get_record_list (merge); + + pi = print_info_new (cr, label); + frame = (lglTemplateFrame *)pi->template->frames->data; + + n_labels_per_page = lgl_template_frame_get_n_labels (frame); + origins = lgl_template_frame_get_origins (frame); + + if (crop_marks_flag) { + print_crop_marks (pi); + } + + if (page == 0) + { + state->i_copy = 0; + state->p_record = (GList *)record_list; + + i_label = first - 1; + } + else + { + i_label = 0; + } + + + for ( p=(GList *)state->p_record; p!=NULL; p=p->next ) { + record = (glMergeRecord *)p->data; + + if ( record->select_flag ) { + for (i_copy = state->i_copy; i_copy < n_copies; i_copy++) { + + print_label (pi, label, + origins[i_label].x, + origins[i_label].y, + record, + outline_flag, reverse_flag); + + i_label++; + if (i_label == n_labels_per_page) + { + g_free (origins); + print_info_free (&pi); + + state->i_copy = (i_copy+1) % n_copies; + if (state->i_copy == 0) + { + state->p_record = p->next; + } + else + { + state->p_record = p; + } + return; + } + } + state->i_copy = 0; + } + } + + g_free (origins); + print_info_free (&pi); + + gl_debug (DEBUG_PRINT, "END"); +} + + +/*****************************************************************************/ +/* Print uncollated merge sheet command */ +/*****************************************************************************/ +void +gl_print_uncollated_merge_sheet (glLabel *label, + cairo_t *cr, + gint page, + gint n_copies, + gint first, + gboolean outline_flag, + gboolean reverse_flag, + gboolean crop_marks_flag, + glPrintState *state) +{ + glMerge *merge; + const GList *record_list; + PrintInfo *pi; + const lglTemplateFrame *frame; + gint i_label, n_labels_per_page, i_copy; + glMergeRecord *record; + GList *p; + lglTemplateOrigin *origins; + + gl_debug (DEBUG_PRINT, "START"); + + merge = gl_label_get_merge (label); + record_list = gl_merge_get_record_list (merge); + + pi = print_info_new (cr, label); + frame = (lglTemplateFrame *)pi->template->frames->data; + + n_labels_per_page = lgl_template_frame_get_n_labels (frame); + origins = lgl_template_frame_get_origins (frame); + + if (crop_marks_flag) { + print_crop_marks (pi); + } + + if (page == 0) + { + state->i_copy = 0; + state->p_record = (GList *)record_list; + + i_label = first - 1; + } + else + { + i_label = 0; + } + + for (i_copy = state->i_copy; i_copy < n_copies; i_copy++) { + + for ( p=state->p_record; p!=NULL; p=p->next ) { + record = (glMergeRecord *)p->data; + + if ( record->select_flag ) { + + print_label (pi, label, + origins[i_label].x, + origins[i_label].y, + record, + outline_flag, reverse_flag); + + i_label++; + if (i_label == n_labels_per_page) + { + g_free (origins); + print_info_free (&pi); + + state->p_record = p->next; + if (state->p_record == NULL) + { + state->p_record = (GList *)record_list; + state->i_copy = i_copy + 1; + } + else + { + state->i_copy = i_copy; + } + return; + } + } + } + state->p_record = (GList *)record_list; + + } + + g_free (origins); + print_info_free (&pi); + + gl_debug (DEBUG_PRINT, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. new print info structure */ +/*---------------------------------------------------------------------------*/ +static PrintInfo * +print_info_new (cairo_t *cr, + glLabel *label) +{ + PrintInfo *pi = g_new0 (PrintInfo, 1); + + gl_debug (DEBUG_PRINT, "START"); + + g_return_val_if_fail (label && GL_IS_LABEL (label), NULL); + + g_return_val_if_fail (label->template, NULL); + g_return_val_if_fail (label->template->paper_id, NULL); + g_return_val_if_fail (label->template->page_width > 0, NULL); + g_return_val_if_fail (label->template->page_height > 0, NULL); + + pi->cr = cr; + + gl_debug (DEBUG_PRINT, + "setting page size = \"%s\"", label->template->paper_id); + + pi->page_width = label->template->page_width; + pi->page_height = label->template->page_height; + + pi->template = label->template; + pi->label_rotate_flag = label->rotate_flag; + + gl_debug (DEBUG_PRINT, "END"); + + return pi; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. free print info structure */ +/*---------------------------------------------------------------------------*/ +static void +print_info_free (PrintInfo **pi) +{ + gl_debug (DEBUG_PRINT, "START"); + + + g_free (*pi); + *pi = NULL; + + gl_debug (DEBUG_PRINT, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Print crop tick marks. */ +/*---------------------------------------------------------------------------*/ +static void +print_crop_marks (PrintInfo *pi) +{ + const lglTemplateFrame *frame; + gdouble w, h, page_w, page_h; + GList *p; + lglTemplateLayout *layout; + gdouble xmin, ymin, xmax, ymax, dx, dy; + gdouble x1, y1, x2, y2, x3, y3, x4, y4; + gint ix, iy, nx, ny; + + gl_debug (DEBUG_PRINT, "START"); + + frame = (lglTemplateFrame *)pi->template->frames->data; + + lgl_template_frame_get_size (frame, &w, &h); + + page_w = pi->page_width; + page_h = pi->page_height; + + cairo_save (pi->cr); + + cairo_set_source_rgb (pi->cr, OUTLINE_RGB_ARGS); + cairo_set_line_width (pi->cr, OUTLINE_WIDTH); + + for (p=frame->all.layouts; p != NULL; p=p->next) { + + layout = (lglTemplateLayout *)p->data; + + xmin = layout->x0; + ymin = layout->y0; + xmax = layout->x0 + layout->dx*(layout->nx - 1) + w; + ymax = layout->y0 + layout->dy*(layout->ny - 1) + h; + + dx = layout->dx; + dy = layout->dy; + + nx = layout->nx; + ny = layout->ny; + + for (ix=0; ix < nx; ix++) { + + x1 = xmin + ix*dx; + x2 = x1 + w; + + y1 = MAX((ymin - TICK_OFFSET), 0.0); + y2 = MAX((y1 - TICK_LENGTH), 0.0); + + y3 = MIN((ymax + TICK_OFFSET), page_h); + y4 = MIN((y3 + TICK_LENGTH), page_h); + + cairo_move_to (pi->cr, x1, y1); + cairo_line_to (pi->cr, x1, y2); + cairo_stroke (pi->cr); + + cairo_move_to (pi->cr, x2, y1); + cairo_line_to (pi->cr, x2, y2); + cairo_stroke (pi->cr); + + cairo_move_to (pi->cr, x1, y3); + cairo_line_to (pi->cr, x1, y4); + cairo_stroke (pi->cr); + + cairo_move_to (pi->cr, x2, y3); + cairo_line_to (pi->cr, x2, y4); + cairo_stroke (pi->cr); + + } + + for (iy=0; iy < ny; iy++) { + + y1 = ymin + iy*dy; + y2 = y1 + h; + + x1 = MAX((xmin - TICK_OFFSET), 0.0); + x2 = MAX((x1 - TICK_LENGTH), 0.0); + + x3 = MIN((xmax + TICK_OFFSET), page_w); + x4 = MIN((x3 + TICK_LENGTH), page_w); + + cairo_move_to (pi->cr, x1, y1); + cairo_line_to (pi->cr, x2, y1); + cairo_stroke (pi->cr); + + cairo_move_to (pi->cr, x1, y2); + cairo_line_to (pi->cr, x2, y2); + cairo_stroke (pi->cr); + + cairo_move_to (pi->cr, x3, y1); + cairo_line_to (pi->cr, x4, y1); + cairo_stroke (pi->cr); + + cairo_move_to (pi->cr, x3, y2); + cairo_line_to (pi->cr, x4, y2); + cairo_stroke (pi->cr); + + } + + } + + cairo_restore (pi->cr); + + gl_debug (DEBUG_PRINT, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Print i'th label. */ +/*---------------------------------------------------------------------------*/ +static void +print_label (PrintInfo *pi, + glLabel *label, + gdouble x, + gdouble y, + glMergeRecord *record, + gboolean outline_flag, + gboolean reverse_flag) +{ + const lglTemplateFrame *frame; + gdouble width, height; + + gl_debug (DEBUG_PRINT, "START"); + + frame = (lglTemplateFrame *)pi->template->frames->data; + + gl_label_get_size (label, &width, &height); + + cairo_save (pi->cr); + + /* Transform coordinate system to be relative to upper corner */ + /* of the current label */ + cairo_translate (pi->cr, x, y); + + clip_to_outline (pi, label); + + cairo_save (pi->cr); + + /* Special transformations. */ + if (label->rotate_flag) { + gl_debug (DEBUG_PRINT, "Rotate flag set"); + cairo_rotate (pi->cr, -M_PI/2.0); + cairo_translate (pi->cr, -width, 0.0); + } + if ( reverse_flag ) { + cairo_translate (pi->cr, width, 0.0); + cairo_scale (pi->cr, -1.0, 1.0); + } + + gl_label_draw (label, pi->cr, FALSE, record); + + cairo_restore (pi->cr); /* From special transformations. */ + + if (outline_flag) { + draw_outline (pi, label); + } + + cairo_restore (pi->cr); /* From translation. */ + + gl_debug (DEBUG_PRINT, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw outline. */ +/*---------------------------------------------------------------------------*/ +static void +draw_outline (PrintInfo *pi, + glLabel *label) +{ + gl_debug (DEBUG_PRINT, "START"); + + cairo_save (pi->cr); + + cairo_set_source_rgb (pi->cr, OUTLINE_RGB_ARGS); + cairo_set_line_width (pi->cr, OUTLINE_WIDTH); + + gl_cairo_label_path (pi->cr, label->template, FALSE, FALSE); + + cairo_stroke (pi->cr); + + cairo_restore (pi->cr); + + gl_debug (DEBUG_PRINT, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Clip to outline. */ +/*---------------------------------------------------------------------------*/ +static void +clip_to_outline (PrintInfo *pi, + glLabel *label) +{ + gl_debug (DEBUG_PRINT, "START"); + + gl_cairo_label_path (pi->cr, label->template, FALSE, TRUE); + + cairo_set_fill_rule (pi->cr, CAIRO_FILL_RULE_EVEN_ODD); + cairo_clip (pi->cr); + + gl_debug (DEBUG_PRINT, "END"); +} + + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/print.h b/src/print.h new file mode 100644 index 00000000..5d79c7ba --- /dev/null +++ b/src/print.h @@ -0,0 +1,80 @@ +/* + * print.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __PRINT_H__ +#define __PRINT_H__ + +#include + +#include "label.h" + +G_BEGIN_DECLS + +typedef struct { + gint i_copy; + GList *p_record; +} glPrintState; + +void gl_print_simple_sheet (glLabel *label, + cairo_t *cr, + gint page, + gint n_sheets, + gint first, + gint last, + gboolean outline_flag, + gboolean reverse_flag, + gboolean crop_marks_flag); + +void gl_print_collated_merge_sheet (glLabel *label, + cairo_t *cr, + gint page, + gint n_copies, + gint first, + gboolean outline_flag, + gboolean reverse_flag, + gboolean crop_marks_flag, + glPrintState *state); + +void gl_print_uncollated_merge_sheet (glLabel *label, + cairo_t *cr, + gint page, + gint n_copies, + gint first, + gboolean outline_flag, + gboolean reverse_flag, + gboolean crop_marks_flag, + glPrintState *state); + +G_END_DECLS + +#endif + + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/recent.c b/src/recent.c new file mode 100644 index 00000000..38244ab1 --- /dev/null +++ b/src/recent.c @@ -0,0 +1,164 @@ +/* + * recent.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "recent.h" + +#include +#include + +#include "prefs.h" + +#include "debug.h" + +#define GLABELS_MIME_TYPE "application/x-glabels" + +static GtkRecentManager *model; + + +/*****************************************************************************/ +/* Initialize recent files model. */ +/*****************************************************************************/ +void +gl_recent_init (void) +{ + gl_debug (DEBUG_RECENT, "START"); + + model = gtk_recent_manager_get_default (); + + gl_debug (DEBUG_RECENT, "END"); +} + + +/*****************************************************************************/ +/* Get UTF8 filename from GtkRecentInfo structure. */ +/*****************************************************************************/ +gchar * +gl_recent_get_utf8_filename (GtkRecentInfo *item) +{ + const gchar *uri; + gchar *filename; + gchar *utf8_filename = NULL; + + gl_debug (DEBUG_RECENT, "START"); + + uri = gtk_recent_info_get_uri (item); + + filename = g_filename_from_uri (uri, NULL, NULL); + if ( filename != NULL ) + { + utf8_filename = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); + g_free (filename); + } + + return utf8_filename; + gl_debug (DEBUG_RECENT, "END"); +} + + +/*****************************************************************************/ +/* Add file by UTF8 filename to recent model. */ +/*****************************************************************************/ +void +gl_recent_add_utf8_filename (gchar *utf8_filename) +{ + GtkRecentData *recent_data; + gchar *filename; + gchar *uri; + + static gchar *groups[2] = { + "glabels", + NULL + }; + + gl_debug (DEBUG_RECENT, "START"); + + recent_data = g_slice_new (GtkRecentData); + + recent_data->display_name = NULL; + recent_data->description = NULL; + recent_data->mime_type = GLABELS_MIME_TYPE; + recent_data->app_name = (gchar *) g_get_application_name (); + recent_data->app_exec = g_strjoin (" ", g_get_prgname (), "%f", NULL); + recent_data->groups = groups; + recent_data->is_private = FALSE; + + filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); + if ( filename != NULL ) + { + + uri = g_filename_to_uri (filename, NULL, NULL); + if ( uri != NULL ) + { + + gtk_recent_manager_add_full (model, uri, recent_data); + g_free (uri); + + } + g_free (filename); + + } + + g_free (recent_data->app_exec); + g_slice_free (GtkRecentData, recent_data); + + gl_debug (DEBUG_RECENT, "END"); +} + + +/*****************************************************************************/ +/* Create a menu of recent files. */ +/*****************************************************************************/ +GtkWidget * +gl_recent_create_menu (void) +{ + GtkWidget *recent_menu; + GtkRecentFilter *recent_filter; + + gl_debug (DEBUG_RECENT, "START"); + + recent_menu = + gtk_recent_chooser_menu_new_for_manager (model); + gtk_recent_chooser_menu_set_show_numbers (GTK_RECENT_CHOOSER_MENU (recent_menu), FALSE); + gtk_recent_chooser_set_show_icons (GTK_RECENT_CHOOSER (recent_menu), TRUE); + gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (recent_menu), gl_prefs->max_recents); + gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (recent_menu), GTK_RECENT_SORT_MRU); + gtk_recent_chooser_set_local_only (GTK_RECENT_CHOOSER (recent_menu), TRUE); + + recent_filter = gtk_recent_filter_new (); + gtk_recent_filter_add_mime_type (recent_filter, GLABELS_MIME_TYPE); + gtk_recent_chooser_set_filter (GTK_RECENT_CHOOSER (recent_menu), recent_filter); + + gl_debug (DEBUG_RECENT, "END"); + return recent_menu; +} + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/recent.h b/src/recent.h new file mode 100644 index 00000000..f3a19d2a --- /dev/null +++ b/src/recent.h @@ -0,0 +1,51 @@ +/* + * recent.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __RECENT_H__ +#define __RECENT_H__ + +#include + +G_BEGIN_DECLS + +void gl_recent_init (void); + +gchar *gl_recent_get_utf8_filename (GtkRecentInfo *item); + +void gl_recent_add_utf8_filename (gchar *utf8_filename); + +GtkWidget *gl_recent_create_menu (void); + + +G_END_DECLS + +#endif /*__RECENT_H__*/ + + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/rotate-label-button.c b/src/rotate-label-button.c new file mode 100644 index 00000000..65a880f1 --- /dev/null +++ b/src/rotate-label-button.c @@ -0,0 +1,265 @@ +/* + * rotate-label-button.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "rotate-label-button.h" + +#include +#include +#include + +#include +#include "mini-label-preview.h" +#include "hig.h" +#include "marshal.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + +#define SIZE 48 + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +struct _glRotateLabelButtonPrivate { + + GtkWidget *no_rotate_radio; + GtkWidget *rotate_radio; + GtkWidget *no_rotate_preview; + GtkWidget *rotate_preview; +}; + +enum { + CHANGED, + LAST_SIGNAL +}; + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +static gint rotate_label_button_signals[LAST_SIGNAL] = { 0 }; + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_rotate_label_button_finalize (GObject *object); + +static void toggled_cb (GtkToggleButton *toggle, + gpointer user_data); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glRotateLabelButton, gl_rotate_label_button, GTK_TYPE_HBOX); + + +static void +gl_rotate_label_button_class_init (glRotateLabelButtonClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_rotate_label_button_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_rotate_label_button_finalize; + + rotate_label_button_signals[CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE(object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glRotateLabelButtonClass, changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, 0); + +} + + +static void +gl_rotate_label_button_init (glRotateLabelButton *this) +{ + GtkWidget *vbox; + GtkWidget *label; + + this->priv = g_new0 (glRotateLabelButtonPrivate, 1); + + gtk_container_set_border_width (GTK_CONTAINER (this), GL_HIG_PAD2); + + this->priv->no_rotate_radio = gtk_radio_button_new (NULL); + gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (this->priv->no_rotate_radio), + FALSE); + vbox = gtk_vbox_new (FALSE, 1); + this->priv->no_rotate_preview = gl_mini_label_preview_new (SIZE, SIZE); + gtk_box_pack_start (GTK_BOX (vbox), this->priv->no_rotate_preview, FALSE, FALSE, 0); + label = gtk_label_new (_("Normal")); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (this->priv->no_rotate_radio), vbox); + + + this->priv->rotate_radio = gtk_radio_button_new_from_widget (GTK_RADIO_BUTTON (this->priv->no_rotate_radio)); + gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (this->priv->rotate_radio), + FALSE); + vbox = gtk_vbox_new (FALSE, 1); + this->priv->rotate_preview = gl_mini_label_preview_new (SIZE, SIZE); + gtk_box_pack_start (GTK_BOX (vbox), this->priv->rotate_preview, FALSE, FALSE, 0); + label = gtk_label_new (_("Rotated")); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (this->priv->rotate_radio), vbox); + + gtk_box_pack_start (GTK_BOX (this), + this->priv->no_rotate_radio, + FALSE, FALSE, GL_HIG_PAD1); + gtk_box_pack_start (GTK_BOX (this), + this->priv->rotate_radio, + FALSE, FALSE, GL_HIG_PAD1); + + /* Connect signals to controls */ + g_signal_connect (G_OBJECT (this->priv->no_rotate_radio), + "toggled", + G_CALLBACK (toggled_cb), this); + g_signal_connect (G_OBJECT (this->priv->rotate_radio), + "toggled", + G_CALLBACK (toggled_cb), this); +} + + +static void +gl_rotate_label_button_finalize (GObject *object) +{ + glRotateLabelButton *this = GL_ROTATE_LABEL_BUTTON (object); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_ROTATE_LABEL_BUTTON (object)); + + g_free (this->priv); + + G_OBJECT_CLASS (gl_rotate_label_button_parent_class)->finalize (object); +} + + +GtkWidget * +gl_rotate_label_button_new (void) +{ + glRotateLabelButton *this; + + this = g_object_new (gl_rotate_label_button_get_type (), NULL); + + return GTK_WIDGET (this); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. modify widget due to change of check button */ +/*--------------------------------------------------------------------------*/ +static void +toggled_cb (GtkToggleButton *toggle, + gpointer user_data) +{ + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (user_data), + rotate_label_button_signals[CHANGED], 0); + +} + + +/****************************************************************************/ +/* query state of widget. */ +/****************************************************************************/ +gboolean +gl_rotate_label_button_get_state (glRotateLabelButton *this) +{ + return + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON + (this->priv->rotate_radio)); +} + +/****************************************************************************/ +/* set state of widget. */ +/****************************************************************************/ +void +gl_rotate_label_button_set_state (glRotateLabelButton *this, + gboolean state) +{ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (this->priv->rotate_radio), state); +} + +/****************************************************************************/ +/* set template for widget. */ +/****************************************************************************/ +void +gl_rotate_label_button_set_template_name (glRotateLabelButton *this, + gchar *name) +{ + lglTemplate *template; + const lglTemplateFrame *frame; + gdouble raw_w, raw_h; + + if (name == NULL) + { + gtk_widget_set_sensitive (this->priv->no_rotate_radio, FALSE); + gtk_widget_set_sensitive (this->priv->rotate_radio, FALSE); + } + else + { + template = lgl_db_lookup_template_from_name (name); + frame = (lglTemplateFrame *)template->frames->data; + + gl_mini_label_preview_set_by_name (GL_MINI_LABEL_PREVIEW (this->priv->no_rotate_preview), + name, FALSE); + gl_mini_label_preview_set_by_name (GL_MINI_LABEL_PREVIEW (this->priv->rotate_preview), + name, TRUE); + + lgl_template_frame_get_size (frame, &raw_w, &raw_h); + gtk_widget_set_sensitive (this->priv->no_rotate_radio, + (raw_w != raw_h)); + gtk_widget_set_sensitive (this->priv->rotate_radio, + (raw_w != raw_h)); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (this->priv->no_rotate_radio), TRUE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON + (this->priv->rotate_radio), FALSE); + } + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/rotate-label-button.h b/src/rotate-label-button.h new file mode 100644 index 00000000..049d80e8 --- /dev/null +++ b/src/rotate-label-button.h @@ -0,0 +1,83 @@ +/* + * rotate-label-button.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __ROTATE_LABEL_BUTTON_H__ +#define __ROTATE_LABEL_BUTTON_H__ + +#include + +G_BEGIN_DECLS + +#define GL_TYPE_ROTATE_LABEL_BUTTON (gl_rotate_label_button_get_type ()) +#define GL_ROTATE_LABEL_BUTTON(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_ROTATE_LABEL_BUTTON, glRotateLabelButton )) +#define GL_ROTATE_LABEL_BUTTON_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_ROTATE_LABEL_BUTTON, glRotateLabelButtonClass)) +#define GL_IS_ROTATE_LABEL_BUTTON(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_ROTATE_LABEL_BUTTON)) +#define GL_IS_ROTATE_LABEL_BUTTON_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_ROTATE_LABEL_BUTTON)) + + +typedef struct _glRotateLabelButton glRotateLabelButton; +typedef struct _glRotateLabelButtonClass glRotateLabelButtonClass; + +typedef struct _glRotateLabelButtonPrivate glRotateLabelButtonPrivate; + +struct _glRotateLabelButton { + GtkHBox parent_widget; + + glRotateLabelButtonPrivate *priv; +}; + +struct _glRotateLabelButtonClass { + GtkHBoxClass parent_class; + + void (*changed) (glRotateLabelButton *rotate_label_button, + gpointer user_data); +}; + + +GType gl_rotate_label_button_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_rotate_label_button_new (void); + +gboolean gl_rotate_label_button_get_state (glRotateLabelButton *rotate_label); + +void gl_rotate_label_button_set_state (glRotateLabelButton *rotate_label, + gboolean state); + +void gl_rotate_label_button_set_template_name (glRotateLabelButton *rotate_label, + gchar *name); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/stock-pixmaps/Makefile.am b/src/stock-pixmaps/Makefile.am new file mode 100644 index 00000000..00625378 --- /dev/null +++ b/src/stock-pixmaps/Makefile.am @@ -0,0 +1,95 @@ + +IMAGES = \ + stock_arrow_24.png \ + stock_arrow_16.png \ + stock_barcode_24.png \ + stock_barcode_16.png \ + stock_box_24.png \ + stock_box_16.png \ + stock_ellipse_24.png \ + stock_ellipse_16.png \ + stock_image_24.png \ + stock_image_16.png \ + stock_line_24.png \ + stock_line_16.png \ + stock_merge_24.png \ + stock_merge_16.png \ + stock_properties_24.png \ + stock_properties_16.png \ + stock_text_24.png \ + stock_text_16.png \ + stock_order_top_16.png \ + stock_order_bottom_16.png \ + stock_rotate_left_16.png \ + stock_rotate_right_16.png \ + stock_flip_horiz_16.png \ + stock_flip_vert_16.png \ + stock_align_left_16.png \ + stock_align_right_16.png \ + stock_align_hcenter_16.png \ + stock_align_top_16.png \ + stock_align_bottom_16.png \ + stock_align_vcenter_16.png \ + stock_center_horiz_16.png \ + stock_center_vert_16.png \ + stock_bucket_fill_16.png \ + stock_bucket_fill_24.png \ + stock_pencil_16.png \ + stock_pencil_24.png \ + stock_hchain_24.png \ + stock_hchain_broken_24.png \ + stock_vchain_24.png \ + stock_vchain_broken_24.png + +VARIABLES1 = \ + stock_arrow_24 $(srcdir)/stock_arrow_24.png \ + stock_arrow_16 $(srcdir)/stock_arrow_16.png \ + stock_barcode_24 $(srcdir)/stock_barcode_24.png \ + stock_barcode_16 $(srcdir)/stock_barcode_16.png \ + stock_box_24 $(srcdir)/stock_box_24.png \ + stock_box_16 $(srcdir)/stock_box_16.png \ + stock_ellipse_24 $(srcdir)/stock_ellipse_24.png \ + stock_ellipse_16 $(srcdir)/stock_ellipse_16.png \ + stock_image_24 $(srcdir)/stock_image_24.png \ + stock_image_16 $(srcdir)/stock_image_16.png \ + stock_line_24 $(srcdir)/stock_line_24.png \ + stock_line_16 $(srcdir)/stock_line_16.png \ + stock_merge_24 $(srcdir)/stock_merge_24.png \ + stock_merge_16 $(srcdir)/stock_merge_16.png \ + stock_properties_24 $(srcdir)/stock_properties_24.png \ + stock_properties_16 $(srcdir)/stock_properties_16.png \ + stock_text_24 $(srcdir)/stock_text_24.png \ + stock_text_16 $(srcdir)/stock_text_16.png \ + stock_order_top_16 $(srcdir)/stock_order_top_16.png \ + stock_order_bottom_16 $(srcdir)/stock_order_bottom_16.png \ + stock_rotate_left_16 $(srcdir)/stock_rotate_left_16.png \ + stock_rotate_right_16 $(srcdir)/stock_rotate_right_16.png \ + stock_flip_horiz_16 $(srcdir)/stock_flip_horiz_16.png \ + stock_flip_vert_16 $(srcdir)/stock_flip_vert_16.png \ + stock_align_left_16 $(srcdir)/stock_align_left_16.png \ + stock_align_right_16 $(srcdir)/stock_align_right_16.png \ + stock_align_hcenter_16 $(srcdir)/stock_align_hcenter_16.png \ + stock_align_top_16 $(srcdir)/stock_align_top_16.png \ + stock_align_bottom_16 $(srcdir)/stock_align_bottom_16.png \ + stock_align_vcenter_16 $(srcdir)/stock_align_vcenter_16.png \ + stock_center_horiz_16 $(srcdir)/stock_center_horiz_16.png \ + stock_center_vert_16 $(srcdir)/stock_center_vert_16.png \ + stock_bucket_fill_16 $(srcdir)/stock_bucket_fill_16.png \ + stock_bucket_fill_24 $(srcdir)/stock_bucket_fill_24.png \ + stock_pencil_16 $(srcdir)/stock_pencil_16.png \ + stock_pencil_24 $(srcdir)/stock_pencil_24.png \ + stock_hchain_24 $(srcdir)/stock_hchain_24.png \ + stock_hchain_broken_24 $(srcdir)/stock_hchain_broken_24.png \ + stock_vchain_24 $(srcdir)/stock_vchain_24.png \ + stock_vchain_broken_24 $(srcdir)/stock_vchain_broken_24.png + + +noinst_DATA = stockpixbufs.h +CLEANFILES = $(noinst_DATA) + +stockpixbufs.h: $(IMAGES) + $(AM_V_GEN) $(GDK_PIXBUF_CSOURCE) \ + --raw --build-list $(VARIABLES1) > $(srcdir)/stockpixbufs.h || \ + ( rm -f $(srcdir)/stockpixbufs.h && false ) + +EXTRA_DIST = $(IMAGES) stockpixbufs.h diff --git a/src/stock-pixmaps/stock_align_bottom_16.png b/src/stock-pixmaps/stock_align_bottom_16.png new file mode 100644 index 00000000..da901bc4 Binary files /dev/null and b/src/stock-pixmaps/stock_align_bottom_16.png differ diff --git a/src/stock-pixmaps/stock_align_hcenter_16.png b/src/stock-pixmaps/stock_align_hcenter_16.png new file mode 100644 index 00000000..684c1259 Binary files /dev/null and b/src/stock-pixmaps/stock_align_hcenter_16.png differ diff --git a/src/stock-pixmaps/stock_align_left_16.png b/src/stock-pixmaps/stock_align_left_16.png new file mode 100644 index 00000000..1cdcf9bc Binary files /dev/null and b/src/stock-pixmaps/stock_align_left_16.png differ diff --git a/src/stock-pixmaps/stock_align_right_16.png b/src/stock-pixmaps/stock_align_right_16.png new file mode 100644 index 00000000..2b4872b0 Binary files /dev/null and b/src/stock-pixmaps/stock_align_right_16.png differ diff --git a/src/stock-pixmaps/stock_align_top_16.png b/src/stock-pixmaps/stock_align_top_16.png new file mode 100644 index 00000000..5bda931c Binary files /dev/null and b/src/stock-pixmaps/stock_align_top_16.png differ diff --git a/src/stock-pixmaps/stock_align_vcenter_16.png b/src/stock-pixmaps/stock_align_vcenter_16.png new file mode 100644 index 00000000..a51293f0 Binary files /dev/null and b/src/stock-pixmaps/stock_align_vcenter_16.png differ diff --git a/src/stock-pixmaps/stock_arrow_16.png b/src/stock-pixmaps/stock_arrow_16.png new file mode 100644 index 00000000..0ae5f368 Binary files /dev/null and b/src/stock-pixmaps/stock_arrow_16.png differ diff --git a/src/stock-pixmaps/stock_arrow_24.png b/src/stock-pixmaps/stock_arrow_24.png new file mode 100644 index 00000000..6e0e26af Binary files /dev/null and b/src/stock-pixmaps/stock_arrow_24.png differ diff --git a/src/stock-pixmaps/stock_barcode_16.png b/src/stock-pixmaps/stock_barcode_16.png new file mode 100644 index 00000000..6e0e2890 Binary files /dev/null and b/src/stock-pixmaps/stock_barcode_16.png differ diff --git a/src/stock-pixmaps/stock_barcode_24.png b/src/stock-pixmaps/stock_barcode_24.png new file mode 100644 index 00000000..9699c8dd Binary files /dev/null and b/src/stock-pixmaps/stock_barcode_24.png differ diff --git a/src/stock-pixmaps/stock_box_16.png b/src/stock-pixmaps/stock_box_16.png new file mode 100644 index 00000000..c141c9d5 Binary files /dev/null and b/src/stock-pixmaps/stock_box_16.png differ diff --git a/src/stock-pixmaps/stock_box_24.png b/src/stock-pixmaps/stock_box_24.png new file mode 100644 index 00000000..9f8e06f8 Binary files /dev/null and b/src/stock-pixmaps/stock_box_24.png differ diff --git a/src/stock-pixmaps/stock_bucket_fill_16.png b/src/stock-pixmaps/stock_bucket_fill_16.png new file mode 100644 index 00000000..2be70def Binary files /dev/null and b/src/stock-pixmaps/stock_bucket_fill_16.png differ diff --git a/src/stock-pixmaps/stock_bucket_fill_24.png b/src/stock-pixmaps/stock_bucket_fill_24.png new file mode 100644 index 00000000..1ee5993e Binary files /dev/null and b/src/stock-pixmaps/stock_bucket_fill_24.png differ diff --git a/src/stock-pixmaps/stock_center_horiz_16.png b/src/stock-pixmaps/stock_center_horiz_16.png new file mode 100644 index 00000000..fce3e909 Binary files /dev/null and b/src/stock-pixmaps/stock_center_horiz_16.png differ diff --git a/src/stock-pixmaps/stock_center_vert_16.png b/src/stock-pixmaps/stock_center_vert_16.png new file mode 100644 index 00000000..08b19af0 Binary files /dev/null and b/src/stock-pixmaps/stock_center_vert_16.png differ diff --git a/src/stock-pixmaps/stock_ellipse_16.png b/src/stock-pixmaps/stock_ellipse_16.png new file mode 100644 index 00000000..9652562e Binary files /dev/null and b/src/stock-pixmaps/stock_ellipse_16.png differ diff --git a/src/stock-pixmaps/stock_ellipse_24.png b/src/stock-pixmaps/stock_ellipse_24.png new file mode 100644 index 00000000..12f0468f Binary files /dev/null and b/src/stock-pixmaps/stock_ellipse_24.png differ diff --git a/src/stock-pixmaps/stock_flip_horiz_16.png b/src/stock-pixmaps/stock_flip_horiz_16.png new file mode 100644 index 00000000..e4770685 Binary files /dev/null and b/src/stock-pixmaps/stock_flip_horiz_16.png differ diff --git a/src/stock-pixmaps/stock_flip_vert_16.png b/src/stock-pixmaps/stock_flip_vert_16.png new file mode 100644 index 00000000..93027c93 Binary files /dev/null and b/src/stock-pixmaps/stock_flip_vert_16.png differ diff --git a/src/stock-pixmaps/stock_hchain_24.png b/src/stock-pixmaps/stock_hchain_24.png new file mode 100644 index 00000000..5bc2eedc Binary files /dev/null and b/src/stock-pixmaps/stock_hchain_24.png differ diff --git a/src/stock-pixmaps/stock_hchain_broken_24.png b/src/stock-pixmaps/stock_hchain_broken_24.png new file mode 100644 index 00000000..2e961a3e Binary files /dev/null and b/src/stock-pixmaps/stock_hchain_broken_24.png differ diff --git a/src/stock-pixmaps/stock_image_16.png b/src/stock-pixmaps/stock_image_16.png new file mode 100644 index 00000000..ee9ed3d2 Binary files /dev/null and b/src/stock-pixmaps/stock_image_16.png differ diff --git a/src/stock-pixmaps/stock_image_24.png b/src/stock-pixmaps/stock_image_24.png new file mode 100644 index 00000000..093c8ad9 Binary files /dev/null and b/src/stock-pixmaps/stock_image_24.png differ diff --git a/src/stock-pixmaps/stock_line_16.png b/src/stock-pixmaps/stock_line_16.png new file mode 100644 index 00000000..cf0e0406 Binary files /dev/null and b/src/stock-pixmaps/stock_line_16.png differ diff --git a/src/stock-pixmaps/stock_line_24.png b/src/stock-pixmaps/stock_line_24.png new file mode 100644 index 00000000..7bb65234 Binary files /dev/null and b/src/stock-pixmaps/stock_line_24.png differ diff --git a/src/stock-pixmaps/stock_merge_16.png b/src/stock-pixmaps/stock_merge_16.png new file mode 100644 index 00000000..2a3bfe8b Binary files /dev/null and b/src/stock-pixmaps/stock_merge_16.png differ diff --git a/src/stock-pixmaps/stock_merge_24.png b/src/stock-pixmaps/stock_merge_24.png new file mode 100644 index 00000000..af612006 Binary files /dev/null and b/src/stock-pixmaps/stock_merge_24.png differ diff --git a/src/stock-pixmaps/stock_order_bottom_16.png b/src/stock-pixmaps/stock_order_bottom_16.png new file mode 100644 index 00000000..f6ed2d00 Binary files /dev/null and b/src/stock-pixmaps/stock_order_bottom_16.png differ diff --git a/src/stock-pixmaps/stock_order_top_16.png b/src/stock-pixmaps/stock_order_top_16.png new file mode 100644 index 00000000..0884bc1e Binary files /dev/null and b/src/stock-pixmaps/stock_order_top_16.png differ diff --git a/src/stock-pixmaps/stock_pencil_16.png b/src/stock-pixmaps/stock_pencil_16.png new file mode 100644 index 00000000..83a14936 Binary files /dev/null and b/src/stock-pixmaps/stock_pencil_16.png differ diff --git a/src/stock-pixmaps/stock_pencil_24.png b/src/stock-pixmaps/stock_pencil_24.png new file mode 100644 index 00000000..a36ce930 Binary files /dev/null and b/src/stock-pixmaps/stock_pencil_24.png differ diff --git a/src/stock-pixmaps/stock_properties_16.png b/src/stock-pixmaps/stock_properties_16.png new file mode 100644 index 00000000..ab42b19c Binary files /dev/null and b/src/stock-pixmaps/stock_properties_16.png differ diff --git a/src/stock-pixmaps/stock_properties_24.png b/src/stock-pixmaps/stock_properties_24.png new file mode 100644 index 00000000..f5926060 Binary files /dev/null and b/src/stock-pixmaps/stock_properties_24.png differ diff --git a/src/stock-pixmaps/stock_rotate_left_16.png b/src/stock-pixmaps/stock_rotate_left_16.png new file mode 100644 index 00000000..157884e5 Binary files /dev/null and b/src/stock-pixmaps/stock_rotate_left_16.png differ diff --git a/src/stock-pixmaps/stock_rotate_right_16.png b/src/stock-pixmaps/stock_rotate_right_16.png new file mode 100644 index 00000000..cc5dc49a Binary files /dev/null and b/src/stock-pixmaps/stock_rotate_right_16.png differ diff --git a/src/stock-pixmaps/stock_text_16.png b/src/stock-pixmaps/stock_text_16.png new file mode 100644 index 00000000..c539bf1e Binary files /dev/null and b/src/stock-pixmaps/stock_text_16.png differ diff --git a/src/stock-pixmaps/stock_text_24.png b/src/stock-pixmaps/stock_text_24.png new file mode 100644 index 00000000..b9e5511a Binary files /dev/null and b/src/stock-pixmaps/stock_text_24.png differ diff --git a/src/stock-pixmaps/stock_vchain_24.png b/src/stock-pixmaps/stock_vchain_24.png new file mode 100644 index 00000000..7dc2031f Binary files /dev/null and b/src/stock-pixmaps/stock_vchain_24.png differ diff --git a/src/stock-pixmaps/stock_vchain_broken_24.png b/src/stock-pixmaps/stock_vchain_broken_24.png new file mode 100644 index 00000000..8ef1363c Binary files /dev/null and b/src/stock-pixmaps/stock_vchain_broken_24.png differ diff --git a/src/stock.c b/src/stock.c new file mode 100644 index 00000000..7f312109 --- /dev/null +++ b/src/stock.c @@ -0,0 +1,225 @@ +/* + * stock.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "stock.h" + +#include +#include +#include + +#include "stock-pixmaps/stockpixbufs.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void add_icons (GtkIconFactory *factory, + const gchar *stock_id, + const guchar *inline_24, + const guchar *inline_16); + +static void add_button_icon (GtkIconFactory *factory, + const gchar *stock_id, + const guchar *inline_24); + + +/****************************************************************************/ +/* Initialize our stock icons. */ +/****************************************************************************/ +void +gl_stock_init (void) +{ + GtkIconFactory *factory; + + static GtkStockItem items[] = { + { GL_STOCK_ARROW, N_("_Select Mode"), 0, 0, NULL }, + { GL_STOCK_TEXT, N_("_Text"), 0, 0, NULL }, + { GL_STOCK_LINE, N_("_Line"), 0, 0, NULL }, + { GL_STOCK_BOX, N_("_Box"), 0, 0, NULL }, + { GL_STOCK_ELLIPSE, N_("_Ellipse"), 0, 0, NULL }, + { GL_STOCK_IMAGE, N_("_Image"), 0, 0, NULL }, + { GL_STOCK_BARCODE, N_("Bar_code"), 0, 0, NULL }, + { GL_STOCK_MERGE, N_("_Merge Properties"), 0, 0, NULL }, + { GL_STOCK_PROPERTIES, N_("Object _Properties"), 0, 0, NULL }, + { GL_STOCK_ORDER_TOP, N_("Bring to _Front"), 0, 0, NULL }, + { GL_STOCK_ORDER_BOTTOM, N_("Send to _Back"), 0, 0, NULL }, + { GL_STOCK_ROTATE_LEFT, N_("Rotate _Left"), 0, 0, NULL }, + { GL_STOCK_ROTATE_RIGHT, N_("Rotate _Right"), 0, 0, NULL }, + { GL_STOCK_FLIP_HORIZ, N_("Flip _Horizontally"), 0, 0, NULL }, + { GL_STOCK_FLIP_VERT, N_("Flip _Vertically"), 0, 0, NULL }, + { GL_STOCK_ALIGN_LEFT, N_("_Lefts"), 0, 0, NULL }, + { GL_STOCK_ALIGN_RIGHT, N_("_Rights"), 0, 0, NULL }, + { GL_STOCK_ALIGN_HCENTER, N_("_Centers"), 0, 0, NULL }, + { GL_STOCK_ALIGN_TOP, N_("_Tops"), 0, 0, NULL }, + { GL_STOCK_ALIGN_BOTTOM, N_("Bottoms"), 0, 0, NULL }, + { GL_STOCK_ALIGN_VCENTER, N_("Centers"), 0, 0, NULL }, + { GL_STOCK_CENTER_HORIZ, N_("Label Ce_nter"), 0, 0, NULL }, + { GL_STOCK_CENTER_VERT, N_("Label Ce_nter"), 0, 0, NULL }, + { GL_STOCK_BUCKET_FILL, N_("Fill color"), 0, 0, NULL }, + { GL_STOCK_PENCIL, N_("Line color"), 0, 0, NULL }, + { GL_STOCK_HCHAIN, N_("Linked"), 0, 0, NULL }, + { GL_STOCK_HCHAIN_BROKEN, N_("Not Linked"), 0, 0, NULL }, + { GL_STOCK_VCHAIN, N_("Linked"), 0, 0, NULL }, + { GL_STOCK_VCHAIN_BROKEN, N_("Not Linked"), 0, 0, NULL }, + }; + + gtk_stock_add (items, G_N_ELEMENTS (items)); + + factory = gtk_icon_factory_new (); + gtk_icon_factory_add_default (factory); + + add_icons (factory, GL_STOCK_ARROW, stock_arrow_24, stock_arrow_16); + add_icons (factory, GL_STOCK_TEXT, stock_text_24, stock_text_16); + add_icons (factory, GL_STOCK_LINE, stock_line_24, stock_line_16); + add_icons (factory, GL_STOCK_BOX, stock_box_24, stock_box_16); + add_icons (factory, GL_STOCK_ELLIPSE, stock_ellipse_24, stock_ellipse_16); + add_icons (factory, GL_STOCK_IMAGE, stock_image_24, stock_image_16); + add_icons (factory, GL_STOCK_BARCODE, stock_barcode_24, stock_barcode_16); + add_icons (factory, GL_STOCK_MERGE, stock_merge_24, stock_merge_16); + + add_icons (factory, GL_STOCK_PROPERTIES, + stock_properties_24, + stock_properties_16); + + add_icons (factory, GL_STOCK_ORDER_TOP, NULL, stock_order_top_16); + add_icons (factory, GL_STOCK_ORDER_BOTTOM, NULL, stock_order_bottom_16); + add_icons (factory, GL_STOCK_ROTATE_LEFT, NULL, stock_rotate_left_16); + add_icons (factory, GL_STOCK_ROTATE_RIGHT, NULL, stock_rotate_right_16); + add_icons (factory, GL_STOCK_FLIP_HORIZ, NULL, stock_flip_horiz_16); + add_icons (factory, GL_STOCK_FLIP_VERT, NULL, stock_flip_vert_16); + add_icons (factory, GL_STOCK_ALIGN_LEFT, NULL, stock_align_left_16); + add_icons (factory, GL_STOCK_ALIGN_RIGHT, NULL, stock_align_right_16); + add_icons (factory, GL_STOCK_ALIGN_HCENTER, NULL, stock_align_hcenter_16); + add_icons (factory, GL_STOCK_ALIGN_TOP, NULL, stock_align_top_16); + add_icons (factory, GL_STOCK_ALIGN_BOTTOM, NULL, stock_align_bottom_16); + add_icons (factory, GL_STOCK_ALIGN_VCENTER, NULL, stock_align_vcenter_16); + add_icons (factory, GL_STOCK_CENTER_HORIZ, NULL, stock_center_horiz_16); + add_icons (factory, GL_STOCK_CENTER_VERT, NULL, stock_center_vert_16); + + add_icons (factory, GL_STOCK_BUCKET_FILL, stock_bucket_fill_24, stock_bucket_fill_16); + add_icons (factory, GL_STOCK_PENCIL, stock_pencil_24, stock_pencil_16); + + add_button_icon (factory, GL_STOCK_HCHAIN, stock_hchain_24); + add_button_icon (factory, GL_STOCK_HCHAIN_BROKEN, stock_hchain_broken_24); + add_button_icon (factory, GL_STOCK_VCHAIN, stock_vchain_24); + add_button_icon (factory, GL_STOCK_VCHAIN_BROKEN, stock_vchain_broken_24); + + g_object_unref (G_OBJECT(factory)); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Unpack and associate given icons with stock_id. */ +/*--------------------------------------------------------------------------*/ +static void +add_icons (GtkIconFactory *factory, + const gchar *stock_id, + const guchar *inline_24, + const guchar *inline_16) +{ + GdkPixbuf *pixbuf; + GtkIconSet *icon_set; + GtkIconSource *icon_source; + + if ( inline_24 != NULL ) { + /* Create icon set with default image */ + pixbuf = gdk_pixbuf_new_from_inline (-1, inline_24, FALSE, NULL); + icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); + g_object_unref (G_OBJECT(pixbuf)); + } else { + /* Create an empty icon set */ + icon_set = gtk_icon_set_new (); + } + + if ( inline_16 != NULL ) { + /* Add 16x16 icon for menus to icon set */ + icon_source = gtk_icon_source_new (); + pixbuf = gdk_pixbuf_new_from_inline (-1, inline_16, + FALSE, NULL); + gtk_icon_source_set_pixbuf (icon_source, pixbuf); + g_object_unref (G_OBJECT(pixbuf)); + gtk_icon_source_set_size_wildcarded (icon_source, FALSE); + gtk_icon_source_set_size (icon_source, GTK_ICON_SIZE_MENU); + gtk_icon_set_add_source (icon_set, icon_source); + gtk_icon_source_free (icon_source); + } + + /* Now associate icon set with stock id */ + gtk_icon_factory_add (factory, stock_id, icon_set); + gtk_icon_set_unref (icon_set); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Unpack and associate given button icon with stock_id. */ +/*--------------------------------------------------------------------------*/ +static void +add_button_icon (GtkIconFactory *factory, + const gchar *stock_id, + const guchar *inline_24) +{ + GtkIconSet *icon_set; + GdkPixbuf *pixbuf; + GtkIconSource *icon_source; + + icon_set = gtk_icon_set_new (); + + icon_source = gtk_icon_source_new (); + pixbuf = gdk_pixbuf_new_from_inline (-1, inline_24, FALSE, NULL); + gtk_icon_source_set_pixbuf (icon_source, pixbuf); + g_object_unref (G_OBJECT(pixbuf)); + gtk_icon_source_set_size_wildcarded (icon_source, FALSE); + gtk_icon_source_set_size (icon_source, GTK_ICON_SIZE_BUTTON); + gtk_icon_set_add_source (icon_set, icon_source); + gtk_icon_source_free (icon_source); + + /* Now associate icon set with stock id */ + gtk_icon_factory_add (factory, stock_id, icon_set); + gtk_icon_set_unref (icon_set); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/stock.h b/src/stock.h new file mode 100644 index 00000000..54eb8c8a --- /dev/null +++ b/src/stock.h @@ -0,0 +1,75 @@ +/* + * stock.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __STOCK_H__ +#define __STOCK_H__ + +#include + +G_BEGIN_DECLS + +/* Stock names */ + +#define GL_STOCK_ARROW "gl_stock_arrow" +#define GL_STOCK_TEXT "gl_stock_text" +#define GL_STOCK_LINE "gl_stock_line" +#define GL_STOCK_BOX "gl_stock_box" +#define GL_STOCK_ELLIPSE "gl_stock_ellipse" +#define GL_STOCK_IMAGE "gl_stock_image" +#define GL_STOCK_BARCODE "gl_stock_barcode" +#define GL_STOCK_MERGE "gl_stock_merge" +#define GL_STOCK_PROPERTIES "gl_stock_properties" +#define GL_STOCK_ORDER_TOP "gl_stock_order_top" +#define GL_STOCK_ORDER_BOTTOM "gl_stock_order_bottom" +#define GL_STOCK_ROTATE_LEFT "gl_stock_rotate_left" +#define GL_STOCK_ROTATE_RIGHT "gl_stock_rotate_right" +#define GL_STOCK_FLIP_HORIZ "gl_stock_flip_horiz" +#define GL_STOCK_FLIP_VERT "gl_stock_flip_vert" +#define GL_STOCK_ALIGN_LEFT "gl_stock_align_left" +#define GL_STOCK_ALIGN_RIGHT "gl_stock_align_right" +#define GL_STOCK_ALIGN_HCENTER "gl_stock_align_hcenter" +#define GL_STOCK_ALIGN_TOP "gl_stock_align_top" +#define GL_STOCK_ALIGN_BOTTOM "gl_stock_align_bottom" +#define GL_STOCK_ALIGN_VCENTER "gl_stock_align_vcenter" +#define GL_STOCK_CENTER_HORIZ "gl_stock_center_horiz" +#define GL_STOCK_CENTER_VERT "gl_stock_center_vert" +#define GL_STOCK_BUCKET_FILL "gl_stock_bucket_fill" +#define GL_STOCK_PENCIL "gl_stock_pencil" +#define GL_STOCK_HCHAIN "gl_stock_hchain" +#define GL_STOCK_HCHAIN_BROKEN "gl_stock_hchain_broken" +#define GL_STOCK_VCHAIN "gl_stock_vchain" +#define GL_STOCK_VCHAIN_BROKEN "gl_stock_vchain_broken" + +void gl_stock_init (void); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/str-util.c b/src/str-util.c new file mode 100644 index 00000000..d48ec007 --- /dev/null +++ b/src/str-util.c @@ -0,0 +1,142 @@ +/* + * str-util.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "str-util.h" + +#include +#include + +#define FRAC_EPSILON 0.00005 + + +/****************************************************************************/ +/* Create fractional representation of number, if possible. */ +/****************************************************************************/ +gchar * +gl_str_util_fraction_to_string (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_EPSILON ) 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); + } +} + + +/****************************************************************************/ +/* Utilities to deal with PangoAlignment types. */ +/****************************************************************************/ +const gchar * +gl_str_util_align_to_string (PangoAlignment align) +{ + switch (align) { + case PANGO_ALIGN_LEFT: + return "Left"; + case PANGO_ALIGN_CENTER: + return "Center"; + case PANGO_ALIGN_RIGHT: + return "Right"; + default: + return "?"; + } +} + + +PangoAlignment +gl_str_util_string_to_align (const gchar *string) +{ + + if (g_strcasecmp (string, "Left") == 0) { + return PANGO_ALIGN_LEFT; + } else if (g_strcasecmp (string, "Center") == 0) { + return PANGO_ALIGN_CENTER; + } else if (g_strcasecmp (string, "Right") == 0) { + return PANGO_ALIGN_RIGHT; + } else { + return PANGO_ALIGN_LEFT; + } + +} + + +/****************************************************************************/ +/* Utilities to deal with PangoWeight types */ +/****************************************************************************/ +const gchar * +gl_str_util_weight_to_string (PangoWeight weight) +{ + switch (weight) { + case PANGO_WEIGHT_NORMAL: + return "Regular"; + case PANGO_WEIGHT_BOLD: + return "Bold"; + default: + return "?"; + } +} + + +PangoWeight +gl_str_util_string_to_weight (const gchar *string) +{ + + if (g_strcasecmp (string, "Regular") == 0) { + return PANGO_WEIGHT_NORMAL; + } else if (g_strcasecmp (string, "Bold") == 0) { + return PANGO_WEIGHT_BOLD; + } else { + return PANGO_WEIGHT_NORMAL; + } + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/str-util.h b/src/str-util.h new file mode 100644 index 00000000..0253392b --- /dev/null +++ b/src/str-util.h @@ -0,0 +1,50 @@ +/* + * str-util.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __STR_UTIL_H__ +#define __STR_UTIL_H__ + +#include +#include + +G_BEGIN_DECLS + +gchar *gl_str_util_fraction_to_string (gdouble x); + +const gchar *gl_str_util_align_to_string (PangoAlignment align); +PangoAlignment gl_str_util_string_to_align (const gchar *string); + +const gchar *gl_str_util_weight_to_string (PangoWeight weight); +PangoWeight gl_str_util_string_to_weight (const gchar *string); + +G_END_DECLS + +#endif /* __STR_UTIL_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/template-designer.c b/src/template-designer.c new file mode 100644 index 00000000..d5d6453f --- /dev/null +++ b/src/template-designer.c @@ -0,0 +1,1766 @@ +/* + * template-designer.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "template-designer.h" + +#include +#include +#include +#include + +#include +#include "prefs.h" +#include "mini-preview.h" +#include "mini-preview-pixbuf-cache.h" +#include "print-op-dialog.h" +#include "combo-util.h" +#include "builder-util.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ +#define ICON_PIXMAP (GLABELS_ICON_DIR "glabels.png") + +#define EX_RECT_IMAGE (GLABELS_PIXMAP_DIR "ex-rect-size.png") +#define EX_ROUND_IMAGE (GLABELS_PIXMAP_DIR "ex-round-size.png") +#define EX_CD_IMAGE (GLABELS_PIXMAP_DIR "ex-cd-size.png") +#define EX_NLAYOUTS_IMAGE1 (GLABELS_PIXMAP_DIR "ex-1layout.png") +#define EX_NLAYOUTS_IMAGE2 (GLABELS_PIXMAP_DIR "ex-2layouts.png") + +#define DEFAULT_MARGIN 9.0 + +#define DEFAULT_RECT_W 252.0 +#define DEFAULT_RECT_H 144.0 +#define DEFAULT_RECT_R 0.0 +#define DEFAULT_RECT_WASTE 0.0 /* Should never exceed 1/2 the distance between items. */ + +#define DEFAULT_ROUND_R 72.0 +#define DEFAULT_ROUND_WASTE 0.0 /* Should never exceed 1/2 the distance between items. */ + +#define DEFAULT_CD_RADIUS 166.5 +#define DEFAULT_CD_HOLE 58.5 +#define DEFAULT_CD_WASTE 9.0 /* Should never exceed 1/2 the distance between items. */ + +#define DELTA 0.01 +#define MAX_PAGE_DIM_POINTS 5000.0 + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glTemplateDesignerPrivate +{ + GtkBuilder *builder; + + /* Assistant pages */ + GtkWidget *start_page; + GtkWidget *name_page; + GtkWidget *pg_size_page; + GtkWidget *shape_page; + GtkWidget *rect_size_page; + GtkWidget *round_size_page; + GtkWidget *cd_size_page; + GtkWidget *nlayouts_page; + GtkWidget *layout_page; + GtkWidget *finish_page; + + /* Name page controls */ + GtkWidget *brand_entry; + GtkWidget *part_num_entry; + GtkWidget *name_warning_image; + GtkWidget *name_warning_label; + GtkWidget *description_entry; + + /* Page size page controls */ + GtkWidget *pg_size_combo; + GtkWidget *pg_w_spin; + GtkWidget *pg_h_spin; + GtkWidget *pg_w_units_label; + GtkWidget *pg_h_units_label; + + /* Shape page controls */ + GtkWidget *shape_rect_radio; + GtkWidget *shape_round_radio; + GtkWidget *shape_cd_radio; + + /* Label size (rectangular) page controls */ + GtkWidget *rect_image; + GtkWidget *rect_w_spin; + GtkWidget *rect_h_spin; + GtkWidget *rect_r_spin; + GtkWidget *rect_x_waste_spin; + GtkWidget *rect_y_waste_spin; + GtkWidget *rect_margin_spin; + GtkWidget *rect_w_units_label; + GtkWidget *rect_h_units_label; + GtkWidget *rect_r_units_label; + GtkWidget *rect_x_waste_units_label; + GtkWidget *rect_y_waste_units_label; + GtkWidget *rect_margin_units_label; + + /* Label size (round) page controls */ + GtkWidget *round_image; + GtkWidget *round_r_spin; + GtkWidget *round_waste_spin; + GtkWidget *round_margin_spin; + GtkWidget *round_r_units_label; + GtkWidget *round_waste_units_label; + GtkWidget *round_margin_units_label; + + /* Label size (cd) page controls */ + GtkWidget *cd_image; + GtkWidget *cd_radius_spin; + GtkWidget *cd_hole_spin; + GtkWidget *cd_w_spin; + GtkWidget *cd_h_spin; + GtkWidget *cd_waste_spin; + GtkWidget *cd_margin_spin; + GtkWidget *cd_radius_units_label; + GtkWidget *cd_hole_units_label; + GtkWidget *cd_w_units_label; + GtkWidget *cd_h_units_label; + GtkWidget *cd_waste_units_label; + GtkWidget *cd_margin_units_label; + + /* Number of layouts controls */ + GtkWidget *nlayouts_image1; + GtkWidget *nlayouts_image2; + GtkWidget *nlayouts_spin; + + /* Layout page controls */ + GtkWidget *layout1_head_label; + GtkWidget *layout1_nx_spin; + GtkWidget *layout1_ny_spin; + GtkWidget *layout1_x0_spin; + GtkWidget *layout1_y0_spin; + GtkWidget *layout1_dx_spin; + GtkWidget *layout1_dy_spin; + GtkWidget *layout2_head_label; + GtkWidget *layout2_nx_spin; + GtkWidget *layout2_ny_spin; + GtkWidget *layout2_x0_spin; + GtkWidget *layout2_y0_spin; + GtkWidget *layout2_dx_spin; + GtkWidget *layout2_dy_spin; + GtkWidget *layout_x0_units_label; + GtkWidget *layout_y0_units_label; + GtkWidget *layout_dx_units_label; + GtkWidget *layout_dy_units_label; + GtkWidget *mini_preview_vbox; + GtkWidget *layout_mini_preview; + GtkWidget *layout_test_button; + + /* Units related stuff */ + const gchar *units_string; + gdouble units_per_point; + gdouble climb_rate; + gint digits; + + /* Prevent recursion */ + gboolean stop_signals; +}; + +/* Page numbers for traversing GtkAssistant */ +enum { + START_PAGE_NUM = 0, + NAME_PAGE_NUM, + PG_SIZE_PAGE_NUM, + SHAPE_PAGE_NUM, + RECT_SIZE_PAGE_NUM, + ROUND_SIZE_PAGE_NUM, + CD_SIZE_PAGE_NUM, + NLAYOUTS_PAGE_NUM, + LAYOUT_PAGE_NUM, + FINISH_PAGE_NUM +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_template_designer_finalize (GObject *object); +static void gl_template_designer_construct (glTemplateDesigner *dialog); + +static void construct_start_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void construct_name_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void construct_pg_size_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void construct_shape_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void construct_rect_size_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void construct_round_size_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void construct_cd_size_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void construct_nlayouts_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void construct_layout_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void construct_finish_page (glTemplateDesigner *dialog, + GdkPixbuf *logo); + +static void cancel_cb (glTemplateDesigner *dialog); +static void apply_cb (glTemplateDesigner *dialog); +static void close_cb (glTemplateDesigner *dialog); +static void prepare_cb (glTemplateDesigner *dialog, + GtkWidget *page); + +static gint forward_page_function (gint current_page, + gpointer data); + +static void name_page_changed_cb (glTemplateDesigner *dialog); + +static void pg_size_page_changed_cb (glTemplateDesigner *dialog); + +static void rect_size_page_prepare_cb (glTemplateDesigner *dialog); + +static void round_size_page_prepare_cb (glTemplateDesigner *dialog); + +static void cd_size_page_prepare_cb (glTemplateDesigner *dialog); + +static void layout_page_prepare_cb (glTemplateDesigner *dialog); + +static void layout_page_changed_cb (glTemplateDesigner *dialog); + +static void print_test_cb (glTemplateDesigner *dialog); + +static lglTemplate *build_template (glTemplateDesigner *dialog); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glTemplateDesigner, gl_template_designer, GTK_TYPE_ASSISTANT); + + +static void +gl_template_designer_class_init (glTemplateDesignerClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_template_designer_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_template_designer_finalize; +} + + +static void +gl_template_designer_init (glTemplateDesigner *dialog) +{ + static gchar *object_ids[] = { "start_page", + "name_page", + "pg_size_page", + "shape_page", + "rect_size_page", + "round_size_page", + "cd_size_page", + "nlayouts_page", + "layout_page", + "finish_page", + "adjustment1", "adjustment2", "adjustment3", + "adjustment4", "adjustment5", "adjustment6", + "adjustment7", "adjustment8", "adjustment9", + "adjustment10", "adjustment11", "adjustment12", + "adjustment13", "adjustment14", "adjustment15", + "adjustment16", "adjustment17", "adjustment18", + "adjustment19", "adjustment20", "adjustment21", + "adjustment22", "adjustment23", "adjustment24", + "adjustment25", "adjustment26", "adjustment27", + "adjustment28", "adjustment29", "adjustment30", + NULL }; + GError *error = NULL; + + gl_debug (DEBUG_TEMPLATE, "START"); + + dialog->priv = g_new0 (glTemplateDesignerPrivate, 1); + + dialog->priv->builder = gtk_builder_new (); + gtk_builder_add_objects_from_file (dialog->priv->builder, + GLABELS_BUILDER_DIR "template-designer.builder", + object_ids, + &error); + if (error) { + g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); + g_error_free (error); + return; + } + + gl_debug (DEBUG_TEMPLATE, "END"); + + return; +} + + +static void +gl_template_designer_finalize (GObject *object) +{ + glTemplateDesigner* dialog = GL_TEMPLATE_DESIGNER (object); + + gl_debug (DEBUG_TEMPLATE, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_TEMPLATE_DESIGNER (dialog)); + g_return_if_fail (dialog->priv != NULL); + + if (dialog->priv->builder) + { + g_object_unref (dialog->priv->builder); + } + g_free (dialog->priv); + + G_OBJECT_CLASS (gl_template_designer_parent_class)->finalize (object); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*****************************************************************************/ +/* NEW preferences dialog. */ +/*****************************************************************************/ +GtkWidget* +gl_template_designer_new (GtkWindow *parent) +{ + GtkWidget *dialog; + + gl_debug (DEBUG_TEMPLATE, "START"); + + dialog = GTK_WIDGET (g_object_new (GL_TYPE_TEMPLATE_DESIGNER, NULL)); + + if (parent) + gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); + + gl_template_designer_construct (GL_TEMPLATE_DESIGNER(dialog)); + + + gl_debug (DEBUG_TEMPLATE, "END"); + + return dialog; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Construct composite widget. */ +/*---------------------------------------------------------------------------*/ +static void +gl_template_designer_construct (glTemplateDesigner *dialog) +{ + GdkPixbuf *logo; + + gl_debug (DEBUG_TEMPLATE, "START"); + + g_return_if_fail (dialog && GL_IS_TEMPLATE_DESIGNER (dialog)); + g_return_if_fail (dialog->priv != NULL); + + /* Initialize units stuff from prefs */ + dialog->priv->units_string = gl_prefs_get_units_string (); + dialog->priv->units_per_point = gl_prefs_get_units_per_point (); + dialog->priv->climb_rate = gl_prefs_get_units_step_size (); + dialog->priv->digits = gl_prefs_get_units_precision (); + + gtk_window_set_title (GTK_WINDOW(dialog), _("gLabels Template Designer")); + + logo = gdk_pixbuf_new_from_file (ICON_PIXMAP, NULL); + + /* Costruct and append pages (must be same order as PAGE_NUM enums. */ + construct_start_page (dialog, logo); + construct_name_page (dialog, logo); + construct_pg_size_page (dialog, logo); + construct_shape_page (dialog, logo); + construct_rect_size_page (dialog, logo); + construct_round_size_page (dialog, logo); + construct_cd_size_page (dialog, logo); + construct_nlayouts_page (dialog, logo); + construct_layout_page (dialog, logo); + construct_finish_page (dialog, logo); + + gtk_assistant_set_forward_page_func (GTK_ASSISTANT (dialog), + forward_page_function, + dialog, + NULL); + + /* signals */ + g_signal_connect_swapped (G_OBJECT(dialog), "cancel", + G_CALLBACK(cancel_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog), "apply", + G_CALLBACK(apply_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog), "close", + G_CALLBACK(close_cb), dialog); + g_signal_connect (G_OBJECT(dialog), "prepare", + G_CALLBACK(prepare_cb), NULL); + + gtk_widget_show_all (GTK_WIDGET(dialog)); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct start page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_start_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "start_page", &dialog->priv->start_page, + NULL); + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->start_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->start_page, + _("Welcome")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->start_page, + logo); + gtk_assistant_set_page_type (GTK_ASSISTANT (dialog), + dialog->priv->start_page, + GTK_ASSISTANT_PAGE_INTRO); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->start_page, + TRUE); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct name page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_name_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "name_page", &dialog->priv->name_page, + "brand_entry", &dialog->priv->brand_entry, + "part_num_entry", &dialog->priv->part_num_entry, + "name_warning_image", &dialog->priv->name_warning_image, + "name_warning_label", &dialog->priv->name_warning_label, + "description_entry", &dialog->priv->description_entry, + NULL); + + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->name_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->name_page, + _("Name and Description")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->name_page, + logo); + + /* Connect a handler that listens for changes in these widgets */ + /* This controls whether we can progress to the next page. */ + g_signal_connect_swapped (G_OBJECT(dialog->priv->brand_entry), "changed", + G_CALLBACK(name_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->part_num_entry), "changed", + G_CALLBACK(name_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->description_entry), "changed", + G_CALLBACK(name_page_changed_cb), dialog); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct page size page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_pg_size_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + GList *page_sizes; + const gchar *default_page_size_id; + gchar *default_page_size_name; + + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "pg_size_page", &dialog->priv->pg_size_page, + "pg_size_combo", &dialog->priv->pg_size_combo, + "pg_w_spin", &dialog->priv->pg_w_spin, + "pg_h_spin", &dialog->priv->pg_h_spin, + "pg_w_units_label", &dialog->priv->pg_w_units_label, + "pg_h_units_label", &dialog->priv->pg_h_units_label, + NULL); + + + gl_combo_util_add_text_model (GTK_COMBO_BOX (dialog->priv->pg_size_combo)); + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->pg_size_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->pg_size_page, + _("Page Size")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->pg_size_page, + logo); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->pg_size_page, + TRUE); + + /* Load page size combo */ + page_sizes = lgl_db_get_paper_name_list (); + gl_combo_util_set_strings (GTK_COMBO_BOX (dialog->priv->pg_size_combo), page_sizes); + lgl_db_free_paper_name_list (page_sizes); + default_page_size_id = gl_prefs_get_page_size (); + default_page_size_name = lgl_db_lookup_paper_name_from_id (default_page_size_id); + gl_combo_util_set_active_text (GTK_COMBO_BOX (dialog->priv->pg_size_combo), default_page_size_name); + g_free (default_page_size_name); + + /* Apply units to spinbuttons and units labels. */ + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->pg_w_units_label), + dialog->priv->units_string); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->pg_w_spin), + 0.0, MAX_PAGE_DIM_POINTS*dialog->priv->units_per_point); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->pg_h_units_label), + dialog->priv->units_string); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->pg_h_spin), + 0.0, MAX_PAGE_DIM_POINTS*dialog->priv->units_per_point); + + /* Connect a handler that listens for changes in these widgets */ + /* This controls sensitivity of related widgets. */ + g_signal_connect_swapped (G_OBJECT(dialog->priv->pg_size_combo), "changed", + G_CALLBACK(pg_size_page_changed_cb), dialog); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct shape page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_shape_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "shape_page", &dialog->priv->shape_page, + "shape_rect_radio", &dialog->priv->shape_rect_radio, + "shape_round_radio", &dialog->priv->shape_round_radio, + "shape_cd_radio", &dialog->priv->shape_cd_radio, + NULL); + + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->shape_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->shape_page, + _("Label or Card Shape")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->shape_page, + logo); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->shape_page, + TRUE); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct rect size page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_rect_size_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + GdkPixbuf *pixbuf; + + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "rect_size_page", &dialog->priv->rect_size_page, + "rect_image", &dialog->priv->rect_image, + "rect_w_spin", &dialog->priv->rect_w_spin, + "rect_h_spin", &dialog->priv->rect_h_spin, + "rect_r_spin", &dialog->priv->rect_r_spin, + "rect_x_waste_spin", &dialog->priv->rect_x_waste_spin, + "rect_y_waste_spin", &dialog->priv->rect_y_waste_spin, + "rect_margin_spin", &dialog->priv->rect_margin_spin, + "rect_w_units_label", &dialog->priv->rect_w_units_label, + "rect_h_units_label", &dialog->priv->rect_h_units_label, + "rect_r_units_label", &dialog->priv->rect_r_units_label, + "rect_x_waste_units_label", &dialog->priv->rect_x_waste_units_label, + "rect_y_waste_units_label", &dialog->priv->rect_y_waste_units_label, + "rect_margin_units_label", &dialog->priv->rect_margin_units_label, + NULL); + + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->rect_size_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->rect_size_page, + _("Label or Card Size")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->rect_size_page, + logo); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->rect_size_page, + TRUE); + + /* Initialize illustration. */ + pixbuf = gdk_pixbuf_new_from_file (EX_RECT_IMAGE, NULL); + gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->rect_image), pixbuf); + + /* Apply units to spinbuttons and units labels. */ + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->rect_w_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->rect_h_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->rect_r_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->rect_x_waste_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->rect_y_waste_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->rect_margin_units_label), + dialog->priv->units_string); + + /* Load some realistic defaults. */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin), + DEFAULT_RECT_W * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin), + DEFAULT_RECT_H * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin), + DEFAULT_RECT_R * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin), + DEFAULT_RECT_WASTE * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin), + DEFAULT_RECT_WASTE * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin), + DEFAULT_MARGIN * dialog->priv->units_per_point); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct round size page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_round_size_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + GdkPixbuf *pixbuf; + + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "round_size_page", &dialog->priv->round_size_page, + "round_image", &dialog->priv->round_image, + "round_r_spin", &dialog->priv->round_r_spin, + "round_waste_spin", &dialog->priv->round_waste_spin, + "round_margin_spin", &dialog->priv->round_margin_spin, + "round_r_units_label", &dialog->priv->round_r_units_label, + "round_waste_units_label", &dialog->priv->round_waste_units_label, + "round_margin_units_label", &dialog->priv->round_margin_units_label, + NULL); + + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->round_size_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->round_size_page, + _("Label Size (round)")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->round_size_page, + logo); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->round_size_page, + TRUE); + + /* Initialize illustration. */ + pixbuf = gdk_pixbuf_new_from_file (EX_ROUND_IMAGE, NULL); + gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->round_image), pixbuf); + + /* Apply units to spinbuttons and units labels. */ + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->round_r_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->round_r_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->round_r_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->round_waste_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->round_margin_units_label), + dialog->priv->units_string); + + /* Load some realistic defaults. */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin), + DEFAULT_ROUND_R * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin), + DEFAULT_ROUND_WASTE * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin), + DEFAULT_MARGIN * dialog->priv->units_per_point); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct CD/DVD size page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_cd_size_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + GdkPixbuf *pixbuf; + + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "cd_size_page", &dialog->priv->cd_size_page, + "cd_image", &dialog->priv->cd_image, + "cd_radius_spin", &dialog->priv->cd_radius_spin, + "cd_hole_spin", &dialog->priv->cd_hole_spin, + "cd_w_spin", &dialog->priv->cd_w_spin, + "cd_h_spin", &dialog->priv->cd_h_spin, + "cd_waste_spin", &dialog->priv->cd_waste_spin, + "cd_margin_spin", &dialog->priv->cd_margin_spin, + "cd_radius_units_label", &dialog->priv->cd_radius_units_label, + "cd_hole_units_label", &dialog->priv->cd_hole_units_label, + "cd_w_units_label", &dialog->priv->cd_w_units_label, + "cd_h_units_label", &dialog->priv->cd_h_units_label, + "cd_waste_units_label", &dialog->priv->cd_waste_units_label, + "cd_margin_units_label", &dialog->priv->cd_margin_units_label, + NULL); + + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->cd_size_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->cd_size_page, + _("Label Size (CD/DVD)")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->cd_size_page, + logo); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->cd_size_page, + TRUE); + + /* Initialize illustration. */ + pixbuf = gdk_pixbuf_new_from_file (EX_CD_IMAGE, NULL); + gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->cd_image), pixbuf); + + /* Apply units to spinbuttons and units labels. */ + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->cd_radius_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->cd_hole_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->cd_w_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->cd_h_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->cd_waste_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->cd_margin_units_label), + dialog->priv->units_string); + + /* Load some realistic defaults. */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin), + DEFAULT_CD_RADIUS * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin), + DEFAULT_CD_HOLE * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin), + DEFAULT_CD_WASTE * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin), + DEFAULT_MARGIN * dialog->priv->units_per_point); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct number of layouts page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_nlayouts_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + GdkPixbuf *pixbuf; + + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "nlayouts_page", &dialog->priv->nlayouts_page, + "nlayouts_image1", &dialog->priv->nlayouts_image1, + "nlayouts_image2", &dialog->priv->nlayouts_image2, + "nlayouts_spin", &dialog->priv->nlayouts_spin, + NULL); + + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->nlayouts_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->nlayouts_page, + _("Number of Layouts")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->nlayouts_page, + logo); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->nlayouts_page, + TRUE); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->nlayouts_spin), + 1, 2); + + + /* Initialize illustrations. */ + pixbuf = gdk_pixbuf_new_from_file (EX_NLAYOUTS_IMAGE1, NULL); + gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->nlayouts_image1), pixbuf); + pixbuf = gdk_pixbuf_new_from_file (EX_NLAYOUTS_IMAGE2, NULL); + gtk_image_set_from_pixbuf (GTK_IMAGE(dialog->priv->nlayouts_image2), pixbuf); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct layout page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_layout_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "layout_page", &dialog->priv->layout_page, + "layout1_head_label", &dialog->priv->layout1_head_label, + "layout1_nx_spin", &dialog->priv->layout1_nx_spin, + "layout1_ny_spin", &dialog->priv->layout1_ny_spin, + "layout1_x0_spin", &dialog->priv->layout1_x0_spin, + "layout1_y0_spin", &dialog->priv->layout1_y0_spin, + "layout1_dx_spin", &dialog->priv->layout1_dx_spin, + "layout1_dy_spin", &dialog->priv->layout1_dy_spin, + "layout2_head_label", &dialog->priv->layout2_head_label, + "layout2_nx_spin", &dialog->priv->layout2_nx_spin, + "layout2_ny_spin", &dialog->priv->layout2_ny_spin, + "layout2_x0_spin", &dialog->priv->layout2_x0_spin, + "layout2_y0_spin", &dialog->priv->layout2_y0_spin, + "layout2_dx_spin", &dialog->priv->layout2_dx_spin, + "layout2_dy_spin", &dialog->priv->layout2_dy_spin, + "layout_x0_units_label", &dialog->priv->layout_x0_units_label, + "layout_y0_units_label", &dialog->priv->layout_y0_units_label, + "layout_dx_units_label", &dialog->priv->layout_dx_units_label, + "layout_dy_units_label", &dialog->priv->layout_dy_units_label, + "mini_preview_vbox", &dialog->priv->mini_preview_vbox, + "layout_test_button", &dialog->priv->layout_test_button, + NULL); + + dialog->priv->layout_mini_preview = gl_mini_preview_new (175, 200); + gtk_container_add (GTK_CONTAINER (dialog->priv->mini_preview_vbox), + dialog->priv->layout_mini_preview); + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->layout_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->layout_page, + _("Layout(s)")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->layout_page, + logo); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->layout_page, + TRUE); + + /* Apply units to spinbuttons and units labels. */ + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->layout_x0_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->layout_y0_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->layout_dx_units_label), + dialog->priv->units_string); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin), + dialog->priv->digits); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin), + dialog->priv->climb_rate, 10.0*dialog->priv->climb_rate); + gtk_label_set_text (GTK_LABEL(dialog->priv->layout_dy_units_label), + dialog->priv->units_string); + + /* Connect a handler that listens for changes in these widgets */ + /* This controls sensitivity of related widgets. */ + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_nx_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_ny_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_x0_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_y0_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_dx_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout1_dy_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_nx_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_ny_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_x0_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_y0_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_dx_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout2_dy_spin), "changed", + G_CALLBACK(layout_page_changed_cb), dialog); + + + /* Print button */ + g_signal_connect_swapped (G_OBJECT(dialog->priv->layout_test_button), "clicked", + G_CALLBACK(print_test_cb), dialog); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct finish page. */ +/*--------------------------------------------------------------------------*/ +static void +construct_finish_page (glTemplateDesigner *dialog, + GdkPixbuf *logo) +{ + gl_debug (DEBUG_TEMPLATE, "START"); + + gl_builder_util_get_widgets (dialog->priv->builder, + "finish_page", &dialog->priv->finish_page, + NULL); + + + gtk_assistant_append_page (GTK_ASSISTANT (dialog), + dialog->priv->finish_page); + + gtk_assistant_set_page_title (GTK_ASSISTANT (dialog), + dialog->priv->finish_page, + _("Design Completed")); + gtk_assistant_set_page_header_image (GTK_ASSISTANT (dialog), + dialog->priv->finish_page, + logo); + gtk_assistant_set_page_type (GTK_ASSISTANT (dialog), + dialog->priv->finish_page, + GTK_ASSISTANT_PAGE_CONFIRM); + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->finish_page, + TRUE); + + gl_debug (DEBUG_TEMPLATE, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. cancel callback. */ +/*--------------------------------------------------------------------------*/ +static void +cancel_cb (glTemplateDesigner *dialog) +{ + + gtk_widget_destroy (GTK_WIDGET(dialog)); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. apply callback */ +/*--------------------------------------------------------------------------*/ +static void +apply_cb (glTemplateDesigner *dialog) +{ + lglTemplate *template; + gchar *name; + + template = build_template (dialog); + lgl_db_register_template (template); + name = lgl_template_get_name (template); + gl_mini_preview_pixbuf_cache_add_by_name (name); + g_free (name); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. close callback */ +/*--------------------------------------------------------------------------*/ +static void +close_cb (glTemplateDesigner *dialog) +{ + + gtk_widget_destroy (GTK_WIDGET(dialog)); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. prepare page callback */ +/*--------------------------------------------------------------------------*/ +static void +prepare_cb (glTemplateDesigner *dialog, + GtkWidget *page) +{ + gint page_num; + + page_num = gtk_assistant_get_current_page (GTK_ASSISTANT (dialog)); + + switch (page_num) + { + + case NAME_PAGE_NUM: + name_page_changed_cb (dialog); /* Use to prepare */ + break; + + case PG_SIZE_PAGE_NUM: + pg_size_page_changed_cb (dialog); /* Use to prepare */ + break; + + case RECT_SIZE_PAGE_NUM: + rect_size_page_prepare_cb (dialog); + break; + + case ROUND_SIZE_PAGE_NUM: + round_size_page_prepare_cb (dialog); + break; + + case CD_SIZE_PAGE_NUM: + cd_size_page_prepare_cb (dialog); + break; + + case LAYOUT_PAGE_NUM: + layout_page_prepare_cb (dialog); + break; + + default: + /* No preparation needed */ + break; + + } +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Handle non-linear forward traversal. */ +/*--------------------------------------------------------------------------*/ +static gint +forward_page_function (gint current_page, + gpointer data) +{ + glTemplateDesigner *dialog = GL_TEMPLATE_DESIGNER (data); + + switch (current_page) + { + case START_PAGE_NUM: + return NAME_PAGE_NUM; + + case NAME_PAGE_NUM: + return PG_SIZE_PAGE_NUM; + + case PG_SIZE_PAGE_NUM: + return SHAPE_PAGE_NUM; + + case SHAPE_PAGE_NUM: + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_rect_radio))) { + return RECT_SIZE_PAGE_NUM; + } + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_round_radio))) { + return ROUND_SIZE_PAGE_NUM; + } + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_cd_radio))) { + return CD_SIZE_PAGE_NUM; + } + break; + + case RECT_SIZE_PAGE_NUM: + case ROUND_SIZE_PAGE_NUM: + case CD_SIZE_PAGE_NUM: + return NLAYOUTS_PAGE_NUM; + + case NLAYOUTS_PAGE_NUM: + return LAYOUT_PAGE_NUM; + + case LAYOUT_PAGE_NUM: + return FINISH_PAGE_NUM; + + case FINISH_PAGE_NUM: + default: + return -1; + } + + return -1; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Widget on name page "changed" callback. */ +/*--------------------------------------------------------------------------*/ +static void +name_page_changed_cb (glTemplateDesigner *dialog) +{ + gchar *brand, *part_num, *desc; + + brand = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->brand_entry), 0, -1)); + part_num = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->part_num_entry), 0, -1)); + desc = gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->description_entry), 0, -1); + + + if (brand && brand[0] && part_num && part_num[0] && + lgl_db_does_template_exist (brand, part_num)) + { + gtk_image_set_from_stock (GTK_IMAGE (dialog->priv->name_warning_image), + GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_BUTTON); + gtk_label_set_markup (GTK_LABEL (dialog->priv->name_warning_label), + _("Brand and part# match an existing template!")); + } + else + { + gtk_image_clear (GTK_IMAGE (dialog->priv->name_warning_image)); + gtk_label_set_text (GTK_LABEL (dialog->priv->name_warning_label), ""); + } + + if (brand && brand[0] && part_num && part_num[0] && desc && desc[0] && + !lgl_db_does_template_exist (brand, part_num)) + { + + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->name_page, + TRUE); + } + else + { + + gtk_assistant_set_page_complete (GTK_ASSISTANT (dialog), + dialog->priv->name_page, + FALSE); + } + + g_free (brand); + g_free (part_num); + g_free (desc); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Widget on page size page "changed" callback. */ +/*--------------------------------------------------------------------------*/ +static void +pg_size_page_changed_cb (glTemplateDesigner *dialog) +{ + gchar *page_size_name; + lglPaper *paper; + + + page_size_name = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->priv->pg_size_combo)); + + if (page_size_name && strlen(page_size_name)) { + + paper = lgl_db_lookup_paper_from_name (page_size_name); + + + if ( g_ascii_strcasecmp (paper->id, "Other") == 0 ) { + gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_spin), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_h_spin), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_units_label), + TRUE); + gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_h_units_label), + TRUE); + + } else { + gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_spin), FALSE); + gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_h_spin), FALSE); + gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_w_units_label), + FALSE); + gtk_widget_set_sensitive (GTK_WIDGET(dialog->priv->pg_h_units_label), + FALSE); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin), + paper->width * dialog->priv->units_per_point); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin), + paper->height * dialog->priv->units_per_point); + } + + lgl_paper_free (paper); + } + + g_free (page_size_name); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare rectangular size page. */ +/*--------------------------------------------------------------------------*/ +static void +rect_size_page_prepare_cb (glTemplateDesigner *dialog) +{ + gdouble max_w, max_h; + gdouble w, h, r, x_waste, y_waste, margin; + + /* Limit label size based on already chosen page size. */ + max_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)); + max_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)); + + w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin)); + h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin)); + r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin)); + x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin)); + y_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin)); + margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin)); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_w_spin), + dialog->priv->climb_rate, max_w); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_h_spin), + dialog->priv->climb_rate, max_h); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_r_spin), + 0.0, MIN(max_w, max_h)/2.0); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_x_waste_spin), + 0.0, MIN(max_w, max_h)/4.0); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_y_waste_spin), + 0.0, MIN(max_w, max_h)/4.0); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->rect_margin_spin), + 0.0, MIN(max_w, max_h)/4.0); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin), w); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin), h); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin), r); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin), x_waste); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin), y_waste); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin), margin); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare round size page. */ +/*--------------------------------------------------------------------------*/ +static void +round_size_page_prepare_cb (glTemplateDesigner *dialog) +{ + gdouble max_w, max_h; + gdouble r, waste, margin; + + /* Limit label size based on already chosen page size. */ + max_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)); + max_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)); + + r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin)); + waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin)); + margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin)); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->round_r_spin), + dialog->priv->climb_rate, MIN(max_w, max_h)/2.0); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->round_waste_spin), + 0.0, MIN(max_w, max_h)/4.0); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->round_margin_spin), + 0.0, MIN(max_w, max_h)/4.0); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin), r); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin), waste); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin), margin); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare cd/dvd size page. */ +/*--------------------------------------------------------------------------*/ +static void +cd_size_page_prepare_cb (glTemplateDesigner *dialog) +{ + gdouble max_w, max_h; + gdouble radius, hole, w, h, waste, margin; + + /* Limit label size based on already chosen page size. */ + max_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)); + max_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)); + + radius = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin)); + hole = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin)); + w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin)); + h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin)); + waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin)); + margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin)); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_radius_spin), + dialog->priv->climb_rate, MIN(max_w, max_h)/2.0); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_hole_spin), + dialog->priv->climb_rate, MIN(max_w, max_h)/2.0); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_w_spin), + 0.0, max_w); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_h_spin), + 0.0, max_h); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_waste_spin), + 0.0, MIN(max_w, max_h)/4.0); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->cd_margin_spin), + 0.0, MIN(max_w, max_h)/4.0); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin), radius); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin), hole); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin), w); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin), h); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin), waste); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin), margin); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Prepare Layout page cb. */ +/*--------------------------------------------------------------------------*/ +static void +layout_page_prepare_cb (glTemplateDesigner *dialog) +{ + gdouble page_w, page_h; + gdouble w=0, h=0, x_waste=0, y_waste=0; + gint max_nx, max_ny; + gint nlayouts; + gdouble nx_1, ny_1, x0_1, y0_1, dx_1, dy_1; + gdouble nx_2, ny_2, x0_2, y0_2, dx_2, dy_2; + lglTemplate *template; + + if (dialog->priv->stop_signals) return; + dialog->priv->stop_signals = TRUE; + + + /* Limit ranges based on already chosen page and label sizes. */ + page_w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)); + page_h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)); + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_rect_radio))) { + w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin)); + h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin)); + x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin)); + y_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin)); + } + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_round_radio))) { + w = 2*gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin)); + h = w; + x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin)); + y_waste = x_waste; + } + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_cd_radio))) { + w = 2*gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin)); + h = w; + x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin)); + y_waste = x_waste; + } + max_nx = MAX (floor (page_w/(w + 2*x_waste) + DELTA), 1.0); + max_ny = MAX (floor (page_h/(h + 2*y_waste) + DELTA), 1.0); + + nx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_nx_spin)); + ny_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_ny_spin)); + x0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin)); + y0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin)); + dx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin)); + dy_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin)); + nx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_nx_spin)); + ny_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_ny_spin)); + x0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin)); + y0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin)); + dx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin)); + dy_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin)); + + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_nx_spin), + 1, max_nx); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_ny_spin), + 1, max_ny); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_x0_spin), + x_waste, page_w - w - x_waste); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_y0_spin), + y_waste, page_h - h - y_waste); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_dx_spin), + w + 2*x_waste, page_w - w - 2*x_waste); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout1_dy_spin), + h + 2*y_waste, page_h - h - 2*y_waste); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_nx_spin), + 1, max_nx); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_ny_spin), + 1, max_ny); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_x0_spin), + x_waste, page_w - w - x_waste); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_y0_spin), + y_waste, page_h - h - y_waste); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_dx_spin), + w + 2*x_waste, page_w - w - 2*x_waste); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (dialog->priv->layout2_dy_spin), + h + 2*y_waste, page_h - h - 2*y_waste); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_nx_spin), nx_1); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_ny_spin), ny_1); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin), x0_1); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin), y0_1); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin), dx_1); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin), dy_1); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_nx_spin), nx_2); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_ny_spin), ny_2); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin), x0_2); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin), y0_2); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin), dx_2); + gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin), dy_2); + + /* Set visibility of layout2 widgets as appropriate. */ + nlayouts = gtk_spin_button_get_value (GTK_SPIN_BUTTON (dialog->priv->nlayouts_spin)); + if ( nlayouts == 1 ) + { + gtk_widget_hide (dialog->priv->layout1_head_label); + gtk_widget_hide (dialog->priv->layout2_head_label); + gtk_widget_hide (dialog->priv->layout2_nx_spin); + gtk_widget_hide (dialog->priv->layout2_ny_spin); + gtk_widget_hide (dialog->priv->layout2_x0_spin); + gtk_widget_hide (dialog->priv->layout2_y0_spin); + gtk_widget_hide (dialog->priv->layout2_dx_spin); + gtk_widget_hide (dialog->priv->layout2_dy_spin); + } + else + { + gtk_widget_show (dialog->priv->layout1_head_label); + gtk_widget_show (dialog->priv->layout2_head_label); + gtk_widget_show (dialog->priv->layout2_nx_spin); + gtk_widget_show (dialog->priv->layout2_ny_spin); + gtk_widget_show (dialog->priv->layout2_x0_spin); + gtk_widget_show (dialog->priv->layout2_y0_spin); + gtk_widget_show (dialog->priv->layout2_dx_spin); + gtk_widget_show (dialog->priv->layout2_dy_spin); + } + + template = build_template (dialog); + gl_mini_preview_set_template (GL_MINI_PREVIEW(dialog->priv->layout_mini_preview), + template); + lgl_template_free (template); + + + dialog->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Layout page widget changed cb. */ +/*--------------------------------------------------------------------------*/ +static void +layout_page_changed_cb (glTemplateDesigner *dialog) +{ + lglTemplate *template; + + if (dialog->priv->stop_signals) return; + dialog->priv->stop_signals = TRUE; + + template = build_template (dialog); + + gl_mini_preview_set_template (GL_MINI_PREVIEW(dialog->priv->layout_mini_preview), + template); + + lgl_template_free (template); + + dialog->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Print test sheet callback. */ +/*--------------------------------------------------------------------------*/ +static void +print_test_cb (glTemplateDesigner *dialog) +{ + GObject *label; + lglTemplate *template; + glPrintOpDialog *print_op; + + label = gl_label_new (); + + template = build_template (dialog); + gl_label_set_template (GL_LABEL(label), template); + + print_op = gl_print_op_dialog_new (GL_LABEL(label)); + gl_print_op_force_outline (GL_PRINT_OP (print_op)); + gtk_print_operation_run (GTK_PRINT_OPERATION (print_op), + GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, + GTK_WINDOW (dialog), + NULL); + + lgl_template_free (template); + g_object_unref (G_OBJECT(label)); +} + + +/*--------------------------------------------------------------------------*/ +/* Build a template based on current assistant settings. */ +/*--------------------------------------------------------------------------*/ +static lglTemplate * +build_template (glTemplateDesigner *dialog) +{ + gdouble upp; + gchar *brand, *part_num, *desc; + gchar *page_size_name; + lglPaper *paper; + lglTemplateFrameShape shape; + lglTemplateFrame *frame=NULL; + gdouble w=0, h=0, r=0, radius=0, hole=0, waste=0, x_waste=0, y_waste=0, margin=0; + gint nlayouts; + gdouble nx_1, ny_1, x0_1, y0_1, dx_1, dy_1; + gdouble nx_2, ny_2, x0_2, y0_2, dx_2, dy_2; + lglTemplate *template; + + upp = dialog->priv->units_per_point; + + brand = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->brand_entry), 0, -1)); + part_num = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->part_num_entry), 0, -1)); + desc = gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->description_entry), 0, -1); + + page_size_name = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->priv->pg_size_combo)); + paper = lgl_db_lookup_paper_from_name (page_size_name); + if ( g_ascii_strcasecmp (paper->id, "Other") == 0 ) { + paper->width = + gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_w_spin)) + / upp; + paper->height = + gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->pg_h_spin)) + / upp; + } + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_rect_radio))) { + shape = LGL_TEMPLATE_FRAME_SHAPE_RECT; + w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_w_spin)); + h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_h_spin)); + r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_r_spin)); + x_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_x_waste_spin)); + y_waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_y_waste_spin)); + margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->rect_margin_spin)); + } + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_round_radio))) { + shape = LGL_TEMPLATE_FRAME_SHAPE_ROUND; + r = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_r_spin)); + waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_waste_spin)); + margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->round_margin_spin)); + } + + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->priv->shape_cd_radio))) { + shape = LGL_TEMPLATE_FRAME_SHAPE_CD; + radius = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_radius_spin)); + hole = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_hole_spin)); + w = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_w_spin)); + h = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_h_spin)); + waste = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_waste_spin)); + margin = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->cd_margin_spin)); + } + + nlayouts = gtk_spin_button_get_value (GTK_SPIN_BUTTON (dialog->priv->nlayouts_spin)); + nx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_nx_spin)); + ny_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_ny_spin)); + x0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_x0_spin)); + y0_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_y0_spin)); + dx_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dx_spin)); + dy_1 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout1_dy_spin)); + nx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_nx_spin)); + ny_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_ny_spin)); + x0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_x0_spin)); + y0_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_y0_spin)); + dx_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dx_spin)); + dy_2 = gtk_spin_button_get_value (GTK_SPIN_BUTTON(dialog->priv->layout2_dy_spin)); + + + template = lgl_template_new (brand, part_num, desc, paper->id, paper->width, paper->height); + + switch (shape) { + case LGL_TEMPLATE_FRAME_SHAPE_RECT: + frame = lgl_template_frame_rect_new ("0", + w/upp, h/upp, r/upp, + x_waste/upp, y_waste/upp); + break; + case LGL_TEMPLATE_FRAME_SHAPE_ROUND: + frame = lgl_template_frame_round_new ("0", r/upp, waste/upp); + break; + case LGL_TEMPLATE_FRAME_SHAPE_CD: + frame = lgl_template_frame_cd_new ("0", + radius/upp, hole/upp, + w/upp, h/upp, + waste/upp); + break; + } + lgl_template_add_frame (template, frame); + + lgl_template_frame_add_markup (frame, + lgl_template_markup_margin_new (margin/upp)); + + lgl_template_frame_add_layout (frame, + lgl_template_layout_new (nx_1, ny_1, + x0_1/upp, + y0_1/upp, + dx_1/upp, + dy_1/upp)); + if (nlayouts > 1) { + lgl_template_frame_add_layout (frame, + lgl_template_layout_new (nx_2, ny_2, + x0_2/upp, + y0_2/upp, + dx_2/upp, + dy_2/upp)); + } + + g_free (brand); + g_free (part_num); + g_free (desc); + + g_free (page_size_name); + lgl_paper_free (paper); + + return template; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/template-designer.h b/src/template-designer.h new file mode 100644 index 00000000..a86034c1 --- /dev/null +++ b/src/template-designer.h @@ -0,0 +1,77 @@ +/* + * template-designer.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __TEMPLATE_DESIGNER_H__ +#define __TEMPLATE_DESIGNER_H__ + +#include + +G_BEGIN_DECLS + +#define GL_TYPE_TEMPLATE_DESIGNER (gl_template_designer_get_type ()) +#define GL_TEMPLATE_DESIGNER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_TEMPLATE_DESIGNER, glTemplateDesigner)) +#define GL_TEMPLATE_DESIGNER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_TEMPLATE_DESIGNER, glTemplateDesignerClass)) +#define GL_IS_TEMPLATE_DESIGNER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_TEMPLATE_DESIGNER)) +#define GL_IS_TEMPLATE_DESIGNER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_TEMPLATE_DESIGNER)) +#define GL_TEMPLATE_DESIGNER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_TEMPLATE_DESIGNER, glTemplateDesignerClass)) + + +typedef struct _glTemplateDesigner glTemplateDesigner; +typedef struct _glTemplateDesignerClass glTemplateDesignerClass; + +typedef struct _glTemplateDesignerPrivate glTemplateDesignerPrivate; + +struct _glTemplateDesigner +{ + GtkAssistant parent_instance; + + glTemplateDesignerPrivate *priv; + +}; + +struct _glTemplateDesignerClass +{ + GtkAssistantClass parent_class; +}; + +GType gl_template_designer_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_template_designer_new (GtkWindow *parent); + + +G_END_DECLS + +#endif /* __TEMPLATE_DESIGNER_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/text-node.c b/src/text-node.c new file mode 100644 index 00000000..dc03ca29 --- /dev/null +++ b/src/text-node.c @@ -0,0 +1,374 @@ +/* + * text-node.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "text-node.h" + +#include + +#include "merge.h" + +#include "debug.h" + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static glTextNode *extract_text_node (gchar *text, + gint *n); + +static gboolean is_empty_field (glTextNode *text_node, + glMergeRecord *record); + + +/****************************************************************************/ +/* Expand single node into representative string. */ +/****************************************************************************/ +gchar * +gl_text_node_expand (glTextNode *text_node, + glMergeRecord *record) +{ + gchar *text; + + if (text_node->field_flag) { + if (record == NULL) { + return g_strdup_printf ("${%s}", text_node->data); + } else { + text = gl_merge_eval_key (record, text_node->data); + if (text != NULL) { + return text; + } else { + return g_strdup_printf ("%s", ""); + } + } + } else { + return g_strdup (text_node->data); + } +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Is node a field that evaluates empty? */ +/*--------------------------------------------------------------------------*/ +static gboolean +is_empty_field (glTextNode *text_node, + glMergeRecord *record) +{ + gchar *text; + gboolean ret = FALSE; + + if ( (record != NULL) && text_node->field_flag) { + text = gl_merge_eval_key (record, text_node->data); + if ( (text == NULL) || (text[0] == 0) ) { + ret = TRUE; + } + g_free (text); + } + + return ret; +} + + +/****************************************************************************/ +/* 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, "${", strlen ("${")) == 0) { + /* We are at the beginning of a "FIELD" node */ + text_node->field_flag = TRUE; + *n = strlen ("${"); + 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, "${", strlen ("${")) == 0) + break; + if (*p == '\n') + break; + } + text_node->data = g_strndup (text, *n); + } + + return text_node; +} + + +/****************************************************************************/ +/* Copy a single text node. */ +/****************************************************************************/ +glTextNode * +gl_text_node_dup (glTextNode *src) +{ + glTextNode *dst; + + if ( src == NULL ) return NULL; + + dst = g_new0 (glTextNode, 1); + + dst->field_flag = src->field_flag; + dst->data = g_strdup (src->data); + + return dst; +} + + +/****************************************************************************/ +/* Free a single text node. */ +/****************************************************************************/ +void +gl_text_node_free (glTextNode **text_node) +{ + if ( *text_node == NULL ) return; + + g_free ((*text_node)->data); + (*text_node)->data = NULL; + g_free (*text_node); + *text_node = NULL; +} + + +/****************************************************************************/ +/* Compare 2 text nodes for equality. */ +/****************************************************************************/ +gboolean +gl_text_node_equal (glTextNode *text_node1, + glTextNode *text_node2) +{ + /* First take care of the case of either or both being NULL. */ + if ( text_node1 == NULL ) { + return ( text_node2 == NULL ); + } else { + if ( text_node2 == NULL ) { + return FALSE; + } + } + + /* Bail if field flags differ. */ + if ( text_node1->field_flag != text_node2->field_flag ) { + return FALSE; + } + + /* Now take care of the case of either or both data fields being NULL. */ + if ( text_node1->data == NULL ) { + return ( text_node2->data == NULL ); + } else { + if ( text_node2->data == NULL ) { + return FALSE; + } + } + + /* Field flags are identical, so now compare the data. */ + return (strcmp (text_node1->data, text_node2->data) == 0); +} + + +/****************************************************************************/ +/* 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) { + + /* special case: something like ${ADDRESS2} = "" on line by itself. */ + /* in such circumstances ignore the line completely. */ + p_node = (GList *)p_line->data; + if (p_node && p_node->next == NULL) { + text_node = (glTextNode *) p_node->data; + if ( is_empty_field (text_node, record) ) { + continue; + } + } + + /* expand each node */ + 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); + } + + /* append newline to each line, except last. */ + if ( p_line->next != NULL ) { + 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; +} + + +/****************************************************************************/ +/* Copy a list of text lines. */ +/****************************************************************************/ +GList * +gl_text_node_lines_dup (GList *src_lines) +{ + GList *dst_lines=NULL; + GList *p_line, *line, *p_node; + glTextNode *node; + + for (p_line = src_lines; p_line != NULL; p_line = p_line->next) + { + line = NULL; + for (p_node = (GList *) p_line->data; p_node != NULL; p_node = p_node->next) + { + node = gl_text_node_dup ((glTextNode *)p_node->data); + line = g_list_append (line, node); + } + dst_lines = g_list_append (dst_lines, line); + } + + return dst_lines; +} + + +/****************************************************************************/ +/* Free a list of text lines. */ +/****************************************************************************/ +void +gl_text_node_lines_free (GList **lines) +{ + GList *p_line, *p_node; + glTextNode *text_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) + { + text_node = (glTextNode *)p_node->data; + p_node->data = NULL; + gl_text_node_free ( &text_node ); + } + 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 ); + + } + } + +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/text-node.h b/src/text-node.h new file mode 100644 index 00000000..68189b6c --- /dev/null +++ b/src/text-node.h @@ -0,0 +1,65 @@ +/* + * text-node.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __TEXT_NODE_H__ +#define __TEXT_NODE_H__ + +#include +#include "merge.h" + +G_BEGIN_DECLS + +typedef struct { + gboolean field_flag; + gchar *data; +} glTextNode; + +gchar *gl_text_node_expand (glTextNode *text_node, + glMergeRecord *record); +glTextNode *gl_text_node_new_from_text (gchar *text); +glTextNode *gl_text_node_dup (glTextNode *text_node); +void gl_text_node_free (glTextNode **text_node); + +gboolean gl_text_node_equal (glTextNode *text_node1, + glTextNode *text_node2); + +gchar *gl_text_node_lines_expand (GList *lines, + glMergeRecord *record); +GList *gl_text_node_lines_new_from_text (gchar *text); +GList *gl_text_node_lines_dup (GList *lines); +void gl_text_node_lines_free (GList **lines); + +/* debug function */ +void gl_text_node_lines_print (GList *lines); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui-commands.c b/src/ui-commands.c new file mode 100644 index 00000000..a8e2bbd3 --- /dev/null +++ b/src/ui-commands.c @@ -0,0 +1,1195 @@ +/* + * ui-commands.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "ui-commands.h" + +#include +#include + +#include "view.h" +#include "file.h" +#include "template-designer.h" +#include "print-op-dialog.h" +#include "prefs.h" +#include "prefs-dialog.h" +#include "recent.h" +#include "debug.h" + + +/****************************************************************************/ +/** File/New command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_new (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_file_new (window); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** File/Properties command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_properties (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_file_properties (GL_VIEW(window->view)->label, window); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** File/Template-Designer command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_template_designer (GtkAction *action, + glWindow *window) +{ + GtkWidget *dialog; + + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + dialog = gl_template_designer_new (GTK_WINDOW(window)); + + gtk_widget_show (dialog); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** File/Open command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_open (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_file_open (window); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** File/Open-Recent command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_open_recent (GtkRecentChooser *chooser, + glWindow *window) +{ + GtkRecentInfo *item; + gchar *utf8_filename; + + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (chooser && GTK_IS_RECENT_CHOOSER(chooser)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + item = gtk_recent_chooser_get_current_item (chooser); + if (!item) + return; + + utf8_filename = gl_recent_get_utf8_filename (item); + + gl_debug (DEBUG_COMMANDS, "Selected %s\n", utf8_filename); + gl_file_open_recent (utf8_filename, window); + + gtk_recent_info_unref (item); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** File/Save command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_save (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_file_save (GL_VIEW(window->view)->label, window); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** File/Save-as command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_save_as (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_file_save_as (GL_VIEW(window->view)->label, window); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** File/Print command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_print (GtkAction *action, + glWindow *window) +{ + glPrintOpDialog *op; + GtkPrintOperationResult result; + + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + op = gl_print_op_dialog_new (GL_VIEW(window->view)->label); + + if (window->print_settings) + { + gl_print_op_set_settings (GL_PRINT_OP (op), window->print_settings); + } + + result = gtk_print_operation_run (GTK_PRINT_OPERATION (op), + GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, + GTK_WINDOW (window), + NULL); + + if ( result == GTK_PRINT_OPERATION_RESULT_APPLY ) + { + gl_print_op_free_settings (window->print_settings); + window->print_settings = gl_print_op_get_settings (GL_PRINT_OP (op)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** File/Close command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_close (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_file_close (window); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** File/Quit command. */ +/****************************************************************************/ +void +gl_ui_cmd_file_quit (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_file_exit (); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** Edit/Cut command. */ +/****************************************************************************/ +void +gl_ui_cmd_edit_cut (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_view_cut (GL_VIEW(window->view)); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** Edit/Copy command. */ +/****************************************************************************/ +void +gl_ui_cmd_edit_copy (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_view_copy (GL_VIEW(window->view)); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** Edit/Paste command. */ +/****************************************************************************/ +void +gl_ui_cmd_edit_paste (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_view_paste (GL_VIEW(window->view)); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** Edit/Delete command. */ +/****************************************************************************/ +void +gl_ui_cmd_edit_delete (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_view_delete_selection (GL_VIEW(window->view)); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** Edit/Select-all command. */ +/****************************************************************************/ +void +gl_ui_cmd_edit_select_all (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_view_select_all (GL_VIEW(window->view)); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** Edit/Unselect-all command. */ +/****************************************************************************/ +void +gl_ui_cmd_edit_unselect_all (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gl_view_unselect_all (GL_VIEW(window->view)); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** Edit/Preferences command. */ +/****************************************************************************/ +void +gl_ui_cmd_edit_preferences (GtkAction *action, + glWindow *window) +{ + static GtkWidget *dialog = NULL; + + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (dialog != NULL) + { + gtk_window_present (GTK_WINDOW (dialog)); + gtk_window_set_transient_for (GTK_WINDOW (dialog), + GTK_WINDOW(window)); + + } else { + + dialog = gl_prefs_dialog_new (GTK_WINDOW(window)); + + g_signal_connect (G_OBJECT (dialog), "destroy", + G_CALLBACK (gtk_widget_destroyed), &dialog); + + gtk_widget_show (dialog); + + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** View/Property-bar-toggle command. */ +/*****************************************************************************/ +void +gl_ui_cmd_view_property_bar_toggle (GtkToggleAction *action, + glWindow *window) +{ + gboolean state; + + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_TOGGLE_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + state = gtk_toggle_action_get_active (action); + + gl_prefs->property_toolbar_visible = state; + if (state) { + gtk_widget_show (GTK_WIDGET (window->property_bar)); + } else { + gtk_widget_hide (GTK_WIDGET (window->property_bar)); + } + gl_prefs_model_save_settings (gl_prefs); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** View/Grid-toggle command. */ +/*****************************************************************************/ +void +gl_ui_cmd_view_grid_toggle (GtkToggleAction *action, + glWindow *window) +{ + gboolean state; + + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_TOGGLE_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + state = gtk_toggle_action_get_active (action); + + if (window->view != NULL) + { + if (state) { + gl_view_show_grid (GL_VIEW(window->view)); + } else { + gl_view_hide_grid (GL_VIEW(window->view)); + } + } + + gl_prefs->grid_visible = state; + gl_prefs_model_save_settings (gl_prefs); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** View/Markup-toggle command. */ +/*****************************************************************************/ +void +gl_ui_cmd_view_markup_toggle (GtkToggleAction *action, + glWindow *window) +{ + gboolean state; + + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_TOGGLE_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + state = gtk_toggle_action_get_active (action); + + if (window->view != NULL) + { + if (state) { + gl_view_show_markup (GL_VIEW(window->view)); + } else { + gl_view_hide_markup (GL_VIEW(window->view)); + } + } + + gl_prefs->markup_visible = state; + gl_prefs_model_save_settings (gl_prefs); + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** View/Zoom-in command. */ +/*****************************************************************************/ +void +gl_ui_cmd_view_zoomin (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_zoom_in (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** View/Zoom-out command. */ +/*****************************************************************************/ +void +gl_ui_cmd_view_zoomout (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_zoom_out (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** View/Zoom-1:1 command. */ +/*****************************************************************************/ +void +gl_ui_cmd_view_zoom1to1 (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_set_zoom (GL_VIEW(window->view), 1.0); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** View/Zoom-to-fit command. */ +/*****************************************************************************/ +void +gl_ui_cmd_view_zoom_to_fit (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_zoom_to_fit (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Arrow-mode command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_arrow_mode (GtkAction *action, + glWindow *window) +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_arrow_mode (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Create-text object command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_create_text (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_object_create_mode (GL_VIEW(window->view), + GL_LABEL_OBJECT_TEXT); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Create-box object command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_create_box (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_object_create_mode (GL_VIEW(window->view), + GL_LABEL_OBJECT_BOX); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Create-line object command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_create_line (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_object_create_mode (GL_VIEW(window->view), + GL_LABEL_OBJECT_LINE); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Create-ellipse object command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_create_ellipse (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_object_create_mode (GL_VIEW(window->view), + GL_LABEL_OBJECT_ELLIPSE); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Create-image object command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_create_image (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_object_create_mode (GL_VIEW(window->view), + GL_LABEL_OBJECT_IMAGE); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Create-barcode object command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_create_barcode (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_object_create_mode (GL_VIEW(window->view), + GL_LABEL_OBJECT_BARCODE); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Raise command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_raise (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_raise_selection (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Lower command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_lower (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_lower_selection (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Rotate-left-90-degrees command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_rotate_left (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_rotate_selection_left (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Rotate-right-90-degrees command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_rotate_right (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_rotate_selection_right (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Flip-horizontally command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_flip_horiz (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_flip_selection_horiz (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Flip-vertically command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_flip_vert (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_flip_selection_vert (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Align-left command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_align_left (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_align_selection_left (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Align-right command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_align_right (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_align_selection_right (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Align-horizontal-center command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_align_hcenter (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_align_selection_hcenter (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Align-top command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_align_top (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_align_selection_top (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Align-bottom command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_align_bottom (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_align_selection_bottom (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Align-vertical center command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_align_vcenter (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_align_selection_vcenter (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Center-horizontally command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_center_horiz (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_center_selection_horiz (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Center-vertically command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_center_vert (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->view != NULL) { + gl_view_center_selection_vert (GL_VIEW(window->view)); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/*****************************************************************************/ +/** Objects/Edit- merge-properties command. */ +/*****************************************************************************/ +void +gl_ui_cmd_objects_merge_properties (GtkAction *action, + glWindow *window) + +{ + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (window->merge_dialog) { + + gtk_window_present (GTK_WINDOW(window->merge_dialog)); + gtk_window_set_transient_for (GTK_WINDOW (window->merge_dialog), + GTK_WINDOW (window)); + + } else { + + window->merge_dialog = + g_object_ref ( + gl_merge_properties_dialog_new (GL_VIEW(window->view)->label, + GTK_WINDOW(window)) ); + + g_signal_connect (G_OBJECT(window->merge_dialog), "destroy", + G_CALLBACK (gtk_widget_destroyed), + &window->merge_dialog); + + gtk_widget_show (GTK_WIDGET (window->merge_dialog)); + + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** Help/Contents command. */ +/****************************************************************************/ +void +gl_ui_cmd_help_contents (GtkAction *action, + glWindow *window) +{ + GError *error = NULL; + + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (window)), + "ghelp:glabels", + GDK_CURRENT_TIME, + &error); + + if (error != NULL) + { + g_message ("%s", error->message); + + g_error_free (error); + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + +/****************************************************************************/ +/** Help/About command. */ +/****************************************************************************/ +void +gl_ui_cmd_help_about (GtkAction *action, + glWindow *window) +{ + static GtkWidget *about = NULL; + + GdkPixbuf *pixbuf = NULL; + + const gchar *authors[] = { + "Jim Evins", + " ", + _("Glabels includes contributions from:"), + "Frederic Ruaudel", + "Wayne Schuller", + "Emmanuel Pacaud", + "Austin Henry", + " ", + _("See the file AUTHORS for additional credits,"), + _("or visit http://glabels.sourceforge.net/"), + NULL + }; + + const gchar *artists[] = { + "Nestor Di", + "Jim Evins", + NULL + }; + + const gchar *copy_text = "Copyright \xc2\xa9 2001-2009 Jim Evins"; + + const gchar *about_text = _("A label and business card creation program.\n"); + + const gchar *url = "http://glabels.sourceforge.net"; + + const gchar *translator_credits = _("translator-credits"); + + const gchar *license = _( + "gLabels is free software: you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + "the Free Software Foundation, either version 3 of the License, or\n" + "(at your option) any later version.\n" + "\n" + "gLabels is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n"); + + gl_debug (DEBUG_COMMANDS, "START"); + + g_return_if_fail (action && GTK_IS_ACTION(action)); + g_return_if_fail (window && GL_IS_WINDOW(window)); + + if (about != NULL) + { + + gtk_window_present (GTK_WINDOW (about)); + gtk_window_set_transient_for (GTK_WINDOW (about), + GTK_WINDOW (window)); + + } else { + + pixbuf = gdk_pixbuf_new_from_file (GLABELS_PIXMAP_DIR "glabels-splash.png", NULL); + + about = gtk_about_dialog_new (); + gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG(about), _("glabels")); + gtk_about_dialog_set_version (GTK_ABOUT_DIALOG(about), VERSION); + gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG(about), copy_text); + gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG(about), about_text); + gtk_about_dialog_set_website (GTK_ABOUT_DIALOG(about), url); + gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG(about), pixbuf); + + gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG(about), authors); + gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG(about), artists); + gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG(about), + translator_credits); + gtk_about_dialog_set_license (GTK_ABOUT_DIALOG(about), license); + + gtk_window_set_destroy_with_parent (GTK_WINDOW (about), TRUE); + + g_signal_connect (G_OBJECT (about), "response", + G_CALLBACK (gtk_widget_destroy), NULL); + g_signal_connect (G_OBJECT (about), "destroy", + G_CALLBACK (gtk_widget_destroyed), &about); + + gtk_window_set_transient_for (GTK_WINDOW (about), + GTK_WINDOW (window)); + + gtk_window_present (GTK_WINDOW (about)); + + if (pixbuf != NULL) + g_object_unref (pixbuf); + + } + + gl_debug (DEBUG_COMMANDS, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui-commands.h b/src/ui-commands.h new file mode 100644 index 00000000..42cfc89b --- /dev/null +++ b/src/ui-commands.h @@ -0,0 +1,208 @@ +/* + * ui-commands.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __COMMANDS_H__ +#define __COMMANDS_H__ + +#include +#include "window.h" + +G_BEGIN_DECLS + +void gl_ui_cmd_file_new (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_file_properties (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_file_template_designer (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_file_open (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_file_open_recent (GtkRecentChooser *chooser, + glWindow *window); + +void gl_ui_cmd_file_save (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_file_save_as (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_file_print (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_file_print_preview (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_file_close (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_file_quit (GtkAction *action, + glWindow *window); + + + +void gl_ui_cmd_edit_undo (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_edit_redo (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_edit_cut (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_edit_copy (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_edit_paste (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_edit_delete (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_edit_select_all (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_edit_unselect_all (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_edit_preferences (GtkAction *action, + glWindow *window); + + + +void gl_ui_cmd_view_property_bar_toggle (GtkToggleAction *action, + glWindow *window); + +void gl_ui_cmd_view_property_bar_tips_toggle (GtkToggleAction *action, + glWindow *window); + +void gl_ui_cmd_view_grid_toggle (GtkToggleAction *action, + glWindow *window); + +void gl_ui_cmd_view_markup_toggle (GtkToggleAction *action, + glWindow *window); + + + +void gl_ui_cmd_view_zoomin (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_view_zoomout (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_view_zoom1to1 (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_view_zoom_to_fit (GtkAction *action, + glWindow *window); + + + +void gl_ui_cmd_objects_arrow_mode (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_create_text (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_create_box (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_create_line (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_create_ellipse (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_create_image (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_create_barcode (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_raise (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_lower (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_rotate_left (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_rotate_right (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_flip_horiz (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_flip_vert (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_align_left (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_align_right (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_align_hcenter (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_align_top (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_align_bottom (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_align_vcenter (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_center_horiz (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_center_vert (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_objects_merge_properties (GtkAction *action, + glWindow *window); + + + +void gl_ui_cmd_help_contents (GtkAction *action, + glWindow *window); + +void gl_ui_cmd_help_about (GtkAction *action, + glWindow *window); + +G_END_DECLS + +#endif /* __COMMANDS_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui-property-bar.c b/src/ui-property-bar.c new file mode 100644 index 00000000..30ae6cbf --- /dev/null +++ b/src/ui-property-bar.c @@ -0,0 +1,1245 @@ +/* + * ui-property-bar.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "ui-property-bar.h" + +#include +#include +#include + +#include "builder-util.h" +#include "font-combo.h" +#include "color-combo-button.h" +#include "stock-pixmaps/stockpixbufs.h" +#include "prefs.h" +#include "color.h" + +#include "debug.h" + + +/*===========================================================================*/ +/* Private macros and constants. */ +/*===========================================================================*/ + + +/*===========================================================================*/ +/* Private data types */ +/*===========================================================================*/ + +struct _glUIPropertyBarPrivate { + + glView *view; + + GtkBuilder *builder; + + GtkWidget *tool_bar; + + /* Font selection */ + GtkWidget *font_family_eventbox; + GtkWidget *font_family_combo; + GtkWidget *font_size_spin; + GtkWidget *font_bold_toggle; + GtkWidget *font_italic_toggle; + + /* Text alignemnt radios */ + GtkWidget *text_align_left_radio; + GtkWidget *text_align_center_radio; + GtkWidget *text_align_right_radio; + + /* Color combos */ + GtkWidget *text_color_eventbox; + GtkWidget *text_color_button; + GtkWidget *fill_color_eventbox; + GtkWidget *fill_color_button; + GtkWidget *line_color_eventbox; + GtkWidget *line_color_button; + + /* Line width */ + GtkWidget *line_width_spin; + + /* Prevent recursion */ + gboolean stop_signals; +}; + + +/*===========================================================================*/ +/* Private globals */ +/*===========================================================================*/ + + +/*===========================================================================*/ +/* Local function prototypes */ +/*===========================================================================*/ + +static void gl_ui_property_bar_finalize (GObject *object); + +static void gl_ui_property_bar_construct (glUIPropertyBar *this); + +static void selection_changed_cb (glUIPropertyBar *this); + +static void font_family_changed_cb (GtkComboBox *combo, + glUIPropertyBar *this); + +static void font_size_changed_cb (GtkSpinButton *spin, + glUIPropertyBar *this); + +static void text_color_changed_cb (glColorComboButton *cc, + guint color, + gboolean is_default, + glUIPropertyBar *this); + +static void fill_color_changed_cb (glColorComboButton *cc, + guint color, + gboolean is_default, + glUIPropertyBar *this); + +static void line_color_changed_cb (glColorComboButton *cc, + guint color, + gboolean is_default, + glUIPropertyBar *this); + +static void line_width_changed_cb (GtkSpinButton *spin, + glUIPropertyBar *this); + +static void font_bold_toggled_cb (GtkToggleToolButton *toggle, + glUIPropertyBar *this); + +static void font_italic_toggled_cb (GtkToggleToolButton *toggle, + glUIPropertyBar *this); + +static void text_align_toggled_cb (GtkToggleToolButton *toggle, + glUIPropertyBar *this); + +static void set_doc_items_sensitive (glUIPropertyBar *this, + gboolean state); + +static void set_text_items_sensitive (glUIPropertyBar *this, + gboolean state); + +static void set_fill_items_sensitive (glUIPropertyBar *this, + gboolean state); + +static void set_line_color_items_sensitive (glUIPropertyBar *this, + gboolean state); + +static void set_line_width_items_sensitive (glUIPropertyBar *this, + gboolean state); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glUIPropertyBar, gl_ui_property_bar, GTK_TYPE_HBOX); + + +static void +gl_ui_property_bar_class_init (glUIPropertyBarClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + gl_ui_property_bar_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_ui_property_bar_finalize; + + gl_debug (DEBUG_PROPERTY_BAR, "END"); +} + + +static void +gl_ui_property_bar_init (glUIPropertyBar *this) +{ + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + this->priv = g_new0 (glUIPropertyBarPrivate, 1); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); +} + + +static void +gl_ui_property_bar_finalize (GObject *object) +{ + glUIPropertyBar *this = GL_UI_PROPERTY_BAR (object); + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_UI_PROPERTY_BAR (object)); + + if (this->priv->view) + { + g_object_unref (G_OBJECT(this->priv->view)); + } + if (this->priv->builder) + { + g_object_unref (G_OBJECT(this->priv->builder)); + } + g_free (this->priv); + + G_OBJECT_CLASS (gl_ui_property_bar_parent_class)->finalize (object); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); +} + + +/****************************************************************************/ +/* Create a NEW property_bar. */ +/****************************************************************************/ +GtkWidget * +gl_ui_property_bar_new (void) +{ + glUIPropertyBar *this; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + this = g_object_new (GL_TYPE_UI_PROPERTY_BAR, NULL); + + gl_ui_property_bar_construct (this); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + return GTK_WIDGET (this); +} + + +/******************************************************************************/ +/* Initialize property toolbar. */ +/******************************************************************************/ +static void +gl_ui_property_bar_construct (glUIPropertyBar *this) +{ + GtkBuilder *builder; + static gchar *object_ids[] = { "property_toolbar", + "adjustment1", "adjustment2", + NULL }; + GError *error = NULL; + GdkPixbuf *pixbuf = NULL; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + this->priv->stop_signals = TRUE; + + builder = gtk_builder_new (); + gtk_builder_add_objects_from_file (builder, + GLABELS_BUILDER_DIR "property-bar.builder", + object_ids, + &error); + if (error) { + g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); + g_error_free (error); + return; + } + + gl_builder_util_get_widgets (builder, + "property_toolbar", &this->priv->tool_bar, + "font_family_eventbox", &this->priv->font_family_eventbox, + "font_size_spin", &this->priv->font_size_spin, + "font_bold_toggle", &this->priv->font_bold_toggle, + "font_italic_toggle", &this->priv->font_italic_toggle, + "text_align_left_radio", &this->priv->text_align_left_radio, + "text_align_center_radio", &this->priv->text_align_center_radio, + "text_align_right_radio", &this->priv->text_align_right_radio, + "text_color_eventbox", &this->priv->text_color_eventbox, + "fill_color_eventbox", &this->priv->fill_color_eventbox, + "line_color_eventbox", &this->priv->line_color_eventbox, + "line_width_spin", &this->priv->line_width_spin, + NULL); + + gtk_container_add (GTK_CONTAINER (this), this->priv->tool_bar); + + this->priv->font_family_combo = gl_font_combo_new (gl_prefs->default_font_family); + gtk_container_add (GTK_CONTAINER (this->priv->font_family_eventbox), + this->priv->font_family_combo); + + pixbuf = gdk_pixbuf_new_from_inline (-1, stock_text_24, FALSE, NULL); + this->priv->text_color_button = + gl_color_combo_button_new (pixbuf, + _("Default"), + GL_COLOR_TEXT_DEFAULT, + gl_prefs->default_text_color); + gl_color_combo_button_set_relief (GL_COLOR_COMBO_BUTTON(this->priv->text_color_button), + GTK_RELIEF_NONE); + g_object_unref (G_OBJECT (pixbuf)); + gtk_container_add (GTK_CONTAINER (this->priv->text_color_eventbox), + this->priv->text_color_button); + + pixbuf = gdk_pixbuf_new_from_inline (-1, stock_bucket_fill_24, FALSE, NULL); + this->priv->fill_color_button = + gl_color_combo_button_new (pixbuf, + _("No Fill"), + GL_COLOR_NO_FILL, + gl_prefs->default_fill_color); + gl_color_combo_button_set_relief (GL_COLOR_COMBO_BUTTON(this->priv->fill_color_button), + GTK_RELIEF_NONE); + g_object_unref (G_OBJECT (pixbuf)); + gtk_container_add (GTK_CONTAINER (this->priv->fill_color_eventbox), + this->priv->fill_color_button); + + pixbuf = gdk_pixbuf_new_from_inline (-1, stock_pencil_24, FALSE, NULL); + this->priv->line_color_button = + gl_color_combo_button_new (pixbuf, + _("No Line"), + GL_COLOR_NO_LINE, + gl_prefs->default_line_color); + gl_color_combo_button_set_relief (GL_COLOR_COMBO_BUTTON(this->priv->line_color_button), + GTK_RELIEF_NONE); + g_object_unref (G_OBJECT (pixbuf)); + gtk_container_add (GTK_CONTAINER (this->priv->line_color_eventbox), + this->priv->line_color_button); + + /* Save reference to gui tree so we don't lose tooltips */ + this->priv->builder = builder; + + set_doc_items_sensitive (this, FALSE); + + /* Font family entry widget */ + g_signal_connect (G_OBJECT (this->priv->font_family_combo), + "changed", G_CALLBACK (font_family_changed_cb), this); + + /* Font size entry widget */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON(this->priv->font_size_spin), + gl_prefs->default_font_size); + + g_signal_connect (G_OBJECT (this->priv->font_size_spin), + "changed", G_CALLBACK (font_size_changed_cb), this); + + + /* Bold and Italic toggles */ + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_bold_toggle), + (gl_prefs->default_font_weight == PANGO_WEIGHT_BOLD)); + g_signal_connect (G_OBJECT (this->priv->font_bold_toggle), + "toggled", G_CALLBACK (font_bold_toggled_cb), this); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_italic_toggle), + gl_prefs->default_font_italic_flag); + g_signal_connect (G_OBJECT (this->priv->font_italic_toggle), + "toggled", G_CALLBACK (font_italic_toggled_cb), this); + + + /* Text alignment radio group */ + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_left_radio), + (gl_prefs->default_text_alignment == PANGO_ALIGN_LEFT)); + g_signal_connect (G_OBJECT (this->priv->text_align_left_radio), + "toggled", G_CALLBACK (text_align_toggled_cb), this); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_center_radio), + (gl_prefs->default_text_alignment == PANGO_ALIGN_CENTER)); + g_signal_connect (G_OBJECT (this->priv->text_align_center_radio), + "toggled", G_CALLBACK (text_align_toggled_cb), this); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio), + (gl_prefs->default_text_alignment == PANGO_ALIGN_RIGHT)); + g_signal_connect (G_OBJECT (this->priv->text_align_right_radio), + "toggled", G_CALLBACK (text_align_toggled_cb), this); + + /* Text color widget */ + gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->text_color_button), + gl_prefs->default_text_color); + g_signal_connect (G_OBJECT (this->priv->text_color_button), + "color_changed", + G_CALLBACK (text_color_changed_cb), this); + + /* Fill color widget */ + gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->fill_color_button), + gl_prefs->default_fill_color); + g_signal_connect (G_OBJECT (this->priv->fill_color_button), + "color_changed", + G_CALLBACK (fill_color_changed_cb), this); + + /* Line color widget */ + gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->line_color_button), + gl_prefs->default_line_color); + g_signal_connect (G_OBJECT (this->priv->line_color_button), + "color_changed", + G_CALLBACK (line_color_changed_cb), this); + + /* Line width entry widget */ + g_signal_connect (G_OBJECT (this->priv->line_width_spin), + "changed", + G_CALLBACK (line_width_changed_cb), this); + + this->priv->stop_signals = FALSE; + + gl_debug (DEBUG_PROPERTY_BAR, "END"); +} + + +/****************************************************************************/ +/* Fill widgets with default values. */ +/****************************************************************************/ +static void +reset_to_default_properties (glView *view, + glUIPropertyBar *this) +{ + + gl_font_combo_set_family (GL_FONT_COMBO (this->priv->font_family_combo), + view->default_font_family); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON(this->priv->font_size_spin), + view->default_font_size); + + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_bold_toggle), + (view->default_font_weight == PANGO_WEIGHT_BOLD)); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_italic_toggle), + view->default_font_italic_flag); + + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_left_radio), + (view->default_text_alignment == PANGO_ALIGN_LEFT)); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_center_radio), + (view->default_text_alignment == PANGO_ALIGN_CENTER)); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio), + (view->default_text_alignment == PANGO_ALIGN_RIGHT)); + + gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON(this->priv->text_color_button), + view->default_text_color); + + gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON(this->priv->fill_color_button), + view->default_fill_color); + + gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON(this->priv->line_color_button), + view->default_line_color); + + gtk_spin_button_set_value (GTK_SPIN_BUTTON(this->priv->line_width_spin), + view->default_line_width); +} + + +/****************************************************************************/ +/* Set view associated with property_bar. */ +/****************************************************************************/ +void +gl_ui_property_bar_set_view (glUIPropertyBar *this, + glView *view) +{ + glLabel *label; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + label = view->label; + g_return_if_fail (label && GL_IS_LABEL (label)); + + set_doc_items_sensitive (this, TRUE); + + this->priv->view = GL_VIEW (g_object_ref (G_OBJECT (view))); + + reset_to_default_properties (view, this); + + g_signal_connect_swapped (G_OBJECT(view), "selection_changed", + G_CALLBACK(selection_changed_cb), this); + + g_signal_connect_swapped (G_OBJECT(view->label), "changed", + G_CALLBACK(selection_changed_cb), this); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. View "selection state changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_text_properties (glView *view, + glUIPropertyBar *this) +{ + gboolean can_text, is_first_object; + gboolean is_same_font_family, is_same_font_size; + gboolean is_same_text_color, is_same_is_italic; + gboolean is_same_is_bold, is_same_align; + GList *p; + glLabelObject *object; + gchar *selection_font_family, *font_family; + gdouble selection_font_size, font_size; + guint selection_text_color, text_color; + glColorNode *text_color_node; + gboolean selection_is_italic, is_italic; + gboolean selection_is_bold, is_bold; + PangoAlignment selection_align, align; + + can_text = gl_view_can_selection_text (view); + set_text_items_sensitive (this, can_text); + + if (!can_text) + return; + + is_same_is_italic = + is_same_is_bold = + is_same_align = + is_same_text_color = + is_same_font_size = + is_same_font_family = TRUE; + selection_font_family = NULL; + selection_font_size = -1; + selection_align = PANGO_ALIGN_LEFT; + selection_is_italic = TRUE; + selection_is_bold = TRUE; + selection_text_color = 0; + + is_first_object = TRUE; + + for (p = view->selected_object_list; p != NULL; p = p->next) + { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + if (!gl_label_object_can_text (object)) + continue; + + font_family = gl_label_object_get_font_family (object); + if (font_family != NULL) + { + if (selection_font_family == NULL) + { + selection_font_family = g_strdup (font_family); + } + else + { + if (strcmp (font_family, selection_font_family) != 0) + { + is_same_font_family = FALSE; + } + } + g_free (font_family); + } + + font_size = gl_label_object_get_font_size (object); + + text_color_node = gl_label_object_get_text_color (object); + if (text_color_node->field_flag) + { + /* If a merge field is set we use the default color for merged color*/ + text_color = GL_COLOR_MERGE_DEFAULT; + + } + else + { + text_color = text_color_node->color; + } + gl_color_node_free (&text_color_node); + + is_italic = gl_label_object_get_font_italic_flag (object); + is_bold = gl_label_object_get_font_weight (object) == PANGO_WEIGHT_BOLD; + align = gl_label_object_get_text_alignment (object); + + if (is_first_object) + { + selection_font_size = font_size; + selection_text_color = text_color; + selection_is_italic = is_italic; + selection_is_bold = is_bold; + selection_align = align; + } + else + { + if (font_size != selection_font_size) + is_same_font_size = FALSE; + if (text_color != selection_text_color) + is_same_text_color = FALSE; + if (is_italic != selection_is_italic) + is_same_is_italic = FALSE; + if (is_bold != selection_is_bold) + is_same_is_bold = FALSE; + if (align != selection_align) + is_same_align = FALSE; + } + is_first_object = FALSE; + } + + if (is_same_font_family && (selection_font_family != NULL)) + gl_debug (DEBUG_PROPERTY_BAR, "same font family = %s", + selection_font_family); + gl_font_combo_set_family (GL_FONT_COMBO (this->priv->font_family_combo), + is_same_font_family?selection_font_family:""); + g_free (selection_font_family); + + if (is_same_font_size) + { + gl_debug (DEBUG_PROPERTY_BAR, "same font size = %g", + selection_font_size); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (this->priv->font_size_spin), + selection_font_size); + } + else + { + gtk_entry_set_text (GTK_ENTRY (this->priv->font_size_spin), ""); + } + + if (is_same_text_color) + { + gl_debug (DEBUG_PROPERTY_BAR, "same text color = %08x", selection_text_color); + gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->text_color_button), + selection_text_color); + } + + if (is_same_is_italic) + { + gl_debug (DEBUG_PROPERTY_BAR, "same italic flag = %d", + selection_is_italic); + } + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_italic_toggle), + selection_is_italic && is_same_is_italic); + + if (is_same_is_bold) + { + gl_debug (DEBUG_PROPERTY_BAR, "same bold flag = %d", + selection_is_bold); + } + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->font_bold_toggle), + selection_is_bold && is_same_is_bold); + + if (is_same_align) + gl_debug (DEBUG_PROPERTY_BAR, "same align"); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_left_radio), + (selection_align == PANGO_ALIGN_LEFT) && + is_same_align); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_center_radio), + (selection_align == PANGO_ALIGN_CENTER) && + is_same_align); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio), + (selection_align == PANGO_ALIGN_RIGHT) && + is_same_align); +} + + +static void +update_fill_color (glView *view, + glUIPropertyBar *this) +{ + gboolean can, is_first_object; + gboolean is_same_fill_color; + GList *p; + glLabelObject *object; + guint selection_fill_color, fill_color; + glColorNode *fill_color_node; + + can = gl_view_can_selection_fill (view); + set_fill_items_sensitive (this, can); + + if (!can) + return; + + is_same_fill_color = TRUE; + is_first_object = TRUE; + selection_fill_color = 0; + + for (p = view->selected_object_list; p != NULL; p = p->next) + { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + if (!gl_label_object_can_fill (object)) + continue; + + fill_color_node = gl_label_object_get_fill_color (object); + if (fill_color_node->field_flag) + { + /* If a merge field is set we use the default color for merged color*/ + fill_color = GL_COLOR_FILL_MERGE_DEFAULT; + + } + else + { + fill_color = fill_color_node->color; + } + gl_color_node_free (&fill_color_node); + + if (is_first_object) + { + selection_fill_color = fill_color; + } + else + { + if (fill_color != selection_fill_color) + { + is_same_fill_color = FALSE; + } + } + is_first_object = FALSE; + } + + if (is_same_fill_color) + { + gl_debug (DEBUG_PROPERTY_BAR, "same fill color = %08x", selection_fill_color); + gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->fill_color_button), + selection_fill_color); + } +} + + +static void +update_line_color (glView *view, + glUIPropertyBar *this) +{ + gboolean can, is_first_object; + gboolean is_same_line_color; + GList *p; + glLabelObject *object; + guint selection_line_color, line_color; + glColorNode *line_color_node; + + can = gl_view_can_selection_line_color (view); + set_line_color_items_sensitive (this, can); + + if (!can) + return; + + is_same_line_color = TRUE; + is_first_object = TRUE; + selection_line_color = 0; + + for (p = view->selected_object_list; p != NULL; p = p->next) + { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + if (!gl_label_object_can_line_color (object)) + continue; + + line_color_node = gl_label_object_get_line_color (object); + if (line_color_node->field_flag) + { + /* If a merge field is set we use the default color for merged color*/ + line_color = GL_COLOR_MERGE_DEFAULT; + + } + else + { + line_color = line_color_node->color; + } + gl_color_node_free (&line_color_node); + + if (is_first_object) + { + selection_line_color = line_color; + } + else + { + if (line_color != selection_line_color) + { + is_same_line_color = FALSE; + } + } + is_first_object = FALSE; + } + + if (is_same_line_color) + { + gl_debug (DEBUG_PROPERTY_BAR, "same line color = %08x", selection_line_color); + gl_color_combo_button_set_color (GL_COLOR_COMBO_BUTTON (this->priv->line_color_button), + selection_line_color); + } +} + + +static void +update_line_width (glView *view, + glUIPropertyBar *this) +{ + gboolean can, is_first_object; + gboolean is_same_line_width; + GList *p; + glLabelObject *object; + gdouble selection_line_width, line_width; + + can = gl_view_can_selection_line_width (view); + set_line_width_items_sensitive (this, can); + + if (!can) + return; + + is_same_line_width = TRUE; + is_first_object = TRUE; + selection_line_width = 0; + + for (p = view->selected_object_list; p != NULL; p = p->next) + { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + if (!gl_label_object_can_line_width (object)) + continue; + + line_width = gl_label_object_get_line_width (object); + + if (is_first_object) + { + selection_line_width = line_width; + } + else + { + if (line_width != selection_line_width) + { + is_same_line_width = FALSE; + } + } + is_first_object = FALSE; + } + + if (is_same_line_width) + { + gl_debug (DEBUG_PROPERTY_BAR, "same line width = %g", selection_line_width); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (this->priv->line_width_spin), + selection_line_width); + } + else + { + gtk_entry_set_text (GTK_ENTRY (this->priv->line_width_spin), ""); + } +} + + +static void +selection_changed_cb (glUIPropertyBar *this) +{ + glView *view = this->priv->view; + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (this && GL_IS_UI_PROPERTY_BAR (this)); + + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + if (gl_view_is_selection_empty (view)) + { + /* No selection: make all controls active. */ + reset_to_default_properties (view, this); + set_doc_items_sensitive (this, TRUE); + } + else + { + update_text_properties (view, this); + update_fill_color (view, this); + update_line_color (view, this); + update_line_width (view, this); + } + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Font family entry changed. */ +/*--------------------------------------------------------------------------*/ +static void +font_family_changed_cb (GtkComboBox *combo, + glUIPropertyBar *this) +{ + gchar *font_family; + + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + font_family = gl_font_combo_get_family (GL_FONT_COMBO (combo)); + if ( strlen(font_family) ) + { + gl_view_set_selection_font_family (this->priv->view, + font_family); + gl_view_set_default_font_family (this->priv->view, + font_family); + } + g_free (font_family); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Font size spin button changed. */ +/*--------------------------------------------------------------------------*/ +static void +font_size_changed_cb (GtkSpinButton *spin, + glUIPropertyBar *this) +{ + gdouble font_size; + + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + font_size = gtk_spin_button_get_value (spin); + + gl_view_set_selection_font_size (this->priv->view, + font_size); + gl_view_set_default_font_size (this->priv->view, + font_size); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Text color combo changed. */ +/*--------------------------------------------------------------------------*/ +static void +text_color_changed_cb (glColorComboButton *cc, + guint color, + gboolean is_default, + glUIPropertyBar *this) +{ + glColorNode *text_color_node; + + g_return_if_fail (this && GL_IS_UI_PROPERTY_BAR (this)); + + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + text_color_node = gl_color_node_new_default (); + text_color_node->color = color; + + gl_debug (DEBUG_PROPERTY_BAR, "Color=%08x, Is_default=%d", + color, is_default); + + if (is_default) + { + text_color_node->color = gl_prefs->default_text_color; + gl_view_set_selection_text_color (this->priv->view, + text_color_node); + gl_view_set_default_text_color (this->priv->view, + gl_prefs->default_text_color); + } + else + { + gl_view_set_selection_text_color (this->priv->view, + text_color_node); + gl_view_set_default_text_color (this->priv->view, + text_color_node->color); + } + + gl_color_node_free (&text_color_node); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Fill color combo changed. */ +/*--------------------------------------------------------------------------*/ +static void +fill_color_changed_cb (glColorComboButton *cc, + guint color, + gboolean is_default, + glUIPropertyBar *this) +{ + glColorNode *fill_color_node; + + g_return_if_fail (this && GL_IS_UI_PROPERTY_BAR (this)); + + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + fill_color_node = gl_color_node_new_default (); + + fill_color_node->color = color; + + gl_debug (DEBUG_PROPERTY_BAR, "Color=%08x, Is_default=%d", + color, is_default); + + if (is_default) + { + + fill_color_node->color = GL_COLOR_NONE; + gl_view_set_selection_fill_color (this->priv->view, + fill_color_node); + gl_view_set_default_fill_color (this->priv->view, + fill_color_node->color); + } + else + { + gl_view_set_selection_fill_color (this->priv->view, + fill_color_node); + gl_view_set_default_fill_color (this->priv->view, + fill_color_node->color); + } + gl_color_node_free (&fill_color_node); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Line color combo changed. */ +/*--------------------------------------------------------------------------*/ +static void +line_color_changed_cb (glColorComboButton *cc, + guint color, + gboolean is_default, + glUIPropertyBar *this) +{ + glColorNode *line_color_node; + + g_return_if_fail (this && GL_IS_UI_PROPERTY_BAR (this)); + + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + line_color_node = gl_color_node_new_default (); + line_color_node->color = color; + + gl_debug (DEBUG_PROPERTY_BAR, "Color=%08x, Is_default=%d", + color, is_default); + + if (is_default) + { + line_color_node->color = GL_COLOR_NONE; + gl_view_set_selection_line_color (this->priv->view, + line_color_node); + gl_view_set_default_line_color (this->priv->view, + line_color_node->color); + } + else + { + gl_view_set_selection_line_color (this->priv->view, + line_color_node); + gl_view_set_default_line_color (this->priv->view, + line_color_node->color); + } + gl_color_node_free (&line_color_node); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Line width spin button changed. */ +/*--------------------------------------------------------------------------*/ +static void +line_width_changed_cb (GtkSpinButton *spin, + glUIPropertyBar *this) +{ + gdouble line_width; + + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + if (this->priv->view) + { + line_width = gtk_spin_button_get_value (spin); + + gl_view_set_selection_line_width (this->priv->view, + line_width); + gl_view_set_default_line_width (this->priv->view, + line_width); + } + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Font bold toggled callback. */ +/*---------------------------------------------------------------------------*/ +static void +font_bold_toggled_cb (GtkToggleToolButton *toggle, + glUIPropertyBar *this) +{ + gboolean state; + PangoWeight weight; + + + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + state = gtk_toggle_tool_button_get_active (toggle); + + weight = state ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL; + + gl_view_set_selection_font_weight (this->priv->view, weight); + gl_view_set_default_font_weight (this->priv->view, weight); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Font italic toggled callback. */ +/*---------------------------------------------------------------------------*/ +static void +font_italic_toggled_cb (GtkToggleToolButton *toggle, + glUIPropertyBar *this) +{ + gboolean state; + + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + state = gtk_toggle_tool_button_get_active (toggle); + + gl_view_set_selection_font_italic_flag (this->priv->view, state); + gl_view_set_default_font_italic_flag (this->priv->view, state); + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Text align toggled callback. */ +/*---------------------------------------------------------------------------*/ +static void +text_align_toggled_cb (GtkToggleToolButton *toggle, + glUIPropertyBar *this) +{ + if (this->priv->stop_signals) return; + this->priv->stop_signals = TRUE; + + gl_debug (DEBUG_PROPERTY_BAR, "START"); + + if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_left_radio))) + { + gl_view_set_selection_text_alignment (this->priv->view, + PANGO_ALIGN_LEFT); + gl_view_set_default_text_alignment (this->priv->view, + PANGO_ALIGN_LEFT); + } + + if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_center_radio))) + { + gl_view_set_selection_text_alignment (this->priv->view, + PANGO_ALIGN_CENTER); + gl_view_set_default_text_alignment (this->priv->view, + PANGO_ALIGN_CENTER); + } + + if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (this->priv->text_align_right_radio))) + { + gl_view_set_selection_text_alignment (this->priv->view, + PANGO_ALIGN_RIGHT); + gl_view_set_default_text_alignment (this->priv->view, + PANGO_ALIGN_RIGHT); + } + + gl_debug (DEBUG_PROPERTY_BAR, "END"); + + this->priv->stop_signals = FALSE; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set sensitivity of doc controls. */ +/*---------------------------------------------------------------------------*/ +static void +set_doc_items_sensitive (glUIPropertyBar *this, + gboolean state) +{ + gtk_widget_set_sensitive (this->priv->font_family_combo, state); + gtk_widget_set_sensitive (this->priv->font_size_spin, state); + gtk_widget_set_sensitive (this->priv->font_bold_toggle, state); + gtk_widget_set_sensitive (this->priv->font_italic_toggle, state); + gtk_widget_set_sensitive (this->priv->text_align_left_radio, state); + gtk_widget_set_sensitive (this->priv->text_align_center_radio, state); + gtk_widget_set_sensitive (this->priv->text_align_right_radio, state); + gtk_widget_set_sensitive (this->priv->text_color_button, state); + gtk_widget_set_sensitive (this->priv->fill_color_button, state); + gtk_widget_set_sensitive (this->priv->line_color_button, state); + gtk_widget_set_sensitive (this->priv->line_width_spin, state); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set sensitivity of text related controls. */ +/*---------------------------------------------------------------------------*/ +static void +set_text_items_sensitive (glUIPropertyBar *this, + gboolean state) +{ + gtk_widget_set_sensitive (this->priv->font_family_combo, state); + gtk_widget_set_sensitive (this->priv->font_size_spin, state); + gtk_widget_set_sensitive (this->priv->font_bold_toggle, state); + gtk_widget_set_sensitive (this->priv->font_italic_toggle, state); + gtk_widget_set_sensitive (this->priv->text_align_left_radio, state); + gtk_widget_set_sensitive (this->priv->text_align_center_radio, state); + gtk_widget_set_sensitive (this->priv->text_align_right_radio, state); + gtk_widget_set_sensitive (this->priv->text_color_button, state); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set sensitivity of fill related controls. */ +/*---------------------------------------------------------------------------*/ +static void +set_fill_items_sensitive (glUIPropertyBar *this, + gboolean state) +{ + gtk_widget_set_sensitive (this->priv->fill_color_button, state); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set sensitivity of line color related controls. */ +/*---------------------------------------------------------------------------*/ +static void +set_line_color_items_sensitive (glUIPropertyBar *this, + gboolean state) +{ + gtk_widget_set_sensitive (this->priv->line_color_button, state); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set sensitivity of line width related controls. */ +/*---------------------------------------------------------------------------*/ +static void +set_line_width_items_sensitive (glUIPropertyBar *this, + gboolean state) +{ + gtk_widget_set_sensitive (this->priv->line_width_spin, state); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui-property-bar.h b/src/ui-property-bar.h new file mode 100644 index 00000000..92568277 --- /dev/null +++ b/src/ui-property-bar.h @@ -0,0 +1,77 @@ +/* + * ui-property-bar.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __UI_PROPERTY_BAR_H__ +#define __UI_PROPERTY_BAR_H__ + +#include + +#include "view.h" + +G_BEGIN_DECLS + +#define GL_TYPE_UI_PROPERTY_BAR (gl_ui_property_bar_get_type ()) +#define GL_UI_PROPERTY_BAR(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_UI_PROPERTY_BAR, glUIPropertyBar )) +#define GL_UI_PROPERTY_BAR_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_UI_PROPERTY_BAR, glUIPropertyBarClass)) +#define GL_IS_UI_PROPERTY_BAR(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_UI_PROPERTY_BAR)) +#define GL_IS_UI_PROPERTY_BAR_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_UI_PROPERTY_BAR)) + +typedef struct _glUIPropertyBar glUIPropertyBar; +typedef struct _glUIPropertyBarClass glUIPropertyBarClass; + +typedef struct _glUIPropertyBarPrivate glUIPropertyBarPrivate; + +struct _glUIPropertyBar { + GtkHBox parent_widget; + + glUIPropertyBarPrivate *priv; + +}; + +struct _glUIPropertyBarClass { + GtkHBoxClass parent_class; +}; + +GType gl_ui_property_bar_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_ui_property_bar_new (void); + +void gl_ui_property_bar_set_view (glUIPropertyBar *this, + glView *view); + + +G_END_DECLS + +#endif /* __UI_PROPERTY_BAR_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui-sidebar.c b/src/ui-sidebar.c new file mode 100644 index 00000000..1a821cef --- /dev/null +++ b/src/ui-sidebar.c @@ -0,0 +1,231 @@ +/* + * ui-sidebar.c + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "ui-sidebar.h" + +#include + +#include "ui-util.h" +#include "object-editor.h" +#include "stock.h" + +#include "debug.h" + + +/*===========================================================================*/ +/* Private macros and constants. */ +/*===========================================================================*/ + +#define DEFAULT_SIDEBAR_WIDTH 340 + + +/*===========================================================================*/ +/* Private data types */ +/*===========================================================================*/ + +struct _glUISidebarPrivate { + + glView *view; + + GtkWidget *child; + GtkWidget *empty_child; +}; + +/*===========================================================================*/ +/* Private globals */ +/*===========================================================================*/ + + +/*===========================================================================*/ +/* Local function prototypes */ +/*===========================================================================*/ + +static void gl_ui_sidebar_finalize (GObject *object); + +static void gl_ui_sidebar_construct (glUISidebar *sidebar); + +static void selection_changed_cb (glView *view, + glUISidebar *sidebar); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glUISidebar, gl_ui_sidebar, GTK_TYPE_VBOX); + + +static void +gl_ui_sidebar_class_init (glUISidebarClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_UI, "START"); + + gl_ui_sidebar_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_ui_sidebar_finalize; + + gl_debug (DEBUG_UI, "END"); +} + + +static void +gl_ui_sidebar_init (glUISidebar *sidebar) +{ + gl_debug (DEBUG_UI, "START"); + + sidebar->priv = g_new0 (glUISidebarPrivate, 1); + + gl_debug (DEBUG_UI, "END"); +} + + +static void +gl_ui_sidebar_finalize (GObject *object) +{ + glUISidebar *sidebar = GL_UI_SIDEBAR (object); + + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_UI_SIDEBAR (object)); + + if (sidebar->priv->view) { + g_object_unref (G_OBJECT(sidebar->priv->view)); + } + g_free (sidebar->priv); + + G_OBJECT_CLASS (gl_ui_sidebar_parent_class)->finalize (object); + + gl_debug (DEBUG_UI, "END"); +} + + +/****************************************************************************/ +/* Create a NEW sidebar. */ +/****************************************************************************/ +GtkWidget * +gl_ui_sidebar_new (void) +{ + glUISidebar *sidebar; + + gl_debug (DEBUG_UI, "START"); + + sidebar = g_object_new (gl_ui_sidebar_get_type (), NULL); + + gtk_widget_set_size_request (GTK_WIDGET (sidebar), DEFAULT_SIDEBAR_WIDTH, -1); + + gl_ui_sidebar_construct (sidebar); + + gl_debug (DEBUG_UI, "END"); + + return GTK_WIDGET(sidebar); +} + + +/******************************************************************************/ +/* Initialize property toolbar. */ +/******************************************************************************/ +static void +gl_ui_sidebar_construct (glUISidebar *sidebar) +{ + gl_debug (DEBUG_UI, "START"); + + sidebar->priv->empty_child = gl_object_editor_new (GL_STOCK_PROPERTIES, + _("Object properties"), + NULL, + GL_OBJECT_EDITOR_EMPTY, + NULL); + + sidebar->priv->child = g_object_ref (sidebar->priv->empty_child); + gtk_widget_show (sidebar->priv->child); + gtk_container_add (GTK_CONTAINER(sidebar), sidebar->priv->child); + + gtk_widget_set_sensitive (GTK_WIDGET (sidebar), FALSE); + + gl_debug (DEBUG_UI, "END"); +} + + +/****************************************************************************/ +/* Set view associated with sidebar. */ +/****************************************************************************/ +void +gl_ui_sidebar_set_view (glUISidebar *sidebar, + glView *view) +{ + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + gtk_widget_set_sensitive (GTK_WIDGET (sidebar), TRUE); + + sidebar->priv->view = GL_VIEW (g_object_ref (G_OBJECT (view))); + + g_signal_connect (G_OBJECT(view), "selection_changed", + G_CALLBACK(selection_changed_cb), sidebar); + + gl_debug (DEBUG_UI, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. View "selection state changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +selection_changed_cb (glView *view, + glUISidebar *sidebar) +{ + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (sidebar && GL_IS_UI_SIDEBAR (sidebar)); + + gtk_container_remove (GTK_CONTAINER(sidebar), sidebar->priv->child); + + if (gl_view_is_selection_empty (view) || !gl_view_is_selection_atomic (view)) { + + sidebar->priv->child = g_object_ref (sidebar->priv->empty_child); + + } else { + + sidebar->priv->child = g_object_ref (gl_view_get_editor (view)); + + } + + gtk_widget_show (sidebar->priv->child); + + gtk_box_pack_start (GTK_BOX(sidebar), sidebar->priv->child, TRUE, TRUE, 0); + + gl_debug (DEBUG_UI, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui-sidebar.h b/src/ui-sidebar.h new file mode 100644 index 00000000..7139525e --- /dev/null +++ b/src/ui-sidebar.h @@ -0,0 +1,76 @@ +/* + * ui-sidebar.h + * Copyright (C) 2003-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __UI_SIDEBAR_H__ +#define __UI_SIDEBAR_H__ + +#include + +#include "view.h" + +G_BEGIN_DECLS + +#define GL_TYPE_UI_SIDEBAR (gl_ui_sidebar_get_type ()) +#define GL_UI_SIDEBAR(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_UI_SIDEBAR, glUISidebar )) +#define GL_UI_SIDEBAR_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_UI_SIDEBAR, glUISidebarClass)) +#define GL_IS_UI_SIDEBAR(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_UI_SIDEBAR)) +#define GL_IS_UI_SIDEBAR_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_UI_SIDEBAR)) + +typedef struct _glUISidebar glUISidebar; +typedef struct _glUISidebarClass glUISidebarClass; + +typedef struct _glUISidebarPrivate glUISidebarPrivate; + +struct _glUISidebar { + GtkVBox parent_widget; + + glUISidebarPrivate *priv; +}; + +struct _glUISidebarClass { + GtkVBoxClass parent_class; +}; + +GType gl_ui_sidebar_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_ui_sidebar_new (void); + +void gl_ui_sidebar_set_view (glUISidebar *sidebar, + glView *view); + + +G_END_DECLS + +#endif /* __UI_SIDEBAR_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui-util.c b/src/ui-util.c new file mode 100644 index 00000000..7494dca9 --- /dev/null +++ b/src/ui-util.c @@ -0,0 +1,137 @@ +/* + * ui-util.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "ui-util.h" + +#include + +#include "debug.h" + + +/*==========================================================================*/ +/* Private macros and constants. */ +/*==========================================================================*/ + + +/*==========================================================================*/ +/* Private types. */ +/*==========================================================================*/ + + +/*==========================================================================*/ +/* Private globals */ +/*==========================================================================*/ + + +/*==========================================================================*/ +/* Local function prototypes */ +/*==========================================================================*/ + + +/*****************************************************************************/ +/** Set sensitivity of verb. */ +/*****************************************************************************/ +void +gl_ui_util_set_verb_sensitive (GtkUIManager *ui, + gchar *cname, + gboolean sensitive) +{ + GtkAction *action; + + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (cname != NULL); + g_return_if_fail (GTK_IS_UI_MANAGER (ui)); + + action = gtk_ui_manager_get_action (ui, cname); + + if (action) { + gl_debug (DEBUG_UI, "Set action \"%s\" sensitive = %d", cname, sensitive); + gtk_action_set_sensitive (action, sensitive); + } + + gl_debug (DEBUG_UI, "END"); +} + + +/*****************************************************************************/ +/** Set sensitivity of a list of verbs. */ +/*****************************************************************************/ +void +gl_ui_util_set_verb_list_sensitive (GtkUIManager *ui, + gchar **vlist, + gboolean sensitive) +{ + GtkAction *action; + + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (vlist != NULL); + g_return_if_fail (GTK_IS_UI_MANAGER (ui)); + + for ( ; *vlist; ++vlist) + { + action = gtk_ui_manager_get_action (ui, *vlist); + + if (action) { + gtk_action_set_sensitive (action, sensitive); + } + } + + gl_debug (DEBUG_UI, "END"); +} + + +/*****************************************************************************/ +/** Set state of a verb. */ +/*****************************************************************************/ +void +gl_ui_util_set_verb_state (GtkUIManager *ui, + gchar *cname, + gboolean state) +{ + GtkToggleAction *action; + + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (cname != NULL); + g_return_if_fail (GTK_IS_UI_MANAGER (ui)); + + action = GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (ui, cname)); + + if (action) { + gtk_toggle_action_set_active (action, state); + } + + gl_debug (DEBUG_UI, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui-util.h b/src/ui-util.h new file mode 100644 index 00000000..fd9ef042 --- /dev/null +++ b/src/ui-util.h @@ -0,0 +1,53 @@ +/* + * ui-util.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __GL_UI_UTIL_H__ +#define __GL_UI_UTIL_H__ + +#include + +G_BEGIN_DECLS + +void gl_ui_util_set_verb_sensitive (GtkUIManager *ui, + gchar *cname, + gboolean sensitive); + +void gl_ui_util_set_verb_list_sensitive (GtkUIManager *ui, + gchar **vlist, + gboolean sensitive); + +void gl_ui_util_set_verb_state (GtkUIManager *ui, + gchar *cname, + gboolean state); + +G_END_DECLS + +#endif /* __GL_UI_UTIL_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui.c b/src/ui.c new file mode 100644 index 00000000..62b67d4e --- /dev/null +++ b/src/ui.c @@ -0,0 +1,1130 @@ +/* + * ui.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "ui.h" + +#include +#include +#include +#include + +#include "ui-util.h" +#include "ui-commands.h" +#include "file.h" +#include "prefs.h" +#include "stock.h" +#include "window.h" +#include "recent.h" + +#include "debug.h" + + +/*==========================================================================*/ +/* Private macros and constants. */ +/*==========================================================================*/ + + +/*==========================================================================*/ +/* Private types. */ +/*==========================================================================*/ + + +/*==========================================================================*/ +/* Local function prototypes */ +/*==========================================================================*/ + +static void view_ui_item_toggled_cb (GtkToggleAction *action, + GtkUIManager *ui); + +static void set_app_main_toolbar_style (GtkUIManager *ui); + +static void set_app_drawing_toolbar_style (GtkUIManager *ui); + +static void set_view_style (GtkUIManager *ui); + +static void connect_proxy_cb (GtkUIManager *ui, + GtkAction *action, + GtkWidget *proxy, + glWindow *window); + +static void disconnect_proxy_cb (GtkUIManager *ui, + GtkAction *action, + GtkWidget *proxy, + glWindow *window); + +static void menu_item_select_cb (GtkMenuItem *proxy, + glWindow *window); + +static void menu_item_deselect_cb (GtkMenuItem *proxy, + glWindow *window); + + +/*==========================================================================*/ +/* Private globals */ +/*==========================================================================*/ + +static GtkActionEntry entries[] = { + + /* Menu entries. */ + { "FileMenu", NULL, N_("_File") }, + { "FileRecentsMenu", NULL, N_("Open Recent _Files") }, + { "EditMenu", NULL, N_("_Edit") }, + { "ViewMenu", NULL, N_("_View") }, + { "ViewMainToolBarMenu", NULL, N_("Customize Main Toolbar") }, + { "ViewDrawingToolBarMenu", NULL, N_("Customize Drawing Toolbar") }, + { "ViewPropertyToolBarMenu", NULL, N_("Customize Properties Toolbar") }, + { "ObjectsMenu", NULL, N_("_Objects") }, + { "ObjectsCreateMenu", NULL, N_("_Create") }, + { "ObjectsOrderMenu", NULL, N_("_Order") }, + { "ObjectsRotateFlipMenu", NULL, N_("_Rotate/Flip") }, + { "ObjectsAlignHorizMenu", NULL, N_("Align _Horizontal") }, + { "ObjectsAlignVertMenu", NULL, N_("Align _Vertical") }, + { "HelpMenu", NULL, N_("_Help") }, + + /* Popup entries. */ + { "ContextMenu", NULL, N_("Context Menu") }, + { "EmptySelectionContextMenu", NULL, N_("Context Menu") }, + + /* File action entries. */ + { "FileNew", + GTK_STOCK_NEW, + N_("_New"), + "N", + N_("Create a new file"), + G_CALLBACK (gl_ui_cmd_file_new) }, + + { "FileOpen", + GTK_STOCK_OPEN, + N_("_Open..."), + "O", + N_("Open a file"), + G_CALLBACK (gl_ui_cmd_file_open) }, + + { "FileSave", + GTK_STOCK_SAVE, + N_("_Save"), + "S", + N_("Save current file"), + G_CALLBACK (gl_ui_cmd_file_save) }, + + { "FileSaveAs", + GTK_STOCK_SAVE, + N_("Save _As..."), + "S", + N_("Save the current file to a different name"), + G_CALLBACK (gl_ui_cmd_file_save_as) }, + + { "FilePrint", + GTK_STOCK_PRINT, + N_("_Print..."), + "P", + N_("Print the current file"), + G_CALLBACK (gl_ui_cmd_file_print) }, + + { "FileProperties", + GTK_STOCK_PROPERTIES, + N_("Properties..."), + NULL, + N_("Modify document properties"), + G_CALLBACK (gl_ui_cmd_file_properties) }, + + { "FileTemplateDesigner", + NULL, + N_("Template _Designer..."), + NULL, + N_("Create a custom template"), + G_CALLBACK (gl_ui_cmd_file_template_designer) }, + + { "FileClose", + GTK_STOCK_CLOSE, + N_("_Close"), + "F4", + N_("Close the current file"), + G_CALLBACK (gl_ui_cmd_file_close) }, + + { "FileQuit", + GTK_STOCK_QUIT, + N_("_Quit"), + "Q", + N_("Quit the program"), + G_CALLBACK (gl_ui_cmd_file_quit) }, + + + /* Edit action entries. */ + { "EditCut", + GTK_STOCK_CUT, + N_("Cut"), + "X", + N_("Cut the selection"), + G_CALLBACK (gl_ui_cmd_edit_cut) }, + + { "EditCopy", + GTK_STOCK_COPY, + N_("Copy"), + "C", + N_("Copy the selection"), + G_CALLBACK (gl_ui_cmd_edit_copy) }, + + { "EditPaste", + GTK_STOCK_PASTE, + N_("Paste"), + "V", + N_("Paste the clipboard"), + G_CALLBACK (gl_ui_cmd_edit_paste) }, + + { "EditDelete", + NULL, + N_("Delete"), + NULL, + N_("Delete the selected objects"), + G_CALLBACK (gl_ui_cmd_edit_delete) }, + + { "EditSelectAll", + NULL, + N_("Select All"), + "A", + N_("Select all objects"), + G_CALLBACK (gl_ui_cmd_edit_select_all) }, + + { "EditUnSelectAll", + NULL, + N_("Un-select All"), + NULL, + N_("Remove all selections"), + G_CALLBACK (gl_ui_cmd_edit_unselect_all) }, + + { "EditPreferences", + GTK_STOCK_PREFERENCES, + N_("Preferences"), + NULL, + N_("Configure the application"), + G_CALLBACK (gl_ui_cmd_edit_preferences) }, + + + /* View action entries. */ + { "ViewZoomIn", + GTK_STOCK_ZOOM_IN, + N_("Zoom in"), + NULL, + N_("Increase magnification"), + G_CALLBACK (gl_ui_cmd_view_zoomin) }, + + { "ViewZoomOut", + GTK_STOCK_ZOOM_OUT, + N_("Zoom out"), + NULL, + N_("Decrease magnification"), + G_CALLBACK (gl_ui_cmd_view_zoomout) }, + + { "ViewZoom1to1", + GTK_STOCK_ZOOM_100, + N_("Zoom 1 to 1"), + NULL, + N_("Restore scale to 100%"), + G_CALLBACK (gl_ui_cmd_view_zoom1to1) }, + + { "ViewZoomToFit", + GTK_STOCK_ZOOM_FIT, + N_("Zoom to fit"), + NULL, + N_("Set scale to fit window"), + G_CALLBACK (gl_ui_cmd_view_zoom_to_fit) }, + + + /* Objects action entries. */ + { "ObjectsArrowMode", + GL_STOCK_ARROW, + N_("Select Mode"), + NULL, + N_("Select, move and modify objects"), + G_CALLBACK (gl_ui_cmd_objects_arrow_mode) }, + + { "ObjectsCreateText", + GL_STOCK_TEXT, + N_("Text"), + NULL, + N_("Create text object"), + G_CALLBACK (gl_ui_cmd_objects_create_text) }, + + { "ObjectsCreateBox", + GL_STOCK_BOX, + N_("Box"), + NULL, + N_("Create box/rectangle object"), + G_CALLBACK (gl_ui_cmd_objects_create_box) }, + + { "ObjectsCreateLine", + GL_STOCK_LINE, + N_("Line"), + NULL, + N_("Create line object"), + G_CALLBACK (gl_ui_cmd_objects_create_line) }, + + { "ObjectsCreateEllipse", + GL_STOCK_ELLIPSE, + N_("Ellipse"), + NULL, + N_("Create ellipse/circle object"), + G_CALLBACK (gl_ui_cmd_objects_create_ellipse) }, + + { "ObjectsCreateImage", + GL_STOCK_IMAGE, + N_("Image"), + NULL, + N_("Create image object"), + G_CALLBACK (gl_ui_cmd_objects_create_image) }, + + { "ObjectsCreateBarcode", + GL_STOCK_BARCODE, + N_("Barcode"), + NULL, + N_("Create barcode object"), + G_CALLBACK (gl_ui_cmd_objects_create_barcode) }, + + { "ObjectsRaise", + GL_STOCK_ORDER_TOP, + N_("Bring to front"), + NULL, + N_("Raise object to top"), + G_CALLBACK (gl_ui_cmd_objects_raise) }, + + { "ObjectsLower", + GL_STOCK_ORDER_BOTTOM, + N_("Send to back"), + NULL, + N_("Lower object to bottom"), + G_CALLBACK (gl_ui_cmd_objects_lower) }, + + { "ObjectsRotateLeft", + GL_STOCK_ROTATE_LEFT, + N_("Rotate left"), + NULL, + N_("Rotate object 90 degrees counter-clockwise"), + G_CALLBACK (gl_ui_cmd_objects_rotate_left) }, + + { "ObjectsRotateRight", + GL_STOCK_ROTATE_RIGHT, + N_("Rotate right"), + NULL, + N_("Rotate object 90 degrees clockwise"), + G_CALLBACK (gl_ui_cmd_objects_rotate_right) }, + + { "ObjectsFlipHorizontal", + GL_STOCK_FLIP_HORIZ, + N_("Flip horizontally"), + NULL, + N_("Flip object horizontally"), + G_CALLBACK (gl_ui_cmd_objects_flip_horiz) }, + + { "ObjectsFlipVertical", + GL_STOCK_FLIP_VERT, + N_("Flip vertically"), + NULL, + N_("Flip object vertically"), + G_CALLBACK (gl_ui_cmd_objects_flip_vert) }, + + { "ObjectsAlignLeft", + GL_STOCK_ALIGN_LEFT, + N_("Align left"), + NULL, + N_("Align objects to left edges"), + G_CALLBACK (gl_ui_cmd_objects_align_left) }, + + { "ObjectsAlignRight", + GL_STOCK_ALIGN_RIGHT, + N_("Align right"), + NULL, + N_("Align objects to right edges"), + G_CALLBACK (gl_ui_cmd_objects_align_right) }, + + { "ObjectsAlignHCenter", + GL_STOCK_ALIGN_HCENTER, + N_("Align horizontal center"), + NULL, + N_("Align objects to horizontal centers"), + G_CALLBACK (gl_ui_cmd_objects_align_hcenter) }, + + { "ObjectsAlignTop", + GL_STOCK_ALIGN_TOP, + N_("Align tops"), + NULL, + N_("Align objects to top edges"), + G_CALLBACK (gl_ui_cmd_objects_align_top) }, + + { "ObjectsAlignBottom", + GL_STOCK_ALIGN_BOTTOM, + N_("Align bottoms"), + NULL, + N_("Align objects to bottom edges"), + G_CALLBACK (gl_ui_cmd_objects_align_bottom) }, + + { "ObjectsAlignVCenter", + GL_STOCK_ALIGN_VCENTER, + N_("Align vertical center"), + NULL, + N_("Align objects to vertical centers"), + G_CALLBACK (gl_ui_cmd_objects_align_vcenter) }, + + { "ObjectsCenterHorizontal", + GL_STOCK_CENTER_HORIZ, + N_("Center horizontally"), + NULL, + N_("Center objects to horizontal label center"), + G_CALLBACK (gl_ui_cmd_objects_center_horiz) }, + + { "ObjectsCenterVertical", + GL_STOCK_CENTER_VERT, + N_("Center vertically"), + NULL, + N_("Center objects to vertical label center"), + G_CALLBACK (gl_ui_cmd_objects_center_vert) }, + + { "ObjectsMergeProperties", + GL_STOCK_MERGE, + N_("Merge properties"), + NULL, + N_("Edit merge properties"), + G_CALLBACK (gl_ui_cmd_objects_merge_properties) }, + + + /* Help actions entries. */ + { "HelpContents", + GTK_STOCK_HELP, + N_("Contents"), + "F1", + N_("Open glabels manual"), + G_CALLBACK (gl_ui_cmd_help_contents) }, + + { "HelpAbout", + GTK_STOCK_ABOUT, + N_("About..."), + NULL, + N_("About glabels"), + G_CALLBACK (gl_ui_cmd_help_about) }, + +}; +static guint n_entries = G_N_ELEMENTS (entries); + +static GtkToggleActionEntry toggle_entries[] = { + + { "ViewPropertyToolBar", + NULL, + N_("Property toolbar"), + NULL, + N_("Change the visibility of the property toolbar in the current window"), + G_CALLBACK (gl_ui_cmd_view_property_bar_toggle), + TRUE }, + + { "ViewGrid", + NULL, + N_("Grid"), + NULL, + N_("Change the visibility of the grid in the current window"), + G_CALLBACK (gl_ui_cmd_view_grid_toggle), + TRUE }, + + { "ViewMarkup", + NULL, + N_("Markup"), + NULL, + N_("Change the visibility of markup lines in the current window"), + G_CALLBACK (gl_ui_cmd_view_markup_toggle), + TRUE }, + +}; +static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries); + +static GtkToggleActionEntry ui_toggle_entries[] = { + + { "ViewMainToolBar", + NULL, + N_("Main toolbar"), + NULL, + N_("Change the visibility of the main toolbar in the current window"), + G_CALLBACK (view_ui_item_toggled_cb), + TRUE }, + + { "ViewDrawingToolBar", + NULL, + N_("Drawing toolbar"), + NULL, + N_("Change the visibility of the drawing toolbar in the current window"), + G_CALLBACK (view_ui_item_toggled_cb), + TRUE }, + +}; +static guint n_ui_toggle_entries = G_N_ELEMENTS (ui_toggle_entries); + +static const gchar *ui_info = +"" +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +"" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +"" +" " +" " +" " +"" +""; + + +static gchar* doc_verbs [] = { + "/ui/MenuBar/FileMenu/FileProperties", + "/ui/MenuBar/FileMenu/FileSave", + "/ui/MenuBar/FileMenu/FileSaveAs", + "/ui/MenuBar/FileMenu/FilePrint", + "/ui/MenuBar/FileMenu/FileClose", + "/ui/MenuBar/EditMenu/EditCut", + "/ui/MenuBar/EditMenu/EditCopy", + "/ui/MenuBar/EditMenu/EditPaste", + "/ui/MenuBar/EditMenu/EditDelete", + "/ui/MenuBar/EditMenu/EditSelectAll", + "/ui/MenuBar/EditMenu/EditUnSelectAll", + "/ui/MenuBar/ViewMenu/ViewZoomIn", + "/ui/MenuBar/ViewMenu/ViewZoomOut", + "/ui/MenuBar/ViewMenu/ViewZoom1to1", + "/ui/MenuBar/ViewMenu/ViewZoomToFit", + "/ui/MenuBar/ViewMenu/ViewGrid", + "/ui/MenuBar/ViewMenu/ViewMarkup", + "/ui/MenuBar/ObjectsMenu/ObjectsArrowMode", + "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateText", + "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateLine", + "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateBox", + "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateEllipse", + "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateImage", + "/ui/MenuBar/ObjectsMenu/ObjectsCreateMenu/ObjectsCreateBarcode", + "/ui/MenuBar/ObjectsMenu/ObjectsOrderMenu/ObjectsRaise", + "/ui/MenuBar/ObjectsMenu/ObjectsOrderMenu/ObjectsLower", + "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsRotateLeft", + "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsRotateRight", + "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsFlipHorizontal", + "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsFlipVertical", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignLeft", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignRight", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignHCenter", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsCenterHorizontal", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignTop", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignBottom", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignVCenter", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsCenterVertical", + "/ui/MenuBar/ObjectsMenu/ObjectsMergeProperties", + + NULL +}; + +static gchar* doc_modified_verbs [] = { + "/ui/MenuBar/FileMenu/FileSave", + + NULL +}; + +static gchar* selection_verbs [] = { + "/ui/MenuBar/EditMenu/EditCut", + "/ui/MenuBar/EditMenu/EditCopy", + "/ui/MenuBar/EditMenu/EditDelete", + "/ui/MenuBar/EditMenu/EditUnSelectAll", + "/ui/MenuBar/ObjectsMenu/ObjectsOrderMenu/ObjectsRaise", + "/ui/MenuBar/ObjectsMenu/ObjectsOrderMenu/ObjectsLower", + "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsRotateLeft", + "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsRotateRight", + "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsFlipHorizontal", + "/ui/MenuBar/ObjectsMenu/ObjectsRotateFlipMenu/ObjectsFlipVertical", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsCenterHorizontal", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsCenterVertical", + + NULL +}; + +static gchar* atomic_selection_verbs [] = { + + NULL +}; + +static gchar* multi_selection_verbs [] = { + "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignLeft", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignRight", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignHorizMenu/ObjectsAlignHCenter", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignTop", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignBottom", + "/ui/MenuBar/ObjectsMenu/ObjectsAlignVertMenu/ObjectsAlignVCenter", + + NULL +}; + + +/*****************************************************************************/ +/** Initialize UI component for given window. */ +/*****************************************************************************/ +GtkUIManager * +gl_ui_new (glWindow *window) +{ + GtkUIManager *ui; + GtkActionGroup *actions; + GError *error = NULL; + GtkWidget *recent_menu; + + gl_debug (DEBUG_UI, "START"); + + g_return_val_if_fail (window && GL_IS_WINDOW (window), NULL); + + gl_debug (DEBUG_UI, "window = %p", window); + + ui = gtk_ui_manager_new (); + + g_signal_connect (ui, "connect_proxy", + G_CALLBACK (connect_proxy_cb), window); + g_signal_connect (ui, "disconnect_proxy", + G_CALLBACK (disconnect_proxy_cb), window); + + actions = gtk_action_group_new ("Actions"); + gtk_action_group_set_translation_domain (actions, NULL); + gtk_action_group_add_actions (actions, entries, n_entries, GTK_WINDOW (window)); + gtk_action_group_add_toggle_actions (actions, + toggle_entries, n_toggle_entries, + window); + gtk_action_group_add_toggle_actions (actions, + ui_toggle_entries, n_ui_toggle_entries, + ui); + + gtk_ui_manager_insert_action_group (ui, actions, 0); + gtk_window_add_accel_group (GTK_WINDOW (window), gtk_ui_manager_get_accel_group (ui)); + + gl_debug (DEBUG_UI, "Creating ui from string"); + if (!gtk_ui_manager_add_ui_from_string (ui, ui_info, strlen (ui_info), &error)) { + g_message ("building menus failed: %s", error->message); + g_error_free (error); + } + + /* Set the toolbar styles according to prefs */ + set_app_main_toolbar_style (ui); + set_app_drawing_toolbar_style (ui); + + /* Set view grid and markup visibility according to prefs */ + set_view_style (ui); + + /* add an Open Recents Submenu */ + recent_menu = gl_recent_create_menu (); + g_signal_connect (G_OBJECT (recent_menu), "item-activated", + G_CALLBACK (gl_ui_cmd_file_open_recent), window); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (gtk_ui_manager_get_widget (ui, "/MenuBar/FileMenu/FileRecentsMenu")), + recent_menu); + + + gl_ui_util_set_verb_list_sensitive (ui, doc_verbs, FALSE); + + gl_debug (DEBUG_UI, "END"); + + return ui; +} + + +/*****************************************************************************/ +/** Unref wrapper. */ +/*****************************************************************************/ +void +gl_ui_unref (GtkUIManager *ui) +{ + gl_debug (DEBUG_UI, "START"); + + g_object_unref(ui); + + gl_debug (DEBUG_UI, "END"); +} + + +/*****************************************************************************/ +/** Update all verbs of given UI component. */ +/*****************************************************************************/ +void +gl_ui_update_all (GtkUIManager *ui, + glView *view) +{ + glLabel *label; + + gl_debug (DEBUG_UI, "START"); + + gl_ui_util_set_verb_list_sensitive (ui, doc_verbs, TRUE); + + label = view->label; + g_return_if_fail (label != NULL); + + gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/EditMenu/EditUndo", + gl_label_can_undo (label)); + gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/EditMenu/EditRedo", + gl_label_can_redo (label)); + + gl_ui_util_set_verb_list_sensitive (ui, doc_modified_verbs, + gl_label_is_modified (label)); + + gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewZoomIn", + !gl_view_is_zoom_max (view)); + gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewZoomOut", + !gl_view_is_zoom_min (view)); + + gl_ui_util_set_verb_list_sensitive (ui, selection_verbs, + !gl_view_is_selection_empty (view)); + + gl_ui_util_set_verb_list_sensitive (ui, atomic_selection_verbs, + gl_view_is_selection_atomic (view)); + + gl_ui_util_set_verb_list_sensitive (ui, multi_selection_verbs, + !gl_view_is_selection_empty (view) + && !gl_view_is_selection_atomic (view)); + + gl_debug (DEBUG_UI, "END"); +} + + +/*****************************************************************************/ +/** Update all verbs of given UI component to "no document" state. */ +/*****************************************************************************/ +void +gl_ui_update_nodoc (GtkUIManager *ui) +{ + gl_debug (DEBUG_UI, "START"); + + gl_ui_util_set_verb_list_sensitive (ui, doc_verbs, FALSE); + + gl_debug (DEBUG_UI, "END"); +} + + +/*****************************************************************************/ +/** Update label modified verbs of given UI component. */ +/*****************************************************************************/ +void +gl_ui_update_modified_verbs (GtkUIManager *ui, + glLabel *label) +{ + gl_debug (DEBUG_UI, "START"); + + gl_ui_util_set_verb_list_sensitive (ui, + doc_modified_verbs, + gl_label_is_modified (label)); + + gl_debug (DEBUG_UI, "END"); +} + + +/*****************************************************************************/ +/** Update verbs associated with selection state of given UI component. */ +/*****************************************************************************/ +void +gl_ui_update_selection_verbs (GtkUIManager *ui, + glView *view) +{ + gl_debug (DEBUG_UI, "START"); + + gl_ui_util_set_verb_list_sensitive (ui, selection_verbs, + !gl_view_is_selection_empty (view)); + + gl_ui_util_set_verb_list_sensitive (ui, atomic_selection_verbs, + gl_view_is_selection_atomic (view)); + + gl_ui_util_set_verb_list_sensitive (ui, multi_selection_verbs, + !gl_view_is_selection_empty (view) + && !gl_view_is_selection_atomic (view)); + + gl_debug (DEBUG_UI, "END"); +} + + +/*****************************************************************************/ +/** Update verbs associated with zoom level of given UI component. */ +/*****************************************************************************/ +void +gl_ui_update_zoom_verbs (GtkUIManager *ui, + glView *view) +{ + gl_debug (DEBUG_UI, "START"); + + gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewZoomIn", + !gl_view_is_zoom_max (view)); + gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/ViewMenu/ViewZoomOut", + !gl_view_is_zoom_min (view)); + + gl_debug (DEBUG_UI, "END"); +} + + +/*****************************************************************************/ +/** Update undo/redo verbs of given UI component. */ +/*****************************************************************************/ +void +gl_ui_update_undo_redo_verbs (GtkUIManager *ui, + glLabel *label) +{ + gl_debug (DEBUG_UI, "START"); + + gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/EditMenu/EditUndo", + gl_label_can_undo (label)); + + gl_ui_util_set_verb_sensitive (ui, "/ui/MenuBar/EditMenu/EditRedo", + gl_label_can_redo (label)); + + gl_debug (DEBUG_UI, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. View menu item toggled callback. */ +/*---------------------------------------------------------------------------*/ +static void +view_ui_item_toggled_cb (GtkToggleAction *action, + GtkUIManager *ui) +{ + const gchar *name; + gboolean state; + + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (action && GTK_IS_TOGGLE_ACTION (action)); + + name = gtk_action_get_name (GTK_ACTION (action)); + state = gtk_toggle_action_get_active (action); + + gl_debug (DEBUG_UI, "Action = %s, State = %d", name, state); + + if (strcmp (name, "ViewMainToolBar") == 0) + { + gl_prefs->main_toolbar_visible = state; + set_app_main_toolbar_style (ui); + gl_prefs_model_save_settings (gl_prefs); + } + + if (strcmp (name, "ViewDrawingToolBar") == 0) + { + gl_prefs->drawing_toolbar_visible = state; + set_app_drawing_toolbar_style (ui); + gl_prefs_model_save_settings (gl_prefs); + } + + gl_debug (DEBUG_UI, ""); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Set main toolbar style. */ +/*---------------------------------------------------------------------------*/ +static void +set_app_main_toolbar_style (GtkUIManager *ui) +{ + GtkWidget *toolbar; + + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (ui && GTK_IS_UI_MANAGER (ui)); + + /* Updated view menu */ + gl_ui_util_set_verb_state (ui, "/ui/ViewMenu/ViewMainToolBar", + gl_prefs->main_toolbar_visible); + + toolbar = gtk_ui_manager_get_widget (ui, "/MainToolBar"); + + if (gl_prefs->main_toolbar_visible) { + gtk_widget_show_all (toolbar); + } else { + gtk_widget_hide (toolbar); + } + + gl_debug (DEBUG_UI, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Set drawing toolbar style. */ +/*---------------------------------------------------------------------------*/ +static void +set_app_drawing_toolbar_style (GtkUIManager *ui) +{ + GtkWidget *toolbar; + + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (ui && GTK_IS_UI_MANAGER (ui)); + + /* Updated view menu */ + gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenu/ViewDrawingToolBar", + gl_prefs->drawing_toolbar_visible); + + toolbar = gtk_ui_manager_get_widget (ui, "/DrawingToolBar"); + + gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS); + + if (gl_prefs->drawing_toolbar_visible) { + gtk_widget_show_all (toolbar); + } else { + gtk_widget_hide (toolbar); + } + + gl_debug (DEBUG_UI, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Set visibility of grid and markup. */ +/*---------------------------------------------------------------------------*/ +static void +set_view_style (GtkUIManager *ui) +{ + gl_debug (DEBUG_UI, "START"); + + g_return_if_fail (ui && GTK_IS_UI_MANAGER(ui)); + + gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenu/ViewGrid", + gl_prefs->grid_visible); + + gl_ui_util_set_verb_state (ui, "/ui/MenuBar/ViewMenu/ViewMarkup", + gl_prefs->markup_visible); + + gl_debug (DEBUG_UI, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Connect proxy callback. */ +/*---------------------------------------------------------------------------*/ +static void +connect_proxy_cb (GtkUIManager *ui, + GtkAction *action, + GtkWidget *proxy, + glWindow *window) +{ + if (GTK_IS_MENU_ITEM (proxy)) + { + g_signal_connect (proxy, "select", + G_CALLBACK (menu_item_select_cb), window); + g_signal_connect (proxy, "deselect", + G_CALLBACK (menu_item_deselect_cb), window); + } +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Disconnect proxy callback. */ +/*---------------------------------------------------------------------------*/ +static void +disconnect_proxy_cb (GtkUIManager *ui, + GtkAction *action, + GtkWidget *proxy, + glWindow *window) +{ + if (GTK_IS_MENU_ITEM (proxy)) + { + g_signal_handlers_disconnect_by_func + (proxy, G_CALLBACK (menu_item_select_cb), window); + g_signal_handlers_disconnect_by_func + (proxy, G_CALLBACK (menu_item_deselect_cb), window); + } +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Menu item select callback. */ +/*---------------------------------------------------------------------------*/ +static void +menu_item_select_cb (GtkMenuItem *proxy, + glWindow *window) +{ + GtkAction *action; + char *message; + + g_return_if_fail (window && GL_IS_WINDOW (window)); + g_return_if_fail (window->status_bar && GTK_IS_STATUSBAR (window->status_bar)); + + action = g_object_get_data (G_OBJECT (proxy), "gtk-action"); + g_return_if_fail (action != NULL); + + g_object_get (G_OBJECT (action), "tooltip", &message, NULL); + if (message) + { + gtk_statusbar_push (GTK_STATUSBAR (window->status_bar), + window->menu_tips_context_id, message); + g_free (message); + } +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Menu item deselect callback. */ +/*---------------------------------------------------------------------------*/ +static void +menu_item_deselect_cb (GtkMenuItem *proxy, + glWindow *window) +{ + g_return_if_fail (window && GL_IS_WINDOW (window)); + g_return_if_fail (window->status_bar && GTK_IS_STATUSBAR (window->status_bar)); + + gtk_statusbar_pop (GTK_STATUSBAR (window->status_bar), + window->menu_tips_context_id); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/ui.h b/src/ui.h new file mode 100644 index 00000000..fb681cc5 --- /dev/null +++ b/src/ui.h @@ -0,0 +1,65 @@ +/* + * ui.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __GL_UI_H__ +#define __GL_UI_H__ + +#include + +#include "window.h" +#include "view.h" + +G_BEGIN_DECLS + +GtkUIManager *gl_ui_new (glWindow *window); + +void gl_ui_unref (GtkUIManager *ui); + +void gl_ui_update_all (GtkUIManager *ui, + glView *view); + +void gl_ui_update_nodoc (GtkUIManager *ui); + +void gl_ui_update_modified_verbs (GtkUIManager *ui, + glLabel *label); + +void gl_ui_update_selection_verbs (GtkUIManager *ui, + glView *view); + +void gl_ui_update_zoom_verbs (GtkUIManager *ui, + glView *view); + +void gl_ui_update_undo_redo_verbs (GtkUIManager *ui, + glLabel *label); + +G_END_DECLS + +#endif /* __GL_UI_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-barcode.c b/src/view-barcode.c new file mode 100644 index 00000000..84b9cfa4 --- /dev/null +++ b/src/view-barcode.c @@ -0,0 +1,443 @@ +/* + * view-barcode.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "view-barcode.h" + +#include +#include + +#include "color.h" +#include "object-editor.h" +#include "stock.h" + +#include "pixmaps/cursor_barcode.xbm" +#include "pixmaps/cursor_barcode_mask.xbm" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glViewBarcodePrivate { +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_view_barcode_finalize (GObject *object); + +static GtkWidget *construct_properties_editor (glViewObject *view_object); + +static void update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object); + +static void update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor); + +static void update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor); + +static gboolean object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glViewBarcode, gl_view_barcode, GL_TYPE_VIEW_OBJECT); + + +static void +gl_view_barcode_class_init (glViewBarcodeClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); + + gl_debug (DEBUG_VIEW, "START"); + + gl_view_barcode_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_view_barcode_finalize; + + view_object_class->construct_editor = construct_properties_editor; + view_object_class->object_at = object_at; + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_barcode_init (glViewBarcode *view_barcode) +{ + gl_debug (DEBUG_VIEW, "START"); + + view_barcode->priv = g_new0 (glViewBarcodePrivate, 1); + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_barcode_finalize (GObject *object) +{ + glViewBarcode *view_barcode = GL_VIEW_BARCODE (object); + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (object && GL_IS_VIEW_BARCODE (object)); + + g_free (view_barcode->priv); + + G_OBJECT_CLASS (gl_view_barcode_parent_class)->finalize (object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* NEW barcode object view. */ +/*****************************************************************************/ +glViewObject * +gl_view_barcode_new (glLabelBarcode *object, + glView *view) +{ + glViewBarcode *view_barcode; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_BARCODE (object), NULL); + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + view_barcode = g_object_new (gl_view_barcode_get_type(), NULL); + + gl_view_object_set_object (GL_VIEW_OBJECT(view_barcode), + GL_LABEL_OBJECT(object), + GL_VIEW_OBJECT_HANDLES_BOX); + gl_view_object_set_view (GL_VIEW_OBJECT(view_barcode), view); + + gl_debug (DEBUG_VIEW, "END"); + + return GL_VIEW_OBJECT (view_barcode); +} + + +/*****************************************************************************/ +/* Create a properties dialog for a barcode object. */ +/*****************************************************************************/ +static GtkWidget * +construct_properties_editor (glViewObject *view_object) +{ + GtkWidget *editor; + glViewBarcode *view_bc = (glViewBarcode *)view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + object = gl_view_object_get_object (GL_VIEW_OBJECT(view_bc)); + + /* Build editor. */ + editor = gl_object_editor_new (GL_STOCK_BARCODE, _("Barcode object properties"), + object->parent, + GL_OBJECT_EDITOR_POSITION_PAGE, + GL_OBJECT_EDITOR_SIZE_PAGE, + GL_OBJECT_EDITOR_BC_PAGE, + GL_OBJECT_EDITOR_DATA_PAGE, + 0); + + /* Update */ + update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); + update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); + + /* Connect signals. */ + g_signal_connect (G_OBJECT (editor), "changed", + G_CALLBACK(update_object_from_editor_cb), object); + g_signal_connect (G_OBJECT (object), "changed", + G_CALLBACK (update_editor_from_object_cb), editor); + g_signal_connect (G_OBJECT (object), "moved", + G_CALLBACK (update_editor_from_move_cb), editor); + + gl_debug (DEBUG_VIEW, "END"); + + return editor; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. editor "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object) +{ + gdouble x, y, w, h; + glTextNode *text_node; + gchar *id; + gboolean text_flag, cs_flag; + glColorNode *color_node; + guint format_digits; + + gl_debug (DEBUG_VIEW, "START"); + + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + + gl_object_editor_get_position (editor, &x, &y); + gl_label_object_set_position (object, x, y); + + gl_object_editor_get_size (editor, &w, &h); + gl_label_object_set_size (object, w, h); + + text_node = gl_object_editor_get_data (editor); + gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node); + gl_text_node_free (&text_node); + + gl_object_editor_get_bc_style (editor, &id, &text_flag, &cs_flag, &format_digits); + color_node = gl_object_editor_get_bc_color (editor); + gl_label_barcode_set_props (GL_LABEL_BARCODE(object), + id, text_flag, cs_flag, format_digits); + gl_label_object_set_line_color (object, color_node); + gl_color_node_free (&color_node); + g_free (id); + + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor) +{ + gdouble w, h; + glTextNode *text_node; + gchar *id; + gboolean text_flag, cs_flag; + glColorNode *color_node; + glMerge *merge; + guint format_digits; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_size (object, &w, &h); + gl_object_editor_set_size (editor, w, h); + + merge = gl_label_get_merge (GL_LABEL(object->parent)); + + gl_label_barcode_get_props (GL_LABEL_BARCODE(object), + &id, &text_flag, &cs_flag, &format_digits); + color_node = gl_label_object_get_line_color (object); + gl_object_editor_set_bc_style (editor, id, text_flag, cs_flag, format_digits); + gl_object_editor_set_bc_color (editor, (merge != NULL), color_node); + gl_color_node_free (&color_node); + g_free (id); + + text_node = gl_label_barcode_get_data (GL_LABEL_BARCODE(object)); + gl_object_editor_set_data (editor, (merge != NULL), text_node); + gl_text_node_free (&text_node); + + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "moved" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor) +{ + gdouble x, y; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_position (object, &x, &y); + gl_object_editor_set_position (editor, x, y); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Is object at (x,y)? */ +/*****************************************************************************/ +static gboolean +object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y) +{ + glLabelObject *object; + gdouble w, h; + + object = gl_view_object_get_object (view_object); + + gl_label_object_get_size (object, &w, &h); + + cairo_rectangle (cr, 0.0, 0.0, w, h); + + if (cairo_in_fill (cr, x, y)) + { + return TRUE; + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Return apropos cursor for create object mode. */ +/*****************************************************************************/ +GdkCursor * +gl_view_barcode_get_create_cursor (void) +{ + GdkCursor *cursor = NULL; + GdkPixmap *pixmap_data, *pixmap_mask; + GdkColor fg = { 0, 0, 0, 0 }; + GdkColor bg = { 0, 65535, 65535, 65535 }; + + gl_debug (DEBUG_VIEW, "START"); + + pixmap_data = gdk_bitmap_create_from_data (NULL, + (gchar *)cursor_barcode_bits, + cursor_barcode_width, + cursor_barcode_height); + pixmap_mask = gdk_bitmap_create_from_data (NULL, + (gchar *)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); + + gl_debug (DEBUG_VIEW, "END"); + + return cursor; +} + + +/*****************************************************************************/ +/* Object creation handler: button press event. */ +/*****************************************************************************/ +void +gl_view_barcode_create_button_press_event (glView *view, + gdouble x, + gdouble y) +{ + GObject *object; + glTextNode *text_node; + glColorNode *line_color_node; + + gl_view_unselect_all (view); + + line_color_node = gl_color_node_new_default (); + + object = gl_label_barcode_new (view->label); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + text_node = gl_text_node_new_from_text ("123456789"); + gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node); + line_color_node->color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5); + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), + line_color_node); + + gl_color_node_free (&line_color_node); + + view->create_object = GL_LABEL_OBJECT (object); + view->create_x0 = x; + view->create_y0 = y; +} + + +/*****************************************************************************/ +/* Object creation handler: motion event. */ +/*****************************************************************************/ +void +gl_view_barcode_create_motion_event (glView *view, + gdouble x, + gdouble y) +{ + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); +} + + +/*****************************************************************************/ +/* Object creation handler: button relesase event. */ +/*****************************************************************************/ +void +gl_view_barcode_create_button_release_event (glView *view, + gdouble x, + gdouble y) +{ + glColorNode *line_color_node; + + line_color_node = gl_color_node_new_default (); + + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); + line_color_node->color = gl_view_get_default_line_color(view); + gl_label_object_set_line_color (GL_LABEL_OBJECT(view->create_object), line_color_node); + gl_color_node_free (&line_color_node); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-barcode.h b/src/view-barcode.h new file mode 100644 index 00000000..a2b52d08 --- /dev/null +++ b/src/view-barcode.h @@ -0,0 +1,88 @@ +/* + * view-barcode.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __VIEW_BARCODE_H__ +#define __VIEW_BARCODE_H__ + +#include "view-object.h" +#include "label-barcode.h" + +G_BEGIN_DECLS + + +#define GL_TYPE_VIEW_BARCODE (gl_view_barcode_get_type ()) +#define GL_VIEW_BARCODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_BARCODE, glViewBarcode)) +#define GL_VIEW_BARCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_BARCODE, glViewBarcodeClass)) +#define GL_IS_VIEW_BARCODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_BARCODE)) +#define GL_IS_VIEW_BARCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_BARCODE)) + +typedef struct _glViewBarcode glViewBarcode; +typedef struct _glViewBarcodeClass glViewBarcodeClass; + +typedef struct _glViewBarcodePrivate glViewBarcodePrivate; + +struct _glViewBarcode { + glViewObject parent_object; + + glViewBarcodePrivate *priv; +}; + +struct _glViewBarcodeClass { + glViewObjectClass parent_class; +}; + + +GType gl_view_barcode_get_type (void) G_GNUC_CONST; + +glViewObject *gl_view_barcode_new (glLabelBarcode *object, + glView *view); + + +/* cursor for creating barcode objects */ +GdkCursor *gl_view_barcode_get_create_cursor (void); + +/* Object creation handlers. */ +void gl_view_barcode_create_button_press_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_barcode_create_motion_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_barcode_create_button_release_event (glView *view, + gdouble x, + gdouble y); + + +G_END_DECLS + +#endif /* __VIEW_BARCODE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-box.c b/src/view-box.c new file mode 100644 index 00000000..bcb76931 --- /dev/null +++ b/src/view-box.c @@ -0,0 +1,504 @@ +/* + * view-box.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "view-box.h" + +#include +#include + +#include "color.h" +#include "object-editor.h" +#include "stock.h" + +#include "pixmaps/cursor_box.xbm" +#include "pixmaps/cursor_box_mask.xbm" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glViewBoxPrivate { +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_view_box_finalize (GObject *object); + +static GtkWidget *construct_properties_editor (glViewObject *view_object); + +static void update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object); + +static void update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor); + +static void update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor); + +static gboolean object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glViewBox, gl_view_box, GL_TYPE_VIEW_OBJECT); + + +static void +gl_view_box_class_init (glViewBoxClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); + + gl_debug (DEBUG_VIEW, "START"); + + gl_view_box_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_view_box_finalize; + + view_object_class->construct_editor = construct_properties_editor; + view_object_class->object_at = object_at; + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_box_init (glViewBox *view_box) +{ + gl_debug (DEBUG_VIEW, "START"); + + view_box->priv = g_new0 (glViewBoxPrivate, 1); + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_box_finalize (GObject *object) +{ + glViewBox *view_box = GL_VIEW_BOX (object); + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (object && GL_IS_VIEW_BOX (object)); + + g_free (view_box->priv); + + G_OBJECT_CLASS (gl_view_box_parent_class)->finalize (object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* NEW box object view. */ +/*****************************************************************************/ +glViewObject * +gl_view_box_new (glLabelBox *object, + glView *view) +{ + glViewBox *view_box; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_BOX (object), NULL); + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + view_box = g_object_new (gl_view_box_get_type(), NULL); + + gl_view_object_set_object (GL_VIEW_OBJECT(view_box), + GL_LABEL_OBJECT(object), + GL_VIEW_OBJECT_HANDLES_BOX); + gl_view_object_set_view (GL_VIEW_OBJECT(view_box), view); + + gl_debug (DEBUG_VIEW, "END"); + + return GL_VIEW_OBJECT (view_box); +} + + +/*****************************************************************************/ +/* Create a properties dialog for a box object. */ +/*****************************************************************************/ +static GtkWidget * +construct_properties_editor (glViewObject *view_object) +{ + GtkWidget *editor; + glViewBox *view_box = (glViewBox *)view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + object = gl_view_object_get_object (GL_VIEW_OBJECT(view_box)); + + /* Build editor. */ + editor = gl_object_editor_new (GL_STOCK_BOX, _("Box object properties"), + object->parent, + GL_OBJECT_EDITOR_SHADOW_PAGE, + GL_OBJECT_EDITOR_POSITION_PAGE, + GL_OBJECT_EDITOR_SIZE_PAGE, + GL_OBJECT_EDITOR_FILL_PAGE, + GL_OBJECT_EDITOR_LINE_PAGE, + 0); + + /* Update */ + update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); + update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); + + /* Connect signals. */ + g_signal_connect (G_OBJECT (editor), "changed", + G_CALLBACK(update_object_from_editor_cb), object); + g_signal_connect (G_OBJECT (object), "changed", + G_CALLBACK (update_editor_from_object_cb), editor); + g_signal_connect (G_OBJECT (object), "moved", + G_CALLBACK (update_editor_from_move_cb), editor); + + gl_debug (DEBUG_VIEW, "END"); + + return editor; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. editor "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object) +{ + gdouble x, y, w, h; + glColorNode *line_color_node; + gdouble line_width; + glColorNode *fill_color_node; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + + + gl_debug (DEBUG_VIEW, "START"); + + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_object_editor_get_position (editor, &x, &y); + gl_label_object_set_position (object, x, y); + + gl_object_editor_get_size (editor, &w, &h); + gl_label_object_set_size (object, w, h); + + fill_color_node = gl_object_editor_get_fill_color (editor); + gl_label_object_set_fill_color (object, fill_color_node); + gl_color_node_free (&fill_color_node); + + line_color_node = gl_object_editor_get_line_color (editor); + gl_label_object_set_line_color (object, line_color_node); + gl_color_node_free (&line_color_node); + + line_width = gl_object_editor_get_line_width (editor); + gl_label_object_set_line_width (object, line_width); + + shadow_state = gl_object_editor_get_shadow_state (editor); + gl_label_object_set_shadow_state (object, shadow_state); + + gl_object_editor_get_shadow_offset (editor, &shadow_x, &shadow_y); + gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); + + shadow_color_node = gl_object_editor_get_shadow_color (editor); + gl_label_object_set_shadow_color (object, shadow_color_node); + gl_color_node_free (&shadow_color_node); + + shadow_opacity = gl_object_editor_get_shadow_opacity (editor); + gl_label_object_set_shadow_opacity (object, shadow_opacity); + + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor) +{ + gdouble w, h; + glColorNode *line_color_node; + gdouble line_width; + glColorNode *fill_color_node; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + glMerge *merge; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_size (object, &w, &h); + gl_object_editor_set_size (editor, w, h); + merge = gl_label_get_merge (GL_LABEL(object->parent)); + + fill_color_node = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object)); + gl_object_editor_set_fill_color (editor, (merge != NULL), fill_color_node); + gl_color_node_free (&fill_color_node); + + line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); + gl_object_editor_set_line_color (editor, (merge != NULL), line_color_node); + gl_color_node_free (&line_color_node); + + line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); + gl_object_editor_set_line_width (editor, line_width); + + shadow_state = gl_label_object_get_shadow_state (object); + gl_object_editor_set_shadow_state (editor, shadow_state); + + gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); + gl_object_editor_set_shadow_offset (editor, shadow_x, shadow_y); + + shadow_color_node = gl_label_object_get_shadow_color (object); + gl_object_editor_set_shadow_color (editor, (merge != NULL), shadow_color_node); + gl_color_node_free (&shadow_color_node); + + shadow_opacity = gl_label_object_get_shadow_opacity (object); + gl_object_editor_set_shadow_opacity (editor, shadow_opacity); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "moved" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor) +{ + gdouble x, y; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_position (object, &x, &y); + gl_object_editor_set_position (editor, x, y); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Is object at (x,y)? */ +/*****************************************************************************/ +static gboolean +object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y) +{ + glLabelObject *object; + gdouble w, h; + gdouble line_width; + + object = gl_view_object_get_object (view_object); + + gl_label_object_get_size (object, &w, &h); + + cairo_rectangle (cr, 0.0, 0.0, w, h); + + if (cairo_in_fill (cr, x, y)) + { + return TRUE; + } + + line_width = gl_label_object_get_line_width (object); + cairo_set_line_width (cr, line_width); + if (cairo_in_stroke (cr, x, y)) + { + return TRUE; + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Return apropos cursor for create object mode. */ +/*****************************************************************************/ +GdkCursor * +gl_view_box_get_create_cursor (void) +{ + GdkCursor *cursor = NULL; + GdkPixmap *pixmap_data, *pixmap_mask; + GdkColor fg = { 0, 0, 0, 0 }; + GdkColor bg = { 0, 65535, 65535, 65535 }; + + gl_debug (DEBUG_VIEW, "START"); + + pixmap_data = gdk_bitmap_create_from_data (NULL, + (gchar *)cursor_box_bits, + cursor_box_width, + cursor_box_height); + pixmap_mask = gdk_bitmap_create_from_data (NULL, + (gchar *)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); + + gl_debug (DEBUG_VIEW, "END"); + + return cursor; +} + + +/*****************************************************************************/ +/* Object creation handler: button press event. */ +/*****************************************************************************/ +void +gl_view_box_create_button_press_event (glView *view, + gdouble x, + gdouble y) +{ + GObject *object; + glColorNode *fill_color_node; + glColorNode *line_color_node; + + gl_view_unselect_all (view); + + fill_color_node = gl_color_node_new_default (); + line_color_node = gl_color_node_new_default (); + + object = gl_label_box_new (view->label); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + gl_label_object_set_size (GL_LABEL_OBJECT(object), 0.0, 0.0); + line_color_node->color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5); + fill_color_node->color = gl_color_set_opacity (gl_view_get_default_fill_color(view), 0.5); + gl_label_object_set_line_width (GL_LABEL_OBJECT(object), + gl_view_get_default_line_width(view)); + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), + line_color_node); + gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), + fill_color_node); + + gl_color_node_free (&fill_color_node); + gl_color_node_free (&line_color_node); + + view->create_object = GL_LABEL_OBJECT (object); + view->create_x0 = x; + view->create_y0 = y; +} + + +/*****************************************************************************/ +/* Object creation handler: motion event. */ +/*****************************************************************************/ +void +gl_view_box_create_motion_event (glView *view, + gdouble x, + gdouble y) +{ + gdouble w, h; + + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), + MIN (x, view->create_x0), MIN (y, view->create_y0)); + w = MAX (x, view->create_x0) - MIN (x, view->create_x0); + h = MAX (y, view->create_y0) - MIN (y, view->create_y0); + gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); +} + + +/*****************************************************************************/ +/* Object creation handler: button relesase event. */ +/*****************************************************************************/ +void +gl_view_box_create_button_release_event (glView *view, + gdouble x, + gdouble y) +{ + glColorNode *fill_color_node; + glColorNode *line_color_node; + gdouble w, h; + + fill_color_node = gl_color_node_new_default (); + line_color_node = gl_color_node_new_default (); + + if ((view->create_x0 == x) && (view->create_y0 == y)) { + x = view->create_x0 + 36.0; + y = view->create_y0 + 36.0; + } + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), + MIN (x, view->create_x0), MIN (y, view->create_y0)); + w = MAX (x, view->create_x0) - MIN (x, view->create_x0); + h = MAX (y, view->create_y0) - MIN (y, view->create_y0); + gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); + line_color_node->color = gl_view_get_default_line_color(view); + gl_label_object_set_line_color (GL_LABEL_OBJECT(view->create_object), line_color_node); + fill_color_node->color = gl_view_get_default_fill_color(view); + gl_label_object_set_fill_color (GL_LABEL_OBJECT(view->create_object), fill_color_node); + gl_color_node_free (&fill_color_node); + gl_color_node_free (&line_color_node); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-box.h b/src/view-box.h new file mode 100644 index 00000000..930ae1ec --- /dev/null +++ b/src/view-box.h @@ -0,0 +1,88 @@ +/* + * view-box.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __VIEW_BOX_H__ +#define __VIEW_BOX_H__ + +#include "view-object.h" +#include "label-box.h" + +G_BEGIN_DECLS + + +#define GL_TYPE_VIEW_BOX (gl_view_box_get_type ()) +#define GL_VIEW_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_BOX, glViewBox)) +#define GL_VIEW_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_BOX, glViewBoxClass)) +#define GL_IS_VIEW_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_BOX)) +#define GL_IS_VIEW_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_BOX)) + +typedef struct _glViewBox glViewBox; +typedef struct _glViewBoxClass glViewBoxClass; + +typedef struct _glViewBoxPrivate glViewBoxPrivate; + +struct _glViewBox { + glViewObject parent_object; + + glViewBoxPrivate *priv; +}; + +struct _glViewBoxClass { + glViewObjectClass parent_class; +}; + + +GType gl_view_box_get_type (void) G_GNUC_CONST; + +glViewObject *gl_view_box_new (glLabelBox *object, + glView *view); + + +/* cursor for creating box objects */ +GdkCursor *gl_view_box_get_create_cursor (void); + +/* Object creation handlers. */ +void gl_view_box_create_button_press_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_box_create_motion_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_box_create_button_release_event (glView *view, + gdouble x, + gdouble y); + + +G_END_DECLS + +#endif /* __VIEW_BOX_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-ellipse.c b/src/view-ellipse.c new file mode 100644 index 00000000..a5069b23 --- /dev/null +++ b/src/view-ellipse.c @@ -0,0 +1,506 @@ +/* + * view-ellipse.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "view-ellipse.h" + +#include +#include +#include + +#include "cairo-ellipse-path.h" +#include "color.h" +#include "object-editor.h" +#include "stock.h" + +#include "pixmaps/cursor_ellipse.xbm" +#include "pixmaps/cursor_ellipse_mask.xbm" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glViewEllipsePrivate { +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_view_ellipse_finalize (GObject *object); + +static GtkWidget *construct_properties_editor (glViewObject *view_object); + +static void update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object); + +static void update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor); + +static void update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor); + +static gboolean object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glViewEllipse, gl_view_ellipse, GL_TYPE_VIEW_OBJECT); + + +static void +gl_view_ellipse_class_init (glViewEllipseClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); + + gl_debug (DEBUG_VIEW, "START"); + + gl_view_ellipse_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_view_ellipse_finalize; + + view_object_class->construct_editor = construct_properties_editor; + view_object_class->object_at = object_at; + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_ellipse_init (glViewEllipse *view_ellipse) +{ + gl_debug (DEBUG_VIEW, "START"); + + view_ellipse->priv = g_new0 (glViewEllipsePrivate, 1); + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_ellipse_finalize (GObject *object) +{ + glViewEllipse *view_ellipse = GL_VIEW_ELLIPSE (object); + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (object && GL_IS_VIEW_ELLIPSE (object)); + + g_free (view_ellipse->priv); + + G_OBJECT_CLASS (gl_view_ellipse_parent_class)->finalize (object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* NEW ellipse object view. */ +/*****************************************************************************/ +glViewObject * +gl_view_ellipse_new (glLabelEllipse *object, + glView *view) +{ + glViewEllipse *view_ellipse; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_ELLIPSE (object), NULL); + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + view_ellipse = g_object_new (gl_view_ellipse_get_type(), NULL); + + gl_view_object_set_object (GL_VIEW_OBJECT(view_ellipse), + GL_LABEL_OBJECT(object), + GL_VIEW_OBJECT_HANDLES_BOX); + gl_view_object_set_view (GL_VIEW_OBJECT(view_ellipse), view); + + gl_debug (DEBUG_VIEW, "END"); + + return GL_VIEW_OBJECT (view_ellipse); +} + + +/*****************************************************************************/ +/* Create a properties dialog for a ellipse object. */ +/*****************************************************************************/ +static GtkWidget * +construct_properties_editor (glViewObject *view_object) +{ + GtkWidget *editor; + glViewEllipse *view_ellipse = (glViewEllipse *)view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + object = gl_view_object_get_object (GL_VIEW_OBJECT(view_ellipse)); + + /* Build editor. */ + editor = gl_object_editor_new (GL_STOCK_ELLIPSE, _("Ellipse object properties"), + object->parent, + GL_OBJECT_EDITOR_SHADOW_PAGE, + GL_OBJECT_EDITOR_POSITION_PAGE, + GL_OBJECT_EDITOR_SIZE_PAGE, + GL_OBJECT_EDITOR_FILL_PAGE, + GL_OBJECT_EDITOR_LINE_PAGE, + 0); + + /* Update */ + update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); + update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); + + /* Connect signals. */ + g_signal_connect (G_OBJECT (editor), "changed", + G_CALLBACK(update_object_from_editor_cb), object); + g_signal_connect (G_OBJECT (object), "changed", + G_CALLBACK (update_editor_from_object_cb), editor); + g_signal_connect (G_OBJECT (object), "moved", + G_CALLBACK (update_editor_from_move_cb), editor); + + gl_debug (DEBUG_VIEW, "END"); + + return editor; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. editor "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object) +{ + gdouble x, y, w, h; + glColorNode *line_color_node; + gdouble line_width; + glColorNode *fill_color_node; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + + + gl_debug (DEBUG_VIEW, "START"); + + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_object_editor_get_position (editor, &x, &y); + gl_label_object_set_position (object, x, y); + + gl_object_editor_get_size (editor, &w, &h); + gl_label_object_set_size (object, w, h); + + fill_color_node = gl_object_editor_get_fill_color (editor); + gl_label_object_set_fill_color (object, fill_color_node); + gl_color_node_free (&fill_color_node); + + line_color_node = gl_object_editor_get_line_color (editor); + gl_label_object_set_line_color (object, line_color_node); + gl_color_node_free (&line_color_node); + + line_width = gl_object_editor_get_line_width (editor); + gl_label_object_set_line_width (object, line_width); + + shadow_state = gl_object_editor_get_shadow_state (editor); + gl_label_object_set_shadow_state (object, shadow_state); + + gl_object_editor_get_shadow_offset (editor, &shadow_x, &shadow_y); + gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); + + shadow_color_node = gl_object_editor_get_shadow_color (editor); + gl_label_object_set_shadow_color (object, shadow_color_node); + gl_color_node_free (&shadow_color_node); + + shadow_opacity = gl_object_editor_get_shadow_opacity (editor); + gl_label_object_set_shadow_opacity (object, shadow_opacity); + + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor) +{ + gdouble w, h; + glColorNode *line_color_node; + gdouble line_width; + glColorNode *fill_color_node; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + glMerge *merge; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_size (object, &w, &h); + gl_object_editor_set_size (editor, w, h); + merge = gl_label_get_merge (GL_LABEL(object->parent)); + + fill_color_node = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object)); + gl_object_editor_set_fill_color (editor, (merge != NULL), fill_color_node); + gl_color_node_free (&fill_color_node); + + line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); + gl_object_editor_set_line_color (editor, (merge != NULL), line_color_node); + gl_color_node_free (&line_color_node); + + line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); + gl_object_editor_set_line_width (editor, line_width); + + shadow_state = gl_label_object_get_shadow_state (object); + gl_object_editor_set_shadow_state (editor, shadow_state); + + gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); + gl_object_editor_set_shadow_offset (editor, shadow_x, shadow_y); + + shadow_color_node = gl_label_object_get_shadow_color (object); + gl_object_editor_set_shadow_color (editor, (merge != NULL), shadow_color_node); + gl_color_node_free (&shadow_color_node); + + shadow_opacity = gl_label_object_get_shadow_opacity (object); + gl_object_editor_set_shadow_opacity (editor, shadow_opacity); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "moved" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor) +{ + gdouble x, y; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_position (object, &x, &y); + gl_object_editor_set_position (editor, x, y); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Is object at (x,y)? */ +/*****************************************************************************/ +static gboolean +object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y) +{ + glLabelObject *object; + gdouble w, h; + gdouble line_width; + + object = gl_view_object_get_object (view_object); + + gl_label_object_get_size (object, &w, &h); + + gl_cairo_ellipse_path (cr, w/2, h/2); + + if (cairo_in_fill (cr, x, y)) + { + return TRUE; + } + + line_width = gl_label_object_get_line_width (object); + cairo_set_line_width (cr, line_width); + if (cairo_in_stroke (cr, x, y)) + { + return TRUE; + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Return apropos cursor for create object mode. */ +/*****************************************************************************/ +GdkCursor * +gl_view_ellipse_get_create_cursor (void) +{ + GdkCursor *cursor = NULL; + GdkPixmap *pixmap_data, *pixmap_mask; + GdkColor fg = { 0, 0, 0, 0 }; + GdkColor bg = { 0, 65535, 65535, 65535 }; + + gl_debug (DEBUG_VIEW, "START"); + + pixmap_data = gdk_bitmap_create_from_data (NULL, + (gchar *)cursor_ellipse_bits, + cursor_ellipse_width, + cursor_ellipse_height); + pixmap_mask = gdk_bitmap_create_from_data (NULL, + (gchar *)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); + + gl_debug (DEBUG_VIEW, "END"); + + return cursor; +} + + +/*****************************************************************************/ +/* Object creation handler: button press event. */ +/*****************************************************************************/ +void +gl_view_ellipse_create_button_press_event (glView *view, + gdouble x, + gdouble y) +{ + GObject *object; + glColorNode *fill_color_node; + glColorNode *line_color_node; + + gl_view_unselect_all (view); + + fill_color_node = gl_color_node_new_default (); + line_color_node = gl_color_node_new_default (); + + object = gl_label_ellipse_new (view->label); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + gl_label_object_set_size (GL_LABEL_OBJECT(object), 0.0, 0.0); + line_color_node->color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5); + fill_color_node->color = gl_color_set_opacity (gl_view_get_default_fill_color(view), 0.5); + gl_label_object_set_line_width (GL_LABEL_OBJECT(object), + gl_view_get_default_line_width(view)); + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), + line_color_node); + gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), + fill_color_node); + + gl_color_node_free (&fill_color_node); + gl_color_node_free (&line_color_node); + + view->create_object = GL_LABEL_OBJECT (object); + view->create_x0 = x; + view->create_y0 = y; +} + + +/*****************************************************************************/ +/* Object creation handler: motion event. */ +/*****************************************************************************/ +void +gl_view_ellipse_create_motion_event (glView *view, + gdouble x, + gdouble y) +{ + gdouble w, h; + + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), + MIN (x, view->create_x0), MIN (y, view->create_y0)); + w = MAX (x, view->create_x0) - MIN (x, view->create_x0); + h = MAX (y, view->create_y0) - MIN (y, view->create_y0); + gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); +} + + +/*****************************************************************************/ +/* Object creation handler: button relesase event. */ +/*****************************************************************************/ +void +gl_view_ellipse_create_button_release_event (glView *view, + gdouble x, + gdouble y) +{ + glColorNode *fill_color_node; + glColorNode *line_color_node; + gdouble w, h; + + fill_color_node = gl_color_node_new_default (); + line_color_node = gl_color_node_new_default (); + + if ((view->create_x0 == x) && (view->create_y0 == y)) { + x = view->create_x0 + 36.0; + y = view->create_y0 + 36.0; + } + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), + MIN (x, view->create_x0), MIN (y, view->create_y0)); + w = MAX (x, view->create_x0) - MIN (x, view->create_x0); + h = MAX (y, view->create_y0) - MIN (y, view->create_y0); + gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); + line_color_node->color = gl_view_get_default_line_color(view); + gl_label_object_set_line_color (GL_LABEL_OBJECT(view->create_object), line_color_node); + fill_color_node->color = gl_view_get_default_fill_color(view); + gl_label_object_set_fill_color (GL_LABEL_OBJECT(view->create_object), fill_color_node); + gl_color_node_free (&fill_color_node); + gl_color_node_free (&line_color_node); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-ellipse.h b/src/view-ellipse.h new file mode 100644 index 00000000..a73c8990 --- /dev/null +++ b/src/view-ellipse.h @@ -0,0 +1,88 @@ +/* + * view-ellipse.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __VIEW_ELLIPSE_H__ +#define __VIEW_ELLIPSE_H__ + +#include "view-object.h" +#include "label-ellipse.h" + +G_BEGIN_DECLS + + +#define GL_TYPE_VIEW_ELLIPSE (gl_view_ellipse_get_type ()) +#define GL_VIEW_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_ELLIPSE, glViewEllipse)) +#define GL_VIEW_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_ELLIPSE, glViewEllipseClass)) +#define GL_IS_VIEW_ELLIPSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_ELLIPSE)) +#define GL_IS_VIEW_ELLIPSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_ELLIPSE)) + +typedef struct _glViewEllipse glViewEllipse; +typedef struct _glViewEllipseClass glViewEllipseClass; + +typedef struct _glViewEllipsePrivate glViewEllipsePrivate; + +struct _glViewEllipse { + glViewObject parent_object; + + glViewEllipsePrivate *priv; +}; + +struct _glViewEllipseClass { + glViewObjectClass parent_class; +}; + + +GType gl_view_ellipse_get_type (void) G_GNUC_CONST; + +glViewObject *gl_view_ellipse_new (glLabelEllipse *object, + glView *view); + + +/* cursor for creating ellipse objects */ +GdkCursor *gl_view_ellipse_get_create_cursor (void); + +/* Object creation handlers. */ +void gl_view_ellipse_create_button_press_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_ellipse_create_motion_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_ellipse_create_button_release_event (glView *view, + gdouble x, + gdouble y); + + +G_END_DECLS + +#endif /* __VIEW_ELLIPSE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-image.c b/src/view-image.c new file mode 100644 index 00000000..5b76460c --- /dev/null +++ b/src/view-image.c @@ -0,0 +1,439 @@ +/* + * view-image.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "view-image.h" + +#include +#include + +#include "color.h" +#include "object-editor.h" +#include "stock.h" + +#include "pixmaps/cursor_image.xbm" +#include "pixmaps/cursor_image_mask.xbm" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glViewImagePrivate { +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_view_image_finalize (GObject *object); + +static GtkWidget *construct_properties_editor (glViewObject *view_object); + +static void update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object); + +static void update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor); + +static void update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor); + +static gboolean object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glViewImage, gl_view_image, GL_TYPE_VIEW_OBJECT); + + +static void +gl_view_image_class_init (glViewImageClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); + + gl_debug (DEBUG_VIEW, "START"); + + gl_view_image_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_view_image_finalize; + + view_object_class->construct_editor = construct_properties_editor; + view_object_class->object_at = object_at; + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_image_init (glViewImage *view_image) +{ + gl_debug (DEBUG_VIEW, "START"); + + view_image->priv = g_new0 (glViewImagePrivate, 1); + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_image_finalize (GObject *object) +{ + glViewImage *view_image = GL_VIEW_IMAGE (object); + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (object && GL_IS_VIEW_IMAGE (object)); + + g_free (view_image->priv); + + G_OBJECT_CLASS (gl_view_image_parent_class)->finalize (object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* NEW image object view. */ +/*****************************************************************************/ +glViewObject * +gl_view_image_new (glLabelImage *object, + glView *view) +{ + glViewImage *view_image; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_IMAGE (object), NULL); + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + view_image = g_object_new (gl_view_image_get_type(), NULL); + + gl_view_object_set_object (GL_VIEW_OBJECT(view_image), + GL_LABEL_OBJECT(object), + GL_VIEW_OBJECT_HANDLES_BOX); + gl_view_object_set_view (GL_VIEW_OBJECT(view_image), view); + + gl_debug (DEBUG_VIEW, "END"); + + return GL_VIEW_OBJECT (view_image); +} + + +/*****************************************************************************/ +/* Create a properties dialog for a image object. */ +/*****************************************************************************/ +static GtkWidget * +construct_properties_editor (glViewObject *view_object) +{ + GtkWidget *editor; + glViewImage *view_image = (glViewImage *)view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + object = gl_view_object_get_object (GL_VIEW_OBJECT(view_image)); + + /* Build editor. */ + editor = gl_object_editor_new (GL_STOCK_IMAGE, _("Image object properties"), + object->parent, + GL_OBJECT_EDITOR_POSITION_PAGE, + GL_OBJECT_EDITOR_SIZE_IMAGE_PAGE, + GL_OBJECT_EDITOR_IMAGE_PAGE, + 0); + + /* Update */ + update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); + update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); + + /* Connect signals. */ + g_signal_connect (G_OBJECT (editor), "changed", + G_CALLBACK(update_object_from_editor_cb), object); + g_signal_connect (G_OBJECT (object), "changed", + G_CALLBACK (update_editor_from_object_cb), editor); + g_signal_connect (G_OBJECT (object), "moved", + G_CALLBACK (update_editor_from_move_cb), editor); + + gl_debug (DEBUG_VIEW, "END"); + + return editor; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. editor "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object) +{ + gdouble x, y, w, h; + glTextNode *filename; + const GdkPixbuf *pixbuf; + gdouble image_w, image_h; + gdouble new_w, new_h; + + gl_debug (DEBUG_VIEW, "START"); + + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + + gl_object_editor_get_position (editor, &x, &y); + gl_label_object_set_position (object, x, y); + + gl_object_editor_get_size (editor, &w, &h); + gl_label_object_set_size (object, w, h); + + filename = gl_object_editor_get_image (editor); + gl_label_image_set_filename (GL_LABEL_IMAGE(object), filename); + gl_text_node_free (&filename); + + /* Setting filename may have modified the size. */ + gl_label_object_get_size (object, &new_w, &new_h); + if ( (new_w != w) || (new_h != h) ) + { + gl_object_editor_set_size (editor, new_w, new_h); + } + + /* It may also have a new base size. */ + pixbuf = gl_label_image_get_pixbuf (GL_LABEL_IMAGE(object), NULL); + image_w = gdk_pixbuf_get_width (pixbuf); + image_h = gdk_pixbuf_get_height (pixbuf); + gl_object_editor_set_base_size (editor, image_w, image_h); + + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor) +{ + gdouble w, h; + const GdkPixbuf *pixbuf; + gdouble image_w, image_h; + glTextNode *filename; + glMerge *merge; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_size (object, &w, &h); + gl_object_editor_set_size (editor, w, h); + + pixbuf = gl_label_image_get_pixbuf (GL_LABEL_IMAGE(object), NULL); + image_w = gdk_pixbuf_get_width (pixbuf); + image_h = gdk_pixbuf_get_height (pixbuf); + gl_object_editor_set_base_size (editor, image_w, image_h); + + filename = gl_label_image_get_filename (GL_LABEL_IMAGE(object)); + merge = gl_label_get_merge (GL_LABEL(object->parent)); + if ( filename != NULL ) { + gl_object_editor_set_image (editor, (merge != NULL), filename); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "moved" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor) +{ + gdouble x, y; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_position (object, &x, &y); + gl_object_editor_set_position (editor, x, y); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Is object at (x,y)? */ +/*****************************************************************************/ +static gboolean +object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y) +{ + glLabelObject *object; + gdouble w, h; + + object = gl_view_object_get_object (view_object); + + gl_label_object_get_size (object, &w, &h); + + cairo_rectangle (cr, 0.0, 0.0, w, h); + + if (cairo_in_fill (cr, x, y)) + { + return TRUE; + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Return apropos cursor for create object mode. */ +/*****************************************************************************/ +GdkCursor * +gl_view_image_get_create_cursor (void) +{ + GdkCursor *cursor = NULL; + GdkPixmap *pixmap_data, *pixmap_mask; + GdkColor fg = { 0, 0, 0, 0 }; + GdkColor bg = { 0, 65535, 65535, 65535 }; + + gl_debug (DEBUG_VIEW, "START"); + + pixmap_data = gdk_bitmap_create_from_data (NULL, + (gchar *)cursor_image_bits, + cursor_image_width, + cursor_image_height); + pixmap_mask = gdk_bitmap_create_from_data (NULL, + (gchar *)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); + + gl_debug (DEBUG_VIEW, "END"); + + return cursor; +} + + +/*****************************************************************************/ +/* Object creation handler: button press event. */ +/*****************************************************************************/ +void +gl_view_image_create_button_press_event (glView *view, + gdouble x, + gdouble y) +{ + GObject *object; + + gl_view_unselect_all (view); + + object = gl_label_image_new (view->label); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + gl_label_object_set_size (GL_LABEL_OBJECT(object), 0.0, 0.0); + + view->create_object = GL_LABEL_OBJECT (object); + view->create_x0 = x; + view->create_y0 = y; +} + + +/*****************************************************************************/ +/* Object creation handler: motion event. */ +/*****************************************************************************/ +void +gl_view_image_create_motion_event (glView *view, + gdouble x, + gdouble y) +{ + gdouble w, h; + + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), + MIN (x, view->create_x0), MIN (y, view->create_y0)); + w = MAX (x, view->create_x0) - MIN (x, view->create_x0); + h = MAX (y, view->create_y0) - MIN (y, view->create_y0); + gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); +} + + +/*****************************************************************************/ +/* Object creation handler: button relesase event. */ +/*****************************************************************************/ +void +gl_view_image_create_button_release_event (glView *view, + gdouble x, + gdouble y) +{ + gdouble w, h; + + if ((view->create_x0 == x) && (view->create_y0 == y)) { + x = view->create_x0 + 36.0; + y = view->create_y0 + 36.0; + } + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), + MIN (x, view->create_x0), MIN (y, view->create_y0)); + w = MAX (x, view->create_x0) - MIN (x, view->create_x0); + h = MAX (y, view->create_y0) - MIN (y, view->create_y0); + gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-image.h b/src/view-image.h new file mode 100644 index 00000000..49b8773c --- /dev/null +++ b/src/view-image.h @@ -0,0 +1,88 @@ +/* + * view-image.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __VIEW_IMAGE_H__ +#define __VIEW_IMAGE_H__ + +#include "view-object.h" +#include "label-image.h" + +G_BEGIN_DECLS + + +#define GL_TYPE_VIEW_IMAGE (gl_view_image_get_type ()) +#define GL_VIEW_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_IMAGE, glViewImage)) +#define GL_VIEW_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_IMAGE, glViewImageClass)) +#define GL_IS_VIEW_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_IMAGE)) +#define GL_IS_VIEW_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_IMAGE)) + +typedef struct _glViewImage glViewImage; +typedef struct _glViewImageClass glViewImageClass; + +typedef struct _glViewImagePrivate glViewImagePrivate; + +struct _glViewImage { + glViewObject parent_object; + + glViewImagePrivate *priv; +}; + +struct _glViewImageClass { + glViewObjectClass parent_class; +}; + + +GType gl_view_image_get_type (void) G_GNUC_CONST; + +glViewObject *gl_view_image_new (glLabelImage *object, + glView *view); + + +/* cursor for creating image objects */ +GdkCursor *gl_view_image_get_create_cursor (void); + +/* Object creation handlers. */ +void gl_view_image_create_button_press_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_image_create_motion_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_image_create_button_release_event (glView *view, + gdouble x, + gdouble y); + + +G_END_DECLS + +#endif /* __VIEW_IMAGE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-line.c b/src/view-line.c new file mode 100644 index 00000000..3cb62f12 --- /dev/null +++ b/src/view-line.c @@ -0,0 +1,474 @@ +/* + * view-line.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "view-line.h" + +#include +#include + +#include "color.h" +#include "object-editor.h" +#include "stock.h" + +#include "pixmaps/cursor_line.xbm" +#include "pixmaps/cursor_line_mask.xbm" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glViewLinePrivate { +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_view_line_finalize (GObject *object); + +static GtkWidget *construct_properties_editor (glViewObject *view_object); + +static void update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object); + +static void update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor); + +static void update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor); + +static gboolean object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glViewLine, gl_view_line, GL_TYPE_VIEW_OBJECT); + + +static void +gl_view_line_class_init (glViewLineClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); + + gl_debug (DEBUG_VIEW, "START"); + + gl_view_line_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_view_line_finalize; + + view_object_class->construct_editor = construct_properties_editor; + view_object_class->object_at = object_at; + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_line_init (glViewLine *view_line) +{ + gl_debug (DEBUG_VIEW, "START"); + + view_line->priv = g_new0 (glViewLinePrivate, 1); + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_line_finalize (GObject *object) +{ + glViewLine *view_line = GL_VIEW_LINE (object); + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (object && GL_IS_VIEW_LINE (object)); + + g_free (view_line->priv); + + G_OBJECT_CLASS (gl_view_line_parent_class)->finalize (object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* NEW line object view. */ +/*****************************************************************************/ +glViewObject * +gl_view_line_new (glLabelLine *object, + glView *view) +{ + glViewLine *view_line; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_LINE (object), NULL); + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + view_line = g_object_new (gl_view_line_get_type(), NULL); + + gl_view_object_set_object (GL_VIEW_OBJECT(view_line), + GL_LABEL_OBJECT(object), + GL_VIEW_OBJECT_HANDLES_LINE); + gl_view_object_set_view (GL_VIEW_OBJECT(view_line), view); + + gl_debug (DEBUG_VIEW, "END"); + + return GL_VIEW_OBJECT (view_line); +} + + +/*****************************************************************************/ +/* Create a properties dialog for a line object. */ +/*****************************************************************************/ +static GtkWidget * +construct_properties_editor (glViewObject *view_object) +{ + GtkWidget *editor; + glViewLine *view_line = (glViewLine *)view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + object = gl_view_object_get_object (GL_VIEW_OBJECT(view_line)); + + /* Build editor. */ + editor = gl_object_editor_new (GL_STOCK_LINE, _("Line object properties"), + object->parent, + GL_OBJECT_EDITOR_SHADOW_PAGE, + GL_OBJECT_EDITOR_POSITION_PAGE, + GL_OBJECT_EDITOR_SIZE_LINE_PAGE, + GL_OBJECT_EDITOR_LINE_PAGE, + 0); + + /* Update */ + update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); + update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); + + /* Connect signals. */ + g_signal_connect (G_OBJECT (editor), "changed", + G_CALLBACK(update_object_from_editor_cb), object); + g_signal_connect (G_OBJECT (object), "changed", + G_CALLBACK (update_editor_from_object_cb), editor); + g_signal_connect (G_OBJECT (object), "moved", + G_CALLBACK (update_editor_from_move_cb), editor); + + gl_debug (DEBUG_VIEW, "END"); + + return editor; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. editor "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object) +{ + gdouble x, y, w, h; + glColorNode *line_color_node; + gdouble line_width; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + + + gl_debug (DEBUG_VIEW, "START"); + + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_object_editor_get_position (editor, &x, &y); + gl_label_object_set_position (object, x, y); + + gl_object_editor_get_lsize (editor, &w, &h); + gl_label_object_set_size (object, w, h); + + line_color_node = gl_object_editor_get_line_color (editor); + gl_label_object_set_line_color (object, line_color_node); + gl_color_node_free (&line_color_node); + + line_width = gl_object_editor_get_line_width (editor); + gl_label_object_set_line_width (object, line_width); + + shadow_state = gl_object_editor_get_shadow_state (editor); + gl_label_object_set_shadow_state (object, shadow_state); + + gl_object_editor_get_shadow_offset (editor, &shadow_x, &shadow_y); + gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); + + shadow_color_node = gl_object_editor_get_shadow_color (editor); + gl_label_object_set_shadow_color (object, shadow_color_node); + gl_color_node_free (&shadow_color_node); + + shadow_opacity = gl_object_editor_get_shadow_opacity (editor); + gl_label_object_set_shadow_opacity (object, shadow_opacity); + + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor) +{ + gdouble w, h; + glColorNode *line_color_node; + gdouble line_width; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + glMerge *merge; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_size (object, &w, &h); + gl_object_editor_set_lsize (editor, w, h); + merge = gl_label_get_merge (GL_LABEL(object->parent)); + + line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); + gl_object_editor_set_line_color (editor, (merge != NULL), line_color_node); + gl_color_node_free (&line_color_node); + + line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); + gl_object_editor_set_line_width (editor, line_width); + + shadow_state = gl_label_object_get_shadow_state (object); + gl_object_editor_set_shadow_state (editor, shadow_state); + + gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); + gl_object_editor_set_shadow_offset (editor, shadow_x, shadow_y); + + shadow_color_node = gl_label_object_get_shadow_color (object); + gl_object_editor_set_shadow_color (editor, (merge != NULL), shadow_color_node); + gl_color_node_free (&shadow_color_node); + + shadow_opacity = gl_label_object_get_shadow_opacity (object); + gl_object_editor_set_shadow_opacity (editor, shadow_opacity); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "moved" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor) +{ + gdouble x, y; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_position (object, &x, &y); + gl_object_editor_set_position (editor, x, y); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Is object at (x,y)? */ +/*****************************************************************************/ +static gboolean +object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y) +{ + glLabelObject *object; + gdouble w, h; + gdouble line_width; + + object = gl_view_object_get_object (view_object); + + gl_label_object_get_size (object, &w, &h); + + cairo_move_to (cr, 0.0, 0.0); + cairo_line_to (cr, w, h); + + line_width = gl_label_object_get_line_width (object); + cairo_set_line_width (cr, line_width); + if (cairo_in_stroke (cr, x, y)) + { + return TRUE; + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Return apropos cursor for create object mode. */ +/*****************************************************************************/ +GdkCursor * +gl_view_line_get_create_cursor (void) +{ + GdkCursor *cursor = NULL; + GdkPixmap *pixmap_data, *pixmap_mask; + GdkColor fg = { 0, 0, 0, 0 }; + GdkColor bg = { 0, 65535, 65535, 65535 }; + + gl_debug (DEBUG_VIEW, "START"); + + pixmap_data = gdk_bitmap_create_from_data (NULL, + (gchar *)cursor_line_bits, + cursor_line_width, + cursor_line_height); + pixmap_mask = gdk_bitmap_create_from_data (NULL, + (gchar *)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); + + gl_debug (DEBUG_VIEW, "END"); + + return cursor; +} + + +/*****************************************************************************/ +/* Object creation handler: button press event. */ +/*****************************************************************************/ +void +gl_view_line_create_button_press_event (glView *view, + gdouble x, + gdouble y) +{ + GObject *object; + glColorNode *line_color_node; + + gl_view_unselect_all (view); + + line_color_node = gl_color_node_new_default (); + + object = gl_label_line_new (view->label); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + gl_label_object_set_size (GL_LABEL_OBJECT(object), 0.0, 0.0); + line_color_node->color = gl_color_set_opacity (gl_view_get_default_line_color(view), 0.5); + gl_label_object_set_line_width (GL_LABEL_OBJECT(object), + gl_view_get_default_line_width(view)); + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), + line_color_node); + + gl_color_node_free (&line_color_node); + + view->create_object = GL_LABEL_OBJECT (object); + view->create_x0 = x; + view->create_y0 = y; +} + + +/*****************************************************************************/ +/* Object creation handler: motion event. */ +/*****************************************************************************/ +void +gl_view_line_create_motion_event (glView *view, + gdouble x, + gdouble y) +{ + gdouble w, h; + + w = x - view->create_x0; + h = y - view->create_y0; + gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); +} + + +/*****************************************************************************/ +/* Object creation handler: button relesase event. */ +/*****************************************************************************/ +void +gl_view_line_create_button_release_event (glView *view, + gdouble x, + gdouble y) +{ + glColorNode *line_color_node; + gdouble w, h; + + line_color_node = gl_color_node_new_default (); + + if ((view->create_x0 == x) && (view->create_y0 == y)) { + x = view->create_x0 + 36.0; + y = view->create_y0 + 36.0; + } + w = x - view->create_x0; + h = y - view->create_y0; + gl_label_object_set_size (GL_LABEL_OBJECT(view->create_object), w, h); + line_color_node->color = gl_view_get_default_line_color(view); + gl_label_object_set_line_color (GL_LABEL_OBJECT(view->create_object), line_color_node); + gl_color_node_free (&line_color_node); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-line.h b/src/view-line.h new file mode 100644 index 00000000..9fc54ab2 --- /dev/null +++ b/src/view-line.h @@ -0,0 +1,88 @@ +/* + * view-line.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __VIEW_LINE_H__ +#define __VIEW_LINE_H__ + +#include "view-object.h" +#include "label-line.h" + +G_BEGIN_DECLS + + +#define GL_TYPE_VIEW_LINE (gl_view_line_get_type ()) +#define GL_VIEW_LINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_LINE, glViewLine)) +#define GL_VIEW_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_LINE, glViewLineClass)) +#define GL_IS_VIEW_LINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_LINE)) +#define GL_IS_VIEW_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_LINE)) + +typedef struct _glViewLine glViewLine; +typedef struct _glViewLineClass glViewLineClass; + +typedef struct _glViewLinePrivate glViewLinePrivate; + +struct _glViewLine { + glViewObject parent_object; + + glViewLinePrivate *priv; +}; + +struct _glViewLineClass { + glViewObjectClass parent_class; +}; + + +GType gl_view_line_get_type (void) G_GNUC_CONST; + +glViewObject *gl_view_line_new (glLabelLine *object, + glView *view); + + +/* cursor for creating line objects */ +GdkCursor *gl_view_line_get_create_cursor (void); + +/* Object creation handlers. */ +void gl_view_line_create_button_press_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_line_create_motion_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_line_create_button_release_event (glView *view, + gdouble x, + gdouble y); + + +G_END_DECLS + +#endif /* __VIEW_LINE_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-object.c b/src/view-object.c new file mode 100644 index 00000000..e50de60f --- /dev/null +++ b/src/view-object.c @@ -0,0 +1,786 @@ +/* + * view-object.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include "view-object.h" + +#include + +#include "debug.h" + + +/*========================================================*/ +/* Private constants and macros. */ +/*========================================================*/ + +#define HANDLE_FILL_RGBA_ARGS 0.0, 0.75, 0.0, 0.4 +#define HANDLE_OUTLINE_RGBA_ARGS 0.0, 0.0, 0.0, 0.8 + +#define HANDLE_OUTLINE_WIDTH_PIXELS 1.0 +#define HANDLE_PIXELS 7 + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glViewObjectPrivate { + + glLabelObject *object; + + glView *view; + glViewObjectHandlesStyle handles_style; + + GtkWidget *property_editor; +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_view_object_finalize (GObject *object); + +static void object_removed_cb (glViewObject *view_object, + glLabelObject *object); + +static void object_top_cb (glViewObject *view_object, + glLabelObject *object); + +static void object_bottom_cb (glViewObject *view_object, + glLabelObject *object); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glViewObject, gl_view_object, G_TYPE_OBJECT); + + +static void +gl_view_object_class_init (glViewObjectClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_VIEW, "START"); + + gl_view_object_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_view_object_finalize; + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_object_init (glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, "START"); + + view_object->priv = g_new0 (glViewObjectPrivate, 1); + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_object_finalize (GObject *object) +{ + glViewObject *view_object = GL_VIEW_OBJECT (object); + glView *view; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (object && GL_IS_VIEW_OBJECT (object)); + + view = view_object->priv->view; + view->object_list = g_list_remove (view->object_list, object); + view->selected_object_list = + g_list_remove (view->selected_object_list, object); + + g_object_unref (view_object->priv->object); + if (view_object->priv->property_editor) { + gl_debug (DEBUG_VIEW, "Destroy editor"); + g_object_unref (G_OBJECT(view_object->priv->property_editor)); + } + g_free (view_object->priv); + + G_OBJECT_CLASS (gl_view_object_parent_class)->finalize (object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* NEW object view. */ +/*****************************************************************************/ +GObject * +gl_view_object_new (void) +{ + glViewObject *view_object; + + gl_debug (DEBUG_VIEW, "START"); + + view_object = g_object_new (gl_view_object_get_type(), NULL); + + gl_debug (DEBUG_VIEW, "END"); + + return G_OBJECT (view_object); +} + + +/*****************************************************************************/ +/* Set parent view to which this object view belongs. */ +/*****************************************************************************/ +void +gl_view_object_set_view (glViewObject *view_object, + glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); + g_return_if_fail (view && GL_IS_VIEW (view)); + + view_object->priv->view = view; + + view->object_list = g_list_append (view->object_list, view_object); + + g_signal_connect_swapped (G_OBJECT (view_object->priv->object), "changed", + G_CALLBACK (gl_view_update), view); + g_signal_connect_swapped (G_OBJECT (view_object->priv->object), "moved", + G_CALLBACK (gl_view_update), view); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Set Label object to follow. */ +/*****************************************************************************/ +void +gl_view_object_set_object (glViewObject *view_object, + glLabelObject *object, + glViewObjectHandlesStyle style) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + view_object->priv->object = g_object_ref (G_OBJECT (object)); + view_object->priv->handles_style = style; + + g_signal_connect_swapped (G_OBJECT (object), "removed", + G_CALLBACK (object_removed_cb), view_object); + g_signal_connect_swapped (G_OBJECT (object), "top", + G_CALLBACK (object_top_cb), view_object); + g_signal_connect_swapped (G_OBJECT (object), "bottom", + G_CALLBACK (object_bottom_cb), view_object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Handle object "removed" signal. */ +/*---------------------------------------------------------------------------*/ +static void +object_removed_cb (glViewObject *view_object, + glLabelObject *object) +{ + glView *view; + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + view = gl_view_object_get_view (view_object); + view->object_list = g_list_remove (view->object_list, view_object); + g_object_unref (G_OBJECT (view_object)); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Handle object "top" signal. */ +/*---------------------------------------------------------------------------*/ +static void +object_top_cb (glViewObject *view_object, + glLabelObject *object) +{ + glView *view; + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + view = gl_view_object_get_view (view_object); + + /* Move to end of list, representing front most object */ + view->object_list = g_list_remove (view->object_list, view_object); + view->object_list = g_list_append (view->object_list, view_object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Handle object "removed" signal. */ +/*---------------------------------------------------------------------------*/ +static void +object_bottom_cb (glViewObject *view_object, + glLabelObject *object) +{ + glView *view; + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + view = gl_view_object_get_view (view_object); + + /* Move to front of list, representing rear most object */ + view->object_list = g_list_remove (view->object_list, view_object); + view->object_list = g_list_prepend (view->object_list, view_object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Return parent view associated with this view. */ +/*****************************************************************************/ +glView * +gl_view_object_get_view (glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), NULL); + + gl_debug (DEBUG_VIEW, "END"); + + return view_object->priv->view; +} + + +/*****************************************************************************/ +/* Return label object that we are following. */ +/*****************************************************************************/ +glLabelObject * +gl_view_object_get_object (glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), NULL); + + gl_debug (DEBUG_VIEW, "END"); + + return view_object->priv->object; +} + + +/*****************************************************************************/ +/* Get property editor. */ +/*****************************************************************************/ +GtkWidget * +gl_view_object_get_editor (glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), NULL); + + if ( GL_VIEW_OBJECT_GET_CLASS(view_object)->construct_editor != NULL ) { + + if (view_object->priv->property_editor == NULL) { + view_object->priv->property_editor = + GL_VIEW_OBJECT_GET_CLASS(view_object)->construct_editor (view_object); + } + g_signal_connect (G_OBJECT (view_object->priv->property_editor), + "destroy", + G_CALLBACK (gtk_widget_destroyed), + &view_object->priv->property_editor); + + gtk_widget_show (view_object->priv->property_editor); + + } + + + gl_debug (DEBUG_VIEW, "END"); + + return view_object->priv->property_editor; +} + + +/*****************************************************************************/ +/* Select object. */ +/*****************************************************************************/ +void +gl_view_object_select (glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, "START"); + + gl_view_select_object(view_object->priv->view, view_object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Is object at (x,y)? */ +/*****************************************************************************/ +gboolean +gl_view_object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y) +{ + glLabelObject *object = view_object->priv->object; + gdouble x0, y0; + cairo_matrix_t matrix; + gboolean return_val = FALSE; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), FALSE); + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), FALSE); + + gl_label_object_get_position (object, &x0, &y0); + gl_label_object_get_matrix (object, &matrix); + + cairo_save (cr); + cairo_translate (cr, x0, y0); + cairo_transform (cr, &matrix); + + cairo_device_to_user (cr, &x, &y); + + if ( GL_VIEW_OBJECT_GET_CLASS(view_object)->object_at != NULL ) { + + return_val = GL_VIEW_OBJECT_GET_CLASS(view_object)->object_at (view_object, cr, x, y); + + } + + cairo_restore (cr); + + return return_val; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* Create handle path */ +/*--------------------------------------------------------------------------*/ +static void +create_handle_path (cairo_t *cr, + glLabelObject *object, + gdouble scale, + gdouble x_handle, + gdouble y_handle) +{ + gl_debug (DEBUG_VIEW, "START"); + + cairo_rectangle (cr, + x_handle - HANDLE_PIXELS/scale/2, y_handle - HANDLE_PIXELS/scale/2, + HANDLE_PIXELS/scale, HANDLE_PIXELS/scale); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Draw object handles */ +/*****************************************************************************/ +void +gl_view_object_draw_handles (glViewObject *view_object, + cairo_t *cr) +{ + glLabelObject *object = view_object->priv->object; + gdouble x0, y0; + cairo_matrix_t matrix; + gdouble scale; + gdouble w, h; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object)); + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + scale = view_object->priv->view->home_scale * view_object->priv->view->zoom; + + gl_label_object_get_position (object, &x0, &y0); + gl_label_object_get_matrix (object, &matrix); + + gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); + + cairo_save (cr); + + cairo_translate (cr, x0, y0); + cairo_transform (cr, &matrix); + + switch (view_object->priv->handles_style) + { + case GL_VIEW_OBJECT_HANDLES_BOX: + + /* North */ + cairo_new_path (cr); + create_handle_path (cr, object, scale, w/2, 0); + + /* North East */ + cairo_new_sub_path (cr); + create_handle_path (cr, object, scale, w, 0); + + /* East */ + cairo_new_sub_path (cr); + create_handle_path (cr, object, scale, w, h/2); + + /* South East */ + cairo_new_sub_path (cr); + create_handle_path (cr, object, scale, w, h); + + /* South */ + cairo_new_sub_path (cr); + create_handle_path (cr, object, scale, w/2, h); + + /* South West */ + cairo_new_sub_path (cr); + create_handle_path (cr, object, scale, 0, h); + + /* West */ + cairo_new_sub_path (cr); + create_handle_path (cr, object, scale, 0, h/2); + + /* North West */ + cairo_new_sub_path (cr); + create_handle_path (cr, object, scale, 0, 0); + + break; + + case GL_VIEW_OBJECT_HANDLES_LINE: + /* P1 */ + cairo_new_path (cr); + create_handle_path (cr, object, scale, 0, 0); + + /* P2 */ + cairo_new_sub_path (cr); + create_handle_path (cr, object, scale, w, h); + + break; + } + + cairo_set_source_rgba (cr, HANDLE_FILL_RGBA_ARGS); + cairo_fill_preserve (cr); + + cairo_set_line_width (cr, HANDLE_OUTLINE_WIDTH_PIXELS/scale); + cairo_set_source_rgba (cr, HANDLE_OUTLINE_RGBA_ARGS); + cairo_stroke (cr); + + cairo_restore (cr); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Is there an object handle at (x,y). */ +/*****************************************************************************/ +glViewObjectHandle +gl_view_object_handle_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y) +{ + glLabelObject *object = view_object->priv->object; + gdouble x0, y0; + cairo_matrix_t matrix; + gdouble scale; + gdouble w, h; + glViewObjectHandle handle = GL_VIEW_OBJECT_HANDLE_NONE; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view_object && GL_IS_VIEW_OBJECT (view_object), handle); + g_return_val_if_fail (object && GL_IS_LABEL_OBJECT (object), handle); + + scale = view_object->priv->view->home_scale * view_object->priv->view->zoom; + + gl_label_object_get_position (object, &x0, &y0); + gl_label_object_get_matrix (object, &matrix); + + gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); + + cairo_save (cr); + + cairo_translate (cr, x0, y0); + cairo_transform (cr, &matrix); + + cairo_device_to_user (cr, &x, &y); + + switch (view_object->priv->handles_style) + { + case GL_VIEW_OBJECT_HANDLES_BOX: + + /* South East */ + create_handle_path (cr, object, scale, w, h); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_SE; break;} + + /* South West */ + create_handle_path (cr, object, scale, 0, h); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_SW; break;} + + /* North East */ + create_handle_path (cr, object, scale, w, 0); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_NE; break;} + + /* North West */ + create_handle_path (cr, object, scale, 0, 0); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_NW; break;} + + /* East */ + create_handle_path (cr, object, scale, w, h/2); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_E; break;} + + /* South */ + create_handle_path (cr, object, scale, w/2, h); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_S; break;} + + /* West */ + create_handle_path (cr, object, scale, 0, h/2); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_W; break;} + + /* North */ + create_handle_path (cr, object, scale, w/2, 0); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_N; break;} + + break; + + case GL_VIEW_OBJECT_HANDLES_LINE: + /* P2 */ + create_handle_path (cr, object, scale, w, h); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_P2; break;} + + /* P1 */ + create_handle_path (cr, object, scale, 0, 0); + if (cairo_in_fill (cr, x, y)) {handle = GL_VIEW_OBJECT_HANDLE_P1; break;} + + break; + + } + + cairo_restore (cr); + + return handle; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Resize object. */ +/*---------------------------------------------------------------------------*/ +void +gl_view_object_resize_event (glViewObject *view_object, + glViewObjectHandle handle, + gboolean honor_aspect, + cairo_t *cr, + gdouble x, + gdouble y) +{ + glLabelObject *object; + cairo_matrix_t matrix; + gdouble x0, y0, x1, y1, x2, y2; + gdouble w, h; + gdouble dx=0, dy=0; + + gl_debug (DEBUG_VIEW, "x,y world = %g, %g", x, y); + + object = view_object->priv->object; + + /* + * Change to item relative coordinates + */ + cairo_save (cr); + gl_label_object_get_position (object, &x0, &y0); + cairo_translate (cr, x0, y0); + gl_label_object_get_matrix (object, &matrix); + cairo_transform (cr, &matrix); + + /* + * Initialize origin and 2 corners in object relative coordinates. + */ + x0 = 0.0; + y0 = 0.0; + + x1 = 0.0; + y1 = 0.0; + + gl_label_object_get_size (object, &x2, &y2); + + gl_debug (DEBUG_VIEW, "x0,y0 object = %g, %g", x0, y0); + gl_debug (DEBUG_VIEW, "x1,y1 object = %g, %g", x1, y1); + gl_debug (DEBUG_VIEW, "x2,y2 object = %g, %g", x2, y2); + + /* + * Translate x,y into object relative coordinates. + */ + cairo_device_to_user (cr, &x, &y); + + gl_debug (DEBUG_VIEW, "x,y object = %g, %g", x, y); + + /* + * Get new size + */ + switch (handle) + { + + case GL_VIEW_OBJECT_HANDLE_NW: + w = MAX (x2 - x, 0); + h = MAX (y2 - y, 0); + break; + + case GL_VIEW_OBJECT_HANDLE_N: + w = x2 - x1; + h = MAX (y2 - y, 0); + break; + + case GL_VIEW_OBJECT_HANDLE_NE: + w = MAX (x - x1, 0); + h = MAX (y2 - y, 0); + break; + + case GL_VIEW_OBJECT_HANDLE_E: + w = MAX (x - x1, 0); + h = y2 - y1; + break; + + case GL_VIEW_OBJECT_HANDLE_SE: + w = MAX (x - x1, 0); + h = MAX (y - y1, 0); + break; + + case GL_VIEW_OBJECT_HANDLE_S: + w = x2 - x1; + h = MAX (y - y1, 0); + break; + + case GL_VIEW_OBJECT_HANDLE_SW: + w = MAX (x2 - x, 0); + h = MAX (y - y1, 0); + break; + + case GL_VIEW_OBJECT_HANDLE_W: + w = MAX (x2 - x, 0); + h = y2 - y1; + break; + case GL_VIEW_OBJECT_HANDLE_P1: + x1 = x; + y1 = y; + dx = (x2 - x); + dy = (y2 - y); + x0 = x0 + x1; + y0 = y0 + y1; + break; + + case GL_VIEW_OBJECT_HANDLE_P2: + dx = x - x1; + dy = y - y1; + x0 = x0 + x1; + y0 = y0 + y1; + break; + + default: + g_print ("Invalid handle.\n"); /* Should not happen! */ + + } + if ( (handle != GL_VIEW_OBJECT_HANDLE_P1) && (handle != GL_VIEW_OBJECT_HANDLE_P2) ) + { + if ( honor_aspect ) + { + gl_label_object_set_size_honor_aspect (object, w, h); + } + else + { + gl_label_object_set_size (object, w, h); + } + + /* + * Query the new size in case it was constrained. + */ + gl_label_object_get_size (object, &w, &h); + + /* + * Get new position + */ + switch (handle) + { + + case GL_VIEW_OBJECT_HANDLE_NW: + x0 += x2 - w; + y0 += y2 - h; + break; + + case GL_VIEW_OBJECT_HANDLE_N: + case GL_VIEW_OBJECT_HANDLE_NE: + /* x unchanged */ + y0 += y2 - h; + break; + + case GL_VIEW_OBJECT_HANDLE_E: + case GL_VIEW_OBJECT_HANDLE_SE: + case GL_VIEW_OBJECT_HANDLE_S: + /* unchanged */ + break; + + case GL_VIEW_OBJECT_HANDLE_SW: + case GL_VIEW_OBJECT_HANDLE_W: + x0 += x2 - w; + /* y unchanged */ + break; + + default: + g_print ("Invalid handle.\n"); /* Should not happen! */ + } + } + else + { + gl_label_object_set_size (object, dx, dy); + } + + /* + * Put new origin back into world coordinates and set. + */ + cairo_user_to_device (cr, &x0, &y0); + cairo_restore (cr); + cairo_device_to_user (cr, &x0, &y0); + gl_label_object_set_position (object, x0, y0); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-object.h b/src/view-object.h new file mode 100644 index 00000000..cb2a894b --- /dev/null +++ b/src/view-object.h @@ -0,0 +1,144 @@ +/* + * view-object.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __VIEW_OBJECT_H__ +#define __VIEW_OBJECT_H__ + +#include +#include "label-object.h" + +typedef enum { + GL_VIEW_OBJECT_HANDLES_BOX, + GL_VIEW_OBJECT_HANDLES_LINE, +} glViewObjectHandlesStyle; + +typedef enum { + GL_VIEW_OBJECT_HANDLE_NONE = 0, + GL_VIEW_OBJECT_HANDLE_N, + GL_VIEW_OBJECT_HANDLE_E, + GL_VIEW_OBJECT_HANDLE_W, + GL_VIEW_OBJECT_HANDLE_S, + GL_VIEW_OBJECT_HANDLE_NW, + GL_VIEW_OBJECT_HANDLE_NE, + GL_VIEW_OBJECT_HANDLE_SE, + GL_VIEW_OBJECT_HANDLE_SW, + GL_VIEW_OBJECT_HANDLE_P1, + GL_VIEW_OBJECT_HANDLE_P2, +} glViewObjectHandle; + + +#define GL_TYPE_VIEW_OBJECT (gl_view_object_get_type ()) +#define GL_VIEW_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_OBJECT, glViewObject)) +#define GL_VIEW_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_OBJECT, glViewObjectClass)) +#define GL_IS_VIEW_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_OBJECT)) +#define GL_IS_VIEW_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_OBJECT)) +#define GL_VIEW_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_VIEW_OBJECT, glViewObjectClass)) + +typedef struct _glViewObject glViewObject; +typedef struct _glViewObjectClass glViewObjectClass; + +typedef struct _glViewObjectPrivate glViewObjectPrivate; + + +#include "view.h" + +#include "cairo.h" + +struct _glViewObject { + GObject parent_object; + + glViewObjectPrivate *priv; +}; + +struct _glViewObjectClass { + GObjectClass parent_class; + + /* + * Methods + */ + + GtkWidget * (*construct_editor) (glViewObject *view_object); + + gboolean (*object_at) (glViewObject *view_object, + cairo_t *cr, + gdouble x_device, + gdouble y_device); +}; + + + + +G_BEGIN_DECLS + +GType gl_view_object_get_type (void) G_GNUC_CONST; + +GObject *gl_view_object_new (void); + + +void gl_view_object_set_view (glViewObject *view_object, + glView *view); + +void gl_view_object_set_object (glViewObject *view_object, + glLabelObject *object, + glViewObjectHandlesStyle style); + +gboolean gl_view_object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y); + +void gl_view_object_draw_handles (glViewObject *view_object, + cairo_t *cr); + +glViewObjectHandle gl_view_object_handle_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y); + +glView *gl_view_object_get_view (glViewObject *view_object); + +glLabelObject *gl_view_object_get_object (glViewObject *view_object); + +GtkWidget *gl_view_object_get_editor (glViewObject *view_object); + +void gl_view_object_select (glViewObject *view_object); + +void gl_view_object_resize_event (glViewObject *view_object, + glViewObjectHandle handle, + gboolean honor_aspect, + cairo_t *cr, + gdouble x, + gdouble y); + + +G_END_DECLS + +#endif /* __VIEW_OBJECT_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-text.c b/src/view-text.c new file mode 100644 index 00000000..e45c7dc1 --- /dev/null +++ b/src/view-text.c @@ -0,0 +1,549 @@ +/* + * view-text.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "view-text.h" + +#include +#include + +#include "color.h" +#include "object-editor.h" +#include "stock.h" + +#include "pixmaps/cursor_text.xbm" +#include "pixmaps/cursor_text_mask.xbm" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + +struct _glViewTextPrivate { +}; + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static void gl_view_text_finalize (GObject *object); + +static GtkWidget *construct_properties_editor (glViewObject *view_object); + +static void update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object); + +static void update_object_from_editor_size_cb (glObjectEditor *editor, + glLabelObject *object); + +static void update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor); + +static void update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor); + +static gboolean object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y); + + +/*****************************************************************************/ +/* Boilerplate object stuff. */ +/*****************************************************************************/ +G_DEFINE_TYPE (glViewText, gl_view_text, GL_TYPE_VIEW_OBJECT); + + +static void +gl_view_text_class_init (glViewTextClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + glViewObjectClass *view_object_class = GL_VIEW_OBJECT_CLASS (class); + + gl_debug (DEBUG_VIEW, "START"); + + gl_view_text_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_view_text_finalize; + + view_object_class->construct_editor = construct_properties_editor; + view_object_class->object_at = object_at; + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_text_init (glViewText *view_text) +{ + gl_debug (DEBUG_VIEW, "START"); + + view_text->priv = g_new0 (glViewTextPrivate, 1); + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_text_finalize (GObject *object) +{ + glViewText *view_text = GL_VIEW_TEXT (object); + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (object && GL_IS_VIEW_TEXT (object)); + + g_free (view_text->priv); + + G_OBJECT_CLASS (gl_view_text_parent_class)->finalize (object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* NEW text object view. */ +/*****************************************************************************/ +glViewObject * +gl_view_text_new (glLabelText *object, + glView *view) +{ + glViewText *view_text; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (object && GL_IS_LABEL_TEXT (object), NULL); + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + view_text = g_object_new (gl_view_text_get_type(), NULL); + + gl_view_object_set_object (GL_VIEW_OBJECT(view_text), + GL_LABEL_OBJECT(object), + GL_VIEW_OBJECT_HANDLES_BOX); + gl_view_object_set_view (GL_VIEW_OBJECT(view_text), view); + + gl_debug (DEBUG_VIEW, "END"); + + return GL_VIEW_OBJECT (view_text); +} + + +/*****************************************************************************/ +/* Create a properties dialog for a text object. */ +/*****************************************************************************/ +static GtkWidget * +construct_properties_editor (glViewObject *view_object) +{ + GtkWidget *editor; + glViewText *view_text = (glViewText *)view_object; + glLabelObject *object; + GtkTextBuffer *buffer; + + gl_debug (DEBUG_VIEW, "START"); + + object = gl_view_object_get_object (GL_VIEW_OBJECT(view_text)); + + /* Build editor. */ + editor = gl_object_editor_new (GL_STOCK_TEXT, _("Text object properties"), + object->parent, + GL_OBJECT_EDITOR_SHADOW_PAGE, + GL_OBJECT_EDITOR_POSITION_PAGE, + GL_OBJECT_EDITOR_SIZE_PAGE, + GL_OBJECT_EDITOR_TEXT_PAGE, + GL_OBJECT_EDITOR_EDIT_PAGE, + 0); + + buffer = gl_label_text_get_buffer (GL_LABEL_TEXT(object)); + gl_object_editor_set_text_buffer (GL_OBJECT_EDITOR(editor), buffer); + + /* Update */ + update_editor_from_object_cb (object, GL_OBJECT_EDITOR(editor)); + update_editor_from_move_cb (object, 0, 0, GL_OBJECT_EDITOR(editor)); + + /* Connect signals. */ + g_signal_connect (G_OBJECT (editor), "changed", + G_CALLBACK(update_object_from_editor_cb), object); + g_signal_connect (G_OBJECT (editor), "size_changed", + G_CALLBACK(update_object_from_editor_size_cb), object); + g_signal_connect (G_OBJECT (object), "changed", + G_CALLBACK (update_editor_from_object_cb), editor); + g_signal_connect (G_OBJECT (object), "moved", + G_CALLBACK (update_editor_from_move_cb), editor); + + gl_debug (DEBUG_VIEW, "END"); + + return editor; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. editor "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_object_from_editor_cb (glObjectEditor *editor, + glLabelObject *object) +{ + gdouble x, y; + gchar *font_family; + gdouble font_size; + PangoWeight font_weight; + gboolean font_italic_flag; + glColorNode *color_node; + PangoAlignment align; + gdouble text_line_spacing; + gboolean auto_shrink; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + + gl_debug (DEBUG_VIEW, "START"); + + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_object_editor_get_position (editor, &x, &y); + font_family = gl_object_editor_get_font_family (editor); + font_size = gl_object_editor_get_font_size (editor); + font_weight = gl_object_editor_get_font_weight (editor); + font_italic_flag = gl_object_editor_get_font_italic_flag (editor); + color_node = gl_object_editor_get_text_color (editor); + align = gl_object_editor_get_text_alignment (editor); + text_line_spacing = gl_object_editor_get_text_line_spacing (editor); + auto_shrink = gl_object_editor_get_text_auto_shrink (editor); + + gl_label_object_set_position (object, x, y); + gl_label_object_set_font_family (object, font_family); + gl_label_object_set_font_size (object, font_size); + gl_label_object_set_font_weight (object, font_weight); + gl_label_object_set_font_italic_flag (object, font_italic_flag); + gl_label_object_set_text_color (object, color_node); + gl_label_object_set_text_alignment (object, align); + gl_label_object_set_text_line_spacing (object, text_line_spacing); + gl_label_text_set_auto_shrink (GL_LABEL_TEXT (object), auto_shrink); + + gl_color_node_free (&color_node); + g_free (font_family); + + shadow_state = gl_object_editor_get_shadow_state (editor); + gl_label_object_set_shadow_state (object, shadow_state); + + gl_object_editor_get_shadow_offset (editor, &shadow_x, &shadow_y); + gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); + + shadow_color_node = gl_object_editor_get_shadow_color (editor); + gl_label_object_set_shadow_color (object, shadow_color_node); + gl_color_node_free (&shadow_color_node); + + shadow_opacity = gl_object_editor_get_shadow_opacity (editor); + gl_label_object_set_shadow_opacity (object, shadow_opacity); + + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. editor "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_object_from_editor_size_cb (glObjectEditor *editor, + glLabelObject *object) +{ + gdouble w, h; + + gl_debug (DEBUG_VIEW, "START"); + + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_block_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_object_editor_get_size (editor, &w, &h); + + gl_label_object_set_size (object, w, h); + + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_object_cb, + editor); + g_signal_handlers_unblock_by_func (G_OBJECT(object), + update_editor_from_move_cb, + editor); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_object_cb (glLabelObject *object, + glObjectEditor *editor) +{ + gdouble w, h; + gchar *font_family; + gdouble font_size; + PangoWeight font_weight; + gboolean font_italic_flag; + glColorNode *color_node; + PangoAlignment align; + gdouble text_line_spacing; + gboolean auto_shrink; + gboolean shadow_state; + gdouble shadow_x, shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + glMerge *merge; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_size (object, &w, &h); + gl_object_editor_set_size (editor, w, h); + merge = gl_label_get_merge (GL_LABEL(object->parent)); + + font_family = gl_label_object_get_font_family (object); + font_size = gl_label_object_get_font_size (object); + font_weight = gl_label_object_get_font_weight (object); + font_italic_flag = gl_label_object_get_font_italic_flag (object); + color_node = gl_label_object_get_text_color (object); + align = gl_label_object_get_text_alignment (object); + text_line_spacing = gl_label_object_get_text_line_spacing (object); + auto_shrink = gl_label_text_get_auto_shrink (GL_LABEL_TEXT (object)); + + gl_object_editor_set_font_family (editor, font_family); + gl_object_editor_set_font_size (editor, font_size); + gl_object_editor_set_font_weight (editor, font_weight); + gl_object_editor_set_font_italic_flag (editor, font_italic_flag); + gl_object_editor_set_text_color (editor, (merge != NULL), color_node); + gl_object_editor_set_text_alignment (editor, align); + gl_object_editor_set_text_line_spacing (editor, text_line_spacing); + gl_object_editor_set_text_auto_shrink (editor, auto_shrink); + + gl_color_node_free (&color_node); + g_free (font_family); + + shadow_state = gl_label_object_get_shadow_state (object); + gl_object_editor_set_shadow_state (editor, shadow_state); + + gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); + gl_object_editor_set_shadow_offset (editor, shadow_x, shadow_y); + + shadow_color_node = gl_label_object_get_shadow_color (object); + gl_object_editor_set_shadow_color (editor, (merge != NULL), shadow_color_node); + gl_color_node_free (&shadow_color_node); + + shadow_opacity = gl_label_object_get_shadow_opacity (object); + gl_object_editor_set_shadow_opacity (editor, shadow_opacity); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. label object "moved" callback. */ +/*---------------------------------------------------------------------------*/ +static void +update_editor_from_move_cb (glLabelObject *object, + gdouble dx, + gdouble dy, + glObjectEditor *editor) +{ + gdouble x, y; + + gl_debug (DEBUG_VIEW, "START"); + + gl_label_object_get_position (object, &x, &y); + gl_object_editor_set_position (editor, x, y); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Is object at (x,y)? */ +/*****************************************************************************/ +static gboolean +object_at (glViewObject *view_object, + cairo_t *cr, + gdouble x, + gdouble y) +{ + glLabelObject *object; + gdouble w, h; + + object = gl_view_object_get_object (view_object); + + gl_label_object_get_size (object, &w, &h); + + cairo_rectangle (cr, 0.0, 0.0, w, h); + + if (cairo_in_fill (cr, x, y)) + { + return TRUE; + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Return apropos cursor for create object mode. */ +/*****************************************************************************/ +GdkCursor * +gl_view_text_get_create_cursor (void) +{ + GdkCursor *cursor = NULL; + GdkPixmap *pixmap_data, *pixmap_mask; + GdkColor fg = { 0, 0, 0, 0 }; + GdkColor bg = { 0, 65535, 65535, 65535 }; + + gl_debug (DEBUG_VIEW, "START"); + + pixmap_data = gdk_bitmap_create_from_data (NULL, + (gchar *)cursor_text_bits, + cursor_text_width, + cursor_text_height); + pixmap_mask = gdk_bitmap_create_from_data (NULL, + (gchar *)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); + + gl_debug (DEBUG_VIEW, "END"); + + return cursor; +} + + +/*****************************************************************************/ +/* Object creation handler: button press event. */ +/*****************************************************************************/ +void +gl_view_text_create_button_press_event (glView *view, + gdouble x, + gdouble y) +{ + GObject *object; + GList *lines; + gchar *family; + glColorNode *color_node; + + gl_view_unselect_all (view); + + object = gl_label_text_new (view->label); + color_node = gl_color_node_new_default (); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + family = gl_view_get_default_font_family (view); + gl_label_object_set_font_family (GL_LABEL_OBJECT(object), family); + gl_label_object_set_font_size (GL_LABEL_OBJECT(object), + gl_view_get_default_font_size (view)); + gl_label_object_set_font_weight (GL_LABEL_OBJECT(object), + gl_view_get_default_font_weight (view)); + gl_label_object_set_font_italic_flag (GL_LABEL_OBJECT(object), + gl_view_get_default_font_italic_flag (view)); + + color_node->color = gl_color_set_opacity (gl_view_get_default_text_color (view), 0.5); + gl_label_object_set_text_color (GL_LABEL_OBJECT(object), + color_node); + gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object), + gl_view_get_default_text_alignment (view)); + gl_label_object_set_text_line_spacing (GL_LABEL_OBJECT(object), gl_view_get_default_text_line_spacing (view)); + + g_free (family); + lines = gl_text_node_lines_new_from_text (_("Text")); + gl_label_text_set_lines (GL_LABEL_TEXT(object), lines); + gl_color_node_free (&color_node); + + view->create_object = GL_LABEL_OBJECT (object); + view->create_x0 = x; + view->create_y0 = y; +} + + +/*****************************************************************************/ +/* Object creation handler: motion event. */ +/*****************************************************************************/ +void +gl_view_text_create_motion_event (glView *view, + gdouble x, + gdouble y) +{ + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); +} + + +/*****************************************************************************/ +/* Object creation handler: button relesase event. */ +/*****************************************************************************/ +void +gl_view_text_create_button_release_event (glView *view, + gdouble x, + gdouble y) +{ + glColorNode *color_node; + + color_node = gl_color_node_new_default (); + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); + color_node->color = gl_view_get_default_text_color(view); + gl_label_object_set_text_color (GL_LABEL_OBJECT(view->create_object), color_node); + gl_color_node_free (&color_node); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view-text.h b/src/view-text.h new file mode 100644 index 00000000..150ffb82 --- /dev/null +++ b/src/view-text.h @@ -0,0 +1,88 @@ +/* + * view-text.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __VIEW_TEXT_H__ +#define __VIEW_TEXT_H__ + +#include "view-object.h" +#include "label-text.h" + +G_BEGIN_DECLS + + +#define GL_TYPE_VIEW_TEXT (gl_view_text_get_type ()) +#define GL_VIEW_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_TEXT, glViewText)) +#define GL_VIEW_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_TEXT, glViewTextClass)) +#define GL_IS_VIEW_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_TEXT)) +#define GL_IS_VIEW_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_TEXT)) + +typedef struct _glViewText glViewText; +typedef struct _glViewTextClass glViewTextClass; + +typedef struct _glViewTextPrivate glViewTextPrivate; + +struct _glViewText { + glViewObject parent_object; + + glViewTextPrivate *priv; +}; + +struct _glViewTextClass { + glViewObjectClass parent_class; +}; + + +GType gl_view_text_get_type (void) G_GNUC_CONST; + +glViewObject *gl_view_text_new (glLabelText *object, + glView *view); + + +/* cursor for creating text objects */ +GdkCursor *gl_view_text_get_create_cursor (void); + +/* Object creation handlers. */ +void gl_view_text_create_button_press_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_text_create_motion_event (glView *view, + gdouble x, + gdouble y); + +void gl_view_text_create_button_release_event (glView *view, + gdouble x, + gdouble y); + + +G_END_DECLS + +#endif /* __VIEW_TEXT_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view.c b/src/view.c new file mode 100644 index 00000000..06e9d310 --- /dev/null +++ b/src/view.c @@ -0,0 +1,3737 @@ +/* + * view.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "view.h" + +#include +#include +#include +#include +#include + +#include "label.h" +#include "cairo-label-path.h" +#include "cairo-markup-path.h" +#include "view-object.h" +#include "view-box.h" +#include "view-ellipse.h" +#include "view-line.h" +#include "view-image.h" +#include "view-text.h" +#include "view-barcode.h" +#include "xml-label.h" +#include "color.h" +#include "prefs.h" +#include "marshal.h" + +#include "debug.h" + + +/*==========================================================================*/ +/* Private macros and constants. */ +/*==========================================================================*/ + +#define BG_COLOR GL_COLOR (192, 192, 192) + +#define PAPER_RGB_ARGS 1.0, 1.0, 1.0 +#define GRID_RGB_ARGS 0.753, 0.753, 0.753 +#define MARKUP_RGB_ARGS 0.94, 0.39, 0.39 +#define OUTLINE_RGB_ARGS 0.68, 0.85, 0.90 +#define SELECT_LINE_RGBA_ARGS 0.0, 0.0, 1.0, 0.5 +#define SELECT_FILL_RGBA_ARGS 0.75, 0.75, 1.0, 0.5 + +#define GRID_LINE_WIDTH_PIXELS 1.0 +#define MARKUP_LINE_WIDTH_PIXELS 1.0 +#define OUTLINE_WIDTH_PIXELS 3.0 +#define SELECT_LINE_WIDTH_PIXELS 3.0 + +#define ZOOMTOFIT_PAD 16 + +#define POINTS_PER_MM 2.83464566929 + + +/*==========================================================================*/ +/* Private types. */ +/*==========================================================================*/ + +enum { + SELECTION_CHANGED, + CONTEXT_MENU_ACTIVATE, + ZOOM_CHANGED, + POINTER_MOVED, + POINTER_EXIT, + MODE_CHANGED, + LAST_SIGNAL +}; + + +/*==========================================================================*/ +/* Private globals */ +/*==========================================================================*/ + +static guint signals[LAST_SIGNAL] = {0}; + +/* "CLIPBOARD" selection */ +static GdkAtom clipboard_atom = GDK_NONE; + +static gdouble zooms[] = { + 8.00, + 6.00, + 4.00, + 3.00, + 2.00, + 1.50, + 1.00, + 0.75, + 0.67, + 0.50, + 0.33, + 0.25, + 0.20, + 0.15, + 0.10, +}; +#define N_ZOOMS G_N_ELEMENTS(zooms) + + +/*==========================================================================*/ +/* Local function prototypes */ +/*==========================================================================*/ + +static void gl_view_finalize (GObject *object); + +static void gl_view_construct (glView *view, + glLabel *label); + +static gdouble get_home_scale (glView *view); + +static gboolean expose_cb (glView *view, + GdkEventExpose *event); + +static void realize_cb (glView *view); + +static void size_allocate_cb (glView *view, + GtkAllocation *allocation); + +static void screen_changed_cb (glView *view); + +static void label_changed_cb (glView *view); + +static void label_resized_cb (glView *view); + +static void label_object_added_cb (glView *view, + glLabelObject *object); + +static void draw_layers (glView *view, + cairo_t *cr); + +static void draw_bg_layer (glView *view, + cairo_t *cr); +static void draw_grid_layer (glView *view, + cairo_t *cr); +static void draw_markup_layer (glView *view, + cairo_t *cr); +static void draw_objects_layer (glView *view, + cairo_t *cr); +static void draw_fg_layer (glView *view, + cairo_t *cr); +static void draw_highlight_layer (glView *view, + cairo_t *cr); +static void draw_select_region_layer (glView *view, + cairo_t *cr); + +static void select_object_real (glView *view, + glViewObject *view_object); +static void unselect_object_real (glView *view, + glViewObject *view_object); + +static glViewObject *view_view_object_at (glView *view, + cairo_t *cr, + gdouble x, + gdouble y); + +static void set_zoom_real (glView *view, + gdouble zoom, + gboolean scale_to_fit_flag); + +static void selection_clear_cb (GtkWidget *widget, + GdkEventSelection *event, + glView *view); + +static void selection_get_cb (GtkWidget *widget, + GtkSelectionData *selection_data, + guint info, + guint time, + glView *view); + +static void selection_received_cb (GtkWidget *widget, + GtkSelectionData *selection_data, + guint time, + glView *view); + +static gboolean focus_in_event_cb (glView *view, + GdkEventFocus *event); + +static gboolean focus_out_event_cb (glView *view, + GdkEventFocus *event); + +static gboolean enter_notify_event_cb (glView *view, + GdkEventCrossing *event); + +static gboolean leave_notify_event_cb (glView *view, + GdkEventCrossing *event); + +static gboolean motion_notify_event_cb (glView *view, + GdkEventMotion *event); + +static gboolean button_press_event_cb (glView *view, + GdkEventButton *event); + +static gboolean button_release_event_cb (glView *view, + GdkEventButton *event); + +static gboolean key_press_event_cb (glView *view, + GdkEventKey *event); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glView, gl_view, GTK_TYPE_VBOX); + + +static void +gl_view_class_init (glViewClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_VIEW, "START"); + + gl_view_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_view_finalize; + + signals[SELECTION_CHANGED] = + g_signal_new ("selection_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glViewClass, selection_changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + signals[CONTEXT_MENU_ACTIVATE] = + g_signal_new ("context_menu_activate", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glViewClass, context_menu_activate), + NULL, NULL, + gl_marshal_VOID__INT_UINT, + G_TYPE_NONE, + 2, G_TYPE_INT, G_TYPE_UINT); + + signals[ZOOM_CHANGED] = + g_signal_new ("zoom_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glViewClass, zoom_changed), + NULL, NULL, + gl_marshal_VOID__DOUBLE, + G_TYPE_NONE, + 1, G_TYPE_DOUBLE); + + signals[POINTER_MOVED] = + g_signal_new ("pointer_moved", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glViewClass, pointer_moved), + NULL, NULL, + gl_marshal_VOID__DOUBLE_DOUBLE, + G_TYPE_NONE, + 2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); + + signals[POINTER_EXIT] = + g_signal_new ("pointer_exit", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glViewClass, pointer_exit), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + signals[MODE_CHANGED] = + g_signal_new ("mode_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glViewClass, mode_changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_init (glView *view) +{ + GtkWidget *wscroll; + GdkColor *bg_color; + + gl_debug (DEBUG_VIEW, "START"); + + view->label = NULL; + view->grid_visible = TRUE; + view->grid_spacing = 9; + view->markup_visible = TRUE; + view->default_font_family = NULL; + view->mode = GL_VIEW_MODE_ARROW; + view->object_list = NULL; + view->selected_object_list = NULL; + view->zoom = 1.0; + view->home_scale = get_home_scale (view); + + /* + * Canvas + */ + view->canvas = gtk_layout_new (NULL, NULL); + 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 (view), wscroll, TRUE, TRUE, 0); + gtk_container_add (GTK_CONTAINER (wscroll), view->canvas); + + bg_color = gl_color_to_gdk_color (BG_COLOR); + gtk_widget_modify_bg (GTK_WIDGET (view->canvas), GTK_STATE_NORMAL, bg_color); + g_free (bg_color); + + GTK_WIDGET_SET_FLAGS (GTK_WIDGET (view->canvas), GTK_CAN_FOCUS); + + gtk_widget_add_events (GTK_WIDGET (view->canvas), + (GDK_FOCUS_CHANGE_MASK | + GDK_ENTER_NOTIFY_MASK | + GDK_LEAVE_NOTIFY_MASK | + GDK_POINTER_MOTION_MASK | + GDK_BUTTON_PRESS_MASK | + GDK_BUTTON_RELEASE_MASK | + GDK_KEY_PRESS_MASK)); + + g_signal_connect_swapped (G_OBJECT (view->canvas), "expose-event", + G_CALLBACK (expose_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "realize", + G_CALLBACK (realize_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "size-allocate", + G_CALLBACK (size_allocate_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "screen-changed", + G_CALLBACK (screen_changed_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "focus-in-event", + G_CALLBACK (focus_in_event_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "focus-out-event", + G_CALLBACK (focus_out_event_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "enter-notify-event", + G_CALLBACK (enter_notify_event_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "leave-notify-event", + G_CALLBACK (leave_notify_event_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "motion-notify-event", + G_CALLBACK (motion_notify_event_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "button-press-event", + G_CALLBACK (button_press_event_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "button-release-event", + G_CALLBACK (button_release_event_cb), view); + g_signal_connect_swapped (G_OBJECT (view->canvas), "key-press-event", + G_CALLBACK (key_press_event_cb), view); + + /* + * Clipboard + */ + view->have_selection = FALSE; + view->selection_data = NULL; + view->invisible = gtk_invisible_new (); + if (!clipboard_atom) { + clipboard_atom = gdk_atom_intern ("GLABELS_CLIPBOARD", FALSE); + } + gtk_selection_add_target (view->invisible, + clipboard_atom, GDK_SELECTION_TYPE_STRING, 1); + g_signal_connect (G_OBJECT (view->invisible), + "selection_clear_event", + G_CALLBACK (selection_clear_cb), view); + g_signal_connect (G_OBJECT (view->invisible), "selection_get", + G_CALLBACK (selection_get_cb), view); + g_signal_connect (G_OBJECT (view->invisible), + "selection_received", + G_CALLBACK (selection_received_cb), view); + + /* + * Defaults from preferences + */ + gl_view_set_default_font_family (view, gl_prefs->default_font_family); + gl_view_set_default_font_size (view, gl_prefs->default_font_size); + gl_view_set_default_font_weight (view, gl_prefs->default_font_weight); + gl_view_set_default_font_italic_flag (view, gl_prefs->default_font_italic_flag); + gl_view_set_default_text_color (view, gl_prefs->default_text_color); + gl_view_set_default_text_alignment (view, gl_prefs->default_text_alignment); + gl_view_set_default_text_line_spacing (view, gl_prefs->default_text_line_spacing); + gl_view_set_default_line_width (view, gl_prefs->default_line_width); + gl_view_set_default_line_color (view, gl_prefs->default_line_color); + gl_view_set_default_fill_color (view, gl_prefs->default_fill_color); + + gl_debug (DEBUG_VIEW, "END"); +} + + +static void +gl_view_finalize (GObject *object) +{ + glView *view = GL_VIEW (object); + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_VIEW (object)); + + if (view->default_font_family) { + g_free (view->default_font_family); + } + + G_OBJECT_CLASS (gl_view_parent_class)->finalize (object); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* NEW view object. */ +/****************************************************************************/ +GtkWidget * +gl_view_new (glLabel *label) +{ + glView *view; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (label && GL_IS_LABEL (label), NULL); + + view = g_object_new (GL_TYPE_VIEW, NULL); + + gl_view_construct (view, label); + + gl_debug (DEBUG_VIEW, "END"); + + return GTK_WIDGET (view); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Construct composite widget. */ +/*---------------------------------------------------------------------------*/ +static void +gl_view_construct (glView *view, + glLabel *label) +{ + GList *p_obj; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (GL_IS_VIEW (view)); + + view->label = label; + + for (p_obj = label->objects; p_obj != NULL; p_obj = p_obj->next) + { + object = GL_LABEL_OBJECT (p_obj->data); + + if (GL_IS_LABEL_BOX (object)) { + gl_view_box_new (GL_LABEL_BOX(object), view); + } else if (GL_IS_LABEL_ELLIPSE (object)) { + gl_view_ellipse_new (GL_LABEL_ELLIPSE(object), view); + } else if (GL_IS_LABEL_LINE (object)) { + gl_view_line_new (GL_LABEL_LINE(object), view); + } else if (GL_IS_LABEL_IMAGE (object)) { + gl_view_image_new (GL_LABEL_IMAGE(object), view); + } else if (GL_IS_LABEL_TEXT (object)) { + gl_view_text_new (GL_LABEL_TEXT(object), view); + } else if (GL_IS_LABEL_BARCODE (object)) { + gl_view_barcode_new (GL_LABEL_BARCODE(object), view); + } else { + /* Should not happen! */ + g_message ("Invalid label object type."); + } + } + + g_signal_connect_swapped (G_OBJECT (view->label), "changed", + G_CALLBACK (label_changed_cb), view); + g_signal_connect_swapped (G_OBJECT (view->label), "size_changed", + G_CALLBACK (label_resized_cb), view); + g_signal_connect_swapped (G_OBJECT (view->label), "object_added", + G_CALLBACK (label_object_added_cb), view); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIAVTE. Calculate 1:1 scale for screen. */ +/*---------------------------------------------------------------------------*/ +static gdouble +get_home_scale (glView *view) +{ + GdkScreen *screen; + gdouble screen_width_pixels; + gdouble screen_width_mm; + gdouble screen_height_pixels; + gdouble screen_height_mm; + gdouble x_pixels_per_mm; + gdouble y_pixels_per_mm; + gdouble scale; + + if (view->canvas == NULL) return 1.0; + + if (!gtk_widget_has_screen (GTK_WIDGET (view->canvas))) return 1.0; + + screen = gtk_widget_get_screen (GTK_WIDGET (view->canvas)); + + gl_debug (DEBUG_VIEW, "Screen = %p", screen); + + screen_width_pixels = gdk_screen_get_width (screen); + screen_width_mm = gdk_screen_get_width_mm (screen); + screen_height_pixels = gdk_screen_get_height (screen); + screen_height_mm = gdk_screen_get_height_mm (screen); + + x_pixels_per_mm = screen_width_pixels / screen_width_mm; + y_pixels_per_mm = screen_height_pixels / screen_height_mm; + + gl_debug (DEBUG_VIEW, "Horizontal dot pitch: %g pixels/mm (%g dpi)", + x_pixels_per_mm, x_pixels_per_mm * 25.4); + gl_debug (DEBUG_VIEW, "Vertical dot pitch: %g pixels/mm (%g dpi)", + y_pixels_per_mm, y_pixels_per_mm * 25.4); + + scale = (x_pixels_per_mm + y_pixels_per_mm) / 2.0; + + gl_debug (DEBUG_VIEW, "Average dot pitch: %g pixels/mm (%g dpi)", + scale, scale * 25.4); + + scale /= POINTS_PER_MM; + + gl_debug (DEBUG_VIEW, "Scale = %g pixels/point", scale); + + /* Make sure scale is somewhat sane. */ + if ( (scale < 0.25) || (scale > 4.0) ) return 1.0; + + return scale; +} + + +/*---------------------------------------------------------------------------*/ +/* Schedule canvas update. */ +/*---------------------------------------------------------------------------*/ +void +gl_view_update (glView *view) +{ + GtkWidget *widget; + GdkRegion *region; + + gl_debug (DEBUG_VIEW, "START"); + + widget = GTK_WIDGET (view->canvas); + + if (!widget->window) return; + + if ( !view->update_scheduled_flag ) + { + view->update_scheduled_flag = TRUE; + + region = gdk_drawable_get_clip_region (widget->window); + /* redraw the cairo canvas completely by exposing it */ + gdk_window_invalidate_region (widget->window, region, TRUE); + gdk_region_destroy (region); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* Schedule canvas region update. */ +/*---------------------------------------------------------------------------*/ +void +gl_view_update_region (glView *view, + cairo_t *cr, + glLabelRegion *region) +{ + GtkWidget *widget; + GdkRectangle rect; + gdouble x, y, w, h; + + gl_debug (DEBUG_VIEW, "START"); + + widget = GTK_WIDGET (view->canvas); + + if (!widget->window) return; + + x = MIN (region->x1, region->x2); + y = MIN (region->y1, region->y2); + w = fabs (region->x2 - region->x1); + h = fabs (region->y2 - region->y1); + + cairo_user_to_device (cr, &x, &y); + cairo_user_to_device_distance (cr, &w, &h); + + rect.x = x - 3; + rect.y = y - 3; + rect.width = w + 6; + rect.height = h + 6; + + gdk_window_invalidate_rect (widget->window, &rect, TRUE); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Expose handler. */ +/*---------------------------------------------------------------------------*/ +static gboolean +expose_cb (glView *view, + GdkEventExpose *event) +{ + cairo_t *cr; + + gl_debug (DEBUG_VIEW, "START"); + + view->update_scheduled_flag = FALSE; + + /* get a cairo_t */ + cr = gdk_cairo_create (GTK_LAYOUT (view->canvas)->bin_window); + + cairo_rectangle (cr, + event->area.x, event->area.y, + event->area.width, event->area.height); + cairo_clip (cr); + + draw_layers (view, cr); + + cairo_destroy (cr); + + gl_debug (DEBUG_VIEW, "END"); + + return FALSE; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Realize handler. */ +/*---------------------------------------------------------------------------*/ +static void +realize_cb (glView *view) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + + gl_debug (DEBUG_VIEW, "START"); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Size allocation changed callback. */ +/*---------------------------------------------------------------------------*/ +static void +size_allocate_cb (glView *view, + GtkAllocation *allocation) +{ + gl_debug (DEBUG_VIEW, "START"); + + GTK_LAYOUT (view->canvas)->hadjustment->page_size = allocation->width; + GTK_LAYOUT (view->canvas)->hadjustment->page_increment = allocation->width / 2; + + GTK_LAYOUT (view->canvas)->vadjustment->page_size = allocation->height; + GTK_LAYOUT (view->canvas)->vadjustment->page_increment = allocation->height / 2; + + g_signal_emit_by_name (GTK_LAYOUT (view->canvas)->hadjustment, "changed"); + g_signal_emit_by_name (GTK_LAYOUT (view->canvas)->vadjustment, "changed"); + + if (view->zoom_to_fit_flag) { + /* Maintain best fit zoom */ + gl_view_zoom_to_fit (view); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Screen changed callback. */ +/*---------------------------------------------------------------------------*/ +static void +screen_changed_cb (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + if (gtk_widget_has_screen (GTK_WIDGET (view->canvas))) { + + view->home_scale = get_home_scale (view); + + if (view->zoom_to_fit_flag) { + /* Maintain best fit zoom */ + gl_view_zoom_to_fit (view); + } + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Handle label changed event. */ +/*---------------------------------------------------------------------------*/ +static void +label_changed_cb (glView *view) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + + gl_debug (DEBUG_VIEW, "START"); + + gl_view_update (view); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Handle label resize event. */ +/*---------------------------------------------------------------------------*/ +static void +label_resized_cb (glView *view) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + + gl_debug (DEBUG_VIEW, "START"); + + g_signal_emit_by_name (GTK_LAYOUT (view->canvas)->hadjustment, "changed"); + g_signal_emit_by_name (GTK_LAYOUT (view->canvas)->vadjustment, "changed"); + + gl_view_update (view); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Handle new label object. */ +/*---------------------------------------------------------------------------*/ +static void +label_object_added_cb (glView *view, + glLabelObject *object) +{ + glViewObject *view_object; + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (object && GL_IS_LABEL_OBJECT (object)); + + if (GL_IS_LABEL_BOX (object)) { + view_object = gl_view_box_new (GL_LABEL_BOX(object), view); + } else if (GL_IS_LABEL_ELLIPSE (object)) { + view_object = gl_view_ellipse_new (GL_LABEL_ELLIPSE(object), view); + } else if (GL_IS_LABEL_LINE (object)) { + view_object = gl_view_line_new (GL_LABEL_LINE(object), view); + } else if (GL_IS_LABEL_IMAGE (object)) { + view_object = gl_view_image_new (GL_LABEL_IMAGE(object), view); + } else if (GL_IS_LABEL_TEXT (object)) { + view_object = gl_view_text_new (GL_LABEL_TEXT(object), view); + } else if (GL_IS_LABEL_BARCODE (object)) { + view_object = gl_view_barcode_new (GL_LABEL_BARCODE(object), view); + } else { + /* Should not happen! */ + view_object = NULL; + g_message ("Invalid label object type."); + } + + gl_view_select_object (view, view_object); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Create, draw and order layers. */ +/*---------------------------------------------------------------------------*/ +static void +draw_layers (glView *view, + cairo_t *cr) +{ + gdouble scale; + gdouble w, h; + gint canvas_w, canvas_h; + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (view->label && GL_IS_LABEL (view->label)); + + gl_debug (DEBUG_VIEW, "START"); + + scale = view->zoom * view->home_scale; + + gl_label_get_size (view->label, &w, &h); + + scale = view->home_scale * view->zoom; + gtk_layout_set_size (GTK_LAYOUT (view->canvas), w*scale+8, h*scale+8); + + gdk_drawable_get_size (GTK_LAYOUT (view->canvas)->bin_window, &canvas_w, &canvas_h); + + view->x0 = (canvas_w/scale - w) / 2.0; + view->y0 = (canvas_h/scale - h) / 2.0; + view->w = w; + view->h = h; + + cairo_save (cr); + + cairo_scale (cr, scale, scale); + cairo_translate (cr, view->x0, view->y0); + + draw_bg_layer (view, cr); + draw_grid_layer (view, cr); + draw_markup_layer (view, cr); + draw_objects_layer (view, cr); + draw_fg_layer (view, cr); + draw_highlight_layer (view, cr); + draw_select_region_layer (view, cr); + + cairo_restore (cr); + + gl_debug (DEBUG_VIEW, "END"); + +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw background */ +/*---------------------------------------------------------------------------*/ +static void +draw_bg_layer (glView *view, + cairo_t *cr) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (view->label && GL_IS_LABEL (view->label)); + + gl_cairo_label_path (cr, view->label->template, view->label->rotate_flag, FALSE); + + cairo_set_source_rgb (cr, PAPER_RGB_ARGS); + cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); + cairo_fill (cr); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw grid lines. */ +/*---------------------------------------------------------------------------*/ +static void +draw_grid_layer (glView *view, + cairo_t *cr) +{ + gdouble w, h; + gdouble x, y; + gdouble x0, y0; + const lglTemplateFrame *frame; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (view->label && GL_IS_LABEL(view->label)); + + if (view->grid_visible) + { + + frame = (lglTemplateFrame *)view->label->template->frames->data; + + gl_label_get_size (view->label, &w, &h); + + if (frame->shape == LGL_TEMPLATE_FRAME_SHAPE_RECT) { + x0 = 0.0; + y0 = 0.0; + } else { + /* round labels, adjust grid to line up with center of label. */ + x0 = fmod (w/2.0, view->grid_spacing); + y0 = fmod (h/2.0, view->grid_spacing); + } + + + cairo_save (cr); + + cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); + cairo_set_line_width (cr, GRID_LINE_WIDTH_PIXELS/(view->home_scale * view->zoom)); + cairo_set_source_rgb (cr, GRID_RGB_ARGS); + + for ( x=x0+view->grid_spacing; x < w; x += view->grid_spacing ) + { + cairo_move_to (cr, x, 0); + cairo_line_to (cr, x, h); + cairo_stroke (cr); + } + + for ( y=y0+view->grid_spacing; y < h; y += view->grid_spacing ) + { + cairo_move_to (cr, 0, y); + cairo_line_to (cr, w, y); + cairo_stroke (cr); + } + + cairo_restore (cr); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw markup layer. */ +/*---------------------------------------------------------------------------*/ +static void +draw_markup_layer (glView *view, + cairo_t *cr) +{ + glLabel *label; + const lglTemplateFrame *frame; + GList *p; + lglTemplateMarkup *markup; + gdouble width, height; + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (view->label && GL_IS_LABEL (view->label)); + + if (view->markup_visible) + { + + label = view->label; + frame = (lglTemplateFrame *)view->label->template->frames->data; + + cairo_save (cr); + + if (label->rotate_flag) + { + lgl_template_frame_get_size (frame, &width, &height); + cairo_rotate (cr, -M_PI/2.0); + cairo_translate (cr, -width, 0.0); + } + + cairo_set_line_width (cr, MARKUP_LINE_WIDTH_PIXELS/(view->home_scale * view->zoom)); + cairo_set_source_rgb (cr, MARKUP_RGB_ARGS); + + for ( p=frame->all.markups; p != NULL; p=p->next ) + { + markup = (lglTemplateMarkup *)p->data; + + gl_cairo_markup_path (cr, markup, label); + + cairo_stroke (cr); + } + + cairo_restore (cr); + } + +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw objects layer. */ +/*---------------------------------------------------------------------------*/ +static void +draw_objects_layer (glView *view, + cairo_t *cr) +{ + gl_label_draw (view->label, cr, TRUE, NULL); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw foreground */ +/*---------------------------------------------------------------------------*/ +static void +draw_fg_layer (glView *view, + cairo_t *cr) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (view->label && GL_IS_LABEL (view->label)); + + gl_cairo_label_path (cr, view->label->template, view->label->rotate_flag, FALSE); + + cairo_set_line_width (cr, OUTLINE_WIDTH_PIXELS/(view->home_scale * view->zoom)); + cairo_set_source_rgb (cr, OUTLINE_RGB_ARGS); + cairo_stroke (cr); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Create highlight layer. */ +/*---------------------------------------------------------------------------*/ +static void +draw_highlight_layer (glView *view, + cairo_t *cr) +{ + GList *p_obj; + glViewObject *view_object; + + g_return_if_fail (view && GL_IS_VIEW (view)); + + cairo_save (cr); + + cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); + + for (p_obj = view->selected_object_list; p_obj != NULL; p_obj = p_obj->next) + { + view_object = GL_VIEW_OBJECT (p_obj->data); + + gl_view_object_draw_handles (view_object, cr); + } + + cairo_restore (cr); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Draw select region layer. */ +/*---------------------------------------------------------------------------*/ +static void +draw_select_region_layer (glView *view, + cairo_t *cr) +{ + gdouble x1, y1; + gdouble w, h; + + g_return_if_fail (view && GL_IS_VIEW (view)); + + if (view->select_region_visible) + { + x1 = MIN (view->select_region.x1, view->select_region.x2); + y1 = MIN (view->select_region.y1, view->select_region.y2); + w = fabs (view->select_region.x2 - view->select_region.x1); + h = fabs (view->select_region.y2 - view->select_region.y1); + + cairo_save (cr); + + cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); + + cairo_rectangle (cr, x1, y1, w, h); + + cairo_set_source_rgba (cr, SELECT_FILL_RGBA_ARGS); + cairo_fill_preserve (cr); + + cairo_set_line_width (cr, SELECT_LINE_WIDTH_PIXELS/(view->home_scale * view->zoom)); + cairo_set_source_rgba (cr, SELECT_LINE_RGBA_ARGS); + cairo_stroke (cr); + + cairo_restore (cr); + } +} + + +/*****************************************************************************/ +/* Show grid. */ +/*****************************************************************************/ +void +gl_view_show_grid (glView *view) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->grid_visible = TRUE; + gl_view_update (view); +} + + +/*****************************************************************************/ +/* Hide grid. */ +/*****************************************************************************/ +void +gl_view_hide_grid (glView *view) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->grid_visible = FALSE; + gl_view_update (view); +} + + +/*****************************************************************************/ +/* Set grid spacing. */ +/*****************************************************************************/ +void +gl_view_set_grid_spacing (glView *view, + gdouble spacing) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->grid_spacing = spacing; + gl_view_update (view); +} + + +/*****************************************************************************/ +/* Show markup. */ +/*****************************************************************************/ +void +gl_view_show_markup (glView *view) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->markup_visible = TRUE; + gl_view_update (view); +} + + +/*****************************************************************************/ +/* Hide markup. */ +/*****************************************************************************/ +void +gl_view_hide_markup (glView *view) +{ + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->markup_visible = FALSE; + gl_view_update (view); +} + + +/*****************************************************************************/ +/* Set arrow mode. */ +/*****************************************************************************/ +void +gl_view_arrow_mode (glView *view) +{ + GdkCursor *cursor; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + cursor = gdk_cursor_new (GDK_LEFT_PTR); + gdk_window_set_cursor (view->canvas->window, cursor); + gdk_cursor_unref (cursor); + + view->mode = GL_VIEW_MODE_ARROW; + view->state = GL_VIEW_IDLE; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Set create text object mode. */ +/*****************************************************************************/ +void +gl_view_object_create_mode (glView *view, + glLabelObjectType type) +{ + GdkCursor *cursor = NULL; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + switch (type) + { + case GL_LABEL_OBJECT_BOX: + cursor = gl_view_box_get_create_cursor (); + break; + case GL_LABEL_OBJECT_ELLIPSE: + cursor = gl_view_ellipse_get_create_cursor (); + break; + case GL_LABEL_OBJECT_LINE: + cursor = gl_view_line_get_create_cursor (); + break; + case GL_LABEL_OBJECT_IMAGE: + cursor = gl_view_image_get_create_cursor (); + break; + case GL_LABEL_OBJECT_TEXT: + cursor = gl_view_text_get_create_cursor (); + break; + case GL_LABEL_OBJECT_BARCODE: + cursor = gl_view_barcode_get_create_cursor (); + break; + default: + g_message ("Invalid label object type.");/*Should not happen!*/ + break; + } + + gdk_window_set_cursor (view->canvas->window, cursor); + gdk_cursor_unref (cursor); + + view->mode = GL_VIEW_MODE_OBJECT_CREATE; + view->state = GL_VIEW_IDLE; + view->create_type = type; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Select given object (adding to current selection). */ +/*****************************************************************************/ +void +gl_view_select_object (glView *view, + glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + select_object_real (view, view_object); + + g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Unselect given object (removing from current selection). */ +/*****************************************************************************/ +void +gl_view_unselect_object (glView *view, + glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + unselect_object_real (view, view_object); + + g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Select all items. */ +/*****************************************************************************/ +void +gl_view_select_all (glView *view) +{ + GList *p, *p_next; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + /* 1st unselect anything already selected. */ + for (p = view->selected_object_list; p != NULL; p = p_next) { + p_next = p->next; + unselect_object_real (view, GL_VIEW_OBJECT (p->data)); + } + + /* Finally select all objects. */ + for (p = view->object_list; p != NULL; p = p->next) { + select_object_real (view, GL_VIEW_OBJECT (p->data)); + } + + g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Remove all selections */ +/*****************************************************************************/ +void +gl_view_unselect_all (glView *view) +{ + GList *p; + GList *p_next; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p_next) { + p_next = p->next; + unselect_object_real (view, GL_VIEW_OBJECT (p->data)); + } + + g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Select all objects within given rectangular region (adding to selection). */ +/*****************************************************************************/ +void +gl_view_select_region (glView *view, + glLabelRegion *region) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + gdouble r_x1, r_y1; + gdouble r_x2, r_y2; + glLabelRegion obj_extent; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + r_x1 = MIN (region->x1, region->x2); + r_y1 = MIN (region->y1, region->y2); + r_x2 = MAX (region->x1, region->x2); + r_y2 = MAX (region->y1, region->y2); + + for (p = view->object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT(p->data); + if (!gl_view_is_object_selected (view, view_object)) + { + + object = gl_view_object_get_object (view_object); + + gl_label_object_get_extent (object, &obj_extent); + if ((obj_extent.x1 >= r_x1) && + (obj_extent.x2 <= r_x2) && + (obj_extent.y1 >= r_y1) && + (obj_extent.y2 <= r_y2)) + { + select_object_real (view, view_object); + } + + } + } + + g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Select an object. */ +/*---------------------------------------------------------------------------*/ +static void +select_object_real (glView *view, + glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (GL_IS_VIEW_OBJECT (view_object)); + + if (!gl_view_is_object_selected (view, view_object)) { + view->selected_object_list = + g_list_append (view->selected_object_list, view_object); + } + gtk_widget_grab_focus (GTK_WIDGET (view->canvas)); + + gl_view_update (view); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Un-select object. */ +/*---------------------------------------------------------------------------*/ +static void +unselect_object_real (glView *view, + glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (GL_IS_VIEW_OBJECT (view_object)); + + view->selected_object_list = + g_list_remove (view->selected_object_list, view_object); + + gl_view_update (view); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Return object at (x,y). */ +/*---------------------------------------------------------------------------*/ +static glViewObject * +view_view_object_at (glView *view, + cairo_t *cr, + gdouble x, + gdouble y) +{ + GList *p_obj; + glViewObject *view_object; + + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + for (p_obj = g_list_last (view->object_list); p_obj != NULL; p_obj = p_obj->prev) + { + + view_object = GL_VIEW_OBJECT (p_obj->data); + + if (gl_view_object_at (view_object, cr, x, y)) + { + return view_object; + } + + } + + return NULL; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Return object handle at (x,y). */ +/*---------------------------------------------------------------------------*/ +static glViewObject * +view_handle_at (glView *view, + cairo_t *cr, + gdouble x, + gdouble y, + glViewObjectHandle *handle) +{ + GList *p_obj; + glViewObject *view_object; + + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + for (p_obj = g_list_last (view->selected_object_list); p_obj != NULL; p_obj = p_obj->prev) + { + + view_object = GL_VIEW_OBJECT (p_obj->data); + + if ((*handle = gl_view_object_handle_at (view_object, cr, x, y))) + { + return view_object; + } + + } + + return NULL; +} + + +/*****************************************************************************/ +/* Is the object in our current selection? */ +/*****************************************************************************/ +gboolean +gl_view_is_object_selected (glView *view, + glViewObject *view_object) +{ + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); + g_return_val_if_fail (GL_IS_VIEW_OBJECT (view_object), FALSE); + + if (g_list_find (view->selected_object_list, view_object) == NULL) { + return FALSE; + } + return TRUE; +} + + +/*****************************************************************************/ +/* Is our current selection empty? */ +/*****************************************************************************/ +gboolean +gl_view_is_selection_empty (glView *view) +{ + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); + + if (view->selected_object_list == NULL) { + return TRUE; + } else { + return FALSE; + } +} + + +/*****************************************************************************/ +/* Is our current selection atomic? I.e. only one item selected. */ +/*****************************************************************************/ +gboolean +gl_view_is_selection_atomic (glView *view) +{ + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); + + if (view->selected_object_list == NULL) + return FALSE; + if (view->selected_object_list->next == NULL) + return TRUE; + return FALSE; +} + + +/*****************************************************************************/ +/* Delete selected objects. (Bypass clipboard) */ +/*****************************************************************************/ +void +gl_view_delete_selection (glView *view) +{ + GList *object_list; + GList *p; + GList *p_next; + glViewObject *view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + object_list = view->selected_object_list; + view->selected_object_list = NULL; + g_signal_emit (G_OBJECT(view), signals[SELECTION_CHANGED], 0); + + for (p = object_list; p != NULL; p = p_next) { + p_next = p->next; + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_remove (object); + } + + g_list_free (object_list); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Get object property editor of first selected object. */ +/*****************************************************************************/ +GtkWidget * +gl_view_get_editor (glView *view) +{ + glViewObject *view_object; + GtkWidget *editor = NULL; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + if (!gl_view_is_selection_empty (view)) { + + view_object = GL_VIEW_OBJECT(view->selected_object_list->data); + editor = gl_view_object_get_editor (view_object); + + } + + gl_debug (DEBUG_VIEW, "END"); + + return editor; +} + + +/*****************************************************************************/ +/* Raise selected items to top. */ +/*****************************************************************************/ +void +gl_view_raise_selection (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_raise_to_top (object); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Lower selected items to bottom. */ +/*****************************************************************************/ +void +gl_view_lower_selection (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_lower_to_bottom (object); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Rotate selected objects by given angle. */ +/*****************************************************************************/ +void +gl_view_rotate_selection (glView *view, + gdouble theta_degs) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_rotate (object, theta_degs); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Rotate selected objects 90 degrees left. */ +/*****************************************************************************/ +void +gl_view_rotate_selection_left (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_rotate (object, -90.0); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Rotate selected objects 90 degrees right. */ +/*****************************************************************************/ +void +gl_view_rotate_selection_right (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_rotate (object, 90.0); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Flip selected objects horizontally. */ +/*****************************************************************************/ +void +gl_view_flip_selection_horiz (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_flip_horiz (object); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Flip selected objects vertically. */ +/*****************************************************************************/ +void +gl_view_flip_selection_vert (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_flip_vert (object); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Align selected objects to left most edge. */ +/*****************************************************************************/ +void +gl_view_align_selection_left (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + gdouble dx, x1_min; + glLabelRegion obj_extent; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + g_return_if_fail (!gl_view_is_selection_empty (view) && + !gl_view_is_selection_atomic (view)); + + /* find left most edge */ + p = view->selected_object_list; + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + x1_min = obj_extent.x1; + for (p = p->next; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + if ( obj_extent.x1 < x1_min ) x1_min = obj_extent.x1; + } + + /* now adjust the object positions to line up the left edges */ + for (p = view->selected_object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dx = x1_min - obj_extent.x1; + gl_label_object_set_position_relative (object, dx, 0.0); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Align selected objects to right most edge. */ +/*****************************************************************************/ +void +gl_view_align_selection_right (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + gdouble dx, x2_max; + glLabelRegion obj_extent; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + g_return_if_fail (!gl_view_is_selection_empty (view) && + !gl_view_is_selection_atomic (view)); + + /* find right most edge */ + p = view->selected_object_list; + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + x2_max = obj_extent.x2; + for (p = p->next; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + if ( obj_extent.x2 > x2_max ) x2_max = obj_extent.x2; + } + + /* now adjust the object positions to line up the right edges */ + for (p = view->selected_object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dx = x2_max - obj_extent.x2; + gl_label_object_set_position_relative (object, dx, 0.0); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Align selected objects to horizontal center of objects. */ +/*****************************************************************************/ +void +gl_view_align_selection_hcenter (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + gdouble dx; + gdouble dxmin; + gdouble xsum, xavg; + glLabelRegion obj_extent; + gdouble xcenter; + gint n; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + g_return_if_fail (!gl_view_is_selection_empty (view) && + !gl_view_is_selection_atomic (view)); + + /* find average center of objects */ + xsum = 0.0; + n = 0; + for (p = view->selected_object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + xsum += (obj_extent.x1 + obj_extent.x2) / 2.0; + n++; + } + xavg = xsum / n; + + /* find center of object closest to average center */ + p = view->selected_object_list; + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dxmin = fabs (xavg - (obj_extent.x1 + obj_extent.x2)/2.0); + xcenter = (obj_extent.x1 + obj_extent.x2)/2.0; + for (p = p->next; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dx = fabs (xavg - (obj_extent.x1 + obj_extent.x2)/2.0); + if ( dx < dxmin ) + { + dxmin = dx; + xcenter = (obj_extent.x1 + obj_extent.x2)/2.0; + } + } + + /* now adjust the object positions to line up this center */ + for (p = view->selected_object_list; p != NULL; p = p->next) { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dx = xcenter - (obj_extent.x1 + obj_extent.x2)/2.0; + gl_label_object_set_position_relative (object, dx, 0.0); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Align selected objects to top most edge. */ +/*****************************************************************************/ +void +gl_view_align_selection_top (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + gdouble dy, y1_min; + glLabelRegion obj_extent; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + g_return_if_fail (!gl_view_is_selection_empty (view) && + !gl_view_is_selection_atomic (view)); + + /* find top most edge */ + p = view->selected_object_list; + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + y1_min = obj_extent.y1; + for (p = p->next; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + if ( obj_extent.y1 < y1_min ) y1_min = obj_extent.y1; + } + + /* now adjust the object positions to line up the top edges */ + for (p = view->selected_object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dy = y1_min - obj_extent.y1; + gl_label_object_set_position_relative (object, 0.0, dy); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Align selected objects to bottom most edge. */ +/*****************************************************************************/ +void +gl_view_align_selection_bottom (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + gdouble dy, y2_max; + glLabelRegion obj_extent; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + g_return_if_fail (!gl_view_is_selection_empty (view) && + !gl_view_is_selection_atomic (view)); + + /* find bottom most edge */ + p = view->selected_object_list; + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + y2_max = obj_extent.y2; + for (p = p->next; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + if ( obj_extent.y2 > y2_max ) y2_max = obj_extent.y2; + } + + /* now adjust the object positions to line up the bottom edges */ + for (p = view->selected_object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dy = y2_max - obj_extent.y2; + gl_label_object_set_position_relative (object, 0.0, dy); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Align selected objects to viertical center of objects. */ +/*****************************************************************************/ +void +gl_view_align_selection_vcenter (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + gdouble dy; + gdouble dymin; + gdouble ysum, yavg; + glLabelRegion obj_extent; + gdouble ycenter; + gint n; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + g_return_if_fail (!gl_view_is_selection_empty (view) && + !gl_view_is_selection_atomic (view)); + + /* find average center of objects */ + ysum = 0.0; + n = 0; + for (p = view->selected_object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + ysum += (obj_extent.y1 + obj_extent.y2) / 2.0; + n++; + } + yavg = ysum / n; + + /* find center of object closest to average center */ + p = view->selected_object_list; + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dymin = fabs (yavg - (obj_extent.y1 + obj_extent.y2)/2.0); + ycenter = (obj_extent.y1 + obj_extent.y2)/2.0; + for (p = p->next; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dy = fabs (yavg - (obj_extent.y1 + obj_extent.y2)/2.0); + if ( dy < dymin ) + { + dymin = dy; + ycenter = (obj_extent.y1 + obj_extent.y2)/2.0; + } + } + + /* now adjust the object positions to line up this center */ + for (p = view->selected_object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + dy = ycenter - (obj_extent.y1 + obj_extent.y2)/2.0; + gl_label_object_set_position_relative (object, 0.0, dy); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Center selected objects to in center of label. */ +/*****************************************************************************/ +void +gl_view_center_selection_horiz (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + gdouble dx; + gdouble x_label_center; + gdouble x_obj_center; + glLabelRegion obj_extent; + gdouble w, h; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + g_return_if_fail (!gl_view_is_selection_empty (view)); + + gl_label_get_size (view->label, &w, &h); + x_label_center = w / 2.0; + + /* adjust the object positions */ + for (p = view->selected_object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + x_obj_center = (obj_extent.x1 + obj_extent.x2) / 2.0; + dx = x_label_center - x_obj_center; + gl_label_object_set_position_relative (object, dx, 0.0); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Center selected objects to in center of label. */ +/*****************************************************************************/ +void +gl_view_center_selection_vert (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + gdouble dy; + gdouble y_label_center; + gdouble y_obj_center; + glLabelRegion obj_extent; + gdouble w, h; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + g_return_if_fail (!gl_view_is_selection_empty (view)); + + gl_label_get_size (view->label, &w, &h); + y_label_center = h / 2.0; + + /* adjust the object positions */ + for (p = view->selected_object_list; p != NULL; p = p->next) + { + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + gl_label_object_get_extent (object, &obj_extent); + y_obj_center = (obj_extent.y1 + obj_extent.y2) / 2.0; + dy = y_label_center - y_obj_center; + gl_label_object_set_position_relative (object, 0.0, dy); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Move selected objects */ +/*****************************************************************************/ +void +gl_view_move_selection (glView *view, + gdouble dx, + gdouble dy) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) + { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_position_relative (object, dx, dy); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Can text properties be set for selection? */ +/*****************************************************************************/ +gboolean +gl_view_can_selection_text (glView *view) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); + + for (p = view->selected_object_list; p != NULL; p = p->next) + { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + if (gl_label_object_can_text (object)) + { + return TRUE; + } + + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Set font family for all text contained in selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_font_family (glView *view, + const gchar *font_family) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_font_family (object, font_family); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Set font size for all text contained in selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_font_size (glView *view, + gdouble font_size) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_font_size (object, font_size); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Set font weight for all text contained in selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_font_weight (glView *view, + PangoWeight font_weight) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_font_weight (object, font_weight); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Set font italic flag for all text contained in selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_font_italic_flag (glView *view, + gboolean font_italic_flag) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_font_italic_flag (object, font_italic_flag); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Set text alignment for all text contained in selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_text_alignment (glView *view, + PangoAlignment text_alignment) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_text_alignment (object, text_alignment); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Set text line spacing for all text contained in selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_text_line_spacing (glView *view, + gdouble text_line_spacing) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_text_line_spacing (object, text_line_spacing); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Set text color for all text contained in selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_text_color (glView *view, + glColorNode *text_color_node) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_text_color (object, text_color_node); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Can fill properties be set for selection? */ +/*****************************************************************************/ +gboolean +gl_view_can_selection_fill (glView *view) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + if (gl_label_object_can_fill (object)) { + return TRUE; + } + + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Set fill color for all selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_fill_color (glView *view, + glColorNode *fill_color_node) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_fill_color (object, fill_color_node); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Can line color properties be set for selection? */ +/*****************************************************************************/ +gboolean +gl_view_can_selection_line_color (glView *view) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + if (gl_label_object_can_line_color (object)) { + return TRUE; + } + + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Set line color for all selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_line_color (glView *view, + glColorNode *line_color_node) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_line_color (object, line_color_node); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Can line width properties be set for selection? */ +/*****************************************************************************/ +gboolean +gl_view_can_selection_line_width (glView *view) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + if (gl_label_object_can_line_width (object)) { + return TRUE; + } + + } + + return FALSE; +} + + +/*****************************************************************************/ +/* Set line width for all selected objects. */ +/*****************************************************************************/ +void +gl_view_set_selection_line_width (glView *view, + gdouble line_width) +{ + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + object = gl_view_object_get_object(GL_VIEW_OBJECT (p->data)); + gl_label_object_set_line_width (object, line_width); + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* "Cut" selected items and place in clipboard selections. */ +/*****************************************************************************/ +void +gl_view_cut (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + gl_view_copy (view); + gl_view_delete_selection (view); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* "Copy" selected items to clipboard selections. */ +/*****************************************************************************/ +void +gl_view_copy (glView *view) +{ + GList *p; + glViewObject *view_object; + glLabelObject *object; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + if (view->selected_object_list) { + + if ( view->selection_data ) { + g_object_unref (view->selection_data); + } + view->selection_data = GL_LABEL(gl_label_new ()); + gl_label_set_template (view->selection_data, view->label->template); + gl_label_set_rotate_flag (view->selection_data, view->label->rotate_flag); + + for (p = view->selected_object_list; p != NULL; p = p->next) { + + view_object = GL_VIEW_OBJECT (p->data); + object = gl_view_object_get_object (view_object); + + gl_label_object_dup (object, view->selection_data); + + } + + gtk_selection_owner_set (view->invisible, + clipboard_atom, GDK_CURRENT_TIME); + view->have_selection = TRUE; + + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* "Paste" from private clipboard selection. */ +/*****************************************************************************/ +void +gl_view_paste (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + gtk_selection_convert (GTK_WIDGET (view->invisible), + clipboard_atom, GDK_SELECTION_TYPE_STRING, + GDK_CURRENT_TIME); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Zoom in one "notch" */ +/*****************************************************************************/ +void +gl_view_zoom_in (glView *view) +{ + gint i, i_min; + gdouble dist, dist_min; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + /* Find index of current scale (or best match) */ + i_min = 1; /* start with 2nd largest scale */ + dist_min = fabs (zooms[1] - view->zoom); + for (i = 2; i < N_ZOOMS; i++) { + dist = fabs (zooms[i] - view->zoom); + if (dist < dist_min) { + i_min = i; + dist_min = dist; + } + } + + /* zoom in one "notch" */ + i = MAX (0, i_min - 1); + gl_debug (DEBUG_VIEW, "zoom[%d] = %g", i, zooms[i]); + set_zoom_real (view, zooms[i], FALSE); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Zoom out one "notch" */ +/*****************************************************************************/ +void +gl_view_zoom_out (glView *view) +{ + gint i, i_min; + gdouble dist, dist_min; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + /* Find index of current scale (or best match) */ + i_min = 0; /* start with largest scale */ + dist_min = fabs (zooms[0] - view->zoom); + for (i = 1; i < N_ZOOMS; i++) { + dist = fabs (zooms[i] - view->zoom); + if (dist < dist_min) { + i_min = i; + dist_min = dist; + } + } + + /* zoom out one "notch" */ + if (i_min >= N_ZOOMS) + return; + i = i_min + 1; + if (i >= N_ZOOMS) + return; + set_zoom_real (view, zooms[i], FALSE); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*****************************************************************************/ +/* Set zoom to best fit. */ +/*****************************************************************************/ +void +gl_view_zoom_to_fit (glView *view) +{ + gint w_view, h_view; + gdouble w_label, h_label; + gdouble x_scale, y_scale, scale; + + gl_debug (DEBUG_VIEW, ""); + + if ( ! GTK_WIDGET_VISIBLE(view)) { + set_zoom_real (view, 1.0, TRUE); + return; + } + + w_view = GTK_WIDGET(view)->allocation.width; + h_view = GTK_WIDGET(view)->allocation.height; + + gl_label_get_size (GL_LABEL(view->label), &w_label, &h_label); + + gl_debug (DEBUG_VIEW, "View size: %d, %d", w_view, h_view); + gl_debug (DEBUG_VIEW, "Label size: %g, %g", w_label, h_label); + + /* Calculate best scale */ + x_scale = (double)(w_view - ZOOMTOFIT_PAD) / w_label; + y_scale = (double)(h_view - ZOOMTOFIT_PAD) / h_label; + scale = MIN (x_scale, y_scale); + gl_debug (DEBUG_VIEW, "Candidate zooms: %g, %g => %g", x_scale, y_scale, scale); + + /* Limit */ + gl_debug (DEBUG_VIEW, "Scale: %g", scale); + scale = MIN (scale, zooms[0]*view->home_scale); + scale = MAX (scale, zooms[N_ZOOMS-1]*view->home_scale); + gl_debug (DEBUG_VIEW, "Limitted scale: %g", scale); + + set_zoom_real (view, scale/view->home_scale, TRUE); +} + + +/*****************************************************************************/ +/* Set current zoom factor to explicit value. */ +/*****************************************************************************/ +void +gl_view_set_zoom (glView *view, + gdouble zoom) +{ + gl_debug (DEBUG_VIEW, "START"); + + set_zoom_real (view, zoom, FALSE); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Set canvas scale. */ +/*---------------------------------------------------------------------------*/ +static void +set_zoom_real (glView *view, + gdouble zoom, + gboolean zoom_to_fit_flag) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (zoom > 0.0); + + /* Limit, if needed */ + gl_debug (DEBUG_VIEW, "Zoom requested: %g", zoom); + zoom = MIN (zoom, zooms[0]); + zoom = MAX (zoom, zooms[N_ZOOMS-1]); + gl_debug (DEBUG_VIEW, "Limitted zoom: %g", zoom); + + if ( zoom != view->zoom ) { + + view->zoom = zoom; + view->zoom_to_fit_flag = zoom_to_fit_flag; + + gl_view_update (view); + + g_signal_emit (G_OBJECT(view), signals[ZOOM_CHANGED], 0, zoom); + + } + + gl_debug (DEBUG_VIEW, "END"); + +} + + +/*****************************************************************************/ +/* Get current zoom factor. */ +/*****************************************************************************/ +gdouble +gl_view_get_zoom (glView *view) +{ + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (view && GL_IS_VIEW (view), 1.0); + + return view->zoom; +} + + +/*****************************************************************************/ +/* Is this the maximum zoom level. */ +/*****************************************************************************/ +gboolean +gl_view_is_zoom_max (glView *view) +{ + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (GL_IS_VIEW (view), FALSE); + + return view->zoom >= zooms[0]; +} + + +/*****************************************************************************/ +/* Is this the minimum zoom level. */ +/*****************************************************************************/ +gboolean +gl_view_is_zoom_min (glView *view) +{ + gl_debug (DEBUG_VIEW, ""); + + g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); + + return view->zoom <= zooms[N_ZOOMS-1]; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Handle "selection-clear" signal. */ +/*---------------------------------------------------------------------------*/ +static void +selection_clear_cb (GtkWidget *widget, + GdkEventSelection *event, + glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->have_selection = FALSE; + g_object_unref (view->selection_data); + view->selection_data = NULL; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Handle "selection-get" signal. */ +/*---------------------------------------------------------------------------*/ +static void +selection_get_cb (GtkWidget *widget, + GtkSelectionData *selection_data, + guint info, + guint time, + glView *view) +{ + gchar *buffer; + glXMLLabelStatus status; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + if (view->have_selection) { + + buffer = gl_xml_label_save_buffer (view->selection_data, + &status); + gtk_selection_data_set (selection_data, + GDK_SELECTION_TYPE_STRING, 8, + (guchar *)buffer, strlen (buffer)); + g_free (buffer); + } + + gl_debug (DEBUG_VIEW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Handle "selection-received" signal. (Result of Paste) */ +/*---------------------------------------------------------------------------*/ +static void +selection_received_cb (GtkWidget *widget, + GtkSelectionData *selection_data, + guint time, + glView *view) +{ + glLabel *label = NULL; + glXMLLabelStatus status; + GList *p, *p_next; + glLabelObject *object, *newobject; + + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + if (selection_data->length < 0) { + return; + } + if (selection_data->type != GDK_SELECTION_TYPE_STRING) { + return; + } + + gl_view_unselect_all (view); + + label = gl_xml_label_open_buffer ((gchar *)selection_data->data, &status); + for (p = label->objects; p != NULL; p = p_next) { + p_next = p->next; + + object = (glLabelObject *) p->data; + newobject = gl_label_object_dup (object, view->label); + + gl_debug (DEBUG_VIEW, "object pasted"); + } + g_object_unref (label); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default font family. */ +/****************************************************************************/ +void +gl_view_set_default_font_family (glView *view, + const gchar *font_family) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + if (view->default_font_family) { + g_free (view->default_font_family); + } + view->default_font_family = g_strdup (font_family); + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default font size. */ +/****************************************************************************/ +void +gl_view_set_default_font_size (glView *view, + gdouble font_size) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->default_font_size = font_size; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default font weight. */ +/****************************************************************************/ +void +gl_view_set_default_font_weight (glView *view, + PangoWeight font_weight) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->default_font_weight = font_weight; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default font italic flag. */ +/****************************************************************************/ +void +gl_view_set_default_font_italic_flag (glView *view, + gboolean font_italic_flag) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->default_font_italic_flag = font_italic_flag; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default text color. */ +/****************************************************************************/ +void +gl_view_set_default_text_color (glView *view, + guint text_color) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->default_text_color = text_color; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default text alignment. */ +/****************************************************************************/ +void +gl_view_set_default_text_alignment (glView *view, + PangoAlignment text_alignment) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->default_text_alignment = text_alignment; + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default text line spacing. */ +/****************************************************************************/ +void +gl_view_set_default_text_line_spacing (glView *view, + gdouble text_line_spacing) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->default_text_line_spacing = text_line_spacing; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default line width. */ +/****************************************************************************/ +void +gl_view_set_default_line_width (glView *view, + gdouble line_width) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->default_line_width = line_width; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default line color. */ +/****************************************************************************/ +void +gl_view_set_default_line_color (glView *view, + guint line_color) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->default_line_color = line_color; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Set default fill color. */ +/****************************************************************************/ +void +gl_view_set_default_fill_color (glView *view, + guint fill_color) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + + view->default_fill_color = fill_color; + + gl_debug (DEBUG_VIEW, "END"); +} + + +/****************************************************************************/ +/* Get default font family. */ +/****************************************************************************/ +gchar * +gl_view_get_default_font_family (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), NULL); + + gl_debug (DEBUG_VIEW, "END"); + + return g_strdup (view->default_font_family); +} + + +/****************************************************************************/ +/* Get default font size. */ +/****************************************************************************/ +gdouble +gl_view_get_default_font_size (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), 12.0); + + gl_debug (DEBUG_VIEW, "END"); + + return view->default_font_size; +} + + +/****************************************************************************/ +/* Get default font weight. */ +/****************************************************************************/ +PangoWeight +gl_view_get_default_font_weight (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), PANGO_WEIGHT_NORMAL); + + gl_debug (DEBUG_VIEW, "END"); + + return view->default_font_weight; +} + + +/****************************************************************************/ +/* Get default font italic flag. */ +/****************************************************************************/ +gboolean +gl_view_get_default_font_italic_flag (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), FALSE); + + gl_debug (DEBUG_VIEW, "END"); + + return view->default_font_italic_flag; +} + + +/****************************************************************************/ +/* Get default text color. */ +/****************************************************************************/ +guint +gl_view_get_default_text_color (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), 0); + + gl_debug (DEBUG_VIEW, "END"); + + return view->default_text_color; +} + + +/****************************************************************************/ +/* Get default text alignment. */ +/****************************************************************************/ +PangoAlignment +gl_view_get_default_text_alignment (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), PANGO_ALIGN_LEFT); + + gl_debug (DEBUG_VIEW, "END"); + + return view->default_text_alignment; +} + + +/****************************************************************************/ +/* Get default text line spacing. */ +/****************************************************************************/ +gdouble +gl_view_get_default_text_line_spacing (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), 1.0); + + gl_debug (DEBUG_VIEW, "END"); + + return view->default_text_line_spacing; +} + + +/****************************************************************************/ +/* Get default line width. */ +/****************************************************************************/ +gdouble +gl_view_get_default_line_width (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), 1.0); + + gl_debug (DEBUG_VIEW, "END"); + + return view->default_line_width; +} + + +/****************************************************************************/ +/* Get default line color. */ +/****************************************************************************/ +guint +gl_view_get_default_line_color (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), 0); + + gl_debug (DEBUG_VIEW, "END"); + + return view->default_line_color; +} + + +/****************************************************************************/ +/* Get default fill color. */ +/****************************************************************************/ +guint +gl_view_get_default_fill_color (glView *view) +{ + gl_debug (DEBUG_VIEW, "START"); + + g_return_val_if_fail (view && GL_IS_VIEW (view), 0); + + gl_debug (DEBUG_VIEW, "END"); + + return view->default_fill_color; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Focus in event handler. */ +/*---------------------------------------------------------------------------*/ +static gboolean +focus_in_event_cb (glView *view, + GdkEventFocus *event) +{ + GTK_WIDGET_SET_FLAGS (GTK_WIDGET (view->canvas), GTK_HAS_FOCUS); + + return FALSE; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Focus out event handler. */ +/*---------------------------------------------------------------------------*/ +static gboolean +focus_out_event_cb (glView *view, + GdkEventFocus *event) +{ + GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (view->canvas), GTK_HAS_FOCUS); + + return FALSE; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Enter notify event handler. */ +/*---------------------------------------------------------------------------*/ +static gboolean +enter_notify_event_cb (glView *view, + GdkEventCrossing *event) +{ + gtk_widget_grab_focus(GTK_WIDGET (view->canvas)); + + return FALSE; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Leave notify event handler. */ +/*---------------------------------------------------------------------------*/ +static gboolean +leave_notify_event_cb (glView *view, + GdkEventCrossing *event) +{ + + g_signal_emit (G_OBJECT(view), signals[POINTER_EXIT], 0); + + return FALSE; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Motion notify event handler. */ +/*---------------------------------------------------------------------------*/ +static gboolean +motion_notify_event_cb (glView *view, + GdkEventMotion *event) +{ + gboolean return_value = FALSE; + cairo_t *cr; + gdouble scale; + gdouble x, y; + GdkCursor *cursor; + glViewObjectHandle handle; + + cr = gdk_cairo_create (GTK_LAYOUT (view->canvas)->bin_window); + + /* + * Translate to label coordinates + */ + scale = view->zoom * view->home_scale; + cairo_scale (cr, scale, scale); + cairo_translate (cr, view->x0, view->y0); + + x = event->x; + y = event->y; + cairo_device_to_user (cr, &x, &y); + + /* + * Emit signal regardless of mode + */ + g_signal_emit (G_OBJECT(view), signals[POINTER_MOVED], 0, x, y); + + /* + * Handle event as appropriate for mode + */ + switch (view->mode) + { + + case GL_VIEW_MODE_ARROW: + switch (view->state) + { + + case GL_VIEW_IDLE: + if ( gl_view_is_selection_atomic (view) && + view_handle_at (view, cr, event->x, event->y, &handle) ) + { + cursor = gdk_cursor_new (GDK_CROSSHAIR); + } + else if (view_view_object_at (view, cr, event->x, event->y)) + { + cursor = gdk_cursor_new (GDK_FLEUR); + } + else + { + cursor = gdk_cursor_new (GDK_LEFT_PTR); + } + gdk_window_set_cursor (view->canvas->window, cursor); + gdk_cursor_unref (cursor); + break; + + case GL_VIEW_ARROW_SELECT_REGION: +#ifdef CLIP_UPDATES + gl_view_update_region (view, cr, &view->select_region); +#endif + view->select_region.x2 = x; + view->select_region.y2 = y; +#ifdef CLIP_UPDATES + gl_view_update_region (view, cr, &view->select_region); +#else + gl_view_update (view); +#endif + break; + + case GL_VIEW_ARROW_MOVE: + gl_view_move_selection (view, + (x - view->move_last_x), + (y - view->move_last_y)); + view->move_last_x = x; + view->move_last_y = y; + break; + + case GL_VIEW_ARROW_RESIZE: + gl_view_object_resize_event (view->resize_object, + view->resize_handle, + view->resize_honor_aspect, + cr, + event->x, + event->y); + break; + + default: + g_message ("Invalid arrow state."); /*Should not happen!*/ + } + return_value = TRUE; + break; + + + case GL_VIEW_MODE_OBJECT_CREATE: + if (view->state != GL_VIEW_IDLE) + { + switch (view->create_type) + { + case GL_LABEL_OBJECT_BOX: + gl_view_box_create_motion_event (view, x, y); + break; + case GL_LABEL_OBJECT_ELLIPSE: + gl_view_ellipse_create_motion_event (view, x, y); + break; + case GL_LABEL_OBJECT_LINE: + gl_view_line_create_motion_event (view, x, y); + break; + case GL_LABEL_OBJECT_IMAGE: + gl_view_image_create_motion_event (view, x, y); + break; + case GL_LABEL_OBJECT_TEXT: + gl_view_text_create_motion_event (view, x, y); + break; + case GL_LABEL_OBJECT_BARCODE: + gl_view_barcode_create_motion_event (view, x, y); + break; + default: + g_message ("Invalid create type."); /*Should not happen!*/ + } + } + break; + + + default: + g_message ("Invalid view mode."); /*Should not happen!*/ + + } + + cairo_destroy (cr); + + /* + * FIXME: we re-establish grabs here if the grab has been lost. We seem to be + * losing grabs when we emit signals that lead to the manipulation of + * the GtkUIManager. Needs more investigation + */ + if (view->grabbed_flag && !gdk_pointer_is_grabbed ()) + { + gdk_pointer_grab (GTK_LAYOUT (view->canvas)->bin_window, + FALSE, + (GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK), + NULL, + NULL, + event->time); + } + + return return_value; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Button press event handler. */ +/*---------------------------------------------------------------------------*/ +static gboolean +button_press_event_cb (glView *view, + GdkEventButton *event) +{ + gboolean return_value = FALSE; + cairo_t *cr; + gdouble scale; + gdouble x, y; + glViewObject *view_object; + glViewObjectHandle handle; + + cr = gdk_cairo_create (GTK_LAYOUT (view->canvas)->bin_window); + + /* + * Translate to label coordinates + */ + scale = view->zoom * view->home_scale; + cairo_scale (cr, scale, scale); + cairo_translate (cr, view->x0, view->y0); + + x = event->x; + y = event->y; + cairo_device_to_user (cr, &x, &y); + + switch (event->button) + { + + case 1: + /* + * Handle event as appropriate for mode + */ + switch (view->mode) + { + case GL_VIEW_MODE_ARROW: + if ( gl_view_is_selection_atomic (view) && + (view_object = view_handle_at (view, cr, event->x, event->y, &handle)) ) + { + view->resize_object = view_object; + view->resize_handle = handle; + view->resize_honor_aspect = event->state & GDK_CONTROL_MASK; + + view->state = GL_VIEW_ARROW_RESIZE; + } + else if ((view_object = view_view_object_at (view, cr, event->x, event->y))) + { + if (event->state & GDK_CONTROL_MASK) + { + if (gl_view_is_object_selected (view, view_object)) + { + /* Un-selecting a selected item */ + gl_view_unselect_object (view, view_object); + } else { + /* Add to current selection */ + gl_view_select_object (view, view_object); + } + } + else + { + if (!gl_view_is_object_selected (view, view_object)) + { + /* remove any selections before adding */ + gl_view_unselect_all (view); + /* Add to current selection */ + gl_view_select_object (view, view_object); + } + } + view->move_last_x = x; + view->move_last_y = y; + + view->state = GL_VIEW_ARROW_MOVE; + } + else + { + if (!(event->state & GDK_CONTROL_MASK)) + { + gl_view_unselect_all (view); + } + + view->select_region_visible = TRUE; + view->select_region.x1 = x; + view->select_region.y1 = y; + view->select_region.x2 = x; + view->select_region.y2 = y; + + view->state = GL_VIEW_ARROW_SELECT_REGION; + } + + + return_value = TRUE; + break; + + case GL_VIEW_MODE_OBJECT_CREATE: + switch (view->create_type) + { + case GL_LABEL_OBJECT_BOX: + gl_view_box_create_button_press_event (view, x, y); + break; + case GL_LABEL_OBJECT_ELLIPSE: + gl_view_ellipse_create_button_press_event (view, x, y); + break; + case GL_LABEL_OBJECT_LINE: + gl_view_line_create_button_press_event (view, x, y); + break; + case GL_LABEL_OBJECT_IMAGE: + gl_view_image_create_button_press_event (view, x, y); + break; + case GL_LABEL_OBJECT_TEXT: + gl_view_text_create_button_press_event (view, x, y); + break; + case GL_LABEL_OBJECT_BARCODE: + gl_view_barcode_create_button_press_event (view, x, y); + break; + default: + g_message ("Invalid create type."); /*Should not happen!*/ + } + view->state = GL_VIEW_CREATE_DRAG; + return_value = TRUE; + break; + + default: + g_message ("Invalid view mode."); /*Should not happen!*/ + } + + view->grabbed_flag = TRUE; + gdk_pointer_grab (GTK_LAYOUT (view->canvas)->bin_window, + FALSE, + (GDK_BUTTON1_MOTION_MASK | GDK_BUTTON_RELEASE_MASK), + NULL, + NULL, + event->time); + break; + + case 3: + g_signal_emit (G_OBJECT (view), + signals[CONTEXT_MENU_ACTIVATE], 0, + event->button, event->time); + return_value = TRUE; + break; + + } + + cairo_destroy (cr); + + return return_value; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Button release event handler. */ +/*---------------------------------------------------------------------------*/ +static gboolean +button_release_event_cb (glView *view, + GdkEventButton *event) +{ + gboolean return_value = FALSE; + cairo_t *cr; + gdouble scale; + gdouble x, y; + GdkCursor *cursor; + + cr = gdk_cairo_create (GTK_LAYOUT (view->canvas)->bin_window); + + /* + * Translate to label coordinates + */ + scale = view->zoom * view->home_scale; + cairo_scale (cr, scale, scale); + cairo_translate (cr, view->x0, view->y0); + + x = event->x; + y = event->y; + cairo_device_to_user (cr, &x, &y); + + switch (event->button) + { + + case 1: + view->grabbed_flag = FALSE; + gdk_pointer_ungrab (event->time); + /* + * Handle event as appropriate for mode + */ + switch (view->mode) + { + case GL_VIEW_MODE_ARROW: + switch (view->state) + { + case GL_VIEW_ARROW_RESIZE: + view->resize_object = NULL; + + view->state = GL_VIEW_IDLE; + break; + + case GL_VIEW_ARROW_SELECT_REGION: +#ifdef CLIP_UPDATES + gl_view_update_region (view, cr, &view->select_region); +#else + gl_view_update (view); +#endif + + view->select_region_visible = FALSE; + view->select_region.x2 = x; + view->select_region.y2 = y; + + gl_view_select_region (view, &view->select_region); + + view->state = GL_VIEW_IDLE; + break; + + default: + view->state = GL_VIEW_IDLE; + break; + + } + + return_value = TRUE; + break; + + + case GL_VIEW_MODE_OBJECT_CREATE: + switch (view->create_type) + { + case GL_LABEL_OBJECT_BOX: + gl_view_box_create_button_release_event (view, x, y); + break; + case GL_LABEL_OBJECT_ELLIPSE: + gl_view_ellipse_create_button_release_event (view, x, y); + break; + case GL_LABEL_OBJECT_LINE: + gl_view_line_create_button_release_event (view, x, y); + break; + case GL_LABEL_OBJECT_IMAGE: + gl_view_image_create_button_release_event (view, x, y); + break; + case GL_LABEL_OBJECT_TEXT: + gl_view_text_create_button_release_event (view, x, y); + break; + case GL_LABEL_OBJECT_BARCODE: + gl_view_barcode_create_button_release_event (view, x, y); + break; + default: + g_message ("Invalid create type."); /*Should not happen!*/ + } + view->mode = GL_VIEW_MODE_ARROW; + view->state = GL_VIEW_IDLE; + cursor = gdk_cursor_new (GDK_LEFT_PTR); + gdk_window_set_cursor (view->canvas->window, cursor); + gdk_cursor_unref (cursor); + break; + + + default: + g_message ("Invalid view mode."); /*Should not happen!*/ + } + + } + + cairo_destroy (cr); + + return return_value; +} + + +/*---------------------------------------------------------------------------*/ +/* PRIVATE. Key press event handler. */ +/*---------------------------------------------------------------------------*/ +static gboolean +key_press_event_cb (glView *view, + GdkEventKey *event) +{ + GdkCursor *cursor; + + gl_debug (DEBUG_VIEW, ""); + + if ( (view->mode == GL_VIEW_MODE_ARROW) && + (view->state == GL_VIEW_IDLE) ) + { + switch (event->keyval) { + + case GDK_Left: + case GDK_KP_Left: + gl_view_move_selection (view, -1.0 / (view->zoom), 0.0); + break; + case GDK_Up: + case GDK_KP_Up: + gl_view_move_selection (view, 0.0, -1.0 / (view->zoom)); + break; + case GDK_Right: + case GDK_KP_Right: + gl_view_move_selection (view, 1.0 / (view->zoom), 0.0); + break; + case GDK_Down: + case GDK_KP_Down: + gl_view_move_selection (view, 0.0, 1.0 / (view->zoom)); + break; + case GDK_Delete: + case GDK_KP_Delete: + gl_view_delete_selection (view); + cursor = gdk_cursor_new (GDK_LEFT_PTR); + gdk_window_set_cursor (GTK_WIDGET (view->canvas)->window +, cursor); + gdk_cursor_unref (cursor); + break; + default: + return FALSE; + + } + } + return TRUE; /* We handled this or we were dragging. */ +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/view.h b/src/view.h new file mode 100644 index 00000000..54d4b4f1 --- /dev/null +++ b/src/view.h @@ -0,0 +1,368 @@ +/* + * view.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __VIEW_H__ +#define __VIEW_H__ + +#include + +#include "label-object.h" + +typedef enum { + GL_VIEW_MODE_ARROW, + GL_VIEW_MODE_OBJECT_CREATE +} glViewMode; + +typedef enum { + GL_VIEW_IDLE = 0, + GL_VIEW_ARROW_SELECT_REGION, + GL_VIEW_ARROW_MOVE, + GL_VIEW_ARROW_RESIZE, + GL_VIEW_CREATE_DRAG, +} glViewState; + +#define GL_TYPE_VIEW (gl_view_get_type ()) +#define GL_VIEW(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_VIEW, glView )) +#define GL_VIEW_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW, glViewClass)) +#define GL_IS_VIEW(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW)) +#define GL_IS_VIEW_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW)) + +typedef struct _glView glView; +typedef struct _glViewClass glViewClass; + +#include "view-object.h" +#include "color.h" + +struct _glView { + GtkVBox parent_widget; + + glLabel *label; + + GtkWidget *canvas; + gdouble zoom; + gboolean zoom_to_fit_flag; + gdouble home_scale; + gdouble x0, y0; + gdouble w, h; + + gboolean update_scheduled_flag; + gboolean grid_visible; + gdouble grid_spacing; + + gboolean markup_visible; + + glViewMode mode; + glLabelObjectType create_type; + glViewState state; + gboolean grabbed_flag; + + /* GL_VIEW_ARROW_MOVE state */ + gdouble move_last_x; + gdouble move_last_y; + + /* GL_VIEW_ARROW_SELECT_REGION state */ + gboolean select_region_visible; + glLabelRegion select_region; + + /* GL_VIEW_ARROW_RESIZE state */ + glViewObject *resize_object; + glViewObjectHandle resize_handle; + gboolean resize_honor_aspect; + + /* GL_VIEW_CREATE_DRAG state */ + glLabelObject *create_object; + gdouble create_x0; + gdouble create_y0; + + GList *object_list; /* glViewObjects */ + GList *selected_object_list; /* glViewObjects */ + + /* Clipboard selection stuff */ + gint have_selection; + glLabel *selection_data; + GtkWidget *invisible; + + /* Default object text properties */ + gchar *default_font_family; + gdouble default_font_size; + PangoWeight default_font_weight; + gboolean default_font_italic_flag; + guint default_text_color; + PangoAlignment default_text_alignment; + gdouble default_text_line_spacing; + + /* Default object line properties */ + gdouble default_line_width; + guint default_line_color; + + /* Default object fill properties */ + guint default_fill_color; + +}; + +struct _glViewClass { + GtkVBoxClass parent_class; + + /* Selection changed signal */ + void (*selection_changed) (glView *view, + gpointer user_data); + + /* Signal to launch a context menu */ + void (*context_menu_activate) (glView *view, + gint button, + guint32 activate_time, + gpointer user_data); + + /* Signals to support a status bar */ + void (*zoom_changed) (glView *view, + gdouble zoom, + gpointer user_data); + void (*pointer_moved) (glView *view, + gdouble x, + gdouble y, + gpointer user_data); + void (*pointer_exit) (glView *view, + gpointer user_data); + void (*mode_changed) (glView *view, + gpointer user_data); +}; + +G_BEGIN_DECLS + +GType gl_view_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_view_new (glLabel *label); + + +void gl_view_update (glView *view); + +void gl_view_update_region (glView *view, + cairo_t *cr, + glLabelRegion *region); + +void gl_view_show_grid (glView *view); + +void gl_view_hide_grid (glView *view); + +void gl_view_set_grid_spacing (glView *view, + gdouble spacing); + +void gl_view_show_markup (glView *view); + +void gl_view_hide_markup (glView *view); + +void gl_view_arrow_mode (glView *view); + +void gl_view_object_create_mode (glView *view, + glLabelObjectType type); + + +void gl_view_select_object (glView *view, + glViewObject *view_object); + +void gl_view_unselect_object (glView *view, + glViewObject *view_object); + +void gl_view_select_all (glView *view); + +void gl_view_unselect_all (glView *view); + +void gl_view_select_region (glView *view, + glLabelRegion *region); + +gboolean gl_view_is_object_selected (glView *view, + glViewObject *view_object); + +gboolean gl_view_is_selection_empty (glView *view); + +gboolean gl_view_is_selection_atomic (glView *view); + +void gl_view_delete_selection (glView *view); + +GtkWidget *gl_view_get_editor (glView *view); + +void gl_view_raise_selection (glView *view); + +void gl_view_lower_selection (glView *view); + +void gl_view_rotate_selection (glView *view, + gdouble theta_degs); + +void gl_view_rotate_selection_left (glView *view); + +void gl_view_rotate_selection_right (glView *view); + +void gl_view_flip_selection_horiz (glView *view); + +void gl_view_flip_selection_vert (glView *view); + +void gl_view_align_selection_left (glView *view); + +void gl_view_align_selection_right (glView *view); + +void gl_view_align_selection_hcenter (glView *view); + +void gl_view_align_selection_top (glView *view); + +void gl_view_align_selection_bottom (glView *view); + +void gl_view_align_selection_vcenter (glView *view); + +void gl_view_center_selection_horiz (glView *view); + +void gl_view_center_selection_vert (glView *view); + +void gl_view_move_selection (glView *view, + gdouble dx, + gdouble dy); + +gboolean gl_view_can_selection_text (glView *view); + +void gl_view_set_selection_font_family (glView *view, + const gchar *font_family); + +void gl_view_set_selection_font_size (glView *view, + gdouble font_size); + +void gl_view_set_selection_font_weight (glView *view, + PangoWeight font_weight); + +void gl_view_set_selection_text_line_spacing (glView *view, + gdouble text_line_spacing); + +void gl_view_set_selection_font_italic_flag (glView *view, + gboolean font_italic_flag); + +void gl_view_set_selection_text_alignment (glView *view, + PangoAlignment text_alignment); + +void gl_view_set_selection_text_color (glView *view, + glColorNode *text_color_node); + +gboolean gl_view_can_selection_fill (glView *view); + +void gl_view_set_selection_fill_color (glView *view, + glColorNode *fill_color); + +gboolean gl_view_can_selection_line_color (glView *view); + +void gl_view_set_selection_line_color (glView *view, + glColorNode *line_color_node); + +gboolean gl_view_can_selection_line_width (glView *view); + +void gl_view_set_selection_line_width (glView *view, + gdouble line_width); + + +void gl_view_cut (glView *view); + +void gl_view_copy (glView *view); + +void gl_view_paste (glView *view); + + +void gl_view_zoom_in (glView *view); + +void gl_view_zoom_out (glView *view); + +void gl_view_zoom_to_fit (glView *view); + +void gl_view_set_zoom (glView *view, + gdouble zoom); + +gdouble gl_view_get_zoom (glView *view); + +gboolean gl_view_is_zoom_max (glView *view); + +gboolean gl_view_is_zoom_min (glView *view); + + +void gl_view_set_default_font_family (glView *view, + const gchar *font_family); + +void gl_view_set_default_font_size (glView *view, + gdouble font_size); + +void gl_view_set_default_font_weight (glView *view, + PangoWeight font_weight); + +void gl_view_set_default_font_italic_flag (glView *view, + gboolean font_italic_flag); + +void gl_view_set_default_text_color (glView *view, + guint text_color); + +void gl_view_set_default_text_alignment (glView *view, + PangoAlignment text_alignment); + +void gl_view_set_default_line_width (glView *view, + gdouble line_width); + +void gl_view_set_default_line_color (glView *view, + guint line_color); + +void gl_view_set_default_fill_color (glView *view, + guint fill_color); +void gl_view_set_default_text_line_spacing (glView *view, + gdouble text_line_spacing); + + + +gchar *gl_view_get_default_font_family (glView *view); + +gdouble gl_view_get_default_font_size (glView *view); + +PangoWeight gl_view_get_default_font_weight (glView *view); + +gboolean gl_view_get_default_font_italic_flag (glView *view); + +guint gl_view_get_default_text_color (glView *view); + +PangoAlignment gl_view_get_default_text_alignment (glView *view); + +gdouble gl_view_get_default_text_line_spacing (glView *view); + +gdouble gl_view_get_default_line_width (glView *view); + +guint gl_view_get_default_line_color (glView *view); + +guint gl_view_get_default_fill_color (glView *view); + + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/warning-handler.c b/src/warning-handler.c new file mode 100644 index 00000000..8f5f1b7a --- /dev/null +++ b/src/warning-handler.c @@ -0,0 +1,87 @@ +/* + * warning-handler.c + * Copyright (C) 2005-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "warning-handler.h" + +#include +#include +#include +#include + +static void warning_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); + + +/***************************************************************************/ +/* Initialize error handler. */ +/***************************************************************************/ +void +gl_warning_handler_init (void) +{ + g_log_set_handler ("LibGlabels", + G_LOG_LEVEL_WARNING, + warning_handler, + "libglabels"); + + g_log_set_handler (G_LOG_DOMAIN, + G_LOG_LEVEL_WARNING, + warning_handler, + "glabels"); +} + + +/*-------------------------------------------------------------------------*/ +/* PRIVATE. Actual error handler. */ +/*-------------------------------------------------------------------------*/ +static void +warning_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data) +{ + GtkWidget *dialog; + + dialog = gtk_message_dialog_new (NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_CLOSE, + _("gLabels Error!")); + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), + "%s", message); + + gtk_dialog_run (GTK_DIALOG (dialog)); + + gtk_widget_destroy (GTK_WIDGET (dialog)); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/warning-handler.h b/src/warning-handler.h new file mode 100644 index 00000000..e7f51d0f --- /dev/null +++ b/src/warning-handler.h @@ -0,0 +1,43 @@ +/* + * warning-handler.h + * Copyright (C) 2005-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __WARNING_HANDLER_H__ +#define __WARNING_HANDLER_H__ + +#include + +G_BEGIN_DECLS + +void gl_warning_handler_init (void); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/wdgt-chain-button.c b/src/wdgt-chain-button.c new file mode 100644 index 00000000..e6cfdfe3 --- /dev/null +++ b/src/wdgt-chain-button.c @@ -0,0 +1,333 @@ +/* + * wdgt-chain-button.c + * Modified version of gimpchainbutton.h for gLabels: + * + * LIBGIMP - The GIMP Library + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball + * + * gimpchainbutton.h + * Copyright (C) 1999-2000 Sven Neumann + * + * Modified or gLabels by Jim Evins + * + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include "wdgt-chain-button.h" + +#include + +#include "stock.h" + + +enum +{ + TOGGLED, + LAST_SIGNAL +}; + + +static void gl_wdgt_chain_button_clicked_callback (GtkWidget *widget, + glWdgtChainButton *button); +static gboolean gl_wdgt_chain_button_draw_lines (GtkWidget *widget, + GdkEventExpose *eevent, + glWdgtChainButton *button); + + +static const gchar *gl_wdgt_chain_stock_items[] = +{ + GL_STOCK_HCHAIN, + GL_STOCK_HCHAIN_BROKEN, + GL_STOCK_VCHAIN, + GL_STOCK_VCHAIN_BROKEN +}; + + +static guint gl_wdgt_chain_button_signals[LAST_SIGNAL] = { 0 }; + + + +G_DEFINE_TYPE (glWdgtChainButton, gl_wdgt_chain_button, GTK_TYPE_TABLE); + + +static void +gl_wdgt_chain_button_class_init (glWdgtChainButtonClass *class) +{ + gl_wdgt_chain_button_parent_class = g_type_class_peek_parent (class); + + gl_wdgt_chain_button_signals[TOGGLED] = + g_signal_new ("toggled", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (glWdgtChainButtonClass, toggled), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + class->toggled = NULL; +} + +static void +gl_wdgt_chain_button_init (glWdgtChainButton *button) +{ + button->position = GL_WDGT_CHAIN_TOP; + button->active = FALSE; + + button->line1 = gtk_drawing_area_new (); + button->line2 = gtk_drawing_area_new (); + button->image = gtk_image_new (); + + button->button = gtk_button_new (); + + gtk_button_set_relief (GTK_BUTTON (button->button), GTK_RELIEF_NONE); + gtk_container_add (GTK_CONTAINER (button->button), button->image); + gtk_widget_show (button->image); + + g_signal_connect (button->button, "clicked", + G_CALLBACK (gl_wdgt_chain_button_clicked_callback), + button); + g_signal_connect (button->line1, "expose_event", + G_CALLBACK (gl_wdgt_chain_button_draw_lines), + button); + g_signal_connect (button->line2, "expose_event", + G_CALLBACK (gl_wdgt_chain_button_draw_lines), + button); +} + + +/** + * gl_wdgt_chain_button_new: + * @position: The position you are going to use for the button + * with respect to the widgets you want to chain. + * + * Creates a new #glWdgtChainButton widget. + * + * This returns a button showing either a broken or a linked chain and + * small clamps attached to both sides that visually group the two widgets + * you want to connect. This widget looks best when attached + * to a table taking up two columns (or rows respectively) next + * to the widgets that it is supposed to connect. It may work + * for more than two widgets, but the look is optimized for two. + * + * Returns: Pointer to the new #glWdgtChainButton, which is inactive + * by default. Use gl_wdgt_chain_button_set_active() to + * change its state. + */ +GtkWidget * +gl_wdgt_chain_button_new (glWdgtChainPosition position) +{ + glWdgtChainButton *button; + + button = g_object_new (GL_WDGT_TYPE_CHAIN_BUTTON, NULL); + + button->position = position; + + gtk_image_set_from_stock + (GTK_IMAGE (button->image), + gl_wdgt_chain_stock_items[((position & GL_WDGT_CHAIN_LEFT) << 1) + ! button->active], + GTK_ICON_SIZE_BUTTON); + + if (position & GL_WDGT_CHAIN_LEFT) /* are we a vertical chainbutton? */ + { + gtk_table_resize (GTK_TABLE (button), 3, 1); + gtk_table_attach (GTK_TABLE (button), button->button, 0, 1, 1, 2, + GTK_SHRINK, GTK_SHRINK, 0, 0); + gtk_table_attach_defaults (GTK_TABLE (button), + button->line1, 0, 1, 0, 1); + gtk_table_attach_defaults (GTK_TABLE (button), + button->line2, 0, 1, 2, 3); + } + else + { + gtk_table_resize (GTK_TABLE (button), 1, 3); + gtk_table_attach (GTK_TABLE (button), button->button, 1, 2, 0, 1, + GTK_SHRINK, GTK_SHRINK, 0, 0); + gtk_table_attach_defaults (GTK_TABLE (button), + button->line1, 0, 1, 0, 1); + gtk_table_attach_defaults (GTK_TABLE (button), + button->line2, 2, 3, 0, 1); + } + + gtk_widget_show (button->button); + gtk_widget_show (button->line1); + gtk_widget_show (button->line2); + + return GTK_WIDGET (button); +} + +/** + * gl_wdgt_chain_button_set_active: + * @button: Pointer to a #glWdgtChainButton. + * @active: The new state. + * + * Sets the state of the #glWdgtChainButton to be either locked (%TRUE) or + * unlocked (%FALSE) and changes the showed pixmap to reflect the new state. + */ +void +gl_wdgt_chain_button_set_active (glWdgtChainButton *button, + gboolean active) +{ + g_return_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button)); + + if (button->active != active) + { + guint num; + + button->active = active ? TRUE : FALSE; + + num = ((button->position & GL_WDGT_CHAIN_LEFT) << 1) + (active ? 0 : 1); + + gtk_image_set_from_stock (GTK_IMAGE (button->image), + gl_wdgt_chain_stock_items[num], + GTK_ICON_SIZE_BUTTON); + } +} + +/** + * gl_wdgt_chain_button_get_active + * @button: Pointer to a #glWdgtChainButton. + * + * Checks the state of the #glWdgtChainButton. + * + * Returns: %TRUE if the #glWdgtChainButton is active (locked). + */ +gboolean +gl_wdgt_chain_button_get_active (glWdgtChainButton *button) +{ + g_return_val_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button), FALSE); + + return button->active; +} + +static void +gl_wdgt_chain_button_clicked_callback (GtkWidget *widget, + glWdgtChainButton *button) +{ + g_return_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button)); + + gl_wdgt_chain_button_set_active (button, ! button->active); + + g_signal_emit (button, gl_wdgt_chain_button_signals[TOGGLED], 0); +} + +static gboolean +gl_wdgt_chain_button_draw_lines (GtkWidget *widget, + GdkEventExpose *eevent, + glWdgtChainButton *button) +{ + GdkPoint points[3]; + GdkPoint buf; + GtkShadowType shadow; + glWdgtChainPosition position; + gint which_line; + +#define SHORT_LINE 4 + /* don't set this too high, there's no check against drawing outside + the widgets bounds yet (and probably never will be) */ + + g_return_val_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button), FALSE); + + points[0].x = widget->allocation.width / 2; + points[0].y = widget->allocation.height / 2; + + which_line = (widget == button->line1) ? 1 : -1; + + position = button->position; + + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + switch (position) + { + case GL_WDGT_CHAIN_LEFT: + position = GL_WDGT_CHAIN_RIGHT; + break; + case GL_WDGT_CHAIN_RIGHT: + position = GL_WDGT_CHAIN_LEFT; + break; + default: + break; + } + + switch (position) + { + case GL_WDGT_CHAIN_LEFT: + points[0].x += SHORT_LINE; + points[1].x = points[0].x - SHORT_LINE; + points[1].y = points[0].y; + points[2].x = points[1].x; + points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0; + shadow = GTK_SHADOW_ETCHED_IN; + break; + case GL_WDGT_CHAIN_RIGHT: + points[0].x -= SHORT_LINE; + points[1].x = points[0].x + SHORT_LINE; + points[1].y = points[0].y; + points[2].x = points[1].x; + points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0; + shadow = GTK_SHADOW_ETCHED_OUT; + break; + case GL_WDGT_CHAIN_TOP: + points[0].y += SHORT_LINE; + points[1].x = points[0].x; + points[1].y = points[0].y - SHORT_LINE; + points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0; + points[2].y = points[1].y; + shadow = GTK_SHADOW_ETCHED_OUT; + break; + case GL_WDGT_CHAIN_BOTTOM: + points[0].y -= SHORT_LINE; + points[1].x = points[0].x; + points[1].y = points[0].y + SHORT_LINE; + points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0; + points[2].y = points[1].y; + shadow = GTK_SHADOW_ETCHED_IN; + break; + default: + return FALSE; + } + + if ( ((shadow == GTK_SHADOW_ETCHED_OUT) && (which_line == -1)) || + ((shadow == GTK_SHADOW_ETCHED_IN) && (which_line == 1)) ) + { + buf = points[0]; + points[0] = points[2]; + points[2] = buf; + } + + gtk_paint_polygon (widget->style, + widget->window, + GTK_STATE_NORMAL, + shadow, + &eevent->area, + widget, + "chainbutton", + points, + 3, + FALSE); + + return TRUE; +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/wdgt-chain-button.h b/src/wdgt-chain-button.h new file mode 100644 index 00000000..3af93a00 --- /dev/null +++ b/src/wdgt-chain-button.h @@ -0,0 +1,109 @@ +/* + * wdgt-chain-button.h + * Modified version of gimpchainbutton.h for gLabels: + * + * LIBGIMP - The GIMP Library + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball + * + * gimpchainbutton.h + * Copyright (C) 1999-2000 Sven Neumann + * + * Modified or gLabels by Jim Evins + * + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +/* + * This implements a widget derived from GtkTable that visualizes + * it's state with two different pixmaps showing a closed and a + * broken chain. It's intented to be used with the GimpSizeEntry + * widget. The usage is quite similar to the one the GtkToggleButton + * provides. + */ + +#ifndef __WDGT_CHAIN_BUTTON_H__ +#define __WDGT_CHAIN_BUTTON_H__ + +#include + +G_BEGIN_DECLS + + +typedef enum +{ + GL_WDGT_CHAIN_TOP, + GL_WDGT_CHAIN_LEFT, + GL_WDGT_CHAIN_BOTTOM, + GL_WDGT_CHAIN_RIGHT +} glWdgtChainPosition; + + +#define GL_WDGT_TYPE_CHAIN_BUTTON (gl_wdgt_chain_button_get_type ()) +#define GL_WDGT_CHAIN_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_WDGT_TYPE_CHAIN_BUTTON, glWdgtChainButton)) +#define GL_WDGT_CHAIN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_WDGT_TYPE_CHAIN_BUTTON, glWdgtChainButtonClass)) +#define GL_WDGT_IS_CHAIN_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_WDGT_TYPE_CHAIN_BUTTON)) +#define GL_WDGT_IS_CHAIN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_WDGT_TYPE_CHAIN_BUTTON)) +#define GL_WDGT_CHAIN_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_WDGT_TYPE_CHAIN_BUTTON, glWdgtChainButtonClass)) + + +typedef struct _glWdgtChainButton glWdgtChainButton; +typedef struct _glWdgtChainButtonClass glWdgtChainButtonClass; + +struct _glWdgtChainButton +{ + GtkTable parent_instance; + + glWdgtChainPosition position; + gboolean active; + + GtkWidget *button; + GtkWidget *line1; + GtkWidget *line2; + GtkWidget *image; +}; + +struct _glWdgtChainButtonClass +{ + GtkTableClass parent_class; + + void (* toggled) (glWdgtChainButton *button); +}; + + +GType gl_wdgt_chain_button_get_type (void) G_GNUC_CONST; + +GtkWidget * gl_wdgt_chain_button_new (glWdgtChainPosition position); + +void gl_wdgt_chain_button_set_active (glWdgtChainButton *button, + gboolean active); +gboolean gl_wdgt_chain_button_get_active (glWdgtChainButton *button); + + +G_END_DECLS + +#endif /* __WDGT_CHAIN_BUTTON_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/wdgt-media-select.c b/src/wdgt-media-select.c new file mode 100644 index 00000000..0ad67804 --- /dev/null +++ b/src/wdgt-media-select.c @@ -0,0 +1,901 @@ +/* + * wdgt-media-select.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "wdgt-media-select.h" + +#include +#include +#include + +#include +#include "mini-preview-pixbuf-cache.h" +#include "prefs.h" +#include "str-util.h" +#include "combo-util.h" +#include "builder-util.h" +#include "color.h" +#include "marshal.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + +enum { + NAME_COLUMN, + PREVIEW_COLUMN, + PREVIEW_COLUMN_STOCK, + PREVIEW_COLUMN_STOCK_SIZE, + DESCRIPTION_COLUMN, + N_COLUMNS +}; + +struct _glWdgtMediaSelectPrivate { + + GtkBuilder *builder; + + GtkWidget *notebook; + guint current_page_num; + + gint recent_page_num; + GtkWidget *recent_tab_vbox; + GtkWidget *recent_treeview; + GtkListStore *recent_store; + + gint search_all_page_num; + GtkWidget *search_all_tab_vbox; + GtkWidget *brand_combo; + GtkWidget *page_size_combo; + GtkWidget *category_combo; + GtkWidget *search_all_treeview; + GtkListStore *search_all_store; + + /* Prevent recursion */ + gboolean stop_signals; +}; + +enum { + CHANGED, + LAST_SIGNAL +}; + +typedef void (*glWdgtMediaSelectSignal) (GObject * object, gpointer data); + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +static gint wdgt_media_select_signals[LAST_SIGNAL] = { 0 }; + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_wdgt_media_select_finalize (GObject *object); + +static void gl_wdgt_media_select_construct (glWdgtMediaSelect *media_select); + +static void filter_changed_cb (GtkComboBox *combo, + gpointer user_data); +static void selection_changed_cb (GtkTreeSelection *selection, + gpointer user_data); +static void page_changed_cb (GtkNotebook *notebook, + GtkNotebookPage *page, + guint page_num, + gpointer user_data); + +static gchar *get_layout_desc (const lglTemplate *template); +static gchar *get_label_size_desc (const lglTemplate *template); +static void load_recent_list (GtkListStore *store, + GtkTreeSelection *selection, + GSList *list); +static void load_search_all_list (GtkListStore *store, + GtkTreeSelection *selection, + GList *list); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glWdgtMediaSelect, gl_wdgt_media_select, GTK_TYPE_VBOX); + + +static void +gl_wdgt_media_select_class_init (glWdgtMediaSelectClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + gl_wdgt_media_select_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_wdgt_media_select_finalize; + + wdgt_media_select_signals[CHANGED] = + g_signal_new ("changed", + G_OBJECT_CLASS_TYPE(object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glWdgtMediaSelectClass, changed), + NULL, NULL, + gl_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +static void +gl_wdgt_media_select_init (glWdgtMediaSelect *media_select) +{ + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + media_select->priv = g_new0 (glWdgtMediaSelectPrivate, 1); + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +static void +gl_wdgt_media_select_finalize (GObject *object) +{ + glWdgtMediaSelect *media_select = GL_WDGT_MEDIA_SELECT (object); + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_WDGT_MEDIA_SELECT (object)); + + if (media_select->priv->builder) + { + g_object_unref (media_select->priv->builder); + } + g_object_unref (media_select->priv->recent_store); + g_object_unref (media_select->priv->search_all_store); + g_free (media_select->priv); + + G_OBJECT_CLASS (gl_wdgt_media_select_parent_class)->finalize (object); + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +GtkWidget * +gl_wdgt_media_select_new (void) +{ + glWdgtMediaSelect *media_select; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + media_select = g_object_new (gl_wdgt_media_select_get_type (), NULL); + + gl_wdgt_media_select_construct (media_select); + + gl_debug (DEBUG_MEDIA_SELECT, "END"); + + return GTK_WIDGET (media_select); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Construct composite widget. */ +/*--------------------------------------------------------------------------*/ +static void +gl_wdgt_media_select_construct (glWdgtMediaSelect *media_select) +{ + GtkBuilder *builder; + static gchar *object_ids[] = { "wdgt_media_select_hbox", NULL }; + GError *error = NULL; + GtkWidget *hbox; + GList *brands = NULL; + GList *page_sizes = NULL; + GList *categories = NULL; + GList *search_all_names = NULL; + const gchar *page_size_id; + gchar *page_size_name; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + GtkTreeSelection *recent_selection; + GtkTreeSelection *search_all_selection; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + g_return_if_fail (GL_IS_WDGT_MEDIA_SELECT (media_select)); + g_return_if_fail (media_select->priv != NULL); + + builder = gtk_builder_new (); + gtk_builder_add_objects_from_file (builder, + GLABELS_BUILDER_DIR "wdgt-media-select.builder", + object_ids, + &error); + if (error) { + g_critical ("%s\n\ngLabels may not be installed correctly!", error->message); + g_error_free (error); + return; + } + + gl_builder_util_get_widgets (builder, + "wdgt_media_select_hbox", &hbox, + "notebook", &media_select->priv->notebook, + + "recent_tab_vbox", &media_select->priv->recent_tab_vbox, + + "recent_treeview", &media_select->priv->recent_treeview, + "search_all_tab_vbox", &media_select->priv->search_all_tab_vbox, + "brand_combo", &media_select->priv->brand_combo, + "page_size_combo", &media_select->priv->page_size_combo, + "category_combo", &media_select->priv->category_combo, + "search_all_treeview", &media_select->priv->search_all_treeview, + NULL); + + gtk_container_add (GTK_CONTAINER (media_select), hbox); + media_select->priv->builder = builder; + + media_select->priv->recent_page_num = + gtk_notebook_page_num (GTK_NOTEBOOK (media_select->priv->notebook), + media_select->priv->recent_tab_vbox); + media_select->priv->search_all_page_num = + gtk_notebook_page_num (GTK_NOTEBOOK (media_select->priv->notebook), + media_select->priv->search_all_tab_vbox); + + /* Recent templates treeview */ + media_select->priv->recent_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING); + gtk_tree_view_set_model (GTK_TREE_VIEW (media_select->priv->recent_treeview), + GTK_TREE_MODEL (media_select->priv->recent_store)); + renderer = gtk_cell_renderer_pixbuf_new (); + column = gtk_tree_view_column_new_with_attributes ("", renderer, + "pixbuf", PREVIEW_COLUMN, + "stock-id", PREVIEW_COLUMN_STOCK, + "stock-size", PREVIEW_COLUMN_STOCK_SIZE, + NULL); + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (media_select->priv->recent_treeview), column); + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes ("", renderer, + "markup", DESCRIPTION_COLUMN, + NULL); + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (media_select->priv->recent_treeview), column); + recent_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->recent_treeview)); + load_recent_list (media_select->priv->recent_store, recent_selection, gl_prefs->recent_templates); + + page_size_id = gl_prefs_get_page_size (); + page_size_name = lgl_db_lookup_paper_name_from_id (page_size_id); + + /* Brand selection control */ + gl_combo_util_add_text_model (GTK_COMBO_BOX (media_select->priv->brand_combo)); + brands = lgl_db_get_brand_list (NULL, NULL); + brands = g_list_prepend (brands, g_strdup (_("Any"))); + gl_combo_util_set_strings (GTK_COMBO_BOX (media_select->priv->brand_combo), brands); + lgl_db_free_brand_list (brands); + gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->brand_combo), + _("Any")); + + /* Page size selection control */ + gl_combo_util_add_text_model (GTK_COMBO_BOX (media_select->priv->page_size_combo)); + page_sizes = lgl_db_get_paper_name_list (); + page_sizes = g_list_prepend (page_sizes, g_strdup (_("Any"))); + gl_combo_util_set_strings (GTK_COMBO_BOX (media_select->priv->page_size_combo), page_sizes); + lgl_db_free_paper_name_list (page_sizes); + gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->page_size_combo), + page_size_name); + + /* Category selection control */ + gl_combo_util_add_text_model (GTK_COMBO_BOX (media_select->priv->category_combo)); + categories = lgl_db_get_category_name_list (); + categories = g_list_prepend (categories, g_strdup (_("Any"))); + gl_combo_util_set_strings (GTK_COMBO_BOX (media_select->priv->category_combo), categories); + gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->category_combo), + _("Any")); + lgl_db_free_category_name_list (categories); + + /* Search all treeview */ + media_select->priv->search_all_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING); + gtk_tree_view_set_model (GTK_TREE_VIEW (media_select->priv->search_all_treeview), + GTK_TREE_MODEL (media_select->priv->search_all_store)); + renderer = gtk_cell_renderer_pixbuf_new (); + column = gtk_tree_view_column_new_with_attributes ("", renderer, + "pixbuf", PREVIEW_COLUMN, + "stock-id", PREVIEW_COLUMN_STOCK, + "stock-size", PREVIEW_COLUMN_STOCK_SIZE, + NULL); + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (media_select->priv->search_all_treeview), column); + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes ("", renderer, + "markup", DESCRIPTION_COLUMN, + NULL); + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (media_select->priv->search_all_treeview), column); + search_all_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->search_all_treeview)); + search_all_names = lgl_db_get_template_name_list_all (NULL, page_size_id, NULL); + load_search_all_list (media_select->priv->search_all_store, search_all_selection, search_all_names); + lgl_db_free_template_name_list (search_all_names); + + /* Connect signals to controls */ + g_signal_connect (G_OBJECT (media_select->priv->brand_combo), "changed", + G_CALLBACK (filter_changed_cb), + media_select); + g_signal_connect (G_OBJECT (media_select->priv->page_size_combo), "changed", + G_CALLBACK (filter_changed_cb), + media_select); + g_signal_connect (G_OBJECT (media_select->priv->category_combo), "changed", + G_CALLBACK (filter_changed_cb), + media_select); + g_signal_connect (G_OBJECT (recent_selection), "changed", + G_CALLBACK (selection_changed_cb), + media_select); + g_signal_connect (G_OBJECT (search_all_selection), "changed", + G_CALLBACK (selection_changed_cb), + media_select); + g_signal_connect (G_OBJECT (media_select->priv->notebook), "switch-page", + G_CALLBACK (page_changed_cb), + media_select); + + g_free (page_size_name); + + gtk_widget_show_all (GTK_WIDGET (media_select)); + if ( gl_prefs->recent_templates ) + { + gtk_notebook_set_current_page (GTK_NOTEBOOK (media_select->priv->notebook), + media_select->priv->recent_page_num); + } + else + { + gtk_notebook_set_current_page (GTK_NOTEBOOK (media_select->priv->notebook), + media_select->priv->search_all_page_num); + } + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. modify widget due to change in selection */ +/*--------------------------------------------------------------------------*/ +static void +filter_changed_cb (GtkComboBox *combo, + gpointer user_data) +{ + glWdgtMediaSelect *media_select = GL_WDGT_MEDIA_SELECT (user_data); + gchar *brand; + gchar *page_size_name, *page_size_id; + gchar *category_name, *category_id; + GList *search_all_names; + GtkTreeSelection *selection; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + + media_select->priv->stop_signals = TRUE; + + /* Update template selections for new filter settings */ + brand = gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->brand_combo)); + page_size_name = gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->page_size_combo)); + category_name = gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->category_combo)); + if ( brand && strlen(brand) && + page_size_name && strlen(page_size_name) && + category_name && strlen(category_name) ) + { + gl_debug (DEBUG_MEDIA_SELECT, "brand = \"%s\"", brand); + gl_debug (DEBUG_MEDIA_SELECT, "page_size_name = \"%s\"", page_size_name); + gl_debug (DEBUG_MEDIA_SELECT, "category_name = \"%s\"", category_name); + if (!g_utf8_collate (brand, _("Any"))) + { + g_free (brand); + brand = NULL; + } + page_size_id = lgl_db_lookup_paper_id_from_name (page_size_name); + category_id = lgl_db_lookup_category_id_from_name (category_name); + gl_debug (DEBUG_MEDIA_SELECT, "page_size_id = \"%s\"", page_size_id); + gl_debug (DEBUG_MEDIA_SELECT, "category_id = \"%s\"", category_id); + search_all_names = lgl_db_get_template_name_list_all (brand, page_size_id, category_id); + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->search_all_treeview)); + load_search_all_list (media_select->priv->search_all_store, selection, search_all_names); + lgl_db_free_template_name_list (search_all_names); + g_free (page_size_id); + g_free (category_id); + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (user_data), + wdgt_media_select_signals[CHANGED], 0); + } + g_free (brand); + g_free (page_size_name); + g_free (category_name); + + + media_select->priv->stop_signals = FALSE; + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. modify widget due to change in selection */ +/*--------------------------------------------------------------------------*/ +static void +selection_changed_cb (GtkTreeSelection *selection, + gpointer user_data) +{ + glWdgtMediaSelect *media_select = GL_WDGT_MEDIA_SELECT (user_data); + + if (media_select->priv->stop_signals) return; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (user_data), + wdgt_media_select_signals[CHANGED], 0); + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. modify widget due to change in selection */ +/*--------------------------------------------------------------------------*/ +static void +page_changed_cb (GtkNotebook *notebook, + GtkNotebookPage *page, + guint page_num, + gpointer user_data) +{ + glWdgtMediaSelect *media_select = GL_WDGT_MEDIA_SELECT (user_data); + + if (media_select->priv->stop_signals) return; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + /* + * Store new current page, because this signal is emitted before the actual page change. + */ + media_select->priv->current_page_num = page_num; + + /* Emit our "changed" signal */ + g_signal_emit (G_OBJECT (user_data), + wdgt_media_select_signals[CHANGED], 0); + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +/****************************************************************************/ +/* query selected label template name. */ +/****************************************************************************/ +gchar * +gl_wdgt_media_select_get_name (glWdgtMediaSelect *media_select) +{ + gint page_num; + GtkTreeSelection *selection; + GtkTreeIter iter; + GtkTreeModel *model; + gchar *name; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + page_num = media_select->priv->current_page_num; + if (page_num == media_select->priv->recent_page_num) + { + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->recent_treeview)); + } + else if (page_num == media_select->priv->search_all_page_num) + { + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->search_all_treeview)); + } + else + { + g_print ("notebook page = %d\n", page_num); + g_assert_not_reached (); + } + + if (gtk_tree_selection_get_mode (selection) == GTK_SELECTION_NONE) + { + name = NULL; + } + else + { + gtk_tree_selection_get_selected (selection, &model, &iter); + gtk_tree_model_get (model, &iter, NAME_COLUMN, &name, -1); + } + + gl_debug (DEBUG_MEDIA_SELECT, "END"); + return name; +} + + +/****************************************************************************/ +/* set selected label template name. */ +/****************************************************************************/ +void +gl_wdgt_media_select_set_name (glWdgtMediaSelect *media_select, + gchar *name) +{ + GtkTreeSelection *selection; + GtkTreeModel *model; + GtkTreeIter iter; + GtkTreePath *path; + gchar *name_i; + gboolean flag; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (media_select->priv->search_all_treeview)); + g_return_if_fail (GTK_IS_TREE_SELECTION (selection)); + + model = GTK_TREE_MODEL (media_select->priv->search_all_store); + + for ( flag = gtk_tree_model_get_iter_first (model, &iter); + flag; + flag = gtk_tree_model_iter_next(model, &iter) ) + { + gtk_tree_model_get (model, &iter, NAME_COLUMN, &name_i, -1); + if (strcasecmp(name, name_i) == 0) + { + gtk_tree_selection_select_iter (selection, &iter); + path = gtk_tree_model_get_path (model, &iter); + gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (media_select->priv->search_all_treeview), + path, + NULL, + TRUE, 0.5, 0.0); + gtk_tree_path_free (path); + break; + } + } + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +/****************************************************************************/ +/* query current filter parameters. */ +/****************************************************************************/ +void +gl_wdgt_media_select_get_filter_parameters (glWdgtMediaSelect *media_select, + gchar **page_size_id, + gchar **category_id) +{ + gchar *page_size_name, *category_name; + + gl_debug (DEBUG_MEDIA_SELECT, ""); + + g_free (*page_size_id); + g_free (*category_id); + + page_size_name = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->page_size_combo)); + + *page_size_id = lgl_db_lookup_paper_id_from_name (page_size_name); + + category_name = + gtk_combo_box_get_active_text (GTK_COMBO_BOX (media_select->priv->category_combo)); + + *category_id = lgl_db_lookup_category_id_from_name (category_name); + + g_free (page_size_name); + g_free (category_name); +} + + +/****************************************************************************/ +/* set filter parameters. */ +/****************************************************************************/ +void +gl_wdgt_media_select_set_filter_parameters (glWdgtMediaSelect *media_select, + const gchar *page_size_id, + const gchar *category_id) +{ + gchar *page_size_name; + gchar *category_name; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + page_size_name = lgl_db_lookup_paper_name_from_id (page_size_id); + if (page_size_name == NULL) + { + page_size_name = g_strdup (_("Any")); + } + + gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->page_size_combo), + page_size_name); + + category_name = lgl_db_lookup_category_name_from_id (category_id); + if (category_name == NULL) + { + category_name = g_strdup (_("Any")); + } + + gl_combo_util_set_active_text (GTK_COMBO_BOX (media_select->priv->category_combo), + category_name); + g_free (page_size_name); + g_free (category_name); + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Get a description of the layout and number of labels. */ +/*--------------------------------------------------------------------------*/ +static gchar * +get_layout_desc (const lglTemplate *template) +{ + const lglTemplateFrame *frame; + gint n_labels; + gchar *string; + + frame = (lglTemplateFrame *)template->frames->data; + + n_labels = lgl_template_frame_get_n_labels (frame); + + string = g_strdup_printf (_("%d per sheet"), n_labels); + + return string; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Get label size description. */ +/*--------------------------------------------------------------------------*/ +static gchar * +get_label_size_desc (const lglTemplate *template) +{ + lglUnitsType units; + const gchar *units_string; + gdouble units_per_point; + const lglTemplateFrame *frame; + gchar *string = NULL; + + units = gl_prefs_get_units (); + units_string = gl_prefs_get_units_string (); + units_per_point = gl_prefs_get_units_per_point (); + + frame = (lglTemplateFrame *)template->frames->data; + + switch (frame->shape) { + case LGL_TEMPLATE_FRAME_SHAPE_RECT: + if ( units == LGL_UNITS_INCH ) { + gchar *xstr, *ystr; + + xstr = gl_str_util_fraction_to_string (frame->rect.w*units_per_point); + ystr = gl_str_util_fraction_to_string (frame->rect.h*units_per_point); + string = g_strdup_printf (_("%s x %s %s"), + xstr, ystr, units_string); + g_free (xstr); + g_free (ystr); + } else { + string = g_strdup_printf (_("%.5g x %.5g %s"), + frame->rect.w*units_per_point, + frame->rect.h*units_per_point, + units_string); + } + break; + case LGL_TEMPLATE_FRAME_SHAPE_ROUND: + if ( units == LGL_UNITS_INCH ) { + gchar *dstr; + + dstr = gl_str_util_fraction_to_string (2.0*frame->round.r*units_per_point); + string = g_strdup_printf (_("%s %s diameter"), + dstr, units_string); + g_free (dstr); + } else { + string = g_strdup_printf (_("%.5g %s diameter"), + 2.0*frame->round.r*units_per_point, + units_string); + } + break; + case LGL_TEMPLATE_FRAME_SHAPE_CD: + if ( units == LGL_UNITS_INCH ) { + gchar *dstr; + + dstr = gl_str_util_fraction_to_string (2.0*frame->cd.r1*units_per_point); + string = g_strdup_printf (_("%s %s diameter"), + dstr, units_string); + g_free (dstr); + } else { + string = g_strdup_printf (_("%.5g %s diameter"), + 2.0*frame->cd.r1*units_per_point, + units_string); + } + break; + default: + break; + } + + return string; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Load list store from template name list. */ +/*--------------------------------------------------------------------------*/ +static void +load_recent_list (GtkListStore *store, + GtkTreeSelection *selection, + GSList *list) +{ + GSList *p; + GtkTreeIter iter; + lglTemplate *template; + GdkPixbuf *pixbuf; + gchar *size; + gchar *layout; + gchar *description; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + gtk_list_store_clear (store); + + if (list) + { + + for ( p=list; p!=NULL; p=p->next ) + { + + gl_debug (DEBUG_MEDIA_SELECT, "p->data = \"%s\"", p->data); + + template = lgl_db_lookup_template_from_name (p->data); + pixbuf = gl_mini_preview_pixbuf_cache_get_pixbuf (p->data); + + size = get_label_size_desc (template); + layout = get_layout_desc (template); + description = g_strdup_printf ("%s: %s\n%s\n%s", + (gchar *)p->data, + template->description, + size, + layout); + g_free (size); + g_free (layout); + + lgl_template_free (template); + + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + NAME_COLUMN, p->data, + PREVIEW_COLUMN, pixbuf, + DESCRIPTION_COLUMN, description, + -1); + + g_object_unref (G_OBJECT (pixbuf)); + g_free (description); + } + + gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); + gtk_tree_selection_select_iter (selection, &iter); + + } + else + { + gchar *text = g_strdup_printf ("%s\n%s", + _("No recent templates found."), + _("Try selecting a template from the \"Search all templates\" page.")); + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + NAME_COLUMN, "empty", + PREVIEW_COLUMN_STOCK, GTK_STOCK_DIALOG_WARNING, + PREVIEW_COLUMN_STOCK_SIZE, GTK_ICON_SIZE_DIALOG, + DESCRIPTION_COLUMN, text, + -1); + g_free (text); + + gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); + + } + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Load list store from template name list. */ +/*--------------------------------------------------------------------------*/ +static void +load_search_all_list (GtkListStore *store, + GtkTreeSelection *selection, + GList *list) +{ + GList *p; + GtkTreeIter iter; + lglTemplate *template; + GdkPixbuf *pixbuf; + gchar *size; + gchar *layout; + gchar *description; + + gl_debug (DEBUG_MEDIA_SELECT, "START"); + + gtk_list_store_clear (store); + + if (list) + { + + for ( p=list; p!=NULL; p=p->next ) + { + + gl_debug (DEBUG_MEDIA_SELECT, "p->data = \"%s\"", p->data); + + template = lgl_db_lookup_template_from_name (p->data); + pixbuf = gl_mini_preview_pixbuf_cache_get_pixbuf (p->data); + + size = get_label_size_desc (template); + layout = get_layout_desc (template); + description = g_strdup_printf ("%s: %s\n%s\n%s", + (gchar *)p->data, + template->description, + size, + layout); + g_free (size); + g_free (layout); + + lgl_template_free (template); + + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + NAME_COLUMN, p->data, + PREVIEW_COLUMN, pixbuf, + DESCRIPTION_COLUMN, description, + -1); + + g_object_unref (G_OBJECT (pixbuf)); + g_free (description); + } + + gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); + gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); + gtk_tree_selection_select_iter (selection, &iter); + + } + else + { + gchar *text = g_strdup_printf ("%s\n%s", + _("No match."), + _("Try selecting a different brand, page size or category.")); + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, + NAME_COLUMN, "empty", + PREVIEW_COLUMN_STOCK, GTK_STOCK_DIALOG_WARNING, + PREVIEW_COLUMN_STOCK_SIZE, GTK_ICON_SIZE_DIALOG, + DESCRIPTION_COLUMN, text, + -1); + g_free (text); + + gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); + + } + + gl_debug (DEBUG_MEDIA_SELECT, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/wdgt-media-select.h b/src/wdgt-media-select.h new file mode 100644 index 00000000..f2c30073 --- /dev/null +++ b/src/wdgt-media-select.h @@ -0,0 +1,85 @@ +/* + * wdgt-media-select.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __WDGT_MEDIA_SELECT_H__ +#define __WDGT_MEDIA_SELECT_H__ + +#include + +G_BEGIN_DECLS + +#define GL_TYPE_WDGT_MEDIA_SELECT (gl_wdgt_media_select_get_type ()) +#define GL_WDGT_MEDIA_SELECT(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_WDGT_MEDIA_SELECT, glWdgtMediaSelect )) +#define GL_WDGT_MEDIA_SELECT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_WDGT_MEDIA_SELECT, glWdgtMediaSelectClass)) +#define GL_IS_WDGT_MEDIA_SELECT(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_WDGT_MEDIA_SELECT)) +#define GL_IS_WDGT_MEDIA_SELECT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_WDGT_MEDIA_SELECT)) + +typedef struct _glWdgtMediaSelect glWdgtMediaSelect; +typedef struct _glWdgtMediaSelectClass glWdgtMediaSelectClass; + +typedef struct _glWdgtMediaSelectPrivate glWdgtMediaSelectPrivate; + +struct _glWdgtMediaSelect { + GtkVBox parent_widget; + + glWdgtMediaSelectPrivate *priv; +}; + +struct _glWdgtMediaSelectClass { + GtkVBoxClass parent_class; + + void (*changed) (glWdgtMediaSelect * media_select, gpointer user_data); +}; + +GType gl_wdgt_media_select_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_wdgt_media_select_new (void); + +gchar *gl_wdgt_media_select_get_name (glWdgtMediaSelect *media_select); + +void gl_wdgt_media_select_set_name (glWdgtMediaSelect *media_select, + gchar *name); + +void gl_wdgt_media_select_get_filter_parameters (glWdgtMediaSelect *media_select, + gchar **page_size_id, + gchar **category_id); + +void gl_wdgt_media_select_set_filter_parameters (glWdgtMediaSelect *media_select, + const gchar *page_size_id, + const gchar *category_id); + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/wdgt-merge-menu.c b/src/wdgt-merge-menu.c new file mode 100644 index 00000000..9f0d132e --- /dev/null +++ b/src/wdgt-merge-menu.c @@ -0,0 +1,221 @@ +/* + * wdgt-merge-menu.c + * Copyright (C) 2008-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "wdgt-merge-menu.h" + +#include +#include + +#include "marshal.h" + +#include "debug.h" + + +/*===========================================*/ +/* Private types */ +/*===========================================*/ + + +struct _glWdgtMergeMenuPrivate { + + GList *menu_items; +}; + +enum { + FIELD_SELECTED, + LAST_SIGNAL +}; + +typedef void (*glWdgtMergeMenuSignal) (GObject * object, gpointer data); + + +/*===========================================*/ +/* Private globals */ +/*===========================================*/ + +static gint signals[LAST_SIGNAL] = { 0 }; + + +/*===========================================*/ +/* Local function prototypes */ +/*===========================================*/ + +static void gl_wdgt_merge_menu_finalize (GObject *object); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glWdgtMergeMenu, gl_wdgt_merge_menu, GTK_TYPE_MENU); + + +static void +gl_wdgt_merge_menu_class_init (glWdgtMergeMenuClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + gl_debug (DEBUG_MERGE_MENU, "START"); + + gl_wdgt_merge_menu_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_wdgt_merge_menu_finalize; + + signals[FIELD_SELECTED] = + g_signal_new ("field_selected", + G_OBJECT_CLASS_TYPE(object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (glWdgtMergeMenuClass, field_selected), + NULL, NULL, + gl_marshal_VOID__STRING, + G_TYPE_NONE, 1, G_TYPE_STRING); + + gl_debug (DEBUG_MERGE_MENU, "END"); +} + + +static void +gl_wdgt_merge_menu_init (glWdgtMergeMenu *merge_menu) +{ + gl_debug (DEBUG_MERGE_MENU, "START"); + + merge_menu->priv = g_new0 (glWdgtMergeMenuPrivate, 1); + + gl_debug (DEBUG_MERGE_MENU, "END"); +} + + +static void +gl_wdgt_merge_menu_finalize (GObject *object) +{ + glWdgtMergeMenu *merge_menu = GL_WDGT_MERGE_MENU (object); + GList *p; + GtkWidget *menu_item; + gchar *field; + + gl_debug (DEBUG_MERGE_MENU, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_WDGT_MERGE_MENU (object)); + + for ( p = merge_menu->priv->menu_items; p != NULL; p = p->next ) + { + menu_item = GTK_WIDGET (p->data); + field = g_object_get_data (G_OBJECT (menu_item), "field"); + g_free (field); + } + g_list_free (merge_menu->priv->menu_items); + g_free (merge_menu->priv); + + G_OBJECT_CLASS (gl_wdgt_merge_menu_parent_class)->finalize (object); + + gl_debug (DEBUG_MERGE_MENU, "END"); +} + + +GtkWidget * +gl_wdgt_merge_menu_new (void) +{ + glWdgtMergeMenu *merge_menu; + + gl_debug (DEBUG_MERGE_MENU, "START"); + + merge_menu = g_object_new (gl_wdgt_merge_menu_get_type (), NULL); + + gl_debug (DEBUG_MERGE_MENU, "END"); + + return GTK_WIDGET (merge_menu); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Menu item activation callback. */ +/*--------------------------------------------------------------------------*/ +static void +activate_cb (GtkMenuItem *menu_item, + glWdgtMergeMenu *merge_menu) +{ + gchar *field; + + gl_debug (DEBUG_MERGE_MENU, "START"); + + field = g_object_get_data (G_OBJECT (menu_item), "field"); + gl_debug (DEBUG_MERGE_MENU, "Field activated: \"%s\"\n", field ); + + g_signal_emit (G_OBJECT (merge_menu), signals[FIELD_SELECTED], 0, field); + + gl_debug (DEBUG_MERGE_MENU, "END"); +} + + +/****************************************************************************/ +/* set field names. */ +/****************************************************************************/ +void +gl_wdgt_merge_menu_set_fields (glWdgtMergeMenu *merge_menu, + GList *field_list) +{ + GList *p; + GtkWidget *menu_item; + gchar *field; + + gl_debug (DEBUG_MERGE_MENU, "START"); + + /* + * Remove all old menu items. + */ + for ( p = merge_menu->priv->menu_items; p != NULL; p = p->next ) + { + menu_item = GTK_WIDGET (p->data); + field = g_object_get_data (G_OBJECT (menu_item), "field"); + g_free (field); + gtk_widget_destroy (menu_item); + } + g_list_free (merge_menu->priv->menu_items); + merge_menu->priv->menu_items = NULL; + + /* + * Add new menu items. + */ + for ( p = field_list; p != NULL; p = p->next ) + { + menu_item = gtk_menu_item_new_with_label (p->data); + g_object_set_data (G_OBJECT (menu_item), "field", g_strdup (p->data)); + g_signal_connect (G_OBJECT (menu_item), "activate", + G_CALLBACK (activate_cb), merge_menu); + gtk_menu_shell_append (GTK_MENU_SHELL (merge_menu), menu_item); + merge_menu->priv->menu_items = + g_list_append (merge_menu->priv->menu_items, menu_item); + } + + gl_debug (DEBUG_MERGE_MENU, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/wdgt-merge-menu.h b/src/wdgt-merge-menu.h new file mode 100644 index 00000000..2c406dcd --- /dev/null +++ b/src/wdgt-merge-menu.h @@ -0,0 +1,82 @@ +/* + * wdgt-merge-menu.h + * Copyright (C) 2008-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __WDGT_MERGE_MENU_H__ +#define __WDGT_MERGE_MENU_H__ + +#include + +G_BEGIN_DECLS + +#define GL_TYPE_WDGT_MERGE_MENU (gl_wdgt_merge_menu_get_type ()) +#define GL_WDGT_MERGE_MENU(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_WDGT_MERGE_MENU, glWdgtMergeMenu )) +#define GL_WDGT_MERGE_MENU_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_WDGT_MERGE_MENU, glWdgtMergeMenuClass)) +#define GL_IS_WDGT_MERGE_MENU(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_WDGT_MERGE_MENU)) +#define GL_IS_WDGT_MERGE_MENU_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_WDGT_MERGE_MENU)) + + +typedef struct _glWdgtMergeMenu glWdgtMergeMenu; +typedef struct _glWdgtMergeMenuClass glWdgtMergeMenuClass; + +typedef struct _glWdgtMergeMenuPrivate glWdgtMergeMenuPrivate; + + +struct _glWdgtMergeMenu { + GtkMenu parent_widget; + + glWdgtMergeMenuPrivate *priv; +}; + + +struct _glWdgtMergeMenuClass { + GtkMenuClass parent_class; + + void (*field_selected) (glWdgtMergeMenu *merge_menu, + gchar *field, + gpointer user_data); +}; + + +GType gl_wdgt_merge_menu_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_wdgt_merge_menu_new (void); + +void gl_wdgt_merge_menu_set_fields (glWdgtMergeMenu *merge_menu, + GList *field_list); + + +G_END_DECLS + +#endif + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/window.c b/src/window.c new file mode 100644 index 00000000..0960d32e --- /dev/null +++ b/src/window.c @@ -0,0 +1,637 @@ +/* + * window.c + * Copyright (C) 2002-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "window.h" + +#include +#include + +#include "ui.h" +#include "ui-commands.h" +#include "file-util.h" +#include "xml-label.h" +#include "prefs.h" +#include "file.h" + +#include "debug.h" + + +/*===========================================================================*/ +/* Private macros and constants. */ +/*===========================================================================*/ + +#define DEFAULT_WINDOW_WIDTH 788 +#define DEFAULT_WINDOW_HEIGHT 600 + +#define CURSOR_INFO_WIDTH 150 +#define ZOOM_INFO_WIDTH 50 + + +/*===========================================================================*/ +/* Private globals */ +/*===========================================================================*/ + +static GList *window_list = NULL; + + +/*===========================================================================*/ +/* Local function prototypes */ +/*===========================================================================*/ + +static void gl_window_finalize (GObject *object); +static void gl_window_destroy (GtkObject *gtk_object); + +static void set_window_title (glWindow *window, + glLabel *label); + +static gboolean window_delete_event_cb (glWindow *window, + GdkEvent *event, + gpointer user_data); + +static void selection_changed_cb (glView *view, + glWindow *window); + +static void context_menu_activate_cb (glView *view, + gint button, + guint32 activate_time, + glWindow *window); + +static void zoom_changed_cb (glView *view, + gdouble zoom, + glWindow *window); + +static void pointer_moved_cb (glView *view, + gdouble x, + gdouble y, + glWindow *window); + +static void pointer_exit_cb (glView *view, + glWindow *window); + +static void name_changed_cb (glLabel *label, + glWindow *window); + +static void modified_changed_cb (glLabel *label, + glWindow *window); + + +/****************************************************************************/ +/* Boilerplate Object stuff. */ +/****************************************************************************/ +G_DEFINE_TYPE (glWindow, gl_window, GTK_TYPE_WINDOW); + + +static void +gl_window_class_init (glWindowClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (class); + + gl_debug (DEBUG_WINDOW, "START"); + + gl_window_parent_class = g_type_class_peek_parent (class); + + object_class->finalize = gl_window_finalize; + + gtk_object_class->destroy = gl_window_destroy; + + gl_debug (DEBUG_WINDOW, "END"); +} + + +static void +gl_window_init (glWindow *window) +{ + GtkWidget *vbox1; + GtkUIManager *ui; + GtkWidget *status_hbox; + + gl_debug (DEBUG_WINDOW, "START"); + + vbox1 = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (window), vbox1); + + window->ui = ui = gl_ui_new (window); + gtk_box_pack_start (GTK_BOX (vbox1), + gtk_ui_manager_get_widget (ui, "/MenuBar"), + FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox1), + gtk_ui_manager_get_widget (ui, "/MainToolBar"), + FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox1), + gtk_ui_manager_get_widget (ui, "/DrawingToolBar"), + FALSE, FALSE, 0); + + window->hbox = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox1), window->hbox, TRUE, TRUE, 0); + + window->sidebar = GL_UI_SIDEBAR (gl_ui_sidebar_new ()); + gtk_box_pack_end (GTK_BOX (window->hbox), GTK_WIDGET (window->sidebar), FALSE, FALSE, 0); + + window->property_bar = GL_UI_PROPERTY_BAR (gl_ui_property_bar_new ()); + gtk_box_pack_start (GTK_BOX (vbox1), GTK_WIDGET (window->property_bar), FALSE, FALSE, 0); + + status_hbox = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox1), status_hbox, FALSE, FALSE, 0); + + window->status_bar = gtk_statusbar_new (); + gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (window->status_bar), FALSE); + gtk_box_pack_start (GTK_BOX (status_hbox), + window->status_bar, + TRUE, TRUE, 0); + window->zoom_info = gtk_label_new (NULL); + gtk_widget_set_size_request (window->zoom_info, ZOOM_INFO_WIDTH, -1); + window->zoom_info_frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME(window->zoom_info_frame), GTK_SHADOW_IN); + gtk_container_add (GTK_CONTAINER(window->zoom_info_frame), window->zoom_info); + gtk_widget_show_all (window->zoom_info_frame); + gtk_box_pack_end (GTK_BOX (status_hbox), + window->zoom_info_frame, + FALSE, FALSE, 0); + + window->cursor_info = gtk_label_new (NULL); + gtk_widget_set_size_request (window->cursor_info, CURSOR_INFO_WIDTH, -1); + window->cursor_info_frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME(window->cursor_info_frame), GTK_SHADOW_IN); + gtk_container_add (GTK_CONTAINER(window->cursor_info_frame), window->cursor_info); + gtk_widget_show_all (window->cursor_info_frame); + gtk_box_pack_end (GTK_BOX (status_hbox), + window->cursor_info_frame, + FALSE, FALSE, 0); + + gtk_window_set_default_size (GTK_WINDOW (window), + DEFAULT_WINDOW_WIDTH, + DEFAULT_WINDOW_HEIGHT); + + g_signal_connect (G_OBJECT(window), "delete-event", + G_CALLBACK(window_delete_event_cb), NULL); + + window->menu_tips_context_id = + gtk_statusbar_get_context_id (GTK_STATUSBAR (window->status_bar), "menu_tips"); + + window->print_settings = NULL; + window->merge_dialog = NULL; + window->context_menu = GTK_MENU (gtk_ui_manager_get_widget (ui, "/ContextMenu")); + window->empty_selection_context_menu = + GTK_MENU (gtk_ui_manager_get_widget (ui, "/EmptySelectionContextMenu")); + + window->view = NULL; + + window_list = g_list_append (window_list, window); + + gl_debug (DEBUG_WINDOW, "END"); +} + + +static void +gl_window_finalize (GObject *object) +{ + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (object != NULL); + g_return_if_fail (GL_IS_WINDOW (object)); + + G_OBJECT_CLASS (gl_window_parent_class)->finalize (object); + + gl_debug (DEBUG_WINDOW, "END"); +} + + +static void +gl_window_destroy (GtkObject *gtk_object) +{ + glWindow *window; + + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (gtk_object != NULL); + g_return_if_fail (GL_IS_WINDOW (gtk_object)); + + window = GL_WINDOW (gtk_object); + window_list = g_list_remove (window_list, window); + + if (window->ui) { + gl_ui_unref(window->ui); + window->ui = NULL; + } + + if (GTK_OBJECT_CLASS (gl_window_parent_class)->destroy) { + GTK_OBJECT_CLASS (gl_window_parent_class)->destroy (gtk_object); + } + + gl_debug (DEBUG_WINDOW, "END"); +} + + +/****************************************************************************/ +/** Create a glabels window. */ +/****************************************************************************/ +GtkWidget * +gl_window_new (void) +{ + glWindow *window; + + gl_debug (DEBUG_WINDOW, "START"); + + window = g_object_new (GL_TYPE_WINDOW, + "title", _("(none) - gLabels"), + NULL); + + gl_debug (DEBUG_WINDOW, "window=%p", window); + gl_debug (DEBUG_WINDOW, "view=%p", window->view); + + gl_debug (DEBUG_WINDOW, "END"); + + return GTK_WIDGET(window); +} + + +/****************************************************************************/ +/** Create a glabels window from a label. */ +/****************************************************************************/ +GtkWidget* +gl_window_new_from_label (glLabel *label) +{ + glWindow *window; + + gl_debug (DEBUG_WINDOW, "START"); + + window = GL_WINDOW (gl_window_new ()); + + gl_window_set_label (window, label); + + gl_debug (DEBUG_WINDOW, "END"); + + return GTK_WIDGET(window); +} + + +/****************************************************************************/ +/** Create a glabels window from a glabels file. */ +/****************************************************************************/ +GtkWidget* +gl_window_new_from_file (const gchar *filename) +{ + glWindow *window; + glLabel *label; + gchar *abs_filename; + glXMLLabelStatus status; + + gl_debug (DEBUG_WINDOW, "START"); + + window = GL_WINDOW (gl_window_new ()); + + abs_filename = gl_file_util_make_absolute (filename); + label = gl_xml_label_open (abs_filename, &status); + g_free (abs_filename); + + gl_window_set_label (window, label); + + gl_debug (DEBUG_WINDOW, "END"); + + return GTK_WIDGET(window); +} + + +/****************************************************************************/ +/** Is window empty? */ +/****************************************************************************/ +gboolean +gl_window_is_empty (glWindow *window) +{ + g_return_val_if_fail (GL_IS_WINDOW (window), FALSE); + + gl_debug (DEBUG_WINDOW, "return %d", (window->view == NULL) ); + return ( window->view == NULL ); +} + + +/****************************************************************************/ +/** Create view from label and place in window. */ +/****************************************************************************/ +void +gl_window_set_label (glWindow *window, + glLabel *label) +{ + gchar *string; + + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (GL_IS_WINDOW (window)); + g_return_if_fail (GL_IS_LABEL (label)); + + gl_label_clear_modified (label); + + set_window_title (window, label); + + if ( window->view != NULL ) { + gtk_widget_destroy (window->view); + window->view = NULL; + } + + window->view = gl_view_new (label); + gtk_box_pack_start (GTK_BOX (window->hbox), window->view,TRUE, TRUE, 0); + + gtk_widget_show_all (window->view); + + gl_view_zoom_to_fit (GL_VIEW(window->view)); + + if (gl_prefs->grid_visible) { + gl_view_show_grid (GL_VIEW(window->view)); + } else { + gl_view_hide_grid (GL_VIEW(window->view)); + } + + if (gl_prefs->markup_visible) { + gl_view_show_markup (GL_VIEW(window->view)); + } else { + gl_view_hide_markup (GL_VIEW(window->view)); + } + + gl_ui_update_all (window->ui, GL_VIEW(window->view)); + + gl_ui_property_bar_set_view (window->property_bar, GL_VIEW(window->view)); + gl_ui_sidebar_set_view (window->sidebar, GL_VIEW(window->view)); + + string = g_strdup_printf ("%3.0f%%", + 100.0*gl_view_get_zoom (GL_VIEW(window->view))); + gtk_label_set_text (GTK_LABEL(window->zoom_info), string); + g_free (string); + + g_signal_connect (G_OBJECT(window->view), "selection_changed", + G_CALLBACK(selection_changed_cb), window); + + g_signal_connect (G_OBJECT(window->view), "context_menu_activate", + G_CALLBACK(context_menu_activate_cb), window); + + g_signal_connect (G_OBJECT(window->view), "zoom_changed", + G_CALLBACK(zoom_changed_cb), window); + + g_signal_connect (G_OBJECT(window->view), "pointer_moved", + G_CALLBACK(pointer_moved_cb), window); + + g_signal_connect (G_OBJECT(window->view), "pointer_exit", + G_CALLBACK(pointer_exit_cb), window); + + g_signal_connect (G_OBJECT(label), "name_changed", + G_CALLBACK(name_changed_cb), window); + + g_signal_connect (G_OBJECT(label), "modified_changed", + G_CALLBACK(modified_changed_cb), window); + + gl_debug (DEBUG_WINDOW, "END"); +} + + +/****************************************************************************/ +/** Return list of glabels windows. */ +/****************************************************************************/ +const GList * +gl_window_get_window_list (void) +{ + gl_debug (DEBUG_WINDOW, ""); + return window_list; +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Set window title based on name and state of label. */ +/*---------------------------------------------------------------------------*/ +static void +set_window_title (glWindow *window, + glLabel *label) +{ + gchar *name, *title; + + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (window && GL_IS_WINDOW (window)); + g_return_if_fail (label && GL_IS_LABEL (label)); + + name = gl_label_get_short_name (label); + g_return_if_fail (name != NULL); + + if (gl_label_is_modified (label)) { + title = g_strdup_printf ("%s %s - gLabels", + name, _("(modified)")); + } else { + title = g_strdup_printf ("%s - gLabels", name); + } + + gtk_window_set_title (GTK_WINDOW(window), title); + + g_free (name); + g_free (title); + + gl_debug (DEBUG_WINDOW, "END"); +} + + +/*-------------------------------------------------------------------------*/ +/** PRIVATE. Window "delete-event" callback. */ +/*-------------------------------------------------------------------------*/ +static gboolean +window_delete_event_cb (glWindow *window, + GdkEvent *event, + gpointer user_data) +{ + gl_debug (DEBUG_WINDOW, "START"); + + g_return_val_if_fail (window && GL_IS_WINDOW (window), TRUE); + + gl_file_close (window); + + gl_debug (DEBUG_WINDOW, "END"); + + return TRUE; +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. View "selection state changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +selection_changed_cb (glView *view, + glWindow *window) +{ + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (window && GL_IS_WINDOW (window)); + + gl_ui_update_selection_verbs (window->ui, view); + + gl_debug (DEBUG_WINDOW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. View "context menu activate" callback. */ +/*---------------------------------------------------------------------------*/ +static void +context_menu_activate_cb (glView *view, + gint button, + guint32 activate_time, + glWindow *window) +{ + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (window && GL_IS_WINDOW (window)); + + if (gl_view_is_selection_empty (view)) { + + gtk_menu_popup (GTK_MENU (window->empty_selection_context_menu), + NULL, NULL, NULL, NULL, button, activate_time); + + } else { + + gtk_menu_popup (GTK_MENU (window->context_menu), + NULL, NULL, NULL, NULL, button, activate_time); + + } + + gl_debug (DEBUG_WINDOW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. View "zoom state changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +zoom_changed_cb (glView *view, + gdouble zoom, + glWindow *window) +{ + gchar *string; + + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (window && GL_IS_WINDOW (window)); + + string = g_strdup_printf ("%3.0f%%", 100.0*zoom); + gtk_label_set_text (GTK_LABEL(window->zoom_info), string); + g_free (string); + + gl_ui_update_zoom_verbs (window->ui, view); + + gl_debug (DEBUG_WINDOW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. View "pointer moved" callback. */ +/*---------------------------------------------------------------------------*/ +static void +pointer_moved_cb (glView *view, + gdouble x, + gdouble y, + glWindow *window) +{ + gchar *string; + gdouble units_per_point; + gint units_precision; + + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (window && GL_IS_WINDOW (window)); + + units_per_point = gl_prefs_get_units_per_point (); + units_precision = gl_prefs_get_units_precision (); + + string = g_strdup_printf ("%.*f, %.*f", + units_precision, x*units_per_point, + units_precision, y*units_per_point); + gtk_label_set_text (GTK_LABEL(window->cursor_info), string); + g_free (string); + + gl_debug (DEBUG_WINDOW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. View "pointer exit" callback. */ +/*---------------------------------------------------------------------------*/ +static void +pointer_exit_cb (glView *view, + glWindow *window) +{ + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (window && GL_IS_WINDOW (window)); + + gtk_label_set_text (GTK_LABEL(window->cursor_info), ""); + + gl_debug (DEBUG_WINDOW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Label "name changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +name_changed_cb (glLabel *label, + glWindow *window) +{ + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (label && GL_IS_LABEL (label)); + g_return_if_fail (window && GL_IS_WINDOW (window)); + + set_window_title (window, label); + + gl_debug (DEBUG_WINDOW, "END"); +} + + +/*---------------------------------------------------------------------------*/ +/** PRIVATE. Label "modified state changed" callback. */ +/*---------------------------------------------------------------------------*/ +static void +modified_changed_cb (glLabel *label, + glWindow *window) +{ + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (label && GL_IS_LABEL (label)); + g_return_if_fail (window && GL_IS_WINDOW (window)); + + set_window_title (window, label); + + gl_ui_update_modified_verbs (window->ui, label); + + gl_debug (DEBUG_WINDOW, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/window.h b/src/window.h new file mode 100644 index 00000000..999bd4ca --- /dev/null +++ b/src/window.h @@ -0,0 +1,106 @@ +/* + * window.h + * Copyright (C) 2002-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __WINDOW_H__ +#define __WINDOW_H__ + +#include + +#include "view.h" +#include "label.h" +#include "ui-property-bar.h" +#include "ui-sidebar.h" +#include "print-op.h" +#include "merge-properties-dialog.h" + +G_BEGIN_DECLS + +#define GL_TYPE_WINDOW (gl_window_get_type ()) +#define GL_WINDOW(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GL_TYPE_WINDOW, glWindow )) +#define GL_WINDOW_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_WINDOW, glWindowClass)) +#define GL_IS_WINDOW(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_WINDOW)) +#define GL_IS_WINDOW_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_WINDOW)) + +typedef struct _glWindow glWindow; +typedef struct _glWindowClass glWindowClass; + +struct _glWindow { + GtkWindow parent_widget; + + GtkUIManager *ui; + + GtkWidget *view; + + GtkWidget *hbox; + + glUIPropertyBar *property_bar; + glUISidebar *sidebar; + + GtkWidget *status_bar; + GtkWidget *cursor_info; + GtkWidget *cursor_info_frame; + GtkWidget *zoom_info; + GtkWidget *zoom_info_frame; + + guint menu_tips_context_id; + + glPrintOpSettings *print_settings; + glMergePropertiesDialog *merge_dialog; + GtkMenu *context_menu; + GtkMenu *empty_selection_context_menu; +}; + +struct _glWindowClass { + GtkWindowClass parent_class; +}; + +GType gl_window_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_window_new (void); + +GtkWidget *gl_window_new_from_file (const gchar *filename); + +GtkWidget *gl_window_new_from_label (glLabel *label); + +gboolean gl_window_is_empty (glWindow *window); + +void gl_window_set_label (glWindow *window, + glLabel *label); + +const GList *gl_window_get_window_list (void); + +G_END_DECLS + +#endif /* __WINDOW_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/xml-label-04.c b/src/xml-label-04.c new file mode 100644 index 00000000..7fe639d1 --- /dev/null +++ b/src/xml-label-04.c @@ -0,0 +1,520 @@ +/* + * xml-label-04.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "xml-label-04.h" + +#include + +#include +#include "label-text.h" +#include "label-box.h" +#include "label-line.h" +#include "label-ellipse.h" +#include "label-image.h" +#include "label-barcode.h" +#include "str-util.h" + +#include "debug.h" + + +static gboolean xml04_parse_media_description (xmlNodePtr node, + glLabel *label); +static void xml04_parse_object (xmlNodePtr node, + glLabelObject *object); +static void xml04_parse_text_props (xmlNodePtr node, + glLabelText *object); +static void xml04_parse_box_props (xmlNodePtr node, + glLabelBox *object); +static void xml04_parse_line_props (xmlNodePtr node, + glLabelLine *object); +static void xml04_parse_ellipse_props (xmlNodePtr node, + glLabelEllipse *object); +static void xml04_parse_image_props (xmlNodePtr node, + glLabelImage *object); +static void xml04_parse_barcode_props (xmlNodePtr node, + glLabelBarcode *object); +static void xml04_parse_merge_properties (xmlNodePtr node, + glLabel *label); + + +/****************************************************************************/ +/* PRIVATE. Parse xml doc structure and create label. */ +/****************************************************************************/ +glLabel *gl_xml_label_04_parse (xmlNodePtr root, + glXMLLabelStatus *status) +{ + glLabel *label; + xmlNodePtr node; + GObject *object; + gboolean rotate_flag; + + gl_debug (DEBUG_XML, "START"); + + *status = XML_LABEL_OK; + + if (!xmlStrEqual (root->name, (xmlChar *)"Label")) { + g_message (_("Bad root node = \"%s\""), root->name); + *status = XML_LABEL_ERROR_OPEN_PARSE; + return NULL; + } + + label = GL_LABEL (gl_label_new ()); + + rotate_flag = lgl_xml_get_prop_boolean (root, "rotate", FALSE); + gl_label_set_rotate_flag (label, rotate_flag); + + for (node = root->xmlChildrenNode; node != NULL; node = node->next) { + + gl_debug (DEBUG_XML, "node name = \"%s\"", node->name); + + if (!xmlNodeIsText (node)) { + if (xmlStrEqual (node->name, (xmlChar *)"Media_Type")) { + if (!xml04_parse_media_description (node, label)) { + *status = XML_LABEL_UNKNOWN_MEDIA; + } + } else if (xmlStrEqual (node->name, (xmlChar *)"Text")) { + object = gl_label_text_new (label); + xml04_parse_object (node, GL_LABEL_OBJECT(object)); + xml04_parse_text_props (node, GL_LABEL_TEXT(object)); + } else if (xmlStrEqual (node->name, (xmlChar *)"Box")) { + object = gl_label_box_new (label); + xml04_parse_object (node, GL_LABEL_OBJECT(object)); + xml04_parse_box_props (node, GL_LABEL_BOX(object)); + } else if (xmlStrEqual (node->name, (xmlChar *)"Line")) { + object = gl_label_line_new (label); + xml04_parse_object (node, GL_LABEL_OBJECT(object)); + xml04_parse_line_props (node, GL_LABEL_LINE(object)); + } else if (xmlStrEqual (node->name, (xmlChar *)"Ellipse")) { + object = gl_label_ellipse_new (label); + xml04_parse_object (node, GL_LABEL_OBJECT(object)); + xml04_parse_ellipse_props (node, + GL_LABEL_ELLIPSE(object)); + } else if (xmlStrEqual (node->name, (xmlChar *)"Image")) { + object = gl_label_image_new (label); + xml04_parse_object (node, GL_LABEL_OBJECT(object)); + xml04_parse_image_props (node, GL_LABEL_IMAGE(object)); + } else if (xmlStrEqual (node->name, (xmlChar *)"Barcode")) { + object = gl_label_barcode_new (label); + xml04_parse_object (node, GL_LABEL_OBJECT(object)); + xml04_parse_barcode_props (node, + GL_LABEL_BARCODE(object)); + } else if (xmlStrEqual (node->name, (xmlChar *)"Merge_Properties")) { + xml04_parse_merge_properties (node, label); + } else { + g_message (_("bad node = \"%s\""), node->name); + } + } + } + + gl_debug (DEBUG_XML, "END"); + + return label; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse Media Description node. */ +/*--------------------------------------------------------------------------*/ +static gboolean +xml04_parse_media_description (xmlNodePtr node, + glLabel *label) +{ + xmlChar *template_name; + lglTemplate *template; + gboolean ret; + + gl_debug (DEBUG_XML, "START"); + + template_name = xmlNodeGetContent (node); + + template = lgl_db_lookup_template_from_name ((gchar *)template_name); + if (template == NULL) { + g_message ("Undefined template \"%s\"", template_name); + /* Get a default */ + template = lgl_db_lookup_template_from_name (NULL); + ret = FALSE; + } else { + ret = TRUE; + } + + gl_label_set_template (label, template); + + lgl_template_free (template); + xmlFree (template_name); + + gl_debug (DEBUG_XML, "END"); + + return ret; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Object Node */ +/*--------------------------------------------------------------------------*/ +static void +xml04_parse_object (xmlNodePtr object_node, + glLabelObject *object) +{ + gdouble x, y; + + gl_debug (DEBUG_XML, "START"); + + x = lgl_xml_get_prop_double (object_node, "x", 0); + y = lgl_xml_get_prop_double (object_node, "y", 0); + + gl_label_object_set_position (object, x, y); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Label->Text Node Properties */ +/*--------------------------------------------------------------------------*/ +static void +xml04_parse_text_props (xmlNodePtr object_node, + glLabelText *object) +{ + xmlChar *font_family; + gdouble font_size; + PangoWeight font_weight; + gboolean font_italic_flag; + glColorNode *color_node; + PangoAlignment align; + xmlNodePtr line_node, text_node; + glTextNode *node_text; + GList *nodes, *lines; + gdouble w, h, x, y; + xmlChar *string; + + gl_debug (DEBUG_XML, "START"); + + font_family = xmlGetProp (object_node, (xmlChar *)"font_family"); + font_size = lgl_xml_get_prop_double (object_node, "font_size", 0); + string = xmlGetProp (object_node, (xmlChar *)"font_weight"); + font_weight = gl_str_util_string_to_weight ((gchar *)string); + xmlFree (string); + font_italic_flag = lgl_xml_get_prop_boolean (object_node, "font_italic", FALSE); + + string = xmlGetProp (object_node, (xmlChar *)"justify"); + align = gl_str_util_string_to_align ((gchar *)string); + xmlFree (string); + + color_node = gl_color_node_new_default (); + color_node->color = lgl_xml_get_prop_uint (object_node, "color", 0); + + gl_label_object_set_font_family (GL_LABEL_OBJECT(object), (gchar *)font_family); + gl_label_object_set_font_size (GL_LABEL_OBJECT(object), font_size); + gl_label_object_set_font_weight (GL_LABEL_OBJECT(object), font_weight); + gl_label_object_set_font_italic_flag (GL_LABEL_OBJECT(object), font_italic_flag); + gl_label_object_set_text_color (GL_LABEL_OBJECT(object), color_node); + gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object), align); + + gl_color_node_free (&color_node); + + lines = NULL; + for (line_node = object_node->xmlChildrenNode; line_node != NULL; + line_node = line_node->next) { + + if (xmlStrEqual (line_node->name, (xmlChar *)"Line")) { + + gl_debug (DEBUG_XML, "->Line node"); + + nodes = NULL; + for (text_node = line_node->xmlChildrenNode; + text_node != NULL; text_node = text_node->next) { + + if (xmlStrEqual (text_node->name, (xmlChar *)"Field")) { + gl_debug (DEBUG_XML, "->Line->Field node"); + node_text = g_new0 (glTextNode, 1); + node_text->field_flag = TRUE; + node_text->data = + (gchar *)xmlGetProp (text_node, (xmlChar *)"name"); + nodes = + g_list_append (nodes, node_text); + } else if (xmlNodeIsText (text_node)) { + gl_debug (DEBUG_XML, "->Line->\"literal\" node"); + node_text = g_new0 (glTextNode, 1); + node_text->field_flag = FALSE; + node_text->data = + (gchar *)xmlNodeGetContent (text_node); + gl_debug (DEBUG_XML, "text = \"%s\"", + node_text->data); + nodes = + g_list_append (nodes, node_text); + } else { + g_message ("Unexpected Text Line child: \"%s\"", + text_node->name); + } + + } + lines = g_list_append (lines, nodes); + + } else if (!xmlNodeIsText (line_node)) { + g_message ("Unexpected Text child: \"%s\"", + line_node->name); + } + + } + + gl_label_text_set_lines (object, lines); + + gl_text_node_lines_free (&lines); + xmlFree (font_family); + + /* Adjust location. In 0.4.x, text was anchored at x,y */ + gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y); + gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); + switch (align) { + case PANGO_ALIGN_LEFT: + /* nothing */ + break; + case PANGO_ALIGN_CENTER: + x -= w/2.0; + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + break; + case PANGO_ALIGN_RIGHT: + x -= w; + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + break; + default: + /* should not happen */ + break; + } + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Label->Box Node Properties */ +/*--------------------------------------------------------------------------*/ +static void +xml04_parse_box_props (xmlNodePtr node, + glLabelBox *object) +{ + gdouble w, h, line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + + gl_debug (DEBUG_XML, "START"); + + w = lgl_xml_get_prop_double (node, "w", 0); + h = lgl_xml_get_prop_double (node, "h", 0); + + line_width = lgl_xml_get_prop_double (node, "line_width", 0); + + line_color_node = gl_color_node_new_default (); + line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); + + fill_color_node = gl_color_node_new_default (); + fill_color_node->color = lgl_xml_get_prop_uint (node, "fill_color", 0); + + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); + gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color_node); + + gl_color_node_free (&line_color_node); + gl_color_node_free (&fill_color_node); + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Label->Line Node Properties */ +/*--------------------------------------------------------------------------*/ +static void +xml04_parse_line_props (xmlNodePtr node, + glLabelLine *object) +{ + gdouble w, h, line_width; + glColorNode *line_color_node; + + gl_debug (DEBUG_XML, "START"); + + w = lgl_xml_get_prop_double (node, "dx", 0); + h = lgl_xml_get_prop_double (node, "dy", 0); + + line_width = lgl_xml_get_prop_double (node, "line_width", 0); + + line_color_node = gl_color_node_new_default (); + line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); + + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); + + gl_color_node_free (&line_color_node); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Label->Ellipse Node Properties */ +/*--------------------------------------------------------------------------*/ +static void +xml04_parse_ellipse_props (xmlNodePtr node, + glLabelEllipse *object) +{ + gdouble w, h, line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + + gl_debug (DEBUG_XML, "START"); + + w = lgl_xml_get_prop_double (node, "w", 0); + h = lgl_xml_get_prop_double (node, "h", 0); + + line_width = lgl_xml_get_prop_double (node, "line_width", 0); + + line_color_node = gl_color_node_new_default (); + line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); + + fill_color_node = gl_color_node_new_default (); + fill_color_node->color = lgl_xml_get_prop_uint (node, "fill_color", 0); + + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); + gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color_node); + + gl_color_node_free (&line_color_node); + gl_color_node_free (&fill_color_node); + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Label->Image Node Properties */ +/*--------------------------------------------------------------------------*/ +static void +xml04_parse_image_props (xmlNodePtr node, + glLabelImage *object) +{ + gdouble w, h; + glTextNode *filename; + + gl_debug (DEBUG_XML, "START"); + + filename = g_new0 (glTextNode, 1); + filename->field_flag = FALSE; + filename->data = (gchar *)xmlGetProp (node, (xmlChar *)"filename"); + gl_label_image_set_filename (object, filename); + gl_text_node_free (&filename); + + w = lgl_xml_get_prop_double (node, "w", 0); + h = lgl_xml_get_prop_double (node, "h", 0); + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Label->Barcode Node Properties */ +/*--------------------------------------------------------------------------*/ +static void +xml04_parse_barcode_props (xmlNodePtr node, + glLabelBarcode *object) +{ + xmlChar *id; + gboolean text_flag; + glColorNode *color_node; + gdouble scale; + xmlNodePtr child; + glTextNode *text_node; + + gl_debug (DEBUG_XML, "START"); + + color_node = gl_color_node_new_default (); + color_node->color = lgl_xml_get_prop_uint (node, "color", 0); + + id = xmlGetProp (node, (xmlChar *)"style"); + + text_flag = lgl_xml_get_prop_boolean (node, "text", FALSE); + scale = lgl_xml_get_prop_double (node, "scale", 1.0); + if (scale == 0.0) { + scale = 0.5; /* Set to a valid value */ + } + gl_label_barcode_set_props (object, (gchar *)id, text_flag, TRUE, 0); + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), color_node); + + child = node->xmlChildrenNode; + text_node = g_new0 (glTextNode, 1); + if (xmlStrEqual (child->name, (xmlChar *)"Field")) { + text_node->field_flag = TRUE; + text_node->data = (gchar *)xmlGetProp (child, (xmlChar *)"name"); + } else if (xmlNodeIsText (child)) { + text_node->field_flag = FALSE; + text_node->data = (gchar *)xmlNodeGetContent (child); + } else { + g_message ("Unexpected Barcode child: \"%s\"", child->name); + } + gl_label_barcode_set_data (object, text_node); + + gl_color_node_free (&color_node); + gl_text_node_free (&text_node); + xmlFree (id); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML merge properties tag. */ +/*--------------------------------------------------------------------------*/ +static void +xml04_parse_merge_properties (xmlNodePtr node, + glLabel *label) +{ + glMerge *merge; + xmlChar *string; + + gl_debug (DEBUG_XML, "START"); + + string = xmlGetProp (node, (xmlChar *)"type"); + merge = gl_merge_new ((gchar *)string); + xmlFree (string); + + string = xmlGetProp (node, (xmlChar *)"src"); + gl_merge_set_src (merge, (gchar *)string); + xmlFree (string); + + gl_label_set_merge (label, merge); + + g_object_unref (G_OBJECT(merge)); + + gl_debug (DEBUG_XML, "END"); +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/xml-label-04.h b/src/xml-label-04.h new file mode 100644 index 00000000..81114815 --- /dev/null +++ b/src/xml-label-04.h @@ -0,0 +1,48 @@ +/* + * xml-label-04.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __XML_LABEL_04_H__ +#define __XML_LABEL_04_H__ + +#include +#include + +#include "xml-label.h" + +G_BEGIN_DECLS + +extern glLabel *gl_xml_label_04_parse (xmlNodePtr root, + glXMLLabelStatus *status); + +G_END_DECLS + + +#endif /* __XML_LABEL_04_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/xml-label.c b/src/xml-label.c new file mode 100644 index 00000000..12aec421 --- /dev/null +++ b/src/xml-label.c @@ -0,0 +1,1833 @@ +/* + * xml-label.c + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#include + +#include "xml-label.h" + +#include +#include +#include +#include +#include +#include + +#include +#include "label.h" +#include "label-object.h" +#include "label-text.h" +#include "label-box.h" +#include "label-line.h" +#include "label-ellipse.h" +#include "label-image.h" +#include "label-barcode.h" +#include "xml-label-04.h" +#include "str-util.h" + +#include "debug.h" + + +/*========================================================*/ +/* Private macros and constants. */ +/*========================================================*/ +#define COMPAT01_NAME_SPACE "http://snaught.com/glabels/0.1/" +#define COMPAT04_NAME_SPACE "http://snaught.com/glabels/0.4/" +#define COMPAT20_NAME_SPACE "http://snaught.com/glabels/2.0/" + + +/*========================================================*/ +/* Private types. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private globals. */ +/*========================================================*/ + + +/*========================================================*/ +/* Private function prototypes. */ +/*========================================================*/ + +static glLabel *xml_doc_to_label (xmlDocPtr doc, + glXMLLabelStatus *status); + +static glLabel *xml_parse_label (xmlNodePtr root, + glXMLLabelStatus *status); + +static void xml_parse_objects (xmlNodePtr node, + glLabel *label); + +static void xml_parse_object_text (xmlNodePtr node, + glLabel *label); + +static void xml_parse_object_box (xmlNodePtr node, + glLabel *label); + +static void xml_parse_object_ellipse (xmlNodePtr node, + glLabel *label); + +static void xml_parse_object_line (xmlNodePtr node, + glLabel *label); + +static void xml_parse_object_image (xmlNodePtr node, + glLabel *label); + +static void xml_parse_object_barcode (xmlNodePtr node, + glLabel *label); + +static void xml_parse_merge_fields (xmlNodePtr node, + glLabel *label); + +static void xml_parse_data (xmlNodePtr node, + glLabel *label); + +static void xml_parse_pixdata (xmlNodePtr node, + glLabel *label); + +static void xml_parse_toplevel_span (xmlNodePtr node, + glLabelObject *object); + +static void xml_parse_affine_attrs (xmlNodePtr node, + glLabelObject *object); + +static void xml_parse_shadow_attrs (xmlNodePtr node, + glLabelObject *object); + +static xmlDocPtr xml_label_to_doc (glLabel *label, + glXMLLabelStatus *status); + +static void xml_create_objects (xmlNodePtr root, + xmlNsPtr ns, + glLabel *label); + +static void xml_create_object_text (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object); + +static void xml_create_object_box (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object); + +static void xml_create_object_line (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object); + +static void xml_create_object_ellipse(xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object); + +static void xml_create_object_image (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object); + +static void xml_create_object_barcode(xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object); + +static void xml_create_merge_fields (xmlNodePtr root, + xmlNsPtr ns, + glLabel *label); + +static void xml_create_data (xmlNodePtr root, + xmlNsPtr ns, + glLabel *label); + +static void xml_create_pixdata (xmlNodePtr root, + xmlNsPtr ns, + glLabel *label, + gchar *name); + +static void xml_create_toplevel_span (xmlNodePtr node, + xmlNsPtr ns, + glLabelText *object_text); + +static void xml_create_affine_attrs (xmlNodePtr node, + glLabelObject *object); + +static void xml_create_shadow_attrs (xmlNodePtr node, + glLabelObject *object); + + +/****************************************************************************/ +/* Open and read label from xml file. */ +/****************************************************************************/ +glLabel * +gl_xml_label_open (const gchar *utf8_filename, + glXMLLabelStatus *status) +{ + xmlDocPtr doc; + glLabel *label; + gchar *filename; + + gl_debug (DEBUG_XML, "START"); + + filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); + g_return_val_if_fail (filename, NULL); + + doc = xmlReadFile (filename, NULL, XML_PARSE_HUGE); + if (!doc) { + g_message (_("xmlParseFile error")); + *status = XML_LABEL_ERROR_OPEN_PARSE; + return NULL; + } + + xmlXIncludeProcess (doc); + xmlReconciliateNs (doc, xmlDocGetRootElement (doc)); + + label = xml_doc_to_label (doc, status); + + xmlFreeDoc (doc); + + if (label) { + gl_label_set_filename (label, utf8_filename); + gl_label_clear_modified (label); + } + + g_free (filename); + gl_debug (DEBUG_XML, "END"); + + return label; +} + + +/****************************************************************************/ +/* Read label from xml buffer. */ +/****************************************************************************/ +glLabel * +gl_xml_label_open_buffer (const gchar *buffer, + glXMLLabelStatus *status) +{ + xmlDocPtr doc; + glLabel *label; + + gl_debug (DEBUG_XML, "START"); + + doc = xmlReadDoc ((xmlChar *) buffer, NULL, NULL, XML_PARSE_HUGE); + if (!doc) { + g_message (_("xmlParseFile error")); + *status = XML_LABEL_ERROR_OPEN_PARSE; + return NULL; + } + + label = xml_doc_to_label (doc, status); + + xmlFreeDoc (doc); + + if (label) { + gl_label_clear_modified (label); + } + + gl_debug (DEBUG_XML, "END"); + + return label; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse xml doc structure and create label. */ +/*--------------------------------------------------------------------------*/ +static glLabel * +xml_doc_to_label (xmlDocPtr doc, + glXMLLabelStatus *status) +{ + xmlNodePtr root; + glLabel *label; + + gl_debug (DEBUG_XML, "START"); + + LIBXML_TEST_VERSION; + + *status = XML_LABEL_OK; + + root = xmlDocGetRootElement (doc); + if (!root || !root->name) { + g_message (_("No document root")); + *status = XML_LABEL_ERROR_OPEN_PARSE; + return NULL; + } + + /* Try compatability mode 0.1 */ + if (xmlSearchNsByHref (doc, root, (xmlChar *)COMPAT01_NAME_SPACE)) + { + g_message (_("Importing from glabels 0.1 format")); + g_message ("TODO"); + label = NULL; /* TODO */ + return label; + } + + /* Try compatability mode 0.4 */ + if (xmlSearchNsByHref (doc, root, (xmlChar *)COMPAT04_NAME_SPACE)) + { + g_message (_("Importing from glabels 0.4 format")); + label = gl_xml_label_04_parse (root, status); + return label; + } + + /* Test for current namespaces. */ + if ( !xmlSearchNsByHref (doc, root, (xmlChar *)COMPAT20_NAME_SPACE) && + !xmlSearchNsByHref (doc, root, (xmlChar *)LGL_XML_NAME_SPACE) ) + { + g_message (_("Unknown glabels Namespace -- Using %s"), + LGL_XML_NAME_SPACE); + } + + label = xml_parse_label (root, status); + if (label) + { + gl_label_set_compression (label, xmlGetDocCompressMode (doc)); + } + + gl_debug (DEBUG_XML, "END"); + + return label; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse xml root node and create label. */ +/*--------------------------------------------------------------------------*/ +static glLabel * +xml_parse_label (xmlNodePtr root, + glXMLLabelStatus *status) +{ + xmlNodePtr child_node; + glLabel *label; + lglTemplate *template; + + gl_debug (DEBUG_XML, "START"); + + *status = XML_LABEL_OK; + + if (!lgl_xml_is_node (root, "Glabels-document")) { + g_message (_("Bad root node = \"%s\""), root->name); + *status = XML_LABEL_ERROR_OPEN_PARSE; + return NULL; + } + + label = GL_LABEL(gl_label_new ()); + + /* Pass 1, extract data nodes to pre-load cache. */ + for (child_node = root->xmlChildrenNode; child_node != NULL; child_node = child_node->next) { + if (lgl_xml_is_node (child_node, "Data")) { + xml_parse_data (child_node, label); + } + } + + /* Pass 2, now extract everything else. */ + for (child_node = root->xmlChildrenNode; + child_node != NULL; + child_node = child_node->next) { + + if (lgl_xml_is_node (child_node, "Template")) { + template = lgl_xml_template_parse_template_node (child_node); + if (!template) { + g_object_unref (label); + *status = XML_LABEL_UNKNOWN_MEDIA; + return NULL; + } + lgl_db_register_template (template); + gl_label_set_template (label, template); + lgl_template_free (template); + } else if (lgl_xml_is_node (child_node, "Objects")) { + xml_parse_objects (child_node, label); + } else if (lgl_xml_is_node (child_node, "Merge")) { + xml_parse_merge_fields (child_node, label); + } else if (lgl_xml_is_node (child_node, "Data")) { + /* Handled in pass 1. */ + } else { + if (!xmlNodeIsText (child_node)) { + g_message (_("bad node in Document node = \"%s\""), + child_node->name); + g_object_unref (label); + *status = XML_LABEL_ERROR_OPEN_PARSE; + return NULL; + } + } + } + + gl_debug (DEBUG_XML, "END"); + + return label; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse Objects node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_objects (xmlNodePtr node, + glLabel *label) +{ + gboolean rotate_flag; + xmlNodePtr child; + + gl_debug (DEBUG_XML, "START"); + + rotate_flag = lgl_xml_get_prop_boolean (node, "rotate", FALSE); + gl_label_set_rotate_flag (label, rotate_flag); + + for (child = node->xmlChildrenNode; child != NULL; child = child->next) { + + if (lgl_xml_is_node (child, "Object-text")) { + xml_parse_object_text (child, label); + } else if (lgl_xml_is_node (child, "Object-box")) { + xml_parse_object_box (child, label); + } else if (lgl_xml_is_node (child, "Object-ellipse")) { + xml_parse_object_ellipse (child, label); + } else if (lgl_xml_is_node (child, "Object-line")) { + xml_parse_object_line (child, label); + } else if (lgl_xml_is_node (child, "Object-image")) { + xml_parse_object_image (child, label); + } else if (lgl_xml_is_node (child, "Object-barcode")) { + xml_parse_object_barcode (child, label); + } else { + if (!xmlNodeIsText (child)) { + g_message (_("bad node = \"%s\""), child->name); + break; + } + } + } + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Objects->Object-text Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_object_text (xmlNodePtr node, + glLabel *label) +{ + GObject *object; + gdouble x, y; + gdouble w, h; + gchar *string; + PangoAlignment align; + gboolean auto_shrink; + xmlNodePtr child; + + gl_debug (DEBUG_XML, "START"); + + object = gl_label_text_new (label); + + /* position attrs */ + x = lgl_xml_get_prop_length (node, "x", 0.0); + y = lgl_xml_get_prop_length (node, "y", 0.0); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + + /* implied size attrs */ + w = lgl_xml_get_prop_length (node, "w", 0); + h = lgl_xml_get_prop_length (node, "h", 0); + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + + /* justify attr */ + string = lgl_xml_get_prop_string (node, "justify", NULL); + align = gl_str_util_string_to_align (string); + g_free (string); + gl_label_object_set_text_alignment (GL_LABEL_OBJECT(object), align); + + /* auto_shrink attr */ + auto_shrink = lgl_xml_get_prop_boolean (node, "auto_shrink", FALSE); + gl_label_text_set_auto_shrink (GL_LABEL_TEXT(object), auto_shrink); + + /* affine attrs */ + xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); + + /* shadow attrs */ + xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); + + /* Process children */ + for (child = node->xmlChildrenNode; child != NULL; child = child->next) { + if (lgl_xml_is_node (child, "Span")) { + xml_parse_toplevel_span (child, GL_LABEL_OBJECT(object)); + break; + } else { + if (!xmlNodeIsText (child)) { + g_message ("Unexpected Object-text child: \"%s\"", + child->name); + } + } + } + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Objects->Object-box Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_object_box (xmlNodePtr node, + glLabel *label) +{ + GObject *object; + gdouble x, y; + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + gchar *string; + glColorNode *fill_color_node; + + gl_debug (DEBUG_XML, "START"); + + object = gl_label_box_new (label); + + /* position attrs */ + x = lgl_xml_get_prop_length (node, "x", 0.0); + y = lgl_xml_get_prop_length (node, "y", 0.0); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + + /* size attrs */ + w = lgl_xml_get_prop_length (node, "w", 0); + h = lgl_xml_get_prop_length (node, "h", 0); + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + + /* line attrs */ + line_width = lgl_xml_get_prop_length (node, "line_width", 1.0); + gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); + + line_color_node = gl_color_node_new_default (); + string = lgl_xml_get_prop_string (node, "line_color_field", NULL); + if ( string ) { + line_color_node->field_flag = TRUE; + line_color_node->key = string; + } else { + line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); + } + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); + gl_color_node_free (&line_color_node); + + + /* fill attrs */ + fill_color_node = gl_color_node_new_default (); + string = lgl_xml_get_prop_string (node, "fill_color_field", NULL); + if ( string ) { + fill_color_node->field_flag = TRUE; + fill_color_node->key = string; + } else { + fill_color_node->color = lgl_xml_get_prop_uint (node, "fill_color", 0); + } + gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color_node); + gl_color_node_free (&fill_color_node); + + /* affine attrs */ + xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); + + /* shadow attrs */ + xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Objects->Object-ellipse Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_object_ellipse (xmlNodePtr node, + glLabel *label) +{ + GObject *object; + gdouble x, y; + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + gchar *string; + glColorNode *fill_color_node; + + gl_debug (DEBUG_XML, "START"); + + object = gl_label_ellipse_new (label); + + /* position attrs */ + x = lgl_xml_get_prop_length (node, "x", 0.0); + y = lgl_xml_get_prop_length (node, "y", 0.0); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + + /* size attrs */ + w = lgl_xml_get_prop_length (node, "w", 0); + h = lgl_xml_get_prop_length (node, "h", 0); + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + + /* line attrs */ + line_width = lgl_xml_get_prop_length (node, "line_width", 1.0); + gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); + + line_color_node = gl_color_node_new_default (); + string = lgl_xml_get_prop_string (node, "line_color_field", NULL); + if ( string ) { + line_color_node->field_flag = TRUE; + line_color_node->key = string; + } else { + line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); + } + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); + gl_color_node_free (&line_color_node); + + + /* fill attrs */ + fill_color_node = gl_color_node_new_default (); + string = lgl_xml_get_prop_string (node, "fill_color_field", NULL); + if ( string ) { + fill_color_node->field_flag = TRUE; + fill_color_node->key = string; + } else { + fill_color_node->color = lgl_xml_get_prop_uint (node, "fill_color", 0); + } + gl_label_object_set_fill_color (GL_LABEL_OBJECT(object), fill_color_node); + gl_color_node_free (&fill_color_node); + + /* affine attrs */ + xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); + + /* shadow attrs */ + xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Objects->Object-line Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_object_line (xmlNodePtr node, + glLabel *label) +{ + GObject *object; + gdouble x, y; + gdouble dx, dy; + gdouble line_width; + glColorNode *line_color_node; + gchar *string; + + gl_debug (DEBUG_XML, "START"); + + object = gl_label_line_new (label); + + /* position attrs */ + x = lgl_xml_get_prop_length (node, "x", 0.0); + y = lgl_xml_get_prop_length (node, "y", 0.0); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + + /* length attrs */ + dx = lgl_xml_get_prop_length (node, "dx", 0); + dy = lgl_xml_get_prop_length (node, "dy", 0); + gl_label_object_set_size (GL_LABEL_OBJECT(object), dx, dy); + + /* line attrs */ + line_width = lgl_xml_get_prop_length (node, "line_width", 1.0); + gl_label_object_set_line_width (GL_LABEL_OBJECT(object), line_width); + + line_color_node = gl_color_node_new_default (); + string = lgl_xml_get_prop_string (node, "line_color_field", NULL); + if ( string ) { + line_color_node->field_flag = TRUE; + line_color_node->key = string; + } else { + line_color_node->color = lgl_xml_get_prop_uint (node, "line_color", 0); + } + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), line_color_node); + gl_color_node_free (&line_color_node); + + /* affine attrs */ + xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); + + /* shadow attrs */ + xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Objects->Object-image Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_object_image (xmlNodePtr node, + glLabel *label) +{ + GObject *object; + gdouble x, y; + gdouble w, h; + gchar *string; + glTextNode *filename; + + gl_debug (DEBUG_XML, "START"); + + object = gl_label_image_new (label); + + /* position attrs */ + x = lgl_xml_get_prop_length (node, "x", 0.0); + y = lgl_xml_get_prop_length (node, "y", 0.0); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + + /* src or field attr */ + string = lgl_xml_get_prop_string (node, "src", NULL); + if ( string ) { + filename = g_new0 (glTextNode, 1); + filename->field_flag = FALSE; + filename->data = g_strdup ((gchar *)string); + gl_label_image_set_filename (GL_LABEL_IMAGE(object), filename); + gl_text_node_free (&filename); + xmlFree (string); + } else { + string = lgl_xml_get_prop_string (node, "field", NULL); + if ( string ) { + filename = g_new0 (glTextNode, 1); + filename->field_flag = TRUE; + filename->data = g_strdup ((gchar *)string); + gl_label_image_set_filename (GL_LABEL_IMAGE(object), filename); + gl_text_node_free (&filename); + xmlFree (string); + } else { + g_message ("Missing Object-image src or field attr"); + } + } + + /* size attrs */ + w = lgl_xml_get_prop_length (node, "w", 0); + h = lgl_xml_get_prop_length (node, "h", 0); + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + + /* affine attrs */ + xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); + + /* shadow attrs */ + xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML Objects->Object-barcode Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_object_barcode (xmlNodePtr node, + glLabel *label) +{ + GObject *object; + gdouble x, y; + gdouble w, h; + gchar *string; + glTextNode *text_node; + gchar *id; + gboolean text_flag; + gboolean checksum_flag; + glColorNode *color_node; + guint format_digits; + + gl_debug (DEBUG_XML, "START"); + + object = gl_label_barcode_new (label); + + /* position attrs */ + x = lgl_xml_get_prop_length (node, "x", 0.0); + y = lgl_xml_get_prop_length (node, "y", 0.0); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + + /* size attrs */ + w = lgl_xml_get_prop_length (node, "w", 0); + h = lgl_xml_get_prop_length (node, "h", 0); + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + + /* prop attrs */ + id = lgl_xml_get_prop_string (node, "style", NULL); + text_flag = lgl_xml_get_prop_boolean (node, "text", FALSE); + checksum_flag = lgl_xml_get_prop_boolean (node, "checksum", TRUE); + format_digits = lgl_xml_get_prop_uint (node, "format", 10); + gl_label_barcode_set_props (GL_LABEL_BARCODE(object), + (gchar *)id, text_flag, checksum_flag, format_digits); + g_free (id); + + color_node = gl_color_node_new_default (); + string = lgl_xml_get_prop_string (node, "color_field", NULL); + if ( string ) { + color_node->field_flag = TRUE; + color_node->key = string; + } else { + color_node->color = lgl_xml_get_prop_uint (node, "color", 0); + } + gl_label_object_set_line_color (GL_LABEL_OBJECT(object), color_node); + gl_color_node_free (&color_node); + + /* data or field attr */ + string = lgl_xml_get_prop_string (node, "data", NULL); + if ( string ) { + text_node = g_new0 (glTextNode, 1); + text_node->field_flag = FALSE; + text_node->data = string; + gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node); + gl_text_node_free (&text_node); + } else { + string = lgl_xml_get_prop_string (node, "field", NULL); + if ( string ) { + text_node = g_new0 (glTextNode, 1); + text_node->field_flag = TRUE; + text_node->data = string; + gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node); + gl_text_node_free (&text_node); + } else { + g_message ("Missing Object-barcode data or field attr"); + } + } + + /* affine attrs */ + xml_parse_affine_attrs (node, GL_LABEL_OBJECT(object)); + + /* shadow attrs */ + xml_parse_shadow_attrs (node, GL_LABEL_OBJECT(object)); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML merge fields tag. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_merge_fields (xmlNodePtr node, + glLabel *label) +{ + gchar *string; + glMerge *merge; + + gl_debug (DEBUG_XML, "START"); + + string = lgl_xml_get_prop_string (node, "type", NULL); + merge = gl_merge_new (string); + g_free (string); + + string = lgl_xml_get_prop_string (node, "src", NULL); + gl_merge_set_src (merge, string); + g_free (string); + + gl_label_set_merge (label, merge); + + g_object_unref (G_OBJECT(merge)); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML data tag. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_data (xmlNodePtr node, + glLabel *label) +{ + xmlNodePtr child; + + gl_debug (DEBUG_XML, "START"); + + for (child = node->xmlChildrenNode; child != NULL; child = child->next) { + + if (lgl_xml_is_node (child, "Pixdata")) { + xml_parse_pixdata (child, label); + } else { + if (!xmlNodeIsText (child)) { + g_message (_("bad node in Data node = \"%s\""), + child->name); + } + } + } + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse XML pixbuf data tag. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_pixdata (xmlNodePtr node, + glLabel *label) +{ + gchar *name, *base64; + guchar *stream; + gsize stream_length; + gboolean ret; + GdkPixdata *pixdata; + GdkPixbuf *pixbuf; + GHashTable *pixbuf_cache; + + gl_debug (DEBUG_XML, "START"); + + name = lgl_xml_get_prop_string (node, "name", NULL); + base64 = lgl_xml_get_node_content (node); + + stream = g_base64_decode ((gchar *)base64, &stream_length); + pixdata = g_new0 (GdkPixdata, 1); + ret = gdk_pixdata_deserialize (pixdata, stream_length, stream, NULL); + + if (ret) { + pixbuf = gdk_pixbuf_from_pixdata (pixdata, TRUE, NULL); + + pixbuf_cache = gl_label_get_pixbuf_cache (label); + gl_pixbuf_cache_add_pixbuf (pixbuf_cache, (gchar *)name, pixbuf); + } + + g_free (name); + g_free (base64); + + g_free (stream); + g_free (pixdata); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse top-level Span tag. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_toplevel_span (xmlNodePtr node, + glLabelObject *object) +{ + gchar *font_family; + gdouble font_size; + PangoWeight font_weight; + gboolean font_italic_flag; + glColorNode *color_node; + gdouble text_line_spacing; + gchar *string; + GList *lines, *text_nodes; + xmlNodePtr child; + glTextNode *text_node; + + gl_debug (DEBUG_XML, "START"); + + /* Font family attr */ + font_family = lgl_xml_get_prop_string (node, "font_family", "Sans"); + gl_label_object_set_font_family (object, font_family); + g_free (font_family); + + /* Font size attr */ + font_size = lgl_xml_get_prop_double (node, "font_size", 0.0); + gl_label_object_set_font_size (object, font_size); + + /* Font weight attr */ + string = lgl_xml_get_prop_string (node, "font_weight", NULL); + font_weight = gl_str_util_string_to_weight (string); + g_free (string); + gl_label_object_set_font_weight (object, font_weight); + + /* Font italic flag attr */ + font_italic_flag = lgl_xml_get_prop_boolean (node, "font_italic", FALSE); + gl_label_object_set_font_italic_flag (object, font_italic_flag); + + /* Text color attr */ + color_node = gl_color_node_new_default (); + string = lgl_xml_get_prop_string (node, "color_field", NULL); + if ( string ) { + color_node->field_flag = TRUE; + color_node->key = string; + } else { + color_node->color = lgl_xml_get_prop_uint (node, "color", 0); + } + gl_label_object_set_text_color (object, color_node); + gl_color_node_free (&color_node); + + + /* Text line spacing attr */ + text_line_spacing = lgl_xml_get_prop_double (node, "line_spacing", 1.0); + gl_label_object_set_text_line_spacing (object, text_line_spacing); + + /* Now descend children, and build lines of text nodes */ + lines = NULL; + text_nodes = NULL; + for (child = node->xmlChildrenNode; child != NULL; child = child->next) { + + if (xmlNodeIsText (child)) { + gchar *data = lgl_xml_get_node_content (child); + + /* Hack: if the first char is LF, it's an xml formatting string */ + if (data[0] != '\n') { + /* Literal text */ + text_node = g_new0 (glTextNode, 1); + text_node->field_flag = FALSE; + text_node->data = g_strdup ((gchar *)data); + text_nodes = g_list_append (text_nodes, text_node); + } + g_free (data); + + } else if (lgl_xml_is_node (child, "Span")) { + + g_message ("Unexpected rich text (not supported, yet!)"); + + } else if (lgl_xml_is_node (child, "Field")) { + + /* Field node */ + string = lgl_xml_get_prop_string (child, "name", NULL); + text_node = g_new0 (glTextNode, 1); + text_node->field_flag = TRUE; + text_node->data = string; + text_nodes = g_list_append (text_nodes, text_node); + + } else if (lgl_xml_is_node (child, "NL")) { + + /* Store line. */ + lines = g_list_append (lines, text_nodes); + text_nodes = NULL; + + } else { + g_message ("Unexpected Span child: \"%s\"", child->name); + } + + } + if ( text_nodes ) { + /* Store last line. */ + lines = g_list_append (lines, text_nodes); + text_nodes = NULL; + } + gl_label_text_set_lines (GL_LABEL_TEXT(object), lines); + gl_text_node_lines_free (&lines); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse affine attributes. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_affine_attrs (xmlNodePtr node, + glLabelObject *object) +{ + gdouble a[6]; + cairo_matrix_t matrix; + + a[0] = lgl_xml_get_prop_double (node, "a0", 0.0); + a[1] = lgl_xml_get_prop_double (node, "a1", 0.0); + a[2] = lgl_xml_get_prop_double (node, "a2", 0.0); + a[3] = lgl_xml_get_prop_double (node, "a3", 0.0); + a[4] = lgl_xml_get_prop_double (node, "a4", 0.0); + a[5] = lgl_xml_get_prop_double (node, "a5", 0.0); + + cairo_matrix_init (&matrix, a[0], a[1], a[2], a[3], a[4], a[5]); + + gl_label_object_set_matrix (object, &matrix); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Parse shadow attributes. */ +/*--------------------------------------------------------------------------*/ +static void +xml_parse_shadow_attrs (xmlNodePtr node, + glLabelObject *object) +{ + gboolean shadow_state; + gdouble shadow_x; + gdouble shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + gchar *string; + + shadow_state = lgl_xml_get_prop_boolean (node, "shadow", FALSE); + gl_label_object_set_shadow_state (object, shadow_state); + + if (shadow_state) + { + shadow_x = lgl_xml_get_prop_length (node, "shadow_x", 0.0); + shadow_y = lgl_xml_get_prop_length (node, "shadow_y", 0.0); + gl_label_object_set_shadow_offset (object, shadow_x, shadow_y); + + shadow_color_node = gl_color_node_new_default (); + string = lgl_xml_get_prop_string (node, "shadow_color_field", NULL); + if ( string ) { + shadow_color_node->field_flag = TRUE; + shadow_color_node->key = string; + } else { + shadow_color_node->color = lgl_xml_get_prop_uint (node, "shadow_color", 0); + } + gl_label_object_set_shadow_color (object, shadow_color_node); + gl_color_node_free (&shadow_color_node); + + shadow_opacity = lgl_xml_get_prop_double (node, "shadow_opacity", 1.0); + gl_label_object_set_shadow_opacity (object, shadow_opacity); + } +} + + +/****************************************************************************/ +/* Save label to xml label file. */ +/****************************************************************************/ +void +gl_xml_label_save (glLabel *label, + const gchar *utf8_filename, + glXMLLabelStatus *status) +{ + xmlDocPtr doc; + gint xml_ret; + gchar *filename; + + gl_debug (DEBUG_XML, "START"); + + doc = xml_label_to_doc (label, status); + + filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); + if (!filename) + g_message (_("Utf8 conversion error.")); + else { + xmlSetDocCompressMode (doc, gl_label_get_compression (label)); + xml_ret = xmlSaveFormatFile (filename, doc, TRUE); + xmlFreeDoc (doc); + if (xml_ret == -1) { + + g_message (_("Problem saving xml file.")); + *status = XML_LABEL_ERROR_SAVE_FILE; + + } else { + + gl_label_set_filename (label, utf8_filename); + gl_label_clear_modified (label); + + } + g_free (filename); + } + + gl_debug (DEBUG_XML, "END"); +} + + +/****************************************************************************/ +/* Save label to xml buffer. */ +/****************************************************************************/ +gchar * +gl_xml_label_save_buffer (glLabel *label, + glXMLLabelStatus *status) +{ + xmlDocPtr doc; + gint size; + guchar *buffer; + + gl_debug (DEBUG_XML, "START"); + + doc = xml_label_to_doc (label, status); + + xmlDocDumpMemory (doc, &buffer, &size); + xmlFreeDoc (doc); + + gl_label_clear_modified (label); + + gl_debug (DEBUG_XML, "END"); + + return (gchar *)buffer; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Convert label to xml doc structure. */ +/*--------------------------------------------------------------------------*/ +static xmlDocPtr +xml_label_to_doc (glLabel *label, + glXMLLabelStatus *status) +{ + xmlDocPtr doc; + xmlNsPtr ns; + glMerge *merge; + + gl_debug (DEBUG_XML, "START"); + + LIBXML_TEST_VERSION; + + doc = xmlNewDoc ((xmlChar *)"1.0"); + doc->xmlRootNode = xmlNewDocNode (doc, NULL, (xmlChar *)"Glabels-document", NULL); + + ns = xmlNewNs (doc->xmlRootNode, (xmlChar *)LGL_XML_NAME_SPACE, NULL); + xmlSetNs (doc->xmlRootNode, ns); + + lgl_xml_template_create_template_node (label->template, doc->xmlRootNode, ns); + + xml_create_objects (doc->xmlRootNode, ns, label); + + merge = gl_label_get_merge (label); + gl_debug (DEBUG_XML, "merge=%p", merge); + if (merge != NULL) { + xml_create_merge_fields (doc->xmlRootNode, ns, label); + g_object_unref (G_OBJECT(merge)); + } + + xml_create_data (doc->xmlRootNode, ns, label); + + gl_debug (DEBUG_XML, "END"); + + *status = XML_LABEL_OK; + return doc; +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Objects Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_objects (xmlNodePtr root, + xmlNsPtr ns, + glLabel *label) +{ + xmlNodePtr node; + GList *p; + glLabelObject *object; + + gl_debug (DEBUG_XML, "START"); + + node = xmlNewChild (root, ns, (xmlChar *)"Objects", NULL); + lgl_xml_set_prop_string (node, "id", "0"); + lgl_xml_set_prop_boolean (node, "rotate", label->rotate_flag); + + for (p = label->objects; p != NULL; p = p->next) { + + object = GL_LABEL_OBJECT(p->data); + + if ( GL_IS_LABEL_TEXT(object) ) { + xml_create_object_text (node, ns, object); + } else if ( GL_IS_LABEL_BOX(object) ) { + xml_create_object_box (node, ns, object); + } else if ( GL_IS_LABEL_ELLIPSE(object) ) { + xml_create_object_ellipse (node, ns, object); + } else if ( GL_IS_LABEL_LINE(object) ) { + xml_create_object_line (node, ns, object); + } else if ( GL_IS_LABEL_IMAGE(object) ) { + xml_create_object_image (node, ns, object); + } else if ( GL_IS_LABEL_BARCODE(object) ) { + xml_create_object_barcode (node, ns, object); + } else { + g_message ("Unknown label object"); + } + + } + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Objects->Object-text Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_object_text (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object) +{ + xmlNodePtr node; + gdouble x, y; + gdouble w, h; + PangoAlignment align; + gboolean auto_shrink; + + gl_debug (DEBUG_XML, "START"); + + node = xmlNewChild (root, ns, (xmlChar *)"Object-text", NULL); + + /* position attrs */ + gl_label_object_get_position (object, &x, &y); + lgl_xml_set_prop_length (node, "x", x); + lgl_xml_set_prop_length (node, "y", y); + + /* size attrs */ + gl_label_object_get_raw_size ( object, &w, &h); + lgl_xml_set_prop_length (node, "w", w); + lgl_xml_set_prop_length (node, "h", h); + + /* justify attr */ + align = gl_label_object_get_text_alignment (object); + lgl_xml_set_prop_string (node, "justify", gl_str_util_align_to_string (align)); + + /* auto_shrink attr */ + auto_shrink = gl_label_text_get_auto_shrink (GL_LABEL_TEXT (object)); + lgl_xml_set_prop_boolean (node, "auto_shrink", auto_shrink); + + /* affine attrs */ + xml_create_affine_attrs (node, object); + + /* shadow attrs */ + xml_create_shadow_attrs (node, object); + + /* Add children */ + xml_create_toplevel_span (node, ns, GL_LABEL_TEXT(object)); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Objects->Object-box Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_object_box (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object) +{ + xmlNodePtr node; + gdouble x, y; + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + + gl_debug (DEBUG_XML, "START"); + + node = xmlNewChild (root, ns, (xmlChar *)"Object-box", NULL); + + /* position attrs */ + gl_label_object_get_position (object, &x, &y); + lgl_xml_set_prop_length (node, "x", x); + lgl_xml_set_prop_length (node, "y", y); + + /* size attrs */ + gl_label_object_get_size (object, &w, &h); + lgl_xml_set_prop_length (node, "w", w); + lgl_xml_set_prop_length (node, "h", h); + + /* line attrs */ + line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); + lgl_xml_set_prop_length (node, "line_width", line_width); + + line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); + if (line_color_node->field_flag) + { + lgl_xml_set_prop_string (node, "line_color_field", line_color_node->key); + } + else + { + lgl_xml_set_prop_uint_hex (node, "line_color", line_color_node->color); + } + gl_color_node_free (&line_color_node); + + /* fill attrs (color or field) */ + fill_color_node = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object)); + if (fill_color_node->field_flag) + { + lgl_xml_set_prop_string (node, "fill_color_field", fill_color_node->key); + } + else + { + lgl_xml_set_prop_uint_hex (node, "fill_color", fill_color_node->color); + } + gl_color_node_free (&fill_color_node); + + /* affine attrs */ + xml_create_affine_attrs (node, object); + + /* shadow attrs */ + xml_create_shadow_attrs (node, object); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Objects->Object-ellipse Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_object_ellipse (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object) +{ + xmlNodePtr node; + gdouble x, y; + gdouble w, h; + gdouble line_width; + glColorNode *line_color_node; + glColorNode *fill_color_node; + + gl_debug (DEBUG_XML, "START"); + + node = xmlNewChild (root, ns, (xmlChar *)"Object-ellipse", NULL); + + /* position attrs */ + gl_label_object_get_position (object, &x, &y); + lgl_xml_set_prop_length (node, "x", x); + lgl_xml_set_prop_length (node, "y", y); + + /* size attrs */ + gl_label_object_get_size (object, &w, &h); + lgl_xml_set_prop_length (node, "w", w); + lgl_xml_set_prop_length (node, "h", h); + + /* line attrs */ + line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); + lgl_xml_set_prop_length (node, "line_width", line_width); + + line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); + if (line_color_node->field_flag) + { + lgl_xml_set_prop_string (node, "line_color_field", line_color_node->key); + } + else + { + lgl_xml_set_prop_uint_hex (node, "line_color", line_color_node->color); + } + gl_color_node_free (&line_color_node); + + + /* fill attrs (color or field) */ + fill_color_node = gl_label_object_get_fill_color (GL_LABEL_OBJECT(object)); + if (fill_color_node->field_flag) + { + lgl_xml_set_prop_string (node, "fill_color_field", fill_color_node->key); + } + else + { + lgl_xml_set_prop_uint_hex (node, "fill_color", fill_color_node->color); + } + gl_color_node_free (&fill_color_node); + + /* affine attrs */ + xml_create_affine_attrs (node, object); + + /* shadow attrs */ + xml_create_shadow_attrs (node, object); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Objects->Object-line Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_object_line (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object) +{ + xmlNodePtr node; + gdouble x, y; + gdouble dx, dy; + gdouble line_width; + glColorNode *line_color_node; + + gl_debug (DEBUG_XML, "START"); + + node = xmlNewChild (root, ns, (xmlChar *)"Object-line", NULL); + + /* position attrs */ + gl_label_object_get_position (object, &x, &y); + lgl_xml_set_prop_length (node, "x", x); + lgl_xml_set_prop_length (node, "y", y); + + /* length attrs */ + gl_label_object_get_size (object, &dx, &dy); + lgl_xml_set_prop_length (node, "dx", dx); + lgl_xml_set_prop_length (node, "dy", dy); + + /* line attrs */ + line_width = gl_label_object_get_line_width (GL_LABEL_OBJECT(object)); + lgl_xml_set_prop_length (node, "line_width", line_width); + + line_color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); + if (line_color_node->field_flag) + { + lgl_xml_set_prop_string (node, "line_color_field", line_color_node->key); + } + else + { + lgl_xml_set_prop_uint_hex (node, "line_color", line_color_node->color); + } + gl_color_node_free (&line_color_node); + + + /* affine attrs */ + xml_create_affine_attrs (node, object); + + /* shadow attrs */ + xml_create_shadow_attrs (node, object); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Objects->Object-image Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_object_image (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object) +{ + xmlNodePtr node; + gdouble x, y; + gdouble w, h; + glTextNode *filename; + + gl_debug (DEBUG_XML, "START"); + + node = xmlNewChild (root, ns, (xmlChar *)"Object-image", NULL); + + /* position attrs */ + gl_label_object_get_position (object, &x, &y); + lgl_xml_set_prop_length (node, "x", x); + lgl_xml_set_prop_length (node, "y", y); + + /* size attrs */ + gl_label_object_get_size (object, &w, &h); + lgl_xml_set_prop_length (node, "w", w); + lgl_xml_set_prop_length (node, "h", h); + + /* src OR field attr */ + filename = gl_label_image_get_filename (GL_LABEL_IMAGE(object)); + if (filename->field_flag) { + lgl_xml_set_prop_string (node, "field", filename->data); + } else { + lgl_xml_set_prop_string (node, "src", filename->data); + } + gl_text_node_free (&filename); + + /* affine attrs */ + xml_create_affine_attrs (node, object); + + /* shadow attrs */ + xml_create_shadow_attrs (node, object); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Objects->Object-barcode Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_object_barcode (xmlNodePtr root, + xmlNsPtr ns, + glLabelObject *object) +{ + xmlNodePtr node; + gdouble x, y; + gdouble w, h; + glTextNode *text_node; + gchar *id; + gboolean text_flag; + gboolean checksum_flag; + glColorNode *color_node; + guint format_digits; + + gl_debug (DEBUG_XML, "START"); + + node = xmlNewChild (root, ns, (xmlChar *)"Object-barcode", NULL); + + /* position attrs */ + gl_label_object_get_position (object, &x, &y); + lgl_xml_set_prop_length (node, "x", x); + lgl_xml_set_prop_length (node, "y", y); + + /* size attrs */ + gl_label_object_get_raw_size (object, &w, &h); + lgl_xml_set_prop_length (node, "w", w); + lgl_xml_set_prop_length (node, "h", h); + + /* Barcode properties attrs */ + gl_label_barcode_get_props (GL_LABEL_BARCODE(object), + &id, &text_flag, &checksum_flag, &format_digits); + lgl_xml_set_prop_string (node, "style", id); + lgl_xml_set_prop_boolean (node, "text", text_flag); + lgl_xml_set_prop_boolean (node, "checksum", checksum_flag); + + g_free (id); + + color_node = gl_label_object_get_line_color (GL_LABEL_OBJECT(object)); + if (color_node->field_flag) + { + lgl_xml_set_prop_string (node, "color_field", color_node->key); + } + else + { + lgl_xml_set_prop_uint_hex (node, "color", color_node->color); + } + gl_color_node_free (&color_node); + + + /* data OR field attr */ + text_node = gl_label_barcode_get_data (GL_LABEL_BARCODE(object)); + if (text_node->field_flag) { + lgl_xml_set_prop_string (node, "field", text_node->data); + lgl_xml_set_prop_int (node, "format", format_digits); + } else { + lgl_xml_set_prop_string (node, "data", text_node->data); + } + gl_text_node_free (&text_node); + + /* affine attrs */ + xml_create_affine_attrs (node, object); + + /* shadow attrs */ + xml_create_shadow_attrs (node, object); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Label Merge Fields Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_merge_fields (xmlNodePtr root, + xmlNsPtr ns, + glLabel *label) +{ + xmlNodePtr node; + gchar *string; + glMerge *merge; + + gl_debug (DEBUG_XML, "START"); + + merge = gl_label_get_merge (label); + + node = xmlNewChild (root, ns, (xmlChar *)"Merge", NULL); + + string = gl_merge_get_name (merge); + lgl_xml_set_prop_string (node, "type", string); + g_free (string); + + string = gl_merge_get_src (merge); + lgl_xml_set_prop_string (node, "src", string); + g_free (string); + + g_object_unref (G_OBJECT(merge)); + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Label Data Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_data (xmlNodePtr root, + xmlNsPtr ns, + glLabel *label) +{ + xmlNodePtr node; + GList *name_list, *p; + GHashTable *pixbuf_cache; + + gl_debug (DEBUG_XML, "START"); + + node = xmlNewChild (root, ns, (xmlChar *)"Data", NULL); + + pixbuf_cache = gl_label_get_pixbuf_cache (label); + name_list = gl_pixbuf_cache_get_name_list (pixbuf_cache); + + for (p = name_list; p != NULL; p=p->next) { + xml_create_pixdata (node, ns, label, p->data); + } + + gl_pixbuf_cache_free_name_list (name_list); + + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Add XML Label Data Pixbuf Node */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_pixdata (xmlNodePtr root, + xmlNsPtr ns, + glLabel *label, + gchar *name) +{ + xmlNodePtr node; + GHashTable *pixbuf_cache; + GdkPixbuf *pixbuf; + GdkPixdata *pixdata; + guchar *stream; + guint stream_length; + gchar *base64; + + gl_debug (DEBUG_XML, "START"); + + pixbuf_cache = gl_label_get_pixbuf_cache (label); + + pixbuf = gl_pixbuf_cache_get_pixbuf (pixbuf_cache, name); + if ( pixbuf != NULL ) { + + pixdata = g_new0 (GdkPixdata, 1); + gdk_pixdata_from_pixbuf (pixdata, pixbuf, FALSE); + stream = gdk_pixdata_serialize (pixdata, &stream_length); + base64 = g_base64_encode (stream, stream_length); + + node = xmlNewChild (root, ns, (xmlChar *)"Pixdata", (xmlChar *)base64); + lgl_xml_set_prop_string (node, "name", name); + lgl_xml_set_prop_string (node, "encoding", "Base64"); + + gl_pixbuf_cache_remove_pixbuf (pixbuf_cache, name); + + g_free (pixdata); + g_free (stream); + g_free (base64); + } + + + gl_debug (DEBUG_XML, "END"); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Create top-level Span node. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_toplevel_span (xmlNodePtr root, + xmlNsPtr ns, + glLabelText *object_text) +{ + xmlNodePtr node; + gchar *font_family; + gdouble font_size; + PangoWeight font_weight; + gboolean font_italic_flag; + glColorNode *color_node; + PangoAlignment align; + gdouble text_line_spacing; + GList *lines, *p_line, *p_node; + glTextNode *text_node; + xmlNodePtr child; + + node = xmlNewChild (root, ns, (xmlChar *)"Span", NULL); + + /* All span attrs at top level. */ + font_family = gl_label_object_get_font_family (GL_LABEL_OBJECT(object_text)); + font_size = gl_label_object_get_font_size (GL_LABEL_OBJECT(object_text)); + text_line_spacing = gl_label_object_get_text_line_spacing (GL_LABEL_OBJECT(object_text)); + font_weight = gl_label_object_get_font_weight (GL_LABEL_OBJECT(object_text)); + font_italic_flag = gl_label_object_get_font_italic_flag (GL_LABEL_OBJECT(object_text)); + + color_node = gl_label_object_get_text_color (GL_LABEL_OBJECT(object_text)); + if (color_node->field_flag) + { + lgl_xml_set_prop_string (node, "color_field", color_node->key); + } + else + { + lgl_xml_set_prop_uint_hex (node, "color", color_node->color); + } + gl_color_node_free (&color_node); + + align = gl_label_object_get_text_alignment (GL_LABEL_OBJECT(object_text)); + lgl_xml_set_prop_string (node, "font_family", font_family); + lgl_xml_set_prop_double (node, "font_size", font_size); + lgl_xml_set_prop_string (node, "font_weight", gl_str_util_weight_to_string (font_weight)); + lgl_xml_set_prop_boolean (node, "font_italic", font_italic_flag); + + lgl_xml_set_prop_double (node, "line_spacing", text_line_spacing); + + /* Build children. */ + lines = gl_label_text_get_lines (GL_LABEL_TEXT(object_text)); + 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; + + if (text_node->field_flag) { + child = xmlNewChild (node, ns, (xmlChar *)"Field", NULL); + lgl_xml_set_prop_string (child, "name", text_node->data); + } else { + xmlNodeAddContent (node, (xmlChar *)text_node->data); + } + + } + + if ( p_line->next ) { + child = xmlNewChild (node, ns, (xmlChar *)"NL", NULL); + } + + } + + gl_text_node_lines_free (&lines); + g_free (font_family); + +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Create affine attributes. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_affine_attrs (xmlNodePtr node, + glLabelObject *object) +{ + cairo_matrix_t matrix; + + gl_label_object_get_matrix (object, &matrix); + + lgl_xml_set_prop_double (node, "a0", matrix.xx); + lgl_xml_set_prop_double (node, "a1", matrix.yx); + lgl_xml_set_prop_double (node, "a2", matrix.xy); + lgl_xml_set_prop_double (node, "a3", matrix.yy); + lgl_xml_set_prop_double (node, "a4", matrix.x0); + lgl_xml_set_prop_double (node, "a5", matrix.y0); +} + + +/*--------------------------------------------------------------------------*/ +/* PRIVATE. Create shadow attributes. */ +/*--------------------------------------------------------------------------*/ +static void +xml_create_shadow_attrs (xmlNodePtr node, + glLabelObject *object) +{ + gboolean shadow_state; + gdouble shadow_x; + gdouble shadow_y; + glColorNode *shadow_color_node; + gdouble shadow_opacity; + + shadow_state = gl_label_object_get_shadow_state (object); + + if (shadow_state) + { + lgl_xml_set_prop_boolean (node, "shadow", shadow_state); + + gl_label_object_get_shadow_offset (object, &shadow_x, &shadow_y); + lgl_xml_set_prop_length (node, "shadow_x", shadow_x); + lgl_xml_set_prop_length (node, "shadow_y", shadow_y); + + shadow_color_node = gl_label_object_get_shadow_color (object); + if (shadow_color_node->field_flag) + { + lgl_xml_set_prop_string (node, "shadow_color_field", shadow_color_node->key); + } + else + { + lgl_xml_set_prop_uint_hex (node, "shadow_color", shadow_color_node->color); + } + gl_color_node_free (&shadow_color_node); + + shadow_opacity = gl_label_object_get_shadow_opacity (object); + lgl_xml_set_prop_double (node, "shadow_opacity", shadow_opacity); + } +} + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/src/xml-label.h b/src/xml-label.h new file mode 100644 index 00000000..21730c51 --- /dev/null +++ b/src/xml-label.h @@ -0,0 +1,63 @@ +/* + * xml-label.h + * Copyright (C) 2001-2009 Jim Evins . + * + * This file is part of gLabels. + * + * 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 3 of the License, or + * (at your option) any later version. + * + * gLabels 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 gLabels. If not, see . + */ + +#ifndef __XML_LABEL_H__ +#define __XML_LABEL_H__ + +#include "label.h" + +G_BEGIN_DECLS + + +typedef enum { + XML_LABEL_UNKNOWN_MEDIA = 1, + XML_LABEL_OK = 0, + XML_LABEL_ERROR_OPEN_PARSE = -10, + XML_LABEL_ERROR_SAVE_FILE = -20, +} glXMLLabelStatus; + + +extern glLabel *gl_xml_label_open (const gchar * filename, + glXMLLabelStatus *status); +extern glLabel *gl_xml_label_open_buffer (const gchar * buffer, + glXMLLabelStatus *status); + +extern void gl_xml_label_save (glLabel * label, + const gchar * filename, + glXMLLabelStatus *status); +extern gchar *gl_xml_label_save_buffer (glLabel * label, + glXMLLabelStatus *status); + + +G_END_DECLS + + +#endif /* __XML_LABEL_H__ */ + + + +/* + * Local Variables: -- emacs + * mode: C -- emacs + * c-basic-offset: 8 -- emacs + * tab-width: 8 -- emacs + * indent-tabs-mode: nil -- emacs + * End: -- emacs + */ diff --git a/templates/Makefile.am b/templates/Makefile.am new file mode 100644 index 00000000..e740e61b --- /dev/null +++ b/templates/Makefile.am @@ -0,0 +1,25 @@ +## Process this file with automake to produce Makefile.in + +dtddir = $(datadir)/glabels/dtd + +dtd_DATA = \ + glabels-2.2.dtd + +templatesdir = $(datadir)/glabels/templates + +templates_DATA = \ + paper-sizes.xml \ + categories.xml \ + avery-us-templates.xml \ + avery-iso-templates.xml \ + avery-other-templates.xml \ + zweckform-iso-templates.xml \ + brother-other-templates.xml \ + dymo-other-templates.xml \ + misc-us-templates.xml \ + misc-iso-templates.xml \ + misc-other-templates.xml + +EXTRA_DIST = $(templates_DATA) $(dtd_DATA) + + diff --git a/templates/avery-iso-templates.xml b/templates/avery-iso-templates.xml new file mode 100644 index 00000000..1e413872 --- /dev/null +++ b/templates/avery-iso-templates.xml @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/avery-other-templates.xml b/templates/avery-other-templates.xml new file mode 100644 index 00000000..6e5a6698 --- /dev/null +++ b/templates/avery-other-templates.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + diff --git a/templates/avery-us-templates.xml b/templates/avery-us-templates.xml new file mode 100644 index 00000000..6626ed0f --- /dev/null +++ b/templates/avery-us-templates.xml @@ -0,0 +1,836 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/brother-other-templates.xml b/templates/brother-other-templates.xml new file mode 100644 index 00000000..7175f7bb --- /dev/null +++ b/templates/brother-other-templates.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + diff --git a/templates/categories.xml b/templates/categories.xml new file mode 100644 index 00000000..606d05ec --- /dev/null +++ b/templates/categories.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + diff --git a/templates/dymo-other-templates.xml b/templates/dymo-other-templates.xml new file mode 100644 index 00000000..49592b50 --- /dev/null +++ b/templates/dymo-other-templates.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/glabels-2.2.dtd b/templates/glabels-2.2.dtd new file mode 100644 index 00000000..9525e77d --- /dev/null +++ b/templates/glabels-2.2.dtd @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/misc-iso-templates.xml b/templates/misc-iso-templates.xml new file mode 100644 index 00000000..1dfd88ac --- /dev/null +++ b/templates/misc-iso-templates.xml @@ -0,0 +1,670 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/misc-other-templates.xml b/templates/misc-other-templates.xml new file mode 100644 index 00000000..b1a1c968 --- /dev/null +++ b/templates/misc-other-templates.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + diff --git a/templates/misc-us-templates.xml b/templates/misc-us-templates.xml new file mode 100644 index 00000000..4df17aca --- /dev/null +++ b/templates/misc-us-templates.xml @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/paper-sizes.xml b/templates/paper-sizes.xml new file mode 100644 index 00000000..b0210210 --- /dev/null +++ b/templates/paper-sizes.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/zweckform-iso-templates.xml b/templates/zweckform-iso-templates.xml new file mode 100644 index 00000000..4b19a29e --- /dev/null +++ b/templates/zweckform-iso-templates.xml @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/common_php.inc b/web/common_php.inc deleted file mode 100644 index b2a40375..00000000 --- a/web/common_php.inc +++ /dev/null @@ -1,255 +0,0 @@ -\n"; - ?> - -"; - print "root_dir = \"$root_dir\"
    "; - print "htroot = \"$htroot\"
    "; - print "root = \"$root\"
    "; - } - - #------------------------------------------------------- - # Print root URL - #------------------------------------------------------- - function root() - { - global $root; - - print $root; - } - - #------------------------------------------------------- - # Construct and print img tag - #------------------------------------------------------- - function img($src, $alt) - { - global $root; - global $root_dir; - - if (substr($src,0,1) == "/") { - $size = GetImageSize("$root_dir$src"); - print "\"$alt\""; - } else { - $size = GetImageSize("$src"); - print "\"$alt\""; - } - } - - #------------------------------------------------------- - # Construct and print img tag with explicit size, NULL alt - #------------------------------------------------------- - function img_size($src, $w, $h) - { - global $root; - - $alt = ""; - - if (substr($src,0,1) == "/") { - print "\"$alt\""; - } else { - print "\"$alt\""; - } - } - - #------------------------------------------------------- - # Construct and print link (a) tag - #------------------------------------------------------- - function a($href, $text) - { - global $root; - - if (substr($href,0,1) == "/") { - print "
    $text"; - } else { - print "$text"; - } - } - - #------------------------------------------------------- - # Construct and print link (a) tag to a downloadable file - #------------------------------------------------------- - function a_file($href) - { - global $root; - - $text = basename($href); - - if (substr($href,0,1) == "/") { - print "$text"; - } else { - print "$text"; - } - } - - #------------------------------------------------------- - # Construct and print link (a) tag to a sf dl file - #------------------------------------------------------- - function a_sfdownload($file) - { - print "$file"; - } - - #------------------------------------------------------- - # Construct and print link (a) tag to a web address - #------------------------------------------------------- - function a_host($host) - { - global $root; - - print "$host"; - } - - #------------------------------------------------------- - # Construct and print mailto (a) tag - #------------------------------------------------------- - function a_mailto($email) - { - print "$email"; - } - - #------------------------------------------------------- - # Common Header and navigation - #------------------------------------------------------- - function gLabelsHeader($tab) - { - global $root; - - $tabs["$root/"] = "home"; - $tabs["$root/news/"] = "news"; - $tabs["$root/screenshots/"] = "screenshots"; - $tabs["$root/download/"] = "download"; - $tabs["$root/doc/"] = "docs"; - $tabs["$root/faq/"] = "FAQ"; - $tabs["$root/contact/"] = "contact"; - $tabs["$root/links/"] = "links"; - -?> - - - - - - - - - gLabels - - - - - - - -
     
    - -
    - - - - - - -
    - -
    -
     
    -
     
    -
    - - - - - - - - -
    -
     
    -
     
    - - - -
    - - - - - - - - diff --git a/web/contact/index.php b/web/contact/index.php deleted file mode 100644 index 6a6fa1c4..00000000 --- a/web/contact/index.php +++ /dev/null @@ -1,87 +0,0 @@ - - - - -

    Contact ...

    - -

    Reporting bugs

    -

    Please report any bugs you find in gLabels at the -. -You may also join the to discuss -the problem more directly (please submit all bugs to the tracker as well). -

    -

    Please consult the following checklist when reporting a bug. -

    -
      -
    1. Verify that you are not experiencing a known bug or limitation by consulting the .
    2. -
    3. Verify that the bug is not a duplicate of an existing bug by searching the tracker. If you have additional information - on an existing bug, please add your information to the existing bug. If you - are not using the latest version of glabels, you should also look for closed - bugs since the problem may have already been resolved.
    4. -
    5. Please provide complete information: -
        -
      • version of gLabels
      • -
      • platform (operating system, version, and CPU)
      • -
      • detailed steps to reproduce the problem
      • -
      • sample file(s) (if appropriate)
      • -
      • screenshots (if appropriate)
      • -
      • locale (very important for i18n issues, e.g. problems with special characters)
      • -
      -
    6. -
    7. If this is a crash, it is important to submit a backtrace. Use gdb to get a backtrace as follows: -
      $ gdb glabels -GNU gdb ... - -(gdb) run - (Carry out the actions to make glabels crash) -(gdb) bt - (copy and paste all of this to your bug report) -(gdb) quit -$
      -
    8. - -
    - -

    Feature Requests

    -Feature requests should be submitted to the -. - -

    Mailing Lists

    -
      -
    • Developers list: -
        -
      • -
      • -
      -
    • -
    - -
      -
    • Template designers list: -
        -
      • -
      • -
      -
    • -
    - -
      -
    • Automated commit list: glabels-commit@lists.sourceforge.net -
        -
      • -
      • -
      -
    • -
    - - - -

    Want to help?

    -

    -Please start by joining one or both of the above mailing lists. -

    - - - - - diff --git a/web/css/glabels.css b/web/css/glabels.css deleted file mode 100644 index daecf0ba..00000000 --- a/web/css/glabels.css +++ /dev/null @@ -1,388 +0,0 @@ -/* GLABELS.CSS */ - - -/* -------------- Global --------------- */ -body { - font-family : Verdana, Verdana, Arial, Helvetica, sans-serif; - font-size : 77%; - background-color : #EEEAE4; - color : #000000; - margin : 0; -} - - -/****************************************/ -/* Basic layout. */ -/****************************************/ - -/* -------------- Title --------------- */ -#title { - padding: 0; - position: absolute; - top:0px; - left: 0px; - width: 150px; - height: 60px; - margin-top: 30px; - margin-left: 10px; - margin-right: 10px; - background: url("/images/glabels-title-140.png") top center no-repeat; -} - -/* -------------- Navigation --------------- */ -#nav { - padding: 0; - position: absolute; - top: 90px; - left: 0; - width: 150px; - margin-top: 30px; - margin-left: 10px; - margin-right: 10px; -} - -#nav ul { - margin: 0; - padding: 0; - background-color: #EEEAE4; -} - -#nav li { - font-weight: bold; - margin: 0; - list-style: none; - padding: 0 0 1px 0; - line-height: 1.0; -} - -#nav span { - line-height: 1.0; - color: #333333; - display: block; - border: solid 1px #DDD9D4; - margin: 0; - border-top-color: #FFFFFF; - border-left-color: #FFFFFF; - background: #F3F0EC; - padding: 5px 10px 5px 0.5em; -} - -#nav :link, #nav :visited { - line-height: 1.0; - color: #993333; - display: block; - text-decoration: none; - border: solid 1px #EEEAE4; - margin: 0; - padding: 5px 10px 5px 0.5em; - background: transparent url(/images/button-bg.png) top right repeat-y; -} - -#nav :link:hover, #nav :visited:hover { - color: #FF0000; - border: solid 1px #DDD9D4; - border-top-color: #FFFFFF; - border-left-color: #FFFFFF; - background: #F3F0EC; -} - -#nav :link:active, #nav :visited:active { - background: #FFFFFF; -} - -/* -------------- Sourceforge link --------------- */ -#sflink { - padding: 0; - position: absolute; - top: 350px; - left: 0; - width: 150px; - margin-top: 30px; - margin-left: 10px; - margin-right: 10px; - text-align: center; -} - -/* -------------- Main flow --------------- */ -#main { - font-size: 0.9em; - position: absolute; - top:0px; - left: 160px; - width: auto; - min-width: 440px; - margin-top: 10px; - margin-left: 10px; - margin-right: 20px; - padding-right: 20px; - background-color : #EEEAE4; -} - -.tlcorner, .trcorner, .blcorner, .brcorner { - background-color : #EEEAE4; - width: 19px; - height: 19px; -} - -.tlcorner, .blcorner { float: left; left: 0px; } -.trcorner, .brcorner { float: right; right: 0px; } -.tlcorner, .trcorner { top: 0px; } -.blcorner, .brcorner { bottom: 0px; margin-top: -19px; top: -18px;} - -.tlcorner { background: #EEEAE4 url("/images/corner-tl.png") no-repeat left top; } -.trcorner { background: #EEEAE4 url("/images/corner-tr.png") no-repeat right top; } -.blcorner { background: #EEEAE4 url("/images/corner-bl.png") no-repeat left bottom; } -.brcorner { background: #EEEAE4 url("/images/corner-br.png") no-repeat right bottom; } - -/* -------------- Main content --------------- */ -#content { - padding: 24px; - border: 1px solid #aaa; - background-color : #FFFFFF; -} - -/* -------------- Footer --------------- */ -#footer { - padding: 0; - margin-top: 20px; - margin-right: 10px; - margin-left: 10px; - margin-bottom: 70px; - font-weight:400; -} - -#copy { - top: 2px; - text-align: left; - float: left; - padding-right: 10px; - color : #666666; -} - -#copy>a:link { - color : #003366; -} - -#copy>a:visited { - color : #003366; -} - -#copy>a:hover { - color : #666666; -} - -#w3clinks { - top: 2px; - right: 0px; - float: right; - text-align: right; - padding-left: 20px; -} - - -/****************************************/ -/* Special content. */ -/****************************************/ - -/* -------------- News --------------- */ -.newsitem { - margin:20px 0px 10px 0px; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 10pt; - text-align: left; - color:#000000; -} - -.newsdate { - margin:0px 0px 3px 0px; - font-size:14px; - text-align: left; - color:#993333; -} - -.newstitle { - margin:3px 0px 6px 0px; - padding:0px; - font-size:16px; - line-height:20px; - font-weight:900; - color:#000000; -} - -/* -------------- Pre-formatted code box --------------- */ -.codebox { - margin:0px 0px 16px 0px; - padding:5px 5px 5px 5px; - border-style:solid; - border-color:#000000; - border-width:1px; - background-color:#FFFFF0; - font:11px/14px courier, monospace; - white-space: pre; -} - -/* -------------- Newest/latest item --------------- */ -.latest { - font-family : Verdana, Arial, Helvetica, sans-serif; - font-weight:900; -} - -.latest>a:link { - color : #FF0000; -} - -.latest>a:visited { - color : #FF0000; -} - -.latest>a:hover { - color : #666666; -} - -/* -------------- Top level headers --------------- */ -h1 { - padding-left: 70px; - padding-top:6px; - margin-top:15px; - line-height: 58px; - font-size:28px; - text-align: left; - font-weight:900; - color:#333399; - border-bottom-style: solid; - border-bottom-width: 1px; - border-bottom-color: #999999; -} - -h1.about { - background: url(/tango-icons/dialog-information.png) top left no-repeat; -} - -h1.news { - background: url(/tango-icons/internet-news-reader.png) top left no-repeat; -} - -h1.screenshots { - background: url(/tango-icons/emblem-photos.png) top left no-repeat; -} - -h1.download { - background: url(/tango-icons/package-x-generic.png) top left no-repeat; -} - -h1.development { - background: url(/tango-icons/applications-development.png) top left no-repeat; -} - -h1.doc { - background: url(/tango-icons/help-browser.png) top left no-repeat; -} - -h1.contact { - background: url(/tango-icons/system-users.png) top left no-repeat; -} - -h1.links { - background: url(/tango-icons/applications-internet.png) top left no-repeat; -} - - -/****************************************/ -/* Basic tags. */ -/****************************************/ - -h2 { - margin:28px 0px 4px 0px; - padding:0px; - font-size:18px; - line-height:20px; - font-weight:900; -} - -h3 { - margin:16px 0px 4px 0px; - padding:0px; - font-size:14px; - line-height:20px; - font-weight:900; -} - -h4 { - margin:16px 0px 6px 0px; - padding:0px; - font-size:12px; - line-height:20px; - font-weight:900; -} - -h5 { - margin:16px 0px 6px 0px; - padding:0px; - font-size:10px; - line-height:20px; - font-weight:900; -} - - -p { - margin-top: 8px; - margin-bottom: 8px; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 10pt; - text-align: left; -} - -a:link { - color : #006699; -} - -a:visited { - color : #006699; -} - -a:hover { - color : #000000; -} - -td { - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 10pt; -} - -li { - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 10pt; - color : #000000; -} - - - -/****************************************/ -/* Modifying classes. */ -/****************************************/ - -.noborder { - border:0; -} - -.center { - text-align: center; -} - -/****************************************/ -/* FAQ */ -/****************************************/ -div.faqtoc { - margin:0px 0px 16px 0px; - padding:5px 5px 5px 5px; - border-style:solid; - border-color:#000000; - border-width:1px; - background-color:#FFFFF0; -} - -.faqtocline { list-style: none; } - -div.faqanswer { - margin-left:4em; -} diff --git a/web/doc/glabels-2.0.dtd.txt b/web/doc/glabels-2.0.dtd.txt deleted file mode 100644 index fb8fa47d..00000000 --- a/web/doc/glabels-2.0.dtd.txt +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web/doc/glabels-2.2.dtd.txt b/web/doc/glabels-2.2.dtd.txt deleted file mode 100644 index 183df8b6..00000000 --- a/web/doc/glabels-2.2.dtd.txt +++ /dev/null @@ -1,380 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web/doc/index.php b/web/doc/index.php deleted file mode 100644 index 59053f75..00000000 --- a/web/doc/index.php +++ /dev/null @@ -1,38 +0,0 @@ - - - - -

    Documentation ...

    - - - - -

    Installing gLabels from source

    -

    -The easiest way to install glabels is to use you distribution's package repository. However, if the version -offered by your distribution is not the latest stable version, you may wish to install it manually from -source. -

    -
      -
    • -
    - - - -

    Customizing

    -

    -gLabels knows about a small universe of label/card stationery. You may create new templates by using the Template Designer under the File menu. -

    -

    -If for some reason you wish to manually create templates, please read the appropriate page below. New templates can be mailed to - -for possible inclusion in future releases of gLabels. -

    -
      -
    • -
    - - - - - diff --git a/web/doc/install-src/index.php b/web/doc/install-src/index.php deleted file mode 100755 index 5ef4227c..00000000 --- a/web/doc/install-src/index.php +++ /dev/null @@ -1,64 +0,0 @@ - - - - -

    Installing gLabels from Source

    - -

    -The following outlines how to install glabels from source on various GNU/Linux distributions. -

    - - -

    Prerequisites

    - -

    -Dependencies will need to be installed as root. -Although dependecies can be installed using your distribution's graphical package manager, the directions below use command line tools because it is easier to convey. -

    - -

    Fedora and similar distributions

    -
    $ su -Password: -# yum groupinstall "Development Tools" -# yum groupinstall "GNOME Software Development" -
    - -

    Ubuntu and similar distributions

    -
    $ sudo apt-get install libgtk2.0-dev libgnomeui-dev libxml2-dev libglade2-dev -$ sudo apt-get install libebook1.2-dev (optional) -
    - -

    -The exact dependencies and their names may vary with different distributions and versions. There may also be additional dependencies depending on the baseline configuation of your distribution. If ./configure in the following step complains, you may need to return to this step and install additional dependencies. -

    - - -

    Unpack and Build

    - -

    This step should not vary with distribution.

    - -
    $ tar xvfz glabels-2.2.x.tar.gz -$ cd glabels-2.2.x -$ ./configure -$ make -
    - - -

    Install

    - -

    -Installation will need to be done as root. -

    - -

    Fedora and similar distributions

    -
    $ su -Password: -# make install -
    - -

    Ubuntu and similar distributions

    -
    $ sudo make install -
    - - - diff --git a/web/doc/templates-2.0/glabels-template-cd.png b/web/doc/templates-2.0/glabels-template-cd.png deleted file mode 100644 index 0a3de3bf..00000000 Binary files a/web/doc/templates-2.0/glabels-template-cd.png and /dev/null differ diff --git a/web/doc/templates-2.0/glabels-template-label.png b/web/doc/templates-2.0/glabels-template-label.png deleted file mode 100644 index 87a724b9..00000000 Binary files a/web/doc/templates-2.0/glabels-template-label.png and /dev/null differ diff --git a/web/doc/templates-2.0/glabels-template-layout.png b/web/doc/templates-2.0/glabels-template-layout.png deleted file mode 100644 index c7127952..00000000 Binary files a/web/doc/templates-2.0/glabels-template-layout.png and /dev/null differ diff --git a/web/doc/templates-2.0/index.php b/web/doc/templates-2.0/index.php deleted file mode 100644 index fbbb512c..00000000 --- a/web/doc/templates-2.0/index.php +++ /dev/null @@ -1,291 +0,0 @@ - - - - -

    Defining new gLabels templates for gLabels 2.0.x

    - -

    -Predefined templates are defined by XML files located in -${prefix}/share/glabels/, -where ${prefix} is usually something like -/usr/local or /usr depending -on the configuration option prefix. gLabels will -use all files of the form *-templates.xml or *.template, -that it finds in ${prefix}/share/glabels/ and ${HOME}/.glabels/. -Additional templates can be added by creating additional -*.template files in either of these directories. -

    -
      -
    • The format for these files is defined in the DTD: . (This DTD also describes other XML formats used by glabels.)
    • -
    - -

    Assumptions/caveats

    -
      -
    • A sheet contains only one size of label or card (if a sheet contains more than one size of item, it can be split into multiple templates for multiple pass printing)
    • -
    • Distances can be expressed in units of pt, in, mm, cm, or pc. For example: "1.0in" or "2.54cm". If no units are specified, computer points (pt) will be assumed (1 pt = 1/72 in = 0.352778 mm).
    • -
    - - -

    *-templates.xml and *.template files

    -
    -<?xml version="1.0"?> -<Glabels-templates> - - ...templates... - -</Glabels-templates> -
    - - -

    Example Template

    -
    - <Template name="Avery 8160" size="US-Letter" description="Mailing Labels"> - <Label-rectangle id="0" width="189" height="72" round="5"> - <Markup-margin size="5"/> - <Layout nx="3" ny="10" x0="11.25" y0="36" dx="200" dy="72"/> - </Label-rectangle> - <Alias name="Avery 5160"/> - <Alias name="Avery 6233"/> - </Template> -
    - - -

    Template Node

    -

    -A Template node describes a single stationary product. It must contain -one instance of any type of Label node (Label-rectangle, -Label-round, or Label-cd). This node can be followed by zero -or more Alias nodes. -

    -

    Properties

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    nameName or part # of stationary product. E.g. "Avery 8160"
    sizeSize of sheet. E.g., "US-Letter," "A4", ...
    descriptionDescription of stationary product. E.g, "Mailing Labels."
    _descriptionTranslatable description of stationary product. E.g, "Mailing Labels." (Only useful for predefined templates)
    widthPage width. Only valid if size="Other"
    heightPage height. Only valid if size="Other"
    - -

    Label-rectangle Node

    -

    -A Label-rectangle node describes the dimensions of a single label or -business card that is rectangular in shape (may have rounded edges). -

    -

    Properties

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    idReserved for future use. Should always be 0.
    widthWidth of label/card
    heightHeight of label/card
    roundRadius of corners. For items with square edges (business cards) - , the radius should be 0.
    x_wasteAmount of horizontal waste (over-print) to allow. This is useful for minimizing alignment problems when using non-white backgrounds (e.g. images).
    y_wasteAmount of vertical waste (over-print) to allow. This is useful for minimizing alignment problems when using non-white backgrounds (e.g. images).
    -
    - - -

    Label-round Node

    -

    -A Label-round node describes the dimensions of a simple round label (not a CD). -

    -

    Properties

    - - - - - - - - - - - - - -
    idReserved for future use. Should always be 0.
    radiusRadius (1/2 diameter) of label
    wasteAmount of waste (over-print) to allow. This is useful for minimizing alignment problems when using non-white backgrounds (e.g. images).
    - -

    Label-cd Node

    -

    -A Label-cd node describes the dimensions of a CD, DVD, or business card -CD. -

    -

    Properties

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    idReserved for future use. Should always be 0.
    radiusOuter radius of label
    holeRadius of concentric hole
    widthIf present, the label is clipped to the given width. (Useful for "business card CDs").
    heightIf present, the label is clipped to the given height. (Useful for "business card CDs").
    wasteAmount of waste (over-print) to allow. This is useful for minimizing alignment problems when using non-white backgrounds (e.g. images).
    -
    - - - -

    Markup-margin Node

    -

    -A Markup-margin describes a margin along all edges of a label. -

    -

    Properties

    - - - - - -
    sizeSize of the margin. I.e. the distance of the margin line from the - edge of the card/label.
    - - -

    Markup-line Node

    -

    -A Markup-line describes a markup line. -

    -

    Properties

    - - - - - - - - - - - - - - - - - -
    x1x coordinate of 1st endpoint of the line segment.
    y1y coordinate of 1st endpoint of the line segment.
    x2x coordinate of 2nd endpoint of the line segment.
    y2y coordinate of 2nd endpoint of the line segment.
    - -

    Markup-circle Node

    -

    -A Markup-circle describes a markup circle. -

    -

    Properties

    - - - - - - - - - - - - - -
    x0x coordinate of circle origin (center).
    y0y coordinate of circle origin (center).
    radiusRadius of circle.
    - -

    Layout Node

    -

    -A label node may contain multiple Layout children. If labels are layed out in -a simple grid pattern, only one layout is needed. However, if labels are -layed out in multiple grids, such as a running bond pattern, multiple -layout tags can be used. Note: a single label can always be treated as -a grid of one. -

    -

    Properties

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    nxNumber of labels/cards across in the grid (horizontal)
    nyNumber of labels/cards up and down in the grid (vertical)
    x0Distance from left edge of sheet to the left edge of the left - column of cards/labels in the layout.
    y0Distance from the top edge of sheet to the top edge of - the top row of labels/cards in the layout.
    dxHorizontal pitch of grid.
    dyVertical pitch of grid.
    -
    - - -

    Alias Node

    -

    Properties

    - - - - - -
    nameThe name or part # of a product with the same size and layout - characteristics.
    - -
    - - - diff --git a/web/doc/templates-2.2/glabels-template-cd.png b/web/doc/templates-2.2/glabels-template-cd.png deleted file mode 100644 index 0a3de3bf..00000000 Binary files a/web/doc/templates-2.2/glabels-template-cd.png and /dev/null differ diff --git a/web/doc/templates-2.2/glabels-template-label.png b/web/doc/templates-2.2/glabels-template-label.png deleted file mode 100644 index 87a724b9..00000000 Binary files a/web/doc/templates-2.2/glabels-template-label.png and /dev/null differ diff --git a/web/doc/templates-2.2/glabels-template-layout.png b/web/doc/templates-2.2/glabels-template-layout.png deleted file mode 100644 index c7127952..00000000 Binary files a/web/doc/templates-2.2/glabels-template-layout.png and /dev/null differ diff --git a/web/doc/templates-2.2/index.php b/web/doc/templates-2.2/index.php deleted file mode 100644 index d08f92ac..00000000 --- a/web/doc/templates-2.2/index.php +++ /dev/null @@ -1,328 +0,0 @@ - - - - -

    Defining new gLabels templates for gLabels 2.2.x

    - -

    -Predefined templates are defined by XML files located in -${prefix}/share/glabels/, -where ${prefix} is usually something like -/usr/local or /usr depending -on the configuration option prefix. gLabels will -use all files of the form *-templates.xml or *.template, -that it finds in ${prefix}/share/glabels/ and ${HOME}/.glabels/. -Additional templates can be added by creating additional -*.template files in either of these directories. -

    -
      -
    • The format for these files is defined in the DTD: . (This DTD also describes other XML formats used by glabels.)
    • -
    - -

    Assumptions/caveats

    -
      -
    • A sheet contains only one size of label or card (if a sheet contains more than one size of item, it can be split into multiple templates for multiple pass printing)
    • -
    • Distances can be expressed in units of pt, in, mm, cm, or pc. For example: "1.0in" or "2.54cm". If no units are specified, computer points (pt) will be assumed (1 pt = 1/72 in = 0.352778 mm).
    • -
    - - -

    *-templates.xml and *.template files

    -
    -<?xml version="1.0"?> -<Glabels-templates> - - ...templates... - -</Glabels-templates> -
    - - -

    Example Template

    -
    - <Template brand="Avery" part="8160" size="US-Letter" description="Mailing Labels"> - <Label-rectangle id="0" width="189" height="72" round="5"> - <Markup-margin size="5"/> - <Layout nx="3" ny="10" x0="11.25" y0="36" dx="200" dy="72"/> - </Label-rectangle> - <Alias brand="Avery" part="5160"/> - <Alias brand="Avery" part="6233"/> - </Template> -
    - - -

    Template Node

    -

    -A Template node describes a single stationary product. It must contain -one instance of any type of Label node (Label-rectangle, -Label-round, or Label-cd). This node can be followed by zero -or more Alias nodes. -

    -

    Properties

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    brandBrand or manufacturer of stationary product. E.g. "Avery"
    partPart number or name of stationary product. E.g. "8160"
    sizeSize of sheet. E.g., "US-Letter," "A4", ...
    descriptionDescription of stationary product. E.g, "Mailing Labels."
    _descriptionTranslatable description of stationary product. E.g, "Mailing Labels." (Only useful for predefined templates)
    widthPage width. Only valid if size="Other"
    heightPage height. Only valid if size="Other"
    - -

    Label-rectangle Node

    -

    -A Label-rectangle node describes the dimensions of a single label or -business card that is rectangular in shape (may have rounded edges). -

    -

    Properties

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    idReserved for future use. Should always be 0.
    widthWidth of label/card
    heightHeight of label/card
    roundRadius of corners. For items with square edges (business cards) - , the radius should be 0.
    x_wasteAmount of horizontal waste (over-print) to allow. This is useful for minimizing alignment problems when using non-white backgrounds (e.g. images).
    y_wasteAmount of vertical waste (over-print) to allow. This is useful for minimizing alignment problems when using non-white backgrounds (e.g. images).
    -
    - - -

    Label-round Node

    -

    -A Label-round node describes the dimensions of a simple round label (not a CD). -

    -

    Properties

    - - - - - - - - - - - - - -
    idReserved for future use. Should always be 0.
    radiusRadius (1/2 diameter) of label
    wasteAmount of waste (over-print) to allow. This is useful for minimizing alignment problems when using non-white backgrounds (e.g. images).
    - -

    Label-cd Node

    -

    -A Label-cd node describes the dimensions of a CD, DVD, or business card -CD. -

    -

    Properties

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    idReserved for future use. Should always be 0.
    radiusOuter radius of label
    holeRadius of concentric hole
    widthIf present, the label is clipped to the given width. (Useful for "business card CDs").
    heightIf present, the label is clipped to the given height. (Useful for "business card CDs").
    wasteAmount of waste (over-print) to allow. This is useful for minimizing alignment problems when using non-white backgrounds (e.g. images).
    -
    - - - -

    Markup-margin Node

    -

    -A Markup-margin describes a margin along all edges of a label. -

    -

    Properties

    - - - - - -
    sizeSize of the margin. I.e. the distance of the margin line from the - edge of the card/label.
    - - -

    Markup-line Node

    -

    -A Markup-line describes a markup line. -

    -

    Properties

    - - - - - - - - - - - - - - - - - -
    x1x coordinate of 1st endpoint of the line segment.
    y1y coordinate of 1st endpoint of the line segment.
    x2x coordinate of 2nd endpoint of the line segment.
    y2y coordinate of 2nd endpoint of the line segment.
    - -

    Markup-circle Node

    -

    -A Markup-circle describes a markup circle. -

    -

    Properties

    - - - - - - - - - - - - - -
    x0x coordinate of circle origin (center).
    y0y coordinate of circle origin (center).
    radiusRadius of circle.
    - -

    Markup-rect Node

    -

    -A Markup-rect describes a markup rectangle. -

    -

    Properties

    - - - - - - - - - - - - - - - - - - - - - -
    x1x coordinate of upper left corner of rectangle.
    y1y coordinate of upper left corner of rectangle.
    wWidth of rectangle.
    hHeight of rectangle.
    rRadius of rounded corners.
    - -

    Layout Node

    -

    -A label node may contain multiple Layout children. If labels are layed out in -a simple grid pattern, only one layout is needed. However, if labels are -layed out in multiple grids, such as a running bond pattern, multiple -layout tags can be used. Note: a single label can always be treated as -a grid of one. -

    -

    Properties

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    nxNumber of labels/cards across in the grid (horizontal)
    nyNumber of labels/cards up and down in the grid (vertical)
    x0Distance from left edge of sheet to the left edge of the left - column of cards/labels in the layout.
    y0Distance from the top edge of sheet to the top edge of - the top row of labels/cards in the layout.
    dxHorizontal pitch of grid.
    dyVertical pitch of grid.
    -
    - - -

    Alias Node

    -

    Properties

    - - - - - - - - - -
    brandBrand or manufacturer of the product with the same size and layout - characteristics.
    partPart number or name of the product with the same size and layout - characteristics.
    - -
    - - - diff --git a/web/download/index.php b/web/download/index.php deleted file mode 100644 index a6a3e31f..00000000 --- a/web/download/index.php +++ /dev/null @@ -1,127 +0,0 @@ - - - - - -

    Stable Version ...

    - - - -

    System Requirements

    -

    -gLabels is designed to run on GNOME 2.16+, but more specifically it requires the following libraries or newer. -

    -
      -
    • GTK+-2.10.x
    • -
    • LIBGNOME[UI]-2.16.x
    • -
    • LIBXML-2.6.x
    • -
    • LIBGLADE-2.6.x
    • -
    • LIBEBOOK-1.8.x (optional)
    • -
    -

    -Note: to compile gLabels on most GNU/Linux systems, you will need the development packages (e.g., gtk2-devel or gtk2-dev) -installed for each of these libraries and their dependencies. -Just having the base library packages installed is not enough. -

    - - -

    Source:

    -
      -
    • -
      - (latest version) -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    - - - - - -

    Third party packages

    -

    -If you are not up to , you may be able to use a third party package. gLabels is currently available for many popular GNU/Linux and BSD distributions through -their associated repositories, including the following distributions and repositories: -

    -
      -
    • Debian
    • -
    • Fedora
    • -
    • Ubuntu
    • -
    • Gentoo
    • -
    • -
    -

    -Some of these packages are more up to date than others. If you experience bugs or problems with a third party package that is not based on the most recent stable version, please contact the package maintainer and urge them to update as soon as possible. -

    - - - - - - -

    Development (Unstable) Version ...

    - -

    System Requirements

    -

    -The development version of gLabels is designed to run on GNOME 2.24+, but more specifically it requires the following libraries or newer. -

    -
      -
    • GTK+-2.14.x
    • -
    • LIBXML-2.7.x
    • -
    • LIBEBOOK-2.24.x (optional)
    • -
    -

    -Note: to compile gLabels on most GNU/Linux systems, you will need the development packages (e.g., gtk2-devel or gtk2-dev) -installed for each of these libraries and their dependencies. -Just having the base library packages installed is not enough. -

    - - -

    Source:

    -
      - -
    • -
      - No post 2.2.x development version available yet. -
      -
    • -
    - -

    Subversion:

    -

    -The latest bleading-edge version of gLabels can be checked out through subversion with -the following command. -

    -
    $ svn co https://glabels.svn.sourceforge.net/svnroot/glabels/trunk/glabels2 -
    -

    -The latest snapshot of the gLabels stable branch also can be checked out through subversion with -the following command. -

    -
    $ svn co https://glabels.svn.sourceforge.net/svnroot/glabels/branches/glabels-2_2/glabels2 -
    -

    -More information can be found at the . -

    -
      -
    • -
    - - - - - - - -

    - - - - - - diff --git a/web/faq/index.php b/web/faq/index.php deleted file mode 100644 index 2bfab45d..00000000 --- a/web/faq/index.php +++ /dev/null @@ -1,123 +0,0 @@ - - - - -

    Frequently Asked Questions (FAQ) ...

    - - - - -

    Index

    -
    -
      - -
    • 1. - -
        - -
      • 1.1
      • - -
      - -
    • - -
    • 2. - -
        - -
      • 2.1
      • -
      • 2.2
      • - -
      - -
    • - -
    -
    - - -

    1. Common Problems.

    - -
    -

    1.1 How can I instruct glabels to not print blank address lines when doing a document merge?

    -
    -

    -This feature can be best described by a simple example. In the following CSV -file, column 5 contains the second address line for each record. This field is -empty in records 1 and 2, but not in record 3. (For this feature to work, -the field must be completely empty -- any text, including spaces will -defeat this feature.) -

    -
    Summers,Joyce,,"1630 Revello Dr",,Sunnydale,CA,95037 -McGarret,Steve,O,"404 Piikoi Street",,Honolulu,HI,96813 -Kramer,Cosmo,,"Apt 5B","129 W. 81 St.","New York",NY,10024-7207 -
    -

    -In the following screenshot, a single multiline text object has been -created to format these addresses. Notice that ${5} representing -the second address line is on a line by itself. (Any additional text -on this line, including spaces would defeat this feature.) -

    - -

    -Printing this label results in the following output. -

    - - -
    - - -
    -

    2. Obsolete Problems (problems with older versions of gLabels).

    - -
    -

    2.1 I cannot edit text. What's wrong? (2.0.x)

    -
    -

    -This is most likely due to an - in -libbonoboui that was introduced in GNOME 2.8. The symptom is that as soon -as you select a text object, its object property editor apears briefly then -disappears. -

    -

    -The workaround for this bug is to resize the glabels window so that it is large -enough to display the text property editor in the sidebar. -Note: it is impossible for glabels to automatically do this since the size -needed will vary with different themes, font sizes, and locales. -

    -

    -This problem is fixed in the development branch of glabels (2.1.x) by using -the GtkUIManager instead of libbonoboui to build the user interface. These -changes are very extensive and require later versions of GNOME, thus are not -suitable for backport into the 2.0.x branch.. -

    -
    - - -
    -

    2.2 Why don't transparent images print correctly? (1.92.1 - 2.1.3)

    -
    -

    -There is currently a limitation in the postscript back-end of libgnomeprint -that causes images with an alpha channel to be composited in an intermediate -context at 72 DPI. Unfortunately an image only needs to have an alpha channel -to trigger this behaviour even if the image is completely opaque, therefore -in earlier versions of gLabels (before 1.92.1) all GIF and PNG images would be -printed at 72 DPI. To work around this problem image compositing was -sacrificed for full resolution rendering beginning with gLabels 1.92.1. -

    -

    -If you are compiling gLabels from source and are willing to sacrifice image -quality for image transparency, you can disable the workaround by -compiling glabels with the NO_ALPHA_HACK option: -

    -
    $ ./configure CPPFLAGS=-DNO_ALPHA_HACK -$ make -... -
    -
    - - - - diff --git a/web/faq/q1.3-output.png b/web/faq/q1.3-output.png deleted file mode 100644 index 54bffb11..00000000 Binary files a/web/faq/q1.3-output.png and /dev/null differ diff --git a/web/faq/q1.3-screenshot.png b/web/faq/q1.3-screenshot.png deleted file mode 100644 index e1d8f2af..00000000 Binary files a/web/faq/q1.3-screenshot.png and /dev/null differ diff --git a/web/images/button-bg.png b/web/images/button-bg.png deleted file mode 100644 index 6a64bdb5..00000000 Binary files a/web/images/button-bg.png and /dev/null differ diff --git a/web/images/corner-bl.png b/web/images/corner-bl.png deleted file mode 100644 index 13c71b39..00000000 Binary files a/web/images/corner-bl.png and /dev/null differ diff --git a/web/images/corner-br.png b/web/images/corner-br.png deleted file mode 100644 index a5077d7e..00000000 Binary files a/web/images/corner-br.png and /dev/null differ diff --git a/web/images/corner-tl.png b/web/images/corner-tl.png deleted file mode 100644 index 61d7a50b..00000000 Binary files a/web/images/corner-tl.png and /dev/null differ diff --git a/web/images/corner-tr.png b/web/images/corner-tr.png deleted file mode 100644 index c8872480..00000000 Binary files a/web/images/corner-tr.png and /dev/null differ diff --git a/web/images/glabels-title-140.png b/web/images/glabels-title-140.png deleted file mode 100644 index 9997c67e..00000000 Binary files a/web/images/glabels-title-140.png and /dev/null differ diff --git a/web/images/pixel-null.png b/web/images/pixel-null.png deleted file mode 100644 index c250a1ff..00000000 Binary files a/web/images/pixel-null.png and /dev/null differ diff --git a/web/index.php b/web/index.php deleted file mode 100644 index 96917f20..00000000 --- a/web/index.php +++ /dev/null @@ -1,467 +0,0 @@ - - - - -

    About gLabels ...

    - -

    -gLabels is a 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. gLabels is free software and is distributed under the terms of the -GNU General Public License (). -

    - - - - -

    Recent News ...

    - - - - -
    -
    30 April 2009
    -
    Release 2.2.5 (Stable)
    -

    -Packagers: please update to this version as soon as possible. This release fixes a set of problems -that made glabels unusable on the latest distributions which use Gnome 2.26/Gtk 2.16. -

    -

    -Changes/fixes since 2.2.4 include -

    -
      -
    • Fixed spinbutton/adjustment bugs that made glabels unusable with Gtk 2.16.
    • -
    • Fixed default preview colors in color combos.
    • -
    • Updated german translation (Mario Blättermann).
    • -
    • New templates.
    • -
    -

    -. -

    -
    - - - - - - -
    -
    22 December 2008
    -
    Release 2.2.4 (Stable)
    -

    -Changes/fixes since 2.2.3 include -

    -
      -
    • Corrected button order in "Open" and "Save as" dialogs.
    • -
    • Fixed performance problem when large number of fonts are installed.
    • -
    • Corrected several i18n problems.
    • -
    • Fixed "paste" bug that created phantom object views.
    • -
    • Fixed performacne problem when many objects are selected.
    • -
    • New templates.
    • -
    -
    - - - - - - -
    -
    19 August 2008
    -
    Release 2.2.3 (Stable)
    -

    -Changes/fixes since 2.2.2 include -

    -
      -
    • Explicitely set page size when printing -- don't let print back-end use - a default size (Bug #2049431).
    • -
    • Sets more appropriate object size limits for any aspect ratio (Bug #1993550).
    • -
    • Fixed crash of glabels-batch (Bug #1968653).
    • -
    • Fixed bug with barcode and image merge radio buttons (Bug #1959135).
    • -
    • Will now attempt to parse newer namespaces (Bug #1872584).
    • -
    • Fixed drawing errors when drawing markup on rotated labels.
    • -
    • New korean translation (xein@navir.com).
    • -
    • New templates.
    • -
    -
    - - - - - - -
    -
    22 February 2008
    -
    Release 2.2.2, "Walt Whitman High" (Stable)
    -

    -Changes/fixes since 2.2.1 include -

    -
      -
    • Fixed crash when creating Code128C barcode (Bug #1766425).
    • -
    • Explicitely set page size when printing "other" page size.
    • -
    • Fixed rendering bug with bitmap fonts.
    • -
    • Fixed rendering problem when displaying "Invalid barcode data".
    • -
    • Fixed crash when deleting multi-object selections.
    • -
    • Enforce minimum size for images to prevent rendering of images of zero size.
    • -
    • Fixed problem with image size spinboxes (Bug #1886438).
    • -
    • Fixed template example in documentation.
    • -
    • Use default units when writing xml files.
    • -
    -
    - - - - - - -
    -
    23 January 2008
    -
    Release 2.2.1 (Stable)
    -

    -Changes/fixes since 2.2.0 include -

    -
      -
    • Font lists are now sorted alphabetically.
    • -
    • Evolution records are now sorted by the "file_under" field.
    • -
    • Fixed clipping bug when rotating labels.
    • -
    -
    - - - - - - -
    -
    26 December 2007
    -
    Release 2.2.0 (Stable)
    -

    -After two years in the making, it's finally here... -

    -

    -A new stable release. The underlying technology has been largely overhauled from the 2.0.x branch. -The libgnomeprint library has been completely replaced with Cairo and the new GtkPrintOperation API. -One side effect of print rendering with Cairo is that image compositing now works at full resolution. -Cairo has also replaced GnomeCanvas in the main display and drawing interface. -Many other deprecated dependencies have been replaced as well. Because of this, this version requires at least Gnome 2.16. -

    -

    -Changes/fixes since 2.0.4 include -

    -
      - -
    • Migrated from EggRecent to GtkRecentManager
    • -
    • Migrated from libgnomeprint to GtkPrintOperation and Cairo.
    • -
    • Migrated from libgnomeprint to Pango for text layout.
    • -
    • Migrated GnomeDruid to GtkAssistant for template designer.
    • -
    • Migrated from GnomeCanvas to Cairo.
    • -
    • Removed all deprecated widgets as of Gnome-2.16/Gtk-2.10.
    • -
    • Added categorization of templates and an updated New Label dialog.
    • -
    • New label dialog now allows selection of recently used templates
    • -
    • Removed splash screen.
    • -
    • Added initial support for datamatrix 2D barcodes.
    • -
    • Added support for Brazilian CEPNet barcodes.
    • -
    • Added shadow attribute to label objects.
    • -
    • New merge backend for evolution data server
    • -
    • Various bug fixes.
    • -
    • New templates.
    • - -
    -
    - - - - - - -
    -
    9 December 2007
    -
    Release 2.1.5 (Unstable)
    -

    -This is hopefully the final development release before 2.2. Please download -and test. -

    -

    -Changes/fixes since 2.1.4 include -

    -
      -
    • New label dialog now allows selection of recently used templates
    • -
    • Store brand and part number as separate fields in templates
    • -
    • Major cleanup of libglabels API and documentation
    • -
    • Minor bug fixes (and probably some new bugs).
    • -
    -
    - - - - - - -
    -
    17 August 2007
    -
    Release 2.1.4 (Unstable)
    -

    -It's been over a year in the making... -

    -

    -Although this latest development snapshot has only a few functional updates, its underlying technology has been largely overhauled. -The libgnomeprint library has been completely replaced with the new GtkPrintOperation and Cairo. -One side effect of print rendering with Cairo is that image compositing now works at full resolution. -Cairo has also replaced GnomeCanvas in the main display and drawing interface. -Many other deprecated dependencies have been replaced as well. Because of this, this version requires at least Gnome 2.16. -

    -

    -Changes/fixes since 2.1.3 include -

    -
      - -
    • Added categorization of templates and an updated New Label dialog.
    • -
    • Added initial support for datamatrix 2D barcodes.
    • -
    • Migrated from EggRecent to GtkRecentManager.
    • -
    • Migrated from libgnomeprint to GtkPrintOperation and Cairo.
    • -
    • Migrated from libgnomeprint to Pango for text layout.
    • -
    • Migrated GnomeDruid to GtkAssistant for template designer.
    • -
    • Migrated from GnomeCanvas to Cairo.
    • -
    • Removed splash screen.
    • -
    • Added support for Brazilian CEPNet barcodes.
    • -
    • Updated French translation (Claude Paroz)
    • -
    • New Esperanto translation (Antonio C. Codazzi)
    • -
    • Minor bug fixes (and probably some new bugs).
    • -
    • New templates.
    • - -
    -
    - - - - - - -
    -
    27 May 2006
    -
    Release 2.1.3 (Unstable)
    -

    -Changes/fixes since 2.1.2 include -

    -
      - -
    • Don't print "Invalid barcode data" if data field is empty. Fixes Bug #1479839. (Darren Warner)
    • -
    • Fixed hangup when grid or markup have been toggled during a previous session. Fixes Bug #1434324.
    • -
    • Added shadow attribute to label objects.
    • -
    • Fixed color groups in color combo widgets.
    • -
    • Fixed several potential crashes.
    • - -
    -
    - - - - - - -
    -
    26 December 2005
    -
    Release 2.0.4 (Stable)
    -

    -Changes/fixes since 2.0.3 include -

    -
      - -
    • Use filechooser for GnomeFileEntrys in merge properties dialog and - object editor image page. Fixes #1328173 and #1294692
    • -
    • New configure option to disable update-mime-database and update-desktop-database
    • -
    • Minor cleanup
    • -
    • New templates and fixes
    • - -
    -
    - - - - - - -
    -
    22 December 2005
    -
    Release 2.1.2 (Unstable)
    -

    -Changes/fixes since 2.1.1 include -

    -
      - -
    • Updated Italian translation (Daniele Medri)
    • -
    • Fixed double entry in property bar's font family combobox
    • -
    • Don't allow zero width or height when drawing pixbufs
    • -
    • Fixed various memory leaks
    • -
    • New configure option to disable update-mime-database and update-desktop-database
    • -
    • New merge backend for evolution data server (Austin Henry)
    • -
    • New merge backend for VCards (Austin Henry)
    • -
    • New templates and fixes
    • - -
    -
    - - - - - - -
    -
    26 June 2005
    -
    Release 2.1.1 (Unstable)
    -

    -Changes/fixes since 2.1.0 include -

    -
      - -
    • Added document merge tutorial
    • -
    • Replaced deprecated widgets (now requires Gnome 2.10 and GTK+ 2.6)
    • -
    • Replaced libbonoboui with GtkUIManager (now requires Gnome 2.10 and GTK+ 2.6)
    • -
    • Updated Russian translation (Vitaly Lipatov)
    • -
    • Updated Spanish translation (Sergio Rivadero)
    • -
    • Updated Czech translation (David Makovský and Zbynek Mrkvick)
    • -
    • Updated Italian translation (Daniele Medri)
    • -
    • Added documentation for libglabels
    • -
    • Minor bug fixes and cleanup
    • -
    • New templates
    • - -
    -
    - - - - - - -
    -
    26 June 2005
    -
    Release 2.0.3 (Stable)
    -

    -Changes/fixes since 2.0.2 include -

    -
      - -
    • Added document merge tutorial
    • -
    • Updated Russian translation (Vitaly Lipatov)
    • -
    • Updated Spanish translation (Sergio Rivadero)
    • -
    • Updated Czech translation (David Makovský and Zbynek Mrkvick)
    • -
    • Updated Italian translation (Daniele Medri)
    • -
    • Fixed packing style of printer selection dialog
    • -
    • New templates
    • - -
    -
    - - - - - - -
    -
    22 January 2005
    -
    Release 2.1.0 (Unstable)
    -

    -This is the first development release in preparation for 2.2. New features include -

    -
      - -
    • Color object properties can be provided through document-merge feature (Frederic Ruaudel)
    • -
    • Fixes/changes from 2.0.2
    • - -
    -
    - - - - - - -
    -
    22 January 2005
    -
    Release 2.0.2 (Stable)
    -

    -Changes/fixes since 2.0.1 include -

    -
      - -
    • Desktop file reconciled with desktop-entry-spec
    • -
    • New cleaned-up icon
    • -
    • Added option to glabels-batch to allow selection of first label
    • -
    • Added options to glabels-batch to allow selection of merge source and crop marks (José Dapena Paz)
    • -
    • Updated french translation (Florent Morel)
    • -
    • Fixed translation problem with object editor labels
    • -
    • Minor bug fixes and cleanup
    • -
    • New templates
    • - -
    -
    - - - - - - -
    -
    15 August 2004
    -
    Release 2.0.1, "You know it, Bruddah" (Stable)
    -

    -There were a couple of problems with 2.0.0. Changes/fixes include -

    -
      - -
    • Fixed crash when reading some labels created with 1.93.x
    • -
    • Updated japanese translations (Takeshi AIHANA)
    • -
    • Fixed crash from improperly freeing translation strings
    • - -
    -
    - - - - - - -
    -
    09 August 2004
    -
    Release 2.0.0, "Zulu as Kono" (Stable)
    -

    -Well it's finally here, 2.0 -- woo hoo! -Changes/fixes from 1.93.3 include -

    -
      - -
    • Fixed crash when encountering old template files
    • - -
    • Align grid to label center for DVD/CD and round labels
    • - -
    • Don't touch compression of original file
    • - -
    • 64-bit fixes
    • - -
    • Added man page
    • - -
    • Fixed missing outline problem experienced with some printers
    • - -
    • Added separate horizontal and vertical waste properties for rectangular templates
    • - -
    • Added option to auto-shrink text during document merge
    • - -
    • Fixed memory leaks
    • - -
    • Added format attibute to barcode objects, to allow correct layout of merged labels
    • - -
    • Added mime type registration for GNOME 2.6
    • - -
    -
    - - - - - - - -

    - - - diff --git a/web/links/index.php b/web/links/index.php deleted file mode 100644 index 348d93b4..00000000 --- a/web/links/index.php +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -

    Related links ...

    - - - -

    gLabels in the News

    -
      -
    • -
    • -
    • -
    • -
    • -
    - - - -

    gLabels Project Links

    -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    - - - -

    Supporting Software

    -
      -
    • -
    • -
    • -
    • -
    - - - -

    Similar Software

    -
      -
    • (barcode and label printing application for KDE 3)
    • -
    • (another program for making labels)
    • -
    • (a perl module for creating mail labels)
    • -
    • (gLabels clone using Qt4)
    • - -
    - - - -

    Other

    -
      -
    • -
    • -
    - - - - diff --git a/web/news/index.php b/web/news/index.php deleted file mode 100644 index 9135a062..00000000 --- a/web/news/index.php +++ /dev/null @@ -1,1083 +0,0 @@ - - - - -

    News ...

    - - - - -
    -
    30 April 2009
    -
    Release 2.2.5 (Stable)
    -

    -Packagers: please update to this version as soon as possible. This release fixes a set of problems -that made glabels unusable on the latest distributions which use Gnome 2.26/Gtk 2.16. -

    -

    -Changes/fixes since 2.2.4 include -

    -
      -
    • Fixed spinbutton/adjustment bugs that made glabels unusable with Gtk 2.16.
    • -
    • Fixed default preview colors in color combos.
    • -
    • Updated german translation (Mario Blättermann).
    • -
    • New templates.
    • -
    -

    -. -

    -
    - - - - - - -
    -
    22 December 2008
    -
    Release 2.2.4 (Stable)
    -

    -Changes/fixes since 2.2.3 include -

    -
      -
    • Corrected button order in "Open" and "Save as" dialogs.
    • -
    • Fixed performance problem when large number of fonts are installed.
    • -
    • Corrected several i18n problems.
    • -
    • Fixed "paste" bug that created phantom object views.
    • -
    • Fixed performacne problem when many objects are selected.
    • -
    • New templates.
    • -
    -
    - - - - - - -
    -
    19 August 2008
    -
    Release 2.2.3 (Stable)
    -

    -Changes/fixes since 2.2.2 include -

    -
      -
    • Explicitely set page size when printing -- don't let print back-end use - a default size (Bug #2049431).
    • -
    • Sets more appropriate object size limits for any aspect ratio (Bug #1993550).
    • -
    • Fixed crash of glabels-batch (Bug #1968653).
    • -
    • Fixed bug with barcode and image merge radio buttons (Bug #1959135).
    • -
    • Will now attempt to parse newer namespaces (Bug #1872584).
    • -
    • Fixed drawing errors when drawing markup on rotated labels.
    • -
    • New korean translation (xein@navir.com).
    • -
    • New templates.
    • -
    -
    - - - - - - -
    -
    22 February 2008
    -
    Release 2.2.2, "Walt Whitman High" (Stable)
    -

    -Changes/fixes since 2.2.1 include -

    -
      -
    • Fixed crash when creating Code128C barcode (Bug #1766425).
    • -
    • Explicitely set page size when printing "other" page size.
    • -
    • Fixed rendering bug with bitmap fonts.
    • -
    • Fixed rendering problem when displaying "Invalid barcode data".
    • -
    • Fixed crash when deleting multi-object selections.
    • -
    • Enforce minimum size for images to prevent rendering of images of zero size.
    • -
    • Fixed problem with image size spinboxes (Bug #1886438).
    • -
    • Fixed template example in documentation.
    • -
    • Use default units when writing xml files.
    • -
    -
    - - - - - - -
    -
    23 January 2008
    -
    Release 2.2.1 (Stable)
    -

    -Changes/fixes since 2.2.0 include -

    -
      -
    • Font lists are now sorted alphabetically.
    • -
    • Evolution records are now sorted by the "file_under" field.
    • -
    • Fixed clipping bug when rotating labels.
    • -
    -
    - - - - - - -
    -
    26 December 2007
    -
    Release 2.2.0 (Stable)
    -

    -After two years in the making, it's finally here... -

    -

    -A new stable release. The underlying technology has been largely overhauled from the 2.0.x branch. -The libgnomeprint library has been completely replaced with Cairo and the new GtkPrintOperation API. -One side effect of print rendering with Cairo is that image compositing now works at full resolution. -Cairo has also replaced GnomeCanvas in the main display and drawing interface. -Many other deprecated dependencies have been replaced as well. Because of this, this version requires at least Gnome 2.16. -

    -

    -Changes/fixes since 2.0.4 include -

    -
      - -
    • Migrated from EggRecent to GtkRecentManager
    • -
    • Migrated from libgnomeprint to GtkPrintOperation and Cairo.
    • -
    • Migrated from libgnomeprint to Pango for text layout.
    • -
    • Migrated GnomeDruid to GtkAssistant for template designer.
    • -
    • Migrated from GnomeCanvas to Cairo.
    • -
    • Removed all deprecated widgets as of Gnome-2.16/Gtk-2.10.
    • -
    • Added categorization of templates and an updated New Label dialog.
    • -
    • New label dialog now allows selection of recently used templates
    • -
    • Removed splash screen.
    • -
    • Added initial support for datamatrix 2D barcodes.
    • -
    • Added support for Brazilian CEPNet barcodes.
    • -
    • Added shadow attribute to label objects.
    • -
    • New merge backend for evolution data server
    • -
    • Various bug fixes.
    • -
    • New templates.
    • - -
    -
    - - - - - - -
    -
    9 December 2007
    -
    Release 2.1.5 (Unstable)
    -

    -This is hopefully the final development release before 2.2. Please download -and test. -

    -

    -Changes/fixes since 2.1.4 include -

    -
      -
    • New label dialog now allows selection of recently used templates
    • -
    • Store brand and part number as separate fields in templates
    • -
    • Major cleanup of libglabels API and documentation
    • -
    • Minor bug fixes (and probably some new bugs).
    • -
    -
    - - - - - - -
    -
    17 August 2007
    -
    Release 2.1.4 (Unstable)
    -

    -It's been over a year in the making... -

    -

    -Although this latest development snapshot has only a few functional updates, its underlying technology has been largely overhauled. -The libgnomeprint library has been completely replaced with the new GtkPrintOperation and Cairo. -One side effect of print rendering with Cairo is that image compositing now works at full resolution. -Cairo has also replaced GnomeCanvas in the main display and drawing interface. -Many other deprecated dependencies have been replaced as well. Because of this, this version requires at least Gnome 2.16. -

    -

    -Changes/fixes since 2.1.3 include -

    -
      - -
    • Added categorization of templates and an updated New Label dialog.
    • -
    • Added initial support for datamatrix 2D barcodes.
    • -
    • Migrated from EggRecent to GtkRecentManager.
    • -
    • Migrated from libgnomeprint to GtkPrintOperation and Cairo.
    • -
    • Migrated from libgnomeprint to Pango for text layout.
    • -
    • Migrated GnomeDruid to GtkAssistant for template designer.
    • -
    • Migrated from GnomeCanvas to Cairo.
    • -
    • Removed splash screen.
    • -
    • Added support for Brazilian CEPNet barcodes.
    • -
    • Updated French translation (Claude Paroz)
    • -
    • New Esperanto translation (Antonio C. Codazzi)
    • -
    • Minor bug fixes (and probably some new bugs).
    • -
    • New templates.
    • - -
    -
    - - - - - - -
    -
    27 May 2006
    -
    Release 2.1.3 (Unstable)
    -

    -Changes/fixes since 2.1.2 include -

    -
      - -
    • Don't print "Invalid barcode data" if data field is empty. Fixes Bug #1479839. (Darren Warner)
    • -
    • Fixed hangup when grid or markup have been toggled during a previous session. Fixes Bug #1434324.
    • -
    • Added shadow attribute to label objects.
    • -
    • Fixed color groups in color combo widgets.
    • -
    • Fixed several potential crashes.
    • - -
    -
    - - - - - - -
    -
    26 December 2005
    -
    Release 2.0.4 (Stable)
    -

    -Changes/fixes since 2.0.3 include -

    -
      - -
    • Use filechooser for GnomeFileEntrys in merge properties dialog and - object editor image page. Fixes #1328173 and #1294692
    • -
    • New configure option to disable update-mime-database and update-desktop-database
    • -
    • Minor cleanup
    • -
    • New templates and fixes
    • - -
    -
    - - - - - - -
    -
    22 December 2005
    -
    Release 2.1.2 (Unstable)
    -

    -Changes/fixes since 2.1.1 include -

    -
      - -
    • Updated Italian translation (Daniele Medri)
    • -
    • Fixed double entry in property bar's font family combobox
    • -
    • Don't allow zero width or height when drawing pixbufs
    • -
    • Fixed various memory leaks
    • -
    • New configure option to disable update-mime-database and update-desktop-database
    • -
    • New merge backend for evolution data server (Austin Henry)
    • -
    • New merge backend for VCards (Austin Henry)
    • -
    • New templates and fixes
    • - -
    -
    - - - - - - -
    -
    26 June 2005
    -
    Release 2.1.1 (Unstable)
    -

    -Changes/fixes since 2.1.0 include -

    -
      - -
    • Added document merge tutorial
    • -
    • Replaced deprecated widgets (now requires Gnome 2.10 and GTK+ 2.6)
    • -
    • Replaced libbonoboui with GtkUIManager (now requires Gnome 2.10 and GTK+ 2.6)
    • -
    • Updated Russian translation (Vitaly Lipatov)
    • -
    • Updated Spanish translation (Sergio Rivadero)
    • -
    • Updated Czech translation (David Makovský and Zbynek Mrkvick)
    • -
    • Updated Italian translation (Daniele Medri)
    • -
    • Added documentation for libglabels
    • -
    • Minor bug fixes and cleanup
    • -
    • New templates
    • - -
    -
    - - - - - - -
    -
    26 June 2005
    -
    Release 2.0.3 (Stable)
    -

    -Changes/fixes since 2.0.2 include -

    -
      - -
    • Added document merge tutorial
    • -
    • Updated Russian translation (Vitaly Lipatov)
    • -
    • Updated Spanish translation (Sergio Rivadero)
    • -
    • Updated Czech translation (David Makovský and Zbynek Mrkvick)
    • -
    • Updated Italian translation (Daniele Medri)
    • -
    • Fixed packing style of printer selection dialog
    • -
    • New templates
    • - -
    -
    - - - - - - -
    -
    22 January 2005
    -
    Release 2.1.0 (Unstable)
    -

    -This is the first development release in preparation for 2.2. New features include -

    -
      - -
    • Color object properties can be provided through document-merge feature (Frederic Ruaudel)
    • -
    • Fixes/changes from 2.0.2
    • - -
    -
    - - - - - - -
    -
    22 January 2005
    -
    Release 2.0.2 (Stable)
    -

    -Changes/fixes since 2.0.1 include -

    -
      - -
    • Desktop file reconciled with desktop-entry-spec
    • -
    • New cleaned-up icon
    • -
    • Added option to glabels-batch to allow selection of first label
    • -
    • Added options to glabels-batch to allow selection of merge source and crop marks (José Dapena Paz)
    • -
    • Updated french translation (Florent Morel)
    • -
    • Fixed translation problem with object editor labels
    • -
    • Minor bug fixes and cleanup
    • -
    • New templates
    • - -
    -
    - - - - - - -
    -
    15 August 2004
    -
    Release 2.0.1, "You know it, Bruddah" (Stable)
    -

    -There were a couple of problems with 2.0.0. Changes/fixes include -

    -
      - -
    • Fixed crash when reading some labels created with 1.93.x
    • -
    • Updated japanese translations (Takeshi AIHANA)
    • -
    • Fixed crash from improperly freeing translation strings
    • - -
    -
    - - - - - - - -
    -
    09 August 2004
    -
    Release 2.0.0, "Zulu as Kono" (Stable)
    -

    -Well it's finally here, 2.0 -- woo hoo! -Changes/fixes from 1.93.3 include -

    -
      - -
    • Fixed crash when encountering old template files
    • - -
    • Align grid to label center for DVD/CD and round labels
    • - -
    • Don't touch compression of original file
    • - -
    • 64-bit fixes
    • - -
    • Added man page
    • - -
    • Fixed missing outline problem experienced with some printers
    • - -
    • Added separate horizontal and vertical waste properties for rectangular templates
    • - -
    • Added option to auto-shrink text during document merge
    • - -
    • Fixed memory leaks
    • - -
    • Added format attibute to barcode objects, to allow correct layout of merged labels
    • - -
    • Added mime type registration for GNOME 2.6
    • - -
    -
    - - - - -
    -
    21 February 2004
    -
    Release 1.93.3, "Doggy-Downers" (Unstable for GNOME 2)
    -

    -With any luck, this should be the final development release of gLabels before 2.0. Changes/fixes include -

    -
      - -
    • If GTK+ is version 2.3.2 or greater, the new GtkFileChooserDialog - will be used for the Open and Save As dialogs.
    • - -
    • Added fixed format subtypes for POSTNET, EAN, UPC, and ISBN barcode - types.
    • - -
    • Fixed resize problems with barcodes.
    • - -
    • Corner resize handles will now maintain the current constant aspect ratio - of an object if the Control key is pressed while resizing.
    • - -
    • Fixed vertical offset of barcode text.
    • - -
    • Template code has been split out into its own library - (libglabels) to facilitate 3rd party use of glabels templates.
    • - -
    -
    - - - - -
    -
    04 January 2004
    -
    Release 1.93.2, "Puppy-Uppers" (Unstable for GNOME 2)
    -

    -This latest development snapshot is primarily bug fixes, but includes -a couple of interesting new features. Changes/fixes include -

    -
      - -
    • Make templates known when encountered for the first time in a label. - This can occur when template names have changed between versions or - when you receive a glabels document from someone else who has created a - custom template. (me)
    • - -
    • Now builds against GNOME 2.5.1 (GARNOME 0.28.3). (me)
    • - -
    • Fixed button order in new label and label properties dialogs. - (Wayne Schuller)
    • - -
    • Fixed a bug with the preferences dialog, which resulted in ignoring - default object property preferences. (me)
    • - -
    • Fixed a bug which caused the waste property to function incorrectly - on rectangular labels. (me)
    • - -
    • Added template designer assistant/wizard. (me)
    • - -
    • Added line spacing property to all text objects. (Wayne Schuller)
    • - -
    • Fixed bug in object editor size page which caused the height spin - button to be ignored. (me)
    • - -
    • Fixed bug with object editor size page that caused text object sizes - to be prematurely changed when any property is edited. (me)
    • - -
    -
    - - - - -
    -
    23 December 2003
    -
    Release 1.93.1, "You'll shoot your eye out" (Unstable for GNOME 2)
    -

    -This latest development snapshot is primarily bug fixes. Changes/fixes -include -

    -
      -
    • Document merge now honors locale's encoding when reading CSV files. (me)
    • -
    • Size and position spinboxes now limit well beyond label edges. (me)
    • -
    • Print dialog now tracks settings separately for each label/window. (me)
    • -
    • Scroll window now tracks changes in template. (me)
    • -
    • Various GUI elements are updated when preferences change. (me)
    • -
    • Fixed position bug for box objects. (me)
    • -
    • Fixed crash when copying text objects. (me)
    • -
    • Added property bar entries to view menu. (me)
    • -
    • Property bar widget now track properties of selected widgets in an intuitive manner (Emmanuel Pacaud)
    • -
    • Fixed crash when a template name does not exactly match a current template name. (me)
    • -
    • Some UI cleanup
    • -
    • Fixed size reset button on image size pages. (me)
    • -
    -
    - - - - -
    -
    30 November 2003
    -
    Release 1.93.0, "More Goo To Go" (Unstable for GNOME 2)
    -

    -This latest development snapshot replaces the multiple object property dialogs with a single dockable sidebar. This release completes the feature set planned for glabels 2.0. -

    -
    - - - - -
    -
    9 November 2003
    -
    Release 1.92.3, "Spam Lamb" (Unstable for GNOME 2)
    -

    -This latest development snapshot fixes a couple of nasty bugs: -

    -
      -
    • Fixes a crash that occured when changing zoom level after objects have been deleted.
    • -
    • Templates with a page size of "Other" are once again supported.
    • -
    -
    - - - - -
    -
    1 November 2003
    -
    Release 1.92.2, "Book'im" (Unstable for GNOME 2)
    -

    -This latest development snapshot fixes the glabels-batch command line front-end, which has been broken since 1.92.0. -

    -
    - - - - -
    -
    27 October 2003
    -
    Release 1.92.1 "KMG365" (Unstable for GNOME 2)
    -

    -This latest development snapshot is primarily bug fixes. Changes/fixes -include -

    -
      -
    • Added option to print crop marks. (Me)
    • -
    • Fixed NULL name bug in gl_pixbuf_cache_remove_pixbuf(). (Me)
    • -
    • Fixed bug when importing glabels-0.4 text items. (Me)
    • -
    • Fixed locale problems when reading paper-sizes.xml. (Emmanuel Pacaud)
    • -
    • Default font changed to "Sans" from "Helvetica." (Emmanuel Pacaud)
    • -
    • Updated to most recent egg-recent-files. (Emmanuel Pacaud)
    • -
    • Fixed bug when text item is a single merge field. (Emmanuel Pacaud)
    • -
    • Fixed bug in hacktext canvas item that would leave artifacts when item is moved. (Emmanuel Pacaud)
    • -
    • Allow XML comments at any spot in a template file. (Me)
    • -
    • Workaround for poor rendering of images with alpha channel. (Me)
    • -
    • Properly clean-up bonobo ui component of destroyed windows. (Me)
    • -
    -
    - - - - -
    -
    3 September 2003
    -
    Release 1.92.0 "Ain't No Big Thing, Brudda" (Unstable for GNOME 2)
    - -

    -This latest development snapshot has been a long time in the making. Changes -include -

    -
      -
    • Uses libgnomeprint-2.2
    • -
    • Fixes a couple of crashes associated with image objects.
    • -
    • A new property toolbar for changing common object properties "en masse."
    • -
    • XML file formats have been cleaned up (see ). -
        -
      • Labels generated with 1.91.x should import automatically.
      • -
      -
    • -
    • Templates now support a waste attribute, so that background images can print beyond the edge of the label.
    • -
    -
    - - - - -
    -
    26 January 2003
    -
    Release 1.91.1 (Unstable for GNOME 2)
    - -

    This development snapshot includes

    -
      -
    • Support for "business card" CDs.
    • -
    • Images are now saved "inline."
    • -
    • Text boxes can be resized.
    • -
    • Barcodes are resizable both vertically and horizontally.
    • -
    • Barcode checksums can be enabled/disabled by the user.
    • -
    -
    - - - - -
    -
    31 December 2002
    -
    Release 1.91.0 (Unstable for GNOME 2)
    - -

    This development snapshot includes

    -
      -
    • Object flip and rotation commands.
    • -
    • Object alignment commands.
    • -
    • A status bar, showing current zoom level and cursor position.
    • -
    • Image filenames can come from a document merge field.
    • -
    • A cleaner API for document merge backends.
    • -
    • Ability to select individual records when performing a document merge.
    • -
    • Templates support layouts beyond simple grids (see Memorex CD Labels for an example).
    • -
    • Templates support markup lines.
    • -
    -

    NOTE: This development snapshot breaks compatibility with labels created with previous development versions.

    -
    - - - - -
    -
    05 October 2002
    -
    Release 1.91.0 (Unstable for GNOME 2)
    - -

    This development snapshot includes

    -
      -
    • This release now uses a single document interface (SDI) instead of MDI.
    • -
    • Template coordinate system is now relative to upper left corner.
    • -
    -
    - - - - -
    -
    26 September 2002
    -
    Release 1.89.2 (Unstable for GNOME 2)
    - -

    This development snapshot includes

    -
      -
    • fixes several problems with document-merge feature
    • -
    • extensive user interface tweaks
    • -
    • more code cleanup
    • -
    -
    - - - - -
    -
    10 September 2002
    -
    Release 1.89.1 (Unstable for GNOME 2)
    - -

    This development snapshot includes

    -
      -
    • the ability to read label files created with 0.4.x
    • -
    • various user interface tweaks
    • -
    • some code cleanup
    • -
    -
    - - - - -
    -
    10 September 2002
    -
    Release 0.4.6 (Stable for GNOME 1.4)
    - -

    -Yet another release for the GNOME 1.4 platform. -

    -
      -
    • Fixes a bug which ignored isolated whitespace between merge fields when opening previously saved label files.
    • -
    • Includes updated Russian language support, thanks to Vitaly Lipatov
    • -
    • Additional label templates
    • -
    -
    - - - - -
    - - - - -
    -
    25 August 2002
    -
    Release 0.4.5
    - -

    -"Ok, so I lied." Hopefully, this will be the final release for GNOME 1.4. Future releases will target the GNOME 2.0 platform. -

    -
      -
    • Fixes a locale bug, causing special characters to not be printed in some environments
    • -
    • Fixes a bug in glabels-batch when it attempts to output over an existing file
    • -
    • Includes Russian language support, thanks to Vitaly Lipatov
    • -
    • Includes Chinese language support, thanks to Shell, Hin-lik Hung
    • -
    • Includes Polish language support, thanks to Arkadiusz Lipiec
    • -
    • Includes updated French language support, thanks to Olivier Berger
    • -
    • Includes updated Japanese language support, thanks to Takeshi Aihana
    • -
    • Additional label templates
    • -
    -
    - - - - -
    -
    27 June 2002
    -
    Release 0.4.4
    - -

    -Hopefully, this will be the final release for GNOME 1.4. Future releases will -target the GNOME 2.0 platform. -

    -
      -
    • This release now uses version 0.98 of Alessandro Rubini's GNU-Barcode library
    • -
    • The text back-end includes an improved CSV parser
    • -
    • "Clip to outline" code has been removed -- it caused problems with some printers/drivers
    • -
    • Fixes a bug in the canvas item event handlers
    • -
    • Fixes origin bug in mini-preview widget
    • -
    • Includes Spanish language support, thanks to Víctor Moral
    • -
    • Additional label templates
    • -
    -
    - - - - -
    -
    22 Febuary 2002
    -
    Release 0.4.3
    - -
      -
    • Includes a non-graphical front-end to print previously created labels.
    • -
    • Added support for simple round labels
    • -
    • Additional label templates.
    • -
    -
    - - - - -
    -
    03 Febuary 2002
    -
    Release 0.4.2
    - -
      -
    • Updated French language support, thanks to Olivier Berger.
    • -
    • Updated Japanese language support, thanks to Takeshi Aihana.
    • -
    • Updated Brazilian Portuguese language support, thanks to Paulo Rogério Ormenese.
    • -
    • Updated German language support, thanks to Marcus Bauer.
    • -
    • Additional label templates.
    • -
    -
    - - - - -
    -
    14 January 2002
    -
    Release 0.4.1
    - -
      -
    • Adds reverse (mirror-image) printing feature.
    • -
    • Some code clean-up.
    • -
    • Updated Japanese language support, thanks to Takeshi Aihana.
    • -
    • Updated French language support, thanks to Olivier Berger.
    • -
    • Additional label templates.
    • -
    -
    - - - - -
    -
    06 January 2002
    -
    Release 0.4.0
    - -

    -This is the first release with a document merge feature. The -implementation of this feature may still be a little rough around -the edges. 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 records by using -the "\n" entity. -

    -

    -Other changes include -

    -
      -
    • Some code clean-up.
    • -
    • Updated Japanese language support, thanks to Takeshi Aihana. (0.3.4 functionality)
    • -
    • Additional label templates.
    • -
    -
    - - - - -
    -
    17 December 2001
    -
    Release 0.3.4
    - -
      -
    • Fixes focus behavior when using arrow keys to nudge objects.
    • -
    • File and print dialogs now have memory across instances.
    • -
    • This release includes Brazilian Portuguese language support, thanks to Paulo Rogério Ormenese.
    • -
    • This release includes updated French language support, thanks to Olivier Berger.
    • -
    • Additional label templates.
    • -
    -
    - - - - -
    -
    13 December 2001
    -
    Release 0.3.3
    - -
      -
    • Fixes a crash when opening a label that has no corresponding template.
    • -
    • This release no longer uses a single flat file for templates. Separate user created template files can be placed in a ~/.glabels/ directory.
    • -
    • The "New" dialog now segregates labels by paper size (i.e. US-Letter and A4). The user can now select the default paper size in the "Preferences" dialog.
    • -
    • The user can now select a default unit for distance (points, inches, or mm) in the "Preferences" dialog.
    • -
    • Numerous tweaks to the various "Object properties" dialogs.
    • -
    -
    - - - - -
    -
    06 December 2001
    -
    Release 0.3.2
    - -
      -
    • Fixes a bug in parsing of hexadecimal colors from label files.
    • -
    • Adds nudge feature. Selections can now be "nudged" using arrow keys.
    • -
    • An additional label template.
    • -
    - -

    03 December 2001, Release 0.3.1:

    -
      -
    • Fixes segmentation fault with consecutive newlines in text objects.
    • -
    • This release includes Japanese language support, thanks to Takeshi Aihana.
    • -
    -
    - - - - -
    -
    02 December 2001
    -
    Release 0.3.0
    - -

    -This release includes some significant restructuring "under the hood." -Some of the more visible features include: -

    -
      -
    • Mini-previews have been added to the "New" dialog.
    • -
    • Objects can now be resized by dragging on "handles" with the mouse.
    • -
    • Object property dialogs include many improvements.
    • -
    • Additional label templates.
    • -
    -
    - - - - -
    -
    18 November 2001
    -
    Release 0.2.4
    - -
      -
    • This release adds a simple interface to the print dialog that allows the selection of individual or multiple labels to be printed.
    • -
    • Additional label templates.
    • -
    -
    - - - - -
    -
    11 November 2001
    -
    Release 0.2.3
    - -
      -
    • Zoom capability has been added.
    • -
    • Additional label templates.
    • -
    -
    - - - - -
    -
    28 October 2001
    -
    Release 0.2.2
    - -
      -
    • Object selection and cursor behavior have been slightly modified. Objects can now be selected and moved with the same initial mouse click.
    • -
    • This release introduces a type property to the label template, in preparation for non-rectangular label types (e.g. CD labels).
    • -
    -
    - - - - -
    -
    21 October 2001
    -
    Release 0.2.1
    - -
      -
    • This release fixes a large portability problem with the anti-aliased text feature introduced in 0.2.0.
    • -
    • This release includes German language support, thanks to Marcus Bauer.
    • -
    -
    - - - - -
    -
    14 October 2001
    -
    Release 0.2.0
    - -
      -
    • This release supports rotated labels and cards. I.e. cards and labels that would normally default to a landscape orientation can now be rotated to a portrait orientation. (There are some problems with image objects in this rotated -orientation during print-preview.)
    • -
    • Text objects are now anti-aliased for a more WYSIWYG experience. -
        -
      • If you experience problems with text objects, this feature can be disabled by doing a "./configure --disable-hacktext" and recompiling.
      • -
      -
    • -
    -
    - - - - -
    -
    05 October 2001
    -
    Release 0.1.5
    - -

    -This quick release includes French language support, thanks to -Olivier Berger. -

    -
    - - - - -
    -
    01 October 2001
    -
    Release 0.1.4
    - -

    -This release adds the standard clipboard functions (cut, -copy and paste). It also fixes a couple of minor bugs. -

    -
    - - - - -
    -
    26 September 2001
    -
    Release 0.1.3
    - -This release adds 10 additional barcode types, thanks to Alessandro Rubini's GNU-Barcode library. -
    - - - - -
    -
    08 September 2001
    -
    Release 0.1.2
    - -
      -
    • Improved handling of locale character sets.
    • -
    • Aggregate item selection is now supported (multiple items can be manipulated as a group).
    • -
    • Additional label templates.
    • -
    -
    - - - - -
    -
    03 September 2001
    -
    Release 0.1.1
    - -
      -
    • Initial barcode support has been added (POSTNET and Code 39). These have not been tested -- volunteers are welcome.
    • -
    • An option to print label outlines has been added to test printer alignment.
    • -
    • Additional label templates have been added.
    • -
    -
    - - - - -
    -
    28 August 2001
    -
    Release 0.1.0
    - -

    -This is the initial release of gLabels. It is still a little -rough around the edges and is missing several important features; -however, it should have enough functionality to produce sheets -of identical labels or business cards. -

    -
    - - - - - - diff --git a/web/screenshots/191-screenshot-main-grid-thumb.png b/web/screenshots/191-screenshot-main-grid-thumb.png deleted file mode 100644 index c545fc3e..00000000 Binary files a/web/screenshots/191-screenshot-main-grid-thumb.png and /dev/null differ diff --git a/web/screenshots/191-screenshot-main-grid.png b/web/screenshots/191-screenshot-main-grid.png deleted file mode 100644 index a51e68c8..00000000 Binary files a/web/screenshots/191-screenshot-main-grid.png and /dev/null differ diff --git a/web/screenshots/191-screenshot-main-thumb.png b/web/screenshots/191-screenshot-main-thumb.png deleted file mode 100644 index eecfbd3a..00000000 Binary files a/web/screenshots/191-screenshot-main-thumb.png and /dev/null differ diff --git a/web/screenshots/191-screenshot-main.png b/web/screenshots/191-screenshot-main.png deleted file mode 100644 index e6a6d044..00000000 Binary files a/web/screenshots/191-screenshot-main.png and /dev/null differ diff --git a/web/screenshots/191-screenshot-new-thumb.png b/web/screenshots/191-screenshot-new-thumb.png deleted file mode 100644 index 8a9536ee..00000000 Binary files a/web/screenshots/191-screenshot-new-thumb.png and /dev/null differ diff --git a/web/screenshots/191-screenshot-new.png b/web/screenshots/191-screenshot-new.png deleted file mode 100644 index 3040bf22..00000000 Binary files a/web/screenshots/191-screenshot-new.png and /dev/null differ diff --git a/web/screenshots/191-screenshot-print-merge-thumb.png b/web/screenshots/191-screenshot-print-merge-thumb.png deleted file mode 100644 index d0f5b85b..00000000 Binary files a/web/screenshots/191-screenshot-print-merge-thumb.png and /dev/null differ diff --git a/web/screenshots/191-screenshot-print-merge.png b/web/screenshots/191-screenshot-print-merge.png deleted file mode 100644 index 6c7e31f6..00000000 Binary files a/web/screenshots/191-screenshot-print-merge.png and /dev/null differ diff --git a/web/screenshots/191-screenshot-print-simple-thumb.png b/web/screenshots/191-screenshot-print-simple-thumb.png deleted file mode 100644 index 654e09ac..00000000 Binary files a/web/screenshots/191-screenshot-print-simple-thumb.png and /dev/null differ diff --git a/web/screenshots/191-screenshot-print-simple.png b/web/screenshots/191-screenshot-print-simple.png deleted file mode 100644 index 9e865836..00000000 Binary files a/web/screenshots/191-screenshot-print-simple.png and /dev/null differ diff --git a/web/screenshots/192-screenshot-thumb.png b/web/screenshots/192-screenshot-thumb.png deleted file mode 100644 index cd42d83a..00000000 Binary files a/web/screenshots/192-screenshot-thumb.png and /dev/null differ diff --git a/web/screenshots/192-screenshot.png b/web/screenshots/192-screenshot.png deleted file mode 100644 index e0c45718..00000000 Binary files a/web/screenshots/192-screenshot.png and /dev/null differ diff --git a/web/screenshots/193-screenshot-main-thumb.png b/web/screenshots/193-screenshot-main-thumb.png deleted file mode 100644 index ecdb46b4..00000000 Binary files a/web/screenshots/193-screenshot-main-thumb.png and /dev/null differ diff --git a/web/screenshots/193-screenshot-main.png b/web/screenshots/193-screenshot-main.png deleted file mode 100644 index ec4d2511..00000000 Binary files a/web/screenshots/193-screenshot-main.png and /dev/null differ diff --git a/web/screenshots/193-screenshot-new-thumb.png b/web/screenshots/193-screenshot-new-thumb.png deleted file mode 100644 index 84518125..00000000 Binary files a/web/screenshots/193-screenshot-new-thumb.png and /dev/null differ diff --git a/web/screenshots/193-screenshot-new.png b/web/screenshots/193-screenshot-new.png deleted file mode 100644 index 25c35a66..00000000 Binary files a/web/screenshots/193-screenshot-new.png and /dev/null differ diff --git a/web/screenshots/193-screenshot-preview-thumb.png b/web/screenshots/193-screenshot-preview-thumb.png deleted file mode 100644 index 678ce96e..00000000 Binary files a/web/screenshots/193-screenshot-preview-thumb.png and /dev/null differ diff --git a/web/screenshots/193-screenshot-preview.png b/web/screenshots/193-screenshot-preview.png deleted file mode 100644 index 5c1f3211..00000000 Binary files a/web/screenshots/193-screenshot-preview.png and /dev/null differ diff --git a/web/screenshots/193-screenshot-print-thumb.png b/web/screenshots/193-screenshot-print-thumb.png deleted file mode 100644 index c36b8789..00000000 Binary files a/web/screenshots/193-screenshot-print-thumb.png and /dev/null differ diff --git a/web/screenshots/193-screenshot-print.png b/web/screenshots/193-screenshot-print.png deleted file mode 100644 index f75d1c16..00000000 Binary files a/web/screenshots/193-screenshot-print.png and /dev/null differ diff --git a/web/screenshots/220-screenshot-main-thumb.png b/web/screenshots/220-screenshot-main-thumb.png deleted file mode 100644 index 0196c3bb..00000000 Binary files a/web/screenshots/220-screenshot-main-thumb.png and /dev/null differ diff --git a/web/screenshots/220-screenshot-main.png b/web/screenshots/220-screenshot-main.png deleted file mode 100644 index c8a54b8c..00000000 Binary files a/web/screenshots/220-screenshot-main.png and /dev/null differ diff --git a/web/screenshots/220-screenshot-new-thumb.png b/web/screenshots/220-screenshot-new-thumb.png deleted file mode 100644 index 6a663c37..00000000 Binary files a/web/screenshots/220-screenshot-new-thumb.png and /dev/null differ diff --git a/web/screenshots/220-screenshot-new.png b/web/screenshots/220-screenshot-new.png deleted file mode 100644 index 694fa5e5..00000000 Binary files a/web/screenshots/220-screenshot-new.png and /dev/null differ diff --git a/web/screenshots/220-screenshot-preview-thumb.png b/web/screenshots/220-screenshot-preview-thumb.png deleted file mode 100644 index 01bed780..00000000 Binary files a/web/screenshots/220-screenshot-preview-thumb.png and /dev/null differ diff --git a/web/screenshots/220-screenshot-preview.png b/web/screenshots/220-screenshot-preview.png deleted file mode 100644 index 55e3cf7b..00000000 Binary files a/web/screenshots/220-screenshot-preview.png and /dev/null differ diff --git a/web/screenshots/220-screenshot-print-thumb.png b/web/screenshots/220-screenshot-print-thumb.png deleted file mode 100644 index 1149ecac..00000000 Binary files a/web/screenshots/220-screenshot-print-thumb.png and /dev/null differ diff --git a/web/screenshots/220-screenshot-print.png b/web/screenshots/220-screenshot-print.png deleted file mode 100644 index f81ca335..00000000 Binary files a/web/screenshots/220-screenshot-print.png and /dev/null differ diff --git a/web/screenshots/glabels1-screenshot-thumb.jpg b/web/screenshots/glabels1-screenshot-thumb.jpg deleted file mode 100644 index 0692cb7f..00000000 Binary files a/web/screenshots/glabels1-screenshot-thumb.jpg and /dev/null differ diff --git a/web/screenshots/glabels1-screenshot.jpg b/web/screenshots/glabels1-screenshot.jpg deleted file mode 100644 index a5a7e65a..00000000 Binary files a/web/screenshots/glabels1-screenshot.jpg and /dev/null differ diff --git a/web/screenshots/glabels1-screenshot.png b/web/screenshots/glabels1-screenshot.png deleted file mode 100644 index 2576f989..00000000 Binary files a/web/screenshots/glabels1-screenshot.png and /dev/null differ diff --git a/web/screenshots/index.php b/web/screenshots/index.php deleted file mode 100644 index beab5fdb..00000000 --- a/web/screenshots/index.php +++ /dev/null @@ -1,90 +0,0 @@ - - - - -

    Screenshots ...

    - - - - -

    Stable/2.2.x

    - - - - - - -
    - - - - - - -
    - - - - -

    Unstable/1.93.x

    - - - - - - -
    - - - - - - -
    - - - - -

    Unstable/1.92.x

    - - - - - -
    - - - - -

    Unstable/1.91.x

    - - - - - - -
    - - - - - - - -
    - - - - -

    Stable/0.4.x

    - - - - - -
    - - - - - diff --git a/web/source/glabels-0.1.0.tar.gz b/web/source/glabels-0.1.0.tar.gz deleted file mode 100644 index cf06bffe..00000000 Binary files a/web/source/glabels-0.1.0.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.1.1.tar.gz b/web/source/glabels-0.1.1.tar.gz deleted file mode 100644 index d1df4e78..00000000 Binary files a/web/source/glabels-0.1.1.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.1.2.tar.gz b/web/source/glabels-0.1.2.tar.gz deleted file mode 100644 index c1732b95..00000000 Binary files a/web/source/glabels-0.1.2.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.1.3.tar.gz b/web/source/glabels-0.1.3.tar.gz deleted file mode 100644 index 56e923e7..00000000 Binary files a/web/source/glabels-0.1.3.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.1.4.tar.gz b/web/source/glabels-0.1.4.tar.gz deleted file mode 100644 index f5e7d297..00000000 Binary files a/web/source/glabels-0.1.4.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.1.5.tar.gz b/web/source/glabels-0.1.5.tar.gz deleted file mode 100644 index b1e0bd04..00000000 Binary files a/web/source/glabels-0.1.5.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.2.0.tar.gz b/web/source/glabels-0.2.0.tar.gz deleted file mode 100644 index c3d09159..00000000 Binary files a/web/source/glabels-0.2.0.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.2.1.tar.gz b/web/source/glabels-0.2.1.tar.gz deleted file mode 100644 index 8cf6f16c..00000000 Binary files a/web/source/glabels-0.2.1.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.2.2.tar.gz b/web/source/glabels-0.2.2.tar.gz deleted file mode 100644 index 24d68584..00000000 Binary files a/web/source/glabels-0.2.2.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.2.3.tar.gz b/web/source/glabels-0.2.3.tar.gz deleted file mode 100644 index df91c446..00000000 Binary files a/web/source/glabels-0.2.3.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.2.4.tar.gz b/web/source/glabels-0.2.4.tar.gz deleted file mode 100644 index f855122b..00000000 Binary files a/web/source/glabels-0.2.4.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.3.0.tar.gz b/web/source/glabels-0.3.0.tar.gz deleted file mode 100644 index e61a1f61..00000000 Binary files a/web/source/glabels-0.3.0.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.3.1.tar.gz b/web/source/glabels-0.3.1.tar.gz deleted file mode 100644 index 6580c1da..00000000 Binary files a/web/source/glabels-0.3.1.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.3.2.tar.gz b/web/source/glabels-0.3.2.tar.gz deleted file mode 100644 index bbd2e6e9..00000000 Binary files a/web/source/glabels-0.3.2.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.3.3.tar.gz b/web/source/glabels-0.3.3.tar.gz deleted file mode 100644 index 69f2f541..00000000 Binary files a/web/source/glabels-0.3.3.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.3.4.tar.gz b/web/source/glabels-0.3.4.tar.gz deleted file mode 100644 index 6dc85ee8..00000000 Binary files a/web/source/glabels-0.3.4.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.4.0.tar.gz b/web/source/glabels-0.4.0.tar.gz deleted file mode 100644 index 9c3652d8..00000000 Binary files a/web/source/glabels-0.4.0.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.4.1.tar.gz b/web/source/glabels-0.4.1.tar.gz deleted file mode 100644 index 471df444..00000000 Binary files a/web/source/glabels-0.4.1.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.4.2.tar.gz b/web/source/glabels-0.4.2.tar.gz deleted file mode 100644 index 5624a788..00000000 Binary files a/web/source/glabels-0.4.2.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.4.3.tar.gz b/web/source/glabels-0.4.3.tar.gz deleted file mode 100644 index a0c93e86..00000000 Binary files a/web/source/glabels-0.4.3.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.4.4.tar.gz b/web/source/glabels-0.4.4.tar.gz deleted file mode 100644 index 92cf381f..00000000 Binary files a/web/source/glabels-0.4.4.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.4.5.tar.gz b/web/source/glabels-0.4.5.tar.gz deleted file mode 100644 index c8b14f30..00000000 Binary files a/web/source/glabels-0.4.5.tar.gz and /dev/null differ diff --git a/web/source/glabels-0.4.6.tar.gz b/web/source/glabels-0.4.6.tar.gz deleted file mode 100644 index 43faf210..00000000 Binary files a/web/source/glabels-0.4.6.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.89.0.tar.gz b/web/source/glabels-1.89.0.tar.gz deleted file mode 100644 index 1fc8f79e..00000000 Binary files a/web/source/glabels-1.89.0.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.89.1.tar.gz b/web/source/glabels-1.89.1.tar.gz deleted file mode 100644 index ecee16e3..00000000 Binary files a/web/source/glabels-1.89.1.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.89.2.tar.gz b/web/source/glabels-1.89.2.tar.gz deleted file mode 100644 index c7abc095..00000000 Binary files a/web/source/glabels-1.89.2.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.90.0.tar.gz b/web/source/glabels-1.90.0.tar.gz deleted file mode 100644 index b5dc9ea7..00000000 Binary files a/web/source/glabels-1.90.0.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.91.0.tar.gz b/web/source/glabels-1.91.0.tar.gz deleted file mode 100644 index f41b947f..00000000 Binary files a/web/source/glabels-1.91.0.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.91.1.tar.gz b/web/source/glabels-1.91.1.tar.gz deleted file mode 100644 index c74be1f0..00000000 Binary files a/web/source/glabels-1.91.1.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.92.0.tar.gz b/web/source/glabels-1.92.0.tar.gz deleted file mode 100644 index 4f3cfd0f..00000000 Binary files a/web/source/glabels-1.92.0.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.92.1.tar.gz b/web/source/glabels-1.92.1.tar.gz deleted file mode 100644 index 5ea05eb2..00000000 Binary files a/web/source/glabels-1.92.1.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.92.2.tar.gz b/web/source/glabels-1.92.2.tar.gz deleted file mode 100644 index 620049cd..00000000 Binary files a/web/source/glabels-1.92.2.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.92.3.tar.gz b/web/source/glabels-1.92.3.tar.gz deleted file mode 100644 index 118d9027..00000000 Binary files a/web/source/glabels-1.92.3.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.93.0.tar.gz b/web/source/glabels-1.93.0.tar.gz deleted file mode 100644 index f0b961cf..00000000 Binary files a/web/source/glabels-1.93.0.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.93.1.tar.gz b/web/source/glabels-1.93.1.tar.gz deleted file mode 100644 index 452837af..00000000 Binary files a/web/source/glabels-1.93.1.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.93.2.tar.gz b/web/source/glabels-1.93.2.tar.gz deleted file mode 100644 index 50c3be06..00000000 Binary files a/web/source/glabels-1.93.2.tar.gz and /dev/null differ diff --git a/web/source/glabels-1.93.3.tar.gz b/web/source/glabels-1.93.3.tar.gz deleted file mode 100644 index afe110a3..00000000 Binary files a/web/source/glabels-1.93.3.tar.gz and /dev/null differ diff --git a/web/tango-icons/applications-development.png b/web/tango-icons/applications-development.png deleted file mode 100644 index f0eafa17..00000000 Binary files a/web/tango-icons/applications-development.png and /dev/null differ diff --git a/web/tango-icons/applications-internet.png b/web/tango-icons/applications-internet.png deleted file mode 100644 index 6b56b703..00000000 Binary files a/web/tango-icons/applications-internet.png and /dev/null differ diff --git a/web/tango-icons/dialog-information.png b/web/tango-icons/dialog-information.png deleted file mode 100644 index b6a95bd4..00000000 Binary files a/web/tango-icons/dialog-information.png and /dev/null differ diff --git a/web/tango-icons/emblem-photos.png b/web/tango-icons/emblem-photos.png deleted file mode 100644 index 51c4560f..00000000 Binary files a/web/tango-icons/emblem-photos.png and /dev/null differ diff --git a/web/tango-icons/help-browser.png b/web/tango-icons/help-browser.png deleted file mode 100644 index 4ab49ada..00000000 Binary files a/web/tango-icons/help-browser.png and /dev/null differ diff --git a/web/tango-icons/internet-news-reader.png b/web/tango-icons/internet-news-reader.png deleted file mode 100644 index 6f359a31..00000000 Binary files a/web/tango-icons/internet-news-reader.png and /dev/null differ diff --git a/web/tango-icons/package-x-generic.png b/web/tango-icons/package-x-generic.png deleted file mode 100644 index 00f5b0c6..00000000 Binary files a/web/tango-icons/package-x-generic.png and /dev/null differ diff --git a/web/tango-icons/system-users.png b/web/tango-icons/system-users.png deleted file mode 100644 index 60817bd8..00000000 Binary files a/web/tango-icons/system-users.png and /dev/null differ